| 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 d1ec8f3c9d155964403c94b2f3451bf1d0965cda..ebaec584e3a04b04ec5f2acadf78831bc2561d05 100644
|
| --- a/src/full-codegen/mips64/full-codegen-mips64.cc
|
| +++ b/src/full-codegen/mips64/full-codegen-mips64.cc
|
| @@ -2855,6 +2855,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));
|
| +
|
| + __ ld(v0, FieldMemOperand(v0, JSValue::kValueOffset));
|
| +
|
| + __ bind(&done);
|
| context()->Plug(v0);
|
| }
|
|
|
|
|