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);

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +1,10 @@
import "allocator/arena";
import "collector/dummy";
import { Array } from "array";
import { COMPARATOR } from "util/sort";
@start export function main(): void {}
// Obtains the internal capacity of an array from its backing buffer.
function internalCapacity<T>(array: Array<T>): i32 {
// the memory region used by the backing buffer might still be larger in that the ArrayBuffer

File diff suppressed because it is too large Load Diff