Skip to content

Commit c1a155f

Browse files
committed
rename
1 parent 6fa5934 commit c1a155f

File tree

10 files changed

+56
-56
lines changed

10 files changed

+56
-56
lines changed

turbopack/crates/turbo-tasks-backend/src/backend/mod.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -818,7 +818,7 @@ impl<B: BackingStorage> TurboTasksBackendInner<B> {
818818
}
819819

820820
let ReadCellOptions {
821-
serializable_cell_content,
821+
is_serializable_cell_content,
822822
tracking,
823823
final_read_hint,
824824
} = options;
@@ -839,9 +839,9 @@ impl<B: BackingStorage> TurboTasksBackendInner<B> {
839839
};
840840

841841
let content = if final_read_hint {
842-
task.remove_cell_data(serializable_cell_content, cell)
842+
task.remove_cell_data(is_serializable_cell_content, cell)
843843
} else {
844-
task.get_cell_data(serializable_cell_content, cell)
844+
task.get_cell_data(is_serializable_cell_content, cell)
845845
};
846846
if let Some(content) = content {
847847
if tracking.should_track(false) {
@@ -2611,7 +2611,7 @@ impl<B: BackingStorage> TurboTasksBackendInner<B> {
26112611
) -> Result<TypedCellContent> {
26122612
let mut ctx = self.execute_context(turbo_tasks);
26132613
let task = ctx.task(task_id, TaskDataCategory::Data);
2614-
if let Some(content) = task.get_cell_data(options.serializable_cell_content, cell) {
2614+
if let Some(content) = task.get_cell_data(options.is_serializable_cell_content, cell) {
26152615
debug_assert!(content.type_id == cell.type_id, "Cell type ID mismatch");
26162616
Ok(CellContent(Some(content.reference)).into_typed(cell.type_id))
26172617
} else {
@@ -2754,7 +2754,7 @@ impl<B: BackingStorage> TurboTasksBackendInner<B> {
27542754
&self,
27552755
task_id: TaskId,
27562756
cell: CellId,
2757-
serializable_cell_content: bool,
2757+
is_serializable_cell_content: bool,
27582758
content: CellContent,
27592759
verification_mode: VerificationMode,
27602760
turbo_tasks: &dyn TurboTasksBackendApi<TurboTasksBackend<B>>,
@@ -2763,7 +2763,7 @@ impl<B: BackingStorage> TurboTasksBackendInner<B> {
27632763
task_id,
27642764
cell,
27652765
content,
2766-
serializable_cell_content,
2766+
is_serializable_cell_content,
27672767
verification_mode,
27682768
self.execute_context(turbo_tasks),
27692769
);
@@ -3351,15 +3351,15 @@ impl<B: BackingStorage> Backend for TurboTasksBackend<B> {
33513351
&self,
33523352
task_id: TaskId,
33533353
cell: CellId,
3354-
serializable_cell_content: bool,
3354+
is_serializable_cell_content: bool,
33553355
content: CellContent,
33563356
verification_mode: VerificationMode,
33573357
turbo_tasks: &dyn TurboTasksBackendApi<Self>,
33583358
) {
33593359
self.0.update_task_cell(
33603360
task_id,
33613361
cell,
3362-
serializable_cell_content,
3362+
is_serializable_cell_content,
33633363
content,
33643364
verification_mode,
33653365
turbo_tasks,

turbopack/crates/turbo-tasks-backend/src/backend/operation/mod.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -471,28 +471,28 @@ pub trait TaskGuard: Debug {
471471
}
472472
fn remove_cell_data(
473473
&mut self,
474-
serializable_cell_content: bool,
474+
is_serializable_cell_content: bool,
475475
cell: CellId,
476476
) -> Option<TypedSharedReference> {
477-
if serializable_cell_content {
477+
if is_serializable_cell_content {
478478
remove!(self, CellData { cell })
479479
} else {
480480
remove!(self, TransientCellData { cell }).map(|sr| sr.into_typed(cell.type_id))
481481
}
482482
}
483483
fn get_cell_data(
484484
&self,
485-
serializable_cell_content: bool,
485+
is_serializable_cell_content: bool,
486486
cell: CellId,
487487
) -> Option<TypedSharedReference> {
488-
if serializable_cell_content {
488+
if is_serializable_cell_content {
489489
get!(self, CellData { cell }).cloned()
490490
} else {
491491
get!(self, TransientCellData { cell }).map(|sr| sr.clone().into_typed(cell.type_id))
492492
}
493493
}
494-
fn has_cell_data(&self, serializable_cell_content: bool, cell: CellId) -> bool {
495-
if serializable_cell_content {
494+
fn has_cell_data(&self, is_serializable_cell_content: bool, cell: CellId) -> bool {
495+
if is_serializable_cell_content {
496496
self.has_key(&CachedDataItemKey::CellData { cell })
497497
} else {
498498
self.has_key(&CachedDataItemKey::TransientCellData { cell })

turbopack/crates/turbo-tasks-backend/src/backend/operation/update_cell.rs

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,14 @@ use crate::{
2424
#[allow(clippy::large_enum_variant)]
2525
pub enum UpdateCellOperation {
2626
InvalidateWhenCellDependency {
27-
serializable_cell_content: bool,
27+
is_serializable_cell_content: bool,
2828
cell_ref: CellRef,
2929
dependent_tasks: SmallVec<[TaskId; 4]>,
3030
content: Option<TypedSharedReference>,
3131
queue: AggregationUpdateQueue,
3232
},
3333
FinalCellChange {
34-
serializable_cell_content: bool,
34+
is_serializable_cell_content: bool,
3535
cell_ref: CellRef,
3636
content: Option<TypedSharedReference>,
3737
queue: AggregationUpdateQueue,
@@ -48,7 +48,7 @@ impl UpdateCellOperation {
4848
task_id: TaskId,
4949
cell: CellId,
5050
content: CellContent,
51-
serializable_cell_content: bool,
51+
is_serializable_cell_content: bool,
5252
#[cfg(feature = "verify_determinism")] verification_mode: VerificationMode,
5353
#[cfg(not(feature = "verify_determinism"))] _verification_mode: VerificationMode,
5454
mut ctx: impl ExecuteContext,
@@ -68,7 +68,7 @@ impl UpdateCellOperation {
6868
!ctx.should_track_dependencies() || !task.has_key(&CachedDataItemKey::Dirty {});
6969

7070
if assume_unchanged {
71-
let has_old_content = task.has_cell_data(serializable_cell_content, cell);
71+
let has_old_content = task.has_cell_data(is_serializable_cell_content, cell);
7272
if has_old_content {
7373
// Never update cells when recomputing if they already have a value.
7474
// It's not expected that content changes during recomputation.
@@ -77,7 +77,7 @@ impl UpdateCellOperation {
7777
#[cfg(feature = "verify_determinism")]
7878
if !is_stateful
7979
&& matches!(verification_mode, VerificationMode::EqualityCheck)
80-
&& content != task.get_cell_data(serializable_cell_content, cell)
80+
&& content != task.get_cell_data(is_serializable_cell_content, cell)
8181
{
8282
let task_description = ctx.get_task_description(task_id);
8383
let cell_type = turbo_tasks::registry::get_value_type(cell.type_id).global_name;
@@ -118,15 +118,15 @@ impl UpdateCellOperation {
118118
// readers will wait for it to be set via InProgressCell.
119119

120120
let old_content = task.remove(&CachedDataItemKey::cell_data(
121-
serializable_cell_content,
121+
is_serializable_cell_content,
122122
cell,
123123
));
124124

125125
drop(task);
126126
drop(old_content);
127127

128128
UpdateCellOperation::InvalidateWhenCellDependency {
129-
serializable_cell_content,
129+
is_serializable_cell_content,
130130
cell_ref: CellRef {
131131
task: task_id,
132132
cell,
@@ -145,13 +145,13 @@ impl UpdateCellOperation {
145145

146146
let old_content = if let Some(new_content) = content {
147147
task.insert(CachedDataItem::cell_data(
148-
serializable_cell_content,
148+
is_serializable_cell_content,
149149
cell,
150150
new_content,
151151
))
152152
} else {
153153
task.remove(&CachedDataItemKey::cell_data(
154-
serializable_cell_content,
154+
is_serializable_cell_content,
155155
cell,
156156
))
157157
};
@@ -173,7 +173,7 @@ impl Operation for UpdateCellOperation {
173173
ctx.operation_suspend_point(&self);
174174
match self {
175175
UpdateCellOperation::InvalidateWhenCellDependency {
176-
serializable_cell_content,
176+
is_serializable_cell_content,
177177
cell_ref,
178178
ref mut dependent_tasks,
179179
ref mut content,
@@ -214,15 +214,15 @@ impl Operation for UpdateCellOperation {
214214
}
215215
if dependent_tasks.is_empty() {
216216
self = UpdateCellOperation::FinalCellChange {
217-
serializable_cell_content,
217+
is_serializable_cell_content,
218218
cell_ref,
219219
content: take(content),
220220
queue: take(queue),
221221
};
222222
}
223223
}
224224
UpdateCellOperation::FinalCellChange {
225-
serializable_cell_content,
225+
is_serializable_cell_content,
226226
cell_ref: CellRef { task, cell },
227227
content,
228228
ref mut queue,
@@ -231,7 +231,7 @@ impl Operation for UpdateCellOperation {
231231

232232
if let Some(content) = content {
233233
task.add_new(CachedDataItem::cell_data(
234-
serializable_cell_content,
234+
is_serializable_cell_content,
235235
cell,
236236
content,
237237
));

turbopack/crates/turbo-tasks-backend/src/data.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -369,11 +369,11 @@ pub enum CachedDataItem {
369369

370370
impl CachedDataItem {
371371
pub fn cell_data(
372-
serializable_cell_content: bool,
372+
is_serializable_cell_content: bool,
373373
cell: CellId,
374374
value: TypedSharedReference,
375375
) -> Self {
376-
if serializable_cell_content {
376+
if is_serializable_cell_content {
377377
CachedDataItem::CellData { cell, value }
378378
} else {
379379
CachedDataItem::TransientCellData {
@@ -507,8 +507,8 @@ impl CachedDataItem {
507507
}
508508

509509
impl CachedDataItemKey {
510-
pub fn cell_data(serializable_cell_content: bool, cell: CellId) -> Self {
511-
if serializable_cell_content {
510+
pub fn cell_data(is_serializable_cell_content: bool, cell: CellId) -> Self {
511+
if is_serializable_cell_content {
512512
CachedDataItemKey::CellData { cell }
513513
} else {
514514
CachedDataItemKey::TransientCellData { cell }

turbopack/crates/turbo-tasks-testing/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ impl TurboTasksApi for VcStorage {
265265
&self,
266266
task: TaskId,
267267
index: CellId,
268-
_serializable_cell_content: bool,
268+
_is_serializable_cell_content: bool,
269269
content: CellContent,
270270
_verification_mode: VerificationMode,
271271
) {

turbopack/crates/turbo-tasks/src/backend.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -634,7 +634,7 @@ pub trait Backend: Sync + Send {
634634
&self,
635635
task: TaskId,
636636
index: CellId,
637-
serializable_cell_content: bool,
637+
is_serializable_cell_content: bool,
638638
content: CellContent,
639639
verification_mode: VerificationMode,
640640
turbo_tasks: &dyn TurboTasksBackendApi<Self>,

turbopack/crates/turbo-tasks/src/manager.rs

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ pub trait TurboTasksApi: TurboTasksCallApi + Sync + Send {
159159
&self,
160160
task: TaskId,
161161
index: CellId,
162-
serializable_cell_content: bool,
162+
is_serializable_cell_content: bool,
163163
content: CellContent,
164164
verification_mode: VerificationMode,
165165
);
@@ -1356,14 +1356,14 @@ impl<B: Backend + 'static> TurboTasksApi for TurboTasks<B> {
13561356
&self,
13571357
task: TaskId,
13581358
index: CellId,
1359-
serializable_cell_content: bool,
1359+
is_serializable_cell_content: bool,
13601360
content: CellContent,
13611361
verification_mode: VerificationMode,
13621362
) {
13631363
self.backend.update_task_cell(
13641364
task,
13651365
index,
1366-
serializable_cell_content,
1366+
is_serializable_cell_content,
13671367
content,
13681368
verification_mode,
13691369
self,
@@ -1741,7 +1741,7 @@ pub(crate) async fn read_task_cell(
17411741
pub struct CurrentCellRef {
17421742
current_task: TaskId,
17431743
index: CellId,
1744-
serializable_cell_content: bool,
1744+
is_serializable_cell_content: bool,
17451745
}
17461746

17471747
type VcReadRepr<T> = <<T as VcValueType>::Read as VcRead<T>>::Repr;
@@ -1776,7 +1776,7 @@ impl CurrentCellRef {
17761776
ReadCellOptions {
17771777
// INVALIDATION: Reading our own cell must be untracked
17781778
tracking: ReadTracking::Untracked,
1779-
serializable_cell_content: self.serializable_cell_content,
1779+
is_serializable_cell_content: self.is_serializable_cell_content,
17801780
final_read_hint: false,
17811781
},
17821782
)
@@ -1786,7 +1786,7 @@ impl CurrentCellRef {
17861786
tt.update_own_task_cell(
17871787
self.current_task,
17881788
self.index,
1789-
self.serializable_cell_content,
1789+
self.is_serializable_cell_content,
17901790
CellContent(Some(update)),
17911791
VerificationMode::EqualityCheck,
17921792
)
@@ -1879,7 +1879,7 @@ impl CurrentCellRef {
18791879
tt.update_own_task_cell(
18801880
self.current_task,
18811881
self.index,
1882-
self.serializable_cell_content,
1882+
self.is_serializable_cell_content,
18831883
CellContent(Some(SharedReference::new(triomphe::Arc::new(
18841884
<T::Read as VcRead<T>>::value_to_repr(new_value),
18851885
)))),
@@ -1909,7 +1909,7 @@ impl CurrentCellRef {
19091909
ReadCellOptions {
19101910
// INVALIDATION: Reading our own cell must be untracked
19111911
tracking: ReadTracking::Untracked,
1912-
serializable_cell_content: self.serializable_cell_content,
1912+
is_serializable_cell_content: self.is_serializable_cell_content,
19131913
final_read_hint: false,
19141914
},
19151915
)
@@ -1927,7 +1927,7 @@ impl CurrentCellRef {
19271927
tt.update_own_task_cell(
19281928
self.current_task,
19291929
self.index,
1930-
self.serializable_cell_content,
1930+
self.is_serializable_cell_content,
19311931
CellContent(Some(shared_ref)),
19321932
verification_mode,
19331933
)
@@ -1945,7 +1945,7 @@ pub fn find_cell_by_type<T: VcValueType>() -> CurrentCellRef {
19451945
find_cell_by_id(T::get_value_type_id(), T::has_serialization())
19461946
}
19471947

1948-
pub fn find_cell_by_id(ty: ValueTypeId, serializable_cell_content: bool) -> CurrentCellRef {
1948+
pub fn find_cell_by_id(ty: ValueTypeId, is_serializable_cell_content: bool) -> CurrentCellRef {
19491949
CURRENT_TASK_STATE.with(|ts| {
19501950
let current_task = current_task("celling turbo_tasks values");
19511951
let mut ts = ts.write().unwrap();
@@ -1956,7 +1956,7 @@ pub fn find_cell_by_id(ty: ValueTypeId, serializable_cell_content: bool) -> Curr
19561956
CurrentCellRef {
19571957
current_task,
19581958
index: CellId { type_id: ty, index },
1959-
serializable_cell_content,
1959+
is_serializable_cell_content,
19601960
}
19611961
})
19621962
}

0 commit comments

Comments
 (0)