Index: src/full-codegen/mips64/full-codegen-mips64.cc |
diff --git a/src/full-codegen/mips64/full-codegen-mips64.cc b/src/full-codegen/mips64/full-codegen-mips64.cc |
index 10e4580411ee9ae4802476306556a17d82516131..048e01c15933b5ce9780990974d3aafa465f3ac6 100644 |
--- a/src/full-codegen/mips64/full-codegen-mips64.cc |
+++ b/src/full-codegen/mips64/full-codegen-mips64.cc |
@@ -3993,6 +3993,41 @@ void FullCodeGenerator::EmitNumberToString(CallRuntime* expr) { |
} |
+void FullCodeGenerator::EmitToString(CallRuntime* expr) { |
+ ZoneList<Expression*>* args = expr->arguments(); |
+ DCHECK_EQ(1, args->length()); |
+ |
+ // Load the argument into a0 and convert it. |
+ VisitForAccumulatorValue(args->at(0)); |
+ __ mov(a0, result_register()); |
+ |
+ ToStringStub stub(isolate()); |
+ __ CallStub(&stub); |
+ context()->Plug(v0); |
+} |
+ |
+ |
+void FullCodeGenerator::EmitToName(CallRuntime* expr) { |
+ ZoneList<Expression*>* args = expr->arguments(); |
+ DCHECK_EQ(1, args->length()); |
+ |
+ // Load the argument into v0 and convert it. |
+ VisitForAccumulatorValue(args->at(0)); |
+ |
+ Label convert, done_convert; |
+ __ JumpIfSmi(v0, &convert); |
+ STATIC_ASSERT(FIRST_NAME_TYPE == FIRST_TYPE); |
+ __ GetObjectType(v0, a1, a1); |
+ __ Branch(&done_convert, le, a1, Operand(LAST_NAME_TYPE)); |
+ __ bind(&convert); |
+ ToStringStub stub(isolate()); |
+ __ mov(a0, v0); |
+ __ CallStub(&stub); |
+ __ bind(&done_convert); |
+ context()->Plug(v0); |
+} |
+ |
+ |
void FullCodeGenerator::EmitToObject(CallRuntime* expr) { |
ZoneList<Expression*>* args = expr->arguments(); |
DCHECK_EQ(1, args->length()); |