Commit af1705ad authored by Matt Mastracci's avatar Matt Mastracci

Revert accidental rename

parent 9eca3e33
...@@ -33,7 +33,7 @@ mod production; ...@@ -33,7 +33,7 @@ mod production;
mod style_production; mod style_production;
#[turbo_tasks::value] #[turbo_tasks::value]
struct ChunkedItemsWithInfo { struct ChunkItemsWithInfo {
#[allow(clippy::type_complexity)] #[allow(clippy::type_complexity)]
by_type: SmallVec< by_type: SmallVec<
[( [(
...@@ -45,8 +45,8 @@ struct ChunkedItemsWithInfo { ...@@ -45,8 +45,8 @@ struct ChunkedItemsWithInfo {
} }
#[turbo_tasks::value(transparent)] #[turbo_tasks::value(transparent)]
struct BatchChunkedItemsWithInfo( struct BatchChunkItemsWithInfo(
FxHashMap<ChunkItemOrBatchWithAsyncModuleInfo, ResolvedVc<ChunkedItemsWithInfo>>, FxHashMap<ChunkItemOrBatchWithAsyncModuleInfo, ResolvedVc<ChunkItemsWithInfo>>,
); );
#[derive(Clone, PartialEq, Eq, TraceRawVcs, NonLocalValue, ValueDebugFormat, Encode, Decode)] #[derive(Clone, PartialEq, Eq, TraceRawVcs, NonLocalValue, ValueDebugFormat, Encode, Decode)]
...@@ -101,7 +101,7 @@ async fn batch_size( ...@@ -101,7 +101,7 @@ async fn batch_size(
async fn plain_chunk_items_with_info( async fn plain_chunk_items_with_info(
chunk_item_or_batch: ChunkItemOrBatchWithAsyncModuleInfo, chunk_item_or_batch: ChunkItemOrBatchWithAsyncModuleInfo,
chunking_context: Vc<Box<dyn ChunkingContext>>, chunking_context: Vc<Box<dyn ChunkingContext>>,
) -> Result<ChunkedItemsWithInfo> { ) -> Result<ChunkItemsWithInfo> {
Ok(match chunk_item_or_batch { Ok(match chunk_item_or_batch {
ChunkItemOrBatchWithAsyncModuleInfo::ChunkItem(chunk_item_with_info) => { ChunkItemOrBatchWithAsyncModuleInfo::ChunkItem(chunk_item_with_info) => {
let ChunkItemWithAsyncModuleInfo { let ChunkItemWithAsyncModuleInfo {
...@@ -115,7 +115,7 @@ async fn plain_chunk_items_with_info( ...@@ -115,7 +115,7 @@ async fn plain_chunk_items_with_info(
let chunk_item_size = let chunk_item_size =
ty.chunk_item_size(chunking_context, *chunk_item, async_info.map(|info| *info)); ty.chunk_item_size(chunking_context, *chunk_item, async_info.map(|info| *info));
ChunkedItemsWithInfo { ChunkItemsWithInfo {
by_type: smallvec![( by_type: smallvec![(
ty.to_resolved().await?, ty.to_resolved().await?,
smallvec![ChunkItemOrBatchWithInfo::ChunkItem { smallvec![ChunkItemOrBatchWithInfo::ChunkItem {
...@@ -141,7 +141,7 @@ async fn plain_chunk_items_with_info( ...@@ -141,7 +141,7 @@ async fn plain_chunk_items_with_info(
}) })
.try_join() .try_join()
.await?; .await?;
ChunkedItemsWithInfo { ChunkItemsWithInfo {
by_type: by_type.into_iter().collect(), by_type: by_type.into_iter().collect(),
} }
} }
...@@ -194,7 +194,7 @@ async fn plain_chunk_items_with_info_with_type( ...@@ -194,7 +194,7 @@ async fn plain_chunk_items_with_info_with_type(
async fn chunk_items_with_info( async fn chunk_items_with_info(
chunk_item_or_batch: ChunkItemOrBatchWithAsyncModuleInfo, chunk_item_or_batch: ChunkItemOrBatchWithAsyncModuleInfo,
chunking_context: Vc<Box<dyn ChunkingContext>>, chunking_context: Vc<Box<dyn ChunkingContext>>,
) -> Result<Vc<ChunkedItemsWithInfo>> { ) -> Result<Vc<ChunkItemsWithInfo>> {
let chunk_items_with_info = let chunk_items_with_info =
plain_chunk_items_with_info(chunk_item_or_batch, chunking_context).await?; plain_chunk_items_with_info(chunk_item_or_batch, chunking_context).await?;
Ok(chunk_items_with_info.cell()) Ok(chunk_items_with_info.cell())
...@@ -206,7 +206,7 @@ async fn chunk_items_with_info_with_type( ...@@ -206,7 +206,7 @@ async fn chunk_items_with_info_with_type(
ty: ResolvedVc<Box<dyn ChunkType>>, ty: ResolvedVc<Box<dyn ChunkType>>,
batch_group: Option<ResolvedVc<ChunkItemBatchGroup>>, batch_group: Option<ResolvedVc<ChunkItemBatchGroup>>,
chunking_context: Vc<Box<dyn ChunkingContext>>, chunking_context: Vc<Box<dyn ChunkingContext>>,
) -> Result<Vc<ChunkedItemsWithInfo>> { ) -> Result<Vc<ChunkItemsWithInfo>> {
let result = plain_chunk_items_with_info_with_type( let result = plain_chunk_items_with_info_with_type(
&chunk_item_or_batch, &chunk_item_or_batch,
ty, ty,
...@@ -214,7 +214,7 @@ async fn chunk_items_with_info_with_type( ...@@ -214,7 +214,7 @@ async fn chunk_items_with_info_with_type(
chunking_context, chunking_context,
) )
.await?; .await?;
Ok(ChunkedItemsWithInfo { Ok(ChunkItemsWithInfo {
by_type: smallvec![result], by_type: smallvec![result],
} }
.cell()) .cell())
...@@ -224,7 +224,7 @@ async fn chunk_items_with_info_with_type( ...@@ -224,7 +224,7 @@ async fn chunk_items_with_info_with_type(
async fn batch_chunk_items_with_info( async fn batch_chunk_items_with_info(
batch_group: Vc<ChunkItemBatchGroup>, batch_group: Vc<ChunkItemBatchGroup>,
chunking_context: Vc<Box<dyn ChunkingContext>>, chunking_context: Vc<Box<dyn ChunkingContext>>,
) -> Result<Vc<BatchChunkedItemsWithInfo>> { ) -> Result<Vc<BatchChunkItemsWithInfo>> {
let split_batch_group = batch_group.split_by_chunk_type().await?; let split_batch_group = batch_group.split_by_chunk_type().await?;
if split_batch_group.len() == 1 { if split_batch_group.len() == 1 {
let &(ty, batch) = split_batch_group.into_iter().next().unwrap(); let &(ty, batch) = split_batch_group.into_iter().next().unwrap();
...@@ -255,7 +255,7 @@ async fn batch_chunk_items_with_info_with_type( ...@@ -255,7 +255,7 @@ async fn batch_chunk_items_with_info_with_type(
batch_group: Vc<ChunkItemBatchGroup>, batch_group: Vc<ChunkItemBatchGroup>,
ty: Vc<Box<dyn ChunkType>>, ty: Vc<Box<dyn ChunkType>>,
chunking_context: Vc<Box<dyn ChunkingContext>>, chunking_context: Vc<Box<dyn ChunkingContext>>,
) -> Result<Vc<BatchChunkedItemsWithInfo>> { ) -> Result<Vc<BatchChunkItemsWithInfo>> {
let map = batch_group let map = batch_group
.await? .await?
.items .items
...@@ -298,7 +298,7 @@ pub async fn make_chunks( ...@@ -298,7 +298,7 @@ pub async fn make_chunks(
chunk_items_or_batches = chunk_items_or_batches.len(), chunk_items_or_batches = chunk_items_or_batches.len(),
batch_groups = batch_groups.len() batch_groups = batch_groups.len()
); );
let chunk_items: Vec<ReadRef<ChunkedItemsWithInfo>> = batch_info( let chunk_items: Vec<ReadRef<ChunkItemsWithInfo>> = batch_info(
&batch_groups, &batch_groups,
&chunk_items_or_batches, &chunk_items_or_batches,
|batch_group| batch_chunk_items_with_info(batch_group, *chunking_context).into_future(), |batch_group| batch_chunk_items_with_info(batch_group, *chunking_context).into_future(),
......
...@@ -40,12 +40,12 @@ pub async fn make_production_chunks( ...@@ -40,12 +40,12 @@ pub async fn make_production_chunks(
let merged_modules = module_graph.merged_modules().await?; let merged_modules = module_graph.merged_modules().await?;
#[derive(Default)] #[derive(Default)]
struct GroupedChunkedItems<'l> { struct GroupedChunkItems<'l> {
chunk_items: Vec<&'l ChunkItemOrBatchWithInfo>, chunk_items: Vec<&'l ChunkItemOrBatchWithInfo>,
batch_group: Option<ResolvedVc<ChunkItemBatchGroup>>, batch_group: Option<ResolvedVc<ChunkItemBatchGroup>>,
} }
let mut grouped_chunk_items = FxIndexMap::<_, GroupedChunkedItems<'_>>::default(); let mut grouped_chunk_items = FxIndexMap::<_, GroupedChunkItems<'_>>::default();
enum Prepared { enum Prepared {
ChunkItem(MappedReadRef<ModuleToChunkGroups, RoaringBitmapWrapper>), ChunkItem(MappedReadRef<ModuleToChunkGroups, RoaringBitmapWrapper>),
...@@ -143,7 +143,7 @@ pub async fn make_production_chunks( ...@@ -143,7 +143,7 @@ pub async fn make_production_chunks(
.map( .map(
|( |(
key, key,
GroupedChunkedItems { GroupedChunkItems {
chunk_items, chunk_items,
batch_group, batch_group,
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment