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 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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()); | 189 Visit(node->module()); |
190 } | 190 } |
191 | 191 |
192 | 192 |
193 void AstNumberingVisitor::VisitModuleVariable(ModuleVariable* node) { | |
194 IncrementNodeCount(); | |
195 DisableOptimization(kModuleVariable); | |
196 Visit(node->proxy()); | |
197 } | |
198 | |
199 | |
200 void AstNumberingVisitor::VisitModulePath(ModulePath* node) { | 193 void AstNumberingVisitor::VisitModulePath(ModulePath* node) { |
201 IncrementNodeCount(); | 194 IncrementNodeCount(); |
202 DisableOptimization(kModulePath); | 195 DisableOptimization(kModulePath); |
203 Visit(node->module()); | 196 Visit(node->module()); |
204 } | 197 } |
205 | 198 |
206 | 199 |
207 void AstNumberingVisitor::VisitModuleStatement(ModuleStatement* node) { | 200 void AstNumberingVisitor::VisitModuleStatement(ModuleStatement* node) { |
208 IncrementNodeCount(); | 201 IncrementNodeCount(); |
209 DisableOptimization(kModuleStatement); | 202 DisableOptimization(kModuleStatement); |
(...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
559 } | 552 } |
560 | 553 |
561 | 554 |
562 bool AstNumbering::Renumber(Isolate* isolate, Zone* zone, | 555 bool AstNumbering::Renumber(Isolate* isolate, Zone* zone, |
563 FunctionLiteral* function) { | 556 FunctionLiteral* function) { |
564 AstNumberingVisitor visitor(isolate, zone); | 557 AstNumberingVisitor visitor(isolate, zone); |
565 return visitor.Renumber(function); | 558 return visitor.Renumber(function); |
566 } | 559 } |
567 } | 560 } |
568 } // namespace v8::internal | 561 } // namespace v8::internal |
OLD | NEW |