-
Notifications
You must be signed in to change notification settings - Fork 688
Remove legacy jerry_get_memory_limits API function and unused configuration macros #2329
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 legacy jerry_get_memory_limits API function and unused configuration macros #2329
Conversation
|
NOTE: THIS IS AN API-BREAKING CHANGE! (At least, theoretically.) In practice, I cannot think of any user of JerryScript who would have used the |
|
Speaking of config macros and breaking changes: is the void
ecma_init_global_lex_env (void)
{
#ifdef CONFIG_ECMA_GLOBAL_ENVIRONMENT_DECLARATIVE
JERRY_CONTEXT (ecma_global_lex_env_p) = ecma_create_decl_lex_env (NULL);
#else /* !CONFIG_ECMA_GLOBAL_ENVIRONMENT_DECLARATIVE */
ecma_object_t *glob_obj_p = ecma_builtin_get (ECMA_BUILTIN_ID_GLOBAL);
JERRY_CONTEXT (ecma_global_lex_env_p) = ecma_create_object_lex_env (NULL, glob_obj_p, false);
ecma_deref_object (glob_obj_p);
#endif /* CONFIG_ECMA_GLOBAL_ENVIRONMENT_DECLARATIVE */
} /* ecma_init_global_lex_env */I'm happy to include the removal of the macro and the associated code paths in this patch but feedback would be appreciated on this first. |
3e9d3d5 to
bbf2608
Compare
|
I would emphasize the removal of |
|
@zherczeg And what about the question raised in the comment: what's the deal with CONFIG_ECMA_GLOBAL_ENVIRONMENT_DECLARATIVE ? |
|
That macro makes an ecmascript program behave like a function without the argument and Currently you can create functions directly, and I would recommend that if you want to use such a feature. |
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
bbf2608 to
33a8e2e
Compare
|
I've updated the PR according to the feedbacks:
|
zherczeg
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
…ration macros JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
33a8e2e to
2f6ee92
Compare
Also remove the legacy
jerry_get_memory_limitsAPI function as itdoes not report either useful or valid information.
JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu