diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-07-17 18:18:53 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-07-17 18:18:53 -0700 |
commit | d45e68797573060a34ea95bd5b94923f80b39bd6 (patch) | |
tree | d987d4f23e53aa7535472e13168618984fae246a /tools/js-optimizer.js | |
parent | 30a363191c06f40fb988fdaa0ecb35b0c97ea236 (diff) |
add asm coercions to switches for outlining
Diffstat (limited to 'tools/js-optimizer.js')
-rw-r--r-- | tools/js-optimizer.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/js-optimizer.js b/tools/js-optimizer.js index 63849ac9..3ee1a0b6 100644 --- a/tools/js-optimizer.js +++ b/tools/js-optimizer.js @@ -3219,7 +3219,7 @@ function outline(ast) { if (keys(codeInfo.breaks).length > 0) { reps.push(makeIf( makeComparison(makeAsmCoercion(makeStackAccess(ASM_INT, asmData.controlStackPos), ASM_INT), '==', ['num', CONTROL_BREAK_LABEL]), - [makeSwitch(makeStackAccess(ASM_INT, asmData.controlDataStackPos), keys(codeInfo.breaks).map(function(key) { + [makeSwitch(makeAsmCoercion(makeStackAccess(ASM_INT, asmData.controlDataStackPos), ASM_INT), keys(codeInfo.breaks).map(function(key) { var id = codeInfo.breaks[key]; return [['num', id], [['stat', ['break', key]]]]; }))] @@ -3234,7 +3234,7 @@ function outline(ast) { if (keys(codeInfo.continues).length > 0) { reps.push(makeIf( makeComparison(makeAsmCoercion(makeStackAccess(ASM_INT, asmData.controlStackPos), ASM_INT), '==', ['num', CONTROL_CONTINUE_LABEL]), - [makeSwitch(makeStackAccess(ASM_INT, asmData.controlDataStackPos), keys(codeInfo.continues).map(function(key) { + [makeSwitch(makeAsmCoercion(makeStackAccess(ASM_INT, asmData.controlDataStackPos), ASM_INT), keys(codeInfo.continues).map(function(key) { var id = codeInfo.continues[key]; return [['num', id], [['stat', ['continue', key]]]]; }))] |