OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 643 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
654 CHECK(!is_default()); | 654 CHECK(!is_default()); |
655 return label_; | 655 return label_; |
656 } | 656 } |
657 Label* body_target() { return &body_target_; } | 657 Label* body_target() { return &body_target_; } |
658 ZoneList<Statement*>* statements() const { return statements_; } | 658 ZoneList<Statement*>* statements() const { return statements_; } |
659 | 659 |
660 int position() const { return position_; } | 660 int position() const { return position_; } |
661 void set_position(int pos) { position_ = pos; } | 661 void set_position(int pos) { position_ = pos; } |
662 | 662 |
663 int EntryId() { return entry_id_; } | 663 int EntryId() { return entry_id_; } |
| 664 int CompareId() { return compare_id_; } |
664 | 665 |
665 // Type feedback information. | 666 // Type feedback information. |
666 void RecordTypeFeedback(TypeFeedbackOracle* oracle); | 667 void RecordTypeFeedback(TypeFeedbackOracle* oracle); |
667 bool IsSmiCompare() { return compare_type_ == SMI_ONLY; } | 668 bool IsSmiCompare() { return compare_type_ == SMI_ONLY; } |
668 bool IsObjectCompare() { return compare_type_ == OBJECT_ONLY; } | 669 bool IsObjectCompare() { return compare_type_ == OBJECT_ONLY; } |
669 | 670 |
670 private: | 671 private: |
671 Expression* label_; | 672 Expression* label_; |
672 Label body_target_; | 673 Label body_target_; |
673 ZoneList<Statement*>* statements_; | 674 ZoneList<Statement*>* statements_; |
674 int position_; | 675 int position_; |
675 enum CompareTypeFeedback { NONE, SMI_ONLY, OBJECT_ONLY }; | 676 enum CompareTypeFeedback { NONE, SMI_ONLY, OBJECT_ONLY }; |
676 CompareTypeFeedback compare_type_; | 677 CompareTypeFeedback compare_type_; |
| 678 int compare_id_; |
677 int entry_id_; | 679 int entry_id_; |
678 }; | 680 }; |
679 | 681 |
680 | 682 |
681 class SwitchStatement: public BreakableStatement { | 683 class SwitchStatement: public BreakableStatement { |
682 public: | 684 public: |
683 explicit inline SwitchStatement(ZoneStringList* labels); | 685 explicit inline SwitchStatement(ZoneStringList* labels); |
684 | 686 |
685 DECLARE_NODE_TYPE(SwitchStatement) | 687 DECLARE_NODE_TYPE(SwitchStatement) |
686 | 688 |
(...skipping 1489 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2176 | 2178 |
2177 private: | 2179 private: |
2178 Isolate* isolate_; | 2180 Isolate* isolate_; |
2179 bool stack_overflow_; | 2181 bool stack_overflow_; |
2180 }; | 2182 }; |
2181 | 2183 |
2182 | 2184 |
2183 } } // namespace v8::internal | 2185 } } // namespace v8::internal |
2184 | 2186 |
2185 #endif // V8_AST_H_ | 2187 #endif // V8_AST_H_ |
OLD | NEW |