make std/string test ok again

This commit is contained in:
dcode
2019-03-16 14:48:22 +01:00
parent 05a35f42f6
commit 0c388ca4c6
9 changed files with 3929 additions and 4779 deletions

View File

@ -1,12 +1,12 @@
import "allocator/arena";
import { Array } from "array";
import { COMPARATOR } from "internal/sort";
import { COMPARATOR } from "util/sort";
// 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
// pre-allocates a power of 2 sized buffer itself and reuses it as long as it isn't exceeded.
var buffer: ArrayBuffer = array.buffer_;
var buffer: ArrayBuffer = array.data;
return buffer.byteLength >> alignof<T>();
}