Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(226)

Side by Side Diff: src/hydrogen.cc

Issue 1272673003: [es6] Re-implement rest parameters via desugaring. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Oops. Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 4640 matching lines...) Expand 10 before | Expand all | Expand 10 after
4651 4651
4652 AddInstruction(arguments_object); 4652 AddInstruction(arguments_object);
4653 graph()->SetArgumentsObject(arguments_object); 4653 graph()->SetArgumentsObject(arguments_object);
4654 4654
4655 // Handle the arguments and arguments shadow variables specially (they do 4655 // Handle the arguments and arguments shadow variables specially (they do
4656 // not have declarations). 4656 // not have declarations).
4657 if (scope->arguments() != NULL) { 4657 if (scope->arguments() != NULL) {
4658 environment()->Bind(scope->arguments(), graph()->GetArgumentsObject()); 4658 environment()->Bind(scope->arguments(), graph()->GetArgumentsObject());
4659 } 4659 }
4660 4660
4661 int rest_index;
4662 Variable* rest = scope->rest_parameter(&rest_index);
4663 if (rest) {
4664 return Bailout(kRestParameter);
4665 }
4666
4667 if (scope->this_function_var() != nullptr || 4661 if (scope->this_function_var() != nullptr ||
4668 scope->new_target_var() != nullptr) { 4662 scope->new_target_var() != nullptr) {
4669 return Bailout(kSuperReference); 4663 return Bailout(kSuperReference);
4670 } 4664 }
4671 4665
4672 // Trace the call. 4666 // Trace the call.
4673 if (FLAG_trace && top_info()->IsOptimizing()) { 4667 if (FLAG_trace && top_info()->IsOptimizing()) {
4674 Add<HCallRuntime>(Runtime::FunctionForId(Runtime::kTraceEnter), 0); 4668 Add<HCallRuntime>(Runtime::FunctionForId(Runtime::kTraceEnter), 0);
4675 } 4669 }
4676 } 4670 }
(...skipping 8780 matching lines...) Expand 10 before | Expand all | Expand 10 after
13457 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); 13451 isolate()->GetHTracer()->TraceHydrogen(name(), graph_);
13458 } 13452 }
13459 13453
13460 #ifdef DEBUG 13454 #ifdef DEBUG
13461 graph_->Verify(false); // No full verify. 13455 graph_->Verify(false); // No full verify.
13462 #endif 13456 #endif
13463 } 13457 }
13464 13458
13465 } // namespace internal 13459 } // namespace internal
13466 } // namespace v8 13460 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698