| 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/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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |