Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(189)

Side by Side Diff: src/full-codegen/x64/full-codegen-x64.cc

Issue 1567353002: [date] Migrate Date field accessors to native builtins. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Moar work. ports. Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/builtins.cc ('k') | src/ia32/builtins-ia32.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « src/builtins.cc ('k') | src/ia32/builtins-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698