-
Notifications
You must be signed in to change notification settings - Fork 684
Remove ECMA_LEXICAL_ENVIRONMENT_OBJECT_BOUND. #2408
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
Remove ECMA_LEXICAL_ENVIRONMENT_OBJECT_BOUND. #2408
Conversation
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
jerry-core/ecma/base/ecma-globals.h
Outdated
@@ -613,8 +613,7 @@ typedef enum | |||
/* Types between 0 - 12 are ecma_object_type_t which can have a built-in flag. */ | |||
|
|||
ECMA_LEXICAL_ENVIRONMENT_DECLARATIVE = 13, /**< declarative lexical environment */ | |||
ECMA_LEXICAL_ENVIRONMENT_OBJECT_BOUND = 14, /**< object-bound lexical environment */ | |||
ECMA_LEXICAL_ENVIRONMENT_THIS_OBJECT_BOUND = 15, /**< object-bound lexical environment | |||
ECMA_LEXICAL_ENVIRONMENT_THIS_OBJECT_BOUND = 14, /**< object-bound lexical environment | |||
* with provideThis flag */ |
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.
second line of comment seems to be off by one space. (legacy issue but could be fixed now)
Only the global object bound to the root node of the lexical environment tree does not have a provideThis flag, and ecma_op_implicit_this_value() falls back to the global object. Hence we get the same effect regardless of provideThis. JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg [email protected]
dbf8864
to
fc264c9
Compare
Done. Thanks for the review. |
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
Refs: jerryscript-project/jerryscript#2431 Refs: jerryscript-project/jerryscript#2496 Refs: jerryscript-project/jerryscript#2485 Refs: jerryscript-project/jerryscript#2530 Refs: jerryscript-project/jerryscript#2547 Refs: jerryscript-project/jerryscript#2436 Refs: jerryscript-project/jerryscript#2467 Refs: jerryscript-project/jerryscript#2481 Refs: jerryscript-project/jerryscript#2408 Refs: jerryscript-project/jerryscript#2430 Refs: jerryscript-project/jerryscript#2439 Refs: jerryscript-project/jerryscript#2588
Only the global object bound to the root node of the lexical environment tree does not have a provideThis flag, and ecma_op_implicit_this_value() falls back to the global object. Hence we get the same effect regardless of provideThis.