aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/preamble.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/preamble.js b/src/preamble.js
index 98395200..24049283 100644
--- a/src/preamble.js
+++ b/src/preamble.js
@@ -470,6 +470,7 @@ function allocate(slab, types, allocator, ptr) {
setValue(ret+i, curr, type);
+ // no need to look up size unless type changes, so cache it
if (previousType !== type) {
typeSize = Runtime.getNativeTypeSize(type);
previousType = type;