| 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 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 class Expression: public Node { | 143 class Expression: public Node { |
| 144 public: | 144 public: |
| 145 virtual Expression* AsExpression() { return this; } | 145 virtual Expression* AsExpression() { return this; } |
| 146 | 146 |
| 147 virtual bool IsValidLeftHandSide() { return false; } | 147 virtual bool IsValidLeftHandSide() { return false; } |
| 148 | 148 |
| 149 // Mark the expression as being compiled as an expression | 149 // Mark the expression as being compiled as an expression |
| 150 // statement. This is used to transform postfix increments to | 150 // statement. This is used to transform postfix increments to |
| 151 // (faster) prefix increments. | 151 // (faster) prefix increments. |
| 152 virtual void MarkAsStatement() { /* do nothing */ } | 152 virtual void MarkAsStatement() { /* do nothing */ } |
| 153 |
| 154 // Static type information for this expression. |
| 155 StaticType* type() { return &type_; } |
| 156 |
| 157 private: |
| 158 StaticType type_; |
| 153 }; | 159 }; |
| 154 | 160 |
| 155 | 161 |
| 156 /** | 162 /** |
| 157 * A sentinel used during pre parsing that represents some expression | 163 * A sentinel used during pre parsing that represents some expression |
| 158 * that is a valid left hand side without having to actually build | 164 * that is a valid left hand side without having to actually build |
| 159 * the expression. | 165 * the expression. |
| 160 */ | 166 */ |
| 161 class ValidLeftHandSideSentinel: public Expression { | 167 class ValidLeftHandSideSentinel: public Expression { |
| 162 public: | 168 public: |
| (...skipping 1055 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1218 #undef DEF_VISIT | 1224 #undef DEF_VISIT |
| 1219 | 1225 |
| 1220 private: | 1226 private: |
| 1221 bool stack_overflow_; | 1227 bool stack_overflow_; |
| 1222 }; | 1228 }; |
| 1223 | 1229 |
| 1224 | 1230 |
| 1225 } } // namespace v8::internal | 1231 } } // namespace v8::internal |
| 1226 | 1232 |
| 1227 #endif // V8_AST_H_ | 1233 #endif // V8_AST_H_ |
| OLD | NEW |