OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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/hydrogen.h" | 5 #include "src/hydrogen.h" |
6 | 6 |
7 #include <sstream> | 7 #include <sstream> |
8 | 8 |
9 #include "src/allocation-site-scopes.h" | 9 #include "src/allocation-site-scopes.h" |
10 #include "src/ast-numbering.h" | 10 #include "src/ast-numbering.h" |
(...skipping 4631 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4642 environment()->Bind(i, undefined_constant); | 4642 environment()->Bind(i, undefined_constant); |
4643 } | 4643 } |
4644 | 4644 |
4645 // Handle the arguments and arguments shadow variables specially (they do | 4645 // Handle the arguments and arguments shadow variables specially (they do |
4646 // not have declarations). | 4646 // not have declarations). |
4647 if (scope->arguments() != NULL) { | 4647 if (scope->arguments() != NULL) { |
4648 environment()->Bind(scope->arguments(), | 4648 environment()->Bind(scope->arguments(), |
4649 graph()->GetArgumentsObject()); | 4649 graph()->GetArgumentsObject()); |
4650 } | 4650 } |
4651 | 4651 |
4652 int rest_index; | |
4653 Variable* rest = scope->rest_parameter(&rest_index); | |
4654 if (rest) { | |
4655 return Bailout(kRestParameter); | |
4656 } | |
4657 | |
4658 if (scope->this_function_var() != nullptr || | 4652 if (scope->this_function_var() != nullptr || |
4659 scope->new_target_var() != nullptr) { | 4653 scope->new_target_var() != nullptr) { |
4660 return Bailout(kSuperReference); | 4654 return Bailout(kSuperReference); |
4661 } | 4655 } |
4662 } | 4656 } |
4663 | 4657 |
4664 | 4658 |
4665 void HOptimizedGraphBuilder::VisitStatements(ZoneList<Statement*>* statements) { | 4659 void HOptimizedGraphBuilder::VisitStatements(ZoneList<Statement*>* statements) { |
4666 for (int i = 0; i < statements->length(); i++) { | 4660 for (int i = 0; i < statements->length(); i++) { |
4667 Statement* stmt = statements->at(i); | 4661 Statement* stmt = statements->at(i); |
(...skipping 8767 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
13435 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); | 13429 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); |
13436 } | 13430 } |
13437 | 13431 |
13438 #ifdef DEBUG | 13432 #ifdef DEBUG |
13439 graph_->Verify(false); // No full verify. | 13433 graph_->Verify(false); // No full verify. |
13440 #endif | 13434 #endif |
13441 } | 13435 } |
13442 | 13436 |
13443 } // namespace internal | 13437 } // namespace internal |
13444 } // namespace v8 | 13438 } // namespace v8 |
OLD | NEW |