RegExp refactoring and improvements
Move RegExp bytecode functions to a separate file. Optimize bytecode lenght on character matching. Implement a basic RegExp cache to optimize memory usage on duplicated RegExp in JS files. Also fix minor style issues and add missing comments. Improve existing comments. JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
This commit is contained in:
@@ -105,7 +105,9 @@ re_parse_octal (re_parser_ctx_t *parser_ctx_p) /**< RegExp parser context */
|
||||
/**
|
||||
* Parse RegExp iterators
|
||||
*
|
||||
* @return completion value
|
||||
* @return empty ecma value - if parsed successfully
|
||||
* error ecma value - otherwise
|
||||
*
|
||||
* Returned value must be freed with ecma_free_value
|
||||
*/
|
||||
static ecma_value_t
|
||||
@@ -298,7 +300,9 @@ re_count_num_of_groups (re_parser_ctx_t *parser_ctx_p) /**< RegExp parser contex
|
||||
/**
|
||||
* Read the input pattern and parse the range of character class
|
||||
*
|
||||
* @return completion value
|
||||
* @return empty ecma value - if parsed successfully
|
||||
* error ecma value - otherwise
|
||||
*
|
||||
* Returned value must be freed with ecma_free_value
|
||||
*/
|
||||
ecma_value_t
|
||||
@@ -556,7 +560,9 @@ re_parse_char_class (re_parser_ctx_t *parser_ctx_p, /**< number of classes */
|
||||
/**
|
||||
* Read the input pattern and parse the next token for the RegExp compiler
|
||||
*
|
||||
* @return completion value
|
||||
* @return empty ecma value - if parsed successfully
|
||||
* error ecma value - otherwise
|
||||
*
|
||||
* Returned value must be freed with ecma_free_value
|
||||
*/
|
||||
ecma_value_t
|
||||
|
||||
Reference in New Issue
Block a user