Skip to content

Commit

Permalink
v0.3.0-alpha.20
Browse files Browse the repository at this point in the history
  • Loading branch information
ije committed Mar 27, 2021
1 parent 726d7b5 commit 274fef4
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 39 deletions.
2 changes: 1 addition & 1 deletion compiler/dist/wasm-checksum.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const checksum = "ff6f3d916e5e0a1206a17cf3e537d75c52cd80de";
export const checksum = "9566b0ea43c5a13077d9ae0282c35d289ffc8a24";
68 changes: 34 additions & 34 deletions compiler/dist/wasm-pack.js
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() {
Expand All @@ -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 =
Expand Down Expand Up @@ -86,8 +108,6 @@ function getInt32Memory0() {
return cachegetInt32Memory0;
}

let heap_next = heap.length;

function dropObject(idx) {
if (idx < 36) return;
heap[idx] = heap_next;
Expand All @@ -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
Expand Down Expand Up @@ -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);
Expand All @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion compiler/dist/wasm.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions import_map.json
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]"
}
Expand Down
2 changes: 1 addition & 1 deletion version.ts
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'

0 comments on commit 274fef4

Please sign in to comment.