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 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
185 void AstNumberingVisitor::VisitSuperCallReference(SuperCallReference* node) { | 185 void AstNumberingVisitor::VisitSuperCallReference(SuperCallReference* node) { |
186 IncrementNodeCount(); | 186 IncrementNodeCount(); |
187 DisableCrankshaft(kSuperReference); | 187 DisableCrankshaft(kSuperReference); |
188 node->set_base_id(ReserveIdRange(SuperCallReference::num_ids())); | 188 node->set_base_id(ReserveIdRange(SuperCallReference::num_ids())); |
189 Visit(node->this_var()); | 189 Visit(node->this_var()); |
190 Visit(node->new_target_var()); | 190 Visit(node->new_target_var()); |
191 Visit(node->this_function_var()); | 191 Visit(node->this_function_var()); |
192 } | 192 } |
193 | 193 |
194 | 194 |
195 void AstNumberingVisitor::VisitImportDeclaration(ImportDeclaration* node) { | |
196 IncrementNodeCount(); | |
197 DisableOptimization(kImportDeclaration); | |
198 VisitVariableProxy(node->proxy()); | |
199 } | |
200 | |
201 | |
202 void AstNumberingVisitor::VisitExpressionStatement(ExpressionStatement* node) { | 195 void AstNumberingVisitor::VisitExpressionStatement(ExpressionStatement* node) { |
203 IncrementNodeCount(); | 196 IncrementNodeCount(); |
204 Visit(node->expression()); | 197 Visit(node->expression()); |
205 } | 198 } |
206 | 199 |
207 | 200 |
208 void AstNumberingVisitor::VisitReturnStatement(ReturnStatement* node) { | 201 void AstNumberingVisitor::VisitReturnStatement(ReturnStatement* node) { |
209 IncrementNodeCount(); | 202 IncrementNodeCount(); |
210 Visit(node->expression()); | 203 Visit(node->expression()); |
211 } | 204 } |
(...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
600 } | 593 } |
601 | 594 |
602 | 595 |
603 bool AstNumbering::Renumber(Isolate* isolate, Zone* zone, | 596 bool AstNumbering::Renumber(Isolate* isolate, Zone* zone, |
604 FunctionLiteral* function) { | 597 FunctionLiteral* function) { |
605 AstNumberingVisitor visitor(isolate, zone); | 598 AstNumberingVisitor visitor(isolate, zone); |
606 return visitor.Renumber(function); | 599 return visitor.Renumber(function); |
607 } | 600 } |
608 } // namespace internal | 601 } // namespace internal |
609 } // namespace v8 | 602 } // namespace v8 |
OLD | NEW |