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 428 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
439 // Mark all computed expressions that are bound to a key that | 439 // Mark all computed expressions that are bound to a key that |
440 // is shadowed by a later occurrence of the same key. For the | 440 // is shadowed by a later occurrence of the same key. For the |
441 // marked expressions, no store code will be is emitted. | 441 // marked expressions, no store code will be is emitted. |
442 node->CalculateEmitStore(zone()); | 442 node->CalculateEmitStore(zone()); |
443 ReserveFeedbackSlots(node); | 443 ReserveFeedbackSlots(node); |
444 } | 444 } |
445 | 445 |
446 | 446 |
447 void AstNumberingVisitor::VisitObjectLiteralProperty( | 447 void AstNumberingVisitor::VisitObjectLiteralProperty( |
448 ObjectLiteralProperty* node) { | 448 ObjectLiteralProperty* node) { |
449 if (node->is_computed_name()) DisableOptimization(kComputedPropertyName); | 449 if (node->is_computed_name()) DisableCrankshaft(kComputedPropertyName); |
450 Visit(node->key()); | 450 Visit(node->key()); |
451 Visit(node->value()); | 451 Visit(node->value()); |
452 } | 452 } |
453 | 453 |
454 | 454 |
455 void AstNumberingVisitor::VisitArrayLiteral(ArrayLiteral* node) { | 455 void AstNumberingVisitor::VisitArrayLiteral(ArrayLiteral* node) { |
456 IncrementNodeCount(); | 456 IncrementNodeCount(); |
457 node->set_base_id(ReserveIdRange(node->num_ids())); | 457 node->set_base_id(ReserveIdRange(node->num_ids())); |
458 for (int i = 0; i < node->values()->length(); i++) { | 458 for (int i = 0; i < node->values()->length(); i++) { |
459 Visit(node->values()->at(i)); | 459 Visit(node->values()->at(i)); |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
543 } | 543 } |
544 | 544 |
545 | 545 |
546 bool AstNumbering::Renumber(Isolate* isolate, Zone* zone, | 546 bool AstNumbering::Renumber(Isolate* isolate, Zone* zone, |
547 FunctionLiteral* function) { | 547 FunctionLiteral* function) { |
548 AstNumberingVisitor visitor(isolate, zone); | 548 AstNumberingVisitor visitor(isolate, zone); |
549 return visitor.Renumber(function); | 549 return visitor.Renumber(function); |
550 } | 550 } |
551 } // namespace internal | 551 } // namespace internal |
552 } // namespace v8 | 552 } // namespace v8 |
OLD | NEW |