Index: src/full-codegen/mips/full-codegen-mips.cc |
diff --git a/src/full-codegen/mips/full-codegen-mips.cc b/src/full-codegen/mips/full-codegen-mips.cc |
index 9baeff034af1f70dc7ff548c141747333deb61ac..dde04b63d7d430d486ef273ab345839e4baa0073 100644 |
--- a/src/full-codegen/mips/full-codegen-mips.cc |
+++ b/src/full-codegen/mips/full-codegen-mips.cc |
@@ -3990,6 +3990,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()); |