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/macro-assembler.h" | 8 #include "src/macro-assembler.h" |
9 | 9 |
10 namespace v8 { | 10 namespace v8 { |
11 namespace internal { | 11 namespace internal { |
12 | 12 |
13 | 13 |
14 const int kMaxKeyedPolymorphism = 4; | 14 const int kMaxKeyedPolymorphism = 4; |
15 | 15 |
16 | 16 |
17 // IC_UTIL_LIST defines all utility functions called from generated | 17 // IC_UTIL_LIST defines all utility functions called from generated |
18 // inline caching code. The argument for the macro, ICU, is the function name. | 18 // inline caching code. The argument for the macro, ICU, is the function name. |
19 #define IC_UTIL_LIST(ICU) \ | 19 #define IC_UTIL_LIST(ICU) \ |
20 ICU(LoadIC_Miss) \ | 20 ICU(LoadIC_Miss) \ |
21 ICU(KeyedLoadIC_Miss) \ | 21 ICU(KeyedLoadIC_Miss) \ |
22 ICU(CallIC_Miss) \ | 22 ICU(CallIC_Miss) \ |
23 ICU(CallIC_Customization_Miss) \ | 23 ICU(CallIC_Customization_Miss) \ |
24 ICU(StoreIC_Miss) \ | 24 ICU(StoreIC_Miss) \ |
25 ICU(StoreIC_ArrayLength) \ | 25 ICU(StoreIC_ArrayLength) \ |
26 ICU(StoreIC_Slow) \ | 26 ICU(StoreIC_Slow) \ |
27 ICU(SharedStoreIC_ExtendStorage) \ | 27 ICU(SharedStoreIC_ExtendStorage) \ |
28 ICU(KeyedStoreIC_Miss) \ | 28 ICU(KeyedStoreIC_Miss) \ |
29 ICU(KeyedStoreIC_Slow) \ | 29 ICU(KeyedStoreIC_Slow) \ |
30 /* Utilities for IC stubs. */ \ | 30 /* Utilities for IC stubs. */ \ |
31 ICU(StoreCallbackProperty) \ | 31 ICU(StoreCallbackProperty) \ |
32 ICU(LoadPropertyWithInterceptorOnly) \ | 32 ICU(LoadPropertyWithInterceptorOnly) \ |
33 ICU(LoadPropertyWithInterceptor) \ | 33 ICU(LoadPropertyWithInterceptor) \ |
34 ICU(KeyedLoadPropertyWithInterceptor) \ | 34 ICU(LoadElementWithInterceptor) \ |
35 ICU(StoreInterceptorProperty) \ | 35 ICU(StorePropertyWithInterceptor) \ |
36 ICU(CompareIC_Miss) \ | 36 ICU(CompareIC_Miss) \ |
37 ICU(BinaryOpIC_Miss) \ | 37 ICU(BinaryOpIC_Miss) \ |
38 ICU(CompareNilIC_Miss) \ | 38 ICU(CompareNilIC_Miss) \ |
39 ICU(Unreachable) \ | 39 ICU(Unreachable) \ |
40 ICU(ToBooleanIC_Miss) | 40 ICU(ToBooleanIC_Miss) |
41 // | 41 // |
42 // IC is the base class for LoadIC, StoreIC, KeyedLoadIC, and KeyedStoreIC. | 42 // IC is the base class for LoadIC, StoreIC, KeyedLoadIC, and KeyedStoreIC. |
43 // | 43 // |
44 class IC { | 44 class IC { |
45 public: | 45 public: |
46 // The ids for utility called from the generated code. | 46 // The ids for utility called from the generated code. |
47 enum UtilityId { | 47 enum UtilityId { |
48 #define CONST_NAME(name) k##name, | 48 #define CONST_NAME(name) k##name, |
49 IC_UTIL_LIST(CONST_NAME) | 49 IC_UTIL_LIST(CONST_NAME) |
(...skipping 975 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1025 DECLARE_RUNTIME_FUNCTION(ElementsTransitionAndStoreIC_Miss); | 1025 DECLARE_RUNTIME_FUNCTION(ElementsTransitionAndStoreIC_Miss); |
1026 DECLARE_RUNTIME_FUNCTION(BinaryOpIC_Miss); | 1026 DECLARE_RUNTIME_FUNCTION(BinaryOpIC_Miss); |
1027 DECLARE_RUNTIME_FUNCTION(BinaryOpIC_MissWithAllocationSite); | 1027 DECLARE_RUNTIME_FUNCTION(BinaryOpIC_MissWithAllocationSite); |
1028 DECLARE_RUNTIME_FUNCTION(CompareNilIC_Miss); | 1028 DECLARE_RUNTIME_FUNCTION(CompareNilIC_Miss); |
1029 DECLARE_RUNTIME_FUNCTION(ToBooleanIC_Miss); | 1029 DECLARE_RUNTIME_FUNCTION(ToBooleanIC_Miss); |
1030 | 1030 |
1031 | 1031 |
1032 } } // namespace v8::internal | 1032 } } // namespace v8::internal |
1033 | 1033 |
1034 #endif // V8_IC_H_ | 1034 #endif // V8_IC_H_ |
OLD | NEW |