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 #ifndef V8_IC_HANDLER_COMPILER_H_ | 5 #ifndef V8_IC_HANDLER_COMPILER_H_ |
6 #define V8_IC_HANDLER_COMPILER_H_ | 6 #define V8_IC_HANDLER_COMPILER_H_ |
7 | 7 |
8 #include "src/ic/access-compiler.h" | 8 #include "src/ic/access-compiler.h" |
9 #include "src/ic/ic-state.h" | 9 #include "src/ic/ic-state.h" |
10 | 10 |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 void PopVectorAndSlot() { PopVectorAndSlot(vector(), slot()); } | 51 void PopVectorAndSlot() { PopVectorAndSlot(vector(), slot()); } |
52 void PopVectorAndSlot(Register vector, Register slot); | 52 void PopVectorAndSlot(Register vector, Register slot); |
53 | 53 |
54 void DiscardVectorAndSlot(); | 54 void DiscardVectorAndSlot(); |
55 | 55 |
56 // TODO(verwaest): Make non-static. | 56 // TODO(verwaest): Make non-static. |
57 static void GenerateApiAccessorCall(MacroAssembler* masm, | 57 static void GenerateApiAccessorCall(MacroAssembler* masm, |
58 const CallOptimization& optimization, | 58 const CallOptimization& optimization, |
59 Handle<Map> receiver_map, | 59 Handle<Map> receiver_map, |
60 Register receiver, Register scratch, | 60 Register receiver, Register scratch, |
61 bool is_store, Register store_parameter); | 61 bool is_store, Register store_parameter, |
| 62 Register accessor_holder, |
| 63 int accessor_index); |
62 | 64 |
63 // Helper function used to check that the dictionary doesn't contain | 65 // Helper function used to check that the dictionary doesn't contain |
64 // the property. This function may return false negatives, so miss_label | 66 // the property. This function may return false negatives, so miss_label |
65 // must always call a backup property check that is complete. | 67 // must always call a backup property check that is complete. |
66 // This function is safe to call if the receiver has fast properties. | 68 // This function is safe to call if the receiver has fast properties. |
67 // Name must be unique and receiver must be a heap object. | 69 // Name must be unique and receiver must be a heap object. |
68 static void GenerateDictionaryNegativeLookup(MacroAssembler* masm, | 70 static void GenerateDictionaryNegativeLookup(MacroAssembler* masm, |
69 Label* miss_label, | 71 Label* miss_label, |
70 Register receiver, | 72 Register receiver, |
71 Handle<Name> name, Register r0, | 73 Handle<Name> name, Register r0, |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 cache_holder) {} | 119 cache_holder) {} |
118 | 120 |
119 virtual ~NamedLoadHandlerCompiler() {} | 121 virtual ~NamedLoadHandlerCompiler() {} |
120 | 122 |
121 Handle<Code> CompileLoadField(Handle<Name> name, FieldIndex index); | 123 Handle<Code> CompileLoadField(Handle<Name> name, FieldIndex index); |
122 | 124 |
123 Handle<Code> CompileLoadCallback(Handle<Name> name, | 125 Handle<Code> CompileLoadCallback(Handle<Name> name, |
124 Handle<ExecutableAccessorInfo> callback); | 126 Handle<ExecutableAccessorInfo> callback); |
125 | 127 |
126 Handle<Code> CompileLoadCallback(Handle<Name> name, | 128 Handle<Code> CompileLoadCallback(Handle<Name> name, |
127 const CallOptimization& call_optimization); | 129 const CallOptimization& call_optimization, |
| 130 int accessor_index); |
128 | 131 |
129 Handle<Code> CompileLoadConstant(Handle<Name> name, int constant_index); | 132 Handle<Code> CompileLoadConstant(Handle<Name> name, int constant_index); |
130 | 133 |
131 // The LookupIterator is used to perform a lookup behind the interceptor. If | 134 // The LookupIterator is used to perform a lookup behind the interceptor. If |
132 // the iterator points to a LookupIterator::PROPERTY, its access will be | 135 // the iterator points to a LookupIterator::PROPERTY, its access will be |
133 // inlined. | 136 // inlined. |
134 Handle<Code> CompileLoadInterceptor(LookupIterator* it); | 137 Handle<Code> CompileLoadInterceptor(LookupIterator* it); |
135 | 138 |
136 Handle<Code> CompileLoadViaGetter(Handle<Name> name, int accessor_index, | 139 Handle<Code> CompileLoadViaGetter(Handle<Name> name, int accessor_index, |
137 int expected_arguments); | 140 int expected_arguments); |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
216 kCacheOnReceiver) {} | 219 kCacheOnReceiver) {} |
217 | 220 |
218 virtual ~NamedStoreHandlerCompiler() {} | 221 virtual ~NamedStoreHandlerCompiler() {} |
219 | 222 |
220 Handle<Code> CompileStoreTransition(Handle<Map> transition, | 223 Handle<Code> CompileStoreTransition(Handle<Map> transition, |
221 Handle<Name> name); | 224 Handle<Name> name); |
222 Handle<Code> CompileStoreField(LookupIterator* it); | 225 Handle<Code> CompileStoreField(LookupIterator* it); |
223 Handle<Code> CompileStoreCallback(Handle<JSObject> object, Handle<Name> name, | 226 Handle<Code> CompileStoreCallback(Handle<JSObject> object, Handle<Name> name, |
224 Handle<ExecutableAccessorInfo> callback); | 227 Handle<ExecutableAccessorInfo> callback); |
225 Handle<Code> CompileStoreCallback(Handle<JSObject> object, Handle<Name> name, | 228 Handle<Code> CompileStoreCallback(Handle<JSObject> object, Handle<Name> name, |
226 const CallOptimization& call_optimization); | 229 const CallOptimization& call_optimization, |
| 230 int accessor_index); |
227 Handle<Code> CompileStoreViaSetter(Handle<JSObject> object, Handle<Name> name, | 231 Handle<Code> CompileStoreViaSetter(Handle<JSObject> object, Handle<Name> name, |
228 int accessor_index, | 232 int accessor_index, |
229 int expected_arguments); | 233 int expected_arguments); |
230 Handle<Code> CompileStoreInterceptor(Handle<Name> name); | 234 Handle<Code> CompileStoreInterceptor(Handle<Name> name); |
231 | 235 |
232 static void GenerateStoreViaSetter(MacroAssembler* masm, | 236 static void GenerateStoreViaSetter(MacroAssembler* masm, |
233 Handle<HeapType> type, Register receiver, | 237 Handle<HeapType> type, Register receiver, |
234 Register holder, int accessor_index, | 238 Register holder, int accessor_index, |
235 int expected_arguments); | 239 int expected_arguments); |
236 | 240 |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
287 | 291 |
288 void CompileElementHandlers(MapHandleList* receiver_maps, | 292 void CompileElementHandlers(MapHandleList* receiver_maps, |
289 CodeHandleList* handlers); | 293 CodeHandleList* handlers); |
290 | 294 |
291 static void GenerateStoreSlow(MacroAssembler* masm); | 295 static void GenerateStoreSlow(MacroAssembler* masm); |
292 }; | 296 }; |
293 } | 297 } |
294 } // namespace v8::internal | 298 } // namespace v8::internal |
295 | 299 |
296 #endif // V8_IC_HANDLER_COMPILER_H_ | 300 #endif // V8_IC_HANDLER_COMPILER_H_ |
OLD | NEW |