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

Side by Side Diff: src/interpreter/interpreter-assembler.cc

Issue 1957393004: Allow Turbofan optimization of Ignition generators (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 7 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 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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/interpreter/interpreter-assembler.h" 5 #include "src/interpreter/interpreter-assembler.h"
6 6
7 #include <limits> 7 #include <limits>
8 #include <ostream> 8 #include <ostream>
9 9
10 #include "src/code-factory.h" 10 #include "src/code-factory.h"
(...skipping 708 matching lines...) Expand 10 before | Expand all | Expand 10 after
719 if (FLAG_debug_code) { 719 if (FLAG_debug_code) {
720 Node* array_size = SmiUntag(LoadFixedArrayBaseLength(array)); 720 Node* array_size = SmiUntag(LoadFixedArrayBaseLength(array));
721 AbortIfWordNotEqual( 721 AbortIfWordNotEqual(
722 array_size, RegisterCount(), kInvalidRegisterFileInGenerator); 722 array_size, RegisterCount(), kInvalidRegisterFileInGenerator);
723 } 723 }
724 724
725 Variable var_index(this, MachineRepresentation::kWord32); 725 Variable var_index(this, MachineRepresentation::kWord32);
726 var_index.Bind(Int32Constant(0)); 726 var_index.Bind(Int32Constant(0));
727 727
728 // Iterate over register file and write values into array. 728 // Iterate over register file and write values into array.
729 // The mapping of register to array index must match that used in
730 // BytecodeGraphBuilder::VisitResumeGenerator.
729 Label loop(this, &var_index), done_loop(this); 731 Label loop(this, &var_index), done_loop(this);
730 Goto(&loop); 732 Goto(&loop);
731 Bind(&loop); 733 Bind(&loop);
732 { 734 {
733 Node* index = var_index.value(); 735 Node* index = var_index.value();
734 Node* condition = Int32LessThan(index, RegisterCount()); 736 Node* condition = Int32LessThan(index, RegisterCount());
735 GotoUnless(condition, &done_loop); 737 GotoUnless(condition, &done_loop);
736 738
737 Node* reg_index = 739 Node* reg_index =
738 Int32Sub(Int32Constant(Register(0).ToOperand()), index); 740 Int32Sub(Int32Constant(Register(0).ToOperand()), index);
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
780 Goto(&loop); 782 Goto(&loop);
781 } 783 }
782 Bind(&done_loop); 784 Bind(&done_loop);
783 785
784 return array; 786 return array;
785 } 787 }
786 788
787 } // namespace interpreter 789 } // namespace interpreter
788 } // namespace internal 790 } // namespace internal
789 } // namespace v8 791 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698