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

Side by Side Diff: src/code-stub-assembler.h

Issue 2657293002: [csa] Return last value from BuildFastLoop to allow chaining sequential loops (Closed)
Patch Set: Created 3 years, 10 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
« no previous file with comments | « no previous file | src/code-stub-assembler.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 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 #ifndef V8_CODE_STUB_ASSEMBLER_H_ 5 #ifndef V8_CODE_STUB_ASSEMBLER_H_
6 #define V8_CODE_STUB_ASSEMBLER_H_ 6 #define V8_CODE_STUB_ASSEMBLER_H_
7 7
8 #include <functional> 8 #include <functional>
9 9
10 #include "src/compiler/code-assembler.h" 10 #include "src/compiler/code-assembler.h"
(...skipping 1055 matching lines...) Expand 10 before | Expand all | Expand 10 after
1066 Node* CreateWeakCellInFeedbackVector(Node* feedback_vector, Node* slot, 1066 Node* CreateWeakCellInFeedbackVector(Node* feedback_vector, Node* slot,
1067 Node* value); 1067 Node* value);
1068 1068
1069 // Create a new AllocationSite and install it into a feedback vector. 1069 // Create a new AllocationSite and install it into a feedback vector.
1070 Node* CreateAllocationSiteInFeedbackVector(Node* feedback_vector, Node* slot); 1070 Node* CreateAllocationSiteInFeedbackVector(Node* feedback_vector, Node* slot);
1071 1071
1072 enum class IndexAdvanceMode { kPre, kPost }; 1072 enum class IndexAdvanceMode { kPre, kPost };
1073 1073
1074 typedef std::function<void(Node* index)> FastLoopBody; 1074 typedef std::function<void(Node* index)> FastLoopBody;
1075 1075
1076 void BuildFastLoop(const VariableList& var_list, 1076 Node* BuildFastLoop(const VariableList& var_list,
1077 MachineRepresentation index_rep, Node* start_index, 1077 MachineRepresentation index_rep, Node* start_index,
1078 Node* end_index, const FastLoopBody& body, int increment, 1078 Node* end_index, const FastLoopBody& body, int increment,
1079 IndexAdvanceMode mode = IndexAdvanceMode::kPre); 1079 IndexAdvanceMode mode = IndexAdvanceMode::kPre);
1080 1080
1081 void BuildFastLoop(MachineRepresentation index_rep, Node* start_index, 1081 Node* BuildFastLoop(MachineRepresentation index_rep, Node* start_index,
1082 Node* end_index, const FastLoopBody& body, int increment, 1082 Node* end_index, const FastLoopBody& body, int increment,
1083 IndexAdvanceMode mode = IndexAdvanceMode::kPre) { 1083 IndexAdvanceMode mode = IndexAdvanceMode::kPre) {
1084 BuildFastLoop(VariableList(0, zone()), index_rep, start_index, end_index, 1084 return BuildFastLoop(VariableList(0, zone()), index_rep, start_index,
1085 body, increment, mode); 1085 end_index, body, increment, mode);
1086 } 1086 }
1087 1087
1088 enum class ForEachDirection { kForward, kReverse }; 1088 enum class ForEachDirection { kForward, kReverse };
1089 1089
1090 typedef std::function<void(Node* fixed_array, Node* offset)> 1090 typedef std::function<void(Node* fixed_array, Node* offset)>
1091 FastFixedArrayForEachBody; 1091 FastFixedArrayForEachBody;
1092 1092
1093 void BuildFastFixedArrayForEach( 1093 void BuildFastFixedArrayForEach(
1094 Node* fixed_array, ElementsKind kind, Node* first_element_inclusive, 1094 Node* fixed_array, ElementsKind kind, Node* first_element_inclusive,
1095 Node* last_element_exclusive, const FastFixedArrayForEachBody& body, 1095 Node* last_element_exclusive, const FastFixedArrayForEachBody& body,
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
1304 } 1304 }
1305 #else 1305 #else
1306 #define CSA_SLOW_ASSERT(csa, x) ((void)0) 1306 #define CSA_SLOW_ASSERT(csa, x) ((void)0)
1307 #endif 1307 #endif
1308 1308
1309 DEFINE_OPERATORS_FOR_FLAGS(CodeStubAssembler::AllocationFlags); 1309 DEFINE_OPERATORS_FOR_FLAGS(CodeStubAssembler::AllocationFlags);
1310 1310
1311 } // namespace internal 1311 } // namespace internal
1312 } // namespace v8 1312 } // namespace v8
1313 #endif // V8_CODE_STUB_ASSEMBLER_H_ 1313 #endif // V8_CODE_STUB_ASSEMBLER_H_
OLDNEW
« no previous file with comments | « no previous file | src/code-stub-assembler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698