| Index: src/arm/lithium-codegen-arm.cc
|
| diff --git a/src/arm/lithium-codegen-arm.cc b/src/arm/lithium-codegen-arm.cc
|
| index 630ae8dbd9c02139b453fae086d30a89607b1210..5084ac3853d27bc51436224c6e812023ea6a399f 100644
|
| --- a/src/arm/lithium-codegen-arm.cc
|
| +++ b/src/arm/lithium-codegen-arm.cc
|
| @@ -1438,6 +1438,39 @@ void LCodeGen::DoValueOf(LValueOf* instr) {
|
| }
|
|
|
|
|
| +void LCodeGen::DoDateField(LDateField* instr) {
|
| + Register object = ToRegister(instr->InputAt(0));
|
| + Register result = ToRegister(instr->result());
|
| + Register scratch = ToRegister(instr->TempAt(0));
|
| + Smi* index = instr->index();
|
| + Label runtime, done;
|
| + ASSERT(object.is(result));
|
| + ASSERT(object.is(r0));
|
| + ASSERT(!scratch.is(scratch0()));
|
| + ASSERT(!scratch.is(object));
|
| + if (index->value() == 0) {
|
| + __ ldr(result, FieldMemOperand(object, JSDate::kValueOffset));
|
| + } else {
|
| + if (index->value() < JSDate::kFirstUncachedField) {
|
| + ExternalReference stamp = ExternalReference::date_cache_stamp(isolate());
|
| + __ mov(scratch, Operand(stamp));
|
| + __ ldr(scratch, MemOperand(scratch));
|
| + __ ldr(scratch0(), FieldMemOperand(object, JSDate::kCacheStampOffset));
|
| + __ cmp(scratch, scratch0());
|
| + __ b(ne, &runtime);
|
| + __ ldr(result, FieldMemOperand(object, JSDate::kValueOffset +
|
| + kPointerSize * index->value()));
|
| + __ jmp(&done);
|
| + }
|
| + __ bind(&runtime);
|
| + __ PrepareCallCFunction(2, scratch);
|
| + __ mov(r1, Operand(index));
|
| + __ CallCFunction(ExternalReference::get_date_field_function(isolate()), 2);
|
| + __ bind(&done);
|
| + }
|
| +}
|
| +
|
| +
|
| void LCodeGen::DoBitNotI(LBitNotI* instr) {
|
| Register input = ToRegister(instr->InputAt(0));
|
| Register result = ToRegister(instr->result());
|
|
|