Reduce the memory consumption of function objects. (#1954)

Several properties of strict and bound functions are moved to
lazy property instantiation. The memory consumption of bound
functions are also reduced when only a this is present.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
This commit is contained in:
Zoltan Herczeg
2017-08-30 14:17:35 +02:00
committed by Dániel Bátyai
parent 82a94d0f88
commit e897858c64
10 changed files with 275 additions and 232 deletions
-3
View File
@@ -302,10 +302,7 @@ vm_construct_literal_object (vm_frame_ctx_t *frame_ctx_p, /**< frame context */
if (is_function)
{
bool is_strict = ((frame_ctx_p->bytecode_header_p->status_flags & CBC_CODE_FLAGS_STRICT_MODE) != 0);
ecma_object_t *func_obj_p = ecma_op_create_function_object (frame_ctx_p->lex_env_p,
is_strict,
bytecode_p);
return ecma_make_object_value (func_obj_p);