Move char type definitions and magic string processing functions to literal component.

JerryScript-DCO-1.0-Signed-off-by: Andrey Shitov a.shitov@samsung.com
This commit is contained in:
Andrey Shitov
2015-06-29 17:57:10 +03:00
parent 07148d319b
commit a0c5974ab8
88 changed files with 1185 additions and 1091 deletions
+4 -4
View File
@@ -249,9 +249,9 @@ decode_keyword (const ecma_char_t *str_p, /**< characters buffer */
}
else
{
const ecma_char_t *false_p = ecma_get_magic_string_zt (ECMA_MAGIC_STRING_FALSE);
const ecma_char_t *true_p = ecma_get_magic_string_zt (ECMA_MAGIC_STRING_TRUE);
const ecma_char_t *null_p = ecma_get_magic_string_zt (ECMA_MAGIC_STRING_NULL);
const ecma_char_t *false_p = lit_get_magic_string_zt (LIT_MAGIC_STRING_FALSE);
const ecma_char_t *true_p = lit_get_magic_string_zt (LIT_MAGIC_STRING_TRUE);
const ecma_char_t *null_p = lit_get_magic_string_zt (LIT_MAGIC_STRING_NULL);
if (strlen ((const char*) false_p) == length
&& !strncmp ((const char*) str_p, (const char*) false_p, length))
@@ -441,7 +441,7 @@ convert_string_to_token_transform_escape_seq (token_type tok_type, /**< type of
if (source_str_size == 0)
{
return convert_string_to_token (tok_type,
ecma_get_magic_string_zt (ECMA_MAGIC_STRING__EMPTY),
lit_get_magic_string_zt (LIT_MAGIC_STRING__EMPTY),
0);
}
else
+1 -1
View File
@@ -794,7 +794,7 @@ dumper_finish_varg_code_sequence (void)
* Check that byte-code operand refers to 'eval' string
*
* @return true - if specified byte-code operand's type is literal, and value of corresponding
* literal is equal to ECMA_MAGIC_STRING_EVAL string,
* literal is equal to LIT_MAGIC_STRING_EVAL string,
* false - otherwise.
*/
bool
+2 -2
View File
@@ -178,9 +178,9 @@ emit_error_on_eval_and_arguments (operand op, locus loc __attr_unused___)
if (op.type == OPERAND_LITERAL)
{
if (lit_literal_equal_type_zt (lit_get_literal_by_cp (op.data.lit_id),
ecma_get_magic_string_zt (ECMA_MAGIC_STRING_ARGUMENTS))
lit_get_magic_string_zt (LIT_MAGIC_STRING_ARGUMENTS))
|| lit_literal_equal_type_zt (lit_get_literal_by_cp (op.data.lit_id),
ecma_get_magic_string_zt (ECMA_MAGIC_STRING_EVAL)))
lit_get_magic_string_zt (LIT_MAGIC_STRING_EVAL)))
{
PARSE_ERROR ("'eval' and 'arguments' are not allowed here in strict mode", loc);
}