mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-06-15 07:51:32 +00:00
make std/string test ok again
This commit is contained in:
@ -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>();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user