jseption 0.0.3 → 0.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +112 -4
- package/dist/bytecode.js +162 -2
- package/dist/bytecode.js.map +1 -1
- package/dist/embed.d.ts +5 -0
- package/dist/embed.js +44 -12
- package/dist/embed.js.map +1 -1
- package/dist/interpreter.js +15 -4
- package/dist/interpreter.js.map +1 -1
- package/dist/jit.js +12 -4
- package/dist/jit.js.map +1 -1
- package/dist/jit_runtime.d.ts +2 -0
- package/dist/jit_runtime.js +11 -0
- package/dist/jit_runtime.js.map +1 -1
- package/dist/jseption.d.ts +6 -0
- package/dist/jseption.js +4 -0
- package/dist/jseption.js.map +1 -1
- package/dist/membrane.d.ts +16 -0
- package/dist/membrane.js +576 -0
- package/dist/membrane.js.map +1 -0
- package/dist/module.d.ts +28 -0
- package/dist/module.js +1166 -0
- package/dist/module.js.map +1 -0
- package/dist/opcodes.js +1 -1
- package/dist/opcodes.js.map +1 -1
- package/dist/parser.d.ts +31 -0
- package/dist/parser.js +2862 -62
- package/dist/parser.js.map +1 -1
- package/dist/qjs.js +86 -17
- package/dist/qjs.js.map +1 -1
- package/dist/quickjs.d.ts +8 -0
- package/dist/quickjs.js +21 -2
- package/dist/quickjs.js.map +1 -1
- package/dist/std.d.ts +2 -0
- package/dist/std.js +34 -0
- package/dist/std.js.map +1 -1
- package/dist/values.d.ts +78 -0
- package/dist/values.js +85 -0
- package/dist/values.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/version.js.map +1 -1
- package/package.json +1 -1
package/dist/interpreter.js
CHANGED
|
@@ -989,7 +989,7 @@ function js_interpret(caller_ctx, func_obj, this_obj, new_target, argv, flags, g
|
|
|
989
989
|
v = JS_NewObjectProto(ctx, null);
|
|
990
990
|
break;
|
|
991
991
|
case 6 /* OPSpecialObject.IMPORT_META */:
|
|
992
|
-
v = JS_ThrowTypeError(ctx, 'import.meta is not supported');
|
|
992
|
+
v = hooks.js_import_meta !== null ? hooks.js_import_meta(ctx, b) : JS_ThrowTypeError(ctx, 'import.meta is not supported');
|
|
993
993
|
break;
|
|
994
994
|
default:
|
|
995
995
|
v = JS_ThrowInternalError(ctx, 'invalid special object ' + arg);
|
|
@@ -1409,11 +1409,22 @@ function js_interpret(caller_ctx, func_obj, this_obj, new_target, argv, flags, g
|
|
|
1409
1409
|
stack[sp - 1] = proto;
|
|
1410
1410
|
break;
|
|
1411
1411
|
}
|
|
1412
|
-
case 54 /* OP.import */:
|
|
1412
|
+
case 54 /* OP.import */: {
|
|
1413
1413
|
sf.cur_pc = pc;
|
|
1414
|
-
|
|
1415
|
-
|
|
1414
|
+
if (hooks.js_dynamic_import === null) {
|
|
1415
|
+
JS_ThrowTypeError(ctx, 'dynamic import is not supported');
|
|
1416
|
+
flow = 1 /* Flow.EXCEPTION */;
|
|
1417
|
+
break;
|
|
1418
|
+
}
|
|
1419
|
+
const v = hooks.js_dynamic_import(ctx, b, stack[sp - 2], stack[sp - 1]);
|
|
1420
|
+
if (JS_IsException(v)) {
|
|
1421
|
+
flow = 1 /* Flow.EXCEPTION */;
|
|
1422
|
+
break;
|
|
1423
|
+
}
|
|
1424
|
+
sp--;
|
|
1425
|
+
stack[sp - 1] = v;
|
|
1416
1426
|
break;
|
|
1427
|
+
}
|
|
1417
1428
|
case 55 /* OP.check_var */: {
|
|
1418
1429
|
const atom = get_u32(buf, pc);
|
|
1419
1430
|
pc += 4;
|