Fix evaluation of paths and subexprs

Fixes #743
This commit is contained in:
kpdecker
2014-03-05 17:49:39 -06:00
parent 058c0fb6ba
commit 55782f08c5
3 changed files with 25 additions and 8 deletions
+1 -3
View File
@@ -372,9 +372,7 @@ Compiler.prototype = {
},
pushParams: function(params) {
var i = params.length;
while(i--) {
for(var i=0, l=params.length; i<l; i++) {
this.pushParam(params[i]);
}
},
@@ -915,16 +915,19 @@ JavaScriptCompiler.prototype = {
options.inverse = inverse;
}
for (var i = 0; i < paramSize; i++) {
// The parameters go on to the stack in order (making sure that they are evaluated in order)
// so we need to pop them off the stack in reverse order
var i = paramSize;
while (i--) {
param = this.popStack();
params.push(param);
params[i] = param;
if (this.trackIds) {
ids.push(this.popStack());
ids[i] = this.popStack();
}
if (this.stringParams) {
types.push(this.popStack());
contexts.push(this.popStack());
types[i] = this.popStack();
contexts[i] = this.popStack();
}
}