aboutsummaryrefslogtreecommitdiff
path: root/src/parseTools.js
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2013-05-03 16:40:18 -0700
committerAlon Zakai <alonzakai@gmail.com>2013-05-04 19:53:45 -0700
commiteadd89b7c87921ea3274e76017046b8bf884b336 (patch)
tree8c77b931a6323823542f33836ba765f46d6ff97c /src/parseTools.js
parent0560adda8a6c0259478a54e5b514ceaafe8fc10c (diff)
make memory management sane: 0 is null, then static including globals, then stack, then dynamic/sbrk. deprecate shared libs (BUILD_AS_SHARED_LIB)
Diffstat (limited to 'src/parseTools.js')
-rw-r--r--src/parseTools.js5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/parseTools.js b/src/parseTools.js
index 5cbefdb1..db834206 100644
--- a/src/parseTools.js
+++ b/src/parseTools.js
@@ -465,8 +465,7 @@ function makeGlobalUse(ident) {
UNINDEXABLE_GLOBALS[ident] = 1;
return ident;
}
- // We know and assert on TOTAL_STACK being equal to GLOBAL_BASE
- return (TOTAL_STACK + index).toString();
+ return (Runtime.GLOBAL_BASE + index).toString();
}
return ident;
}
@@ -1594,7 +1593,7 @@ function makePointer(slab, pos, allocator, type, ptr, finalMemoryInitialization)
// writing out into memory, without a normal allocation. We put all of these into a single big chunk.
assert(typeof slab == 'object');
assert(slab.length % QUANTUM_SIZE == 0, slab.length); // must be aligned already
- var offset = ptr - TOTAL_STACK; // we assert on GLOBAL_BASE being equal to TOTAL_STACK
+ var offset = ptr - Runtime.GLOBAL_BASE;
for (var i = 0; i < slab.length; i++) {
memoryInitialization[offset + i] = slab[i];
}