Introducing a function object's flag indicating whether Arguments object should be instantiated upon call of the function.

The Arguments object is supposed to be unnecessary if function's code:
  - doesn't reference 'arguments' identifier;
  - doesn't reference 'eval' identifier (so, it doesn't perform direct call to eval).

JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
This commit is contained in:
Ruben Ayrapetyan
2015-05-26 18:14:01 +03:00
parent b1a31c8144
commit ed4ff8e5bb
3 changed files with 81 additions and 14 deletions
@@ -34,6 +34,7 @@ ecma_op_create_function_object (ecma_string_t* formal_parameter_list_p[],
ecma_length_t formal_parameters_number,
ecma_object_t *scope_p,
bool is_strict,
bool do_instantiate_arguments_object,
opcode_counter_t first_opcode_idx);
extern ecma_object_t*
ecma_op_create_external_function_object (ecma_external_pointer_t code_p);
@@ -60,6 +61,7 @@ ecma_op_function_declaration (ecma_object_t *lex_env_p,
ecma_string_t* formal_parameter_list_p[],
ecma_length_t formal_parameter_list_length,
bool is_strict,
bool do_instantiate_arguments_object,
bool is_configurable_bindings);
/**