| 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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 Handle<JSObject> holder, | 116 Handle<JSObject> holder, |
| 117 CacheHolderFlag cache_holder) | 117 CacheHolderFlag cache_holder) |
| 118 : PropertyHandlerCompiler(isolate, Code::LOAD_IC, map, holder, | 118 : PropertyHandlerCompiler(isolate, Code::LOAD_IC, map, holder, |
| 119 cache_holder) {} | 119 cache_holder) {} |
| 120 | 120 |
| 121 virtual ~NamedLoadHandlerCompiler() {} | 121 virtual ~NamedLoadHandlerCompiler() {} |
| 122 | 122 |
| 123 Handle<Code> CompileLoadField(Handle<Name> name, FieldIndex index); | 123 Handle<Code> CompileLoadField(Handle<Name> name, FieldIndex index); |
| 124 | 124 |
| 125 Handle<Code> CompileLoadCallback(Handle<Name> name, | 125 Handle<Code> CompileLoadCallback(Handle<Name> name, |
| 126 Handle<ExecutableAccessorInfo> callback); | 126 Handle<AccessorInfo> callback); |
| 127 | 127 |
| 128 Handle<Code> CompileLoadCallback(Handle<Name> name, | 128 Handle<Code> CompileLoadCallback(Handle<Name> name, |
| 129 const CallOptimization& call_optimization, | 129 const CallOptimization& call_optimization, |
| 130 int accessor_index); | 130 int accessor_index); |
| 131 | 131 |
| 132 Handle<Code> CompileLoadConstant(Handle<Name> name, int constant_index); | 132 Handle<Code> CompileLoadConstant(Handle<Name> name, int constant_index); |
| 133 | 133 |
| 134 // 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 |
| 135 // the iterator points to a LookupIterator::PROPERTY, its access will be | 135 // the iterator points to a LookupIterator::PROPERTY, its access will be |
| 136 // inlined. | 136 // inlined. |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 173 | 173 |
| 174 protected: | 174 protected: |
| 175 virtual Register FrontendHeader(Register object_reg, Handle<Name> name, | 175 virtual Register FrontendHeader(Register object_reg, Handle<Name> name, |
| 176 Label* miss, ReturnHolder return_what); | 176 Label* miss, ReturnHolder return_what); |
| 177 | 177 |
| 178 virtual void FrontendFooter(Handle<Name> name, Label* miss); | 178 virtual void FrontendFooter(Handle<Name> name, Label* miss); |
| 179 | 179 |
| 180 private: | 180 private: |
| 181 Handle<Code> CompileLoadNonexistent(Handle<Name> name); | 181 Handle<Code> CompileLoadNonexistent(Handle<Name> name); |
| 182 void GenerateLoadConstant(Handle<Object> value); | 182 void GenerateLoadConstant(Handle<Object> value); |
| 183 void GenerateLoadCallback(Register reg, | 183 void GenerateLoadCallback(Register reg, Handle<AccessorInfo> callback); |
| 184 Handle<ExecutableAccessorInfo> callback); | |
| 185 void GenerateLoadCallback(const CallOptimization& call_optimization, | 184 void GenerateLoadCallback(const CallOptimization& call_optimization, |
| 186 Handle<Map> receiver_map); | 185 Handle<Map> receiver_map); |
| 187 | 186 |
| 188 // Helper emits no code if vector-ics are disabled. | 187 // Helper emits no code if vector-ics are disabled. |
| 189 void InterceptorVectorSlotPush(Register holder_reg); | 188 void InterceptorVectorSlotPush(Register holder_reg); |
| 190 enum PopMode { POP, DISCARD }; | 189 enum PopMode { POP, DISCARD }; |
| 191 void InterceptorVectorSlotPop(Register holder_reg, PopMode mode = POP); | 190 void InterceptorVectorSlotPop(Register holder_reg, PopMode mode = POP); |
| 192 | 191 |
| 193 void GenerateLoadInterceptor(Register holder_reg); | 192 void GenerateLoadInterceptor(Register holder_reg); |
| 194 void GenerateLoadInterceptorWithFollowup(LookupIterator* it, | 193 void GenerateLoadInterceptorWithFollowup(LookupIterator* it, |
| (...skipping 22 matching lines...) Expand all Loading... |
| 217 Handle<JSObject> holder) | 216 Handle<JSObject> holder) |
| 218 : PropertyHandlerCompiler(isolate, Code::STORE_IC, map, holder, | 217 : PropertyHandlerCompiler(isolate, Code::STORE_IC, map, holder, |
| 219 kCacheOnReceiver) {} | 218 kCacheOnReceiver) {} |
| 220 | 219 |
| 221 virtual ~NamedStoreHandlerCompiler() {} | 220 virtual ~NamedStoreHandlerCompiler() {} |
| 222 | 221 |
| 223 Handle<Code> CompileStoreTransition(Handle<Map> transition, | 222 Handle<Code> CompileStoreTransition(Handle<Map> transition, |
| 224 Handle<Name> name); | 223 Handle<Name> name); |
| 225 Handle<Code> CompileStoreField(LookupIterator* it); | 224 Handle<Code> CompileStoreField(LookupIterator* it); |
| 226 Handle<Code> CompileStoreCallback(Handle<JSObject> object, Handle<Name> name, | 225 Handle<Code> CompileStoreCallback(Handle<JSObject> object, Handle<Name> name, |
| 227 Handle<ExecutableAccessorInfo> callback); | 226 Handle<AccessorInfo> callback); |
| 228 Handle<Code> CompileStoreCallback(Handle<JSObject> object, Handle<Name> name, | 227 Handle<Code> CompileStoreCallback(Handle<JSObject> object, Handle<Name> name, |
| 229 const CallOptimization& call_optimization, | 228 const CallOptimization& call_optimization, |
| 230 int accessor_index); | 229 int accessor_index); |
| 231 Handle<Code> CompileStoreViaSetter(Handle<JSObject> object, Handle<Name> name, | 230 Handle<Code> CompileStoreViaSetter(Handle<JSObject> object, Handle<Name> name, |
| 232 int accessor_index, | 231 int accessor_index, |
| 233 int expected_arguments); | 232 int expected_arguments); |
| 234 Handle<Code> CompileStoreInterceptor(Handle<Name> name); | 233 Handle<Code> CompileStoreInterceptor(Handle<Name> name); |
| 235 | 234 |
| 236 static void GenerateStoreViaSetter(MacroAssembler* masm, Handle<Map> map, | 235 static void GenerateStoreViaSetter(MacroAssembler* masm, Handle<Map> map, |
| 237 Register receiver, Register holder, | 236 Register receiver, Register holder, |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 297 void CompileElementHandlers(MapHandleList* receiver_maps, | 296 void CompileElementHandlers(MapHandleList* receiver_maps, |
| 298 CodeHandleList* handlers, | 297 CodeHandleList* handlers, |
| 299 LanguageMode language_mode); | 298 LanguageMode language_mode); |
| 300 | 299 |
| 301 static void GenerateStoreSlow(MacroAssembler* masm); | 300 static void GenerateStoreSlow(MacroAssembler* masm); |
| 302 }; | 301 }; |
| 303 } // namespace internal | 302 } // namespace internal |
| 304 } // namespace v8 | 303 } // namespace v8 |
| 305 | 304 |
| 306 #endif // V8_IC_HANDLER_COMPILER_H_ | 305 #endif // V8_IC_HANDLER_COMPILER_H_ |
| OLD | NEW |