| 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 4555 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4566 environment()->Bind(i, undefined_constant); | 4566 environment()->Bind(i, undefined_constant); |
| 4567 } | 4567 } |
| 4568 | 4568 |
| 4569 // Handle the arguments and arguments shadow variables specially (they do | 4569 // Handle the arguments and arguments shadow variables specially (they do |
| 4570 // not have declarations). | 4570 // not have declarations). |
| 4571 if (scope->arguments() != NULL) { | 4571 if (scope->arguments() != NULL) { |
| 4572 environment()->Bind(scope->arguments(), | 4572 environment()->Bind(scope->arguments(), |
| 4573 graph()->GetArgumentsObject()); | 4573 graph()->GetArgumentsObject()); |
| 4574 } | 4574 } |
| 4575 | 4575 |
| 4576 int rest_index; | |
| 4577 Variable* rest = scope->rest_parameter(&rest_index); | |
| 4578 if (rest) { | |
| 4579 return Bailout(kRestParameter); | |
| 4580 } | |
| 4581 | |
| 4582 if (scope->this_function_var() != nullptr || | 4576 if (scope->this_function_var() != nullptr || |
| 4583 scope->new_target_var() != nullptr) { | 4577 scope->new_target_var() != nullptr) { |
| 4584 return Bailout(kSuperReference); | 4578 return Bailout(kSuperReference); |
| 4585 } | 4579 } |
| 4586 } | 4580 } |
| 4587 | 4581 |
| 4588 | 4582 |
| 4589 void HOptimizedGraphBuilder::VisitStatements(ZoneList<Statement*>* statements) { | 4583 void HOptimizedGraphBuilder::VisitStatements(ZoneList<Statement*>* statements) { |
| 4590 for (int i = 0; i < statements->length(); i++) { | 4584 for (int i = 0; i < statements->length(); i++) { |
| 4591 Statement* stmt = statements->at(i); | 4585 Statement* stmt = statements->at(i); |
| (...skipping 8705 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 13297 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); | 13291 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); |
| 13298 } | 13292 } |
| 13299 | 13293 |
| 13300 #ifdef DEBUG | 13294 #ifdef DEBUG |
| 13301 graph_->Verify(false); // No full verify. | 13295 graph_->Verify(false); // No full verify. |
| 13302 #endif | 13296 #endif |
| 13303 } | 13297 } |
| 13304 | 13298 |
| 13305 } // namespace internal | 13299 } // namespace internal |
| 13306 } // namespace v8 | 13300 } // namespace v8 |
| OLD | NEW |