1.1 --- a/jitcraft/BytecodeCompiler.cpp Wed Jul 18 21:46:29 2012 -0700
1.2 +++ b/jitcraft/BytecodeCompiler.cpp Wed Jul 18 22:02:11 2012 -0700
1.3 @@ -800,6 +800,21 @@
1.4 }
1.5
1.6 void
1.7 +BytecodeCompiler::visit(TernaryExpression *node)
1.8 +{
1.9 + Label success, failure, join;
1.10 +
1.11 + visitForTest(node->condition(), &success, &failure, &success);
1.12 + __ bind(&success);
1.13 + node->left()->accept(this);
1.14 + __ drop(1);
1.15 + __ jump(&join);
1.16 + __ bind(&failure);
1.17 + node->right()->accept(this);
1.18 + __ bind(&join);
1.19 +}
1.20 +
1.21 +void
1.22 BytecodeCompiler::visit(IfStatement *node)
1.23 {
1.24 Label join;