| 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-numbering.h" | 5 #include "src/ast-numbering.h" |
| 6 | 6 |
| 7 #include "src/ast.h" | 7 #include "src/ast.h" |
| 8 #include "src/scopes.h" | 8 #include "src/scopes.h" |
| 9 | 9 |
| 10 namespace v8 { | 10 namespace v8 { |
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 158 node->set_base_id(ReserveIdRange(VariableProxy::num_ids())); | 158 node->set_base_id(ReserveIdRange(VariableProxy::num_ids())); |
| 159 } | 159 } |
| 160 | 160 |
| 161 | 161 |
| 162 void AstNumberingVisitor::VisitVariableProxy(VariableProxy* node) { | 162 void AstNumberingVisitor::VisitVariableProxy(VariableProxy* node) { |
| 163 VisitVariableProxyReference(node); | 163 VisitVariableProxyReference(node); |
| 164 ReserveFeedbackSlots(node); | 164 ReserveFeedbackSlots(node); |
| 165 } | 165 } |
| 166 | 166 |
| 167 | 167 |
| 168 void AstNumberingVisitor::VisitRestParameter(RestParameter* node) { |
| 169 UNREACHABLE(); |
| 170 } |
| 171 |
| 172 |
| 168 void AstNumberingVisitor::VisitThisFunction(ThisFunction* node) { | 173 void AstNumberingVisitor::VisitThisFunction(ThisFunction* node) { |
| 169 IncrementNodeCount(); | 174 IncrementNodeCount(); |
| 170 node->set_base_id(ReserveIdRange(ThisFunction::num_ids())); | 175 node->set_base_id(ReserveIdRange(ThisFunction::num_ids())); |
| 171 } | 176 } |
| 172 | 177 |
| 173 | 178 |
| 174 void AstNumberingVisitor::VisitSuperPropertyReference( | 179 void AstNumberingVisitor::VisitSuperPropertyReference( |
| 175 SuperPropertyReference* node) { | 180 SuperPropertyReference* node) { |
| 176 IncrementNodeCount(); | 181 IncrementNodeCount(); |
| 177 DisableOptimization(kSuperReference); | 182 DisableOptimization(kSuperReference); |
| (...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 574 } | 579 } |
| 575 | 580 |
| 576 | 581 |
| 577 bool AstNumbering::Renumber(Isolate* isolate, Zone* zone, | 582 bool AstNumbering::Renumber(Isolate* isolate, Zone* zone, |
| 578 FunctionLiteral* function) { | 583 FunctionLiteral* function) { |
| 579 AstNumberingVisitor visitor(isolate, zone); | 584 AstNumberingVisitor visitor(isolate, zone); |
| 580 return visitor.Renumber(function); | 585 return visitor.Renumber(function); |
| 581 } | 586 } |
| 582 } // namespace internal | 587 } // namespace internal |
| 583 } // namespace v8 | 588 } // namespace v8 |
| OLD | NEW |