mirror of
https://github.com/nodejs/node.git
synced 2026-10-14 10:26:26 -04:00
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: https://github.com/nodejs/node/pull/13630
Fixes: https://github.com/nodejs/node/issues/13445
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
This commit is contained in:
1 parent
8f907b6baf
commit
7cdcca7623
1 file changed
+1
-4
+1
-4
@@ -1190,14 +1190,11 @@ TF_BUILTIN(StringPrototypeSplit, StringBuiltinsAssembler) {
|
||||
});
|
||||
|
||||
// String and integer conversions.
|
||||
// TODO(jgruber): The old implementation used Uint32Max instead of SmiMax -
|
||||
// but AFAIK there should not be a difference since arrays are capped at Smi
|
||||
// lengths.
|
||||
|
||||
Callable tostring_callable = CodeFactory::ToString(isolate());
|
||||
Node* const subject_string = CallStub(tostring_callable, context, receiver);
|
||||
Node* const limit_number =
|
||||
Select(IsUndefined(limit), [=]() { return SmiConstant(Smi::kMaxValue); },
|
||||
Select(IsUndefined(limit), [=]() { return NumberConstant(kMaxUInt32); },
|
||||
[=]() { return ToUint32(context, limit); },
|
||||
MachineRepresentation::kTagged);
|
||||
Node* const separator_string =
|
||||
|
||||
Reference in new issue
Block a user