OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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_X87 | 5 #if V8_TARGET_ARCH_X87 |
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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 Label done; | 107 Label done; |
108 NameDictionaryLookupStub::GenerateNegativeLookup(masm, miss_label, &done, | 108 NameDictionaryLookupStub::GenerateNegativeLookup(masm, miss_label, &done, |
109 properties, name, scratch1); | 109 properties, name, scratch1); |
110 __ bind(&done); | 110 __ bind(&done); |
111 __ DecrementCounter(counters->negative_lookups_miss(), 1); | 111 __ DecrementCounter(counters->negative_lookups_miss(), 1); |
112 } | 112 } |
113 | 113 |
114 | 114 |
115 void NamedLoadHandlerCompiler::GenerateDirectLoadGlobalFunctionPrototype( | 115 void NamedLoadHandlerCompiler::GenerateDirectLoadGlobalFunctionPrototype( |
116 MacroAssembler* masm, int index, Register result, Label* miss) { | 116 MacroAssembler* masm, int index, Register result, Label* miss) { |
117 const int offset = Context::SlotOffset(Context::GLOBAL_OBJECT_INDEX); | 117 __ LoadGlobalFunction(index, result); |
118 __ mov(result, Operand(esi, offset)); | |
119 __ mov(result, FieldOperand(result, JSGlobalObject::kNativeContextOffset)); | |
120 __ mov(result, Operand(result, Context::SlotOffset(index))); | |
121 // Load its initial map. The global functions all have initial maps. | 118 // Load its initial map. The global functions all have initial maps. |
122 __ mov(result, | 119 __ mov(result, |
123 FieldOperand(result, JSFunction::kPrototypeOrInitialMapOffset)); | 120 FieldOperand(result, JSFunction::kPrototypeOrInitialMapOffset)); |
124 // Load the prototype from the initial map. | 121 // Load the prototype from the initial map. |
125 __ mov(result, FieldOperand(result, Map::kPrototypeOffset)); | 122 __ mov(result, FieldOperand(result, Map::kPrototypeOffset)); |
126 } | 123 } |
127 | 124 |
128 | 125 |
129 void NamedLoadHandlerCompiler::GenerateLoadFunctionPrototype( | 126 void NamedLoadHandlerCompiler::GenerateLoadFunctionPrototype( |
130 MacroAssembler* masm, Register receiver, Register scratch1, | 127 MacroAssembler* masm, Register receiver, Register scratch1, |
(...skipping 685 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
816 // Return the generated code. | 813 // Return the generated code. |
817 return GetCode(kind(), Code::NORMAL, name); | 814 return GetCode(kind(), Code::NORMAL, name); |
818 } | 815 } |
819 | 816 |
820 | 817 |
821 #undef __ | 818 #undef __ |
822 } // namespace internal | 819 } // namespace internal |
823 } // namespace v8 | 820 } // namespace v8 |
824 | 821 |
825 #endif // V8_TARGET_ARCH_X87 | 822 #endif // V8_TARGET_ARCH_X87 |
OLD | NEW |