Index: src/full-codegen/s390/full-codegen-s390.cc |
diff --git a/src/full-codegen/s390/full-codegen-s390.cc b/src/full-codegen/s390/full-codegen-s390.cc |
index 736808aeb3c86c3bcea44fe58e79c8e57d3d470d..e5ecc7138abc54381af5c705c960808d6ef65b4f 100644 |
--- a/src/full-codegen/s390/full-codegen-s390.cc |
+++ b/src/full-codegen/s390/full-codegen-s390.cc |
@@ -2786,6 +2786,23 @@ |
context()->Plug(r2); |
} |
+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(r2, &done); |
+ // If the object is not a value type, return the object. |
+ __ CompareObjectType(r2, r3, r3, JS_VALUE_TYPE); |
+ __ bne(&done, Label::kNear); |
+ __ LoadP(r2, FieldMemOperand(r2, JSValue::kValueOffset)); |
+ |
+ __ bind(&done); |
+ context()->Plug(r2); |
+} |
+ |
void FullCodeGenerator::EmitStringCharFromCode(CallRuntime* expr) { |
ZoneList<Expression*>* args = expr->arguments(); |
DCHECK(args->length() == 1); |