Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
N
next.js
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alex
next.js
Commits
f9ea1ae6
Commit
f9ea1ae6
authored
Apr 13, 2026
by
Benjamin Woodruff
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Turbopack: Implement Ord for ResolvedVc and OperationVc
parent
ff89de45
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
47 additions
and
3 deletions
+47
-3
manager.rs
turbopack/crates/turbo-tasks/src/manager.rs
+3
-1
raw_vc.rs
turbopack/crates/turbo-tasks/src/raw_vc.rs
+6
-2
operation.rs
turbopack/crates/turbo-tasks/src/vc/operation.rs
+19
-0
resolved.rs
turbopack/crates/turbo-tasks/src/vc/resolved.rs
+19
-0
No files found.
turbopack/crates/turbo-tasks/src/manager.rs
View file @
f9ea1ae6
...
@@ -281,7 +281,9 @@ pub struct UpdateInfo {
...
@@ -281,7 +281,9 @@ pub struct UpdateInfo {
placeholder_for_future_fields
:
(),
placeholder_for_future_fields
:
(),
}
}
#[derive(Clone,
Copy,
Debug,
Eq,
PartialEq,
Hash,
Serialize,
Deserialize,
Encode,
Decode)]
#[derive(
Clone,
Copy,
Debug,
Eq,
PartialEq,
PartialOrd,
Ord,
Hash,
Serialize,
Deserialize,
Encode,
Decode,
)]
pub
enum
TaskPersistence
{
pub
enum
TaskPersistence
{
/// Tasks that may be persisted across sessions using serialization.
/// Tasks that may be persisted across sessions using serialization.
Persistent
,
Persistent
,
...
...
turbopack/crates/turbo-tasks/src/raw_vc.rs
View file @
f9ea1ae6
...
@@ -25,7 +25,9 @@ use crate::{
...
@@ -25,7 +25,9 @@ use crate::{
turbo_tasks
,
turbo_tasks
,
};
};
#[derive(Debug,
Clone,
Copy,
PartialEq,
Eq,
Hash,
Serialize,
Deserialize,
Encode,
Decode)]
#[derive(
Debug,
Clone,
Copy,
PartialEq,
Eq,
PartialOrd,
Ord,
Hash,
Serialize,
Deserialize,
Encode,
Decode,
)]
pub
struct
CellId
{
pub
struct
CellId
{
pub
type_id
:
ValueTypeId
,
pub
type_id
:
ValueTypeId
,
pub
index
:
u32
,
pub
index
:
u32
,
...
@@ -47,7 +49,9 @@ impl Display for CellId {
...
@@ -47,7 +49,9 @@ impl Display for CellId {
///
///
/// [`Vc`]: crate::Vc
/// [`Vc`]: crate::Vc
/// [monomorphization]: https://doc.rust-lang.org/book/ch10-01-syntax.html#performance-of-code-using-generics
/// [monomorphization]: https://doc.rust-lang.org/book/ch10-01-syntax.html#performance-of-code-using-generics
#[derive(Clone,
Copy,
PartialEq,
Eq,
Hash,
Serialize,
Deserialize,
Encode,
Decode)]
#[derive(
Clone,
Copy,
PartialEq,
Eq,
PartialOrd,
Ord,
Hash,
Serialize,
Deserialize,
Encode,
Decode,
)]
pub
enum
RawVc
{
pub
enum
RawVc
{
/// The synchronous return value of a task (after argument resolution). This is the
/// The synchronous return value of a task (after argument resolution). This is the
/// representation used by [`OperationVc`][crate::OperationVc].
/// representation used by [`OperationVc`][crate::OperationVc].
...
...
turbopack/crates/turbo-tasks/src/vc/operation.rs
View file @
f9ea1ae6
use
std
::{
use
std
::{
cmp
::
Ordering
,
fmt
::
Debug
,
fmt
::
Debug
,
future
::
Future
,
future
::
Future
,
hash
::
Hash
,
hash
::
Hash
,
...
@@ -221,6 +222,24 @@ where
...
@@ -221,6 +222,24 @@ where
impl
<
T
>
Eq
for
OperationVc
<
T
>
where
T
:
?
Sized
{}
impl
<
T
>
Eq
for
OperationVc
<
T
>
where
T
:
?
Sized
{}
impl
<
T
>
PartialOrd
<
OperationVc
<
T
>>
for
OperationVc
<
T
>
where
T
:
?
Sized
,
{
fn
partial_cmp
(
&
self
,
other
:
&
Self
)
->
Option
<
Ordering
>
{
Some
(
self
.cmp
(
other
))
}
}
impl
<
T
>
Ord
for
OperationVc
<
T
>
where
T
:
?
Sized
,
{
fn
cmp
(
&
self
,
other
:
&
Self
)
->
Ordering
{
self
.node.node
.cmp
(
&
other
.node.node
)
}
}
impl
<
T
>
Debug
for
OperationVc
<
T
>
impl
<
T
>
Debug
for
OperationVc
<
T
>
where
where
T
:
?
Sized
,
T
:
?
Sized
,
...
...
turbopack/crates/turbo-tasks/src/vc/resolved.rs
View file @
f9ea1ae6
use
std
::{
use
std
::{
any
::
Any
,
any
::
Any
,
cmp
::
Ordering
,
fmt
::
Debug
,
fmt
::
Debug
,
future
::
IntoFuture
,
future
::
IntoFuture
,
hash
::{
Hash
,
Hasher
},
hash
::{
Hash
,
Hasher
},
...
@@ -132,6 +133,24 @@ where
...
@@ -132,6 +133,24 @@ where
impl
<
T
>
Eq
for
ResolvedVc
<
T
>
where
T
:
?
Sized
{}
impl
<
T
>
Eq
for
ResolvedVc
<
T
>
where
T
:
?
Sized
{}
impl
<
T
>
PartialOrd
<
ResolvedVc
<
T
>>
for
ResolvedVc
<
T
>
where
T
:
?
Sized
,
{
fn
partial_cmp
(
&
self
,
other
:
&
Self
)
->
Option
<
Ordering
>
{
Some
(
self
.cmp
(
other
))
}
}
impl
<
T
>
Ord
for
ResolvedVc
<
T
>
where
T
:
?
Sized
,
{
fn
cmp
(
&
self
,
other
:
&
Self
)
->
Ordering
{
self
.node.node
.cmp
(
&
other
.node.node
)
}
}
impl
<
T
>
Hash
for
ResolvedVc
<
T
>
impl
<
T
>
Hash
for
ResolvedVc
<
T
>
where
where
T
:
?
Sized
,
T
:
?
Sized
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment