Support large string constants in 32 bit cpointer mode. (#2233)

After this patch, all sunspider tests run when cpointer 32 is enabled.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
This commit is contained in:
Zoltan Herczeg
2018-03-05 11:41:52 +01:00
committed by GitHub
parent 94760b1213
commit b9f96a64d9
5 changed files with 30 additions and 13 deletions
+6 -6
View File
@@ -544,7 +544,7 @@ lexer_parse_identifier (parser_context_t *context_p, /**< context */
{
/* Fill literal data. */
context_p->token.lit_location.char_p = ident_start_p;
context_p->token.lit_location.length = (uint16_t) length;
context_p->token.lit_location.length = (prop_length_t) length;
}
context_p->source_p = source_p;
@@ -815,7 +815,7 @@ lexer_parse_string (parser_context_t *context_p) /**< context */
/* Fill literal data. */
context_p->token.lit_location.char_p = string_start_p;
context_p->token.lit_location.length = (uint16_t) length;
context_p->token.lit_location.length = (prop_length_t) length;
context_p->token.lit_location.type = LEXER_STRING_LITERAL;
context_p->token.lit_location.has_escape = has_escape;
@@ -966,7 +966,7 @@ lexer_parse_number (parser_context_t *context_p) /**< context */
parser_raise_error (context_p, PARSER_ERR_NUMBER_TOO_LONG);
}
context_p->token.lit_location.length = (uint16_t) length;
context_p->token.lit_location.length = (prop_length_t) length;
PARSER_PLUS_EQUAL_LC (context_p->column, length);
context_p->source_p = source_p;
} /* lexer_parse_number */
@@ -1374,7 +1374,7 @@ lexer_process_char_literal (parser_context_t *context_p, /**< context */
}
literal_p = (lexer_literal_t *) parser_list_append (context_p, &context_p->literal_pool);
literal_p->prop.length = (uint16_t) length;
literal_p->prop.length = (prop_length_t) length;
literal_p->type = literal_type;
literal_p->status_flags = has_escape ? 0 : LEXER_FLAG_SOURCE_PTR;
@@ -1718,7 +1718,7 @@ lexer_construct_number_object (parser_context_t *context_p, /**< context */
lexer_literal_t *literal_p;
ecma_number_t num;
uint32_t literal_index = 0;
uint16_t length = context_p->token.lit_location.length;
prop_length_t length = context_p->token.lit_location.length;
if (context_p->token.extra_value != LEXER_NUMBER_OCTAL)
{
@@ -2007,7 +2007,7 @@ lexer_construct_regexp_object (parser_context_t *context_p, /**< context */
}
literal_p = (lexer_literal_t *) parser_list_append (context_p, &context_p->literal_pool);
literal_p->prop.length = (uint16_t) length;
literal_p->prop.length = (prop_length_t) length;
literal_p->type = LEXER_UNUSED_LITERAL;
literal_p->status_flags = 0;