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