Remove Closure Compiler hack for wm.exports functions
This commit is contained in:
parent
d83be46a46
commit
b4f5e59d17
|
@ -223,10 +223,6 @@ function V86Starter(options)
|
|||
return f | 0;
|
||||
},
|
||||
"_get_time": () => Date.now(),
|
||||
// XXX: Closure compiler hack; these functions are actually wasm exports
|
||||
"_jit_empty_cache": () => {},
|
||||
"_jit_dirty_cache": () => {},
|
||||
"_after_jump": () => {},
|
||||
};
|
||||
|
||||
let wasm_file = DEBUG ? "v86-debug.wasm" : "v86.wasm";
|
||||
|
|
|
@ -1442,7 +1442,7 @@ CPU.prototype.set_cr0 = function(cr0)
|
|||
|
||||
this.protected_mode[0] = +((this.cr[0] & CR0_PE) === CR0_PE);
|
||||
|
||||
this.wm.exports._jit_empty_cache();
|
||||
this.wm.exports["_jit_empty_cache"]();
|
||||
};
|
||||
|
||||
CPU.prototype.set_cr4 = function(cr4)
|
||||
|
@ -1581,7 +1581,7 @@ CPU.prototype.init2 = function () {};
|
|||
|
||||
CPU.prototype.after_jump = function () {
|
||||
// May be called through JS imports in the WASM module, such as loop or handle_irqs (through popf, sti)
|
||||
this.wm.exports._after_jump();
|
||||
this.wm.exports["_after_jump"]();
|
||||
};
|
||||
CPU.prototype.branch_taken = function () {
|
||||
this.after_jump();
|
||||
|
|
|
@ -285,7 +285,7 @@ CPU.prototype.write_aligned32 = function(addr, value)
|
|||
CPU.prototype.write_blob = function(blob, offset)
|
||||
{
|
||||
this.debug_write(offset, blob.length, 0);
|
||||
this.wm.exports._jit_dirty_cache(offset, offset + blob.length);
|
||||
this.wm.exports["_jit_dirty_cache"](offset, offset + blob.length);
|
||||
|
||||
dbg_assert(blob && blob.length >= 0);
|
||||
|
||||
|
@ -300,7 +300,7 @@ CPU.prototype.write_blob32 = function(blob, offset)
|
|||
{
|
||||
dbg_assert(blob && blob.length);
|
||||
let phys_addr = offset << 2;
|
||||
this.wm.exports._jit_dirty_cache(phys_addr, phys_addr + blob.length);
|
||||
this.wm.exports["_jit_dirty_cache"](phys_addr, phys_addr + blob.length);
|
||||
|
||||
this.debug_write(offset, blob.length << 2, 0);
|
||||
this.mem32s.set(blob, offset);
|
||||
|
|
Loading…
Reference in a new issue