@fluffylabs/anan-as 1.2.0-47bd114 → 1.2.0-667be52
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/dist/bin/index.js +136 -4
- package/dist/bin/src/fuzz.js +1 -1
- package/dist/bin/src/test-json.js +2 -6
- package/dist/bin/src/trace-replay.js +8 -4
- package/dist/build/compiler-inline.js +1 -1
- package/dist/build/compiler.d.ts +17 -13
- package/dist/build/compiler.js +13 -21
- package/dist/build/compiler.wasm +0 -0
- package/dist/build/debug-inline.js +1 -1
- package/dist/build/debug-raw-inline.js +1 -1
- package/dist/build/debug-raw.d.ts +50 -112
- package/dist/build/debug-raw.js +78 -139
- package/dist/build/debug-raw.wasm +0 -0
- package/dist/build/debug.d.ts +50 -112
- package/dist/build/debug.js +81 -147
- package/dist/build/debug.wasm +0 -0
- package/dist/build/js/assembly/api-debugger.d.ts +55 -0
- package/dist/build/js/assembly/api-debugger.js +245 -0
- package/dist/build/js/assembly/api-internal.d.ts +13 -0
- package/dist/build/js/assembly/api-internal.js +191 -0
- package/dist/build/js/assembly/api-types.d.ts +45 -0
- package/dist/build/js/assembly/api-types.js +52 -0
- package/dist/build/js/assembly/api-utils.d.ts +79 -0
- package/dist/build/js/assembly/api-utils.js +221 -0
- package/dist/build/js/assembly/arguments.d.ts +44 -0
- package/dist/build/js/assembly/arguments.js +164 -0
- package/dist/build/js/assembly/codec.d.ts +24 -0
- package/dist/build/js/assembly/codec.js +139 -0
- package/dist/build/js/assembly/gas.d.ts +11 -0
- package/dist/build/js/assembly/gas.js +33 -0
- package/dist/build/js/assembly/index-shared.d.ts +4 -0
- package/dist/build/js/assembly/index-shared.js +4 -0
- package/dist/build/js/assembly/instructions/bit.d.ts +11 -0
- package/dist/build/js/assembly/instructions/bit.js +53 -0
- package/dist/build/js/assembly/instructions/branch.d.ts +17 -0
- package/dist/build/js/assembly/instructions/branch.js +120 -0
- package/dist/build/js/assembly/instructions/jump.d.ts +5 -0
- package/dist/build/js/assembly/instructions/jump.js +21 -0
- package/dist/build/js/assembly/instructions/load.d.ts +17 -0
- package/dist/build/js/assembly/instructions/load.js +134 -0
- package/dist/build/js/assembly/instructions/logic.d.ts +10 -0
- package/dist/build/js/assembly/instructions/logic.js +47 -0
- package/dist/build/js/assembly/instructions/math.d.ts +28 -0
- package/dist/build/js/assembly/instructions/math.js +225 -0
- package/dist/build/js/assembly/instructions/misc.d.ts +6 -0
- package/dist/build/js/assembly/instructions/misc.js +22 -0
- package/dist/build/js/assembly/instructions/mov.d.ts +6 -0
- package/dist/build/js/assembly/instructions/mov.js +35 -0
- package/dist/build/js/assembly/instructions/outcome.d.ts +30 -0
- package/dist/build/js/assembly/instructions/outcome.js +88 -0
- package/dist/build/js/assembly/instructions/rot.d.ts +15 -0
- package/dist/build/js/assembly/instructions/rot.js +66 -0
- package/dist/build/js/assembly/instructions/set.d.ts +7 -0
- package/dist/build/js/assembly/instructions/set.js +36 -0
- package/dist/build/js/assembly/instructions/shift.d.ts +19 -0
- package/dist/build/js/assembly/instructions/shift.js +121 -0
- package/dist/build/js/assembly/instructions/store.d.ts +17 -0
- package/dist/build/js/assembly/instructions/store.js +101 -0
- package/dist/build/js/assembly/instructions/utils.d.ts +25 -0
- package/dist/build/js/assembly/instructions/utils.js +91 -0
- package/dist/build/js/assembly/instructions-exe.d.ts +2 -0
- package/dist/build/js/assembly/instructions-exe.js +245 -0
- package/dist/build/js/assembly/instructions.d.ts +10 -0
- package/dist/build/js/assembly/instructions.js +252 -0
- package/dist/build/js/assembly/interpreter.d.ts +28 -0
- package/dist/build/js/assembly/interpreter.js +221 -0
- package/dist/build/js/assembly/math.d.ts +6 -0
- package/dist/build/js/assembly/math.js +22 -0
- package/dist/build/js/assembly/memory-page.d.ts +36 -0
- package/dist/build/js/assembly/memory-page.js +74 -0
- package/dist/build/js/assembly/memory.d.ts +83 -0
- package/dist/build/js/assembly/memory.js +482 -0
- package/dist/build/js/assembly/portable.d.ts +24 -0
- package/dist/build/js/assembly/portable.js +363 -0
- package/dist/build/js/assembly/program-build.d.ts +2 -0
- package/dist/build/js/assembly/program-build.js +104 -0
- package/dist/build/js/assembly/program.d.ts +85 -0
- package/dist/build/js/assembly/program.js +340 -0
- package/dist/build/js/assembly/registers.d.ts +6 -0
- package/dist/build/js/assembly/registers.js +9 -0
- package/dist/build/js/assembly/spi.d.ts +92 -0
- package/dist/build/js/assembly/spi.js +152 -0
- package/dist/build/js/portable/bootstrap.d.ts +1 -0
- package/dist/build/js/portable/bootstrap.js +5 -0
- package/dist/build/js/portable/index.d.ts +4 -0
- package/dist/build/js/portable/index.js +6 -0
- package/dist/build/js/portable-bundle.js +4496 -0
- package/dist/build/release-inline.js +1 -1
- package/dist/build/release-mini-inline.js +1 -1
- package/dist/build/release-mini.d.ts +50 -112
- package/dist/build/release-mini.js +81 -147
- package/dist/build/release-mini.wasm +0 -0
- package/dist/build/release-stub-inline.js +1 -1
- package/dist/build/release-stub.d.ts +50 -112
- package/dist/build/release-stub.js +81 -147
- package/dist/build/release-stub.wasm +0 -0
- package/dist/build/release.d.ts +50 -112
- package/dist/build/release.js +81 -147
- package/dist/build/release.wasm +0 -0
- package/dist/build/test-inline.js +1 -1
- package/dist/build/test.wasm +0 -0
- package/dist/test/test-gas-cost.js +2 -3
- package/dist/test/test-w3f-common.js +125 -0
- package/dist/test/test-w3f-portable.js +5 -0
- package/dist/test/test-w3f.js +3 -120
- package/package.json +20 -9
package/dist/build/compiler.d.ts
CHANGED
|
@@ -6,21 +6,25 @@ export declare function __pin(ptr: number): number;
|
|
|
6
6
|
export declare function __unpin(ptr: number): void;
|
|
7
7
|
export declare function __collect(): void;
|
|
8
8
|
export declare const __rtti_base: number;
|
|
9
|
-
/** assembly/index-compiler/result_ptr */
|
|
10
|
-
export declare const result_ptr: {
|
|
11
|
-
/** @type `u32` */
|
|
12
|
-
get value(): number;
|
|
13
|
-
set value(value: number);
|
|
14
|
-
};
|
|
15
|
-
/** assembly/index-compiler/result_len */
|
|
16
|
-
export declare const result_len: {
|
|
17
|
-
/** @type `u32` */
|
|
18
|
-
get value(): number;
|
|
19
|
-
set value(value: number);
|
|
20
|
-
};
|
|
21
9
|
/**
|
|
22
10
|
* assembly/index-compiler/main
|
|
23
11
|
* @param argsPtr `u32`
|
|
24
12
|
* @param argsLen `u32`
|
|
13
|
+
* @returns `i64`
|
|
25
14
|
*/
|
|
26
|
-
export declare function main(argsPtr: number, argsLen: number):
|
|
15
|
+
export declare function main(argsPtr: number, argsLen: number): bigint;
|
|
16
|
+
/**
|
|
17
|
+
* assembly/index-compiler/host_read_memory
|
|
18
|
+
* @param addr `u32`
|
|
19
|
+
* @param len `u32`
|
|
20
|
+
* @returns `i64`
|
|
21
|
+
*/
|
|
22
|
+
export declare function host_read_memory(addr: number, len: number): bigint;
|
|
23
|
+
/**
|
|
24
|
+
* assembly/index-compiler/host_write_memory
|
|
25
|
+
* @param addr `u32`
|
|
26
|
+
* @param dataPtr `u32`
|
|
27
|
+
* @param dataLen `u32`
|
|
28
|
+
* @returns `u32`
|
|
29
|
+
*/
|
|
30
|
+
export declare function host_write_memory(addr: number, dataPtr: number, dataLen: number): number;
|
package/dist/build/compiler.js
CHANGED
|
@@ -17,30 +17,22 @@ async function instantiate(module, imports = {}) {
|
|
|
17
17
|
text = __liftString(text >>> 0);
|
|
18
18
|
console.log(text);
|
|
19
19
|
},
|
|
20
|
+
host_call_6b(ecalli, r7, r8, r9, r10, r11, r12) {
|
|
21
|
+
// assembly/env/host_call_6b(i64, i64, i64, i64, i64, i64, i64) => i64
|
|
22
|
+
return host_call_6b(ecalli, r7, r8, r9, r10, r11, r12) || 0n;
|
|
23
|
+
},
|
|
24
|
+
host_call_r8() {
|
|
25
|
+
// assembly/env/host_call_r8() => i64
|
|
26
|
+
return host_call_r8() || 0n;
|
|
27
|
+
},
|
|
20
28
|
}, Object.assign(Object.create(globalThis), imports.env || {})),
|
|
21
29
|
};
|
|
22
30
|
const { exports } = await WebAssembly.instantiate(module, adaptedImports);
|
|
23
31
|
const memory = exports.memory || imports.env.memory;
|
|
24
32
|
const adaptedExports = Object.setPrototypeOf({
|
|
25
|
-
|
|
26
|
-
// assembly/index-compiler/
|
|
27
|
-
|
|
28
|
-
get value() {
|
|
29
|
-
return exports.result_ptr.value >>> 0;
|
|
30
|
-
},
|
|
31
|
-
set value(value) {
|
|
32
|
-
exports.result_ptr.value = value;
|
|
33
|
-
}
|
|
34
|
-
},
|
|
35
|
-
result_len: {
|
|
36
|
-
// assembly/index-compiler/result_len: u32
|
|
37
|
-
valueOf() { return this.value; },
|
|
38
|
-
get value() {
|
|
39
|
-
return exports.result_len.value >>> 0;
|
|
40
|
-
},
|
|
41
|
-
set value(value) {
|
|
42
|
-
exports.result_len.value = value;
|
|
43
|
-
}
|
|
33
|
+
host_write_memory(addr, dataPtr, dataLen) {
|
|
34
|
+
// assembly/index-compiler/host_write_memory(u32, u32, u32) => u32
|
|
35
|
+
return exports.host_write_memory(addr, dataPtr, dataLen) >>> 0;
|
|
44
36
|
},
|
|
45
37
|
}, exports);
|
|
46
38
|
function __liftString(pointer) {
|
|
@@ -63,9 +55,9 @@ export const {
|
|
|
63
55
|
__unpin,
|
|
64
56
|
__collect,
|
|
65
57
|
__rtti_base,
|
|
66
|
-
result_ptr,
|
|
67
|
-
result_len,
|
|
68
58
|
main,
|
|
59
|
+
host_read_memory,
|
|
60
|
+
host_write_memory,
|
|
69
61
|
} = await (async url => instantiate(
|
|
70
62
|
await (async () => {
|
|
71
63
|
const isNodeOrBun = typeof process != "undefined" && process.versions != null && (process.versions.node != null || process.versions.bun != null);
|
package/dist/build/compiler.wasm
CHANGED
|
Binary file
|