Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(64)

Side by Side Diff: src/ast/ast.h

Issue 2375793002: Reland: [modules] Properly initialize declared variables. (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | src/ast/scopes.cc » ('j') | src/parsing/parser.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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-types.h" 8 #include "src/ast/ast-types.h"
9 #include "src/ast/ast-value-factory.h" 9 #include "src/ast/ast-value-factory.h"
10 #include "src/ast/modules.h" 10 #include "src/ast/modules.h"
(...skipping 3466 matching lines...) Expand 10 before | Expand all | Expand 10 after
3477 function_type, has_duplicate_parameters, eager_compile_hint, kind, 3477 function_type, has_duplicate_parameters, eager_compile_hint, kind,
3478 position, true); 3478 position, true);
3479 } 3479 }
3480 3480
3481 // Creates a FunctionLiteral representing a top-level script, the 3481 // Creates a FunctionLiteral representing a top-level script, the
3482 // result of an eval (top-level or otherwise), or the result of calling 3482 // result of an eval (top-level or otherwise), or the result of calling
3483 // the Function constructor. 3483 // the Function constructor.
3484 FunctionLiteral* NewScriptOrEvalFunctionLiteral( 3484 FunctionLiteral* NewScriptOrEvalFunctionLiteral(
3485 DeclarationScope* scope, ZoneList<Statement*>* body, 3485 DeclarationScope* scope, ZoneList<Statement*>* body,
3486 int materialized_literal_count, int expected_property_count, 3486 int materialized_literal_count, int expected_property_count,
3487 int parameter_count) { 3487 int parameter_count, FunctionKind kind) {
3488 return new (zone_) FunctionLiteral( 3488 return new (zone_) FunctionLiteral(
3489 zone_, ast_value_factory_->empty_string(), ast_value_factory_, scope, 3489 zone_, ast_value_factory_->empty_string(), ast_value_factory_, scope,
3490 body, materialized_literal_count, expected_property_count, 3490 body, materialized_literal_count, expected_property_count,
3491 parameter_count, FunctionLiteral::kAnonymousExpression, 3491 parameter_count, FunctionLiteral::kAnonymousExpression,
3492 FunctionLiteral::kNoDuplicateParameters, 3492 FunctionLiteral::kNoDuplicateParameters,
3493 FunctionLiteral::kShouldLazyCompile, FunctionKind::kNormalFunction, 0, 3493 FunctionLiteral::kShouldLazyCompile, kind, 0, false);
3494 false);
3495 } 3494 }
3496 3495
3497 ClassLiteral::Property* NewClassLiteralProperty( 3496 ClassLiteral::Property* NewClassLiteralProperty(
3498 Expression* key, Expression* value, ClassLiteralProperty::Kind kind, 3497 Expression* key, Expression* value, ClassLiteralProperty::Kind kind,
3499 bool is_static, bool is_computed_name) { 3498 bool is_static, bool is_computed_name) {
3500 return new (zone_) 3499 return new (zone_)
3501 ClassLiteral::Property(key, value, kind, is_static, is_computed_name); 3500 ClassLiteral::Property(key, value, kind, is_static, is_computed_name);
3502 } 3501 }
3503 3502
3504 ClassLiteral* NewClassLiteral(VariableProxy* proxy, Expression* extends, 3503 ClassLiteral* NewClassLiteral(VariableProxy* proxy, Expression* extends,
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
3609 : NULL; \ 3608 : NULL; \
3610 } 3609 }
3611 AST_NODE_LIST(DECLARE_NODE_FUNCTIONS) 3610 AST_NODE_LIST(DECLARE_NODE_FUNCTIONS)
3612 #undef DECLARE_NODE_FUNCTIONS 3611 #undef DECLARE_NODE_FUNCTIONS
3613 3612
3614 3613
3615 } // namespace internal 3614 } // namespace internal
3616 } // namespace v8 3615 } // namespace v8
3617 3616
3618 #endif // V8_AST_AST_H_ 3617 #endif // V8_AST_AST_H_
OLDNEW
« no previous file with comments | « no previous file | src/ast/scopes.cc » ('j') | src/parsing/parser.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698