diff options
author | Alon Zakai <alonzakai@gmail.com> | 2011-11-19 09:57:57 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2011-11-19 09:57:57 -0800 |
commit | 0af3502cde9a78f23e898264ed3a59ff88816541 (patch) | |
tree | 2c626192dc6c019a3cf308fdf0d819fe2a1e2643 /src/jsifier.js | |
parent | cc86495ebd83005e1f63bfa12b90d903d7ac7b66 (diff) |
fix for phis from invoke
Diffstat (limited to 'src/jsifier.js')
-rw-r--r-- | src/jsifier.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/jsifier.js b/src/jsifier.js index 9cf7e1e0..b7d7a6a6 100644 --- a/src/jsifier.js +++ b/src/jsifier.js @@ -704,7 +704,7 @@ function JSify(data, functionsOnly, givenFunctions, givenGlobalVariables) { function calcPhiSets(item) { if (!item.phi) return null; var phiSets = {}; - item.params.forEach(function(param) { + item.dependent.params.forEach(function(param) { if (!phiSets[param.targetLabel]) phiSets[param.targetLabel] = []; phiSets[param.targetLabel].push(param); param.valueJS = finalizeLLVMParameter(param.value); @@ -713,8 +713,9 @@ function JSify(data, functionsOnly, givenFunctions, givenGlobalVariables) { } function getPhiSetsForLabel(phiSets, label) { + if (!phiSets) return ''; label = getOldLabel(label); - if (!phiSets || !phiSets[label]) return ''; + if (!phiSets[label]) return ''; var labelSets = phiSets[label]; // FIXME: Many of the |var |s here are not needed, but without them we get slowdowns with closure compiler. TODO: remove this workaround. if (labelSets.length == 1) { |