Improve magic string handling. (#2221)

Remove unnecessary ref / deref calls when magic strings are used.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
This commit is contained in:
Zoltan Herczeg
2018-03-01 13:31:15 +01:00
committed by GitHub
parent 26ee8f7137
commit d60d4dbba9
30 changed files with 306 additions and 497 deletions
+1 -2
View File
@@ -92,8 +92,7 @@ opfunc_logical_not (ecma_value_t left_value) /**< left value */
ecma_value_t
opfunc_typeof (ecma_value_t left_value) /**< left value */
{
ecma_string_t *type_str_p = ecma_get_magic_string (ecma_get_typeof_lit_id (left_value));
return ecma_make_string_value (type_str_p);
return ecma_make_magic_string_value (ecma_get_typeof_lit_id (left_value));
} /* opfunc_typeof */
/**