-
Notifications
You must be signed in to change notification settings - Fork 688
Don't use pointer compression where the ecma_value can store pointer … #1020
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
Don't use pointer compression where the ecma_value can store pointer … #1020
Conversation
d6b1156 to
019d92b
Compare
|
|
jerry-core/ecma/base/ecma-gc.c
Outdated
| { | ||
| ecma_object_t *obj_p = ECMA_GET_NON_NULL_POINTER (ecma_object_t, property_value); | ||
|
|
||
| ecma_object_t *obj_p = ecma_get_object_from_value (property_value); |
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.
Unfortunately this is still a slow-down, since you also add object flags to the value. I would still prefer a variant to the ECMA_GET_NON_NULL_POINTER macro.
ECMA_INTERNAL_VALUE_GET_POINTER / ECMA_INTERNAL_VALUE_SET_POINTER
2ce61c1 to
e84dad6
Compare
|
Thanks, I've updated the patch based on your comment. |
jerry-core/ecma/base/ecma-helpers.h
Outdated
| * Set an internal property value of non-null pointer so that it will correspond | ||
| * to specified non_compressed_pointer. | ||
| */ | ||
| #define ECMA_SET_INTERNAL_VALUE_POINTER(field, non_compressed_pointer) ECMA_SET_NON_NULL_POINTER(field, \ |
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 would prefer
#define ECMA_SET_INTERNAL_VALUE_POINTER(field, non_compressed_pointer) \
ECMA_SET_NON_NULL_POINTER((field), (non_compressed_pointer))
d1e0e3b to
8cf7c44
Compare
|
I've rebase with master. |
jerry-core/ecma/base/ecma-helpers.h
Outdated
| /** | ||
| * Set an internal property value of pointer | ||
| */ | ||
| #define ECMA_SET_INTERNAL_VALUE_POINTER(field, pointer) field = (ecma_value_t) pointer; |
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'd use similar style for the macro like below.
#define ECMA_SET_INTERNAL_VALUE_POINTER(field, non_compressed_pointer) \
field = (ecma_value_t) non_compressed_pointer963e951 to
f3a942b
Compare
…value directly. This changes affects those internal properties where the property value type is an ecma_object_t ptr. JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
|
LGTM |
f3a942b to
ec19294
Compare
|
LGTM |
…value directly.
This changes affects those internal properties where the property value type is an ecma_object_t ptr.
JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com