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 419 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
430 DisableCrankshaft(kClassLiteral); | 430 DisableCrankshaft(kClassLiteral); |
431 node->set_base_id(ReserveIdRange(node->num_ids())); | 431 node->set_base_id(ReserveIdRange(node->num_ids())); |
432 if (node->extends()) Visit(node->extends()); | 432 if (node->extends()) Visit(node->extends()); |
433 if (node->constructor()) Visit(node->constructor()); | 433 if (node->constructor()) Visit(node->constructor()); |
434 if (node->class_variable_proxy()) { | 434 if (node->class_variable_proxy()) { |
435 VisitVariableProxy(node->class_variable_proxy()); | 435 VisitVariableProxy(node->class_variable_proxy()); |
436 } | 436 } |
437 for (int i = 0; i < node->properties()->length(); i++) { | 437 for (int i = 0; i < node->properties()->length(); i++) { |
438 VisitObjectLiteralProperty(node->properties()->at(i)); | 438 VisitObjectLiteralProperty(node->properties()->at(i)); |
439 } | 439 } |
| 440 ReserveFeedbackSlots(node); |
440 } | 441 } |
441 | 442 |
442 | 443 |
443 void AstNumberingVisitor::VisitObjectLiteral(ObjectLiteral* node) { | 444 void AstNumberingVisitor::VisitObjectLiteral(ObjectLiteral* node) { |
444 IncrementNodeCount(); | 445 IncrementNodeCount(); |
445 node->set_base_id(ReserveIdRange(node->num_ids())); | 446 node->set_base_id(ReserveIdRange(node->num_ids())); |
446 for (int i = 0; i < node->properties()->length(); i++) { | 447 for (int i = 0; i < node->properties()->length(); i++) { |
447 VisitObjectLiteralProperty(node->properties()->at(i)); | 448 VisitObjectLiteralProperty(node->properties()->at(i)); |
448 } | 449 } |
449 node->BuildConstantProperties(isolate()); | 450 node->BuildConstantProperties(isolate()); |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
552 } | 553 } |
553 | 554 |
554 | 555 |
555 bool AstNumbering::Renumber(Isolate* isolate, Zone* zone, | 556 bool AstNumbering::Renumber(Isolate* isolate, Zone* zone, |
556 FunctionLiteral* function) { | 557 FunctionLiteral* function) { |
557 AstNumberingVisitor visitor(isolate, zone); | 558 AstNumberingVisitor visitor(isolate, zone); |
558 return visitor.Renumber(function); | 559 return visitor.Renumber(function); |
559 } | 560 } |
560 } // namespace internal | 561 } // namespace internal |
561 } // namespace v8 | 562 } // namespace v8 |
OLD | NEW |