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

Commit c4180d7

Browse files
committed
chore(compiler): build wasm
1 parent d532bd1 commit c4180d7

File tree

3 files changed

+57
-27
lines changed

3 files changed

+57
-27
lines changed

compiler/wasm-checksum.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export const checksum = "8329ec333fc81ad798cb50c0f88995e23039ac9a"
1+
export const checksum = "4dc68b54439363ccfab8261085733159274b1eed"

compiler/wasm-pack.js

Lines changed: 55 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,20 @@ function getInt32Memory0() {
7878
return cachegetInt32Memory0;
7979
}
8080

81+
let heap_next = heap.length;
82+
83+
function dropObject(idx) {
84+
if (idx < 36) return;
85+
heap[idx] = heap_next;
86+
heap_next = idx;
87+
}
88+
89+
function takeObject(idx) {
90+
const ret = getObject(idx);
91+
dropObject(idx);
92+
return ret;
93+
}
94+
8195
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
8296

8397
cachedTextDecoder.decode();
@@ -86,8 +100,6 @@ function getStringFromWasm0(ptr, len) {
86100
return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
87101
}
88102

89-
let heap_next = heap.length;
90-
91103
function addHeapObject(obj) {
92104
if (heap_next === heap.length) heap.push(heap.length + 1);
93105
const idx = heap_next;
@@ -96,18 +108,6 @@ function addHeapObject(obj) {
96108
heap[idx] = obj;
97109
return idx;
98110
}
99-
100-
function dropObject(idx) {
101-
if (idx < 36) return;
102-
heap[idx] = heap_next;
103-
heap_next = idx;
104-
}
105-
106-
function takeObject(idx) {
107-
const ret = getObject(idx);
108-
dropObject(idx);
109-
return ret;
110-
}
111111
/**
112112
* @param {string} s
113113
* @param {any} opts
@@ -182,13 +182,13 @@ async function init(input) {
182182
getInt32Memory0()[arg0 / 4 + 1] = len0;
183183
getInt32Memory0()[arg0 / 4 + 0] = ptr0;
184184
};
185+
imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
186+
takeObject(arg0);
187+
};
185188
imports.wbg.__wbindgen_json_parse = function(arg0, arg1) {
186189
var ret = JSON.parse(getStringFromWasm0(arg0, arg1));
187190
return addHeapObject(ret);
188191
};
189-
imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
190-
takeObject(arg0);
191-
};
192192
imports.wbg.__wbg_new_59cb74e423758ede = function() {
193193
var ret = new Error();
194194
return addHeapObject(ret);
@@ -207,36 +207,66 @@ async function init(input) {
207207
wasm.__wbindgen_free(arg0, arg1);
208208
}
209209
};
210-
imports.wbg.__wbg_getRandomValues_11115a852729f4e8 = handleError(function(arg0, arg1, arg2) {
211-
getObject(arg0).getRandomValues(getArrayU8FromWasm0(arg1, arg2));
210+
imports.wbg.__wbg_getRandomValues_57e4008f45f0e105 = handleError(function(arg0, arg1) {
211+
getObject(arg0).getRandomValues(getObject(arg1));
212212
});
213-
imports.wbg.__wbg_randomFillSync_a2d002fc3b8e30f7 = handleError(function(arg0, arg1, arg2) {
213+
imports.wbg.__wbg_randomFillSync_d90848a552cbd666 = handleError(function(arg0, arg1, arg2) {
214214
getObject(arg0).randomFillSync(getArrayU8FromWasm0(arg1, arg2));
215215
});
216-
imports.wbg.__wbg_self_a5f0fe5564782787 = handleError(function() {
216+
imports.wbg.__wbg_self_f865985e662246aa = handleError(function() {
217217
var ret = self.self;
218218
return addHeapObject(ret);
219219
});
220-
imports.wbg.__wbg_static_accessor_MODULE_7f278c5446c126c8 = function() {
220+
imports.wbg.__wbg_static_accessor_MODULE_39947eb3fe77895f = function() {
221221
var ret = module;
222222
return addHeapObject(ret);
223223
};
224-
imports.wbg.__wbg_require_29e58b5f6f133563 = handleError(function(arg0, arg1, arg2) {
224+
imports.wbg.__wbg_require_c59851dfa0dc7e78 = handleError(function(arg0, arg1, arg2) {
225225
var ret = getObject(arg0).require(getStringFromWasm0(arg1, arg2));
226226
return addHeapObject(ret);
227227
});
228-
imports.wbg.__wbg_crypto_d91429ea1a087f70 = function(arg0) {
228+
imports.wbg.__wbg_crypto_bfb05100db79193b = function(arg0) {
229229
var ret = getObject(arg0).crypto;
230230
return addHeapObject(ret);
231231
};
232-
imports.wbg.__wbg_msCrypto_c8be2bb4fc7d8cd3 = function(arg0) {
232+
imports.wbg.__wbg_msCrypto_f6dddc6ae048b7e2 = function(arg0) {
233233
var ret = getObject(arg0).msCrypto;
234234
return addHeapObject(ret);
235235
};
236236
imports.wbg.__wbindgen_is_undefined = function(arg0) {
237237
var ret = getObject(arg0) === undefined;
238238
return ret;
239239
};
240+
imports.wbg.__wbg_buffer_3f12a1c608c6d04e = function(arg0) {
241+
var ret = getObject(arg0).buffer;
242+
return addHeapObject(ret);
243+
};
244+
imports.wbg.__wbg_length_c645e7c02233b440 = function(arg0) {
245+
var ret = getObject(arg0).length;
246+
return ret;
247+
};
248+
imports.wbg.__wbg_new_c6c0228e6d22a2f9 = function(arg0) {
249+
var ret = new Uint8Array(getObject(arg0));
250+
return addHeapObject(ret);
251+
};
252+
imports.wbg.__wbg_set_b91afac9fd216d99 = function(arg0, arg1, arg2) {
253+
getObject(arg0).set(getObject(arg1), arg2 >>> 0);
254+
};
255+
imports.wbg.__wbg_newwithlength_a429e08f8a8fe4b3 = function(arg0) {
256+
var ret = new Uint8Array(arg0 >>> 0);
257+
return addHeapObject(ret);
258+
};
259+
imports.wbg.__wbg_subarray_02e2fcfa6b285cb2 = function(arg0, arg1, arg2) {
260+
var ret = getObject(arg0).subarray(arg1 >>> 0, arg2 >>> 0);
261+
return addHeapObject(ret);
262+
};
263+
imports.wbg.__wbindgen_throw = function(arg0, arg1) {
264+
throw new Error(getStringFromWasm0(arg0, arg1));
265+
};
266+
imports.wbg.__wbindgen_memory = function() {
267+
var ret = wasm.memory;
268+
return addHeapObject(ret);
269+
};
240270

241271
if (typeof input === 'string' || (typeof Request === 'function' && input instanceof Request) || (typeof URL === 'function' && input instanceof URL)) {
242272
input = fetch(input);

compiler/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)