diff options
author | Alon Zakai <alonzakai@gmail.com> | 2014-01-16 11:25:22 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2014-01-16 11:27:39 -0800 |
commit | a3108271317e8242830113a2c87ceed1ec4ac02d (patch) | |
tree | 08ba8e81eb189666c727374275e3abd01b069aec /emcc | |
parent | e14e6ea75cc7afb68e8be6c6994a1602250611ee (diff) |
enable a form of safe heap in asm, using js optimizer pass to ensure full coverage and support for fastcomp
Diffstat (limited to 'emcc')
-rwxr-xr-x | emcc | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -1196,7 +1196,6 @@ try: shared.Settings.ASM_JS = 1 assert shared.Settings.ALLOW_MEMORY_GROWTH == 0, 'memory growth not supported in fastcomp yet' assert shared.Settings.UNALIGNED_MEMORY == 0, 'forced unaligned memory not supported in fastcomp' - assert shared.Settings.SAFE_HEAP == 0, 'safe heap not supported in fastcomp yet' assert shared.Settings.CHECK_HEAP_ALIGN == 0, 'check heap align not supported in fastcomp yet' assert shared.Settings.SAFE_DYNCALLS == 0, 'safe dyncalls not supported in fastcomp' assert shared.Settings.RESERVED_FUNCTION_POINTERS == 0, 'reserved function pointers not supported in fastcomp' @@ -1230,6 +1229,9 @@ try: shared.Settings.CORRECT_OVERFLOWS = 1 assert not shared.Settings.PGO, 'cannot run PGO in ASM_JS mode' + 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.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 @@ -1991,6 +1993,8 @@ try: if DEBUG: save_intermediate('closure') if js_opts: + if shared.Settings.ASM_JS and shared.Settings.SAFE_HEAP: js_optimizer_queue += ['safeHeap'] + if shared.Settings.OUTLINING_LIMIT > 0 and shared.Settings.ASM_JS: js_optimizer_queue += ['outline'] js_optimizer_extra_info['sizeToOutline'] = shared.Settings.OUTLINING_LIMIT |