OLD | NEW |
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 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 629 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
640 | 640 |
641 private: | 641 private: |
642 Block* try_block_; | 642 Block* try_block_; |
643 ZoneList<BreakTarget*>* escaping_targets_; | 643 ZoneList<BreakTarget*>* escaping_targets_; |
644 }; | 644 }; |
645 | 645 |
646 | 646 |
647 class TryCatchStatement: public TryStatement { | 647 class TryCatchStatement: public TryStatement { |
648 public: | 648 public: |
649 TryCatchStatement(Block* try_block, | 649 TryCatchStatement(Block* try_block, |
650 Expression* catch_var, | 650 VariableProxy* catch_var, |
651 Block* catch_block) | 651 Block* catch_block) |
652 : TryStatement(try_block), | 652 : TryStatement(try_block), |
653 catch_var_(catch_var), | 653 catch_var_(catch_var), |
654 catch_block_(catch_block) { | 654 catch_block_(catch_block) { |
655 ASSERT(catch_var->AsVariableProxy() != NULL); | 655 ASSERT(catch_var->AsVariableProxy() != NULL); |
656 } | 656 } |
657 | 657 |
658 virtual void Accept(AstVisitor* v); | 658 virtual void Accept(AstVisitor* v); |
659 | 659 |
660 Expression* catch_var() const { return catch_var_; } | 660 VariableProxy* catch_var() const { return catch_var_; } |
661 Block* catch_block() const { return catch_block_; } | 661 Block* catch_block() const { return catch_block_; } |
662 | 662 |
663 private: | 663 private: |
664 Expression* catch_var_; | 664 VariableProxy* catch_var_; |
665 Block* catch_block_; | 665 Block* catch_block_; |
666 }; | 666 }; |
667 | 667 |
668 | 668 |
669 class TryFinallyStatement: public TryStatement { | 669 class TryFinallyStatement: public TryStatement { |
670 public: | 670 public: |
671 TryFinallyStatement(Block* try_block, Block* finally_block) | 671 TryFinallyStatement(Block* try_block, Block* finally_block) |
672 : TryStatement(try_block), | 672 : TryStatement(try_block), |
673 finally_block_(finally_block) { } | 673 finally_block_(finally_block) { } |
674 | 674 |
(...skipping 1134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1809 #undef DEF_VISIT | 1809 #undef DEF_VISIT |
1810 | 1810 |
1811 private: | 1811 private: |
1812 bool stack_overflow_; | 1812 bool stack_overflow_; |
1813 }; | 1813 }; |
1814 | 1814 |
1815 | 1815 |
1816 } } // namespace v8::internal | 1816 } } // namespace v8::internal |
1817 | 1817 |
1818 #endif // V8_AST_H_ | 1818 #endif // V8_AST_H_ |
OLD | NEW |