| Index: src/mips/full-codegen-mips.cc
|
| diff --git a/src/mips/full-codegen-mips.cc b/src/mips/full-codegen-mips.cc
|
| index 51c0157a438629b94d9687f7043059aeadc44e96..5e3fe80bbbace3cc90bd1611ea49021d5b18a550 100644
|
| --- a/src/mips/full-codegen-mips.cc
|
| +++ b/src/mips/full-codegen-mips.cc
|
| @@ -3888,25 +3888,25 @@ void FullCodeGenerator::EmitValueOf(CallRuntime* expr) {
|
| }
|
|
|
|
|
| -void FullCodeGenerator::EmitThrowIfNotADate(CallRuntime* expr) {
|
| +void FullCodeGenerator::EmitIsDate(CallRuntime* expr) {
|
| ZoneList<Expression*>* args = expr->arguments();
|
| DCHECK_EQ(1, args->length());
|
|
|
| - VisitForAccumulatorValue(args->at(0)); // Load the object.
|
| + VisitForAccumulatorValue(args->at(0));
|
|
|
| - Label done, not_date_object;
|
| - Register object = v0;
|
| - Register result = v0;
|
| - Register scratch1 = a1;
|
| + Label materialize_true, materialize_false;
|
| + Label* if_true = nullptr;
|
| + Label* if_false = nullptr;
|
| + Label* fall_through = nullptr;
|
| + context()->PrepareTest(&materialize_true, &materialize_false, &if_true,
|
| + &if_false, &fall_through);
|
|
|
| - __ JumpIfSmi(object, ¬_date_object);
|
| - __ GetObjectType(object, scratch1, scratch1);
|
| - __ Branch(&done, eq, scratch1, Operand(JS_DATE_TYPE));
|
| - __ bind(¬_date_object);
|
| - __ CallRuntime(Runtime::kThrowNotDateError, 0);
|
| + __ JumpIfSmi(v0, if_false);
|
| + __ GetObjectType(v0, a1, a1);
|
| + PrepareForBailoutBeforeSplit(expr, true, if_true, if_false);
|
| + Split(eq, a1, Operand(JS_DATE_TYPE), if_true, if_false, fall_through);
|
|
|
| - __ bind(&done);
|
| - context()->Plug(result);
|
| + context()->Plug(if_true, if_false);
|
| }
|
|
|
|
|
|
|