diff options
author | Alon Zakai <alonzakai@gmail.com> | 2011-11-18 18:52:56 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2011-11-18 18:52:56 -0800 |
commit | cc86495ebd83005e1f63bfa12b90d903d7ac7b66 (patch) | |
tree | 8fbc5fce9292e9aab28d1e9048af2248a0b54908 /src/analyzer.js | |
parent | 6fe6d4c2e43a7b2637c9cace06c7ef3f21018f0d (diff) |
support reaching phi from invoke, and a workaround with vars in phi sets for closure compiler
Diffstat (limited to 'src/analyzer.js')
-rw-r--r-- | src/analyzer.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/analyzer.js b/src/analyzer.js index c8e31dea..0c362eff 100644 --- a/src/analyzer.js +++ b/src/analyzer.js @@ -628,7 +628,7 @@ function analyzer(data) { var sourceLabelId = phi.params[i].label; var sourceLabel = func.labelsDict[sourceLabelId]; var lastLine = sourceLabel.lines.slice(-1)[0]; - assert(lastLine.intertype in LLVM.BRANCHINGS, 'Only branches can lead to labels with phis, line ' + [func.ident, label.ident]); + assert(lastLine.intertype in LLVM.PHI_REACHERS, 'Only some can lead to labels with phis, line ' + [func.ident, label.ident]); lastLine.currLabelId = sourceLabelId; } phis.push(line); @@ -671,7 +671,7 @@ function analyzer(data) { var sourceLabelId = param.label; var sourceLabel = func.labelsDict[sourceLabelId]; var lastLine = sourceLabel.lines.slice(-1)[0]; - assert(lastLine.intertype in LLVM.BRANCHINGS, 'Only branches can lead to labels with phis, line ' + [func.ident, label.ident]); + assert(lastLine.intertype in LLVM.PHI_REACHERS, 'Only some can lead to labels with phis, line ' + [func.ident, label.ident]); if (!lastLine.phi) { // We store the phi assignments in the branch's params (which are otherwise unused) lastLine.phi = true; |