OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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_SCOPEINFO_H_ | 5 #ifndef V8_SCOPEINFO_H_ |
6 #define V8_SCOPEINFO_H_ | 6 #define V8_SCOPEINFO_H_ |
7 | 7 |
8 #include "allocation.h" | 8 #include "src/allocation.h" |
9 #include "variables.h" | 9 #include "src/variables.h" |
10 #include "zone-inl.h" | 10 #include "src/zone-inl.h" |
11 | 11 |
12 namespace v8 { | 12 namespace v8 { |
13 namespace internal { | 13 namespace internal { |
14 | 14 |
15 // Cache for mapping (data, property name) into context slot index. | 15 // Cache for mapping (data, property name) into context slot index. |
16 // The cache contains both positive and negative results. | 16 // The cache contains both positive and negative results. |
17 // Slot index equals -1 means the property is absent. | 17 // Slot index equals -1 means the property is absent. |
18 // Cleared at startup and prior to mark sweep collection. | 18 // Cleared at startup and prior to mark sweep collection. |
19 class ContextSlotCache { | 19 class ContextSlotCache { |
20 public: | 20 public: |
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 } | 164 } |
165 void set_index(int i, int index) { | 165 void set_index(int i, int index) { |
166 set(index_offset(i), Smi::FromInt(index)); | 166 set(index_offset(i), Smi::FromInt(index)); |
167 } | 167 } |
168 }; | 168 }; |
169 | 169 |
170 | 170 |
171 } } // namespace v8::internal | 171 } } // namespace v8::internal |
172 | 172 |
173 #endif // V8_SCOPEINFO_H_ | 173 #endif // V8_SCOPEINFO_H_ |
OLD | NEW |