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 #include "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #include "src/ast.h" | 7 #include "src/ast.h" |
8 #include "src/ast-numbering.h" | 8 #include "src/ast-numbering.h" |
9 #include "src/compiler.h" | 9 #include "src/compiler.h" |
10 #include "src/scopes.h" | 10 #include "src/scopes.h" |
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
179 DisableOptimization(kModuleDeclaration); | 179 DisableOptimization(kModuleDeclaration); |
180 VisitVariableProxy(node->proxy()); | 180 VisitVariableProxy(node->proxy()); |
181 Visit(node->module()); | 181 Visit(node->module()); |
182 } | 182 } |
183 | 183 |
184 | 184 |
185 void AstNumberingVisitor::VisitImportDeclaration(ImportDeclaration* node) { | 185 void AstNumberingVisitor::VisitImportDeclaration(ImportDeclaration* node) { |
186 IncrementNodeCount(); | 186 IncrementNodeCount(); |
187 DisableOptimization(kImportDeclaration); | 187 DisableOptimization(kImportDeclaration); |
188 VisitVariableProxy(node->proxy()); | 188 VisitVariableProxy(node->proxy()); |
189 Visit(node->module()); | |
190 } | 189 } |
191 | 190 |
192 | 191 |
193 void AstNumberingVisitor::VisitModulePath(ModulePath* node) { | 192 void AstNumberingVisitor::VisitModulePath(ModulePath* node) { |
194 IncrementNodeCount(); | 193 IncrementNodeCount(); |
195 DisableOptimization(kModulePath); | 194 DisableOptimization(kModulePath); |
196 Visit(node->module()); | 195 Visit(node->module()); |
197 } | 196 } |
198 | 197 |
199 | 198 |
(...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
552 } | 551 } |
553 | 552 |
554 | 553 |
555 bool AstNumbering::Renumber(Isolate* isolate, Zone* zone, | 554 bool AstNumbering::Renumber(Isolate* isolate, Zone* zone, |
556 FunctionLiteral* function) { | 555 FunctionLiteral* function) { |
557 AstNumberingVisitor visitor(isolate, zone); | 556 AstNumberingVisitor visitor(isolate, zone); |
558 return visitor.Renumber(function); | 557 return visitor.Renumber(function); |
559 } | 558 } |
560 } | 559 } |
561 } // namespace v8::internal | 560 } // namespace v8::internal |
OLD | NEW |