diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-01-11 16:17:16 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-01-11 16:17:16 -0800 |
commit | c47f7eba9be951c8e308e66c2541091c6b057af8 (patch) | |
tree | 59aed1cd174e91921e867955507c13f63303f40e /src/compiler.js | |
parent | ada59f0a9d23d8ec19ee6a1326977ddf6e93f5f9 (diff) | |
parent | 2113958017b5def518bd4bcf0bf77e8be233a93f (diff) |
Merge branch 'incoming'
Diffstat (limited to 'src/compiler.js')
-rw-r--r-- | src/compiler.js | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/src/compiler.js b/src/compiler.js index 35f746a5..118ca83a 100644 --- a/src/compiler.js +++ b/src/compiler.js @@ -174,18 +174,25 @@ RUNTIME_DEBUG = LIBRARY_DEBUG || GL_DEBUG; // 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((TOTAL_MEMORY&(TOTAL_MEMORY-1)) == 0, 'asm.js heap must be power of 2'); +} +assert(!(!NAMED_GLOBALS && BUILD_AS_SHARED_LIB)); // shared libraries must have named globals // Output some info and warnings based on settings -if (!MICRO_OPTS || !RELOOP || ASSERTIONS || CHECK_SIGNS || CHECK_OVERFLOWS || INIT_STACK || INIT_HEAP || - !SKIP_STACK_IN_SMALL || SAFE_HEAP || PGO || PROFILE || !DISABLE_EXCEPTION_CATCHING) { - print('// Note: Some Emscripten settings will significantly limit the speed of the generated code.'); -} else { - print('// Note: For maximum-speed code, see "Optimizing Code" on the Emscripten wiki, https://github.com/kripken/emscripten/wiki/Optimizing-Code'); -} +if (phase == 'pre') { + if (!MICRO_OPTS || !RELOOP || ASSERTIONS || CHECK_SIGNS || CHECK_OVERFLOWS || INIT_STACK || INIT_HEAP || + !SKIP_STACK_IN_SMALL || SAFE_HEAP || PGO || PROFILE || !DISABLE_EXCEPTION_CATCHING) { + print('// Note: Some Emscripten settings will significantly limit the speed of the generated code.'); + } else { + print('// Note: For maximum-speed code, see "Optimizing Code" on the Emscripten wiki, https://github.com/kripken/emscripten/wiki/Optimizing-Code'); + } -if (DOUBLE_MODE || CORRECT_SIGNS || CORRECT_OVERFLOWS || CORRECT_ROUNDINGS) { - print('// Note: Some Emscripten settings may limit the speed of the generated code.'); + if (DOUBLE_MODE || CORRECT_SIGNS || CORRECT_OVERFLOWS || CORRECT_ROUNDINGS) { + print('// Note: Some Emscripten settings may limit the speed of the generated code.'); + } } // Load compiler code |