| 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_MIPS | 5 #if V8_TARGET_ARCH_MIPS |
| 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 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 160 | 160 |
| 161 NameDictionaryLookupStub::GenerateNegativeLookup( | 161 NameDictionaryLookupStub::GenerateNegativeLookup( |
| 162 masm, miss_label, &done, receiver, properties, name, scratch1); | 162 masm, miss_label, &done, receiver, properties, name, scratch1); |
| 163 __ bind(&done); | 163 __ bind(&done); |
| 164 __ DecrementCounter(counters->negative_lookups_miss(), 1, scratch0, scratch1); | 164 __ DecrementCounter(counters->negative_lookups_miss(), 1, scratch0, scratch1); |
| 165 } | 165 } |
| 166 | 166 |
| 167 | 167 |
| 168 void NamedLoadHandlerCompiler::GenerateDirectLoadGlobalFunctionPrototype( | 168 void NamedLoadHandlerCompiler::GenerateDirectLoadGlobalFunctionPrototype( |
| 169 MacroAssembler* masm, int index, Register result, Label* miss) { | 169 MacroAssembler* masm, int index, Register result, Label* miss) { |
| 170 __ LoadNativeContextSlot(index, result); | 170 const int offset = Context::SlotOffset(Context::GLOBAL_OBJECT_INDEX); |
| 171 __ lw(result, MemOperand(cp, offset)); |
| 172 __ lw(result, FieldMemOperand(result, JSGlobalObject::kNativeContextOffset)); |
| 173 __ lw(result, MemOperand(result, Context::SlotOffset(index))); |
| 171 // Load its initial map. The global functions all have initial maps. | 174 // Load its initial map. The global functions all have initial maps. |
| 172 __ lw(result, | 175 __ lw(result, |
| 173 FieldMemOperand(result, JSFunction::kPrototypeOrInitialMapOffset)); | 176 FieldMemOperand(result, JSFunction::kPrototypeOrInitialMapOffset)); |
| 174 // Load the prototype from the initial map. | 177 // Load the prototype from the initial map. |
| 175 __ lw(result, FieldMemOperand(result, Map::kPrototypeOffset)); | 178 __ lw(result, FieldMemOperand(result, Map::kPrototypeOffset)); |
| 176 } | 179 } |
| 177 | 180 |
| 178 | 181 |
| 179 void NamedLoadHandlerCompiler::GenerateLoadFunctionPrototype( | 182 void NamedLoadHandlerCompiler::GenerateLoadFunctionPrototype( |
| 180 MacroAssembler* masm, Register receiver, Register scratch1, | 183 MacroAssembler* masm, Register receiver, Register scratch1, |
| (...skipping 599 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 780 // Return the generated code. | 783 // Return the generated code. |
| 781 return GetCode(kind(), Code::NORMAL, name); | 784 return GetCode(kind(), Code::NORMAL, name); |
| 782 } | 785 } |
| 783 | 786 |
| 784 | 787 |
| 785 #undef __ | 788 #undef __ |
| 786 } // namespace internal | 789 } // namespace internal |
| 787 } // namespace v8 | 790 } // namespace v8 |
| 788 | 791 |
| 789 #endif // V8_TARGET_ARCH_MIPS | 792 #endif // V8_TARGET_ARCH_MIPS |
| OLD | NEW |