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 #if V8_TARGET_ARCH_PPC | 5 #if V8_TARGET_ARCH_PPC |
6 | 6 |
7 #include "src/ic/call-optimization.h" | 7 #include "src/ic/call-optimization.h" |
8 #include "src/ic/handler-compiler.h" | 8 #include "src/ic/handler-compiler.h" |
9 #include "src/ic/ic.h" | 9 #include "src/ic/ic.h" |
10 #include "src/isolate-inl.h" | 10 #include "src/isolate-inl.h" |
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
162 | 162 |
163 NameDictionaryLookupStub::GenerateNegativeLookup( | 163 NameDictionaryLookupStub::GenerateNegativeLookup( |
164 masm, miss_label, &done, receiver, properties, name, scratch1); | 164 masm, miss_label, &done, receiver, properties, name, scratch1); |
165 __ bind(&done); | 165 __ bind(&done); |
166 __ DecrementCounter(counters->negative_lookups_miss(), 1, scratch0, scratch1); | 166 __ DecrementCounter(counters->negative_lookups_miss(), 1, scratch0, scratch1); |
167 } | 167 } |
168 | 168 |
169 | 169 |
170 void NamedLoadHandlerCompiler::GenerateDirectLoadGlobalFunctionPrototype( | 170 void NamedLoadHandlerCompiler::GenerateDirectLoadGlobalFunctionPrototype( |
171 MacroAssembler* masm, int index, Register result, Label* miss) { | 171 MacroAssembler* masm, int index, Register result, Label* miss) { |
172 const int offset = Context::SlotOffset(Context::GLOBAL_OBJECT_INDEX); | 172 __ LoadNativeContextSlot(index, result); |
173 __ LoadP(result, MemOperand(cp, offset)); | |
174 __ LoadP(result, | |
175 FieldMemOperand(result, JSGlobalObject::kNativeContextOffset)); | |
176 __ LoadP(result, MemOperand(result, Context::SlotOffset(index))); | |
177 // Load its initial map. The global functions all have initial maps. | 173 // Load its initial map. The global functions all have initial maps. |
178 __ LoadP(result, | 174 __ LoadP(result, |
179 FieldMemOperand(result, JSFunction::kPrototypeOrInitialMapOffset)); | 175 FieldMemOperand(result, JSFunction::kPrototypeOrInitialMapOffset)); |
180 // Load the prototype from the initial map. | 176 // Load the prototype from the initial map. |
181 __ LoadP(result, FieldMemOperand(result, Map::kPrototypeOffset)); | 177 __ LoadP(result, FieldMemOperand(result, Map::kPrototypeOffset)); |
182 } | 178 } |
183 | 179 |
184 | 180 |
185 void NamedLoadHandlerCompiler::GenerateLoadFunctionPrototype( | 181 void NamedLoadHandlerCompiler::GenerateLoadFunctionPrototype( |
186 MacroAssembler* masm, Register receiver, Register scratch1, | 182 MacroAssembler* masm, Register receiver, Register scratch1, |
(...skipping 603 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
790 // Return the generated code. | 786 // Return the generated code. |
791 return GetCode(kind(), Code::NORMAL, name); | 787 return GetCode(kind(), Code::NORMAL, name); |
792 } | 788 } |
793 | 789 |
794 | 790 |
795 #undef __ | 791 #undef __ |
796 } // namespace internal | 792 } // namespace internal |
797 } // namespace v8 | 793 } // namespace v8 |
798 | 794 |
799 #endif // V8_TARGET_ARCH_ARM | 795 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |