| 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 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 203 // code generation. | 203 // code generation. |
| 204 kUninitialized, | 204 kUninitialized, |
| 205 // Evaluated for its side effects. | 205 // Evaluated for its side effects. |
| 206 kEffect, | 206 kEffect, |
| 207 // Evaluated for its value (and side effects). | 207 // Evaluated for its value (and side effects). |
| 208 kValue, | 208 kValue, |
| 209 // Evaluated for control flow (and side effects). | 209 // Evaluated for control flow (and side effects). |
| 210 kTest | 210 kTest |
| 211 }; | 211 }; |
| 212 | 212 |
| 213 Expression() : id_(GetNextId()) {} | 213 Expression() : id_(GetNextId()), test_id_(GetNextId()) {} |
| 214 | 214 |
| 215 virtual int position() const { | 215 virtual int position() const { |
| 216 UNREACHABLE(); | 216 UNREACHABLE(); |
| 217 return 0; | 217 return 0; |
| 218 } | 218 } |
| 219 | 219 |
| 220 virtual Expression* AsExpression() { return this; } | 220 virtual Expression* AsExpression() { return this; } |
| 221 | 221 |
| 222 virtual bool IsTrivial() { return false; } | 222 virtual bool IsTrivial() { return false; } |
| 223 virtual bool IsValidLeftHandSide() { return false; } | 223 virtual bool IsValidLeftHandSide() { return false; } |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 262 } | 262 } |
| 263 | 263 |
| 264 ExternalArrayType external_array_type() const { | 264 ExternalArrayType external_array_type() const { |
| 265 return external_array_type_; | 265 return external_array_type_; |
| 266 } | 266 } |
| 267 void set_external_array_type(ExternalArrayType array_type) { | 267 void set_external_array_type(ExternalArrayType array_type) { |
| 268 external_array_type_ = array_type; | 268 external_array_type_ = array_type; |
| 269 } | 269 } |
| 270 | 270 |
| 271 unsigned id() const { return id_; } | 271 unsigned id() const { return id_; } |
| 272 unsigned test_id() const { return test_id_; } |
| 272 | 273 |
| 273 private: | 274 private: |
| 274 ExternalArrayType external_array_type_; | 275 ExternalArrayType external_array_type_; |
| 275 unsigned id_; | 276 unsigned id_; |
| 277 unsigned test_id_; |
| 276 }; | 278 }; |
| 277 | 279 |
| 278 | 280 |
| 279 /** | 281 /** |
| 280 * A sentinel used during pre parsing that represents some expression | 282 * A sentinel used during pre parsing that represents some expression |
| 281 * that is a valid left hand side without having to actually build | 283 * that is a valid left hand side without having to actually build |
| 282 * the expression. | 284 * the expression. |
| 283 */ | 285 */ |
| 284 class ValidLeftHandSideSentinel: public Expression { | 286 class ValidLeftHandSideSentinel: public Expression { |
| 285 public: | 287 public: |
| (...skipping 1866 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2152 | 2154 |
| 2153 private: | 2155 private: |
| 2154 Isolate* isolate_; | 2156 Isolate* isolate_; |
| 2155 bool stack_overflow_; | 2157 bool stack_overflow_; |
| 2156 }; | 2158 }; |
| 2157 | 2159 |
| 2158 | 2160 |
| 2159 } } // namespace v8::internal | 2161 } } // namespace v8::internal |
| 2160 | 2162 |
| 2161 #endif // V8_AST_H_ | 2163 #endif // V8_AST_H_ |
| OLD | NEW |