@ -120,7 +120,7 @@ Load as ES6 script (default=autodetect).
@@ -120,7 +120,7 @@ Load as ES6 script (default=autodetect).
@item --bignum
Enable the bignum extensions: BigDecimal object, BigFloat object and
the @code{"use bigint"} and @code{"use math"} directives.
the @code{"use math"} directive.
@item -I file
@item --include file
@ -167,6 +167,12 @@ Set the C name of the generated data.
@@ -167,6 +167,12 @@ Set the C name of the generated data.
@item -m
Compile as Javascript module (default=autodetect).
@item -D module_name
Compile a dynamically loaded module and its dependencies. This option
is needed when your code uses the @code{import} keyword or the
@code{os.Worker} constructor because the compiler cannot statically
find the name of the dynamically loaded modules.
@item -M module_name[,cname]
Add initialization code for an external C module. See the
@code{c_module} example.
@ -184,7 +190,7 @@ Disable selected language features to produce a smaller executable file.
@@ -184,7 +190,7 @@ Disable selected language features to produce a smaller executable file.
@item -fbignum
Enable the bignum extensions: BigDecimal object, BigFloat object and
the @code{"use bigint"} and @code{"use math"} directives.
the @code{"use math"} directive.
@end table
@ -764,13 +770,14 @@ Cancel a timer.
@@ -764,13 +770,14 @@ Cancel a timer.
Return a string representing the platform: @code{"linux"}, @code{"darwin"},
@code{"win32"} or @code{"js"}.
@item Worker(source)
@item Worker(module_filename)
Constructor to create a new thread (worker) with an API close to the
@code{WebWorkers}. @code{source} is a string containing the module
source which is executed in the newly created thread. Threads normally
don't share any data and communicate between each other with
messages. Nested workers are not supported. An example is available in
@file{tests/test_worker.js}.
@code{WebWorkers}. @code{module_filename} is a string specifying the
module filename which is executed in the newly created thread. As for
dynamically imported module, it is relative to the current script or
module path. Threads normally don't share any data and communicate
between each other with messages. Nested workers are not supported. An
example is available in @file{tests/test_worker.js}.
The worker class has the following static properties:
@ -569,7 +569,8 @@ int lre_parse_escape(const uint8_t **pp, int allow_utf16)
@@ -569,7 +569,8 @@ int lre_parse_escape(const uint8_t **pp, int allow_utf16)
}
}
break;
case'0'...'7':
case'0':case'1':case'2':case'3':
case'4':case'5':case'6':case'7':
c-='0';
if(allow_utf16==2){
/* only accept \0 not followed by digit */
@ -1410,7 +1411,9 @@ static int re_parse_term(REParseState *s, BOOL is_backward_dir)
@@ -1410,7 +1411,9 @@ static int re_parse_term(REParseState *s, BOOL is_backward_dir)
}
}
gotonormal_char;
case'1'...'9':
case'1':case'2':case'3':case'4':
case'5':case'6':case'7':case'8':
case'9':
{
constuint8_t*q=++p;
@ -1434,7 +1437,7 @@ static int re_parse_term(REParseState *s, BOOL is_backward_dir)
@@ -1434,7 +1437,7 @@ static int re_parse_term(REParseState *s, BOOL is_backward_dir)
}
gotonormal_char;
}
returnre_parse_error(s,"back reference out of range in reguar expression");
returnre_parse_error(s,"back reference out of range in regular expression");
}
emit_back_reference:
last_atom_start=s->byte_code.size;
@ -2533,6 +2536,17 @@ int lre_get_flags(const uint8_t *bc_buf)
@@ -2533,6 +2536,17 @@ int lre_get_flags(const uint8_t *bc_buf)
returnbc_buf[RE_HEADER_FLAGS];
}
/* Return NULL if no group names. Otherwise, return a pointer to