Skip to content

Commit 7cdcca7

Browse files
committed
deps: cherry-pick 866ee63 from upstream V8
Original commit message: [string] Re-enable result caching for String.p.split Runtime::kStringSplit's result caching is only enabled when limit equals kMaxUInt32. BUG=v8:6463 Review-Url: https://codereview.chromium.org/2923183002 Cr-Commit-Position: refs/heads/master@{#45724} PR-URL: #13630 Fixes: #13445 Reviewed-By: Ben Noordhuis <[email protected]>
1 parent 8f907b6 commit 7cdcca7

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

deps/v8/src/builtins/builtins-string-gen.cc

+1-4
Original file line numberDiff line numberDiff line change
@@ -1190,14 +1190,11 @@ TF_BUILTIN(StringPrototypeSplit, StringBuiltinsAssembler) {
11901190
});
11911191

11921192
// String and integer conversions.
1193-
// TODO(jgruber): The old implementation used Uint32Max instead of SmiMax -
1194-
// but AFAIK there should not be a difference since arrays are capped at Smi
1195-
// lengths.
11961193

11971194
Callable tostring_callable = CodeFactory::ToString(isolate());
11981195
Node* const subject_string = CallStub(tostring_callable, context, receiver);
11991196
Node* const limit_number =
1200-
Select(IsUndefined(limit), [=]() { return SmiConstant(Smi::kMaxValue); },
1197+
Select(IsUndefined(limit), [=]() { return NumberConstant(kMaxUInt32); },
12011198
[=]() { return ToUint32(context, limit); },
12021199
MachineRepresentation::kTagged);
12031200
Node* const separator_string =

0 commit comments

Comments
 (0)