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

Side by Side Diff: src/arm/lithium-codegen-arm.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 | « no previous file | src/arm64/lithium-codegen-arm64.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 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/arm/lithium-codegen-arm.h" 7 #include "src/arm/lithium-codegen-arm.h"
8 #include "src/arm/lithium-gap-resolver-arm.h" 8 #include "src/arm/lithium-gap-resolver-arm.h"
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 3434 matching lines...) Expand 10 before | Expand all | Expand 10 after
3445 3445
3446 void LCodeGen::DoLoadKeyedGeneric(LLoadKeyedGeneric* instr) { 3446 void LCodeGen::DoLoadKeyedGeneric(LLoadKeyedGeneric* instr) {
3447 DCHECK(ToRegister(instr->context()).is(cp)); 3447 DCHECK(ToRegister(instr->context()).is(cp));
3448 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister())); 3448 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister()));
3449 DCHECK(ToRegister(instr->key()).is(LoadDescriptor::NameRegister())); 3449 DCHECK(ToRegister(instr->key()).is(LoadDescriptor::NameRegister()));
3450 3450
3451 if (FLAG_vector_ics) { 3451 if (FLAG_vector_ics) {
3452 EmitVectorLoadICRegisters<LLoadKeyedGeneric>(instr); 3452 EmitVectorLoadICRegisters<LLoadKeyedGeneric>(instr);
3453 } 3453 }
3454 3454
3455 Handle<Code> ic = CodeFactory::KeyedLoadICInOptimizedCode(isolate()).code(); 3455 Handle<Code> ic =
3456 CodeFactory::KeyedLoadICInOptimizedCode(
3457 isolate(), instr->hydrogen()->initialization_state()).code();
3456 CallCode(ic, RelocInfo::CODE_TARGET, instr, NEVER_INLINE_TARGET_ADDRESS); 3458 CallCode(ic, RelocInfo::CODE_TARGET, instr, NEVER_INLINE_TARGET_ADDRESS);
3457 } 3459 }
3458 3460
3459 3461
3460 void LCodeGen::DoArgumentsElements(LArgumentsElements* instr) { 3462 void LCodeGen::DoArgumentsElements(LArgumentsElements* instr) {
3461 Register scratch = scratch0(); 3463 Register scratch = scratch0();
3462 Register result = ToRegister(instr->result()); 3464 Register result = ToRegister(instr->result());
3463 3465
3464 if (instr->hydrogen()->from_inlined()) { 3466 if (instr->hydrogen()->from_inlined()) {
3465 __ sub(result, sp, Operand(2 * kPointerSize)); 3467 __ sub(result, sp, Operand(2 * kPointerSize));
(...skipping 1063 matching lines...) Expand 10 before | Expand all | Expand 10 after
4529 } 4531 }
4530 } 4532 }
4531 4533
4532 4534
4533 void LCodeGen::DoStoreKeyedGeneric(LStoreKeyedGeneric* instr) { 4535 void LCodeGen::DoStoreKeyedGeneric(LStoreKeyedGeneric* instr) {
4534 DCHECK(ToRegister(instr->context()).is(cp)); 4536 DCHECK(ToRegister(instr->context()).is(cp));
4535 DCHECK(ToRegister(instr->object()).is(StoreDescriptor::ReceiverRegister())); 4537 DCHECK(ToRegister(instr->object()).is(StoreDescriptor::ReceiverRegister()));
4536 DCHECK(ToRegister(instr->key()).is(StoreDescriptor::NameRegister())); 4538 DCHECK(ToRegister(instr->key()).is(StoreDescriptor::NameRegister()));
4537 DCHECK(ToRegister(instr->value()).is(StoreDescriptor::ValueRegister())); 4539 DCHECK(ToRegister(instr->value()).is(StoreDescriptor::ValueRegister()));
4538 4540
4539 Handle<Code> ic = 4541 Handle<Code> ic = CodeFactory::KeyedStoreICInOptimizedCode(
4540 CodeFactory::KeyedStoreIC(isolate(), instr->language_mode()).code(); 4542 isolate(), instr->language_mode(),
4543 instr->hydrogen()->initialization_state()).code();
4541 CallCode(ic, RelocInfo::CODE_TARGET, instr, NEVER_INLINE_TARGET_ADDRESS); 4544 CallCode(ic, RelocInfo::CODE_TARGET, instr, NEVER_INLINE_TARGET_ADDRESS);
4542 } 4545 }
4543 4546
4544 4547
4545 void LCodeGen::DoTransitionElementsKind(LTransitionElementsKind* instr) { 4548 void LCodeGen::DoTransitionElementsKind(LTransitionElementsKind* instr) {
4546 Register object_reg = ToRegister(instr->object()); 4549 Register object_reg = ToRegister(instr->object());
4547 Register scratch = scratch0(); 4550 Register scratch = scratch0();
4548 4551
4549 Handle<Map> from_map = instr->original_map(); 4552 Handle<Map> from_map = instr->original_map();
4550 Handle<Map> to_map = instr->transitioned_map(); 4553 Handle<Map> to_map = instr->transitioned_map();
(...skipping 1432 matching lines...) Expand 10 before | Expand all | Expand 10 after
5983 __ Push(scope_info); 5986 __ Push(scope_info);
5984 __ push(ToRegister(instr->function())); 5987 __ push(ToRegister(instr->function()));
5985 CallRuntime(Runtime::kPushBlockContext, 2, instr); 5988 CallRuntime(Runtime::kPushBlockContext, 2, instr);
5986 RecordSafepoint(Safepoint::kNoLazyDeopt); 5989 RecordSafepoint(Safepoint::kNoLazyDeopt);
5987 } 5990 }
5988 5991
5989 5992
5990 #undef __ 5993 #undef __
5991 5994
5992 } } // namespace v8::internal 5995 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/arm64/lithium-codegen-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698