| 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 666 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 677 | 677 |
| 678 int position() const { return position_; } | 678 int position() const { return position_; } |
| 679 void set_position(int pos) { position_ = pos; } | 679 void set_position(int pos) { position_ = pos; } |
| 680 | 680 |
| 681 int EntryId() { return entry_id_; } | 681 int EntryId() { return entry_id_; } |
| 682 int CompareId() { return compare_id_; } | 682 int CompareId() { return compare_id_; } |
| 683 | 683 |
| 684 // Type feedback information. | 684 // Type feedback information. |
| 685 void RecordTypeFeedback(TypeFeedbackOracle* oracle); | 685 void RecordTypeFeedback(TypeFeedbackOracle* oracle); |
| 686 bool IsSmiCompare() { return compare_type_ == SMI_ONLY; } | 686 bool IsSmiCompare() { return compare_type_ == SMI_ONLY; } |
| 687 bool IsSymbolCompare() { return compare_type_ == SYMBOL_ONLY; } |
| 688 bool IsStringCompare() { return compare_type_ == STRING_ONLY; } |
| 687 bool IsObjectCompare() { return compare_type_ == OBJECT_ONLY; } | 689 bool IsObjectCompare() { return compare_type_ == OBJECT_ONLY; } |
| 688 | 690 |
| 689 private: | 691 private: |
| 690 Expression* label_; | 692 Expression* label_; |
| 691 Label body_target_; | 693 Label body_target_; |
| 692 ZoneList<Statement*>* statements_; | 694 ZoneList<Statement*>* statements_; |
| 693 int position_; | 695 int position_; |
| 694 enum CompareTypeFeedback { NONE, SMI_ONLY, OBJECT_ONLY }; | 696 enum CompareTypeFeedback { |
| 697 NONE, |
| 698 SMI_ONLY, |
| 699 SYMBOL_ONLY, |
| 700 STRING_ONLY, |
| 701 OBJECT_ONLY |
| 702 }; |
| 695 CompareTypeFeedback compare_type_; | 703 CompareTypeFeedback compare_type_; |
| 696 int compare_id_; | 704 int compare_id_; |
| 697 int entry_id_; | 705 int entry_id_; |
| 698 }; | 706 }; |
| 699 | 707 |
| 700 | 708 |
| 701 class SwitchStatement: public BreakableStatement { | 709 class SwitchStatement: public BreakableStatement { |
| 702 public: | 710 public: |
| 703 inline SwitchStatement(Isolate* isolate, ZoneStringList* labels); | 711 inline SwitchStatement(Isolate* isolate, ZoneStringList* labels); |
| 704 | 712 |
| (...skipping 1399 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2104 | 2112 |
| 2105 private: | 2113 private: |
| 2106 Isolate* isolate_; | 2114 Isolate* isolate_; |
| 2107 bool stack_overflow_; | 2115 bool stack_overflow_; |
| 2108 }; | 2116 }; |
| 2109 | 2117 |
| 2110 | 2118 |
| 2111 } } // namespace v8::internal | 2119 } } // namespace v8::internal |
| 2112 | 2120 |
| 2113 #endif // V8_AST_H_ | 2121 #endif // V8_AST_H_ |
| OLD | NEW |