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/analyzer.js | |
parent | cc86495ebd83005e1f63bfa12b90d903d7ac7b66 (diff) |
fix for phis from invoke
Diffstat (limited to 'src/analyzer.js')
-rw-r--r-- | src/analyzer.js | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/analyzer.js b/src/analyzer.js index 0c362eff..d8439a99 100644 --- a/src/analyzer.js +++ b/src/analyzer.js @@ -673,12 +673,14 @@ function analyzer(data) { var lastLine = sourceLabel.lines.slice(-1)[0]; 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; - assert(!lastLine.params); - lastLine.params = []; + assert(!lastLine.dependent); + lastLine.dependent = { + intertype: 'phiassigns', + params: [] + }; }; - lastLine.params.push({ + lastLine.dependent.params.push({ intertype: 'phiassign', ident: line.ident, value: param.value, |