OLD | NEW |
1 // Copyright 2016 the V8 project authors. All rights reserved. | 1 // Copyright 2016 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_AST_CONTEXT_SLOT_CACHE_H_ | 5 #ifndef V8_AST_CONTEXT_SLOT_CACHE_H_ |
6 #define V8_AST_CONTEXT_SLOT_CACHE_H_ | 6 #define V8_AST_CONTEXT_SLOT_CACHE_H_ |
7 | 7 |
8 #include "src/allocation.h" | 8 #include "src/allocation.h" |
9 #include "src/ast/modules.h" | 9 #include "src/ast/modules.h" |
10 #include "src/ast/variables.h" | |
11 | 10 |
12 namespace v8 { | 11 namespace v8 { |
13 namespace internal { | 12 namespace internal { |
14 | 13 |
15 // Cache for mapping (data, property name) into context slot index. | 14 // Cache for mapping (data, property name) into context slot index. |
16 // The cache contains both positive and negative results. | 15 // The cache contains both positive and negative results. |
17 // Slot index equals -1 means the property is absent. | 16 // Slot index equals -1 means the property is absent. |
18 // Cleared at startup and prior to mark sweep collection. | 17 // Cleared at startup and prior to mark sweep collection. |
19 class ContextSlotCache { | 18 class ContextSlotCache { |
20 public: | 19 public: |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 uint32_t values_[kLength]; | 103 uint32_t values_[kLength]; |
105 | 104 |
106 friend class Isolate; | 105 friend class Isolate; |
107 DISALLOW_COPY_AND_ASSIGN(ContextSlotCache); | 106 DISALLOW_COPY_AND_ASSIGN(ContextSlotCache); |
108 }; | 107 }; |
109 | 108 |
110 } // namespace internal | 109 } // namespace internal |
111 } // namespace v8 | 110 } // namespace v8 |
112 | 111 |
113 #endif // V8_AST_CONTEXT_SLOT_CACHE_H_ | 112 #endif // V8_AST_CONTEXT_SLOT_CACHE_H_ |
OLD | NEW |