Skip to content
This repository was archived by the owner on Jul 6, 2025. It is now read-only.

Commit bcb9530

Browse files
committed
Rebuild wasm
1 parent 3398492 commit bcb9530

File tree

3 files changed

+37
-37
lines changed

3 files changed

+37
-37
lines changed

compiler/dist/checksum.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export const checksum = "3fb3f626d62fb39b309587343a85fec17546f12c";
1+
export const checksum = "ce6e2d84491428c78ded80e41b2db61d9e868b41";

compiler/dist/compiler.js

Lines changed: 35 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,12 @@
11
import { red } from "https://deno.land/[email protected]/fmt/colors.ts";
22
let wasm;
33

4-
const heap = new Array(32).fill(undefined);
5-
6-
heap.push(undefined, null, true, false);
7-
8-
function getObject(idx) {
9-
return heap[idx];
10-
}
4+
let cachedTextDecoder = new TextDecoder("utf-8", {
5+
ignoreBOM: true,
6+
fatal: true,
7+
});
118

12-
let WASM_VECTOR_LEN = 0;
9+
cachedTextDecoder.decode();
1310

1411
let cachegetUint8Memory0 = null;
1512
function getUint8Memory0() {
@@ -22,6 +19,31 @@ function getUint8Memory0() {
2219
return cachegetUint8Memory0;
2320
}
2421

22+
function getStringFromWasm0(ptr, len) {
23+
return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
24+
}
25+
26+
const heap = new Array(32).fill(undefined);
27+
28+
heap.push(undefined, null, true, false);
29+
30+
let heap_next = heap.length;
31+
32+
function addHeapObject(obj) {
33+
if (heap_next === heap.length) heap.push(heap.length + 1);
34+
const idx = heap_next;
35+
heap_next = heap[idx];
36+
37+
heap[idx] = obj;
38+
return idx;
39+
}
40+
41+
function getObject(idx) {
42+
return heap[idx];
43+
}
44+
45+
let WASM_VECTOR_LEN = 0;
46+
2547
let cachedTextEncoder = new TextEncoder("utf-8");
2648

2749
const encodeString =
@@ -86,8 +108,6 @@ function getInt32Memory0() {
86108
return cachegetInt32Memory0;
87109
}
88110

89-
let heap_next = heap.length;
90-
91111
function dropObject(idx) {
92112
if (idx < 36) return;
93113
heap[idx] = heap_next;
@@ -99,26 +119,6 @@ function takeObject(idx) {
99119
dropObject(idx);
100120
return ret;
101121
}
102-
103-
let cachedTextDecoder = new TextDecoder("utf-8", {
104-
ignoreBOM: true,
105-
fatal: true,
106-
});
107-
108-
cachedTextDecoder.decode();
109-
110-
function getStringFromWasm0(ptr, len) {
111-
return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
112-
}
113-
114-
function addHeapObject(obj) {
115-
if (heap_next === heap.length) heap.push(heap.length + 1);
116-
const idx = heap_next;
117-
heap_next = heap[idx];
118-
119-
heap[idx] = obj;
120-
return idx;
121-
}
122122
/**
123123
* @param {string} specifier
124124
* @param {string} code
@@ -206,7 +206,7 @@ async function load(module, imports) {
206206
try {
207207
return await WebAssembly.instantiateStreaming(module, imports);
208208
} catch (e) {
209-
if (module.headers.get("Content-Type") !== "application/wasm") {
209+
if (module.headers.get("Content-Type") != "application/wasm") {
210210
console.warn(
211211
"`WebAssembly.instantiateStreaming` failed because your server does not serve wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",
212212
e,
@@ -236,6 +236,10 @@ async function init(input) {
236236
}
237237
const imports = {};
238238
imports.wbg = {};
239+
imports.wbg.__wbindgen_json_parse = function (arg0, arg1) {
240+
var ret = JSON.parse(getStringFromWasm0(arg0, arg1));
241+
return addHeapObject(ret);
242+
};
239243
imports.wbg.__wbindgen_json_serialize = function (arg0, arg1) {
240244
const obj = getObject(arg1);
241245
var ret = JSON.stringify(obj === undefined ? null : obj);
@@ -251,10 +255,6 @@ async function init(input) {
251255
imports.wbg.__wbindgen_object_drop_ref = function (arg0) {
252256
takeObject(arg0);
253257
};
254-
imports.wbg.__wbindgen_json_parse = function (arg0, arg1) {
255-
var ret = JSON.parse(getStringFromWasm0(arg0, arg1));
256-
return addHeapObject(ret);
257-
};
258258
imports.wbg.__wbg_new_59cb74e423758ede = function () {
259259
var ret = new Error();
260260
return addHeapObject(ret);

compiler/dist/wasm.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)