diff options
author | Alon Zakai <alonzakai@gmail.com> | 2012-12-05 20:48:17 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2012-12-07 14:23:23 -0800 |
commit | 58687c3327e0568c91aee7654c1290086bcab2a0 (patch) | |
tree | 8a0a01bbc443e0cef60d7383e46d7661ea4fe41e /src | |
parent | 1d4641ded68b5183af571c2421dbea7a615a0bcf (diff) |
standardize tempRet to start at 0
Diffstat (limited to 'src')
-rw-r--r-- | src/analyzer.js | 2 | ||||
-rw-r--r-- | src/parseTools.js | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/analyzer.js b/src/analyzer.js index cd7f6fea..4922a2f5 100644 --- a/src/analyzer.js +++ b/src/analyzer.js @@ -331,7 +331,7 @@ function analyzer(data, sidePass) { intertype: 'value', assignTo: element.ident, type: element.bits, - ident: 'tempRet' + (j++) + ident: 'tempRet' + (j++ - 1) }); assert(j<10); // TODO: dynamically create more than 10 tempRet-s } diff --git a/src/parseTools.js b/src/parseTools.js index 70692ac3..49740c6d 100644 --- a/src/parseTools.js +++ b/src/parseTools.js @@ -1556,7 +1556,7 @@ function makeLLVMStruct(values) { } function makeStructuralReturn(values) { - var i = 1; + var i = 0; return 'return (' + values.slice(1).map(function(value) { return 'tempRet' + (i++) + ' = ' + value; }).concat([values[0]]).join(',') + ')'; |