Add fast path to ecma_op_object_get with magic string. (#2078)

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
This commit is contained in:
Zoltan Herczeg
2017-12-05 17:17:56 +01:00
committed by Dániel Bátyai
parent a8dffe023e
commit e964393abe
19 changed files with 133 additions and 208 deletions
@@ -311,8 +311,8 @@ ecma_promise_resolve_handler (const ecma_value_t function, /**< the function its
}
/* 8. */
ecma_string_t *str_then = ecma_new_ecma_string_from_magic_string_id (LIT_MAGIC_STRING_THEN);
ecma_value_t then = ecma_op_object_get (ecma_get_object_from_value (argv[0]), str_then);
ecma_value_t then = ecma_op_object_get_by_magic_id (ecma_get_object_from_value (argv[0]),
LIT_MAGIC_STRING_THEN);
if (ECMA_IS_VALUE_ERROR (then))
{
@@ -331,7 +331,6 @@ ecma_promise_resolve_handler (const ecma_value_t function, /**< the function its
ecma_enqueue_promise_resolve_thenable_job (promise, argv[0], then);
}
ecma_deref_ecma_string (str_then);
ecma_free_value (then);
end_of_resolve_function: