Index: src/x64/full-codegen-x64.cc |
=================================================================== |
--- src/x64/full-codegen-x64.cc (revision 3706) |
+++ src/x64/full-codegen-x64.cc (working copy) |
@@ -1464,6 +1464,20 @@ |
break; |
} |
+ case Token::ADD: { |
+ Comment cmt(masm_, "[ UnaryOperation (ADD)"); |
+ VisitForValue(expr->expression(), kAccumulator); |
+ Label no_conversion; |
+ Condition is_smi; |
+ is_smi = masm_->CheckSmi(result_register()); |
+ __ j(is_smi, &no_conversion); |
+ __ push(result_register()); |
+ __ InvokeBuiltin(Builtins::TO_NUMBER, CALL_FUNCTION); |
+ __ bind(&no_conversion); |
+ Apply(context_, result_register()); |
+ break; |
+ } |
+ |
default: |
UNREACHABLE(); |
} |