| Index: src/crankshaft/arm64/lithium-codegen-arm64.cc
|
| diff --git a/src/crankshaft/arm64/lithium-codegen-arm64.cc b/src/crankshaft/arm64/lithium-codegen-arm64.cc
|
| index 62333ae8954d3a1a657bff082ed37b1559e22b5c..2f34d33825490ba6c7c7ba80fab55b3ef233d92b 100644
|
| --- a/src/crankshaft/arm64/lithium-codegen-arm64.cc
|
| +++ b/src/crankshaft/arm64/lithium-codegen-arm64.cc
|
| @@ -2513,6 +2513,40 @@
|
| LEnvironment* env = instr->environment();
|
| RegisterEnvironmentForDeoptimization(env, Safepoint::kLazyDeopt);
|
| safepoints_.RecordLazyDeoptimizationIndex(env->deoptimization_index());
|
| +}
|
| +
|
| +
|
| +void LCodeGen::DoDateField(LDateField* instr) {
|
| + Register object = ToRegister(instr->date());
|
| + Register result = ToRegister(instr->result());
|
| + Register temp1 = x10;
|
| + Register temp2 = x11;
|
| + Smi* index = instr->index();
|
| +
|
| + DCHECK(object.is(result) && object.Is(x0));
|
| + DCHECK(instr->IsMarkedAsCall());
|
| +
|
| + if (index->value() == 0) {
|
| + __ Ldr(result, FieldMemOperand(object, JSDate::kValueOffset));
|
| + } else {
|
| + Label runtime, done;
|
| + if (index->value() < JSDate::kFirstUncachedField) {
|
| + ExternalReference stamp = ExternalReference::date_cache_stamp(isolate());
|
| + __ Mov(temp1, Operand(stamp));
|
| + __ Ldr(temp1, MemOperand(temp1));
|
| + __ Ldr(temp2, FieldMemOperand(object, JSDate::kCacheStampOffset));
|
| + __ Cmp(temp1, temp2);
|
| + __ B(ne, &runtime);
|
| + __ Ldr(result, FieldMemOperand(object, JSDate::kValueOffset +
|
| + kPointerSize * index->value()));
|
| + __ B(&done);
|
| + }
|
| +
|
| + __ Bind(&runtime);
|
| + __ Mov(x1, Operand(index));
|
| + __ CallCFunction(ExternalReference::get_date_field_function(isolate()), 2);
|
| + __ Bind(&done);
|
| + }
|
| }
|
|
|
|
|
|
|