Index: src/full-codegen/arm64/full-codegen-arm64.cc |
diff --git a/src/full-codegen/arm64/full-codegen-arm64.cc b/src/full-codegen/arm64/full-codegen-arm64.cc |
index 484cf1e8d3e4b62585cb931e74a0bd307091c08e..43e2b9f55b5a27c5d2df93b559a46bb3e0e1cc93 100644 |
--- a/src/full-codegen/arm64/full-codegen-arm64.cc |
+++ b/src/full-codegen/arm64/full-codegen-arm64.cc |
@@ -3476,6 +3476,23 @@ void FullCodeGenerator::EmitSetValueOf(CallRuntime* expr) { |
} |
+void FullCodeGenerator::EmitToInteger(CallRuntime* expr) { |
+ ZoneList<Expression*>* args = expr->arguments(); |
+ DCHECK_EQ(1, args->length()); |
+ |
+ // Load the argument into x0 and convert it. |
+ VisitForAccumulatorValue(args->at(0)); |
+ |
+ // Convert the object to an integer. |
+ Label done_convert; |
+ __ JumpIfSmi(x0, &done_convert); |
+ __ Push(x0); |
+ __ CallRuntime(Runtime::kToInteger, 1); |
+ __ bind(&done_convert); |
+ context()->Plug(x0); |
+} |
+ |
+ |
void FullCodeGenerator::EmitNumberToString(CallRuntime* expr) { |
ZoneList<Expression*>* args = expr->arguments(); |
DCHECK_EQ(args->length(), 1); |