File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -37437,7 +37437,6 @@ static int JS_WriteRegExp(BCWriterState *s, JSRegExp regexp)
3743737437
3743837438 if (is_be()) {
3743937439 if (lre_byte_swap(str8(bc), bc->len, /*is_byte_swapped*/false)) {
37440- fail:
3744137440 JS_ThrowInternalError(s->ctx, "regex byte swap failed");
3744237441 return -1;
3744337442 }
@@ -38714,7 +38713,10 @@ static JSValue JS_ReadRegExp(BCReaderState *s)
3871438713 }
3871538714 }
3871638715
38717- return js_regexp_constructor_internal(ctx, JS_UNDEFINED,
38716+ /* Pass ctx->regexp_ctor (not JS_UNDEFINED) to bypass regexp_shape
38717+ fast path during deserialization*/
38718+ return js_regexp_constructor_internal(ctx,
38719+ ctx->class_proto[JS_CLASS_REGEXP],
3871838720 JS_MKPTR(JS_TAG_STRING, pattern),
3871938721 JS_MKPTR(JS_TAG_STRING, bc));
3872038722}
You can’t perform that action at this time.
0 commit comments