| 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 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 | 148 |
| 149 void AstNumberingVisitor::VisitRegExpLiteral(RegExpLiteral* node) { | 149 void AstNumberingVisitor::VisitRegExpLiteral(RegExpLiteral* node) { |
| 150 IncrementNodeCount(); | 150 IncrementNodeCount(); |
| 151 node->set_base_id(ReserveIdRange(RegExpLiteral::num_ids())); | 151 node->set_base_id(ReserveIdRange(RegExpLiteral::num_ids())); |
| 152 } | 152 } |
| 153 | 153 |
| 154 | 154 |
| 155 void AstNumberingVisitor::VisitVariableProxy(VariableProxy* node) { | 155 void AstNumberingVisitor::VisitVariableProxy(VariableProxy* node) { |
| 156 IncrementNodeCount(); | 156 IncrementNodeCount(); |
| 157 if (node->var()->IsLookupSlot()) { | 157 if (node->var()->IsLookupSlot()) { |
| 158 DisableCrankshaft(kReferenceToAVariableWhichRequiresDynamicLookup); | 158 DisableOptimization(kReferenceToAVariableWhichRequiresDynamicLookup); |
| 159 } | 159 } |
| 160 ReserveFeedbackSlots(node); | 160 ReserveFeedbackSlots(node); |
| 161 node->set_base_id(ReserveIdRange(VariableProxy::num_ids())); | 161 node->set_base_id(ReserveIdRange(VariableProxy::num_ids())); |
| 162 } | 162 } |
| 163 | 163 |
| 164 | 164 |
| 165 void AstNumberingVisitor::VisitThisFunction(ThisFunction* node) { | 165 void AstNumberingVisitor::VisitThisFunction(ThisFunction* node) { |
| 166 IncrementNodeCount(); | 166 IncrementNodeCount(); |
| 167 node->set_base_id(ReserveIdRange(ThisFunction::num_ids())); | 167 node->set_base_id(ReserveIdRange(ThisFunction::num_ids())); |
| 168 } | 168 } |
| (...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 541 } | 541 } |
| 542 | 542 |
| 543 | 543 |
| 544 bool AstNumbering::Renumber(Isolate* isolate, Zone* zone, | 544 bool AstNumbering::Renumber(Isolate* isolate, Zone* zone, |
| 545 FunctionLiteral* function) { | 545 FunctionLiteral* function) { |
| 546 AstNumberingVisitor visitor(isolate, zone); | 546 AstNumberingVisitor visitor(isolate, zone); |
| 547 return visitor.Renumber(function); | 547 return visitor.Renumber(function); |
| 548 } | 548 } |
| 549 } | 549 } |
| 550 } // namespace v8::internal | 550 } // namespace v8::internal |
| OLD | NEW |