| 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/scopes.h" | 9 #include "src/scopes.h" |
| 10 | 10 |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 152 IncrementNodeCount(); | 152 IncrementNodeCount(); |
| 153 node->set_base_id(ReserveIdRange(RegExpLiteral::num_ids())); | 153 node->set_base_id(ReserveIdRange(RegExpLiteral::num_ids())); |
| 154 } | 154 } |
| 155 | 155 |
| 156 | 156 |
| 157 void AstNumberingVisitor::VisitVariableProxy(VariableProxy* node) { | 157 void AstNumberingVisitor::VisitVariableProxy(VariableProxy* node) { |
| 158 IncrementNodeCount(); | 158 IncrementNodeCount(); |
| 159 if (node->var()->IsLookupSlot()) { | 159 if (node->var()->IsLookupSlot()) { |
| 160 DisableOptimization(kReferenceToAVariableWhichRequiresDynamicLookup); | 160 DisableOptimization(kReferenceToAVariableWhichRequiresDynamicLookup); |
| 161 } | 161 } |
| 162 if (node->is_new_target()) { |
| 163 DisableOptimization(kNewTarget); |
| 164 } |
| 162 ReserveFeedbackSlots(node); | 165 ReserveFeedbackSlots(node); |
| 163 node->set_base_id(ReserveIdRange(VariableProxy::num_ids())); | 166 node->set_base_id(ReserveIdRange(VariableProxy::num_ids())); |
| 164 } | 167 } |
| 165 | 168 |
| 166 | 169 |
| 167 void AstNumberingVisitor::VisitThisFunction(ThisFunction* node) { | 170 void AstNumberingVisitor::VisitThisFunction(ThisFunction* node) { |
| 168 IncrementNodeCount(); | 171 IncrementNodeCount(); |
| 169 node->set_base_id(ReserveIdRange(ThisFunction::num_ids())); | 172 node->set_base_id(ReserveIdRange(ThisFunction::num_ids())); |
| 170 } | 173 } |
| 171 | 174 |
| (...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 559 } | 562 } |
| 560 | 563 |
| 561 | 564 |
| 562 bool AstNumbering::Renumber(Isolate* isolate, Zone* zone, | 565 bool AstNumbering::Renumber(Isolate* isolate, Zone* zone, |
| 563 FunctionLiteral* function) { | 566 FunctionLiteral* function) { |
| 564 AstNumberingVisitor visitor(isolate, zone); | 567 AstNumberingVisitor visitor(isolate, zone); |
| 565 return visitor.Renumber(function); | 568 return visitor.Renumber(function); |
| 566 } | 569 } |
| 567 } | 570 } |
| 568 } // namespace v8::internal | 571 } // namespace v8::internal |
| OLD | NEW |