aboutsummaryrefslogtreecommitdiff
path: root/src/preamble.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/preamble.js')
-rw-r--r--src/preamble.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/preamble.js b/src/preamble.js
index d4f5e570..8feb43e9 100644
--- a/src/preamble.js
+++ b/src/preamble.js
@@ -354,7 +354,7 @@ function allocate(slab, types, allocator) {
size = slab.length;
}
- var ret = [_malloc, Runtime.stackAlloc, Runtime.staticAlloc][allocator ? allocator : ALLOC_STATIC](Math.max(size, 1));
+ var ret = [_malloc, Runtime.stackAlloc, Runtime.staticAlloc][allocator === undefined ? ALLOC_STATIC : allocator](Math.max(size, 1));
var singleType = typeof types === 'string' ? types : null;
@@ -376,7 +376,7 @@ function allocate(slab, types, allocator) {
#endif
setValue(ret+i, curr, type);
- i += Runtime.getNativeFieldSize(type, true);
+ i += Runtime.getNativeTypeSize(type);
}
return ret;