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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 V(DebuggerStatement) \ | 70 V(DebuggerStatement) \ |
71 V(FunctionLiteral) \ | 71 V(FunctionLiteral) \ |
72 V(FunctionBoilerplateLiteral) \ | 72 V(FunctionBoilerplateLiteral) \ |
73 V(Conditional) \ | 73 V(Conditional) \ |
74 V(Slot) \ | 74 V(Slot) \ |
75 V(VariableProxy) \ | 75 V(VariableProxy) \ |
76 V(Literal) \ | 76 V(Literal) \ |
77 V(RegExpLiteral) \ | 77 V(RegExpLiteral) \ |
78 V(ObjectLiteral) \ | 78 V(ObjectLiteral) \ |
79 V(ArrayLiteral) \ | 79 V(ArrayLiteral) \ |
| 80 V(CatchExtensionObject) \ |
80 V(Assignment) \ | 81 V(Assignment) \ |
81 V(Throw) \ | 82 V(Throw) \ |
82 V(Property) \ | 83 V(Property) \ |
83 V(Call) \ | 84 V(Call) \ |
84 V(CallEval) \ | 85 V(CallEval) \ |
85 V(CallNew) \ | 86 V(CallNew) \ |
86 V(CallRuntime) \ | 87 V(CallRuntime) \ |
87 V(UnaryOperation) \ | 88 V(UnaryOperation) \ |
88 V(CountOperation) \ | 89 V(CountOperation) \ |
89 V(BinaryOperation) \ | 90 V(BinaryOperation) \ |
(...skipping 625 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
715 | 716 |
716 Handle<FixedArray> literals() const { return literals_; } | 717 Handle<FixedArray> literals() const { return literals_; } |
717 ZoneList<Expression*>* values() const { return values_; } | 718 ZoneList<Expression*>* values() const { return values_; } |
718 | 719 |
719 private: | 720 private: |
720 Handle<FixedArray> literals_; | 721 Handle<FixedArray> literals_; |
721 ZoneList<Expression*>* values_; | 722 ZoneList<Expression*>* values_; |
722 }; | 723 }; |
723 | 724 |
724 | 725 |
| 726 // Node for constructing a context extension object for a catch block. |
| 727 // The catch context extension object has one property, the catch |
| 728 // variable, which should be DontDelete. |
| 729 class CatchExtensionObject: public Expression { |
| 730 public: |
| 731 CatchExtensionObject(Literal* key, VariableProxy* value) |
| 732 : key_(key), value_(value) { |
| 733 } |
| 734 |
| 735 virtual void Accept(AstVisitor* v); |
| 736 |
| 737 Literal* key() const { return key_; } |
| 738 VariableProxy* value() const { return value_; } |
| 739 |
| 740 private: |
| 741 Literal* key_; |
| 742 VariableProxy* value_; |
| 743 }; |
| 744 |
| 745 |
725 class VariableProxy: public Expression { | 746 class VariableProxy: public Expression { |
726 public: | 747 public: |
727 virtual void Accept(AstVisitor* v); | 748 virtual void Accept(AstVisitor* v); |
728 | 749 |
729 // Type testing & conversion | 750 // Type testing & conversion |
730 virtual Property* AsProperty() { | 751 virtual Property* AsProperty() { |
731 return var_ == NULL ? NULL : var_->AsProperty(); | 752 return var_ == NULL ? NULL : var_->AsProperty(); |
732 } | 753 } |
733 virtual VariableProxy* AsVariableProxy() { return this; } | 754 virtual VariableProxy* AsVariableProxy() { return this; } |
734 | 755 |
(...skipping 851 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1586 #undef DEF_VISIT | 1607 #undef DEF_VISIT |
1587 | 1608 |
1588 private: | 1609 private: |
1589 bool stack_overflow_; | 1610 bool stack_overflow_; |
1590 }; | 1611 }; |
1591 | 1612 |
1592 | 1613 |
1593 } } // namespace v8::internal | 1614 } } // namespace v8::internal |
1594 | 1615 |
1595 #endif // V8_AST_H_ | 1616 #endif // V8_AST_H_ |
OLD | NEW |