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 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 void set_statement_pos(int statement_pos) { statement_pos_ = statement_pos; } | 155 void set_statement_pos(int statement_pos) { statement_pos_ = statement_pos; } |
156 int statement_pos() const { return statement_pos_; } | 156 int statement_pos() const { return statement_pos_; } |
157 | 157 |
158 private: | 158 private: |
159 int statement_pos_; | 159 int statement_pos_; |
160 }; | 160 }; |
161 | 161 |
162 | 162 |
163 class Expression: public AstNode { | 163 class Expression: public AstNode { |
164 public: | 164 public: |
165 Expression() : location_(Location::Temporary()) {} | 165 Expression() : location_(Location::Uninitialized()) {} |
166 | 166 |
167 virtual Expression* AsExpression() { return this; } | 167 virtual Expression* AsExpression() { return this; } |
168 | 168 |
169 virtual bool IsValidJSON() { return false; } | 169 virtual bool IsValidJSON() { return false; } |
170 virtual bool IsValidLeftHandSide() { return false; } | 170 virtual bool IsValidLeftHandSide() { return false; } |
171 | 171 |
172 // Mark the expression as being compiled as an expression | 172 // Mark the expression as being compiled as an expression |
173 // statement. This is used to transform postfix increments to | 173 // statement. This is used to transform postfix increments to |
174 // (faster) prefix increments. | 174 // (faster) prefix increments. |
175 virtual void MarkAsStatement() { /* do nothing */ } | 175 virtual void MarkAsStatement() { /* do nothing */ } |
(...skipping 1586 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1762 #undef DEF_VISIT | 1762 #undef DEF_VISIT |
1763 | 1763 |
1764 private: | 1764 private: |
1765 bool stack_overflow_; | 1765 bool stack_overflow_; |
1766 }; | 1766 }; |
1767 | 1767 |
1768 | 1768 |
1769 } } // namespace v8::internal | 1769 } } // namespace v8::internal |
1770 | 1770 |
1771 #endif // V8_AST_H_ | 1771 #endif // V8_AST_H_ |
OLD | NEW |