From 7fff4e3eaa209df9a7f967a89dca1362d1ede536 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Sun, 19 Jan 2014 12:09:18 -0800 Subject: better error message for asm.js not supporting growable heap yet --- emcc | 4 ++++ src/compiler.js | 3 --- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/emcc b/emcc index 7333b832..030e87b0 100755 --- a/emcc +++ b/emcc @@ -1240,6 +1240,10 @@ try: if shared.Settings.SAFE_HEAP and not js_opts: logging.warning('asm.js+SAFE_HEAP requires js opts to be run (-O1 or above by default)') + if shared.Settings.ALLOW_MEMORY_GROWTH: + logging.error('Cannot enable ALLOW_MEMORY_GROWTH with asm.js, build with -s ASM_JS=0 if you need a growable heap'); + sys.exit(1); + if shared.Settings.CORRECT_SIGNS >= 2 or shared.Settings.CORRECT_OVERFLOWS >= 2 or shared.Settings.CORRECT_ROUNDINGS >= 2: debug_level = 4 # must keep debug info to do line-by-line operations diff --git a/src/compiler.js b/src/compiler.js index e4ce1c88..17a8e83c 100644 --- a/src/compiler.js +++ b/src/compiler.js @@ -183,9 +183,6 @@ if (SAFE_HEAP) USE_BSS = 0; // must initialize heap for safe heap // Settings sanity checks assert(!(USE_TYPED_ARRAYS === 2 && QUANTUM_SIZE !== 4), 'For USE_TYPED_ARRAYS == 2, must have normal QUANTUM_SIZE of 4'); -if (ASM_JS) { - assert(!ALLOW_MEMORY_GROWTH, 'Cannot grow asm.js heap'); -} assert(!(!NAMED_GLOBALS && BUILD_AS_SHARED_LIB), 'shared libraries must have named globals'); // Output some info and warnings based on settings -- cgit v1.2.3-18-g5258