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

Side by Side Diff: src/parser.h

Issue 1234433002: [es6] Sloppy functions in block (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Don't report errors Created 5 years, 5 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/parser.cc » ('j') | src/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_PARSER_H_ 5 #ifndef V8_PARSER_H_
6 #define V8_PARSER_H_ 6 #define V8_PARSER_H_
7 7
8 #include "src/allocation.h" 8 #include "src/allocation.h"
9 #include "src/ast.h" 9 #include "src/ast.h"
10 #include "src/compiler.h" // TODO(titzer): remove this include dependency 10 #include "src/compiler.h" // TODO(titzer): remove this include dependency
(...skipping 1108 matching lines...) Expand 10 before | Expand all | Expand 10 after
1119 // function g() { { var x; let x; } } 1119 // function g() { { var x; let x; } }
1120 // 1120 //
1121 // The var declarations are hoisted to the function scope, but originate from 1121 // The var declarations are hoisted to the function scope, but originate from
1122 // a scope where the name has also been let bound or the var declaration is 1122 // a scope where the name has also been let bound or the var declaration is
1123 // hoisted over such a scope. 1123 // hoisted over such a scope.
1124 void CheckConflictingVarDeclarations(Scope* scope, bool* ok); 1124 void CheckConflictingVarDeclarations(Scope* scope, bool* ok);
1125 1125
1126 // Parser support 1126 // Parser support
1127 VariableProxy* NewUnresolved(const AstRawString* name, VariableMode mode); 1127 VariableProxy* NewUnresolved(const AstRawString* name, VariableMode mode);
1128 Variable* Declare(Declaration* declaration, 1128 Variable* Declare(Declaration* declaration,
1129 DeclarationDescriptor::Kind declaration_kind, bool resolve, 1129 DeclarationDescriptor::Kind declaration_kind,
1130 bool* ok); 1130 bool report_error, bool* ok);
1131 1131
1132 bool TargetStackContainsLabel(const AstRawString* label); 1132 bool TargetStackContainsLabel(const AstRawString* label);
1133 BreakableStatement* LookupBreakTarget(const AstRawString* label, bool* ok); 1133 BreakableStatement* LookupBreakTarget(const AstRawString* label, bool* ok);
1134 IterationStatement* LookupContinueTarget(const AstRawString* label, bool* ok); 1134 IterationStatement* LookupContinueTarget(const AstRawString* label, bool* ok);
1135 1135
1136 void AddAssertIsConstruct(ZoneList<Statement*>* body, int pos); 1136 void AddAssertIsConstruct(ZoneList<Statement*>* body, int pos);
1137 Statement* BuildAssertIsCoercible(Variable* var); 1137 Statement* BuildAssertIsCoercible(Variable* var);
1138 1138
1139 // Factory methods. 1139 // Factory methods.
1140 FunctionLiteral* DefaultConstructor(bool call_super, Scope* scope, int pos, 1140 FunctionLiteral* DefaultConstructor(bool call_super, Scope* scope, int pos,
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
1339 auto* init_block = 1339 auto* init_block =
1340 parser_->BuildParameterInitializationBlock(formal_parameters, ok); 1340 parser_->BuildParameterInitializationBlock(formal_parameters, ok);
1341 if (!*ok) return; 1341 if (!*ok) return;
1342 if (init_block != nullptr) { 1342 if (init_block != nullptr) {
1343 body->Add(init_block, parser_->zone()); 1343 body->Add(init_block, parser_->zone());
1344 } 1344 }
1345 } 1345 }
1346 } } // namespace v8::internal 1346 } } // namespace v8::internal
1347 1347
1348 #endif // V8_PARSER_H_ 1348 #endif // V8_PARSER_H_
OLDNEW
« no previous file with comments | « no previous file | src/parser.cc » ('j') | src/parser.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698