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

Side by Side Diff: src/x87/lithium-codegen-x87.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, 10 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/x64/lithium-codegen-x64.cc ('k') | no next file » | 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 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #if V8_TARGET_ARCH_X87 7 #if V8_TARGET_ARCH_X87
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 3490 matching lines...) Expand 10 before | Expand all | Expand 10 after
3501 3501
3502 void LCodeGen::DoLoadKeyedGeneric(LLoadKeyedGeneric* instr) { 3502 void LCodeGen::DoLoadKeyedGeneric(LLoadKeyedGeneric* instr) {
3503 DCHECK(ToRegister(instr->context()).is(esi)); 3503 DCHECK(ToRegister(instr->context()).is(esi));
3504 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister())); 3504 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister()));
3505 DCHECK(ToRegister(instr->key()).is(LoadDescriptor::NameRegister())); 3505 DCHECK(ToRegister(instr->key()).is(LoadDescriptor::NameRegister()));
3506 3506
3507 if (FLAG_vector_ics) { 3507 if (FLAG_vector_ics) {
3508 EmitVectorLoadICRegisters<LLoadKeyedGeneric>(instr); 3508 EmitVectorLoadICRegisters<LLoadKeyedGeneric>(instr);
3509 } 3509 }
3510 3510
3511 Handle<Code> ic = CodeFactory::KeyedLoadICInOptimizedCode(isolate()).code(); 3511 Handle<Code> ic =
3512 CodeFactory::KeyedLoadICInOptimizedCode(
3513 isolate(), instr->hydrogen()->initialization_state()).code();
3512 CallCode(ic, RelocInfo::CODE_TARGET, instr); 3514 CallCode(ic, RelocInfo::CODE_TARGET, instr);
3513 } 3515 }
3514 3516
3515 3517
3516 void LCodeGen::DoArgumentsElements(LArgumentsElements* instr) { 3518 void LCodeGen::DoArgumentsElements(LArgumentsElements* instr) {
3517 Register result = ToRegister(instr->result()); 3519 Register result = ToRegister(instr->result());
3518 3520
3519 if (instr->hydrogen()->from_inlined()) { 3521 if (instr->hydrogen()->from_inlined()) {
3520 __ lea(result, Operand(esp, -2 * kPointerSize)); 3522 __ lea(result, Operand(esp, -2 * kPointerSize));
3521 } else { 3523 } else {
(...skipping 1276 matching lines...) Expand 10 before | Expand all | Expand 10 after
4798 } 4800 }
4799 } 4801 }
4800 4802
4801 4803
4802 void LCodeGen::DoStoreKeyedGeneric(LStoreKeyedGeneric* instr) { 4804 void LCodeGen::DoStoreKeyedGeneric(LStoreKeyedGeneric* instr) {
4803 DCHECK(ToRegister(instr->context()).is(esi)); 4805 DCHECK(ToRegister(instr->context()).is(esi));
4804 DCHECK(ToRegister(instr->object()).is(StoreDescriptor::ReceiverRegister())); 4806 DCHECK(ToRegister(instr->object()).is(StoreDescriptor::ReceiverRegister()));
4805 DCHECK(ToRegister(instr->key()).is(StoreDescriptor::NameRegister())); 4807 DCHECK(ToRegister(instr->key()).is(StoreDescriptor::NameRegister()));
4806 DCHECK(ToRegister(instr->value()).is(StoreDescriptor::ValueRegister())); 4808 DCHECK(ToRegister(instr->value()).is(StoreDescriptor::ValueRegister()));
4807 4809
4808 Handle<Code> ic = 4810 Handle<Code> ic = CodeFactory::KeyedStoreICInOptimizedCode(
4809 CodeFactory::KeyedStoreIC(isolate(), instr->language_mode()).code(); 4811 isolate(), instr->language_mode(),
4812 instr->hydrogen()->initialization_state()).code();
4810 CallCode(ic, RelocInfo::CODE_TARGET, instr); 4813 CallCode(ic, RelocInfo::CODE_TARGET, instr);
4811 } 4814 }
4812 4815
4813 4816
4814 void LCodeGen::DoTrapAllocationMemento(LTrapAllocationMemento* instr) { 4817 void LCodeGen::DoTrapAllocationMemento(LTrapAllocationMemento* instr) {
4815 Register object = ToRegister(instr->object()); 4818 Register object = ToRegister(instr->object());
4816 Register temp = ToRegister(instr->temp()); 4819 Register temp = ToRegister(instr->temp());
4817 Label no_memento_found; 4820 Label no_memento_found;
4818 __ TestJSArrayForAllocationMemento(object, temp, &no_memento_found); 4821 __ TestJSArrayForAllocationMemento(object, temp, &no_memento_found);
4819 DeoptimizeIf(equal, instr, Deoptimizer::kMementoFound); 4822 DeoptimizeIf(equal, instr, Deoptimizer::kMementoFound);
(...skipping 1564 matching lines...) Expand 10 before | Expand all | Expand 10 after
6384 CallRuntime(Runtime::kPushBlockContext, 2, instr); 6387 CallRuntime(Runtime::kPushBlockContext, 2, instr);
6385 RecordSafepoint(Safepoint::kNoLazyDeopt); 6388 RecordSafepoint(Safepoint::kNoLazyDeopt);
6386 } 6389 }
6387 6390
6388 6391
6389 #undef __ 6392 #undef __
6390 6393
6391 } } // namespace v8::internal 6394 } } // namespace v8::internal
6392 6395
6393 #endif // V8_TARGET_ARCH_X87 6396 #endif // V8_TARGET_ARCH_X87
OLDNEW
« no previous file with comments | « src/x64/lithium-codegen-x64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698