Skip to content

Fix 'jerry-test-suite/13/13-011.js' fail in compact profile #912

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

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion jerry-core/ecma/operations/ecma-function-object.c
Original file line number Diff line number Diff line change
Expand Up @@ -616,7 +616,7 @@ ecma_op_function_call (ecma_object_t *func_obj_p, /**< Function object */
else
{
local_env_p = ecma_create_decl_lex_env (scope_p);

#ifndef CONFIG_ECMA_COMPACT_PROFILE
if (bytecode_data_p->status_flags & CBC_CODE_FLAGS_ARGUMENTS_NEEDED)
{
ecma_op_create_arguments_object (func_obj_p,
Expand All @@ -625,6 +625,7 @@ ecma_op_function_call (ecma_object_t *func_obj_p, /**< Function object */
arguments_list_len,
bytecode_data_p);
}
#endif /* !CONFIG_ECMA_COMPACT_PROFILE */
}

ret_value = vm_run (bytecode_data_p,
Expand Down
38 changes: 0 additions & 38 deletions jerry-core/ecma/operations/ecma-lex-env.c
Original file line number Diff line number Diff line change
Expand Up @@ -204,24 +204,6 @@ ecma_op_set_mutable_binding (ecma_object_t *lex_env_p, /**< lexical environment

if (ecma_get_lex_env_type (lex_env_p) == ECMA_LEXICAL_ENVIRONMENT_DECLARATIVE)
{
#ifndef JERRY_NDEBUG
# ifdef CONFIG_ECMA_COMPACT_PROFILE
bool is_equal = false;

ecma_string_t *arguments_magic_string_p = ecma_get_magic_string (LIT_MAGIC_STRING_ARGUMENTS);
if (ecma_compare_ecma_strings (name_p, arguments_magic_string_p))
{
is_equal = true;
}
ecma_deref_ecma_string (arguments_magic_string_p);

if (is_equal)
{
return ecma_make_error_obj_value (ecma_builtin_get (ECMA_BUILTIN_ID_COMPACT_PROFILE_ERROR));
}
# endif /* CONFIG_ECMA_COMPACT_PROFILE */
#endif /* !JERRY_NDEBUG */

ecma_property_t *property_p = ecma_get_named_data_property (lex_env_p, name_p);

if (ecma_is_property_writable (property_p))
Expand Down Expand Up @@ -276,26 +258,6 @@ ecma_op_get_binding_value (ecma_object_t *lex_env_p, /**< lexical environment */

if (ecma_get_lex_env_type (lex_env_p) == ECMA_LEXICAL_ENVIRONMENT_DECLARATIVE)
{
#ifndef JERRY_NDEBUG
# ifdef CONFIG_ECMA_COMPACT_PROFILE
bool is_equal = false;

ecma_string_t *arguments_magic_string_p = ecma_get_magic_string (LIT_MAGIC_STRING_ARGUMENTS);
if (ecma_compare_ecma_strings (name_p, arguments_magic_string_p))
{
is_equal = true;
}
ecma_deref_ecma_string (arguments_magic_string_p);

JERRY_ASSERT (!is_equal);

if (is_equal)
{
return ecma_make_error_obj_value (ecma_builtin_get (ECMA_BUILTIN_ID_COMPACT_PROFILE_ERROR));
}
# endif /* CONFIG_ECMA_COMPACT_PROFILE */
#endif /* !JERRY_NDEBUG */

ecma_property_t *property_p = ecma_get_named_data_property (lex_env_p, name_p);

ecma_value_t prop_value = ecma_get_named_data_property_value (property_p);
Expand Down
1 change: 0 additions & 1 deletion tests/jerry-test-suite/compact-profile-list
Original file line number Diff line number Diff line change
Expand Up @@ -734,7 +734,6 @@
./13/13-007.js
./13/13-009.js
./13/13-010.js
./13/13-011.js
./13/13.01/13.01-001.js
./13/13.02/13.02-001.js
./13/13.02/13.02-003.js
Expand Down