OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #if V8_TARGET_ARCH_X64 | 5 #if V8_TARGET_ARCH_X64 |
6 | 6 |
7 #include "src/ast/scopes.h" | 7 #include "src/ast/scopes.h" |
8 #include "src/code-factory.h" | 8 #include "src/code-factory.h" |
9 #include "src/code-stubs.h" | 9 #include "src/code-stubs.h" |
10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
(...skipping 3303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3314 __ AssertNotSmi(object); | 3314 __ AssertNotSmi(object); |
3315 __ CmpObjectType(object, JS_DATE_TYPE, scratch); | 3315 __ CmpObjectType(object, JS_DATE_TYPE, scratch); |
3316 __ Check(equal, kOperandIsNotADate); | 3316 __ Check(equal, kOperandIsNotADate); |
3317 } | 3317 } |
3318 | 3318 |
3319 if (index->value() == 0) { | 3319 if (index->value() == 0) { |
3320 __ movp(result, FieldOperand(object, JSDate::kValueOffset)); | 3320 __ movp(result, FieldOperand(object, JSDate::kValueOffset)); |
3321 } else { | 3321 } else { |
3322 Label runtime, done; | 3322 Label runtime, done; |
3323 if (index->value() < JSDate::kFirstUncachedField) { | 3323 if (index->value() < JSDate::kFirstUncachedField) { |
3324 ExternalReference stamp = ExternalReference::date_cache_stamp(isolate()); | 3324 __ Load(scratch, ExternalReference::date_cache_stamp(isolate())); |
3325 Operand stamp_operand = __ ExternalOperand(stamp); | |
3326 __ movp(scratch, stamp_operand); | |
3327 __ cmpp(scratch, FieldOperand(object, JSDate::kCacheStampOffset)); | 3325 __ cmpp(scratch, FieldOperand(object, JSDate::kCacheStampOffset)); |
3328 __ j(not_equal, &runtime, Label::kNear); | 3326 __ j(not_equal, &runtime, Label::kNear); |
3329 __ movp(result, FieldOperand(object, JSDate::kValueOffset + | 3327 __ movp(result, FieldOperand(object, JSDate::kValueOffset + |
3330 kPointerSize * index->value())); | 3328 kPointerSize * index->value())); |
3331 __ jmp(&done, Label::kNear); | 3329 __ jmp(&done, Label::kNear); |
3332 } | 3330 } |
3333 __ bind(&runtime); | 3331 __ bind(&runtime); |
3334 __ PrepareCallCFunction(2); | 3332 __ PrepareCallCFunction(2); |
3335 __ movp(arg_reg_1, object); | 3333 __ movp(arg_reg_1, object); |
3336 __ Move(arg_reg_2, index, Assembler::RelocInfoNone()); | 3334 __ Move(arg_reg_2, index, Assembler::RelocInfoNone()); |
(...skipping 1459 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4796 Assembler::target_address_at(call_target_address, | 4794 Assembler::target_address_at(call_target_address, |
4797 unoptimized_code)); | 4795 unoptimized_code)); |
4798 return OSR_AFTER_STACK_CHECK; | 4796 return OSR_AFTER_STACK_CHECK; |
4799 } | 4797 } |
4800 | 4798 |
4801 | 4799 |
4802 } // namespace internal | 4800 } // namespace internal |
4803 } // namespace v8 | 4801 } // namespace v8 |
4804 | 4802 |
4805 #endif // V8_TARGET_ARCH_X64 | 4803 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |