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

Side by Side Diff: src/crankshaft/x64/lithium-codegen-x64.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/s390/lithium-s390.cc ('k') | src/crankshaft/x64/lithium-x64.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 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 #if V8_TARGET_ARCH_X64 5 #if V8_TARGET_ARCH_X64
6 6
7 #include "src/crankshaft/x64/lithium-codegen-x64.h" 7 #include "src/crankshaft/x64/lithium-codegen-x64.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 2619 matching lines...) Expand 10 before | Expand all | Expand 10 after
2630 // Read int value directly from upper half of the smi. 2630 // Read int value directly from upper half of the smi.
2631 STATIC_ASSERT(kSmiTag == 0); 2631 STATIC_ASSERT(kSmiTag == 0);
2632 DCHECK(kSmiTagSize + kSmiShiftSize == 32); 2632 DCHECK(kSmiTagSize + kSmiShiftSize == 32);
2633 offset += kPointerSize / 2; 2633 offset += kPointerSize / 2;
2634 representation = Representation::Integer32(); 2634 representation = Representation::Integer32();
2635 } 2635 }
2636 __ Load(result, FieldOperand(object, offset), representation); 2636 __ Load(result, FieldOperand(object, offset), representation);
2637 } 2637 }
2638 2638
2639 2639
2640 void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) {
2641 DCHECK(ToRegister(instr->context()).is(rsi));
2642 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister()));
2643 DCHECK(ToRegister(instr->result()).is(rax));
2644
2645 __ Move(LoadDescriptor::NameRegister(), instr->name());
2646 EmitVectorLoadICRegisters<LLoadNamedGeneric>(instr);
2647 Handle<Code> ic = CodeFactory::LoadICInOptimizedCode(isolate()).code();
2648 CallCode(ic, RelocInfo::CODE_TARGET, instr);
2649 }
2650
2651
2652 void LCodeGen::DoLoadFunctionPrototype(LLoadFunctionPrototype* instr) { 2640 void LCodeGen::DoLoadFunctionPrototype(LLoadFunctionPrototype* instr) {
2653 Register function = ToRegister(instr->function()); 2641 Register function = ToRegister(instr->function());
2654 Register result = ToRegister(instr->result()); 2642 Register result = ToRegister(instr->result());
2655 2643
2656 // Get the prototype or initial map from the function. 2644 // Get the prototype or initial map from the function.
2657 __ movp(result, 2645 __ movp(result,
2658 FieldOperand(function, JSFunction::kPrototypeOrInitialMapOffset)); 2646 FieldOperand(function, JSFunction::kPrototypeOrInitialMapOffset));
2659 2647
2660 // Check that the function has a prototype or an initial map. 2648 // Check that the function has a prototype or an initial map.
2661 __ CompareRoot(result, Heap::kTheHoleValueRootIndex); 2649 __ CompareRoot(result, Heap::kTheHoleValueRootIndex);
(...skipping 2846 matching lines...) Expand 10 before | Expand all | Expand 10 after
5508 __ bind(deferred->exit()); 5496 __ bind(deferred->exit());
5509 __ bind(&done); 5497 __ bind(&done);
5510 } 5498 }
5511 5499
5512 #undef __ 5500 #undef __
5513 5501
5514 } // namespace internal 5502 } // namespace internal
5515 } // namespace v8 5503 } // namespace v8
5516 5504
5517 #endif // V8_TARGET_ARCH_X64 5505 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/crankshaft/s390/lithium-s390.cc ('k') | src/crankshaft/x64/lithium-x64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698