aboutsummaryrefslogtreecommitdiff
path: root/src/jsifier.js
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2011-11-19 09:57:57 -0800
committerAlon Zakai <alonzakai@gmail.com>2011-11-19 09:57:57 -0800
commit0af3502cde9a78f23e898264ed3a59ff88816541 (patch)
tree2c626192dc6c019a3cf308fdf0d819fe2a1e2643 /src/jsifier.js
parentcc86495ebd83005e1f63bfa12b90d903d7ac7b66 (diff)
fix for phis from invoke
Diffstat (limited to 'src/jsifier.js')
-rw-r--r--src/jsifier.js5
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) {