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_PARSING_PARSER_H_ | 5 #ifndef V8_PARSING_PARSER_H_ |
6 #define V8_PARSING_PARSER_H_ | 6 #define V8_PARSING_PARSER_H_ |
7 | 7 |
8 #include "src/ast/ast.h" | 8 #include "src/ast/ast.h" |
9 #include "src/ast/scopes.h" | 9 #include "src/ast/scopes.h" |
10 #include "src/parsing/parser-base.h" | 10 #include "src/parsing/parser-base.h" |
(...skipping 457 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
468 // a scope where the name has also been let bound or the var declaration is | 468 // a scope where the name has also been let bound or the var declaration is |
469 // hoisted over such a scope. | 469 // hoisted over such a scope. |
470 void CheckConflictingVarDeclarations(Scope* scope, bool* ok); | 470 void CheckConflictingVarDeclarations(Scope* scope, bool* ok); |
471 | 471 |
472 // Insert initializer statements for var-bindings shadowing parameter bindings | 472 // Insert initializer statements for var-bindings shadowing parameter bindings |
473 // from a non-simple parameter list. | 473 // from a non-simple parameter list. |
474 void InsertShadowingVarBindingInitializers(Block* block); | 474 void InsertShadowingVarBindingInitializers(Block* block); |
475 | 475 |
476 // Implement sloppy block-scoped functions, ES2015 Annex B 3.3 | 476 // Implement sloppy block-scoped functions, ES2015 Annex B 3.3 |
477 void InsertSloppyBlockFunctionVarBindings(DeclarationScope* scope, | 477 void InsertSloppyBlockFunctionVarBindings(DeclarationScope* scope, |
478 Scope* complex_params_scope, | |
479 bool* ok); | 478 bool* ok); |
480 | 479 |
481 static InitializationFlag DefaultInitializationFlag(VariableMode mode); | |
482 VariableProxy* NewUnresolved(const AstRawString* name, int begin_pos, | 480 VariableProxy* NewUnresolved(const AstRawString* name, int begin_pos, |
483 int end_pos = kNoSourcePosition, | 481 int end_pos = kNoSourcePosition, |
484 Variable::Kind kind = Variable::NORMAL); | 482 Variable::Kind kind = Variable::NORMAL); |
485 VariableProxy* NewUnresolved(const AstRawString* name); | 483 VariableProxy* NewUnresolved(const AstRawString* name); |
486 Variable* Declare(Declaration* declaration, | 484 Variable* Declare(Declaration* declaration, |
487 DeclarationDescriptor::Kind declaration_kind, | 485 DeclarationDescriptor::Kind declaration_kind, |
488 VariableMode mode, InitializationFlag init, bool* ok, | 486 VariableMode mode, InitializationFlag init, bool* ok, |
489 Scope* declaration_scope = nullptr); | 487 Scope* declaration_scope = nullptr); |
490 Declaration* DeclareVariable(const AstRawString* name, VariableMode mode, | 488 Declaration* DeclareVariable(const AstRawString* name, VariableMode mode, |
491 int pos, bool* ok); | 489 int pos, bool* ok); |
(...skipping 563 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1055 static const int kLiteralTypeSlot = 0; | 1053 static const int kLiteralTypeSlot = 0; |
1056 static const int kElementsSlot = 1; | 1054 static const int kElementsSlot = 1; |
1057 | 1055 |
1058 DISALLOW_IMPLICIT_CONSTRUCTORS(CompileTimeValue); | 1056 DISALLOW_IMPLICIT_CONSTRUCTORS(CompileTimeValue); |
1059 }; | 1057 }; |
1060 | 1058 |
1061 } // namespace internal | 1059 } // namespace internal |
1062 } // namespace v8 | 1060 } // namespace v8 |
1063 | 1061 |
1064 #endif // V8_PARSING_PARSER_H_ | 1062 #endif // V8_PARSING_PARSER_H_ |
OLD | NEW |