1.1 --- a/jitcraft/BytecodeCompiler.cpp Sat Jun 30 22:34:48 2012 -0700
1.2 +++ b/jitcraft/BytecodeCompiler.cpp Sat Jun 30 22:45:25 2012 -0700
1.3 @@ -149,7 +149,6 @@
1.4 }
1.5 }
1.6 }
1.7 -
1.8 break;
1.9 }
1.10
1.11 @@ -179,14 +178,8 @@
1.12 Variable *var = proxy->binding()->toVariable();
1.13
1.14 // Make sure to bind the left-hand side first.
1.15 - if (var->type()->isReference()) {
1.16 - if (var->location() == Variable::STACK) {
1.17 - __ getlocal(var->slot());
1.18 - } else {
1.19 - assert(var->location() == Variable::PARAMETER);
1.20 - __ getarg(var->slot());
1.21 - }
1.22 - }
1.23 + if (var->type()->isReference())
1.24 + __ get(var);
1.25
1.26 node->expression()->accept(this);
1.27
1.28 @@ -198,12 +191,7 @@
1.29 __ setref_i();
1.30 }
1.31 } else {
1.32 - if (var->location() == Variable::STACK) {
1.33 - __ setlocal(var->slot());
1.34 - } else {
1.35 - assert(var->location() == Variable::PARAMETER);
1.36 - __ setarg(var->slot());
1.37 - }
1.38 + __ set(var);
1.39 }
1.40 } else if (node->lvalue()->isIndexExpression()) {
1.41 IndexExpression *index = node->lvalue()->toIndexExpression();
1.42 @@ -463,6 +451,7 @@
1.43 // We don't know how to, or can't, build a direct reference to
1.44 // this type. Make an indirect one, by taking the top of the
1.45 // stack and boxing it up.
1.46 + arg->accept(this);
1.47 __ slotref_lifo();
1.48 }
1.49 } else {