| 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 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 174 | 174 |
| 175 void AstNumberingVisitor::VisitThisFunction(ThisFunction* node) { | 175 void AstNumberingVisitor::VisitThisFunction(ThisFunction* node) { |
| 176 IncrementNodeCount(); | 176 IncrementNodeCount(); |
| 177 node->set_base_id(ReserveIdRange(ThisFunction::num_ids())); | 177 node->set_base_id(ReserveIdRange(ThisFunction::num_ids())); |
| 178 } | 178 } |
| 179 | 179 |
| 180 | 180 |
| 181 void AstNumberingVisitor::VisitSuperPropertyReference( | 181 void AstNumberingVisitor::VisitSuperPropertyReference( |
| 182 SuperPropertyReference* node) { | 182 SuperPropertyReference* node) { |
| 183 IncrementNodeCount(); | 183 IncrementNodeCount(); |
| 184 DisableOptimization(kSuperReference); | 184 DisableCrankshaft(kSuperReference); |
| 185 node->set_base_id(ReserveIdRange(SuperPropertyReference::num_ids())); | 185 node->set_base_id(ReserveIdRange(SuperPropertyReference::num_ids())); |
| 186 Visit(node->this_var()); | 186 Visit(node->this_var()); |
| 187 Visit(node->home_object()); | 187 Visit(node->home_object()); |
| 188 } | 188 } |
| 189 | 189 |
| 190 | 190 |
| 191 void AstNumberingVisitor::VisitSuperCallReference(SuperCallReference* node) { | 191 void AstNumberingVisitor::VisitSuperCallReference(SuperCallReference* node) { |
| 192 IncrementNodeCount(); | 192 IncrementNodeCount(); |
| 193 DisableOptimization(kSuperReference); | 193 DisableCrankshaft(kSuperReference); |
| 194 node->set_base_id(ReserveIdRange(SuperCallReference::num_ids())); | 194 node->set_base_id(ReserveIdRange(SuperCallReference::num_ids())); |
| 195 Visit(node->this_var()); | 195 Visit(node->this_var()); |
| 196 Visit(node->new_target_var()); | 196 Visit(node->new_target_var()); |
| 197 Visit(node->this_function_var()); | 197 Visit(node->this_function_var()); |
| 198 } | 198 } |
| 199 | 199 |
| 200 | 200 |
| 201 void AstNumberingVisitor::VisitImportDeclaration(ImportDeclaration* node) { | 201 void AstNumberingVisitor::VisitImportDeclaration(ImportDeclaration* node) { |
| 202 IncrementNodeCount(); | 202 IncrementNodeCount(); |
| 203 DisableOptimization(kImportDeclaration); | 203 DisableOptimization(kImportDeclaration); |
| (...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 592 } | 592 } |
| 593 | 593 |
| 594 | 594 |
| 595 bool AstNumbering::Renumber(Isolate* isolate, Zone* zone, | 595 bool AstNumbering::Renumber(Isolate* isolate, Zone* zone, |
| 596 FunctionLiteral* function) { | 596 FunctionLiteral* function) { |
| 597 AstNumberingVisitor visitor(isolate, zone); | 597 AstNumberingVisitor visitor(isolate, zone); |
| 598 return visitor.Renumber(function); | 598 return visitor.Renumber(function); |
| 599 } | 599 } |
| 600 } // namespace internal | 600 } // namespace internal |
| 601 } // namespace v8 | 601 } // namespace v8 |
| OLD | NEW |