Index: src/full-codegen/x64/full-codegen-x64.cc |
diff --git a/src/full-codegen/x64/full-codegen-x64.cc b/src/full-codegen/x64/full-codegen-x64.cc |
index 0133c09d6e7d78b618b095073c09f9e05d52cb42..254a7e21b5fca1d3547d5b514bc7c3447a01df30 100644 |
--- a/src/full-codegen/x64/full-codegen-x64.cc |
+++ b/src/full-codegen/x64/full-codegen-x64.cc |
@@ -3703,6 +3703,19 @@ void FullCodeGenerator::EmitToString(CallRuntime* expr) { |
} |
+void FullCodeGenerator::EmitToNumber(CallRuntime* expr) { |
+ ZoneList<Expression*>* args = expr->arguments(); |
+ DCHECK_EQ(1, args->length()); |
+ |
+ // Load the argument into rax and convert it. |
+ VisitForAccumulatorValue(args->at(0)); |
+ |
+ ToNumberStub stub(isolate()); |
+ __ CallStub(&stub); |
+ context()->Plug(rax); |
+} |
+ |
+ |
void FullCodeGenerator::EmitToName(CallRuntime* expr) { |
ZoneList<Expression*>* args = expr->arguments(); |
DCHECK_EQ(1, args->length()); |