This commit is contained in:
dcode
2019-03-21 17:34:51 +01:00
parent d4d5814fc2
commit d9463c5484
11 changed files with 4254 additions and 3544 deletions

View File

@ -231,9 +231,8 @@ tests.forEach(filename => {
let memory = new WebAssembly.Memory({ initial: 10 });
let exports = {};
const RUNTIME_HEADER_SIZE = 8; // 16 if GC is present
function getString(ptr) {
const RUNTIME_HEADER_SIZE = exports[".capabilities"] & 2 ? 16 : 8;
if (!ptr) return "null";
var U32 = new Uint32Array(exports.memory ? exports.memory.buffer : memory.buffer);
var U16 = new Uint16Array(exports.memory ? exports.memory.buffer : memory.buffer);