Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[v14.x] Backport two more V8 fixes #38481

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion common.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@

# Reset this number to 0 on major V8 upgrades.
# Increment by one for each non-official patch applied to deps/v8.
'v8_embedder_string': '-node.61',
'v8_embedder_string': '-node.63',

##### V8 defaults for Node.js #####

Expand Down
11 changes: 8 additions & 3 deletions deps/v8/src/compiler/simplified-lowering.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1426,10 +1426,15 @@ class RepresentationSelector {
Type right_feedback_type = TypeOf(node->InputAt(1));

// Using Signed32 as restriction type amounts to promising there won't be
// signed overflow. This is incompatible with relying on a Word32
// truncation in order to skip the overflow check.
// signed overflow. This is incompatible with relying on a Word32 truncation
// in order to skip the overflow check. Similarly, we must not drop -0 from
// the result type unless we deopt for -0 inputs.
Type const restriction =
truncation.IsUsedAsWord32() ? Type::Any() : Type::Signed32();
truncation.IsUsedAsWord32()
? Type::Any()
: (truncation.identify_zeros() == kIdentifyZeros)
? Type::Signed32OrMinusZero()
: Type::Signed32();

// Handle the case when no int32 checks on inputs are necessary (but
// an overflow check is needed on the output). Note that we do not
Expand Down
2 changes: 1 addition & 1 deletion deps/v8/src/compiler/type-cache.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ class V8_EXPORT_PRIVATE TypeCache final {
Type::Union(kPositiveIntegerOrMinusZero, Type::NaN(), zone());

Type const kAdditiveSafeInteger =
CreateRange(-4503599627370496.0, 4503599627370496.0);
CreateRange(-4503599627370495.0, 4503599627370495.0);
Type const kSafeInteger = CreateRange(-kMaxSafeInteger, kMaxSafeInteger);
Type const kAdditiveSafeIntegerOrMinusZero =
Type::Union(kAdditiveSafeInteger, Type::MinusZero(), zone());
Expand Down