@fluffylabs/anan-as 1.2.0-6ff418d → 1.2.0-8526d97

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.
@@ -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
- result_ptr: {
26
- // assembly/index-compiler/result_ptr: u32
27
- valueOf() { return this.value; },
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);
Binary file