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_STATE_H_ | 5 #ifndef V8_IC_STATE_H_ |
6 #define V8_IC_STATE_H_ | 6 #define V8_IC_STATE_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 class ICUtility : public AllStatic { | 17 class ICUtility : public AllStatic { |
18 public: | 18 public: |
19 // Clear the inline cache to initial state. | 19 // Clear the inline cache to initial state. |
20 static void Clear(Isolate* isolate, Address address, | 20 static void Clear(Isolate* isolate, Address address, |
21 ConstantPoolArray* constant_pool); | 21 ConstantPoolArray* constant_pool); |
22 // Clear a vector-based inline cache to initial state. | |
23 template <class Nexus> | |
24 static void Clear(Isolate* isolate, Code::Kind kind, Code* host, | |
25 Nexus* nexus); | |
26 }; | 22 }; |
27 | 23 |
28 | 24 |
29 class CallICState FINAL BASE_EMBEDDED { | 25 class CallICState FINAL BASE_EMBEDDED { |
30 public: | 26 public: |
31 explicit CallICState(ExtraICState extra_ic_state); | 27 explicit CallICState(ExtraICState extra_ic_state); |
32 | 28 |
33 enum CallType { METHOD, FUNCTION }; | 29 enum CallType { METHOD, FUNCTION }; |
34 | 30 |
35 CallICState(int argc, CallType call_type) | 31 CallICState(int argc, CallType call_type) |
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
233 private: | 229 private: |
234 class ContextualModeBits : public BitField<ContextualMode, 0, 1> {}; | 230 class ContextualModeBits : public BitField<ContextualMode, 0, 1> {}; |
235 STATIC_ASSERT(static_cast<int>(NOT_CONTEXTUAL) == 0); | 231 STATIC_ASSERT(static_cast<int>(NOT_CONTEXTUAL) == 0); |
236 | 232 |
237 const ExtraICState state_; | 233 const ExtraICState state_; |
238 }; | 234 }; |
239 } | 235 } |
240 } | 236 } |
241 | 237 |
242 #endif // V8_IC_STATE_H_ | 238 #endif // V8_IC_STATE_H_ |
OLD | NEW |