Chromium Code Reviews| 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 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 151 case VariableLocation::LOOKUP: | 151 case VariableLocation::LOOKUP: |
| 152 DisableFullCodegenAndCrankshaft( | 152 DisableFullCodegenAndCrankshaft( |
| 153 kReferenceToAVariableWhichRequiresDynamicLookup); | 153 kReferenceToAVariableWhichRequiresDynamicLookup); |
| 154 break; | 154 break; |
| 155 case VariableLocation::MODULE: | 155 case VariableLocation::MODULE: |
| 156 DisableFullCodegenAndCrankshaft(kReferenceToModuleVariable); | 156 DisableFullCodegenAndCrankshaft(kReferenceToModuleVariable); |
| 157 break; | 157 break; |
| 158 default: | 158 default: |
| 159 break; | 159 break; |
| 160 } | 160 } |
| 161 if (IsLexicalVariableMode(node->var()->mode())) { | |
|
Benedikt Meurer
2016/11/29 12:43:17
Just remember to remove this prior to landing! :-)
| |
| 162 DisableFullCodegenAndCrankshaft(kReferenceToModuleVariable); | |
| 163 } | |
| 161 node->set_base_id(ReserveIdRange(VariableProxy::num_ids())); | 164 node->set_base_id(ReserveIdRange(VariableProxy::num_ids())); |
| 162 } | 165 } |
| 163 | 166 |
| 164 | 167 |
| 165 void AstNumberingVisitor::VisitVariableProxy(VariableProxy* node) { | 168 void AstNumberingVisitor::VisitVariableProxy(VariableProxy* node) { |
| 166 VisitVariableProxyReference(node); | 169 VisitVariableProxyReference(node); |
| 167 ReserveFeedbackSlots(node); | 170 ReserveFeedbackSlots(node); |
| 168 } | 171 } |
| 169 | 172 |
| 170 | 173 |
| (...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 493 VisitVariableProxy(node->class_variable_proxy()); | 496 VisitVariableProxy(node->class_variable_proxy()); |
| 494 } | 497 } |
| 495 for (int i = 0; i < node->properties()->length(); i++) { | 498 for (int i = 0; i < node->properties()->length(); i++) { |
| 496 VisitLiteralProperty(node->properties()->at(i)); | 499 VisitLiteralProperty(node->properties()->at(i)); |
| 497 } | 500 } |
| 498 ReserveFeedbackSlots(node); | 501 ReserveFeedbackSlots(node); |
| 499 } | 502 } |
| 500 | 503 |
| 501 | 504 |
| 502 void AstNumberingVisitor::VisitObjectLiteral(ObjectLiteral* node) { | 505 void AstNumberingVisitor::VisitObjectLiteral(ObjectLiteral* node) { |
| 506 DisableFullCodegenAndCrankshaft(kClassLiteral); | |
|
Benedikt Meurer
2016/11/29 12:43:17
This too :-)
| |
| 503 IncrementNodeCount(); | 507 IncrementNodeCount(); |
| 504 node->set_base_id(ReserveIdRange(node->num_ids())); | 508 node->set_base_id(ReserveIdRange(node->num_ids())); |
| 505 for (int i = 0; i < node->properties()->length(); i++) { | 509 for (int i = 0; i < node->properties()->length(); i++) { |
| 506 VisitLiteralProperty(node->properties()->at(i)); | 510 VisitLiteralProperty(node->properties()->at(i)); |
| 507 } | 511 } |
| 508 node->BuildConstantProperties(isolate_); | 512 node->BuildConstantProperties(isolate_); |
| 509 // Mark all computed expressions that are bound to a key that | 513 // Mark all computed expressions that are bound to a key that |
| 510 // is shadowed by a later occurrence of the same key. For the | 514 // is shadowed by a later occurrence of the same key. For the |
| 511 // marked expressions, no store code will be is emitted. | 515 // marked expressions, no store code will be is emitted. |
| 512 node->CalculateEmitStore(zone_); | 516 node->CalculateEmitStore(zone_); |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 621 } | 625 } |
| 622 | 626 |
| 623 | 627 |
| 624 bool AstNumbering::Renumber(Isolate* isolate, Zone* zone, | 628 bool AstNumbering::Renumber(Isolate* isolate, Zone* zone, |
| 625 FunctionLiteral* function) { | 629 FunctionLiteral* function) { |
| 626 AstNumberingVisitor visitor(isolate, zone); | 630 AstNumberingVisitor visitor(isolate, zone); |
| 627 return visitor.Renumber(function); | 631 return visitor.Renumber(function); |
| 628 } | 632 } |
| 629 } // namespace internal | 633 } // namespace internal |
| 630 } // namespace v8 | 634 } // namespace v8 |
| OLD | NEW |