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_AST_AST_H_ | 5 #ifndef V8_AST_AST_H_ |
6 #define V8_AST_AST_H_ | 6 #define V8_AST_AST_H_ |
7 | 7 |
8 #include "src/ast/ast-types.h" | 8 #include "src/ast/ast-types.h" |
9 #include "src/ast/ast-value-factory.h" | 9 #include "src/ast/ast-value-factory.h" |
10 #include "src/ast/modules.h" | 10 #include "src/ast/modules.h" |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 class IterationStatement; | 119 class IterationStatement; |
120 class MaterializedLiteral; | 120 class MaterializedLiteral; |
121 class Statement; | 121 class Statement; |
122 class TypeFeedbackOracle; | 122 class TypeFeedbackOracle; |
123 | 123 |
124 #define DEF_FORWARD_DECLARATION(type) class type; | 124 #define DEF_FORWARD_DECLARATION(type) class type; |
125 AST_NODE_LIST(DEF_FORWARD_DECLARATION) | 125 AST_NODE_LIST(DEF_FORWARD_DECLARATION) |
126 #undef DEF_FORWARD_DECLARATION | 126 #undef DEF_FORWARD_DECLARATION |
127 | 127 |
128 | 128 |
129 // Typedef only introduced to avoid unreadable code. | |
130 typedef ZoneList<Handle<String>> ZoneStringList; | |
131 typedef ZoneList<Handle<Object>> ZoneObjectList; | |
132 | |
133 | |
134 class FeedbackVectorSlotCache { | 129 class FeedbackVectorSlotCache { |
135 public: | 130 public: |
136 explicit FeedbackVectorSlotCache(Zone* zone) | 131 explicit FeedbackVectorSlotCache(Zone* zone) |
137 : hash_map_(base::HashMap::PointersMatch, | 132 : hash_map_(base::HashMap::PointersMatch, |
138 ZoneHashMap::kDefaultHashMapCapacity, | 133 ZoneHashMap::kDefaultHashMapCapacity, |
139 ZoneAllocationPolicy(zone)) {} | 134 ZoneAllocationPolicy(zone)) {} |
140 | 135 |
141 void Put(Variable* variable, FeedbackVectorSlot slot) { | 136 void Put(Variable* variable, FeedbackVectorSlot slot) { |
142 ZoneHashMap::Entry* entry = | 137 ZoneHashMap::Entry* entry = |
143 hash_map_.LookupOrInsert(variable, ComputePointerHash(variable)); | 138 hash_map_.LookupOrInsert(variable, ComputePointerHash(variable)); |
(...skipping 3468 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3612 : NULL; \ | 3607 : NULL; \ |
3613 } | 3608 } |
3614 AST_NODE_LIST(DECLARE_NODE_FUNCTIONS) | 3609 AST_NODE_LIST(DECLARE_NODE_FUNCTIONS) |
3615 #undef DECLARE_NODE_FUNCTIONS | 3610 #undef DECLARE_NODE_FUNCTIONS |
3616 | 3611 |
3617 | 3612 |
3618 } // namespace internal | 3613 } // namespace internal |
3619 } // namespace v8 | 3614 } // namespace v8 |
3620 | 3615 |
3621 #endif // V8_AST_AST_H_ | 3616 #endif // V8_AST_AST_H_ |
OLD | NEW |