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 acb1e0fe8d726b2ee40b75590ffddbb13cf1c808..45d081100957c89131d74d62be280a93cd047f33 100644 |
--- a/src/full-codegen/mips/full-codegen-mips.cc |
+++ b/src/full-codegen/mips/full-codegen-mips.cc |
@@ -2856,6 +2856,26 @@ |
// All done. |
__ bind(&done); |
+ context()->Plug(v0); |
+} |
+ |
+ |
+void FullCodeGenerator::EmitValueOf(CallRuntime* expr) { |
+ ZoneList<Expression*>* args = expr->arguments(); |
+ DCHECK(args->length() == 1); |
+ |
+ VisitForAccumulatorValue(args->at(0)); // Load the object. |
+ |
+ Label done; |
+ // If the object is a smi return the object. |
+ __ JumpIfSmi(v0, &done); |
+ // If the object is not a value type, return the object. |
+ __ GetObjectType(v0, a1, a1); |
+ __ Branch(&done, ne, a1, Operand(JS_VALUE_TYPE)); |
+ |
+ __ lw(v0, FieldMemOperand(v0, JSValue::kValueOffset)); |
+ |
+ __ bind(&done); |
context()->Plug(v0); |
} |