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

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

Issue 2655023009: [csa] Allow passing VariableList to 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
« 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 1073 matching lines...) Expand 10 before | Expand all | Expand 10 after
1084 BuildFastLoop(VariableList(0, zone()), index_rep, start_index, end_index, 1084 BuildFastLoop(VariableList(0, zone()), index_rep, start_index, end_index,
1085 body, increment, mode); 1085 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 const CodeStubAssembler::VariableList& vars, Node* fixed_array,
1095 ElementsKind kind, Node* first_element_inclusive,
1096 Node* last_element_exclusive, const FastFixedArrayForEachBody& body,
1097 ParameterMode mode = INTPTR_PARAMETERS,
1098 ForEachDirection direction = ForEachDirection::kReverse);
1099
1100 void BuildFastFixedArrayForEach(
1094 Node* fixed_array, ElementsKind kind, Node* first_element_inclusive, 1101 Node* fixed_array, ElementsKind kind, Node* first_element_inclusive,
1095 Node* last_element_exclusive, const FastFixedArrayForEachBody& body, 1102 Node* last_element_exclusive, const FastFixedArrayForEachBody& body,
1096 ParameterMode mode = INTPTR_PARAMETERS, 1103 ParameterMode mode = INTPTR_PARAMETERS,
1097 ForEachDirection direction = ForEachDirection::kReverse); 1104 ForEachDirection direction = ForEachDirection::kReverse) {
1105 CodeStubAssembler::VariableList list(0, zone());
1106 BuildFastFixedArrayForEach(list, fixed_array, kind, first_element_inclusive,
1107 last_element_exclusive, body, mode, direction);
1108 }
1098 1109
1099 Node* GetArrayAllocationSize(Node* element_count, ElementsKind kind, 1110 Node* GetArrayAllocationSize(Node* element_count, ElementsKind kind,
1100 ParameterMode mode, int header_size) { 1111 ParameterMode mode, int header_size) {
1101 return ElementOffsetFromIndex(element_count, kind, mode, header_size); 1112 return ElementOffsetFromIndex(element_count, kind, mode, header_size);
1102 } 1113 }
1103 1114
1104 Node* GetFixedArrayAllocationSize(Node* element_count, ElementsKind kind, 1115 Node* GetFixedArrayAllocationSize(Node* element_count, ElementsKind kind,
1105 ParameterMode mode) { 1116 ParameterMode mode) {
1106 return GetArrayAllocationSize(element_count, kind, mode, 1117 return GetArrayAllocationSize(element_count, kind, mode,
1107 FixedArray::kHeaderSize); 1118 FixedArray::kHeaderSize);
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
1304 } 1315 }
1305 #else 1316 #else
1306 #define CSA_SLOW_ASSERT(csa, x) ((void)0) 1317 #define CSA_SLOW_ASSERT(csa, x) ((void)0)
1307 #endif 1318 #endif
1308 1319
1309 DEFINE_OPERATORS_FOR_FLAGS(CodeStubAssembler::AllocationFlags); 1320 DEFINE_OPERATORS_FOR_FLAGS(CodeStubAssembler::AllocationFlags);
1310 1321
1311 } // namespace internal 1322 } // namespace internal
1312 } // namespace v8 1323 } // namespace v8
1313 #endif // V8_CODE_STUB_ASSEMBLER_H_ 1324 #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