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

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

Issue 2665143002: [csa] Universally use ParameterMode in BuildFastFixedArrayForEach (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
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 1057 matching lines...) Expand 10 before | Expand all | Expand 10 after
1068 Node* CreateWeakCellInFeedbackVector(Node* feedback_vector, Node* slot, 1068 Node* CreateWeakCellInFeedbackVector(Node* feedback_vector, Node* slot,
1069 Node* value); 1069 Node* value);
1070 1070
1071 // Create a new AllocationSite and install it into a feedback vector. 1071 // Create a new AllocationSite and install it into a feedback vector.
1072 Node* CreateAllocationSiteInFeedbackVector(Node* feedback_vector, Node* slot); 1072 Node* CreateAllocationSiteInFeedbackVector(Node* feedback_vector, Node* slot);
1073 1073
1074 enum class IndexAdvanceMode { kPre, kPost }; 1074 enum class IndexAdvanceMode { kPre, kPost };
1075 1075
1076 typedef std::function<void(Node* index)> FastLoopBody; 1076 typedef std::function<void(Node* index)> FastLoopBody;
1077 1077
1078 Node* BuildFastLoop(const VariableList& var_list, 1078 Node* BuildFastLoop(const VariableList& var_list, Node* start_index,
1079 MachineRepresentation index_rep, Node* start_index,
1080 Node* end_index, const FastLoopBody& body, int increment, 1079 Node* end_index, const FastLoopBody& body, int increment,
1081 IndexAdvanceMode mode = IndexAdvanceMode::kPre); 1080 ParameterMode parameter_mode,
1081 IndexAdvanceMode advance_mode = IndexAdvanceMode::kPre);
1082 1082
1083 Node* BuildFastLoop(MachineRepresentation index_rep, Node* start_index, 1083 Node* BuildFastLoop(Node* start_index, Node* end_index,
1084 Node* end_index, const FastLoopBody& body, int increment, 1084 const FastLoopBody& body, int increment,
1085 IndexAdvanceMode mode = IndexAdvanceMode::kPre) { 1085 ParameterMode parameter_mode,
1086 return BuildFastLoop(VariableList(0, zone()), index_rep, start_index, 1086 IndexAdvanceMode advance_mode = IndexAdvanceMode::kPre) {
1087 end_index, body, increment, mode); 1087 return BuildFastLoop(VariableList(0, zone()), start_index, end_index, body,
1088 increment, parameter_mode, advance_mode);
1088 } 1089 }
1089 1090
1090 enum class ForEachDirection { kForward, kReverse }; 1091 enum class ForEachDirection { kForward, kReverse };
1091 1092
1092 typedef std::function<void(Node* fixed_array, Node* offset)> 1093 typedef std::function<void(Node* fixed_array, Node* offset)>
1093 FastFixedArrayForEachBody; 1094 FastFixedArrayForEachBody;
1094 1095
1095 void BuildFastFixedArrayForEach( 1096 void BuildFastFixedArrayForEach(
1096 const CodeStubAssembler::VariableList& vars, Node* fixed_array, 1097 const CodeStubAssembler::VariableList& vars, Node* fixed_array,
1097 ElementsKind kind, Node* first_element_inclusive, 1098 ElementsKind kind, Node* first_element_inclusive,
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
1317 } 1318 }
1318 #else 1319 #else
1319 #define CSA_SLOW_ASSERT(csa, x) ((void)0) 1320 #define CSA_SLOW_ASSERT(csa, x) ((void)0)
1320 #endif 1321 #endif
1321 1322
1322 DEFINE_OPERATORS_FOR_FLAGS(CodeStubAssembler::AllocationFlags); 1323 DEFINE_OPERATORS_FOR_FLAGS(CodeStubAssembler::AllocationFlags);
1323 1324
1324 } // namespace internal 1325 } // namespace internal
1325 } // namespace v8 1326 } // namespace v8
1326 #endif // V8_CODE_STUB_ASSEMBLER_H_ 1327 #endif // V8_CODE_STUB_ASSEMBLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698