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

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

Issue 945313003: emit premonomorphic ics for keyed loads/stores in optimized code (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 9 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/mips64/lithium-codegen-mips64.cc ('k') | src/x87/lithium-codegen-x87.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #if V8_TARGET_ARCH_X64 7 #if V8_TARGET_ARCH_X64
8 8
9 #include "src/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/code-factory.h" 10 #include "src/code-factory.h"
(...skipping 3295 matching lines...) Expand 10 before | Expand all | Expand 10 after
3306 3306
3307 void LCodeGen::DoLoadKeyedGeneric(LLoadKeyedGeneric* instr) { 3307 void LCodeGen::DoLoadKeyedGeneric(LLoadKeyedGeneric* instr) {
3308 DCHECK(ToRegister(instr->context()).is(rsi)); 3308 DCHECK(ToRegister(instr->context()).is(rsi));
3309 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister())); 3309 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister()));
3310 DCHECK(ToRegister(instr->key()).is(LoadDescriptor::NameRegister())); 3310 DCHECK(ToRegister(instr->key()).is(LoadDescriptor::NameRegister()));
3311 3311
3312 if (FLAG_vector_ics) { 3312 if (FLAG_vector_ics) {
3313 EmitVectorLoadICRegisters<LLoadKeyedGeneric>(instr); 3313 EmitVectorLoadICRegisters<LLoadKeyedGeneric>(instr);
3314 } 3314 }
3315 3315
3316 Handle<Code> ic = CodeFactory::KeyedLoadICInOptimizedCode(isolate()).code(); 3316 Handle<Code> ic =
3317 CodeFactory::KeyedLoadICInOptimizedCode(
3318 isolate(), instr->hydrogen()->initialization_state()).code();
3317 CallCode(ic, RelocInfo::CODE_TARGET, instr); 3319 CallCode(ic, RelocInfo::CODE_TARGET, instr);
3318 } 3320 }
3319 3321
3320 3322
3321 void LCodeGen::DoArgumentsElements(LArgumentsElements* instr) { 3323 void LCodeGen::DoArgumentsElements(LArgumentsElements* instr) {
3322 Register result = ToRegister(instr->result()); 3324 Register result = ToRegister(instr->result());
3323 3325
3324 if (instr->hydrogen()->from_inlined()) { 3326 if (instr->hydrogen()->from_inlined()) {
3325 __ leap(result, Operand(rsp, -kFPOnStackSize + -kPCOnStackSize)); 3327 __ leap(result, Operand(rsp, -kFPOnStackSize + -kPCOnStackSize));
3326 } else { 3328 } else {
(...skipping 1200 matching lines...) Expand 10 before | Expand all | Expand 10 after
4527 } 4529 }
4528 } 4530 }
4529 4531
4530 4532
4531 void LCodeGen::DoStoreKeyedGeneric(LStoreKeyedGeneric* instr) { 4533 void LCodeGen::DoStoreKeyedGeneric(LStoreKeyedGeneric* instr) {
4532 DCHECK(ToRegister(instr->context()).is(rsi)); 4534 DCHECK(ToRegister(instr->context()).is(rsi));
4533 DCHECK(ToRegister(instr->object()).is(StoreDescriptor::ReceiverRegister())); 4535 DCHECK(ToRegister(instr->object()).is(StoreDescriptor::ReceiverRegister()));
4534 DCHECK(ToRegister(instr->key()).is(StoreDescriptor::NameRegister())); 4536 DCHECK(ToRegister(instr->key()).is(StoreDescriptor::NameRegister()));
4535 DCHECK(ToRegister(instr->value()).is(StoreDescriptor::ValueRegister())); 4537 DCHECK(ToRegister(instr->value()).is(StoreDescriptor::ValueRegister()));
4536 4538
4537 Handle<Code> ic = 4539 Handle<Code> ic = CodeFactory::KeyedStoreICInOptimizedCode(
4538 CodeFactory::KeyedStoreIC(isolate(), instr->language_mode()).code(); 4540 isolate(), instr->language_mode(),
4541 instr->hydrogen()->initialization_state()).code();
4539 CallCode(ic, RelocInfo::CODE_TARGET, instr); 4542 CallCode(ic, RelocInfo::CODE_TARGET, instr);
4540 } 4543 }
4541 4544
4542 4545
4543 void LCodeGen::DoTransitionElementsKind(LTransitionElementsKind* instr) { 4546 void LCodeGen::DoTransitionElementsKind(LTransitionElementsKind* instr) {
4544 Register object_reg = ToRegister(instr->object()); 4547 Register object_reg = ToRegister(instr->object());
4545 4548
4546 Handle<Map> from_map = instr->original_map(); 4549 Handle<Map> from_map = instr->original_map();
4547 Handle<Map> to_map = instr->transitioned_map(); 4550 Handle<Map> to_map = instr->transitioned_map();
4548 ElementsKind from_kind = instr->from_kind(); 4551 ElementsKind from_kind = instr->from_kind();
(...skipping 1387 matching lines...) Expand 10 before | Expand all | Expand 10 after
5936 CallRuntime(Runtime::kPushBlockContext, 2, instr); 5939 CallRuntime(Runtime::kPushBlockContext, 2, instr);
5937 RecordSafepoint(Safepoint::kNoLazyDeopt); 5940 RecordSafepoint(Safepoint::kNoLazyDeopt);
5938 } 5941 }
5939 5942
5940 5943
5941 #undef __ 5944 #undef __
5942 5945
5943 } } // namespace v8::internal 5946 } } // namespace v8::internal
5944 5947
5945 #endif // V8_TARGET_ARCH_X64 5948 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/mips64/lithium-codegen-mips64.cc ('k') | src/x87/lithium-codegen-x87.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698