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

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

Issue 2398683004: [crankshaft] Remove HLoadNamedGeneric and use HCallWithDescriptor to call LoadIC. (Closed)
Patch Set: Created 4 years, 2 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/crankshaft/x64/lithium-x64.cc ('k') | src/crankshaft/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 #if V8_TARGET_ARCH_X87 5 #if V8_TARGET_ARCH_X87
6 6
7 #include "src/crankshaft/x87/lithium-codegen-x87.h" 7 #include "src/crankshaft/x87/lithium-codegen-x87.h"
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 2755 matching lines...) Expand 10 before | Expand all | Expand 10 after
2766 __ PushHeapObject(Handle<HeapObject>::cast(object)); 2766 __ PushHeapObject(Handle<HeapObject>::cast(object));
2767 } 2767 }
2768 } else if (operand->IsRegister()) { 2768 } else if (operand->IsRegister()) {
2769 __ push(ToRegister(operand)); 2769 __ push(ToRegister(operand));
2770 } else { 2770 } else {
2771 __ push(ToOperand(operand)); 2771 __ push(ToOperand(operand));
2772 } 2772 }
2773 } 2773 }
2774 2774
2775 2775
2776 void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) {
2777 DCHECK(ToRegister(instr->context()).is(esi));
2778 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister()));
2779 DCHECK(ToRegister(instr->result()).is(eax));
2780
2781 __ mov(LoadDescriptor::NameRegister(), instr->name());
2782 EmitVectorLoadICRegisters<LLoadNamedGeneric>(instr);
2783 Handle<Code> ic = CodeFactory::LoadICInOptimizedCode(isolate()).code();
2784 CallCode(ic, RelocInfo::CODE_TARGET, instr);
2785 }
2786
2787
2788 void LCodeGen::DoLoadFunctionPrototype(LLoadFunctionPrototype* instr) { 2776 void LCodeGen::DoLoadFunctionPrototype(LLoadFunctionPrototype* instr) {
2789 Register function = ToRegister(instr->function()); 2777 Register function = ToRegister(instr->function());
2790 Register temp = ToRegister(instr->temp()); 2778 Register temp = ToRegister(instr->temp());
2791 Register result = ToRegister(instr->result()); 2779 Register result = ToRegister(instr->result());
2792 2780
2793 // Get the prototype or initial map from the function. 2781 // Get the prototype or initial map from the function.
2794 __ mov(result, 2782 __ mov(result,
2795 FieldOperand(function, JSFunction::kPrototypeOrInitialMapOffset)); 2783 FieldOperand(function, JSFunction::kPrototypeOrInitialMapOffset));
2796 2784
2797 // Check that the function has a prototype or an initial map. 2785 // Check that the function has a prototype or an initial map.
(...skipping 2914 matching lines...) Expand 10 before | Expand all | Expand 10 after
5712 __ bind(deferred->exit()); 5700 __ bind(deferred->exit());
5713 __ bind(&done); 5701 __ bind(&done);
5714 } 5702 }
5715 5703
5716 #undef __ 5704 #undef __
5717 5705
5718 } // namespace internal 5706 } // namespace internal
5719 } // namespace v8 5707 } // namespace v8
5720 5708
5721 #endif // V8_TARGET_ARCH_X87 5709 #endif // V8_TARGET_ARCH_X87
OLDNEW
« no previous file with comments | « src/crankshaft/x64/lithium-x64.cc ('k') | src/crankshaft/x87/lithium-x87.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698