wasm-idle 1.2.0 → 1.4.0
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 +250 -146
- package/dist/container/clang-runtime.js +32 -8
- package/dist/container/runtime-adapter.d.ts +2 -0
- package/dist/container/runtime-adapter.js +37 -8
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/playground/assetBridge.js +10 -8
- package/dist/playground/assets.d.ts +4 -0
- package/dist/playground/assets.js +9 -4
- package/dist/playground/c3.js +1 -1
- package/dist/playground/compiledLldb.d.ts +2 -0
- package/dist/playground/compiledLldb.js +37 -2
- package/dist/playground/d.d.ts +1 -0
- package/dist/playground/d.js +18 -8
- package/dist/playground/index.d.ts +1 -1
- package/dist/playground/index.js +7 -0
- package/dist/playground/{java-debug-FMHDKUN6.js → java-debug-64JGCLTC.js} +1 -1
- package/dist/playground/java-debug-notices.txt +26 -1
- package/dist/playground/java.js +3 -2
- package/dist/playground/javaDebugBridge.js +42 -7
- package/dist/playground/javaDebugSource.js +4 -4
- package/dist/playground/javaMain.d.ts +3 -0
- package/dist/playground/javaMain.js +2 -0
- package/dist/playground/javaRuntimeErrors.d.ts +2 -1
- package/dist/playground/javaRuntimeErrors.js +9 -2
- package/dist/playground/javaSource.d.ts +1 -1
- package/dist/playground/javaSource.js +7 -2
- package/dist/playground/lldbSession.d.ts +2 -0
- package/dist/playground/lldbSession.js +60 -4
- package/dist/playground/objectivec.d.ts +1 -1
- package/dist/playground/objectivec.js +2 -1
- package/dist/playground/options.d.ts +1 -1
- package/dist/playground/python.d.ts +3 -0
- package/dist/playground/python.js +122 -2
- package/dist/playground/pythonCompileOptions.d.ts +52 -0
- package/dist/playground/pythonCompileOptions.js +40 -0
- package/dist/playground/scala.d.ts +34 -0
- package/dist/playground/scala.js +397 -0
- package/dist/playground/scalaAssets.d.ts +16 -0
- package/dist/playground/scalaAssets.js +51 -0
- package/dist/playground/scalaDiagnostics.d.ts +3 -0
- package/dist/playground/scalaDiagnostics.js +29 -0
- package/dist/playground/staticRuntimeModuleVersion.d.ts +1 -1
- package/dist/playground/staticRuntimeModuleVersion.js +1 -1
- package/dist/playground/staticWorkerRuntime.d.ts +2 -0
- package/dist/playground/staticWorkerRuntime.js +85 -11
- package/dist/playground/tinygo.js +21 -8
- package/dist/playground/tinygoExecutableGraph.js +1 -1
- package/dist/playground/v.d.ts +1 -0
- package/dist/playground/v.js +17 -7
- package/dist/playground/wasmC3Version.d.ts +8 -8
- package/dist/playground/wasmC3Version.js +8 -8
- package/dist/playground/wasmDebugVersion.d.ts +1 -1
- package/dist/playground/wasmDebugVersion.js +1 -1
- package/dist/playground/wasmDotnetVersion.d.ts +1 -1
- package/dist/playground/wasmDotnetVersion.js +1 -1
- package/dist/playground/wasmGoVersion.d.ts +1 -1
- package/dist/playground/wasmGoVersion.js +1 -1
- package/dist/playground/wasmLispVersion.d.ts +5 -0
- package/dist/playground/wasmLispVersion.js +5 -0
- package/dist/playground/wasmOcamlVersion.d.ts +4 -4
- package/dist/playground/wasmOcamlVersion.js +3 -3
- package/dist/playground/wasmPrologVersion.d.ts +17 -17
- package/dist/playground/wasmPrologVersion.js +16 -16
- package/dist/playground/wasmTinyGoVersion.d.ts +57 -57
- package/dist/playground/wasmTinyGoVersion.js +57 -57
- package/dist/playground/wasmTypeScriptVersion.d.ts +3 -3
- package/dist/playground/wasmTypeScriptVersion.js +3 -3
- package/dist/playground/wasmZigVersion.d.ts +7 -7
- package/dist/playground/wasmZigVersion.js +7 -7
- package/dist/playground/worker/java.js +18 -4
- package/dist/playground/worker/javaDebugEvaluator.js +2 -2
- package/dist/playground/worker/javaDebugRuntime.js +8 -1
- package/dist/playground/worker/javaStreaming.js +4 -2
- package/dist/playground/worker/ocaml.js +11 -10
- package/dist/playground/worker/python.js +45 -165
- package/dist/playground/worker/pythonCompile.d.ts +4 -0
- package/dist/playground/worker/pythonCompile.js +127 -0
- package/dist/playground/worker/pythonDebug.d.ts +20 -0
- package/dist/playground/worker/pythonDebug.js +205 -0
- package/dist/playground/worker/scala/UPSTREAM-LICENSE.txt +201 -0
- package/dist/playground/worker/scala/UPSTREAM-NOTICE.txt +108 -0
- package/dist/playground/worker/scala/asset-bootstrap.d.ts +6 -0
- package/dist/playground/worker/scala/asset-bootstrap.js +58 -0
- package/dist/playground/worker/scala/asset-receipts.d.ts +7 -0
- package/dist/playground/worker/scala/asset-receipts.js +58 -0
- package/dist/playground/worker/scala/compiler.worker.d.ts +1 -0
- package/dist/playground/worker/scala/compiler.worker.js +204 -0
- package/dist/playground/worker/scala/execution.worker.d.ts +1 -0
- package/dist/playground/worker/scala/execution.worker.js +89 -0
- package/dist/playground/worker/scala/memory-fs.d.ts +29 -0
- package/dist/playground/worker/scala/memory-fs.js +333 -0
- package/dist/playground/worker/scala/runner.d.ts +1 -0
- package/dist/playground/worker/scala/runner.js +36 -0
- package/dist/playground/worker/zig.d.ts +2 -1
- package/dist/playground/worker/zig.js +212 -86
- package/dist/playground/worker/zigDebug.d.ts +39 -0
- package/dist/playground/worker/zigDebug.js +156 -0
- package/dist/playground/zig.d.ts +27 -4
- package/dist/playground/zig.js +266 -23
- package/dist/playground/zigDebugValues.d.ts +20 -0
- package/dist/playground/zigDebugValues.js +248 -0
- package/dist/pythonCompiler.d.ts +8 -0
- package/dist/pythonCompiler.js +52 -0
- package/package.json +37 -26
|
@@ -1,42 +1,42 @@
|
|
|
1
1
|
export declare const WASM_TINYGO_RUNTIME_PROFILE: Readonly<{
|
|
2
|
-
profileId: "tinygo-0.
|
|
2
|
+
profileId: "tinygo-0.43.0-wasip1-protocol-v6";
|
|
3
3
|
protocolVersion: 6;
|
|
4
4
|
manifestPath: "tools/upstream/upstream-toolchain.v2.json";
|
|
5
|
-
manifestFingerprint: "
|
|
5
|
+
manifestFingerprint: "e637c8eddc51710c1af07eb77b7d24c56f9502c6f5a0f26d06cc73edba05a572";
|
|
6
6
|
manifestReceipt: Readonly<{
|
|
7
|
-
bytes:
|
|
8
|
-
sha256: "
|
|
7
|
+
bytes: 1123;
|
|
8
|
+
sha256: "604c746e664e8738c22c20489dd9d8fd52dd3df653f148d52b3b16fbc23fb380";
|
|
9
9
|
}>;
|
|
10
10
|
assetReceipts: Readonly<{
|
|
11
11
|
'tools/upstream/lld.wasm': Readonly<{
|
|
12
|
-
bytes:
|
|
13
|
-
sha256: "
|
|
14
|
-
uncompressedBytes:
|
|
15
|
-
uncompressedSha256: "
|
|
12
|
+
bytes: 6417339;
|
|
13
|
+
sha256: "495813efde8f354c38483749cdface7a7d9e23c8411da45a6f5f80030159eb11";
|
|
14
|
+
uncompressedBytes: 16171013;
|
|
15
|
+
uncompressedSha256: "34d39bc410c098e7e09933b61cc8e28699447af9a28abf4544d71b6e9cad1f9d";
|
|
16
16
|
}>;
|
|
17
17
|
'tools/upstream/package-graph-provider-receipt.json': Readonly<{
|
|
18
|
-
bytes:
|
|
19
|
-
sha256: "
|
|
18
|
+
bytes: 11122;
|
|
19
|
+
sha256: "730ccd0af0b6c359ac0bd69082696f4702a988004cc6d46ffdcde752392364f5";
|
|
20
20
|
}>;
|
|
21
21
|
'tools/upstream/producer-receipt.json': Readonly<{
|
|
22
|
-
bytes:
|
|
23
|
-
sha256: "
|
|
22
|
+
bytes: 7452;
|
|
23
|
+
sha256: "94f70d6848a6496c588b7eda94e7ad139bb79778a44b95382a8cb6863b9043d4";
|
|
24
24
|
}>;
|
|
25
25
|
'tools/upstream/tinygo-compiler.wasm': Readonly<{
|
|
26
|
-
bytes:
|
|
27
|
-
sha256: "
|
|
28
|
-
uncompressedBytes:
|
|
29
|
-
uncompressedSha256: "
|
|
26
|
+
bytes: 29517026;
|
|
27
|
+
sha256: "72c31eb39213a17625f71a4c06ef22d54bf2997f9c4d6cc4a73429e61f750bde";
|
|
28
|
+
uncompressedBytes: 96523963;
|
|
29
|
+
uncompressedSha256: "fbea627d2430377515daf54fc6c42cceb10d5c09973534a328228c6bf6ce324d";
|
|
30
30
|
}>;
|
|
31
31
|
'tools/upstream/tinygo-package-graph.wasm': Readonly<{
|
|
32
|
-
bytes:
|
|
33
|
-
sha256: "
|
|
34
|
-
uncompressedBytes:
|
|
35
|
-
uncompressedSha256: "
|
|
32
|
+
bytes: 6623009;
|
|
33
|
+
sha256: "a5cd2d133aee9c3a5e8eae30d43bcc6096858e1a332efa67692f71a2f8df83b3";
|
|
34
|
+
uncompressedBytes: 27997948;
|
|
35
|
+
uncompressedSha256: "b7a526594fd5ea5531caecf11bd3a8e97af05c40dff63d8a57370419c47b56ed";
|
|
36
36
|
}>;
|
|
37
37
|
'tools/upstream/tinygoroot.tar.gz.bin': Readonly<{
|
|
38
|
-
bytes:
|
|
39
|
-
sha256: "
|
|
38
|
+
bytes: 31145468;
|
|
39
|
+
sha256: "402bfd7059e12414cf0038c3e006c4030e1aa2f0b1ee6f1ffbc62cee9f5e2e3f";
|
|
40
40
|
}>;
|
|
41
41
|
}>;
|
|
42
42
|
}>;
|
|
@@ -46,64 +46,64 @@ export declare const WASM_TINYGO_EXECUTABLE_GRAPH_PROFILE: Readonly<{
|
|
|
46
46
|
schemaVersion: 1;
|
|
47
47
|
format: "wasm-idle-tinygo-executable-graph-v1";
|
|
48
48
|
entryPath: "upstream.js";
|
|
49
|
-
fingerprint: "
|
|
49
|
+
fingerprint: "626d47447d73e8f2b1b2e5d166e6a0dc7bda15314cab50de2000798e58c89e84";
|
|
50
50
|
modules: Readonly<{
|
|
51
|
-
'assets/upstream-binaryen-
|
|
52
|
-
bytes:
|
|
53
|
-
sha256: "
|
|
54
|
-
uncompressedBytes:
|
|
55
|
-
uncompressedSha256: "
|
|
51
|
+
'assets/upstream-binaryen-48916159e6bb29f4.wasm.gz.bin': Readonly<{
|
|
52
|
+
bytes: 2337116;
|
|
53
|
+
sha256: "63375e0508c38f6ec0a43b43015fa938db0020616b3e02aa8ad49e3e84acf6e8";
|
|
54
|
+
uncompressedBytes: 9909420;
|
|
55
|
+
uncompressedSha256: "48916159e6bb29f4bb03fcab110114ba83e03f96a2f78484167093ee27459ab3";
|
|
56
56
|
imports: readonly never[];
|
|
57
57
|
}>;
|
|
58
|
-
'assets/upstream-compile-worker-
|
|
59
|
-
bytes:
|
|
60
|
-
sha256: "
|
|
58
|
+
'assets/upstream-compile-worker-CbXtAM7H.js': Readonly<{
|
|
59
|
+
bytes: 589;
|
|
60
|
+
sha256: "bbf7c5086ae414dc3f33777e3eebf16ea8631325b8bb4690d25091c03567f31a";
|
|
61
|
+
imports: readonly never[];
|
|
62
|
+
}>;
|
|
63
|
+
'assets/upstream-compile-worker-CjBUBLVc.js': Readonly<{
|
|
64
|
+
bytes: 106370;
|
|
65
|
+
sha256: "5bf52b17b6cfcca0f1e200fc908eb58864144860e442d230f6edebd222975103";
|
|
61
66
|
imports: readonly Readonly<{
|
|
62
|
-
specifier: "./upstream-compile-worker-
|
|
63
|
-
target: "assets/upstream-compile-worker-
|
|
67
|
+
specifier: "./upstream-compile-worker-CtGm-AK6.js";
|
|
68
|
+
target: "assets/upstream-compile-worker-CtGm-AK6.js";
|
|
64
69
|
kind: "dynamic";
|
|
65
70
|
}>[];
|
|
66
71
|
}>;
|
|
67
|
-
'assets/upstream-compile-worker-
|
|
68
|
-
bytes:
|
|
69
|
-
sha256: "
|
|
70
|
-
imports: readonly never[];
|
|
71
|
-
}>;
|
|
72
|
-
'assets/upstream-compile-worker-CeYS3ydo.js': Readonly<{
|
|
73
|
-
bytes: 181175;
|
|
74
|
-
sha256: "faa2bf6a310cd23991babde1fb62cd34253d692fee03029fe3508eae4c24b1c0";
|
|
72
|
+
'assets/upstream-compile-worker-CtGm-AK6.js': Readonly<{
|
|
73
|
+
bytes: 183991;
|
|
74
|
+
sha256: "ea3e633cdf6bc8e9d8cb628b8fe7ac971b082e83b1963dffa1fe1a90f0a9ddb8";
|
|
75
75
|
imports: readonly (Readonly<{
|
|
76
|
-
specifier: "./upstream-compile-worker-
|
|
77
|
-
target: "assets/upstream-compile-worker-
|
|
76
|
+
specifier: "./upstream-compile-worker-CbXtAM7H.js";
|
|
77
|
+
target: "assets/upstream-compile-worker-CbXtAM7H.js";
|
|
78
78
|
kind: "static";
|
|
79
79
|
}> | Readonly<{
|
|
80
|
-
specifier: "./upstream-compile-worker-
|
|
81
|
-
target: "assets/upstream-compile-worker-
|
|
80
|
+
specifier: "./upstream-compile-worker-Dsn9Eg6C.js";
|
|
81
|
+
target: "assets/upstream-compile-worker-Dsn9Eg6C.js";
|
|
82
82
|
kind: "dynamic";
|
|
83
83
|
}> | Readonly<{
|
|
84
|
-
specifier: "./upstream-binaryen-
|
|
85
|
-
target: "assets/upstream-binaryen-
|
|
84
|
+
specifier: "./upstream-binaryen-48916159e6bb29f4.wasm.gz.bin";
|
|
85
|
+
target: "assets/upstream-binaryen-48916159e6bb29f4.wasm.gz.bin";
|
|
86
86
|
kind: "asset";
|
|
87
87
|
}>)[];
|
|
88
88
|
}>;
|
|
89
|
-
'assets/upstream-compile-worker-
|
|
90
|
-
bytes:
|
|
91
|
-
sha256: "
|
|
89
|
+
'assets/upstream-compile-worker-Dsn9Eg6C.js': Readonly<{
|
|
90
|
+
bytes: 126;
|
|
91
|
+
sha256: "a03423dd62954c6479910dddedc4703ecdc36e4dcd783e5d2b121fb16b72a1b4";
|
|
92
92
|
imports: readonly Readonly<{
|
|
93
|
-
specifier: "./upstream-compile-worker-
|
|
94
|
-
target: "assets/upstream-compile-worker-
|
|
93
|
+
specifier: "./upstream-compile-worker-CbXtAM7H.js";
|
|
94
|
+
target: "assets/upstream-compile-worker-CbXtAM7H.js";
|
|
95
95
|
kind: "static";
|
|
96
96
|
}>[];
|
|
97
97
|
}>;
|
|
98
98
|
'upstream.js': Readonly<{
|
|
99
|
-
bytes:
|
|
100
|
-
sha256: "
|
|
99
|
+
bytes: 126854;
|
|
100
|
+
sha256: "67031b67fe3b70fea1e0cbc2b01ba113eae585cddb641a4769cdf1056104a5a9";
|
|
101
101
|
imports: readonly Readonly<{
|
|
102
|
-
specifier: "assets/upstream-compile-worker-
|
|
103
|
-
target: "assets/upstream-compile-worker-
|
|
102
|
+
specifier: "assets/upstream-compile-worker-CjBUBLVc.js";
|
|
103
|
+
target: "assets/upstream-compile-worker-CjBUBLVc.js";
|
|
104
104
|
kind: "worker";
|
|
105
105
|
}>[];
|
|
106
106
|
}>;
|
|
107
107
|
}>;
|
|
108
108
|
}>;
|
|
109
|
-
export declare const WASM_TINYGO_ASSET_VERSION = "
|
|
109
|
+
export declare const WASM_TINYGO_ASSET_VERSION = "1f50eede6cf4de937e8150400e72e094fbfe1ee732b6f1f28d2a439593c4abc3";
|
|
@@ -1,42 +1,42 @@
|
|
|
1
1
|
export const WASM_TINYGO_RUNTIME_PROFILE = Object.freeze({
|
|
2
|
-
profileId: 'tinygo-0.
|
|
2
|
+
profileId: 'tinygo-0.43.0-wasip1-protocol-v6',
|
|
3
3
|
protocolVersion: 6,
|
|
4
4
|
manifestPath: 'tools/upstream/upstream-toolchain.v2.json',
|
|
5
|
-
manifestFingerprint: '
|
|
5
|
+
manifestFingerprint: 'e637c8eddc51710c1af07eb77b7d24c56f9502c6f5a0f26d06cc73edba05a572',
|
|
6
6
|
manifestReceipt: Object.freeze({
|
|
7
|
-
bytes:
|
|
8
|
-
sha256: '
|
|
7
|
+
bytes: 1123,
|
|
8
|
+
sha256: '604c746e664e8738c22c20489dd9d8fd52dd3df653f148d52b3b16fbc23fb380'
|
|
9
9
|
}),
|
|
10
10
|
assetReceipts: Object.freeze({
|
|
11
11
|
'tools/upstream/lld.wasm': Object.freeze({
|
|
12
|
-
bytes:
|
|
13
|
-
sha256: '
|
|
14
|
-
uncompressedBytes:
|
|
15
|
-
uncompressedSha256: '
|
|
12
|
+
bytes: 6417339,
|
|
13
|
+
sha256: '495813efde8f354c38483749cdface7a7d9e23c8411da45a6f5f80030159eb11',
|
|
14
|
+
uncompressedBytes: 16171013,
|
|
15
|
+
uncompressedSha256: '34d39bc410c098e7e09933b61cc8e28699447af9a28abf4544d71b6e9cad1f9d'
|
|
16
16
|
}),
|
|
17
17
|
'tools/upstream/package-graph-provider-receipt.json': Object.freeze({
|
|
18
|
-
bytes:
|
|
19
|
-
sha256: '
|
|
18
|
+
bytes: 11122,
|
|
19
|
+
sha256: '730ccd0af0b6c359ac0bd69082696f4702a988004cc6d46ffdcde752392364f5'
|
|
20
20
|
}),
|
|
21
21
|
'tools/upstream/producer-receipt.json': Object.freeze({
|
|
22
|
-
bytes:
|
|
23
|
-
sha256: '
|
|
22
|
+
bytes: 7452,
|
|
23
|
+
sha256: '94f70d6848a6496c588b7eda94e7ad139bb79778a44b95382a8cb6863b9043d4'
|
|
24
24
|
}),
|
|
25
25
|
'tools/upstream/tinygo-compiler.wasm': Object.freeze({
|
|
26
|
-
bytes:
|
|
27
|
-
sha256: '
|
|
28
|
-
uncompressedBytes:
|
|
29
|
-
uncompressedSha256: '
|
|
26
|
+
bytes: 29517026,
|
|
27
|
+
sha256: '72c31eb39213a17625f71a4c06ef22d54bf2997f9c4d6cc4a73429e61f750bde',
|
|
28
|
+
uncompressedBytes: 96523963,
|
|
29
|
+
uncompressedSha256: 'fbea627d2430377515daf54fc6c42cceb10d5c09973534a328228c6bf6ce324d'
|
|
30
30
|
}),
|
|
31
31
|
'tools/upstream/tinygo-package-graph.wasm': Object.freeze({
|
|
32
|
-
bytes:
|
|
33
|
-
sha256: '
|
|
34
|
-
uncompressedBytes:
|
|
35
|
-
uncompressedSha256: '
|
|
32
|
+
bytes: 6623009,
|
|
33
|
+
sha256: 'a5cd2d133aee9c3a5e8eae30d43bcc6096858e1a332efa67692f71a2f8df83b3',
|
|
34
|
+
uncompressedBytes: 27997948,
|
|
35
|
+
uncompressedSha256: 'b7a526594fd5ea5531caecf11bd3a8e97af05c40dff63d8a57370419c47b56ed'
|
|
36
36
|
}),
|
|
37
37
|
'tools/upstream/tinygoroot.tar.gz.bin': Object.freeze({
|
|
38
|
-
bytes:
|
|
39
|
-
sha256: '
|
|
38
|
+
bytes: 31145468,
|
|
39
|
+
sha256: '402bfd7059e12414cf0038c3e006c4030e1aa2f0b1ee6f1ffbc62cee9f5e2e3f'
|
|
40
40
|
})
|
|
41
41
|
})
|
|
42
42
|
});
|
|
@@ -46,74 +46,74 @@ export const WASM_TINYGO_EXECUTABLE_GRAPH_PROFILE = Object.freeze({
|
|
|
46
46
|
schemaVersion: 1,
|
|
47
47
|
format: WASM_TINYGO_EXECUTABLE_GRAPH_FORMAT,
|
|
48
48
|
entryPath: 'upstream.js',
|
|
49
|
-
fingerprint: '
|
|
49
|
+
fingerprint: '626d47447d73e8f2b1b2e5d166e6a0dc7bda15314cab50de2000798e58c89e84',
|
|
50
50
|
modules: Object.freeze({
|
|
51
|
-
'assets/upstream-binaryen-
|
|
52
|
-
bytes:
|
|
53
|
-
sha256: '
|
|
54
|
-
uncompressedBytes:
|
|
55
|
-
uncompressedSha256: '
|
|
51
|
+
'assets/upstream-binaryen-48916159e6bb29f4.wasm.gz.bin': Object.freeze({
|
|
52
|
+
bytes: 2337116,
|
|
53
|
+
sha256: '63375e0508c38f6ec0a43b43015fa938db0020616b3e02aa8ad49e3e84acf6e8',
|
|
54
|
+
uncompressedBytes: 9909420,
|
|
55
|
+
uncompressedSha256: '48916159e6bb29f4bb03fcab110114ba83e03f96a2f78484167093ee27459ab3',
|
|
56
56
|
imports: Object.freeze([])
|
|
57
57
|
}),
|
|
58
|
-
'assets/upstream-compile-worker-
|
|
59
|
-
bytes:
|
|
60
|
-
sha256: '
|
|
58
|
+
'assets/upstream-compile-worker-CbXtAM7H.js': Object.freeze({
|
|
59
|
+
bytes: 589,
|
|
60
|
+
sha256: 'bbf7c5086ae414dc3f33777e3eebf16ea8631325b8bb4690d25091c03567f31a',
|
|
61
|
+
imports: Object.freeze([])
|
|
62
|
+
}),
|
|
63
|
+
'assets/upstream-compile-worker-CjBUBLVc.js': Object.freeze({
|
|
64
|
+
bytes: 106370,
|
|
65
|
+
sha256: '5bf52b17b6cfcca0f1e200fc908eb58864144860e442d230f6edebd222975103',
|
|
61
66
|
imports: Object.freeze([
|
|
62
67
|
Object.freeze({
|
|
63
|
-
specifier: './upstream-compile-worker-
|
|
64
|
-
target: 'assets/upstream-compile-worker-
|
|
68
|
+
specifier: './upstream-compile-worker-CtGm-AK6.js',
|
|
69
|
+
target: 'assets/upstream-compile-worker-CtGm-AK6.js',
|
|
65
70
|
kind: 'dynamic'
|
|
66
71
|
})
|
|
67
72
|
])
|
|
68
73
|
}),
|
|
69
|
-
'assets/upstream-compile-worker-
|
|
70
|
-
bytes:
|
|
71
|
-
sha256: '
|
|
72
|
-
imports: Object.freeze([])
|
|
73
|
-
}),
|
|
74
|
-
'assets/upstream-compile-worker-CeYS3ydo.js': Object.freeze({
|
|
75
|
-
bytes: 181175,
|
|
76
|
-
sha256: 'faa2bf6a310cd23991babde1fb62cd34253d692fee03029fe3508eae4c24b1c0',
|
|
74
|
+
'assets/upstream-compile-worker-CtGm-AK6.js': Object.freeze({
|
|
75
|
+
bytes: 183991,
|
|
76
|
+
sha256: 'ea3e633cdf6bc8e9d8cb628b8fe7ac971b082e83b1963dffa1fe1a90f0a9ddb8',
|
|
77
77
|
imports: Object.freeze([
|
|
78
78
|
Object.freeze({
|
|
79
|
-
specifier: './upstream-compile-worker-
|
|
80
|
-
target: 'assets/upstream-compile-worker-
|
|
79
|
+
specifier: './upstream-compile-worker-CbXtAM7H.js',
|
|
80
|
+
target: 'assets/upstream-compile-worker-CbXtAM7H.js',
|
|
81
81
|
kind: 'static'
|
|
82
82
|
}),
|
|
83
83
|
Object.freeze({
|
|
84
|
-
specifier: './upstream-compile-worker-
|
|
85
|
-
target: 'assets/upstream-compile-worker-
|
|
84
|
+
specifier: './upstream-compile-worker-Dsn9Eg6C.js',
|
|
85
|
+
target: 'assets/upstream-compile-worker-Dsn9Eg6C.js',
|
|
86
86
|
kind: 'dynamic'
|
|
87
87
|
}),
|
|
88
88
|
Object.freeze({
|
|
89
|
-
specifier: './upstream-binaryen-
|
|
90
|
-
target: 'assets/upstream-binaryen-
|
|
89
|
+
specifier: './upstream-binaryen-48916159e6bb29f4.wasm.gz.bin',
|
|
90
|
+
target: 'assets/upstream-binaryen-48916159e6bb29f4.wasm.gz.bin',
|
|
91
91
|
kind: 'asset'
|
|
92
92
|
})
|
|
93
93
|
])
|
|
94
94
|
}),
|
|
95
|
-
'assets/upstream-compile-worker-
|
|
96
|
-
bytes:
|
|
97
|
-
sha256: '
|
|
95
|
+
'assets/upstream-compile-worker-Dsn9Eg6C.js': Object.freeze({
|
|
96
|
+
bytes: 126,
|
|
97
|
+
sha256: 'a03423dd62954c6479910dddedc4703ecdc36e4dcd783e5d2b121fb16b72a1b4',
|
|
98
98
|
imports: Object.freeze([
|
|
99
99
|
Object.freeze({
|
|
100
|
-
specifier: './upstream-compile-worker-
|
|
101
|
-
target: 'assets/upstream-compile-worker-
|
|
100
|
+
specifier: './upstream-compile-worker-CbXtAM7H.js',
|
|
101
|
+
target: 'assets/upstream-compile-worker-CbXtAM7H.js',
|
|
102
102
|
kind: 'static'
|
|
103
103
|
})
|
|
104
104
|
])
|
|
105
105
|
}),
|
|
106
106
|
'upstream.js': Object.freeze({
|
|
107
|
-
bytes:
|
|
108
|
-
sha256: '
|
|
107
|
+
bytes: 126854,
|
|
108
|
+
sha256: '67031b67fe3b70fea1e0cbc2b01ba113eae585cddb641a4769cdf1056104a5a9',
|
|
109
109
|
imports: Object.freeze([
|
|
110
110
|
Object.freeze({
|
|
111
|
-
specifier: 'assets/upstream-compile-worker-
|
|
112
|
-
target: 'assets/upstream-compile-worker-
|
|
111
|
+
specifier: 'assets/upstream-compile-worker-CjBUBLVc.js',
|
|
112
|
+
target: 'assets/upstream-compile-worker-CjBUBLVc.js',
|
|
113
113
|
kind: 'worker'
|
|
114
114
|
})
|
|
115
115
|
])
|
|
116
116
|
})
|
|
117
117
|
})
|
|
118
118
|
});
|
|
119
|
-
export const WASM_TINYGO_ASSET_VERSION = '
|
|
119
|
+
export const WASM_TINYGO_ASSET_VERSION = '1f50eede6cf4de937e8150400e72e094fbfe1ee732b6f1f28d2a439593c4abc3';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export declare const WASM_TYPESCRIPT_ASSET_VERSION = "
|
|
1
|
+
export declare const WASM_TYPESCRIPT_ASSET_VERSION = "ddfaeea8f8b111b0";
|
|
2
2
|
export declare const WASM_TYPESCRIPT_MODULE_RECEIPT: Readonly<{
|
|
3
|
-
bytes:
|
|
4
|
-
sha256: "
|
|
3
|
+
bytes: 3892294;
|
|
4
|
+
sha256: "2af0cb095c0b02689e6676a576202b71ea87dd6d3e14e4c1e54c21a848eb33b7";
|
|
5
5
|
}>;
|
|
6
6
|
export declare const WASM_JAVASCRIPT_MODULE_RECEIPT: Readonly<{
|
|
7
7
|
bytes: 158899;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export const WASM_TYPESCRIPT_ASSET_VERSION = '
|
|
1
|
+
export const WASM_TYPESCRIPT_ASSET_VERSION = 'ddfaeea8f8b111b0';
|
|
2
2
|
export const WASM_TYPESCRIPT_MODULE_RECEIPT = Object.freeze({
|
|
3
|
-
bytes:
|
|
4
|
-
sha256: '
|
|
3
|
+
bytes: 3892294,
|
|
4
|
+
sha256: '2af0cb095c0b02689e6676a576202b71ea87dd6d3e14e4c1e54c21a848eb33b7'
|
|
5
5
|
});
|
|
6
6
|
export const WASM_JAVASCRIPT_MODULE_RECEIPT = Object.freeze({
|
|
7
7
|
bytes: 158899,
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
export declare const WASM_ZIG_ASSET_VERSION = "
|
|
1
|
+
export declare const WASM_ZIG_ASSET_VERSION = "f13d47d5f39086f8";
|
|
2
2
|
export declare const WASM_ZIG_ASSET_RECEIPTS: Readonly<{
|
|
3
3
|
'zig_small.wasm': Readonly<{
|
|
4
|
-
bytes:
|
|
5
|
-
sha256: "
|
|
4
|
+
bytes: 4934128;
|
|
5
|
+
sha256: "82a101fd16c4cee7925ffc8fa51ccd713b23f32b13591531de383444e1060fd9";
|
|
6
6
|
}>;
|
|
7
7
|
'std.tar.gz': Readonly<{
|
|
8
|
-
bytes:
|
|
9
|
-
sha256: "
|
|
10
|
-
uncompressedBytes:
|
|
11
|
-
uncompressedSha256: "
|
|
8
|
+
bytes: 30362437;
|
|
9
|
+
sha256: "a4f8b9403dfb0e0a826444f2a4a7eeb6b86403c79c650b93e34be95104bcb88c";
|
|
10
|
+
uncompressedBytes: 217466880;
|
|
11
|
+
uncompressedSha256: "63a671ed94b5b3f41cca3f7cde7ab237c9b2e72aae682bbfadf09799fa803397";
|
|
12
12
|
}>;
|
|
13
13
|
}>;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
export const WASM_ZIG_ASSET_VERSION = '
|
|
1
|
+
export const WASM_ZIG_ASSET_VERSION = 'f13d47d5f39086f8';
|
|
2
2
|
export const WASM_ZIG_ASSET_RECEIPTS = Object.freeze({
|
|
3
3
|
'zig_small.wasm': Object.freeze({
|
|
4
|
-
bytes:
|
|
5
|
-
sha256: '
|
|
4
|
+
bytes: 4934128,
|
|
5
|
+
sha256: '82a101fd16c4cee7925ffc8fa51ccd713b23f32b13591531de383444e1060fd9'
|
|
6
6
|
}),
|
|
7
7
|
'std.tar.gz': Object.freeze({
|
|
8
|
-
bytes:
|
|
9
|
-
sha256: '
|
|
10
|
-
uncompressedBytes:
|
|
11
|
-
uncompressedSha256: '
|
|
8
|
+
bytes: 30362437,
|
|
9
|
+
sha256: 'a4f8b9403dfb0e0a826444f2a4a7eeb6b86403c79c650b93e34be95104bcb88c',
|
|
10
|
+
uncompressedBytes: 217466880,
|
|
11
|
+
uncompressedSha256: '63a671ed94b5b3f41cca3f7cde7ab237c9b2e72aae682bbfadf09799fa803397'
|
|
12
12
|
})
|
|
13
13
|
});
|
|
@@ -3,6 +3,7 @@ import { createJavaOutput } from './javaOutput';
|
|
|
3
3
|
import { createJavaStdinBridge, prepareJavaRuntimeStdinInjection } from '../javaRuntimeStdin';
|
|
4
4
|
import { resolveJavaSourceIdentity } from '../javaSource';
|
|
5
5
|
import { prepareJavaExceptionBridge } from '../javaRuntimeErrors';
|
|
6
|
+
import { selectJavaMainInvocation } from '../javaMain';
|
|
6
7
|
import { waitForBufferedStdin } from '../stdinBuffer';
|
|
7
8
|
import { createJavaDebugBridge } from '../javaDebugBridge';
|
|
8
9
|
import { readDebugCommand } from '../debugMailbox';
|
|
@@ -92,7 +93,12 @@ self.addEventListener('message', async (event) => {
|
|
|
92
93
|
})(),
|
|
93
94
|
loadWorkerRuntimeAsset('compile-classlib-teavm.bin').then(({ bytes }) => toInt8Array(bytes)),
|
|
94
95
|
loadWorkerRuntimeAsset('runtime-classlib-teavm.bin').then(({ bytes }) => toInt8Array(bytes)),
|
|
95
|
-
loadWorkerRuntimeAsset('compiler.wasm-deobfuscator.wasm').then(({ bytes }) =>
|
|
96
|
+
loadWorkerRuntimeAsset('compiler.wasm-deobfuscator.wasm').then(async ({ bytes }) => {
|
|
97
|
+
const module = await WebAssembly.compile(bytes, { builtins: ['js-string'] });
|
|
98
|
+
// Validate before acknowledging load. Only the adapted loader accepts a
|
|
99
|
+
// compiled deobfuscator; ordinary/custom loaders require Wasm bytes.
|
|
100
|
+
return streamCompiler ? module : Uint8Array.from(bytes);
|
|
101
|
+
})
|
|
96
102
|
]);
|
|
97
103
|
// Publish only a fully initialized compiler; a failed first attempt
|
|
98
104
|
// must retry instead of acknowledging a partially initialized runtime.
|
|
@@ -127,7 +133,7 @@ self.addEventListener('message', async (event) => {
|
|
|
127
133
|
output = createJavaOutput((text) => self.postMessage({ output: text }));
|
|
128
134
|
const explicitStdin = hasExplicitStdin === true;
|
|
129
135
|
const stdinInjection = prepareJavaRuntimeStdinInjection(code);
|
|
130
|
-
const sourceIdentity = resolveJavaSourceIdentity(code);
|
|
136
|
+
const sourceIdentity = resolveJavaSourceIdentity(code, activePath);
|
|
131
137
|
const sourcePath = typeof activePath === 'string' && activePath ? activePath : sourceIdentity.sourcePath;
|
|
132
138
|
const sourceFileName = sourcePath.split('/').pop() || sourcePath;
|
|
133
139
|
if (!Array.isArray(workspaceFiles) ||
|
|
@@ -189,7 +195,6 @@ self.addEventListener('message', async (event) => {
|
|
|
189
195
|
compiledModule = null;
|
|
190
196
|
compiledDiagnostics = [];
|
|
191
197
|
compiledDebugFiles = [];
|
|
192
|
-
const mainClass = sourceIdentity.mainClass;
|
|
193
198
|
currentSourcePaths = new Set([sourcePath, ...sourceFiles.map((file) => file.path)].flatMap((path) => [
|
|
194
199
|
path,
|
|
195
200
|
path.split('/').pop() || path
|
|
@@ -298,14 +303,23 @@ self.addEventListener('message', async (event) => {
|
|
|
298
303
|
? 'Main method not found'
|
|
299
304
|
: 'Multiple main methods found');
|
|
300
305
|
}
|
|
306
|
+
const mainClass = mainClasses[0].replaceAll('/', '.');
|
|
301
307
|
// Compile the launcher against the original class files so user diagnostics and
|
|
302
308
|
// main-method validation stay independent, and original source lines are unchanged.
|
|
303
309
|
const classFiles = Array.from(compiler.listOutputFiles());
|
|
310
|
+
let invocation;
|
|
311
|
+
try {
|
|
312
|
+
invocation = selectJavaMainInvocation(new Uint8Array(compiler.getOutputFile(`${mainClass.replaceAll('.', '/')}.class`)));
|
|
313
|
+
}
|
|
314
|
+
catch (error) {
|
|
315
|
+
disposeDiagnosticRegistration();
|
|
316
|
+
throw error;
|
|
317
|
+
}
|
|
304
318
|
const exceptionBridge = prepareJavaExceptionBridge(mainClass, [
|
|
305
319
|
code,
|
|
306
320
|
...sourceFiles.map((file) => file.content),
|
|
307
321
|
stdinInjection.helperSource || ''
|
|
308
|
-
], classFiles);
|
|
322
|
+
], classFiles, invocation);
|
|
309
323
|
for (const path of classFiles) {
|
|
310
324
|
if (path.endsWith('.class'))
|
|
311
325
|
compiler.addClassFile(path, compiler.getOutputFile(path));
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
// Third-party license texts: java-debug-notices.txt beside the
|
|
2
|
-
import{a as m,b as y}from"../java-debug-
|
|
1
|
+
// Third-party license texts: java-debug-notices.txt beside the Java helpers.
|
|
2
|
+
import{a as m,b as y}from"../java-debug-64JGCLTC.js";var N=new Set(["boolean","byte","short","char","int","long","float","double"]),j=new Set(["length","isEmpty","isBlank","charAt","codePointAt","codePointBefore","codePointCount","compareTo","compareToIgnoreCase","equals","equalsIgnoreCase","contains","startsWith","endsWith","indexOf","lastIndexOf","substring","subSequence","trim","strip","stripLeading","stripTrailing","concat","hashCode","toString","regionMatches"]),x=new Set(["substring","subSequence","trim","strip","stripLeading","stripTrailing","concat","toString","valueOf","toHexString","toOctalString","toBinaryString","toUnsignedString"]),T={Math:new Set(["abs","min","max","round","ceil","floor","sqrt","cbrt","pow","sin","cos","tan","asin","acos","atan","atan2","exp","expm1","log","log10","log1p","hypot","signum","copySign","scalb","ulp","nextUp","nextDown","nextAfter","toRadians","toDegrees","addExact","subtractExact","multiplyExact","toIntExact","floorDiv","floorMod","IEEEremainder"]),String:new Set(["valueOf"]),Integer:new Set(["parseInt","parseUnsignedInt","toString","toHexString","toOctalString","toBinaryString","toUnsignedString","compare","compareUnsigned","sum","min","max","bitCount","signum","numberOfLeadingZeros","numberOfTrailingZeros","reverse","reverseBytes","rotateLeft","rotateRight","highestOneBit","lowestOneBit","toUnsignedLong"]),Long:new Set(["parseLong","parseUnsignedLong","toString","toHexString","toOctalString","toBinaryString","toUnsignedString","compare","compareUnsigned","sum","min","max","bitCount","signum","numberOfLeadingZeros","numberOfTrailingZeros","reverse","reverseBytes","rotateLeft","rotateRight","highestOneBit","lowestOneBit"]),Double:new Set(["parseDouble","toString","isNaN","isInfinite","isFinite","compare","sum","min","max"]),Float:new Set(["parseFloat","toString","isNaN","isInfinite","isFinite","compare","sum","min","max"]),Boolean:new Set(["parseBoolean","toString","logicalAnd","logicalOr","logicalXor"]),Character:new Set(["isDigit","isLetter","isLetterOrDigit","isWhitespace","isUpperCase","isLowerCase","toUpperCase","toLowerCase","toTitleCase","getNumericValue","digit","toString"])},A={Math:new Set(["PI","E"]),Integer:new Set(["MIN_VALUE","MAX_VALUE","SIZE","BYTES"]),Long:new Set(["MIN_VALUE","MAX_VALUE","SIZE","BYTES"]),Short:new Set(["MIN_VALUE","MAX_VALUE","SIZE","BYTES"]),Byte:new Set(["MIN_VALUE","MAX_VALUE","SIZE","BYTES"]),Character:new Set(["MIN_VALUE","MAX_VALUE","SIZE","BYTES"]),Double:new Set(["MIN_VALUE","MIN_NORMAL","MAX_VALUE","NaN","POSITIVE_INFINITY","NEGATIVE_INFINITY"]),Float:new Set(["MIN_VALUE","MIN_NORMAL","MAX_VALUE","NaN","POSITIVE_INFINITY","NEGATIVE_INFINITY"])},b=m((t,i)=>(t.children[i]??[]).flatMap(s=>"children"in s?[s]:[]),"nodes"),L=m((t,i)=>(t.children[i]??[]).filter(s=>!("children"in s)),"tokens");function E(t){return Object.entries(t.children).flatMap(([i,s])=>s.flatMap(f=>"children"in f?E(f):i==="Identifier"?[f]:[])).sort((i,s)=>i.startOffset-s.startOffset)}m(E,"identifiers");function M(t,i){let s=new Set;if(/\\u+[0-9a-fA-F]{4}/.test(t))throw new Error("Java evaluation does not support Unicode preprocessing escapes.");let{cst:f,tokens:o}=y(t,"expression"),S=new Set(["PlusPlus","MinusMinus","New","This","Super","Arrow","DoubleColon","LSquare","LCurly","Class","Instanceof","At"]);if(o.some(a=>S.has(a.tokenType.name)))throw new Error("Java evaluation supports read-only scalar/String expressions; mutation, objects, arrays and closures are unsupported.");let d=new Map,h=m(a=>{if(d.has(a))return d.get(a);if(a.children.AssignmentOperator)throw new Error("Java evaluation does not allow assignment or mutation.");if(a.name==="conditionalExpression"&&a.children.QuestionMark)throw new Error("Java snapshot evaluation does not support conditional expressions because compile-time constant narrowing is unavailable.");if(a.name==="typeArguments")throw new Error("Java evaluation does not support generic or user-type expressions.");let e=Object.values(a.children).flat().flatMap(p=>"children"in p?[p]:[]).map(h),n=e.includes("string")?"string":e.includes("null")?"null":"scalar";if(a.name==="literal")n=a.children.StringLiteral||a.children.TextBlock?"string":a.children.Null?"null":"scalar";else if(a.name==="referenceTypeCastExpression"){if(E(b(a,"referenceType")[0]).map(v=>v.image).join(".")!=="java.lang.String")throw new Error("Java evaluation supports only primitive and fully qualified java.lang.String casts.");n="string"}else if(a.name==="primitiveCastExpression")n="scalar";else if(a.name==="primary"){let p=b(a,"primaryPrefix")[0],v=b(p,"fqnOrRefType")[0],g=b(a,"primarySuffix"),I=0;if(v){let r=E(v).map(c=>c.image),l=!!g[0]?.children.methodInvocationSuffix,u=i.get(r[0]);if(u){if(u.unavailable!==void 0)throw new Error(`Java evaluation cannot use ${u.name}: ${u.unavailable}`);if(!N.has(u.type)&&u.type!=="String"&&u.type!=="java.lang.String")throw new Error(`Java evaluation cannot use ${u.name} (${u.type}); inspect this target reference in Variables.`);if(s.add(u.name),n=N.has(u.type)?"scalar":"string",r.length!==1||l){if(r.length!==2||!l||n!=="string"||!j.has(r[1]))throw new Error("Java evaluation cannot call target methods or access target fields.");n=x.has(r[1])?"string":"scalar",I=1}}else{let c=r.slice(2);if(r[0]!=="java"||r[1]!=="lang"||c.length!==2||(l?!Object.hasOwn(T,c[0])||!T[c[0]].has(c[1]):!Object.hasOwn(A,c[0])||!A[c[0]].has(c[1])))throw new Error(`Java evaluation cannot resolve ${r.join(".")}; use scalar/String locals or fully qualified java.lang library calls/constants.`);n=l&&x.has(c[1])?"string":"scalar",I=l?1:0}}for(let r=I;r<g.length;r+=2){let l=L(g[r],"Identifier")[0]?.image;if(n!=="string"||!l||!j.has(l)||!g[r+1]?.children.methodInvocationSuffix)throw new Error("Java evaluation supports only approved String methods on expression results.");n=x.has(l)?"string":"scalar"}}else if(a.name==="binaryExpression"){let p=b(a,"unaryExpression").map(h),v=L(a,"BinaryOperator");for(let[g,I]of v.entries()){let r=[g,g+1].some(l=>p[l]==="null"&&v[l-1]?.image!=="+"&&v[l]?.image!=="+");if(["==","!="].includes(I.image)&&(p[g]==="string"||p[g+1]==="string")&&!r)throw new Error("Java snapshot evaluation cannot compare String reference identity; use equals() for String contents.")}v.some(g=>["==","!=","<",">","<=",">=","&&","||"].includes(g.image))&&(n="scalar")}return d.set(a,n),n},"visit");return h(f),s}m(M,"validateExpression");function $(t){if(typeof t.expression!="string"||!t.expression.trim()||new TextEncoder().encode(t.expression).length>4096)throw new Error("Java expressions must contain 1\u20134096 UTF-8 bytes.");if(!Array.isArray(t.bindings)||t.bindings.length>1024)throw new Error("Java evaluation supports at most 1024 local bindings.");let i=new Map;for(let e of t.bindings){if(!e||typeof e.name!="string"||typeof e.type!="string"||e.value!==null&&typeof e.value!="string"||e.unavailable!==void 0&&typeof e.unavailable!="string")throw new Error("Invalid Java evaluation binding.");let n=y(e.name,"expression");if(n.tokens.length!==1||E(n.cst)[0]?.image!==e.name||i.has(e.name)||/\\/.test(e.name))throw new Error(`Invalid or duplicate Java local name: ${e.name}`);i.set(e.name,{...e})}let s=M(t.expression,i),f=0,o="WasmIdleEval";for(;t.expression.includes(o)||[...i.keys()].some(e=>e.includes(o));)o=`WasmIdleEval_${++f}`;let S=`${o}_args`,d=[],h=[],a={byte:"java.lang.Byte.parseByte(value)",short:"java.lang.Short.parseShort(value)",int:"java.lang.Integer.parseInt(value)",long:"java.lang.Long.parseLong(value)",float:'value.equals("NaN") ? java.lang.Float.NaN : value.equals("Infinity") ? java.lang.Float.POSITIVE_INFINITY : value.equals("-Infinity") ? java.lang.Float.NEGATIVE_INFINITY : value.equals("-0.0") ? java.lang.Float.intBitsToFloat(java.lang.Integer.MIN_VALUE) : java.lang.Float.parseFloat(value)',double:'value.equals("NaN") ? java.lang.Double.NaN : value.equals("Infinity") ? java.lang.Double.POSITIVE_INFINITY : value.equals("-Infinity") ? java.lang.Double.NEGATIVE_INFINITY : value.equals("-0.0") ? java.lang.Double.longBitsToDouble(java.lang.Long.MIN_VALUE) : java.lang.Double.parseDouble(value)',boolean:"java.lang.Boolean.parseBoolean(value)",char:"(char) java.lang.Integer.parseInt(value)"},w=0;for(let e of i.values()){if(!s.has(e.name))continue;if(w+=new TextEncoder().encode(e.value??"").length,w>65536)throw new Error("Java evaluation binding values exceed 65536 UTF-8 bytes.");let n=d.length;if(N.has(e.type)){if(e.value===null||e.type==="char"&&(!/^\d{1,5}$/.test(e.value)||Number(e.value)>65535)||e.type==="boolean"&&!["true","false"].includes(e.value))throw new Error(`Invalid ${e.type} value for Java local ${e.name}.`);d.push(e.value),h.push(`final ${e.type} ${e.name} = ${o}_${e.type}(${S}[${n}]);`)}else(e.type==="String"||e.type==="java.lang.String")&&(d.push(e.value===null?"1":"0",e.value??""),h.push(`final java.lang.String ${e.name} = ${S}[${n}].equals("1") ? null : ${S}[${n+1}];`))}return{args:d,code:`public final class ${o} {
|
|
3
3
|
${Object.entries(a).map(([e,n])=>` private static ${e} ${o}_${e}(java.lang.String value) { return ${n}; }`).join(`
|
|
4
4
|
`)}
|
|
5
5
|
${String.raw` private static java.lang.String ${o}_quote(java.lang.String value) {
|
|
@@ -29,7 +29,11 @@ export function createJavaDebugRuntime(files, options, emit, read, respond = ()
|
|
|
29
29
|
item.variablesReference < 0 ||
|
|
30
30
|
item.variablesReference > 4096 ||
|
|
31
31
|
(item.indexedVariables !== undefined &&
|
|
32
|
-
(!Number.isSafeInteger(item.indexedVariables) || item.indexedVariables < 0))
|
|
32
|
+
(!Number.isSafeInteger(item.indexedVariables) || item.indexedVariables < 0)) ||
|
|
33
|
+
(item.namedVariables !== undefined &&
|
|
34
|
+
(!Number.isSafeInteger(item.namedVariables) ||
|
|
35
|
+
item.namedVariables < 0 ||
|
|
36
|
+
item.namedVariables > 257)))
|
|
33
37
|
throw new Error('Invalid Java variable descriptor');
|
|
34
38
|
const reference = item.variablesReference
|
|
35
39
|
? referenceBase() + item.variablesReference
|
|
@@ -43,6 +47,9 @@ export function createJavaDebugRuntime(files, options, emit, read, respond = ()
|
|
|
43
47
|
variablesReference: reference,
|
|
44
48
|
...(item.indexedVariables !== undefined
|
|
45
49
|
? { indexedVariables: item.indexedVariables }
|
|
50
|
+
: {}),
|
|
51
|
+
...(item.namedVariables !== undefined
|
|
52
|
+
? { namedVariables: item.namedVariables }
|
|
46
53
|
: {})
|
|
47
54
|
};
|
|
48
55
|
});
|
|
@@ -92,8 +92,10 @@ export async function loadStreamingJavaCompiler(baseUrl, maxAssetBytes) {
|
|
|
92
92
|
}
|
|
93
93
|
/** Transform only the known verified loader, preserving TeaVM imports and exports. */
|
|
94
94
|
export function acceptCompiledTeaVmModule(source) {
|
|
95
|
-
|
|
95
|
+
// The complete byte-compilation branch belongs to the receipt-pinned 0.17.0-dev-3 loader.
|
|
96
|
+
// Its minified identifier alone is not a compatibility contract.
|
|
97
|
+
const anchor = 'async function C(e,t){if(typeof e!=="string"){return await WebAssembly.compile(e,{builtins:["js-string"]})}';
|
|
96
98
|
if (source.split(anchor).length !== 2)
|
|
97
99
|
throw new Error('Unsupported TeaVM loader for compiled-module input');
|
|
98
|
-
return source.replace(anchor, '
|
|
100
|
+
return source.replace(anchor, anchor.replace('{if(', '{if(e instanceof WebAssembly.Module)return e;if('));
|
|
99
101
|
}
|