| OLD | NEW |
| 1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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_INTERPRETER_CONSTANT_ARRAY_BUILDER_H_ | 5 #ifndef V8_INTERPRETER_CONSTANT_ARRAY_BUILDER_H_ |
| 6 #define V8_INTERPRETER_CONSTANT_ARRAY_BUILDER_H_ | 6 #define V8_INTERPRETER_CONSTANT_ARRAY_BUILDER_H_ |
| 7 | 7 |
| 8 #include "src/globals.h" | 8 #include "src/globals.h" |
| 9 #include "src/identity-map.h" | 9 #include "src/identity-map.h" |
| 10 #include "src/interpreter/bytecodes.h" | 10 #include "src/interpreter/bytecodes.h" |
| 11 #include "src/zone/zone-containers.h" | 11 #include "src/zone/zone-containers.h" |
| 12 | 12 |
| 13 namespace v8 { | 13 namespace v8 { |
| 14 namespace internal { | 14 namespace internal { |
| 15 | 15 |
| 16 class Isolate; | 16 class Isolate; |
| 17 class AstRawString; | 17 class AstRawString; |
| 18 class AstValue; | 18 class AstValue; |
| 19 | 19 |
| 20 namespace interpreter { | 20 namespace interpreter { |
| 21 | 21 |
| 22 // Constant array entries that represent singletons. | 22 // Constant array entries that represent singletons. |
| 23 #define SINGLETON_CONSTANT_ENTRY_TYPES(V) \ | 23 #define SINGLETON_CONSTANT_ENTRY_TYPES(V) \ |
| 24 V(IteratorSymbol, iterator_symbol) \ | 24 V(IteratorSymbol, iterator_symbol) \ |
| 25 V(HomeObjectSymbol, home_object_symbol) \ | 25 V(AsyncIteratorSymbol, async_iterator_symbol) \ |
| 26 V(HomeObjectSymbol, home_object_symbol) \ |
| 26 V(EmptyFixedArray, empty_fixed_array) | 27 V(EmptyFixedArray, empty_fixed_array) |
| 27 | 28 |
| 28 // A helper class for constructing constant arrays for the | 29 // A helper class for constructing constant arrays for the |
| 29 // interpreter. Each instance of this class is intended to be used to | 30 // interpreter. Each instance of this class is intended to be used to |
| 30 // generate exactly one FixedArray of constants via the ToFixedArray | 31 // generate exactly one FixedArray of constants via the ToFixedArray |
| 31 // method. | 32 // method. |
| 32 class V8_EXPORT_PRIVATE ConstantArrayBuilder final BASE_EMBEDDED { | 33 class V8_EXPORT_PRIVATE ConstantArrayBuilder final BASE_EMBEDDED { |
| 33 public: | 34 public: |
| 34 // Capacity of the 8-bit operand slice. | 35 // Capacity of the 8-bit operand slice. |
| 35 static const size_t k8BitCapacity = 1u << kBitsPerByte; | 36 static const size_t k8BitCapacity = 1u << kBitsPerByte; |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 190 #undef SINGLETON_ENTRY_FIELD | 191 #undef SINGLETON_ENTRY_FIELD |
| 191 | 192 |
| 192 Zone* zone_; | 193 Zone* zone_; |
| 193 }; | 194 }; |
| 194 | 195 |
| 195 } // namespace interpreter | 196 } // namespace interpreter |
| 196 } // namespace internal | 197 } // namespace internal |
| 197 } // namespace v8 | 198 } // namespace v8 |
| 198 | 199 |
| 199 #endif // V8_INTERPRETER_CONSTANT_ARRAY_BUILDER_H_ | 200 #endif // V8_INTERPRETER_CONSTANT_ARRAY_BUILDER_H_ |
| OLD | NEW |