| Index: src/arm64/full-codegen-arm64.cc
|
| diff --git a/src/arm64/full-codegen-arm64.cc b/src/arm64/full-codegen-arm64.cc
|
| index bdc025876c39ee5ca5ac7b485291c419e357376f..ea2582241b39e9e1067aa5ee9c46f11e272bd275 100644
|
| --- a/src/arm64/full-codegen-arm64.cc
|
| +++ b/src/arm64/full-codegen-arm64.cc
|
| @@ -3614,23 +3614,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 = x0;
|
| - Register result = x0;
|
| + 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);
|
| - __ JumpIfObjectType(object, x10, x10, JS_DATE_TYPE, &done);
|
| - __ Bind(¬_date_object);
|
| - __ CallRuntime(Runtime::kThrowNotDateError, 0);
|
| + __ JumpIfSmi(x0, if_false);
|
| + __ CompareObjectType(x0, x10, x11, JS_DATE_TYPE);
|
| + PrepareForBailoutBeforeSplit(expr, true, if_true, if_false);
|
| + Split(eq, if_true, if_false, fall_through);
|
|
|
| - __ Bind(&done);
|
| - context()->Plug(result);
|
| + context()->Plug(if_true, if_false);
|
| }
|
|
|
|
|
|
|