| OLD | NEW |
| 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 2549 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2560 | 2560 |
| 2561 void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) { | 2561 void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) { |
| 2562 DCHECK(ToRegister(instr->context()).is(rsi)); | 2562 DCHECK(ToRegister(instr->context()).is(rsi)); |
| 2563 DCHECK(ToRegister(instr->global_object()) | 2563 DCHECK(ToRegister(instr->global_object()) |
| 2564 .is(LoadDescriptor::ReceiverRegister())); | 2564 .is(LoadDescriptor::ReceiverRegister())); |
| 2565 DCHECK(ToRegister(instr->result()).is(rax)); | 2565 DCHECK(ToRegister(instr->result()).is(rax)); |
| 2566 | 2566 |
| 2567 __ Move(LoadDescriptor::NameRegister(), instr->name()); | 2567 __ Move(LoadDescriptor::NameRegister(), instr->name()); |
| 2568 EmitVectorLoadICRegisters<LLoadGlobalGeneric>(instr); | 2568 EmitVectorLoadICRegisters<LLoadGlobalGeneric>(instr); |
| 2569 Handle<Code> ic = | 2569 Handle<Code> ic = |
| 2570 CodeFactory::LoadICInOptimizedCode(isolate(), instr->typeof_mode()) | 2570 CodeFactory::LoadGlobalICInOptimizedCode(isolate(), instr->typeof_mode()) |
| 2571 .code(); | 2571 .code(); |
| 2572 CallCode(ic, RelocInfo::CODE_TARGET, instr); | 2572 CallCode(ic, RelocInfo::CODE_TARGET, instr); |
| 2573 } | 2573 } |
| 2574 | 2574 |
| 2575 | 2575 |
| 2576 void LCodeGen::DoLoadContextSlot(LLoadContextSlot* instr) { | 2576 void LCodeGen::DoLoadContextSlot(LLoadContextSlot* instr) { |
| 2577 Register context = ToRegister(instr->context()); | 2577 Register context = ToRegister(instr->context()); |
| 2578 Register result = ToRegister(instr->result()); | 2578 Register result = ToRegister(instr->result()); |
| 2579 __ movp(result, ContextOperand(context, instr->slot_index())); | 2579 __ movp(result, ContextOperand(context, instr->slot_index())); |
| 2580 if (instr->hydrogen()->RequiresHoleCheck()) { | 2580 if (instr->hydrogen()->RequiresHoleCheck()) { |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2676 } | 2676 } |
| 2677 | 2677 |
| 2678 | 2678 |
| 2679 void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) { | 2679 void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) { |
| 2680 DCHECK(ToRegister(instr->context()).is(rsi)); | 2680 DCHECK(ToRegister(instr->context()).is(rsi)); |
| 2681 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister())); | 2681 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister())); |
| 2682 DCHECK(ToRegister(instr->result()).is(rax)); | 2682 DCHECK(ToRegister(instr->result()).is(rax)); |
| 2683 | 2683 |
| 2684 __ Move(LoadDescriptor::NameRegister(), instr->name()); | 2684 __ Move(LoadDescriptor::NameRegister(), instr->name()); |
| 2685 EmitVectorLoadICRegisters<LLoadNamedGeneric>(instr); | 2685 EmitVectorLoadICRegisters<LLoadNamedGeneric>(instr); |
| 2686 Handle<Code> ic = | 2686 Handle<Code> ic = CodeFactory::LoadICInOptimizedCode(isolate()).code(); |
| 2687 CodeFactory::LoadICInOptimizedCode(isolate(), NOT_INSIDE_TYPEOF).code(); | |
| 2688 CallCode(ic, RelocInfo::CODE_TARGET, instr); | 2687 CallCode(ic, RelocInfo::CODE_TARGET, instr); |
| 2689 } | 2688 } |
| 2690 | 2689 |
| 2691 | 2690 |
| 2692 void LCodeGen::DoLoadFunctionPrototype(LLoadFunctionPrototype* instr) { | 2691 void LCodeGen::DoLoadFunctionPrototype(LLoadFunctionPrototype* instr) { |
| 2693 Register function = ToRegister(instr->function()); | 2692 Register function = ToRegister(instr->function()); |
| 2694 Register result = ToRegister(instr->result()); | 2693 Register result = ToRegister(instr->result()); |
| 2695 | 2694 |
| 2696 // Get the prototype or initial map from the function. | 2695 // Get the prototype or initial map from the function. |
| 2697 __ movp(result, | 2696 __ movp(result, |
| (...skipping 2896 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5594 __ bind(deferred->exit()); | 5593 __ bind(deferred->exit()); |
| 5595 __ bind(&done); | 5594 __ bind(&done); |
| 5596 } | 5595 } |
| 5597 | 5596 |
| 5598 #undef __ | 5597 #undef __ |
| 5599 | 5598 |
| 5600 } // namespace internal | 5599 } // namespace internal |
| 5601 } // namespace v8 | 5600 } // namespace v8 |
| 5602 | 5601 |
| 5603 #endif // V8_TARGET_ARCH_X64 | 5602 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |