New External Magic String API to save heap memory

JerryScript-DCO-1.0-Signed-off-by: SaeHie Park saehie.park@samsung.com
This commit is contained in:
SaeHie Park
2015-06-08 09:03:25 +09:00
parent 603fa56acf
commit 723924f36f
13 changed files with 457 additions and 12 deletions
+4 -4
View File
@@ -1099,7 +1099,7 @@ dump_prop_name_and_value (operand name, operand value)
JERRY_ASSERT (name.type == OPERAND_LITERAL);
const literal lit = lexer_get_literal_by_id (name.data.lit_id);
operand tmp;
if (lit.type == LIT_STR || lit.type == LIT_MAGIC_STR)
if (lit.type == LIT_STR || lit.type == LIT_MAGIC_STR || lit.type == LIT_MAGIC_STR_EX)
{
tmp = dump_string_assignment_res (name.data.lit_id);
}
@@ -1132,7 +1132,7 @@ dump_prop_getter_decl (operand name, operand func)
JERRY_ASSERT (func.type == OPERAND_TMP);
const literal lit = lexer_get_literal_by_id (name.data.lit_id);
operand tmp;
if (lit.type == LIT_STR || lit.type == LIT_MAGIC_STR)
if (lit.type == LIT_STR || lit.type == LIT_MAGIC_STR || lit.type == LIT_MAGIC_STR_EX)
{
tmp = dump_string_assignment_res (name.data.lit_id);
}
@@ -1152,7 +1152,7 @@ dump_prop_setter_decl (operand name, operand func)
JERRY_ASSERT (func.type == OPERAND_TMP);
const literal lit = lexer_get_literal_by_id (name.data.lit_id);
operand tmp;
if (lit.type == LIT_STR || lit.type == LIT_MAGIC_STR)
if (lit.type == LIT_STR || lit.type == LIT_MAGIC_STR || lit.type == LIT_MAGIC_STR_EX)
{
tmp = dump_string_assignment_res (name.data.lit_id);
}
@@ -1348,7 +1348,7 @@ dump_delete (operand res, operand op, bool is_strict, locus loc)
case OPERAND_LITERAL:
{
const literal lit = lexer_get_literal_by_id (op.data.lit_id);
if (lit.type == LIT_MAGIC_STR || lit.type == LIT_STR)
if (lit.type == LIT_MAGIC_STR || lit.type == LIT_MAGIC_STR_EX || lit.type == LIT_STR)
{
syntax_check_delete (is_strict, loc);
switch (res.type)