| 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_AST_H_ | 5 #ifndef V8_AST_AST_H_ |
| 6 #define V8_AST_AST_H_ | 6 #define V8_AST_AST_H_ |
| 7 | 7 |
| 8 #include "src/ast/ast-value-factory.h" | 8 #include "src/ast/ast-value-factory.h" |
| 9 #include "src/ast/modules.h" | 9 #include "src/ast/modules.h" |
| 10 #include "src/ast/variables.h" | 10 #include "src/ast/variables.h" |
| (...skipping 3328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3339 materialized_literal_count, expected_property_count, parameter_count, | 3339 materialized_literal_count, expected_property_count, parameter_count, |
| 3340 function_type, has_duplicate_parameters, eager_compile_hint, kind, | 3340 function_type, has_duplicate_parameters, eager_compile_hint, kind, |
| 3341 position, true); | 3341 position, true); |
| 3342 } | 3342 } |
| 3343 | 3343 |
| 3344 // Creates a FunctionLiteral representing a top-level script, the | 3344 // Creates a FunctionLiteral representing a top-level script, the |
| 3345 // result of an eval (top-level or otherwise), or the result of calling | 3345 // result of an eval (top-level or otherwise), or the result of calling |
| 3346 // the Function constructor. | 3346 // the Function constructor. |
| 3347 FunctionLiteral* NewScriptOrEvalFunctionLiteral( | 3347 FunctionLiteral* NewScriptOrEvalFunctionLiteral( |
| 3348 DeclarationScope* scope, ZoneList<Statement*>* body, | 3348 DeclarationScope* scope, ZoneList<Statement*>* body, |
| 3349 int materialized_literal_count, int expected_property_count) { | 3349 int materialized_literal_count, int expected_property_count, |
| 3350 int parameter_count) { |
| 3350 return new (zone_) FunctionLiteral( | 3351 return new (zone_) FunctionLiteral( |
| 3351 zone_, ast_value_factory_->empty_string(), ast_value_factory_, scope, | 3352 zone_, ast_value_factory_->empty_string(), ast_value_factory_, scope, |
| 3352 body, materialized_literal_count, expected_property_count, 0, | 3353 body, materialized_literal_count, expected_property_count, |
| 3353 FunctionLiteral::kAnonymousExpression, | 3354 parameter_count, FunctionLiteral::kAnonymousExpression, |
| 3354 FunctionLiteral::kNoDuplicateParameters, | 3355 FunctionLiteral::kNoDuplicateParameters, |
| 3355 FunctionLiteral::kShouldLazyCompile, FunctionKind::kNormalFunction, 0, | 3356 FunctionLiteral::kShouldLazyCompile, FunctionKind::kNormalFunction, 0, |
| 3356 false); | 3357 false); |
| 3357 } | 3358 } |
| 3358 | 3359 |
| 3359 ClassLiteral* NewClassLiteral(VariableProxy* proxy, Expression* extends, | 3360 ClassLiteral* NewClassLiteral(VariableProxy* proxy, Expression* extends, |
| 3360 FunctionLiteral* constructor, | 3361 FunctionLiteral* constructor, |
| 3361 ZoneList<ObjectLiteral::Property*>* properties, | 3362 ZoneList<ObjectLiteral::Property*>* properties, |
| 3362 int start_position, int end_position) { | 3363 int start_position, int end_position) { |
| 3363 return new (zone_) ClassLiteral(proxy, extends, constructor, properties, | 3364 return new (zone_) ClassLiteral(proxy, extends, constructor, properties, |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3464 : NULL; \ | 3465 : NULL; \ |
| 3465 } | 3466 } |
| 3466 AST_NODE_LIST(DECLARE_NODE_FUNCTIONS) | 3467 AST_NODE_LIST(DECLARE_NODE_FUNCTIONS) |
| 3467 #undef DECLARE_NODE_FUNCTIONS | 3468 #undef DECLARE_NODE_FUNCTIONS |
| 3468 | 3469 |
| 3469 | 3470 |
| 3470 } // namespace internal | 3471 } // namespace internal |
| 3471 } // namespace v8 | 3472 } // namespace v8 |
| 3472 | 3473 |
| 3473 #endif // V8_AST_AST_H_ | 3474 #endif // V8_AST_AST_H_ |
| OLD | NEW |