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 488 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
499 for (int i = 0; i < node->values()->length(); i++) { | 499 for (int i = 0; i < node->values()->length(); i++) { |
500 Visit(node->values()->at(i)); | 500 Visit(node->values()->at(i)); |
501 } | 501 } |
502 node->BuildConstantElements(isolate_); | 502 node->BuildConstantElements(isolate_); |
503 ReserveFeedbackSlots(node); | 503 ReserveFeedbackSlots(node); |
504 } | 504 } |
505 | 505 |
506 | 506 |
507 void AstNumberingVisitor::VisitCall(Call* node) { | 507 void AstNumberingVisitor::VisitCall(Call* node) { |
508 IncrementNodeCount(); | 508 IncrementNodeCount(); |
| 509 if (node->tail_call_mode() == TailCallMode::kAllow) { |
| 510 DisableCrankshaft(kTailCall); |
| 511 } |
509 ReserveFeedbackSlots(node); | 512 ReserveFeedbackSlots(node); |
510 node->set_base_id(ReserveIdRange(Call::num_ids())); | 513 node->set_base_id(ReserveIdRange(Call::num_ids())); |
511 Visit(node->expression()); | 514 Visit(node->expression()); |
512 VisitArguments(node->arguments()); | 515 VisitArguments(node->arguments()); |
513 } | 516 } |
514 | 517 |
515 | 518 |
516 void AstNumberingVisitor::VisitCallNew(CallNew* node) { | 519 void AstNumberingVisitor::VisitCallNew(CallNew* node) { |
517 IncrementNodeCount(); | 520 IncrementNodeCount(); |
518 ReserveFeedbackSlots(node); | 521 ReserveFeedbackSlots(node); |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
594 } | 597 } |
595 | 598 |
596 | 599 |
597 bool AstNumbering::Renumber(Isolate* isolate, Zone* zone, | 600 bool AstNumbering::Renumber(Isolate* isolate, Zone* zone, |
598 FunctionLiteral* function) { | 601 FunctionLiteral* function) { |
599 AstNumberingVisitor visitor(isolate, zone); | 602 AstNumberingVisitor visitor(isolate, zone); |
600 return visitor.Renumber(function); | 603 return visitor.Renumber(function); |
601 } | 604 } |
602 } // namespace internal | 605 } // namespace internal |
603 } // namespace v8 | 606 } // namespace v8 |
OLD | NEW |