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/assembler.h" | 8 #include "src/assembler.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 1465 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1476 DCHECK_LT(offset, static_cast<int>(arraysize(slots_))); | 1476 DCHECK_LT(offset, static_cast<int>(arraysize(slots_))); |
1477 return slots_[offset]; | 1477 return slots_[offset]; |
1478 } | 1478 } |
1479 void SetSlot(FeedbackVectorSlot slot, int offset = 0) { | 1479 void SetSlot(FeedbackVectorSlot slot, int offset = 0) { |
1480 DCHECK_LT(offset, static_cast<int>(arraysize(slots_))); | 1480 DCHECK_LT(offset, static_cast<int>(arraysize(slots_))); |
1481 slots_[offset] = slot; | 1481 slots_[offset] = slot; |
1482 } | 1482 } |
1483 | 1483 |
1484 void set_receiver_type(Handle<Map> map) { receiver_type_ = map; } | 1484 void set_receiver_type(Handle<Map> map) { receiver_type_ = map; } |
1485 | 1485 |
| 1486 bool NeedsSetFunctionName() const { |
| 1487 return is_computed_name_ && value_->IsAnonymousFunctionDefinition(); |
| 1488 } |
| 1489 |
1486 protected: | 1490 protected: |
1487 friend class AstNodeFactory; | 1491 friend class AstNodeFactory; |
1488 | 1492 |
1489 ObjectLiteralProperty(Expression* key, Expression* value, Kind kind, | 1493 ObjectLiteralProperty(Expression* key, Expression* value, Kind kind, |
1490 bool is_static, bool is_computed_name); | 1494 bool is_static, bool is_computed_name); |
1491 ObjectLiteralProperty(AstValueFactory* ast_value_factory, Expression* key, | 1495 ObjectLiteralProperty(AstValueFactory* ast_value_factory, Expression* key, |
1492 Expression* value, bool is_static, | 1496 Expression* value, bool is_static, |
1493 bool is_computed_name); | 1497 bool is_computed_name); |
1494 | 1498 |
1495 private: | 1499 private: |
(...skipping 2065 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3561 // the parser-level zone. | 3565 // the parser-level zone. |
3562 Zone* parser_zone_; | 3566 Zone* parser_zone_; |
3563 AstValueFactory* ast_value_factory_; | 3567 AstValueFactory* ast_value_factory_; |
3564 }; | 3568 }; |
3565 | 3569 |
3566 | 3570 |
3567 } // namespace internal | 3571 } // namespace internal |
3568 } // namespace v8 | 3572 } // namespace v8 |
3569 | 3573 |
3570 #endif // V8_AST_AST_H_ | 3574 #endif // V8_AST_AST_H_ |
OLD | NEW |