aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2011-11-26 10:34:28 -0800
committerAlon Zakai <alonzakai@gmail.com>2011-11-26 10:34:28 -0800
commit569c804ab9dd702e3b9f255b7bcff4881021b755 (patch)
treed447eb528499a0a0dd1a491ea34df15651cdfa00 /src
parent06b58cbbe006f77471ca08e88e08c019641750be (diff)
comment on byval
Diffstat (limited to 'src')
-rw-r--r--src/jsifier.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/jsifier.js b/src/jsifier.js
index 67221c97..c6a58148 100644
--- a/src/jsifier.js
+++ b/src/jsifier.js
@@ -450,6 +450,12 @@ function JSify(data, functionsOnly, givenFunctions, givenGlobalVariables) {
func.JS += ' ' + RuntimeGenerator.stackEnter(func.initialStack) + ';\n';
// Make copies of by-value params
+ // XXX It is not clear we actually need this. While without this we fail, it does look like
+ // Clang normally does the copy itself, in the calling function. We only need this code
+ // when Clang optimizes the code and passes the original, not the copy, to the other
+ // function. But Clang still copies, the copy is just unused! Need to figure out if that
+ // is caused by our running just some optimizations (the safe ones), or if its a bug
+ // in Clang, or a bug in our understanding of the IR.
func.params.forEach(function(param) {
if (param.byVal) {
var type = removePointing(param.type);