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:
@@ -32,10 +32,18 @@
|
||||
#define PARSER_MAXIMUM_IDENT_LENGTH 255
|
||||
#endif /* !PARSER_MAXIMUM_IDENT_LENGTH */
|
||||
|
||||
/* Maximum string limit.
|
||||
* Limit: 2147483647 / 65535. */
|
||||
#ifdef JERRY_CPOINTER_32_BIT
|
||||
#define PARSER_MAXIMUM_STRING_LIMIT 2147483647
|
||||
#else /* !JERRY_CPOINTER_32_BIT */
|
||||
#define PARSER_MAXIMUM_STRING_LIMIT 65535
|
||||
#endif /* JERRY_CPOINTER_32_BIT */
|
||||
|
||||
/* Maximum string length.
|
||||
* Limit: 65535. */
|
||||
* Limit: PARSER_MAXIMUM_STRING_LIMIT. */
|
||||
#ifndef PARSER_MAXIMUM_STRING_LENGTH
|
||||
#define PARSER_MAXIMUM_STRING_LENGTH 65535
|
||||
#define PARSER_MAXIMUM_STRING_LENGTH PARSER_MAXIMUM_STRING_LIMIT
|
||||
#endif /* !PARSER_MAXIMUM_STRING_LENGTH */
|
||||
|
||||
/* Maximum number of literals.
|
||||
@@ -65,9 +73,9 @@
|
||||
|
||||
/* Checks. */
|
||||
|
||||
#if (PARSER_MAXIMUM_STRING_LENGTH < 1) || (PARSER_MAXIMUM_STRING_LENGTH > 65535)
|
||||
#if (PARSER_MAXIMUM_STRING_LENGTH < 1) || (PARSER_MAXIMUM_STRING_LENGTH > PARSER_MAXIMUM_STRING_LIMIT)
|
||||
#error "Maximum string length is not within range."
|
||||
#endif /* (PARSER_MAXIMUM_STRING_LENGTH < 1) || (PARSER_MAXIMUM_STRING_LENGTH > 65535) */
|
||||
#endif /* (PARSER_MAXIMUM_STRING_LENGTH < 1) || (PARSER_MAXIMUM_STRING_LENGTH > PARSER_MAXIMUM_STRING_LIMIT) */
|
||||
|
||||
#if (PARSER_MAXIMUM_IDENT_LENGTH < 1) || (PARSER_MAXIMUM_IDENT_LENGTH > PARSER_MAXIMUM_STRING_LENGTH)
|
||||
#error "Maximum identifier length is not within range."
|
||||
|
||||
Reference in New Issue
Block a user