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_H_ | 5 #ifndef V8_AST_H_ |
6 #define V8_AST_H_ | 6 #define V8_AST_H_ |
7 | 7 |
8 #include "src/assembler.h" | 8 #include "src/assembler.h" |
9 #include "src/ast-value-factory.h" | 9 #include "src/ast-value-factory.h" |
10 #include "src/bailout-reason.h" | 10 #include "src/bailout-reason.h" |
(...skipping 2672 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2683 // Unlike other AST nodes, this number of bailout IDs allocated for an | 2683 // Unlike other AST nodes, this number of bailout IDs allocated for an |
2684 // ClassLiteral can vary, so num_ids() is not a static method. | 2684 // ClassLiteral can vary, so num_ids() is not a static method. |
2685 int num_ids() const { return parent_num_ids() + 4 + properties()->length(); } | 2685 int num_ids() const { return parent_num_ids() + 4 + properties()->length(); } |
2686 | 2686 |
2687 // Object literals need one feedback slot for each non-trivial value, as well | 2687 // Object literals need one feedback slot for each non-trivial value, as well |
2688 // as some slots for home objects. | 2688 // as some slots for home objects. |
2689 void AssignFeedbackVectorSlots(Isolate* isolate, FeedbackVectorSpec* spec, | 2689 void AssignFeedbackVectorSlots(Isolate* isolate, FeedbackVectorSpec* spec, |
2690 FeedbackVectorSlotCache* cache) override; | 2690 FeedbackVectorSlotCache* cache) override; |
2691 | 2691 |
2692 bool NeedsProxySlot() const { | 2692 bool NeedsProxySlot() const { |
2693 return FLAG_vector_stores && class_variable_proxy() != nullptr && | 2693 return class_variable_proxy() != nullptr && |
2694 class_variable_proxy()->var()->IsUnallocated(); | 2694 class_variable_proxy()->var()->IsUnallocated(); |
2695 } | 2695 } |
2696 | 2696 |
2697 FeedbackVectorSlot ProxySlot() const { return slot_; } | 2697 FeedbackVectorSlot ProxySlot() const { return slot_; } |
2698 | 2698 |
2699 protected: | 2699 protected: |
2700 ClassLiteral(Zone* zone, const AstRawString* name, Scope* scope, | 2700 ClassLiteral(Zone* zone, const AstRawString* name, Scope* scope, |
2701 VariableProxy* class_variable_proxy, Expression* extends, | 2701 VariableProxy* class_variable_proxy, Expression* extends, |
2702 FunctionLiteral* constructor, ZoneList<Property*>* properties, | 2702 FunctionLiteral* constructor, ZoneList<Property*>* properties, |
2703 int start_position, int end_position) | 2703 int start_position, int end_position) |
(...skipping 956 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3660 // the parser-level zone. | 3660 // the parser-level zone. |
3661 Zone* parser_zone_; | 3661 Zone* parser_zone_; |
3662 AstValueFactory* ast_value_factory_; | 3662 AstValueFactory* ast_value_factory_; |
3663 }; | 3663 }; |
3664 | 3664 |
3665 | 3665 |
3666 } // namespace internal | 3666 } // namespace internal |
3667 } // namespace v8 | 3667 } // namespace v8 |
3668 | 3668 |
3669 #endif // V8_AST_H_ | 3669 #endif // V8_AST_H_ |
OLD | NEW |