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 754 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
765 virtual bool IsInlineable() const; | 765 virtual bool IsInlineable() const; |
766 | 766 |
767 private: | 767 private: |
768 Block* try_block_; | 768 Block* try_block_; |
769 ZoneList<Label*>* escaping_targets_; | 769 ZoneList<Label*>* escaping_targets_; |
770 }; | 770 }; |
771 | 771 |
772 | 772 |
773 class TryCatchStatement: public TryStatement { | 773 class TryCatchStatement: public TryStatement { |
774 public: | 774 public: |
775 TryCatchStatement(Block* try_block, Handle<String> name, Block* catch_block) | 775 TryCatchStatement(Block* try_block, |
| 776 Scope* scope, |
| 777 Variable* variable, |
| 778 Block* catch_block) |
776 : TryStatement(try_block), | 779 : TryStatement(try_block), |
777 name_(name), | 780 scope_(scope), |
| 781 variable_(variable), |
778 catch_block_(catch_block) { | 782 catch_block_(catch_block) { |
779 } | 783 } |
780 | 784 |
781 DECLARE_NODE_TYPE(TryCatchStatement) | 785 DECLARE_NODE_TYPE(TryCatchStatement) |
782 | 786 |
| 787 Scope* scope() { return scope_; } |
| 788 Variable* variable() { return variable_; } |
783 Block* catch_block() const { return catch_block_; } | 789 Block* catch_block() const { return catch_block_; } |
784 Handle<String> name() const { return name_; } | |
785 virtual bool IsInlineable() const; | 790 virtual bool IsInlineable() const; |
786 | 791 |
787 private: | 792 private: |
788 Handle<String> name_; | 793 Scope* scope_; |
| 794 Variable* variable_; |
789 Block* catch_block_; | 795 Block* catch_block_; |
790 }; | 796 }; |
791 | 797 |
792 | 798 |
793 class TryFinallyStatement: public TryStatement { | 799 class TryFinallyStatement: public TryStatement { |
794 public: | 800 public: |
795 TryFinallyStatement(Block* try_block, Block* finally_block) | 801 TryFinallyStatement(Block* try_block, Block* finally_block) |
796 : TryStatement(try_block), | 802 : TryStatement(try_block), |
797 finally_block_(finally_block) { } | 803 finally_block_(finally_block) { } |
798 | 804 |
(...skipping 1340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2139 | 2145 |
2140 private: | 2146 private: |
2141 Isolate* isolate_; | 2147 Isolate* isolate_; |
2142 bool stack_overflow_; | 2148 bool stack_overflow_; |
2143 }; | 2149 }; |
2144 | 2150 |
2145 | 2151 |
2146 } } // namespace v8::internal | 2152 } } // namespace v8::internal |
2147 | 2153 |
2148 #endif // V8_AST_H_ | 2154 #endif // V8_AST_H_ |
OLD | NEW |