From 952b8cf7235f5fbc4d0204dd742c19f1aa564bd8 Mon Sep 17 00:00:00 2001 From: Fabian Date: Thu, 9 Aug 2018 18:10:16 -0500 Subject: [PATCH] Quote for Closure Compiler and add missing functions for non-optimised builds --- src/browser/starter.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/browser/starter.js b/src/browser/starter.js index 4810f5ee..4ab358c6 100644 --- a/src/browser/starter.js +++ b/src/browser/starter.js @@ -105,7 +105,7 @@ function V86Starter(options) // }, this); //} - const wasm_table = new WebAssembly.Table({ element: "anyfunc", initial: 0x10000 + 0x100 }); + const wasm_table = new WebAssembly.Table({ element: "anyfunc", "initial": 0x10000 + 0x100 }); var wasm_shared_funcs = { "__assert_fail": (condition, file, line, fun) => { @@ -254,6 +254,10 @@ function V86Starter(options) }, "codegen_finalize": (wasm_table_index, start, end, first_opcode, state_flags) => cpu.codegen_finalize(wasm_table_index, start, end, first_opcode, state_flags), "__indirect_function_table": wasm_table, + "floor": Math.floor, + "ceil": Math.ceil, + "fabs": Math.abs, + "abs": Math.abs, }; const wasm_globals = {