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

Side by Side Diff: src/builtins/builtins-regexp.cc

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
« no previous file with comments | « no previous file | src/code-stub-assembler.h » ('j') | src/code-stub-assembler.cc » ('J')
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 #include "src/builtins/builtins-constructor.h" 5 #include "src/builtins/builtins-constructor.h"
6 #include "src/builtins/builtins-utils.h" 6 #include "src/builtins/builtins-utils.h"
7 #include "src/builtins/builtins.h" 7 #include "src/builtins/builtins.h"
8 #include "src/code-factory.h" 8 #include "src/code-factory.h"
9 #include "src/code-stub-assembler.h" 9 #include "src/code-stub-assembler.h"
10 #include "src/regexp/jsregexp.h" 10 #include "src/regexp/jsregexp.h"
(...skipping 2227 matching lines...) Expand 10 before | Expand all | Expand 10 after
2238 } 2238 }
2239 } 2239 }
2240 2240
2241 Bind(&if_hasexplicitcaptures); 2241 Bind(&if_hasexplicitcaptures);
2242 { 2242 {
2243 Node* const from = int_zero; 2243 Node* const from = int_zero;
2244 Node* const to = SmiUntag(res_length); 2244 Node* const to = SmiUntag(res_length);
2245 const int increment = 1; 2245 const int increment = 1;
2246 2246
2247 BuildFastLoop( 2247 BuildFastLoop(
2248 MachineType::PointerRepresentation(), from, to, 2248 from, to,
2249 [this, res_elems, isolate, native_context, context, undefined, 2249 [this, res_elems, isolate, native_context, context, undefined,
2250 replace_callable](Node* index) { 2250 replace_callable](Node* index) {
2251 Node* const elem = LoadFixedArrayElement(res_elems, index); 2251 Node* const elem = LoadFixedArrayElement(res_elems, index);
2252 2252
2253 Label do_continue(this); 2253 Label do_continue(this);
2254 GotoIf(TaggedIsSmi(elem), &do_continue); 2254 GotoIf(TaggedIsSmi(elem), &do_continue);
2255 2255
2256 // elem must be an Array. 2256 // elem must be an Array.
2257 // Use the apply argument as backing for global RegExp properties. 2257 // Use the apply argument as backing for global RegExp properties.
2258 2258
(...skipping 10 matching lines...) Expand all
2269 2269
2270 // Overwrite the i'th element in the results with the string we got 2270 // Overwrite the i'th element in the results with the string we got
2271 // back from the callback function. 2271 // back from the callback function.
2272 2272
2273 Node* const replacement_str = ToString(context, replacement_obj); 2273 Node* const replacement_str = ToString(context, replacement_obj);
2274 StoreFixedArrayElement(res_elems, index, replacement_str); 2274 StoreFixedArrayElement(res_elems, index, replacement_str);
2275 2275
2276 Goto(&do_continue); 2276 Goto(&do_continue);
2277 Bind(&do_continue); 2277 Bind(&do_continue);
2278 }, 2278 },
2279 increment, CodeStubAssembler::IndexAdvanceMode::kPost); 2279 increment, CodeStubAssembler::INTPTR_PARAMETERS,
2280 CodeStubAssembler::IndexAdvanceMode::kPost);
2280 2281
2281 Goto(&create_result); 2282 Goto(&create_result);
2282 } 2283 }
2283 2284
2284 Bind(&create_result); 2285 Bind(&create_result);
2285 { 2286 {
2286 Node* const result = CallRuntime(Runtime::kStringBuilderConcat, context, 2287 Node* const result = CallRuntime(Runtime::kStringBuilderConcat, context,
2287 res, res_length, string); 2288 res, res_length, string);
2288 var_result.Bind(result); 2289 var_result.Bind(result);
2289 Goto(&out); 2290 Goto(&out);
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
2510 Bind(&if_matched); 2511 Bind(&if_matched);
2511 { 2512 {
2512 Node* result = 2513 Node* result =
2513 ConstructNewResultFromMatchInfo(context, match_indices, string); 2514 ConstructNewResultFromMatchInfo(context, match_indices, string);
2514 Return(result); 2515 Return(result);
2515 } 2516 }
2516 } 2517 }
2517 2518
2518 } // namespace internal 2519 } // namespace internal
2519 } // namespace v8 2520 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/code-stub-assembler.h » ('j') | src/code-stub-assembler.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698