-
Notifications
You must be signed in to change notification settings - Fork 691
Unify internal property creation #4373
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
fb920ee to
c9b1655
Compare
c9b1655 to
29b5a40
Compare
| /** | ||
| * Checks whether a property is raw data or accessor property | ||
| */ | ||
| #define ECMA_PROPERTY_IS_RAW(property) \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like something like (property & 0b00011000), C doesn't support for 0b, we can use 0x instead.
Without the need of compare operator
Any definition of property bits?
property is 8 bits long, what's the meaning of each bits?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good bit magic is essential for high performance. This condition checks that the highest two bits are not set without using a temporary register. The alternative ´(x & 0xc0) != 0xc0´ requires two operations and a temporary register.
Property bits are described in ecma_property_flags_t.
bd99a33 to
b071da6
Compare
rerobika
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
b071da6 to
64be1b1
Compare
|
Property creation and usage are hot paths in the engine. Does this patch have any effect on the performance? |
LaszloLango
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please update ./docs/04.INTERNALS.md as well.
Furthermore free up a bit in the property descriptor. JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg [email protected]
64be1b1 to
136fa18
Compare
No major effect. |
LaszloLango
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
| /* Internal properties are special properties so they must not be present. */ | ||
| JERRY_ASSERT (ECMA_PROPERTY_GET_NAME_TYPE (*property_p) != ECMA_DIRECT_STRING_MAGIC | ||
| || prop_pair_p->names_cp[i] < LIT_NON_INTERNAL_MAGIC_STRING__COUNT | ||
| || prop_pair_p->names_cp[i] >= LIT_MAGIC_STRING__COUNT); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This assert hits on debug test262-esnext on 116 tests. Please a take a look what happened here.
No description provided.