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_SCOPES_H_ | 5 #ifndef V8_AST_SCOPES_H_ |
6 #define V8_AST_SCOPES_H_ | 6 #define V8_AST_SCOPES_H_ |
7 | 7 |
8 #include "src/base/compiler-specific.h" | 8 #include "src/base/compiler-specific.h" |
9 #include "src/base/hashmap.h" | 9 #include "src/base/hashmap.h" |
10 #include "src/globals.h" | 10 #include "src/globals.h" |
(...skipping 879 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
890 // Convenience variable. | 890 // Convenience variable. |
891 Variable* receiver_; | 891 Variable* receiver_; |
892 // Function variable, if any; function scopes only. | 892 // Function variable, if any; function scopes only. |
893 Variable* function_; | 893 Variable* function_; |
894 // new.target variable, function scopes only. | 894 // new.target variable, function scopes only. |
895 Variable* new_target_; | 895 Variable* new_target_; |
896 // Convenience variable; function scopes only. | 896 // Convenience variable; function scopes only. |
897 Variable* arguments_; | 897 Variable* arguments_; |
898 | 898 |
899 struct RareData : public ZoneObject { | 899 struct RareData : public ZoneObject { |
900 void* operator new(size_t size, Zone* zone) { return zone->New(size); } | |
901 | |
902 // Convenience variable; Subclass constructor only | 900 // Convenience variable; Subclass constructor only |
903 Variable* this_function = nullptr; | 901 Variable* this_function = nullptr; |
904 | 902 |
905 // Generator object, if any; generator function scopes and module scopes | 903 // Generator object, if any; generator function scopes and module scopes |
906 // only. | 904 // only. |
907 Variable* generator_object = nullptr; | 905 Variable* generator_object = nullptr; |
908 // Promise, if any; async function scopes only. | 906 // Promise, if any; async function scopes only. |
909 Variable* promise = nullptr; | 907 Variable* promise = nullptr; |
910 }; | 908 }; |
911 | 909 |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
963 void AllocateModuleVariables(); | 961 void AllocateModuleVariables(); |
964 | 962 |
965 private: | 963 private: |
966 ModuleDescriptor* module_descriptor_; | 964 ModuleDescriptor* module_descriptor_; |
967 }; | 965 }; |
968 | 966 |
969 } // namespace internal | 967 } // namespace internal |
970 } // namespace v8 | 968 } // namespace v8 |
971 | 969 |
972 #endif // V8_AST_SCOPES_H_ | 970 #endif // V8_AST_SCOPES_H_ |
OLD | NEW |