| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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/crankshaft/ppc/lithium-codegen-ppc.h" | 5 #include "src/crankshaft/ppc/lithium-codegen-ppc.h" |
| 6 | 6 |
| 7 #include "src/base/bits.h" | 7 #include "src/base/bits.h" |
| 8 #include "src/code-factory.h" | 8 #include "src/code-factory.h" |
| 9 #include "src/code-stubs.h" | 9 #include "src/code-stubs.h" |
| 10 #include "src/crankshaft/hydrogen-osr.h" | 10 #include "src/crankshaft/hydrogen-osr.h" |
| (...skipping 2755 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2766 offset = SmiWordOffset(offset); | 2766 offset = SmiWordOffset(offset); |
| 2767 representation = Representation::Integer32(); | 2767 representation = Representation::Integer32(); |
| 2768 } | 2768 } |
| 2769 #endif | 2769 #endif |
| 2770 | 2770 |
| 2771 __ LoadRepresentation(result, FieldMemOperand(object, offset), representation, | 2771 __ LoadRepresentation(result, FieldMemOperand(object, offset), representation, |
| 2772 r0); | 2772 r0); |
| 2773 } | 2773 } |
| 2774 | 2774 |
| 2775 | 2775 |
| 2776 void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) { | |
| 2777 DCHECK(ToRegister(instr->context()).is(cp)); | |
| 2778 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister())); | |
| 2779 DCHECK(ToRegister(instr->result()).is(r3)); | |
| 2780 | |
| 2781 // Name is always in r5. | |
| 2782 __ mov(LoadDescriptor::NameRegister(), Operand(instr->name())); | |
| 2783 EmitVectorLoadICRegisters<LLoadNamedGeneric>(instr); | |
| 2784 Handle<Code> ic = CodeFactory::LoadICInOptimizedCode(isolate()).code(); | |
| 2785 CallCode(ic, RelocInfo::CODE_TARGET, instr); | |
| 2786 } | |
| 2787 | |
| 2788 | |
| 2789 void LCodeGen::DoLoadFunctionPrototype(LLoadFunctionPrototype* instr) { | 2776 void LCodeGen::DoLoadFunctionPrototype(LLoadFunctionPrototype* instr) { |
| 2790 Register scratch = scratch0(); | 2777 Register scratch = scratch0(); |
| 2791 Register function = ToRegister(instr->function()); | 2778 Register function = ToRegister(instr->function()); |
| 2792 Register result = ToRegister(instr->result()); | 2779 Register result = ToRegister(instr->result()); |
| 2793 | 2780 |
| 2794 // Get the prototype or initial map from the function. | 2781 // Get the prototype or initial map from the function. |
| 2795 __ LoadP(result, | 2782 __ LoadP(result, |
| 2796 FieldMemOperand(function, JSFunction::kPrototypeOrInitialMapOffset)); | 2783 FieldMemOperand(function, JSFunction::kPrototypeOrInitialMapOffset)); |
| 2797 | 2784 |
| 2798 // Check that the function has a prototype or an initial map. | 2785 // Check that the function has a prototype or an initial map. |
| (...skipping 2921 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5720 __ LoadP(result, | 5707 __ LoadP(result, |
| 5721 FieldMemOperand(scratch, FixedArray::kHeaderSize - kPointerSize)); | 5708 FieldMemOperand(scratch, FixedArray::kHeaderSize - kPointerSize)); |
| 5722 __ bind(deferred->exit()); | 5709 __ bind(deferred->exit()); |
| 5723 __ bind(&done); | 5710 __ bind(&done); |
| 5724 } | 5711 } |
| 5725 | 5712 |
| 5726 #undef __ | 5713 #undef __ |
| 5727 | 5714 |
| 5728 } // namespace internal | 5715 } // namespace internal |
| 5729 } // namespace v8 | 5716 } // namespace v8 |
| OLD | NEW |