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 #ifndef V8_IC_H_ | 5 #ifndef V8_IC_H_ |
6 #define V8_IC_H_ | 6 #define V8_IC_H_ |
7 | 7 |
8 #include "src/ic/ic-state.h" | 8 #include "src/ic/ic-state.h" |
9 #include "src/macro-assembler.h" | 9 #include "src/macro-assembler.h" |
| 10 #include "src/messages.h" |
10 | 11 |
11 namespace v8 { | 12 namespace v8 { |
12 namespace internal { | 13 namespace internal { |
13 | 14 |
14 | 15 |
15 // IC_UTIL_LIST defines all utility functions called from generated | 16 // IC_UTIL_LIST defines all utility functions called from generated |
16 // inline caching code. The argument for the macro, ICU, is the function name. | 17 // inline caching code. The argument for the macro, ICU, is the function name. |
17 #define IC_UTIL_LIST(ICU) \ | 18 #define IC_UTIL_LIST(ICU) \ |
18 ICU(LoadIC_Miss) \ | 19 ICU(LoadIC_Miss) \ |
19 ICU(KeyedLoadIC_Miss) \ | 20 ICU(KeyedLoadIC_Miss) \ |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 Handle<Code> handler); | 156 Handle<Code> handler); |
156 // Configure the vector for POLYMORPHIC. | 157 // Configure the vector for POLYMORPHIC. |
157 void ConfigureVectorState(Handle<Name> name, MapHandleList* maps, | 158 void ConfigureVectorState(Handle<Name> name, MapHandleList* maps, |
158 CodeHandleList* handlers); | 159 CodeHandleList* handlers); |
159 | 160 |
160 char TransitionMarkFromState(IC::State state); | 161 char TransitionMarkFromState(IC::State state); |
161 void TraceIC(const char* type, Handle<Object> name); | 162 void TraceIC(const char* type, Handle<Object> name); |
162 void TraceIC(const char* type, Handle<Object> name, State old_state, | 163 void TraceIC(const char* type, Handle<Object> name, State old_state, |
163 State new_state); | 164 State new_state); |
164 | 165 |
165 MaybeHandle<Object> TypeError(const char* type, Handle<Object> object, | 166 MaybeHandle<Object> TypeError(MessageTemplate::Template, |
166 Handle<Object> key); | 167 Handle<Object> object, Handle<Object> key); |
167 MaybeHandle<Object> ReferenceError(Handle<Name> name); | 168 MaybeHandle<Object> ReferenceError(Handle<Name> name); |
168 | 169 |
169 // Access the target code for the given IC address. | 170 // Access the target code for the given IC address. |
170 static inline Code* GetTargetAtAddress(Address address, | 171 static inline Code* GetTargetAtAddress(Address address, |
171 ConstantPoolArray* constant_pool); | 172 ConstantPoolArray* constant_pool); |
172 static inline void SetTargetAtAddress(Address address, Code* target, | 173 static inline void SetTargetAtAddress(Address address, Code* target, |
173 ConstantPoolArray* constant_pool); | 174 ConstantPoolArray* constant_pool); |
174 static void OnTypeFeedbackChanged(Isolate* isolate, Address address, | 175 static void OnTypeFeedbackChanged(Isolate* isolate, Address address, |
175 State old_state, State new_state, | 176 State old_state, State new_state, |
176 bool target_remains_ic_stub); | 177 bool target_remains_ic_stub); |
(...skipping 589 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
766 | 767 |
767 // Support functions for interceptor handlers. | 768 // Support functions for interceptor handlers. |
768 DECLARE_RUNTIME_FUNCTION(LoadPropertyWithInterceptorOnly); | 769 DECLARE_RUNTIME_FUNCTION(LoadPropertyWithInterceptorOnly); |
769 DECLARE_RUNTIME_FUNCTION(LoadPropertyWithInterceptor); | 770 DECLARE_RUNTIME_FUNCTION(LoadPropertyWithInterceptor); |
770 DECLARE_RUNTIME_FUNCTION(LoadElementWithInterceptor); | 771 DECLARE_RUNTIME_FUNCTION(LoadElementWithInterceptor); |
771 DECLARE_RUNTIME_FUNCTION(StorePropertyWithInterceptor); | 772 DECLARE_RUNTIME_FUNCTION(StorePropertyWithInterceptor); |
772 } | 773 } |
773 } // namespace v8::internal | 774 } // namespace v8::internal |
774 | 775 |
775 #endif // V8_IC_H_ | 776 #endif // V8_IC_H_ |
OLD | NEW |