-
Notifications
You must be signed in to change notification settings - Fork 166
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
39 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
export const checksum = "ff6f3d916e5e0a1206a17cf3e537d75c52cd80de"; | ||
export const checksum = "9566b0ea43c5a13077d9ae0282c35d289ffc8a24"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,12 @@ | ||
import { red } from "https://deno.land/[email protected]/fmt/colors.ts"; | ||
let wasm; | ||
|
||
const heap = new Array(32).fill(undefined); | ||
|
||
heap.push(undefined, null, true, false); | ||
|
||
function getObject(idx) { | ||
return heap[idx]; | ||
} | ||
let cachedTextDecoder = new TextDecoder("utf-8", { | ||
ignoreBOM: true, | ||
fatal: true, | ||
}); | ||
|
||
let WASM_VECTOR_LEN = 0; | ||
cachedTextDecoder.decode(); | ||
|
||
let cachegetUint8Memory0 = null; | ||
function getUint8Memory0() { | ||
|
@@ -22,6 +19,31 @@ function getUint8Memory0() { | |
return cachegetUint8Memory0; | ||
} | ||
|
||
function getStringFromWasm0(ptr, len) { | ||
return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len)); | ||
} | ||
|
||
const heap = new Array(32).fill(undefined); | ||
|
||
heap.push(undefined, null, true, false); | ||
|
||
let heap_next = heap.length; | ||
|
||
function addHeapObject(obj) { | ||
if (heap_next === heap.length) heap.push(heap.length + 1); | ||
const idx = heap_next; | ||
heap_next = heap[idx]; | ||
|
||
heap[idx] = obj; | ||
return idx; | ||
} | ||
|
||
function getObject(idx) { | ||
return heap[idx]; | ||
} | ||
|
||
let WASM_VECTOR_LEN = 0; | ||
|
||
let cachedTextEncoder = new TextEncoder("utf-8"); | ||
|
||
const encodeString = | ||
|
@@ -86,8 +108,6 @@ function getInt32Memory0() { | |
return cachegetInt32Memory0; | ||
} | ||
|
||
let heap_next = heap.length; | ||
|
||
function dropObject(idx) { | ||
if (idx < 36) return; | ||
heap[idx] = heap_next; | ||
|
@@ -99,26 +119,6 @@ function takeObject(idx) { | |
dropObject(idx); | ||
return ret; | ||
} | ||
|
||
let cachedTextDecoder = new TextDecoder("utf-8", { | ||
ignoreBOM: true, | ||
fatal: true, | ||
}); | ||
|
||
cachedTextDecoder.decode(); | ||
|
||
function getStringFromWasm0(ptr, len) { | ||
return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len)); | ||
} | ||
|
||
function addHeapObject(obj) { | ||
if (heap_next === heap.length) heap.push(heap.length + 1); | ||
const idx = heap_next; | ||
heap_next = heap[idx]; | ||
|
||
heap[idx] = obj; | ||
return idx; | ||
} | ||
/** | ||
* @param {string} url | ||
* @param {string} code | ||
|
@@ -207,6 +207,10 @@ async function init(input) { | |
} | ||
const imports = {}; | ||
imports.wbg = {}; | ||
imports.wbg.__wbindgen_json_parse = function (arg0, arg1) { | ||
var ret = JSON.parse(getStringFromWasm0(arg0, arg1)); | ||
return addHeapObject(ret); | ||
}; | ||
imports.wbg.__wbindgen_json_serialize = function (arg0, arg1) { | ||
const obj = getObject(arg1); | ||
var ret = JSON.stringify(obj === undefined ? null : obj); | ||
|
@@ -222,10 +226,6 @@ async function init(input) { | |
imports.wbg.__wbindgen_object_drop_ref = function (arg0) { | ||
takeObject(arg0); | ||
}; | ||
imports.wbg.__wbindgen_json_parse = function (arg0, arg1) { | ||
var ret = JSON.parse(getStringFromWasm0(arg0, arg1)); | ||
return addHeapObject(ret); | ||
}; | ||
imports.wbg.__wbg_new_59cb74e423758ede = function () { | ||
var ret = new Error(); | ||
return addHeapObject(ret); | ||
|
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
{ | ||
"imports": { | ||
"framework": "https://deno.land/x/[email protected].19/framework/core/mod.ts", | ||
"framework:react": "https://deno.land/x/[email protected].19/framework/react/mod.ts", | ||
"framework": "https://deno.land/x/[email protected].20/framework/core/mod.ts", | ||
"framework:react": "https://deno.land/x/[email protected].20/framework/react/mod.ts", | ||
"react": "https://esm.sh/[email protected]", | ||
"react-dom": "https://esm.sh/[email protected]" | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
export const VERSION = '0.3.0-alpha.19' | ||
export const VERSION = '0.3.0-alpha.20' |