-
-
Notifications
You must be signed in to change notification settings - Fork 598
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(incremental): side effects optimization (#8799)
* feat(incremental): incrementally side effects optimize * wip * fix * fix * fix
- Loading branch information
Showing
97 changed files
with
741 additions
and
443 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
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
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
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
File renamed without changes.
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,25 @@ | ||
use rspack_collections::{IdentifierMap, IdentifierSet, UkeyMap}; | ||
use rspack_error::Diagnostic; | ||
|
||
use crate::{ | ||
chunk_graph_chunk::ChunkId, ChunkHashesResult, ChunkRenderResult, ChunkUkey, ModuleId, | ||
RuntimeGlobals, | ||
}; | ||
|
||
mod cgm_hash_artifact; | ||
mod cgm_runtime_requirement_artifact; | ||
mod code_generation_results; | ||
mod side_effects_do_optimize_artifact; | ||
|
||
pub use cgm_hash_artifact::*; | ||
pub use cgm_runtime_requirement_artifact::*; | ||
pub use code_generation_results::*; | ||
pub use side_effects_do_optimize_artifact::*; | ||
|
||
pub type AsyncModulesArtifact = IdentifierSet; | ||
pub type DependenciesDiagnosticsArtifact = IdentifierMap<Vec<Diagnostic>>; | ||
pub type ModuleIdsArtifact = IdentifierMap<ModuleId>; | ||
pub type ChunkIdsArtifact = UkeyMap<ChunkUkey, ChunkId>; | ||
pub type CgcRuntimeRequirementsArtifact = UkeyMap<ChunkUkey, RuntimeGlobals>; | ||
pub type ChunkHashesArtifact = UkeyMap<ChunkUkey, ChunkHashesResult>; | ||
pub type ChunkRenderArtifact = UkeyMap<ChunkUkey, ChunkRenderResult>; |
19 changes: 19 additions & 0 deletions
19
crates/rspack_core/src/artifacts/side_effects_do_optimize_artifact.rs
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,19 @@ | ||
use rspack_collections::UkeyMap; | ||
use rspack_util::atom::Atom; | ||
|
||
use crate::{DependencyId, ExportInfo, ModuleIdentifier}; | ||
|
||
#[derive(Debug, Clone)] | ||
pub struct SideEffectsDoOptimize { | ||
pub ids: Vec<Atom>, | ||
pub target_module: ModuleIdentifier, | ||
pub need_move_target: Option<SideEffectsDoOptimizeMoveTarget>, | ||
} | ||
|
||
#[derive(Debug, Clone)] | ||
pub struct SideEffectsDoOptimizeMoveTarget { | ||
pub export_info: ExportInfo, | ||
pub target_export: Option<Vec<Atom>>, | ||
} | ||
|
||
pub type SideEffectsOptimizeArtifact = UkeyMap<DependencyId, SideEffectsDoOptimize>; |
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
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
Oops, something went wrong.