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