OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef V8_AST_H_ | 5 #ifndef V8_AST_H_ |
6 #define V8_AST_H_ | 6 #define V8_AST_H_ |
7 | 7 |
8 #include "src/v8.h" | 8 #include "src/v8.h" |
9 | 9 |
10 #include "src/assembler.h" | 10 #include "src/assembler.h" |
(...skipping 3349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3360 VariableProxy* NewVariableProxy(Variable* var, | 3360 VariableProxy* NewVariableProxy(Variable* var, |
3361 int start_position = RelocInfo::kNoPosition, | 3361 int start_position = RelocInfo::kNoPosition, |
3362 int end_position = RelocInfo::kNoPosition) { | 3362 int end_position = RelocInfo::kNoPosition) { |
3363 return new (zone_) VariableProxy(zone_, var, start_position, end_position); | 3363 return new (zone_) VariableProxy(zone_, var, start_position, end_position); |
3364 } | 3364 } |
3365 | 3365 |
3366 VariableProxy* NewVariableProxy(const AstRawString* name, | 3366 VariableProxy* NewVariableProxy(const AstRawString* name, |
3367 Variable::Kind variable_kind, | 3367 Variable::Kind variable_kind, |
3368 int start_position = RelocInfo::kNoPosition, | 3368 int start_position = RelocInfo::kNoPosition, |
3369 int end_position = RelocInfo::kNoPosition) { | 3369 int end_position = RelocInfo::kNoPosition) { |
| 3370 DCHECK_NOT_NULL(name); |
3370 return new (zone_) | 3371 return new (zone_) |
3371 VariableProxy(zone_, name, variable_kind, start_position, end_position); | 3372 VariableProxy(zone_, name, variable_kind, start_position, end_position); |
3372 } | 3373 } |
3373 | 3374 |
3374 Property* NewProperty(Expression* obj, Expression* key, int pos) { | 3375 Property* NewProperty(Expression* obj, Expression* key, int pos) { |
3375 return new (zone_) Property(zone_, obj, key, pos); | 3376 return new (zone_) Property(zone_, obj, key, pos); |
3376 } | 3377 } |
3377 | 3378 |
3378 Call* NewCall(Expression* expression, | 3379 Call* NewCall(Expression* expression, |
3379 ZoneList<Expression*>* arguments, | 3380 ZoneList<Expression*>* arguments, |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3502 | 3503 |
3503 private: | 3504 private: |
3504 Zone* zone_; | 3505 Zone* zone_; |
3505 AstValueFactory* ast_value_factory_; | 3506 AstValueFactory* ast_value_factory_; |
3506 }; | 3507 }; |
3507 | 3508 |
3508 | 3509 |
3509 } } // namespace v8::internal | 3510 } } // namespace v8::internal |
3510 | 3511 |
3511 #endif // V8_AST_H_ | 3512 #endif // V8_AST_H_ |
OLD | NEW |