| Index: src/x64/lithium-codegen-x64.cc
|
| diff --git a/src/x64/lithium-codegen-x64.cc b/src/x64/lithium-codegen-x64.cc
|
| index cf2c1b01df86d61ad1d0908f650bd419db7e2a26..66910aa62d7a38df10de59b92a9a88ce5afa770e 100644
|
| --- a/src/x64/lithium-codegen-x64.cc
|
| +++ b/src/x64/lithium-codegen-x64.cc
|
| @@ -1224,6 +1224,47 @@ void LCodeGen::DoValueOf(LValueOf* instr) {
|
| }
|
|
|
|
|
| +void LCodeGen::DoDateField(LDateField* instr) {
|
| + Register input = ToRegister(instr->InputAt(0));
|
| + Register result = ToRegister(instr->result());
|
| + ASSERT(input.is(result));
|
| +
|
| +#ifdef DEBUG
|
| + __ AbortIfSmi(input);
|
| + __ CmpObjectType(input, JS_DATE_TYPE, kScratchRegister);
|
| + __ Assert(equal, "Trying to get date field from non-date.");
|
| +#endif
|
| +
|
| + __ movq(result, FieldOperand(input,
|
| + JSDate::kValueOffset + kPointerSize * instr->index()));
|
| +}
|
| +
|
| +
|
| +void LCodeGen::DoSetDateField(LSetDateField* instr) {
|
| + Register date = ToRegister(instr->InputAt(0));
|
| + Register value = ToRegister(instr->InputAt(1));
|
| + Register result = ToRegister(instr->result());
|
| + int index = instr->index();
|
| +
|
| +#ifdef DEBUG
|
| + __ AbortIfSmi(date);
|
| + __ CmpObjectType(date, JS_DATE_TYPE, kScratchRegister);
|
| + __ Assert(equal, "Trying to get date field from non-date.");
|
| +#endif
|
| +
|
| + __ movq(FieldOperand(date, JSDate::kValueOffset + kPointerSize * index),
|
| + value);
|
| + // Caches can only be smi or NaN, so we can skip the write barrier for them.
|
| + if (index < JSDate::kFirstBarrierFree) {
|
| + // Update the write barrier. Save the value as it will be
|
| + // overwritten by the write barrier code and is needed afterward.
|
| + __ movq(result, value);
|
| + __ RecordWriteField(date, JSDate::kValueOffset + kPointerSize * index,
|
| + value, kScratchRegister, kDontSaveFPRegs);
|
| + }
|
| +}
|
| +
|
| +
|
| void LCodeGen::DoBitNotI(LBitNotI* instr) {
|
| LOperand* input = instr->InputAt(0);
|
| ASSERT(input->Equals(instr->result()));
|
|
|