-
Notifications
You must be signed in to change notification settings - Fork 15k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: cherry-pick 2f6a2939514f from v8 (#35892)
* chore: [20-x-y] cherry-pick 2f6a2939514f from v8 * chore: update patches Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
- Loading branch information
1 parent
1babaec
commit 6620ba4
Showing
2 changed files
with
34 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 | ||
From: Tobias Tebbi <tebbi@chromium.org> | ||
Date: Thu, 1 Sep 2022 15:35:33 +0200 | ||
Subject: Merged: [compiler] fix typing of [[DateValue]] | ||
|
||
Bug: chromium:1356308 | ||
(cherry picked from commit ae329407989f1e4689baba7a7827863057d688a9) | ||
|
||
Change-Id: I1e132e96325296d180488774ef183daa36dc22c7 | ||
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3915224 | ||
Reviewed-by: Darius Mercadier <dmercadier@chromium.org> | ||
Cr-Commit-Position: refs/branch-heads/10.6@{#25} | ||
Cr-Branched-From: 41bc7435693fbce8ef86753cd9239e30550a3e2d-refs/heads/10.6.194@{#1} | ||
Cr-Branched-From: d5f29b929ce7746409201d77f44048f3e9529b40-refs/heads/main@{#82548} | ||
|
||
diff --git a/src/compiler/type-cache.h b/src/compiler/type-cache.h | ||
index 6442b6f6b0ee39bf1a820168e9dd924e81bc0cb3..a34d094edaa4cb7dd7ac692e4a11d7c890744d7c 100644 | ||
--- a/src/compiler/type-cache.h | ||
+++ b/src/compiler/type-cache.h | ||
@@ -131,9 +131,10 @@ class V8_EXPORT_PRIVATE TypeCache final { | ||
Type const kStringLengthType = CreateRange(0.0, String::kMaxLength); | ||
|
||
// A time value always contains a tagged number in the range | ||
- // [-kMaxTimeInMs, kMaxTimeInMs]. | ||
- Type const kTimeValueType = | ||
- CreateRange(-DateCache::kMaxTimeInMs, DateCache::kMaxTimeInMs); | ||
+ // [-kMaxTimeInMs, kMaxTimeInMs] or -0. | ||
+ Type const kTimeValueType = Type::Union( | ||
+ CreateRange(-DateCache::kMaxTimeInMs, DateCache::kMaxTimeInMs), | ||
+ Type::MinusZero(), zone()); | ||
|
||
// The JSDate::day property always contains a tagged number in the range | ||
// [1, 31] or NaN. |