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:
parent
8f907b6baf
commit
7cdcca7623
5
deps/v8/src/builtins/builtins-string-gen.cc
vendored
5
deps/v8/src/builtins/builtins-string-gen.cc
vendored
@ -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 =
|
||||
|
Loading…
x
Reference in New Issue
Block a user