diff options
Diffstat (limited to 'tools/js-optimizer.js')
-rw-r--r-- | tools/js-optimizer.js | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tools/js-optimizer.js b/tools/js-optimizer.js index c029ab4e..e567ebff 100644 --- a/tools/js-optimizer.js +++ b/tools/js-optimizer.js @@ -1728,6 +1728,15 @@ function getStackBumpSize(ast) { function registerize(ast) { traverseGeneratedFunctions(ast, function(fun) { if (asm) var asmData = normalizeAsm(fun); + if (!asm) { + var hasFunction = false; + traverse(fun, function(node, type) { + if (type === 'function') hasFunction = true; + }); + if (hasFunction) { + return; // inline assembly, and not asm (where we protect it in normalize/denormalize), so abort registerize pass + } + } // Add parameters as a first (fake) var (with assignment), so they get taken into consideration var params = {}; // note: params are special, they can never share a register between them (see later) if (fun[2] && fun[2].length) { |