| 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/v8.h" | 9 #include "src/v8.h" |
| 10 | 10 |
| (...skipping 4705 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4716 environment()->Bind(i, undefined_constant); | 4716 environment()->Bind(i, undefined_constant); |
| 4717 } | 4717 } |
| 4718 | 4718 |
| 4719 // Handle the arguments and arguments shadow variables specially (they do | 4719 // Handle the arguments and arguments shadow variables specially (they do |
| 4720 // not have declarations). | 4720 // not have declarations). |
| 4721 if (scope->arguments() != NULL) { | 4721 if (scope->arguments() != NULL) { |
| 4722 environment()->Bind(scope->arguments(), | 4722 environment()->Bind(scope->arguments(), |
| 4723 graph()->GetArgumentsObject()); | 4723 graph()->GetArgumentsObject()); |
| 4724 } | 4724 } |
| 4725 | 4725 |
| 4726 int rest_index; | |
| 4727 Variable* rest = scope->rest_parameter(&rest_index); | |
| 4728 if (rest) { | |
| 4729 return Bailout(kRestParameter); | |
| 4730 } | |
| 4731 | |
| 4732 if (scope->this_function_var() != nullptr || | 4726 if (scope->this_function_var() != nullptr || |
| 4733 scope->new_target_var() != nullptr) { | 4727 scope->new_target_var() != nullptr) { |
| 4734 return Bailout(kSuperReference); | 4728 return Bailout(kSuperReference); |
| 4735 } | 4729 } |
| 4736 } | 4730 } |
| 4737 | 4731 |
| 4738 | 4732 |
| 4739 void HOptimizedGraphBuilder::VisitStatements(ZoneList<Statement*>* statements) { | 4733 void HOptimizedGraphBuilder::VisitStatements(ZoneList<Statement*>* statements) { |
| 4740 for (int i = 0; i < statements->length(); i++) { | 4734 for (int i = 0; i < statements->length(); i++) { |
| 4741 Statement* stmt = statements->at(i); | 4735 Statement* stmt = statements->at(i); |
| (...skipping 8756 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 13498 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); | 13492 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); |
| 13499 } | 13493 } |
| 13500 | 13494 |
| 13501 #ifdef DEBUG | 13495 #ifdef DEBUG |
| 13502 graph_->Verify(false); // No full verify. | 13496 graph_->Verify(false); // No full verify. |
| 13503 #endif | 13497 #endif |
| 13504 } | 13498 } |
| 13505 | 13499 |
| 13506 } // namespace internal | 13500 } // namespace internal |
| 13507 } // namespace v8 | 13501 } // namespace v8 |
| OLD | NEW |