-
Notifications
You must be signed in to change notification settings - Fork 676
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
Fixing retrieval of [[Class]] properties for built-in function objects, optimizing memory related to [[Class]] property #126
Conversation
ruben-ayrapetyan
commented
May 28, 2015
- introduced ecma_object_get_class_name interface (the changed implicitly fixed Assertion 'property_p != NULL' failed in ecma_get_internal_property #112);
- removed creation of [[Class]] internal property for types of objects that unambiguously determine the [[Class]] value.
9b9dbd6
to
7f42d8a
Compare
…s, optimizing memory related to [[Class]] property. - introduced ecma_object_get_class_name interface; - removed creation of [[Class]] internal property for types of objects that unambiguously determine the [[Class]] value. Related issue: #112 JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan [email protected]
7f42d8a
to
ed14474
Compare
Good for me. |
ECMA_INTERNAL_PROPERTY_BUILT_IN_ID); | ||
ecma_builtin_id_t builtin_id = (ecma_builtin_id_t) built_in_id_prop_p->u.internal_property.value; | ||
|
||
switch (builtin_id) |
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.
For me it seems that if the Array built-in is disabled (the CONFIG_ECMA_COMPACT_PROFILE_DISABLE_ARRAY_BUILTIN
is defined) then the default case will execute. Am I thinking that correctly, or did I missed something?
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.
In case the CONFIG_ECMA_COMPACT_PROFILE_DISABLE_ARRAY_BUILTIN
is defined,
the Array built-in is disabled, and ECMA_BUILTIN_ID_ARRAY
is not included into ecma_builtin_id_t
enum.
So, the routine couldn't be called with ECMA_BUILTIN_ID_ARRAY
value in the case (it is checked with assertion in the default
case).
jerry-core/ecma/builtin-objects/ecma-builtins.inc.h`
#ifndef CONFIG_ECMA_COMPACT_PROFILE_DISABLE_ARRAY_BUILTIN
/* The Array.prototype object (15.4.4) */
BUILTIN (ECMA_BUILTIN_ID_ARRAY_PROTOTYPE,
ECMA_OBJECT_TYPE_ARRAY,
ECMA_MAGIC_STRING_ARRAY_UL,
ECMA_BUILTIN_ID_OBJECT_PROTOTYPE,
true,
true,
array_prototype)
/* The Array object (15.4.1) */
BUILTIN (ECMA_BUILTIN_ID_ARRAY,
ECMA_OBJECT_TYPE_FUNCTION,
ECMA_MAGIC_STRING_ARRAY_UL,
ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE,
true,
true,
array)
#endif /* !CONFIG_ECMA_COMPACT_PROFILE_DISABLE_ARRAY_BUILTIN*/
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.
Ah.. I see.
lgtm |
Ok, |
Merged (da7e9d9). |