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

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

Issue 1087573003: X87: Remove unnecessary options from HTailCallThroughMegamorphicCache. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 8 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/x87/lithium-x87.h » ('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 #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 3722 matching lines...) Expand 10 before | Expand all | Expand 10 after
3733 } 3733 }
3734 } 3734 }
3735 3735
3736 3736
3737 void LCodeGen::DoTailCallThroughMegamorphicCache( 3737 void LCodeGen::DoTailCallThroughMegamorphicCache(
3738 LTailCallThroughMegamorphicCache* instr) { 3738 LTailCallThroughMegamorphicCache* instr) {
3739 Register receiver = ToRegister(instr->receiver()); 3739 Register receiver = ToRegister(instr->receiver());
3740 Register name = ToRegister(instr->name()); 3740 Register name = ToRegister(instr->name());
3741 DCHECK(receiver.is(LoadDescriptor::ReceiverRegister())); 3741 DCHECK(receiver.is(LoadDescriptor::ReceiverRegister()));
3742 DCHECK(name.is(LoadDescriptor::NameRegister())); 3742 DCHECK(name.is(LoadDescriptor::NameRegister()));
3743 Register slot = FLAG_vector_ics ? ToRegister(instr->slot()) : no_reg;
3744 Register vector = FLAG_vector_ics ? ToRegister(instr->vector()) : no_reg;
3745
3746 Register scratch = ebx; 3743 Register scratch = ebx;
3747 Register extra = edi; 3744 Register extra = edi;
3748 DCHECK(!extra.is(slot) && !extra.is(vector));
3749 DCHECK(!scratch.is(receiver) && !scratch.is(name)); 3745 DCHECK(!scratch.is(receiver) && !scratch.is(name));
3750 DCHECK(!extra.is(receiver) && !extra.is(name)); 3746 DCHECK(!extra.is(receiver) && !extra.is(name));
3751 3747
3752 // Important for the tail-call. 3748 // The probe will tail call to a handler if found.
3753 bool must_teardown_frame = NeedsEagerFrame(); 3749 // If --vector-ics is on, then it knows to pop the two args first.
3750 isolate()->stub_cache()->GenerateProbe(masm(), Code::LOAD_IC,
3751 instr->hydrogen()->flags(), false,
3752 receiver, name, scratch, extra);
3754 3753
3755 if (!instr->hydrogen()->is_just_miss()) { 3754 LoadIC::GenerateMiss(masm());
3756 if (FLAG_vector_ics) {
3757 __ push(slot);
3758 __ push(vector);
3759 }
3760
3761 // The probe will tail call to a handler if found.
3762 // If --vector-ics is on, then it knows to pop the two args first.
3763 DCHECK(!instr->hydrogen()->is_keyed_load());
3764 isolate()->stub_cache()->GenerateProbe(
3765 masm(), Code::LOAD_IC, instr->hydrogen()->flags(), must_teardown_frame,
3766 receiver, name, scratch, extra);
3767
3768 if (FLAG_vector_ics) {
3769 __ pop(vector);
3770 __ pop(slot);
3771 }
3772 }
3773
3774 // Tail call to miss if we ended up here.
3775 if (must_teardown_frame) __ leave();
3776 if (instr->hydrogen()->is_keyed_load()) {
3777 KeyedLoadIC::GenerateMiss(masm());
3778 } else {
3779 LoadIC::GenerateMiss(masm());
3780 }
3781 } 3755 }
3782 3756
3783 3757
3784 void LCodeGen::DoCallWithDescriptor(LCallWithDescriptor* instr) { 3758 void LCodeGen::DoCallWithDescriptor(LCallWithDescriptor* instr) {
3785 DCHECK(ToRegister(instr->result()).is(eax)); 3759 DCHECK(ToRegister(instr->result()).is(eax));
3786 3760
3787 if (instr->hydrogen()->IsTailCall()) { 3761 if (instr->hydrogen()->IsTailCall()) {
3788 if (NeedsEagerFrame()) __ leave(); 3762 if (NeedsEagerFrame()) __ leave();
3789 3763
3790 if (instr->target()->IsConstantOperand()) { 3764 if (instr->target()->IsConstantOperand()) {
(...skipping 2580 matching lines...) Expand 10 before | Expand all | Expand 10 after
6371 CallRuntime(Runtime::kPushBlockContext, 2, instr); 6345 CallRuntime(Runtime::kPushBlockContext, 2, instr);
6372 RecordSafepoint(Safepoint::kNoLazyDeopt); 6346 RecordSafepoint(Safepoint::kNoLazyDeopt);
6373 } 6347 }
6374 6348
6375 6349
6376 #undef __ 6350 #undef __
6377 6351
6378 } } // namespace v8::internal 6352 } } // namespace v8::internal
6379 6353
6380 #endif // V8_TARGET_ARCH_X87 6354 #endif // V8_TARGET_ARCH_X87
OLDNEW
« no previous file with comments | « no previous file | src/x87/lithium-x87.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698