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

Side by Side Diff: src/ast/ast-numbering.cc

Issue 2108193003: [modules] AST and parser rework. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@anonymous-declarations
Patch Set: Rebase. Created 4 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 | « src/ast/ast-literal-reindexer.cc ('k') | src/ast/modules.h » ('j') | no next file with comments »
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 #include "src/ast/ast-numbering.h" 5 #include "src/ast/ast-numbering.h"
6 6
7 #include "src/ast/ast.h" 7 #include "src/ast/ast.h"
8 #include "src/ast/scopes.h" 8 #include "src/ast/scopes.h"
9 9
10 namespace v8 { 10 namespace v8 {
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 void AstNumberingVisitor::VisitSuperCallReference(SuperCallReference* node) { 184 void AstNumberingVisitor::VisitSuperCallReference(SuperCallReference* node) {
185 IncrementNodeCount(); 185 IncrementNodeCount();
186 DisableCrankshaft(kSuperReference); 186 DisableCrankshaft(kSuperReference);
187 node->set_base_id(ReserveIdRange(SuperCallReference::num_ids())); 187 node->set_base_id(ReserveIdRange(SuperCallReference::num_ids()));
188 Visit(node->this_var()); 188 Visit(node->this_var());
189 Visit(node->new_target_var()); 189 Visit(node->new_target_var());
190 Visit(node->this_function_var()); 190 Visit(node->this_function_var());
191 } 191 }
192 192
193 193
194 void AstNumberingVisitor::VisitImportDeclaration(ImportDeclaration* node) {
195 IncrementNodeCount();
196 DisableOptimization(kImportDeclaration);
197 VisitVariableProxy(node->proxy());
198 }
199
200
201 void AstNumberingVisitor::VisitExpressionStatement(ExpressionStatement* node) { 194 void AstNumberingVisitor::VisitExpressionStatement(ExpressionStatement* node) {
202 IncrementNodeCount(); 195 IncrementNodeCount();
203 Visit(node->expression()); 196 Visit(node->expression());
204 } 197 }
205 198
206 199
207 void AstNumberingVisitor::VisitReturnStatement(ReturnStatement* node) { 200 void AstNumberingVisitor::VisitReturnStatement(ReturnStatement* node) {
208 IncrementNodeCount(); 201 IncrementNodeCount();
209 Visit(node->expression()); 202 Visit(node->expression());
210 } 203 }
(...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after
599 } 592 }
600 593
601 594
602 bool AstNumbering::Renumber(Isolate* isolate, Zone* zone, 595 bool AstNumbering::Renumber(Isolate* isolate, Zone* zone,
603 FunctionLiteral* function) { 596 FunctionLiteral* function) {
604 AstNumberingVisitor visitor(isolate, zone); 597 AstNumberingVisitor visitor(isolate, zone);
605 return visitor.Renumber(function); 598 return visitor.Renumber(function);
606 } 599 }
607 } // namespace internal 600 } // namespace internal
608 } // namespace v8 601 } // namespace v8
OLDNEW
« no previous file with comments | « src/ast/ast-literal-reindexer.cc ('k') | src/ast/modules.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698