'undefined' is not literal, so dump it as identifier.

This commit is contained in:
Ilmir Usmanov 2014-10-30 19:47:33 +04:00
parent bd5f4c0c69
commit d8acb0b6e2
4 changed files with 1 additions and 13 deletions

View File

@ -207,7 +207,7 @@ NAME.current
NAME##_stack_element ((NAME##_stack_data_type) (I))
#define STACK_SET_ELEMENT(NAME, I, VALUE) \
do { set_##NAME##_stack_element ((NAME##_stack_data_type) I, VALUE); } while (0);
do { set_##NAME##_stack_element ((NAME##_stack_data_type) I, VALUE); } while (0)
#define STACK_CONVERT_TO_RAW_DATA(NAME, DATA) \
do { DATA = convert_##NAME##_to_raw_data (); } while (0)

View File

@ -464,10 +464,6 @@ decode_keyword (void)
return convert_current_token_to_token (TOK_NAME);
}
}
if (current_token_equals_to ("undefined"))
{
return create_token (TOK_UNDEFINED, 0);
}
return empty_token;
}
@ -1416,7 +1412,6 @@ lexer_token_type_to_string (token_type tt)
case TOK_DIV: return "/";
case TOK_DIV_EQ: return "/=";
case TOK_UNDEFINED: return "undefined";
default: JERRY_UNREACHABLE ();
}
}

View File

@ -131,7 +131,6 @@ typedef enum
TOK_DIV, // /
TOK_DIV_EQ, // /=
TOK_UNDEFINED, // undefined
TOK_EMPTY,
}
token_type;

View File

@ -1610,12 +1610,6 @@ parse_primary_expression (void)
STACK_PUSH (IDX, token_data ());
break;
}
case TOK_UNDEFINED:
{
STACK_PUSH (IDX, next_temp_name ());
DUMP_OPCODE_3 (assignment, ID(1), OPCODE_ARG_TYPE_SIMPLE, ECMA_SIMPLE_VALUE_UNDEFINED);
break;
}
case TOK_NULL:
case TOK_BOOL:
case TOK_SMALL_INT: