Unverified Commit 7759ea32 authored by Donny/강동윤's avatar Donny/강동윤 Committed by GitHub

perf(turbopack): Use last side effect as `ModuleEvaluation` fragment (#76940)

### What?

Use the last side effect fragment instead of the module evaluation fragment.

### Why?

Module evaluation fragment is a waste of memory.

### How?

Closes PACK-3440

---------
Co-authored-by: 's avatarTobias Koppers <tobias.koppers@googlemail.com>
parent 37554159
...@@ -101,7 +101,6 @@ impl EcmascriptModulePartAsset { ...@@ -101,7 +101,6 @@ impl EcmascriptModulePartAsset {
| ModulePart::InternalEvaluation(..) | ModulePart::InternalEvaluation(..)
| ModulePart::Facade | ModulePart::Facade
| ModulePart::Exports | ModulePart::Exports
| ModulePart::Evaluation
) { ) {
return Ok(EcmascriptModulePartAsset { return Ok(EcmascriptModulePartAsset {
full_module: module, full_module: module,
......
...@@ -44,6 +44,8 @@ pub(crate) enum ItemId { ...@@ -44,6 +44,8 @@ pub(crate) enum ItemId {
#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)] #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub(crate) enum ItemIdGroupKind { pub(crate) enum ItemIdGroupKind {
/// Used only for testing
#[cfg(test)]
ModuleEvaluation, ModuleEvaluation,
/// `(local, export_name)`` /// `(local, export_name)``
Export(Id, Atom), Export(Id, Atom),
...@@ -130,6 +132,8 @@ pub(crate) struct ItemData { ...@@ -130,6 +132,8 @@ pub(crate) struct ItemData {
/// Server actions breaks when we merge exports. /// Server actions breaks when we merge exports.
pub disable_export_merging: bool, pub disable_export_merging: bool,
pub is_module_evaluation: bool,
} }
impl fmt::Debug for ItemData { impl fmt::Debug for ItemData {
...@@ -145,6 +149,8 @@ impl fmt::Debug for ItemData { ...@@ -145,6 +149,8 @@ impl fmt::Debug for ItemData {
.field("side_effects", &self.side_effects) .field("side_effects", &self.side_effects)
.field("export", &self.export) .field("export", &self.export)
.field("explicit_deps", &self.explicit_deps) .field("explicit_deps", &self.explicit_deps)
.field("disable_export_merging", &self.disable_export_merging)
.field("is_module_evaluation", &self.is_module_evaluation)
.finish() .finish()
} }
} }
...@@ -165,6 +171,7 @@ impl Default for ItemData { ...@@ -165,6 +171,7 @@ impl Default for ItemData {
binding_source: Default::default(), binding_source: Default::default(),
explicit_deps: Default::default(), explicit_deps: Default::default(),
disable_export_merging: Default::default(), disable_export_merging: Default::default(),
is_module_evaluation: Default::default(),
} }
} }
} }
...@@ -328,6 +335,8 @@ impl DepGraph { ...@@ -328,6 +335,8 @@ impl DepGraph {
.clone() .clone()
}; };
let mut module_evaluation_ix = None;
for (ix, group) in groups.graph_ix.iter().enumerate() { for (ix, group) in groups.graph_ix.iter().enumerate() {
let mut chunk = Module { let mut chunk = Module {
span: DUMMY_SP, span: DUMMY_SP,
...@@ -389,10 +398,10 @@ impl DepGraph { ...@@ -389,10 +398,10 @@ impl DepGraph {
} }
} }
for item in group { for item_id in group {
match item { match item_id {
ItemId::Group(ItemIdGroupKind::Export(..)) => { ItemId::Group(ItemIdGroupKind::Export(..)) => {
if let Some(export) = &data[item].export { if let Some(export) = &data[item_id].export {
outputs.insert(Key::Export(export.as_str().into()), ix as u32); outputs.insert(Key::Export(export.as_str().into()), ix as u32);
let s = ExportSpecifier::Named(ExportNamedSpecifier { let s = ExportSpecifier::Named(ExportNamedSpecifier {
...@@ -418,11 +427,14 @@ impl DepGraph { ...@@ -418,11 +427,14 @@ impl DepGraph {
)); ));
} }
} }
ItemId::Group(ItemIdGroupKind::ModuleEvaluation) => {
outputs.insert(Key::ModuleEvaluation, ix as u32);
}
_ => {} _ => {
if data[item_id].is_module_evaluation {
debug_assert_eq!(module_evaluation_ix, None);
module_evaluation_ix = Some(ix as u32);
outputs.insert(Key::ModuleEvaluation, ix as u32);
}
}
} }
} }
...@@ -686,6 +698,31 @@ impl DepGraph { ...@@ -686,6 +698,31 @@ impl DepGraph {
modules.push(exports_module); modules.push(exports_module);
// Currently we need to have `Key::ModuleEvaluation` in the outputs
// even if it is empty.
if module_evaluation_ix.is_none() {
outputs.insert(Key::ModuleEvaluation, modules.len() as u32);
module_evaluation_ix = Some(modules.len() as u32);
modules.push(Module {
span: DUMMY_SP,
body: vec![],
shebang: None,
});
}
// Push `export {}` to the module evaluation to make it module.
modules[module_evaluation_ix.unwrap() as usize]
.body
.push(ModuleItem::ModuleDecl(ModuleDecl::ExportNamed(
NamedExport {
span: DUMMY_SP,
specifiers: Default::default(),
src: None,
type_only: false,
with: None,
},
)));
SplitModuleResult { SplitModuleResult {
entrypoints: outputs, entrypoints: outputs,
part_deps, part_deps,
...@@ -1370,22 +1407,6 @@ impl DepGraph { ...@@ -1370,22 +1407,6 @@ impl DepGraph {
} }
} }
{
// `module evaluation side effects` Node
let id = ItemId::Group(ItemIdGroupKind::ModuleEvaluation);
ids.push(id.clone());
items.insert(
id,
ItemData {
content: ModuleItem::Stmt(Stmt::Expr(ExprStmt {
span: DUMMY_SP,
expr: "module evaluation".into(),
})),
..Default::default()
},
);
}
for (local, export_name, disable_export_merging) in exports { for (local, export_name, disable_export_merging) in exports {
let id = ItemId::Group(ItemIdGroupKind::Export(local.clone(), export_name.clone())); let id = ItemId::Group(ItemIdGroupKind::Export(local.clone(), export_name.clone()));
ids.push(id.clone()); ids.push(id.clone());
......
...@@ -350,23 +350,20 @@ impl Analyzer<'_> { ...@@ -350,23 +350,20 @@ impl Analyzer<'_> {
/// Phase 4: Exports /// Phase 4: Exports
fn handle_exports(&mut self, _module: &Module) { fn handle_exports(&mut self, _module: &Module) {
for item_id in self.item_ids.iter() { // We use the last side effect as a module evaluation
if let ItemId::Group(kind) = item_id { if let Some(last) = self.last_side_effects.last() {
match kind { if let Some(item) = self.items.get_mut(last) {
ItemIdGroupKind::ModuleEvaluation => { item.is_module_evaluation = true;
// Create a strong dependency to LAST_SIDE_EFFECTS }
}
self.g for item_id in self.item_ids.iter() {
.add_strong_deps(item_id, self.last_side_effects.last()); if let ItemId::Group(ItemIdGroupKind::Export(local, _)) = item_id {
} // Create a strong dependency to LAST_WRITES for this var
ItemIdGroupKind::Export(local, _) => {
// Create a strong dependency to LAST_WRITES for this var
let state = self.vars.entry(local.clone()).or_default(); let state = self.vars.entry(local.clone()).or_default();
self.g.add_strong_deps(item_id, state.last_writes.iter()); self.g.add_strong_deps(item_id, state.last_writes.iter());
}
}
} }
} }
} }
......
# Items # Items
Count: 18 Count: 17
## Item 1: Stmt 0, `ImportOfModule` ## Item 1: Stmt 0, `ImportOfModule`
...@@ -163,15 +163,13 @@ graph TD ...@@ -163,15 +163,13 @@ graph TD
Item12; Item12;
Item13; Item13;
Item14; Item14;
Item14["ModuleEvaluation"]; Item14["export foobar"];
Item15; Item15;
Item15["export foobar"]; Item15["export foo"];
Item16; Item16;
Item16["export foo"]; Item16["export external1"];
Item17; Item17;
Item17["export external1"]; Item17["export external2"];
Item18;
Item18["export external2"];
``` ```
# Phase 2 # Phase 2
```mermaid ```mermaid
...@@ -190,15 +188,13 @@ graph TD ...@@ -190,15 +188,13 @@ graph TD
Item12; Item12;
Item13; Item13;
Item14; Item14;
Item14["ModuleEvaluation"]; Item14["export foobar"];
Item15; Item15;
Item15["export foobar"]; Item15["export foo"];
Item16; Item16;
Item16["export foo"]; Item16["export external1"];
Item17; Item17;
Item17["export external1"]; Item17["export external2"];
Item18;
Item18["export external2"];
Item4 --> Item3; Item4 --> Item3;
Item6 --> Item5; Item6 --> Item5;
Item6 --> Item3; Item6 --> Item3;
...@@ -215,11 +211,11 @@ graph TD ...@@ -215,11 +211,11 @@ graph TD
Item9 -.-> Item11; Item9 -.-> Item11;
Item10 --> Item7; Item10 --> Item7;
Item10 -.-> Item9; Item10 -.-> Item9;
Item15 --> Item8; Item14 --> Item8;
Item15 --> Item3; Item14 --> Item3;
Item16 --> Item4; Item15 --> Item4;
Item17 --> Item12; Item16 --> Item12;
Item18 --> Item13; Item17 --> Item13;
``` ```
# Phase 3 # Phase 3
```mermaid ```mermaid
...@@ -238,15 +234,13 @@ graph TD ...@@ -238,15 +234,13 @@ graph TD
Item12; Item12;
Item13; Item13;
Item14; Item14;
Item14["ModuleEvaluation"]; Item14["export foobar"];
Item15; Item15;
Item15["export foobar"]; Item15["export foo"];
Item16; Item16;
Item16["export foo"]; Item16["export external1"];
Item17; Item17;
Item17["export external1"]; Item17["export external2"];
Item18;
Item18["export external2"];
Item4 --> Item3; Item4 --> Item3;
Item6 --> Item5; Item6 --> Item5;
Item6 --> Item3; Item6 --> Item3;
...@@ -263,18 +257,18 @@ graph TD ...@@ -263,18 +257,18 @@ graph TD
Item9 -.-> Item11; Item9 -.-> Item11;
Item10 --> Item7; Item10 --> Item7;
Item10 -.-> Item9; Item10 -.-> Item9;
Item15 --> Item8; Item14 --> Item8;
Item15 --> Item3; Item14 --> Item3;
Item16 --> Item4; Item15 --> Item4;
Item17 --> Item12; Item16 --> Item12;
Item18 --> Item13; Item17 --> Item13;
Item11 --> Item2; Item11 --> Item2;
Item11 --> Item8; Item11 --> Item8;
Item11 --> Item3; Item11 --> Item3;
Item12 --> Item11; Item12 --> Item11;
Item12 --> Item8; Item12 --> Item8;
Item12 --> Item3; Item12 --> Item3;
Item13 -.-> Item15; Item13 -.-> Item14;
Item13 --> Item3; Item13 --> Item3;
``` ```
# Phase 4 # Phase 4
...@@ -294,15 +288,13 @@ graph TD ...@@ -294,15 +288,13 @@ graph TD
Item12; Item12;
Item13; Item13;
Item14; Item14;
Item14["ModuleEvaluation"]; Item14["export foobar"];
Item15; Item15;
Item15["export foobar"]; Item15["export foo"];
Item16; Item16;
Item16["export foo"]; Item16["export external1"];
Item17; Item17;
Item17["export external1"]; Item17["export external2"];
Item18;
Item18["export external2"];
Item4 --> Item3; Item4 --> Item3;
Item6 --> Item5; Item6 --> Item5;
Item6 --> Item3; Item6 --> Item3;
...@@ -319,20 +311,19 @@ graph TD ...@@ -319,20 +311,19 @@ graph TD
Item9 -.-> Item11; Item9 -.-> Item11;
Item10 --> Item7; Item10 --> Item7;
Item10 -.-> Item9; Item10 -.-> Item9;
Item15 --> Item8; Item14 --> Item8;
Item15 --> Item3; Item14 --> Item3;
Item16 --> Item4; Item15 --> Item4;
Item17 --> Item12; Item16 --> Item12;
Item18 --> Item13; Item17 --> Item13;
Item11 --> Item2; Item11 --> Item2;
Item11 --> Item8; Item11 --> Item8;
Item11 --> Item3; Item11 --> Item3;
Item12 --> Item11; Item12 --> Item11;
Item12 --> Item8; Item12 --> Item8;
Item12 --> Item3; Item12 --> Item3;
Item13 -.-> Item15; Item13 -.-> Item14;
Item13 --> Item3; Item13 --> Item3;
Item14 --> Item9;
``` ```
# Final # Final
```mermaid ```mermaid
...@@ -344,15 +335,13 @@ graph TD ...@@ -344,15 +335,13 @@ graph TD
N4["Items: [ItemId(3, VarDeclarator(0)), ItemId(4, Normal)]"]; N4["Items: [ItemId(3, VarDeclarator(0)), ItemId(4, Normal)]"];
N5["Items: [ItemId(5, VarDeclarator(0))]"]; N5["Items: [ItemId(5, VarDeclarator(0))]"];
N6["Items: [ItemId(6, Normal)]"]; N6["Items: [ItemId(6, Normal)]"];
N7["Items: [ItemId(7, Normal)]"]; N7["Items: [ItemId(7, Normal), ItemId(8, Normal)]"];
N8["Items: [ItemId(8, Normal)]"]; N8["Items: [ItemId(9, Normal)]"];
N9["Items: [ItemId(9, Normal)]"]; N9["Items: [ItemId(10, Normal), ItemId(Export((&quot;external1&quot;, #2), &quot;external1&quot;))]"];
N10["Items: [ItemId(10, Normal), ItemId(Export((&quot;external1&quot;, #2), &quot;external1&quot;))]"]; N10["Items: [ItemId(11, Normal), ItemId(Export((&quot;external2&quot;, #2), &quot;external2&quot;)), ItemId(Export((&quot;foobar&quot;, #2), &quot;foobar&quot;))]"];
N11["Items: [ItemId(11, Normal), ItemId(Export((&quot;external2&quot;, #2), &quot;external2&quot;)), ItemId(Export((&quot;foobar&quot;, #2), &quot;foobar&quot;))]"]; N11["Items: [ItemId(Export((&quot;foo&quot;, #2), &quot;foo&quot;))]"];
N12["Items: [ItemId(ModuleEvaluation)]"];
N13["Items: [ItemId(Export((&quot;foo&quot;, #2), &quot;foo&quot;))]"];
N3 --> N2; N3 --> N2;
N11 --> N2; N8 --> N6;
N4 --> N2; N4 --> N2;
N4 -.-> N3; N4 -.-> N3;
N5 --> N4; N5 --> N4;
...@@ -360,41 +349,38 @@ graph TD ...@@ -360,41 +349,38 @@ graph TD
N6 --> N4; N6 --> N4;
N6 --> N2; N6 --> N2;
N6 -.-> N5; N6 -.-> N5;
N7 --> N5; N9 --> N6;
N7 --> N0; N7 -.-> N8;
N7 -.-> N1;
N7 --> N6; N7 --> N6;
N7 -.-> N9; N7 -.-> N1;
N8 --> N5; N7 --> N0;
N8 -.-> N7; N7 --> N5;
N10 --> N2; N10 --> N2;
N10 --> N6; N9 --> N8;
N13 --> N3;
N12 --> N7;
N10 --> N9;
N9 --> N1;
N9 --> N6;
N9 --> N2;
N1 --> N0; N1 --> N0;
N11 --> N3;
N8 --> N2;
N9 --> N2;
N8 --> N1;
``` ```
# Entrypoints # Entrypoints
``` ```
{ {
ModuleEvaluation: 12, ModuleEvaluation: 7,
Export( Export(
"external1", "external1",
): 10, ): 9,
Export( Export(
"external2", "external2",
): 11, ): 10,
Export( Export(
"foo", "foo",
): 13, ): 11,
Export( Export(
"foobar", "foobar",
): 11, ): 10,
Exports: 14, Exports: 12,
} }
``` ```
...@@ -484,32 +470,23 @@ import { e as foobarCopy } from "__TURBOPACK_PART__" assert { ...@@ -484,32 +470,23 @@ import { e as foobarCopy } from "__TURBOPACK_PART__" assert {
__turbopack_part__: -5 __turbopack_part__: -5
}; };
import "__TURBOPACK_PART__" assert { import "__TURBOPACK_PART__" assert {
__turbopack_part__: 0 __turbopack_part__: 8
};
import "__TURBOPACK_PART__" assert {
__turbopack_part__: 1
}; };
import "__TURBOPACK_PART__" assert { import "__TURBOPACK_PART__" assert {
__turbopack_part__: 6 __turbopack_part__: 6
}; };
import "__TURBOPACK_PART__" assert { import "__TURBOPACK_PART__" assert {
__turbopack_part__: 9 __turbopack_part__: 1
};
console.log(foobarCopy);
```
## Part 8
```js
import { e as foobarCopy } from "__TURBOPACK_PART__" assert {
__turbopack_part__: -5
}; };
import "__TURBOPACK_PART__" assert { import "__TURBOPACK_PART__" assert {
__turbopack_part__: 7 __turbopack_part__: 0
}; };
console.log(foobarCopy);
foobarCopy += "Unused"; foobarCopy += "Unused";
export { };
``` ```
## Part 9 ## Part 8
```js ```js
import { b as foobar } from "__TURBOPACK_PART__" assert { import { b as foobar } from "__TURBOPACK_PART__" assert {
__turbopack_part__: -2 __turbopack_part__: -2
...@@ -529,13 +506,13 @@ export { internal as f } from "__TURBOPACK_VAR__" assert { ...@@ -529,13 +506,13 @@ export { internal as f } from "__TURBOPACK_VAR__" assert {
}; };
``` ```
## Part 10 ## Part 9
```js ```js
import { b as foobar } from "__TURBOPACK_PART__" assert { import { b as foobar } from "__TURBOPACK_PART__" assert {
__turbopack_part__: -2 __turbopack_part__: -2
}; };
import { f as internal } from "__TURBOPACK_PART__" assert { import { f as internal } from "__TURBOPACK_PART__" assert {
__turbopack_part__: -9 __turbopack_part__: -8
}; };
import "__TURBOPACK_PART__" assert { import "__TURBOPACK_PART__" assert {
__turbopack_part__: 6 __turbopack_part__: 6
...@@ -549,7 +526,7 @@ export { external1 as g } from "__TURBOPACK_VAR__" assert { ...@@ -549,7 +526,7 @@ export { external1 as g } from "__TURBOPACK_VAR__" assert {
}; };
``` ```
## Part 11 ## Part 10
```js ```js
import { b as foobar } from "__TURBOPACK_PART__" assert { import { b as foobar } from "__TURBOPACK_PART__" assert {
__turbopack_part__: -2 __turbopack_part__: -2
...@@ -564,15 +541,7 @@ export { external2 as h } from "__TURBOPACK_VAR__" assert { ...@@ -564,15 +541,7 @@ export { external2 as h } from "__TURBOPACK_VAR__" assert {
}; };
``` ```
## Part 12 ## Part 11
```js
import "__TURBOPACK_PART__" assert {
__turbopack_part__: 7
};
"module evaluation";
```
## Part 13
```js ```js
import { c as foo } from "__TURBOPACK_PART__" assert { import { c as foo } from "__TURBOPACK_PART__" assert {
__turbopack_part__: -3 __turbopack_part__: -3
...@@ -580,7 +549,7 @@ import { c as foo } from "__TURBOPACK_PART__" assert { ...@@ -580,7 +549,7 @@ import { c as foo } from "__TURBOPACK_PART__" assert {
export { foo }; export { foo };
``` ```
## Part 14 ## Part 12
```js ```js
export { external1 } from "__TURBOPACK_PART__" assert { export { external1 } from "__TURBOPACK_PART__" assert {
__turbopack_part__: "export external1" __turbopack_part__: "export external1"
...@@ -598,10 +567,24 @@ export { foo } from "__TURBOPACK_PART__" assert { ...@@ -598,10 +567,24 @@ export { foo } from "__TURBOPACK_PART__" assert {
``` ```
## Merged (module eval) ## Merged (module eval)
```js ```js
import { e as foobarCopy } from "__TURBOPACK_PART__" assert {
__turbopack_part__: -5
};
import "__TURBOPACK_PART__" assert { import "__TURBOPACK_PART__" assert {
__turbopack_part__: 7 __turbopack_part__: 8
}; };
"module evaluation"; import "__TURBOPACK_PART__" assert {
__turbopack_part__: 6
};
import "__TURBOPACK_PART__" assert {
__turbopack_part__: 1
};
import "__TURBOPACK_PART__" assert {
__turbopack_part__: 0
};
console.log(foobarCopy);
foobarCopy += "Unused";
export { };
``` ```
# Entrypoints # Entrypoints
...@@ -706,13 +689,13 @@ import { e as foobarCopy } from "__TURBOPACK_PART__" assert { ...@@ -706,13 +689,13 @@ import { e as foobarCopy } from "__TURBOPACK_PART__" assert {
__turbopack_part__: -5 __turbopack_part__: -5
}; };
import "__TURBOPACK_PART__" assert { import "__TURBOPACK_PART__" assert {
__turbopack_part__: 6 __turbopack_part__: 0
}; };
import "__TURBOPACK_PART__" assert { import "__TURBOPACK_PART__" assert {
__turbopack_part__: 0 __turbopack_part__: 6
}; };
console.log(foobarCopy); console.log(foobarCopy);
"module evaluation"; export { };
``` ```
## Part 8 ## Part 8
...@@ -797,12 +780,12 @@ import { e as foobarCopy } from "__TURBOPACK_PART__" assert { ...@@ -797,12 +780,12 @@ import { e as foobarCopy } from "__TURBOPACK_PART__" assert {
__turbopack_part__: -5 __turbopack_part__: -5
}; };
import "__TURBOPACK_PART__" assert { import "__TURBOPACK_PART__" assert {
__turbopack_part__: 6 __turbopack_part__: 0
}; };
import "__TURBOPACK_PART__" assert { import "__TURBOPACK_PART__" assert {
__turbopack_part__: 0 __turbopack_part__: 6
}; };
console.log(foobarCopy); console.log(foobarCopy);
"module evaluation"; export { };
``` ```
# Items # Items
Count: 19 Count: 18
## Item 1: Stmt 0, `Normal` ## Item 1: Stmt 0, `Normal`
...@@ -174,15 +174,13 @@ graph TD ...@@ -174,15 +174,13 @@ graph TD
Item14; Item14;
Item2; Item2;
Item15; Item15;
Item15["ModuleEvaluation"]; Item15["export external1"];
Item16; Item16;
Item16["export external1"]; Item16["export foobar"];
Item17; Item17;
Item17["export foobar"]; Item17["export foo"];
Item18; Item18;
Item18["export foo"]; Item18["export external2"];
Item19;
Item19["export external2"];
Item2 --> Item1; Item2 --> Item1;
``` ```
# Phase 2 # Phase 2
...@@ -203,15 +201,13 @@ graph TD ...@@ -203,15 +201,13 @@ graph TD
Item14; Item14;
Item2; Item2;
Item15; Item15;
Item15["ModuleEvaluation"]; Item15["export external1"];
Item16; Item16;
Item16["export external1"]; Item16["export foobar"];
Item17; Item17;
Item17["export foobar"]; Item17["export foo"];
Item18; Item18;
Item18["export foo"]; Item18["export external2"];
Item19;
Item19["export external2"];
Item2 --> Item1; Item2 --> Item1;
Item6 --> Item5; Item6 --> Item5;
Item8 --> Item7; Item8 --> Item7;
...@@ -229,11 +225,11 @@ graph TD ...@@ -229,11 +225,11 @@ graph TD
Item11 -.-> Item4; Item11 -.-> Item4;
Item12 --> Item9; Item12 --> Item9;
Item12 -.-> Item11; Item12 -.-> Item11;
Item16 --> Item3; Item15 --> Item3;
Item17 --> Item10; Item16 --> Item10;
Item17 --> Item5; Item16 --> Item5;
Item18 --> Item6; Item17 --> Item6;
Item19 --> Item14; Item18 --> Item14;
``` ```
# Phase 3 # Phase 3
```mermaid ```mermaid
...@@ -253,15 +249,13 @@ graph TD ...@@ -253,15 +249,13 @@ graph TD
Item14; Item14;
Item2; Item2;
Item15; Item15;
Item15["ModuleEvaluation"]; Item15["export external1"];
Item16; Item16;
Item16["export external1"]; Item16["export foobar"];
Item17; Item17;
Item17["export foobar"]; Item17["export foo"];
Item18; Item18;
Item18["export foo"]; Item18["export external2"];
Item19;
Item19["export external2"];
Item2 --> Item1; Item2 --> Item1;
Item6 --> Item5; Item6 --> Item5;
Item8 --> Item7; Item8 --> Item7;
...@@ -279,18 +273,18 @@ graph TD ...@@ -279,18 +273,18 @@ graph TD
Item11 -.-> Item4; Item11 -.-> Item4;
Item12 --> Item9; Item12 --> Item9;
Item12 -.-> Item11; Item12 -.-> Item11;
Item16 --> Item3; Item15 --> Item3;
Item17 --> Item10; Item16 --> Item10;
Item17 --> Item5; Item16 --> Item5;
Item18 --> Item6; Item17 --> Item6;
Item19 --> Item14; Item18 --> Item14;
Item3 --> Item13; Item3 --> Item13;
Item3 --> Item10; Item3 --> Item10;
Item3 --> Item5; Item3 --> Item5;
Item13 --> Item4; Item13 --> Item4;
Item13 --> Item10; Item13 --> Item10;
Item13 --> Item5; Item13 --> Item5;
Item14 -.-> Item17; Item14 -.-> Item16;
Item14 --> Item5; Item14 --> Item5;
``` ```
# Phase 4 # Phase 4
...@@ -311,15 +305,13 @@ graph TD ...@@ -311,15 +305,13 @@ graph TD
Item14; Item14;
Item2; Item2;
Item15; Item15;
Item15["ModuleEvaluation"]; Item15["export external1"];
Item16; Item16;
Item16["export external1"]; Item16["export foobar"];
Item17; Item17;
Item17["export foobar"]; Item17["export foo"];
Item18; Item18;
Item18["export foo"]; Item18["export external2"];
Item19;
Item19["export external2"];
Item2 --> Item1; Item2 --> Item1;
Item6 --> Item5; Item6 --> Item5;
Item8 --> Item7; Item8 --> Item7;
...@@ -337,20 +329,19 @@ graph TD ...@@ -337,20 +329,19 @@ graph TD
Item11 -.-> Item4; Item11 -.-> Item4;
Item12 --> Item9; Item12 --> Item9;
Item12 -.-> Item11; Item12 -.-> Item11;
Item16 --> Item3; Item15 --> Item3;
Item17 --> Item10; Item16 --> Item10;
Item17 --> Item5; Item16 --> Item5;
Item18 --> Item6; Item17 --> Item6;
Item19 --> Item14; Item18 --> Item14;
Item3 --> Item13; Item3 --> Item13;
Item3 --> Item10; Item3 --> Item10;
Item3 --> Item5; Item3 --> Item5;
Item13 --> Item4; Item13 --> Item4;
Item13 --> Item10; Item13 --> Item10;
Item13 --> Item5; Item13 --> Item5;
Item14 -.-> Item17; Item14 -.-> Item16;
Item14 --> Item5; Item14 --> Item5;
Item15 --> Item11;
``` ```
# Final # Final
```mermaid ```mermaid
...@@ -363,15 +354,13 @@ graph TD ...@@ -363,15 +354,13 @@ graph TD
N5["Items: [ItemId(4, VarDeclarator(0)), ItemId(5, Normal)]"]; N5["Items: [ItemId(4, VarDeclarator(0)), ItemId(5, Normal)]"];
N6["Items: [ItemId(6, VarDeclarator(0))]"]; N6["Items: [ItemId(6, VarDeclarator(0))]"];
N7["Items: [ItemId(7, Normal)]"]; N7["Items: [ItemId(7, Normal)]"];
N8["Items: [ItemId(8, Normal), ItemId(12, ImportOfModule)]"]; N8["Items: [ItemId(8, Normal), ItemId(9, Normal), ItemId(12, ImportOfModule)]"];
N9["Items: [ItemId(9, Normal)]"]; N9["Items: [ItemId(10, Normal)]"];
N10["Items: [ItemId(10, Normal)]"]; N10["Items: [ItemId(11, Normal), ItemId(Export((&quot;external2&quot;, #2), &quot;external2&quot;)), ItemId(Export((&quot;foobar&quot;, #2), &quot;foobar&quot;))]"];
N11["Items: [ItemId(11, Normal), ItemId(Export((&quot;external2&quot;, #2), &quot;external2&quot;)), ItemId(Export((&quot;foobar&quot;, #2), &quot;foobar&quot;))]"]; N11["Items: [ItemId(Export((&quot;foo&quot;, #2), &quot;foo&quot;))]"];
N12["Items: [ItemId(ModuleEvaluation)]"]; N0 --> N3;
N13["Items: [ItemId(Export((&quot;foo&quot;, #2), &quot;foo&quot;))]"];
N8 --> N1;
N4 --> N3; N4 --> N3;
N10 --> N2; N9 --> N2;
N5 --> N3; N5 --> N3;
N5 -.-> N4; N5 -.-> N4;
N6 --> N5; N6 --> N5;
...@@ -379,40 +368,36 @@ graph TD ...@@ -379,40 +368,36 @@ graph TD
N7 --> N5; N7 --> N5;
N7 --> N3; N7 --> N3;
N7 -.-> N6; N7 -.-> N6;
N8 --> N6; N0 --> N9;
N0 --> N10;
N8 -.-> N10;
N8 --> N7;
N8 -.-> N2;
N9 --> N6;
N9 -.-> N8;
N11 --> N3;
N10 --> N3;
N12 --> N8;
N13 --> N4;
N2 --> N1; N2 --> N1;
N10 --> N7; N8 -.-> N2;
N0 --> N3; N8 --> N7;
N8 -.-> N9;
N8 --> N6;
N0 --> N7; N0 --> N7;
N9 --> N3;
N9 --> N7;
N10 --> N3;
N11 --> N4;
``` ```
# Entrypoints # Entrypoints
``` ```
{ {
ModuleEvaluation: 12, ModuleEvaluation: 8,
Export( Export(
"external1", "external1",
): 0, ): 0,
Export( Export(
"external2", "external2",
): 11, ): 10,
Export( Export(
"foo", "foo",
): 13, ): 11,
Export( Export(
"foobar", "foobar",
): 11, ): 10,
Exports: 14, Exports: 12,
} }
``` ```
...@@ -424,7 +409,7 @@ import { a as foobar } from "__TURBOPACK_PART__" assert { ...@@ -424,7 +409,7 @@ import { a as foobar } from "__TURBOPACK_PART__" assert {
__turbopack_part__: -3 __turbopack_part__: -3
}; };
import { b as internal } from "__TURBOPACK_PART__" assert { import { b as internal } from "__TURBOPACK_PART__" assert {
__turbopack_part__: -10 __turbopack_part__: -9
}; };
import "__TURBOPACK_PART__" assert { import "__TURBOPACK_PART__" assert {
__turbopack_part__: 7 __turbopack_part__: 7
...@@ -522,34 +507,22 @@ import { g as foobarCopy } from "__TURBOPACK_PART__" assert { ...@@ -522,34 +507,22 @@ import { g as foobarCopy } from "__TURBOPACK_PART__" assert {
__turbopack_part__: -6 __turbopack_part__: -6
}; };
import "__TURBOPACK_PART__" assert { import "__TURBOPACK_PART__" assert {
__turbopack_part__: 1 __turbopack_part__: 2
};
import "__TURBOPACK_PART__" assert {
__turbopack_part__: 10
}; };
import "__TURBOPACK_PART__" assert { import "__TURBOPACK_PART__" assert {
__turbopack_part__: 7 __turbopack_part__: 7
}; };
import "__TURBOPACK_PART__" assert { import "__TURBOPACK_PART__" assert {
__turbopack_part__: 2 __turbopack_part__: 9
}; };
console.log(foobarCopy); console.log(foobarCopy);
foobarCopy += "Unused";
import "other"; import "other";
export { };
``` ```
## Part 9 ## Part 9
```js ```js
import { g as foobarCopy } from "__TURBOPACK_PART__" assert {
__turbopack_part__: -6
};
import "__TURBOPACK_PART__" assert {
__turbopack_part__: 8
};
foobarCopy += "Unused";
```
## Part 10
```js
import { a as foobar } from "__TURBOPACK_PART__" assert { import { a as foobar } from "__TURBOPACK_PART__" assert {
__turbopack_part__: -3 __turbopack_part__: -3
}; };
...@@ -568,7 +541,7 @@ export { internal as b } from "__TURBOPACK_VAR__" assert { ...@@ -568,7 +541,7 @@ export { internal as b } from "__TURBOPACK_VAR__" assert {
}; };
``` ```
## Part 11 ## Part 10
```js ```js
import { a as foobar } from "__TURBOPACK_PART__" assert { import { a as foobar } from "__TURBOPACK_PART__" assert {
__turbopack_part__: -3 __turbopack_part__: -3
...@@ -583,15 +556,7 @@ export { external2 as h } from "__TURBOPACK_VAR__" assert { ...@@ -583,15 +556,7 @@ export { external2 as h } from "__TURBOPACK_VAR__" assert {
}; };
``` ```
## Part 12 ## Part 11
```js
import "__TURBOPACK_PART__" assert {
__turbopack_part__: 8
};
"module evaluation";
```
## Part 13
```js ```js
import { e as foo } from "__TURBOPACK_PART__" assert { import { e as foo } from "__TURBOPACK_PART__" assert {
__turbopack_part__: -4 __turbopack_part__: -4
...@@ -599,7 +564,7 @@ import { e as foo } from "__TURBOPACK_PART__" assert { ...@@ -599,7 +564,7 @@ import { e as foo } from "__TURBOPACK_PART__" assert {
export { foo }; export { foo };
``` ```
## Part 14 ## Part 12
```js ```js
export { external1 } from "__TURBOPACK_PART__" assert { export { external1 } from "__TURBOPACK_PART__" assert {
__turbopack_part__: "export external1" __turbopack_part__: "export external1"
...@@ -617,10 +582,22 @@ export { foo } from "__TURBOPACK_PART__" assert { ...@@ -617,10 +582,22 @@ export { foo } from "__TURBOPACK_PART__" assert {
``` ```
## Merged (module eval) ## Merged (module eval)
```js ```js
import { g as foobarCopy } from "__TURBOPACK_PART__" assert {
__turbopack_part__: -6
};
import "__TURBOPACK_PART__" assert { import "__TURBOPACK_PART__" assert {
__turbopack_part__: 8 __turbopack_part__: 2
};
import "__TURBOPACK_PART__" assert {
__turbopack_part__: 7
}; };
"module evaluation"; import "__TURBOPACK_PART__" assert {
__turbopack_part__: 9
};
import "other";
console.log(foobarCopy);
foobarCopy += "Unused";
export { };
``` ```
# Entrypoints # Entrypoints
...@@ -751,12 +728,15 @@ foobar += "foo"; ...@@ -751,12 +728,15 @@ foobar += "foo";
import { g as foobarCopy } from "__TURBOPACK_PART__" assert { import { g as foobarCopy } from "__TURBOPACK_PART__" assert {
__turbopack_part__: -6 __turbopack_part__: -6
}; };
import "__TURBOPACK_PART__" assert {
__turbopack_part__: 1
};
import "__TURBOPACK_PART__" assert { import "__TURBOPACK_PART__" assert {
__turbopack_part__: 7 __turbopack_part__: 7
}; };
console.log(foobarCopy); console.log(foobarCopy);
import "other"; import "other";
"module evaluation"; export { };
``` ```
## Part 9 ## Part 9
...@@ -813,11 +793,14 @@ export { foobar } from "__TURBOPACK_PART__" assert { ...@@ -813,11 +793,14 @@ export { foobar } from "__TURBOPACK_PART__" assert {
import { g as foobarCopy } from "__TURBOPACK_PART__" assert { import { g as foobarCopy } from "__TURBOPACK_PART__" assert {
__turbopack_part__: -6 __turbopack_part__: -6
}; };
import "__TURBOPACK_PART__" assert {
__turbopack_part__: 1
};
import "__TURBOPACK_PART__" assert { import "__TURBOPACK_PART__" assert {
__turbopack_part__: 7 __turbopack_part__: 7
}; };
import "other"; import "other";
console.log(foobarCopy); console.log(foobarCopy);
"module evaluation"; export { };
``` ```
# Items # Items
Count: 15 Count: 14
## Item 1: Stmt 0, `Normal` ## Item 1: Stmt 0, `Normal`
...@@ -154,13 +154,11 @@ graph TD ...@@ -154,13 +154,11 @@ graph TD
Item10; Item10;
Item11; Item11;
Item12; Item12;
Item12["ModuleEvaluation"]; Item12["export c1_1"];
Item13; Item13;
Item13["export c1_1"]; Item13["export c1_3"];
Item14; Item14;
Item14["export c1_3"]; Item14["export c2_2"];
Item15;
Item15["export c2_2"];
``` ```
# Phase 2 # Phase 2
```mermaid ```mermaid
...@@ -177,13 +175,11 @@ graph TD ...@@ -177,13 +175,11 @@ graph TD
Item10; Item10;
Item11; Item11;
Item12; Item12;
Item12["ModuleEvaluation"]; Item12["export c1_1"];
Item13; Item13;
Item13["export c1_1"]; Item13["export c1_3"];
Item14; Item14;
Item14["export c1_3"]; Item14["export c2_2"];
Item15;
Item15["export c2_2"];
Item10 --> Item6; Item10 --> Item6;
Item10 -.-> Item5; Item10 -.-> Item5;
Item10 -.-> Item1; Item10 -.-> Item1;
...@@ -203,9 +199,9 @@ graph TD ...@@ -203,9 +199,9 @@ graph TD
Item11 -.-> Item3; Item11 -.-> Item3;
Item11 -.-> Item9; Item11 -.-> Item9;
Item11 -.-> Item7; Item11 -.-> Item7;
Item13 --> Item4; Item12 --> Item4;
Item14 --> Item6; Item13 --> Item6;
Item15 --> Item8; Item14 --> Item8;
``` ```
# Phase 3 # Phase 3
```mermaid ```mermaid
...@@ -222,13 +218,11 @@ graph TD ...@@ -222,13 +218,11 @@ graph TD
Item10; Item10;
Item11; Item11;
Item12; Item12;
Item12["ModuleEvaluation"]; Item12["export c1_1"];
Item13; Item13;
Item13["export c1_1"]; Item13["export c1_3"];
Item14; Item14;
Item14["export c1_3"]; Item14["export c2_2"];
Item15;
Item15["export c2_2"];
Item10 --> Item6; Item10 --> Item6;
Item10 -.-> Item5; Item10 -.-> Item5;
Item10 -.-> Item1; Item10 -.-> Item1;
...@@ -248,9 +242,9 @@ graph TD ...@@ -248,9 +242,9 @@ graph TD
Item11 -.-> Item3; Item11 -.-> Item3;
Item11 -.-> Item9; Item11 -.-> Item9;
Item11 -.-> Item7; Item11 -.-> Item7;
Item13 --> Item4; Item12 --> Item4;
Item14 --> Item6; Item13 --> Item6;
Item15 --> Item8; Item14 --> Item8;
Item4 --> Item5; Item4 --> Item5;
Item5 --> Item6; Item5 --> Item6;
Item5 --> Item1; Item5 --> Item1;
...@@ -276,13 +270,11 @@ graph TD ...@@ -276,13 +270,11 @@ graph TD
Item10; Item10;
Item11; Item11;
Item12; Item12;
Item12["ModuleEvaluation"]; Item12["export c1_1"];
Item13; Item13;
Item13["export c1_1"]; Item13["export c1_3"];
Item14; Item14;
Item14["export c1_3"]; Item14["export c2_2"];
Item15;
Item15["export c2_2"];
Item10 --> Item6; Item10 --> Item6;
Item10 -.-> Item5; Item10 -.-> Item5;
Item10 -.-> Item1; Item10 -.-> Item1;
...@@ -302,9 +294,9 @@ graph TD ...@@ -302,9 +294,9 @@ graph TD
Item11 -.-> Item3; Item11 -.-> Item3;
Item11 -.-> Item9; Item11 -.-> Item9;
Item11 -.-> Item7; Item11 -.-> Item7;
Item13 --> Item4; Item12 --> Item4;
Item14 --> Item6; Item13 --> Item6;
Item15 --> Item8; Item14 --> Item8;
Item4 --> Item5; Item4 --> Item5;
Item5 --> Item6; Item5 --> Item6;
Item5 --> Item1; Item5 --> Item1;
...@@ -314,7 +306,6 @@ graph TD ...@@ -314,7 +306,6 @@ graph TD
Item7 --> Item3; Item7 --> Item3;
Item8 --> Item9; Item8 --> Item9;
Item9 --> Item7; Item9 --> Item7;
Item12 --> Item11;
``` ```
# Final # Final
```mermaid ```mermaid
...@@ -324,7 +315,7 @@ graph TD ...@@ -324,7 +315,7 @@ graph TD
N2["Items: [ItemId(2, Normal)]"]; N2["Items: [ItemId(2, Normal)]"];
N3["Items: [ItemId(3, Normal), ItemId(4, Normal), ItemId(5, Normal)]"]; N3["Items: [ItemId(3, Normal), ItemId(4, Normal), ItemId(5, Normal)]"];
N4["Items: [ItemId(6, Normal), ItemId(7, Normal), ItemId(8, Normal)]"]; N4["Items: [ItemId(6, Normal), ItemId(7, Normal), ItemId(8, Normal)]"];
N5["Items: [ItemId(9, Normal), ItemId(10, Normal), ItemId(ModuleEvaluation)]"]; N5["Items: [ItemId(9, Normal), ItemId(10, Normal)]"];
N6["Items: [ItemId(Export((&quot;c1_1&quot;, #2), &quot;c1_1&quot;))]"]; N6["Items: [ItemId(Export((&quot;c1_1&quot;, #2), &quot;c1_1&quot;))]"];
N7["Items: [ItemId(Export((&quot;c1_3&quot;, #2), &quot;c1_3&quot;))]"]; N7["Items: [ItemId(Export((&quot;c1_3&quot;, #2), &quot;c1_3&quot;))]"];
N8["Items: [ItemId(Export((&quot;c2_2&quot;, #2), &quot;c2_2&quot;))]"]; N8["Items: [ItemId(Export((&quot;c2_2&quot;, #2), &quot;c2_2&quot;))]"];
...@@ -333,12 +324,12 @@ graph TD ...@@ -333,12 +324,12 @@ graph TD
N3 --> N0; N3 --> N0;
N3 --> N1; N3 --> N1;
N4 --> N2; N4 --> N2;
N5 -.-> N2;
N5 -.-> N1;
N5 -.-> N0;
N5 -.-> N3;
N6 --> N3;
N5 -.-> N4; N5 -.-> N4;
N6 --> N3;
N5 -.-> N3;
N5 -.-> N0;
N5 -.-> N1;
N5 -.-> N2;
``` ```
# Entrypoints # Entrypoints
...@@ -446,17 +437,17 @@ import { h as c2_2 } from "__TURBOPACK_PART__" assert { ...@@ -446,17 +437,17 @@ import { h as c2_2 } from "__TURBOPACK_PART__" assert {
__turbopack_part__: -4 __turbopack_part__: -4
}; };
import "__TURBOPACK_PART__" assert { import "__TURBOPACK_PART__" assert {
__turbopack_part__: 2 __turbopack_part__: 0
}; };
import "__TURBOPACK_PART__" assert { import "__TURBOPACK_PART__" assert {
__turbopack_part__: 1 __turbopack_part__: 1
}; };
import "__TURBOPACK_PART__" assert { import "__TURBOPACK_PART__" assert {
__turbopack_part__: 0 __turbopack_part__: 2
}; };
c1_3(); c1_3();
c2_2(); c2_2();
"module evaluation"; export { };
``` ```
## Part 6 ## Part 6
...@@ -505,17 +496,17 @@ import { h as c2_2 } from "__TURBOPACK_PART__" assert { ...@@ -505,17 +496,17 @@ import { h as c2_2 } from "__TURBOPACK_PART__" assert {
__turbopack_part__: -4 __turbopack_part__: -4
}; };
import "__TURBOPACK_PART__" assert { import "__TURBOPACK_PART__" assert {
__turbopack_part__: 2 __turbopack_part__: 0
}; };
import "__TURBOPACK_PART__" assert { import "__TURBOPACK_PART__" assert {
__turbopack_part__: 1 __turbopack_part__: 1
}; };
import "__TURBOPACK_PART__" assert { import "__TURBOPACK_PART__" assert {
__turbopack_part__: 0 __turbopack_part__: 2
}; };
c1_3(); c1_3();
c2_2(); c2_2();
"module evaluation"; export { };
``` ```
# Entrypoints # Entrypoints
...@@ -604,7 +595,7 @@ import { h as c2_2 } from "__TURBOPACK_PART__" assert { ...@@ -604,7 +595,7 @@ import { h as c2_2 } from "__TURBOPACK_PART__" assert {
}; };
c1_3(); c1_3();
c2_2(); c2_2();
"module evaluation"; export { };
``` ```
## Part 3 ## Part 3
...@@ -654,7 +645,7 @@ import { h as c2_2 } from "__TURBOPACK_PART__" assert { ...@@ -654,7 +645,7 @@ import { h as c2_2 } from "__TURBOPACK_PART__" assert {
}; };
c1_3(); c1_3();
c2_2(); c2_2();
"module evaluation"; export { };
``` ```
# Entrypoints # Entrypoints
......
# Items # Items
Count: 14 Count: 13
## Item 1: Stmt 0, `ImportOfModule` ## Item 1: Stmt 0, `ImportOfModule`
...@@ -171,9 +171,7 @@ graph TD ...@@ -171,9 +171,7 @@ graph TD
Item11; Item11;
Item12; Item12;
Item13; Item13;
Item13["ModuleEvaluation"]; Item13["export default"];
Item14;
Item14["export default"];
Item2 --> Item1; Item2 --> Item1;
``` ```
# Phase 2 # Phase 2
...@@ -192,9 +190,7 @@ graph TD ...@@ -192,9 +190,7 @@ graph TD
Item11; Item11;
Item12; Item12;
Item13; Item13;
Item13["ModuleEvaluation"]; Item13["export default"];
Item14;
Item14["export default"];
Item2 --> Item1; Item2 --> Item1;
Item11 --> Item6; Item11 --> Item6;
Item11 --> Item4; Item11 --> Item4;
...@@ -206,7 +202,7 @@ graph TD ...@@ -206,7 +202,7 @@ graph TD
Item11 --> Item10; Item11 --> Item10;
Item12 --> Item11; Item12 --> Item11;
Item12 --> Item2; Item12 --> Item2;
Item14 --> Item12; Item13 --> Item12;
``` ```
# Phase 3 # Phase 3
```mermaid ```mermaid
...@@ -224,9 +220,7 @@ graph TD ...@@ -224,9 +220,7 @@ graph TD
Item11; Item11;
Item12; Item12;
Item13; Item13;
Item13["ModuleEvaluation"]; Item13["export default"];
Item14;
Item14["export default"];
Item2 --> Item1; Item2 --> Item1;
Item11 --> Item6; Item11 --> Item6;
Item11 --> Item4; Item11 --> Item4;
...@@ -238,7 +232,7 @@ graph TD ...@@ -238,7 +232,7 @@ graph TD
Item11 --> Item10; Item11 --> Item10;
Item12 --> Item11; Item12 --> Item11;
Item12 --> Item2; Item12 --> Item2;
Item14 --> Item12; Item13 --> Item12;
``` ```
# Phase 4 # Phase 4
```mermaid ```mermaid
...@@ -256,9 +250,7 @@ graph TD ...@@ -256,9 +250,7 @@ graph TD
Item11; Item11;
Item12; Item12;
Item13; Item13;
Item13["ModuleEvaluation"]; Item13["export default"];
Item14;
Item14["export default"];
Item2 --> Item1; Item2 --> Item1;
Item11 --> Item6; Item11 --> Item6;
Item11 --> Item4; Item11 --> Item4;
...@@ -270,7 +262,6 @@ graph TD ...@@ -270,7 +262,6 @@ graph TD
Item11 --> Item10; Item11 --> Item10;
Item12 --> Item11; Item12 --> Item11;
Item12 --> Item2; Item12 --> Item2;
Item14 --> Item12;
Item13 --> Item12; Item13 --> Item12;
``` ```
# Final # Final
...@@ -286,22 +277,9 @@ graph TD ...@@ -286,22 +277,9 @@ graph TD
N7["Items: [ItemId(1, ImportBinding(2))]"]; N7["Items: [ItemId(1, ImportBinding(2))]"];
N8["Items: [ItemId(1, ImportBinding(3))]"]; N8["Items: [ItemId(1, ImportBinding(3))]"];
N9["Items: [ItemId(1, ImportBinding(4))]"]; N9["Items: [ItemId(1, ImportBinding(4))]"];
N10["Items: [ItemId(2, Normal), ItemId(3, Normal)]"]; N10["Items: [ItemId(2, Normal), ItemId(3, Normal), ItemId(Export((&quot;__TURBOPACK__default__export__&quot;, #5), &quot;default&quot;))]"];
N11["Items: [ItemId(ModuleEvaluation)]"];
N12["Items: [ItemId(Export((&quot;__TURBOPACK__default__export__&quot;, #5), &quot;default&quot;))]"];
N4 --> N0; N4 --> N0;
N10 --> N9;
N10 --> N8;
N10 --> N7;
N10 --> N6;
N10 --> N1;
N10 --> N3;
N10 --> N2;
N10 --> N5;
N9 --> N4; N9 --> N4;
N10 --> N4;
N12 --> N10;
N11 --> N10;
N1 --> N0; N1 --> N0;
N2 --> N0; N2 --> N0;
N3 --> N0; N3 --> N0;
...@@ -309,16 +287,17 @@ graph TD ...@@ -309,16 +287,17 @@ graph TD
N6 --> N4; N6 --> N4;
N7 --> N4; N7 --> N4;
N8 --> N4; N8 --> N4;
N10 --> N4;
``` ```
# Entrypoints # Entrypoints
``` ```
{ {
ModuleEvaluation: 11, ModuleEvaluation: 10,
Export( Export(
"default", "default",
): 12, ): 10,
Exports: 13, Exports: 11,
} }
``` ```
...@@ -494,32 +473,18 @@ class MyDocument extends Document { ...@@ -494,32 +473,18 @@ class MyDocument extends Document {
} }
} }
const __TURBOPACK__default__export__ = MyDocument; const __TURBOPACK__default__export__ = MyDocument;
export { __TURBOPACK__default__export__ as default };
export { MyDocument as i } from "__TURBOPACK_VAR__" assert { export { MyDocument as i } from "__TURBOPACK_VAR__" assert {
__turbopack_var__: true __turbopack_var__: true
}; };
export { __TURBOPACK__default__export__ as j } from "__TURBOPACK_VAR__" assert { export { __TURBOPACK__default__export__ as j } from "__TURBOPACK_VAR__" assert {
__turbopack_var__: true __turbopack_var__: true
}; };
export { };
``` ```
## Part 11 ## Part 11
```js ```js
import "__TURBOPACK_PART__" assert {
__turbopack_part__: 10
};
"module evaluation";
```
## Part 12
```js
import { j as __TURBOPACK__default__export__ } from "__TURBOPACK_PART__" assert {
__turbopack_part__: -10
};
export { __TURBOPACK__default__export__ as default };
```
## Part 13
```js
export { default } from "__TURBOPACK_PART__" assert { export { default } from "__TURBOPACK_PART__" assert {
__turbopack_part__: "export default" __turbopack_part__: "export default"
}; };
...@@ -528,20 +493,70 @@ export { default } from "__TURBOPACK_PART__" assert { ...@@ -528,20 +493,70 @@ export { default } from "__TURBOPACK_PART__" assert {
## Merged (module eval) ## Merged (module eval)
```js ```js
import "__TURBOPACK_PART__" assert { import "__TURBOPACK_PART__" assert {
__turbopack_part__: 10 __turbopack_part__: 4
};
import Document from 'next/document';
import "__TURBOPACK_PART__" assert {
__turbopack_part__: 0
};
import { jsxs as _jsxs } from "react/jsx-runtime";
import { Fragment as _Fragment } from "react/jsx-runtime";
import { jsx as _jsx } from "react/jsx-runtime";
import { Html } from 'next/document';
import { Head } from 'next/document';
import { Main } from 'next/document';
import { NextScript } from 'next/document';
class MyDocument extends Document {
static async getInitialProps(ctx) {
const initialProps = await Document.getInitialProps(ctx);
return {
...initialProps,
styles: _jsxs(_Fragment, {
children: [
initialProps.styles,
_jsx("style", {
dangerouslySetInnerHTML: {
__html: `html { background: hotpink; }`
}
})
]
})
};
}
render() {
return _jsxs(Html, {
children: [
_jsx(Head, {}),
_jsxs("body", {
children: [
_jsx(Main, {}),
_jsx(NextScript, {})
]
})
]
});
}
}
const __TURBOPACK__default__export__ = MyDocument;
export { __TURBOPACK__default__export__ as default };
export { MyDocument as i } from "__TURBOPACK_VAR__" assert {
__turbopack_var__: true
};
export { __TURBOPACK__default__export__ as j } from "__TURBOPACK_VAR__" assert {
__turbopack_var__: true
}; };
"module evaluation"; export { };
``` ```
# Entrypoints # Entrypoints
``` ```
{ {
ModuleEvaluation: 11, ModuleEvaluation: 10,
Export( Export(
"default", "default",
): 12, ): 10,
Exports: 13, Exports: 11,
} }
``` ```
...@@ -717,32 +732,18 @@ class MyDocument extends Document { ...@@ -717,32 +732,18 @@ class MyDocument extends Document {
} }
} }
const __TURBOPACK__default__export__ = MyDocument; const __TURBOPACK__default__export__ = MyDocument;
export { __TURBOPACK__default__export__ as default };
export { MyDocument as i } from "__TURBOPACK_VAR__" assert { export { MyDocument as i } from "__TURBOPACK_VAR__" assert {
__turbopack_var__: true __turbopack_var__: true
}; };
export { __TURBOPACK__default__export__ as j } from "__TURBOPACK_VAR__" assert { export { __TURBOPACK__default__export__ as j } from "__TURBOPACK_VAR__" assert {
__turbopack_var__: true __turbopack_var__: true
}; };
export { };
``` ```
## Part 11 ## Part 11
```js ```js
import "__TURBOPACK_PART__" assert {
__turbopack_part__: 10
};
"module evaluation";
```
## Part 12
```js
import { j as __TURBOPACK__default__export__ } from "__TURBOPACK_PART__" assert {
__turbopack_part__: -10
};
export { __TURBOPACK__default__export__ as default };
```
## Part 13
```js
export { default } from "__TURBOPACK_PART__" assert { export { default } from "__TURBOPACK_PART__" assert {
__turbopack_part__: "export default" __turbopack_part__: "export default"
}; };
...@@ -751,8 +752,58 @@ export { default } from "__TURBOPACK_PART__" assert { ...@@ -751,8 +752,58 @@ export { default } from "__TURBOPACK_PART__" assert {
## Merged (module eval) ## Merged (module eval)
```js ```js
import "__TURBOPACK_PART__" assert { import "__TURBOPACK_PART__" assert {
__turbopack_part__: 10 __turbopack_part__: 4
};
import Document from 'next/document';
import "__TURBOPACK_PART__" assert {
__turbopack_part__: 0
};
import { jsxs as _jsxs } from "react/jsx-runtime";
import { Fragment as _Fragment } from "react/jsx-runtime";
import { jsx as _jsx } from "react/jsx-runtime";
import { Html } from 'next/document';
import { Head } from 'next/document';
import { Main } from 'next/document';
import { NextScript } from 'next/document';
class MyDocument extends Document {
static async getInitialProps(ctx) {
const initialProps = await Document.getInitialProps(ctx);
return {
...initialProps,
styles: _jsxs(_Fragment, {
children: [
initialProps.styles,
_jsx("style", {
dangerouslySetInnerHTML: {
__html: `html { background: hotpink; }`
}
})
]
})
};
}
render() {
return _jsxs(Html, {
children: [
_jsx(Head, {}),
_jsxs("body", {
children: [
_jsx(Main, {}),
_jsx(NextScript, {})
]
})
]
});
}
}
const __TURBOPACK__default__export__ = MyDocument;
export { __TURBOPACK__default__export__ as default };
export { MyDocument as i } from "__TURBOPACK_VAR__" assert {
__turbopack_var__: true
};
export { __TURBOPACK__default__export__ as j } from "__TURBOPACK_VAR__" assert {
__turbopack_var__: true
}; };
"module evaluation"; export { };
``` ```
# Items # Items
Count: 4 Count: 3
## Item 1: Stmt 0, `Normal` ## Item 1: Stmt 0, `Normal`
...@@ -38,8 +38,6 @@ graph TD ...@@ -38,8 +38,6 @@ graph TD
Item1; Item1;
Item2; Item2;
Item3; Item3;
Item4;
Item4["ModuleEvaluation"];
``` ```
# Phase 2 # Phase 2
```mermaid ```mermaid
...@@ -47,8 +45,6 @@ graph TD ...@@ -47,8 +45,6 @@ graph TD
Item1; Item1;
Item2; Item2;
Item3; Item3;
Item4;
Item4["ModuleEvaluation"];
Item1 --> Item2; Item1 --> Item2;
Item3 --> Item1; Item3 --> Item1;
Item3 --> Item2; Item3 --> Item2;
...@@ -59,8 +55,6 @@ graph TD ...@@ -59,8 +55,6 @@ graph TD
Item1; Item1;
Item2; Item2;
Item3; Item3;
Item4;
Item4["ModuleEvaluation"];
Item1 --> Item2; Item1 --> Item2;
Item3 --> Item1; Item3 --> Item1;
Item3 --> Item2; Item3 --> Item2;
...@@ -71,17 +65,14 @@ graph TD ...@@ -71,17 +65,14 @@ graph TD
Item1; Item1;
Item2; Item2;
Item3; Item3;
Item4;
Item4["ModuleEvaluation"];
Item1 --> Item2; Item1 --> Item2;
Item3 --> Item1; Item3 --> Item1;
Item3 --> Item2; Item3 --> Item2;
Item4 --> Item3;
``` ```
# Final # Final
```mermaid ```mermaid
graph TD graph TD
N0["Items: [ItemId(0, Normal), ItemId(1, Normal), ItemId(2, Normal), ItemId(ModuleEvaluation)]"]; N0["Items: [ItemId(0, Normal), ItemId(1, Normal), ItemId(2, Normal)]"];
``` ```
# Entrypoints # Entrypoints
...@@ -99,10 +90,10 @@ graph TD ...@@ -99,10 +90,10 @@ graph TD
a = ()=>{}; a = ()=>{};
function a() {} function a() {}
console.log(a); console.log(a);
"module evaluation";
export { a as a } from "__TURBOPACK_VAR__" assert { export { a as a } from "__TURBOPACK_VAR__" assert {
__turbopack_var__: true __turbopack_var__: true
}; };
export { };
``` ```
## Part 1 ## Part 1
...@@ -114,10 +105,10 @@ export { a as a } from "__TURBOPACK_VAR__" assert { ...@@ -114,10 +105,10 @@ export { a as a } from "__TURBOPACK_VAR__" assert {
a = ()=>{}; a = ()=>{};
function a() {} function a() {}
console.log(a); console.log(a);
"module evaluation";
export { a as a } from "__TURBOPACK_VAR__" assert { export { a as a } from "__TURBOPACK_VAR__" assert {
__turbopack_var__: true __turbopack_var__: true
}; };
export { };
``` ```
# Entrypoints # Entrypoints
...@@ -136,10 +127,10 @@ export { a as a } from "__TURBOPACK_VAR__" assert { ...@@ -136,10 +127,10 @@ export { a as a } from "__TURBOPACK_VAR__" assert {
a = ()=>{}; a = ()=>{};
function a() {} function a() {}
console.log(a); console.log(a);
"module evaluation";
export { a as a } from "__TURBOPACK_VAR__" assert { export { a as a } from "__TURBOPACK_VAR__" assert {
__turbopack_var__: true __turbopack_var__: true
}; };
export { };
``` ```
## Part 1 ## Part 1
...@@ -151,9 +142,9 @@ export { a as a } from "__TURBOPACK_VAR__" assert { ...@@ -151,9 +142,9 @@ export { a as a } from "__TURBOPACK_VAR__" assert {
a = ()=>{}; a = ()=>{};
function a() {} function a() {}
console.log(a); console.log(a);
"module evaluation";
export { a as a } from "__TURBOPACK_VAR__" assert { export { a as a } from "__TURBOPACK_VAR__" assert {
__turbopack_var__: true __turbopack_var__: true
}; };
export { };
``` ```
# Items # Items
Count: 4 Count: 3
## Item 1: Stmt 0, `Normal` ## Item 1: Stmt 0, `Normal`
...@@ -37,8 +37,6 @@ graph TD ...@@ -37,8 +37,6 @@ graph TD
Item1; Item1;
Item2; Item2;
Item3; Item3;
Item4;
Item4["ModuleEvaluation"];
``` ```
# Phase 2 # Phase 2
```mermaid ```mermaid
...@@ -46,8 +44,6 @@ graph TD ...@@ -46,8 +44,6 @@ graph TD
Item1; Item1;
Item2; Item2;
Item3; Item3;
Item4;
Item4["ModuleEvaluation"];
Item1 --> Item2; Item1 --> Item2;
Item3 --> Item2; Item3 --> Item2;
``` ```
...@@ -57,8 +53,6 @@ graph TD ...@@ -57,8 +53,6 @@ graph TD
Item1; Item1;
Item2; Item2;
Item3; Item3;
Item4;
Item4["ModuleEvaluation"];
Item1 --> Item2; Item1 --> Item2;
Item3 --> Item2; Item3 --> Item2;
``` ```
...@@ -68,18 +62,15 @@ graph TD ...@@ -68,18 +62,15 @@ graph TD
Item1; Item1;
Item2; Item2;
Item3; Item3;
Item4;
Item4["ModuleEvaluation"];
Item1 --> Item2; Item1 --> Item2;
Item3 --> Item2; Item3 --> Item2;
Item4 --> Item3;
``` ```
# Final # Final
```mermaid ```mermaid
graph TD graph TD
N0["Items: [ItemId(0, Normal)]"]; N0["Items: [ItemId(0, Normal)]"];
N1["Items: [ItemId(1, VarDeclarator(0))]"]; N1["Items: [ItemId(1, VarDeclarator(0))]"];
N2["Items: [ItemId(2, Normal), ItemId(ModuleEvaluation)]"]; N2["Items: [ItemId(2, Normal)]"];
N0 --> N1; N0 --> N1;
N2 --> N1; N2 --> N1;
``` ```
...@@ -116,7 +107,7 @@ import { a as a } from "__TURBOPACK_PART__" assert { ...@@ -116,7 +107,7 @@ import { a as a } from "__TURBOPACK_PART__" assert {
__turbopack_part__: -1 __turbopack_part__: -1
}; };
console.log(a); console.log(a);
"module evaluation"; export { };
``` ```
## Part 3 ## Part 3
...@@ -129,7 +120,7 @@ import { a as a } from "__TURBOPACK_PART__" assert { ...@@ -129,7 +120,7 @@ import { a as a } from "__TURBOPACK_PART__" assert {
__turbopack_part__: -1 __turbopack_part__: -1
}; };
console.log(a); console.log(a);
"module evaluation"; export { };
``` ```
# Entrypoints # Entrypoints
...@@ -165,7 +156,7 @@ import { a as a } from "__TURBOPACK_PART__" assert { ...@@ -165,7 +156,7 @@ import { a as a } from "__TURBOPACK_PART__" assert {
__turbopack_part__: -1 __turbopack_part__: -1
}; };
console.log(a); console.log(a);
"module evaluation"; export { };
``` ```
## Part 3 ## Part 3
...@@ -178,6 +169,6 @@ import { a as a } from "__TURBOPACK_PART__" assert { ...@@ -178,6 +169,6 @@ import { a as a } from "__TURBOPACK_PART__" assert {
__turbopack_part__: -1 __turbopack_part__: -1
}; };
console.log(a); console.log(a);
"module evaluation"; export { };
``` ```
# Items # Items
Count: 5 Count: 4
## Item 1: Stmt 0, `VarDeclarator(0)` ## Item 1: Stmt 0, `VarDeclarator(0)`
...@@ -28,11 +28,9 @@ graph TD ...@@ -28,11 +28,9 @@ graph TD
Item1; Item1;
Item2; Item2;
Item3; Item3;
Item3["ModuleEvaluation"]; Item3["export a"];
Item4; Item4;
Item4["export a"]; Item4["export b"];
Item5;
Item5["export b"];
``` ```
# Phase 2 # Phase 2
```mermaid ```mermaid
...@@ -40,13 +38,11 @@ graph TD ...@@ -40,13 +38,11 @@ graph TD
Item1; Item1;
Item2; Item2;
Item3; Item3;
Item3["ModuleEvaluation"]; Item3["export a"];
Item4; Item4;
Item4["export a"]; Item4["export b"];
Item5; Item3 --> Item1;
Item5["export b"]; Item4 --> Item2;
Item4 --> Item1;
Item5 --> Item2;
``` ```
# Phase 3 # Phase 3
```mermaid ```mermaid
...@@ -54,13 +50,11 @@ graph TD ...@@ -54,13 +50,11 @@ graph TD
Item1; Item1;
Item2; Item2;
Item3; Item3;
Item3["ModuleEvaluation"]; Item3["export a"];
Item4; Item4;
Item4["export a"]; Item4["export b"];
Item5; Item3 --> Item1;
Item5["export b"]; Item4 --> Item2;
Item4 --> Item1;
Item5 --> Item2;
``` ```
# Phase 4 # Phase 4
```mermaid ```mermaid
...@@ -68,33 +62,30 @@ graph TD ...@@ -68,33 +62,30 @@ graph TD
Item1; Item1;
Item2; Item2;
Item3; Item3;
Item3["ModuleEvaluation"]; Item3["export a"];
Item4; Item4;
Item4["export a"]; Item4["export b"];
Item5; Item3 --> Item1;
Item5["export b"]; Item4 --> Item2;
Item4 --> Item1;
Item5 --> Item2;
``` ```
# Final # Final
```mermaid ```mermaid
graph TD graph TD
N0["Items: [ItemId(0, VarDeclarator(0)), ItemId(Export((&quot;a&quot;, #2), &quot;a&quot;))]"]; N0["Items: [ItemId(0, VarDeclarator(0)), ItemId(Export((&quot;a&quot;, #2), &quot;a&quot;))]"];
N1["Items: [ItemId(1, VarDeclarator(0)), ItemId(Export((&quot;b&quot;, #2), &quot;b&quot;))]"]; N1["Items: [ItemId(1, VarDeclarator(0)), ItemId(Export((&quot;b&quot;, #2), &quot;b&quot;))]"];
N2["Items: [ItemId(ModuleEvaluation)]"];
``` ```
# Entrypoints # Entrypoints
``` ```
{ {
ModuleEvaluation: 2, ModuleEvaluation: 3,
Export( Export(
"a", "a",
): 0, ): 0,
Export( Export(
"b", "b",
): 1, ): 1,
Exports: 3, Exports: 2,
} }
``` ```
...@@ -120,11 +111,6 @@ export { b as b } from "__TURBOPACK_VAR__" assert { ...@@ -120,11 +111,6 @@ export { b as b } from "__TURBOPACK_VAR__" assert {
``` ```
## Part 2 ## Part 2
```js ```js
"module evaluation";
```
## Part 3
```js
export { a } from "__TURBOPACK_PART__" assert { export { a } from "__TURBOPACK_PART__" assert {
__turbopack_part__: "export a" __turbopack_part__: "export a"
}; };
...@@ -132,24 +118,29 @@ export { b } from "__TURBOPACK_PART__" assert { ...@@ -132,24 +118,29 @@ export { b } from "__TURBOPACK_PART__" assert {
__turbopack_part__: "export b" __turbopack_part__: "export b"
}; };
```
## Part 3
```js
export { };
``` ```
## Merged (module eval) ## Merged (module eval)
```js ```js
"module evaluation"; export { };
``` ```
# Entrypoints # Entrypoints
``` ```
{ {
ModuleEvaluation: 2, ModuleEvaluation: 3,
Export( Export(
"a", "a",
): 0, ): 0,
Export( Export(
"b", "b",
): 1, ): 1,
Exports: 3, Exports: 2,
} }
``` ```
...@@ -175,11 +166,6 @@ export { b as b } from "__TURBOPACK_VAR__" assert { ...@@ -175,11 +166,6 @@ export { b as b } from "__TURBOPACK_VAR__" assert {
``` ```
## Part 2 ## Part 2
```js ```js
"module evaluation";
```
## Part 3
```js
export { a } from "__TURBOPACK_PART__" assert { export { a } from "__TURBOPACK_PART__" assert {
__turbopack_part__: "export a" __turbopack_part__: "export a"
}; };
...@@ -187,9 +173,14 @@ export { b } from "__TURBOPACK_PART__" assert { ...@@ -187,9 +173,14 @@ export { b } from "__TURBOPACK_PART__" assert {
__turbopack_part__: "export b" __turbopack_part__: "export b"
}; };
```
## Part 3
```js
export { };
``` ```
## Merged (module eval) ## Merged (module eval)
```js ```js
"module evaluation"; export { };
``` ```
# Items # Items
Count: 4 Count: 3
## Item 1: Stmt 0, `ImportOfModule` ## Item 1: Stmt 0, `ImportOfModule`
...@@ -40,8 +40,6 @@ graph TD ...@@ -40,8 +40,6 @@ graph TD
Item1; Item1;
Item2; Item2;
Item3; Item3;
Item4;
Item4["ModuleEvaluation"];
``` ```
# Phase 2 # Phase 2
```mermaid ```mermaid
...@@ -49,8 +47,6 @@ graph TD ...@@ -49,8 +47,6 @@ graph TD
Item1; Item1;
Item2; Item2;
Item3; Item3;
Item4;
Item4["ModuleEvaluation"];
Item3 --> Item2; Item3 --> Item2;
Item3 --> Item1; Item3 --> Item1;
``` ```
...@@ -60,8 +56,6 @@ graph TD ...@@ -60,8 +56,6 @@ graph TD
Item1; Item1;
Item2; Item2;
Item3; Item3;
Item4;
Item4["ModuleEvaluation"];
Item3 --> Item2; Item3 --> Item2;
Item3 --> Item1; Item3 --> Item1;
``` ```
...@@ -71,20 +65,17 @@ graph TD ...@@ -71,20 +65,17 @@ graph TD
Item1; Item1;
Item2; Item2;
Item3; Item3;
Item4;
Item4["ModuleEvaluation"];
Item3 --> Item2; Item3 --> Item2;
Item3 --> Item1; Item3 --> Item1;
Item4 --> Item3;
``` ```
# Final # Final
```mermaid ```mermaid
graph TD graph TD
N0["Items: [ItemId(0, ImportOfModule)]"]; N0["Items: [ItemId(0, ImportOfModule)]"];
N1["Items: [ItemId(0, ImportBinding(0))]"]; N1["Items: [ItemId(0, ImportBinding(0))]"];
N2["Items: [ItemId(1, Normal), ItemId(ModuleEvaluation)]"]; N2["Items: [ItemId(1, Normal)]"];
N2 --> N0;
N2 --> N1; N2 --> N1;
N2 --> N0;
N1 --> N0; N1 --> N0;
``` ```
# Entrypoints # Entrypoints
...@@ -126,7 +117,7 @@ import "__TURBOPACK_PART__" assert { ...@@ -126,7 +117,7 @@ import "__TURBOPACK_PART__" assert {
if (1 + 1 == 3) { if (1 + 1 == 3) {
baz(); baz();
} }
"module evaluation"; export { };
``` ```
## Part 3 ## Part 3
...@@ -142,7 +133,7 @@ import { baz } from './module'; ...@@ -142,7 +133,7 @@ import { baz } from './module';
if (1 + 1 == 3) { if (1 + 1 == 3) {
baz(); baz();
} }
"module evaluation"; export { };
``` ```
# Entrypoints # Entrypoints
...@@ -184,7 +175,7 @@ import "__TURBOPACK_PART__" assert { ...@@ -184,7 +175,7 @@ import "__TURBOPACK_PART__" assert {
if (1 + 1 == 3) { if (1 + 1 == 3) {
baz(); baz();
} }
"module evaluation"; export { };
``` ```
## Part 3 ## Part 3
...@@ -200,6 +191,6 @@ import { baz } from './module'; ...@@ -200,6 +191,6 @@ import { baz } from './module';
if (1 + 1 == 3) { if (1 + 1 == 3) {
baz(); baz();
} }
"module evaluation"; export { };
``` ```
# Items # Items
Count: 15 Count: 14
## Item 1: Stmt 0, `VarDeclarator(0)` ## Item 1: Stmt 0, `VarDeclarator(0)`
...@@ -159,8 +159,6 @@ graph TD ...@@ -159,8 +159,6 @@ graph TD
Item12; Item12;
Item13; Item13;
Item14; Item14;
Item15;
Item15["ModuleEvaluation"];
``` ```
# Phase 2 # Phase 2
```mermaid ```mermaid
...@@ -179,8 +177,6 @@ graph TD ...@@ -179,8 +177,6 @@ graph TD
Item12; Item12;
Item13; Item13;
Item14; Item14;
Item15;
Item15["ModuleEvaluation"];
Item2 --> Item1; Item2 --> Item1;
Item3 --> Item1; Item3 --> Item1;
Item3 --> Item2; Item3 --> Item2;
...@@ -230,8 +226,6 @@ graph TD ...@@ -230,8 +226,6 @@ graph TD
Item12; Item12;
Item13; Item13;
Item14; Item14;
Item15;
Item15["ModuleEvaluation"];
Item2 --> Item1; Item2 --> Item1;
Item3 --> Item1; Item3 --> Item1;
Item3 --> Item2; Item3 --> Item2;
...@@ -281,8 +275,6 @@ graph TD ...@@ -281,8 +275,6 @@ graph TD
Item12; Item12;
Item13; Item13;
Item14; Item14;
Item15;
Item15["ModuleEvaluation"];
Item2 --> Item1; Item2 --> Item1;
Item3 --> Item1; Item3 --> Item1;
Item3 --> Item2; Item3 --> Item2;
...@@ -314,7 +306,6 @@ graph TD ...@@ -314,7 +306,6 @@ graph TD
Item13 -.-> Item11; Item13 -.-> Item11;
Item14 -.-> Item13; Item14 -.-> Item13;
Item14 --> Item1; Item14 --> Item1;
Item15 --> Item11;
``` ```
# Final # Final
```mermaid ```mermaid
...@@ -322,28 +313,22 @@ graph TD ...@@ -322,28 +313,22 @@ graph TD
N0["Items: [ItemId(0, VarDeclarator(0))]"]; N0["Items: [ItemId(0, VarDeclarator(0))]"];
N1["Items: [ItemId(1, Normal), ItemId(2, Normal)]"]; N1["Items: [ItemId(1, Normal), ItemId(2, Normal)]"];
N2["Items: [ItemId(3, Normal)]"]; N2["Items: [ItemId(3, Normal)]"];
N3["Items: [ItemId(4, Normal), ItemId(5, VarDeclarator(0)), ItemId(6, VarDeclarator(0)), ItemId(7, Normal), ItemId(8, Normal), ItemId(9, Normal)]"]; N3["Items: [ItemId(4, Normal)]"];
N4["Items: [ItemId(10, Normal)]"]; N4["Items: [ItemId(7, Normal), ItemId(8, Normal), ItemId(9, Normal), ItemId(10, Normal), ItemId(11, VarDeclarator(0)), ItemId(12, Normal), ItemId(13, Normal)]"];
N5["Items: [ItemId(11, VarDeclarator(0)), ItemId(12, Normal), ItemId(13, Normal)]"]; N5["Items: [ItemId(5, VarDeclarator(0))]"];
N6["Items: [ItemId(ModuleEvaluation)]"]; N6["Items: [ItemId(6, VarDeclarator(0))]"];
N4 --> N3;
N1 --> N0;
N3 --> N0; N3 --> N0;
N1 --> N0;
N4 --> N0;
N2 -.-> N1; N2 -.-> N1;
N2 --> N0; N2 --> N0;
N5 -.-> N4;
N3 -.-> N1; N3 -.-> N1;
N4 --> N0;
N6 --> N4;
N5 --> N0;
N5 --> N3;
N4 --> N1;
``` ```
# Entrypoints # Entrypoints
``` ```
{ {
ModuleEvaluation: 6, ModuleEvaluation: 4,
Exports: 7, Exports: 7,
} }
``` ```
...@@ -387,31 +372,30 @@ import "__TURBOPACK_PART__" assert { ...@@ -387,31 +372,30 @@ import "__TURBOPACK_PART__" assert {
__turbopack_part__: 1 __turbopack_part__: 1
}; };
x = 2; x = 2;
let y = x;
let z = x;
x = y + z;
x = x + 1;
x *= 2;
export { y as b } from "__TURBOPACK_VAR__" assert {
__turbopack_var__: true
};
export { z as c } from "__TURBOPACK_VAR__" assert {
__turbopack_var__: true
};
``` ```
## Part 4 ## Part 4
```js ```js
import { a as x } from "__TURBOPACK_PART__" assert { import { b as y } from "__TURBOPACK_PART__" assert {
__turbopack_part__: -0 __turbopack_part__: -5
}; };
import "__TURBOPACK_PART__" assert { import { c as z } from "__TURBOPACK_PART__" assert {
__turbopack_part__: 3 __turbopack_part__: -6
}; };
import "__TURBOPACK_PART__" assert { import { a as x } from "__TURBOPACK_PART__" assert {
__turbopack_part__: 1 __turbopack_part__: -0
}; };
x = y + z;
x = x + 1;
x *= 2;
console.log(x); console.log(x);
let a = x;
x = x + a + 5;
x = 100;
export { a as d } from "__TURBOPACK_VAR__" assert {
__turbopack_var__: true
};
export { };
``` ```
## Part 5 ## Part 5
...@@ -419,26 +403,21 @@ console.log(x); ...@@ -419,26 +403,21 @@ console.log(x);
import { a as x } from "__TURBOPACK_PART__" assert { import { a as x } from "__TURBOPACK_PART__" assert {
__turbopack_part__: -0 __turbopack_part__: -0
}; };
import "__TURBOPACK_PART__" assert { let y = x;
__turbopack_part__: 4 export { y as b } from "__TURBOPACK_VAR__" assert {
};
import "__TURBOPACK_PART__" assert {
__turbopack_part__: 3
};
let a = x;
x = x + a + 5;
x = 100;
export { a as d } from "__TURBOPACK_VAR__" assert {
__turbopack_var__: true __turbopack_var__: true
}; };
``` ```
## Part 6 ## Part 6
```js ```js
import "__TURBOPACK_PART__" assert { import { a as x } from "__TURBOPACK_PART__" assert {
__turbopack_part__: 4 __turbopack_part__: -0
};
let z = x;
export { z as c } from "__TURBOPACK_VAR__" assert {
__turbopack_var__: true
}; };
"module evaluation";
``` ```
## Part 7 ## Part 7
...@@ -447,10 +426,26 @@ import "__TURBOPACK_PART__" assert { ...@@ -447,10 +426,26 @@ import "__TURBOPACK_PART__" assert {
``` ```
## Merged (module eval) ## Merged (module eval)
```js ```js
import "__TURBOPACK_PART__" assert { import { b as y } from "__TURBOPACK_PART__" assert {
__turbopack_part__: 4 __turbopack_part__: -5
};
import { c as z } from "__TURBOPACK_PART__" assert {
__turbopack_part__: -6
};
import { a as x } from "__TURBOPACK_PART__" assert {
__turbopack_part__: -0
};
x = y + z;
x = x + 1;
x *= 2;
console.log(x);
let a = x;
x = x + a + 5;
x = 100;
export { a as d } from "__TURBOPACK_VAR__" assert {
__turbopack_var__: true
}; };
"module evaluation"; export { };
``` ```
# Entrypoints # Entrypoints
...@@ -483,7 +478,7 @@ import "__TURBOPACK_PART__" assert { ...@@ -483,7 +478,7 @@ import "__TURBOPACK_PART__" assert {
console.log(x); console.log(x);
console.log(x); console.log(x);
console.log(x); console.log(x);
"module evaluation"; export { };
``` ```
## Part 2 ## Part 2
...@@ -558,6 +553,6 @@ import "__TURBOPACK_PART__" assert { ...@@ -558,6 +553,6 @@ import "__TURBOPACK_PART__" assert {
console.log(x); console.log(x);
console.log(x); console.log(x);
console.log(x); console.log(x);
"module evaluation"; export { };
``` ```
# Items # Items
Count: 4 Count: 3
## Item 1: Stmt 0, `ImportOfModule` ## Item 1: Stmt 0, `ImportOfModule`
...@@ -28,9 +28,7 @@ graph TD ...@@ -28,9 +28,7 @@ graph TD
Item1; Item1;
Item2; Item2;
Item3; Item3;
Item3["ModuleEvaluation"]; Item3["export fakeCat"];
Item4;
Item4["export fakeCat"];
``` ```
# Phase 2 # Phase 2
```mermaid ```mermaid
...@@ -38,10 +36,8 @@ graph TD ...@@ -38,10 +36,8 @@ graph TD
Item1; Item1;
Item2; Item2;
Item3; Item3;
Item3["ModuleEvaluation"]; Item3["export fakeCat"];
Item4; Item3 --> Item2;
Item4["export fakeCat"];
Item4 --> Item2;
``` ```
# Phase 3 # Phase 3
```mermaid ```mermaid
...@@ -49,10 +45,8 @@ graph TD ...@@ -49,10 +45,8 @@ graph TD
Item1; Item1;
Item2; Item2;
Item3; Item3;
Item3["ModuleEvaluation"]; Item3["export fakeCat"];
Item4; Item3 --> Item2;
Item4["export fakeCat"];
Item4 --> Item2;
``` ```
# Phase 4 # Phase 4
```mermaid ```mermaid
...@@ -60,32 +54,27 @@ graph TD ...@@ -60,32 +54,27 @@ graph TD
Item1; Item1;
Item2; Item2;
Item3; Item3;
Item3["ModuleEvaluation"]; Item3["export fakeCat"];
Item4; Item3 --> Item2;
Item4["export fakeCat"];
Item4 --> Item2;
Item3 --> Item1;
``` ```
# Final # Final
```mermaid ```mermaid
graph TD graph TD
N0["Items: [ItemId(0, ImportOfModule)]"]; N0["Items: [ItemId(0, ImportOfModule)]"];
N1["Items: [ItemId(0, ImportBinding(0))]"]; N1["Items: [ItemId(0, ImportBinding(0))]"];
N2["Items: [ItemId(ModuleEvaluation)]"]; N2["Items: [ItemId(Export((&quot;__TURBOPACK__reexport__cat__&quot;, #3), &quot;fakeCat&quot;))]"];
N3["Items: [ItemId(Export((&quot;__TURBOPACK__reexport__cat__&quot;, #3), &quot;fakeCat&quot;))]"]; N2 --> N1;
N3 --> N1;
N2 --> N0;
N1 --> N0; N1 --> N0;
``` ```
# Entrypoints # Entrypoints
``` ```
{ {
ModuleEvaluation: 2, ModuleEvaluation: 0,
Export( Export(
"fakeCat", "fakeCat",
): 3, ): 2,
Exports: 4, Exports: 3,
} }
``` ```
...@@ -94,6 +83,7 @@ graph TD ...@@ -94,6 +83,7 @@ graph TD
## Part 0 ## Part 0
```js ```js
import "./lib"; import "./lib";
export { };
``` ```
## Part 1 ## Part 1
...@@ -109,21 +99,13 @@ export { __TURBOPACK__reexport__cat__ as a } from "__TURBOPACK_VAR__" assert { ...@@ -109,21 +99,13 @@ export { __TURBOPACK__reexport__cat__ as a } from "__TURBOPACK_VAR__" assert {
``` ```
## Part 2 ## Part 2
```js ```js
import "__TURBOPACK_PART__" assert {
__turbopack_part__: 0
};
"module evaluation";
```
## Part 3
```js
import { a as __TURBOPACK__reexport__cat__ } from "__TURBOPACK_PART__" assert { import { a as __TURBOPACK__reexport__cat__ } from "__TURBOPACK_PART__" assert {
__turbopack_part__: -1 __turbopack_part__: -1
}; };
export { __TURBOPACK__reexport__cat__ as fakeCat }; export { __TURBOPACK__reexport__cat__ as fakeCat };
``` ```
## Part 4 ## Part 3
```js ```js
export { fakeCat } from "__TURBOPACK_PART__" assert { export { fakeCat } from "__TURBOPACK_PART__" assert {
__turbopack_part__: "export fakeCat" __turbopack_part__: "export fakeCat"
...@@ -132,21 +114,19 @@ export { fakeCat } from "__TURBOPACK_PART__" assert { ...@@ -132,21 +114,19 @@ export { fakeCat } from "__TURBOPACK_PART__" assert {
``` ```
## Merged (module eval) ## Merged (module eval)
```js ```js
import "__TURBOPACK_PART__" assert { import "./lib";
__turbopack_part__: 0 export { };
};
"module evaluation";
``` ```
# Entrypoints # Entrypoints
``` ```
{ {
ModuleEvaluation: 2, ModuleEvaluation: 0,
Export( Export(
"fakeCat", "fakeCat",
): 3, ): 2,
Exports: 4, Exports: 3,
} }
``` ```
...@@ -155,6 +135,7 @@ import "__TURBOPACK_PART__" assert { ...@@ -155,6 +135,7 @@ import "__TURBOPACK_PART__" assert {
## Part 0 ## Part 0
```js ```js
import "./lib"; import "./lib";
export { };
``` ```
## Part 1 ## Part 1
...@@ -170,21 +151,13 @@ export { __TURBOPACK__reexport__cat__ as a } from "__TURBOPACK_VAR__" assert { ...@@ -170,21 +151,13 @@ export { __TURBOPACK__reexport__cat__ as a } from "__TURBOPACK_VAR__" assert {
``` ```
## Part 2 ## Part 2
```js ```js
import "__TURBOPACK_PART__" assert {
__turbopack_part__: 0
};
"module evaluation";
```
## Part 3
```js
import { a as __TURBOPACK__reexport__cat__ } from "__TURBOPACK_PART__" assert { import { a as __TURBOPACK__reexport__cat__ } from "__TURBOPACK_PART__" assert {
__turbopack_part__: -1 __turbopack_part__: -1
}; };
export { __TURBOPACK__reexport__cat__ as fakeCat }; export { __TURBOPACK__reexport__cat__ as fakeCat };
``` ```
## Part 4 ## Part 3
```js ```js
export { fakeCat } from "__TURBOPACK_PART__" assert { export { fakeCat } from "__TURBOPACK_PART__" assert {
__turbopack_part__: "export fakeCat" __turbopack_part__: "export fakeCat"
...@@ -193,9 +166,7 @@ export { fakeCat } from "__TURBOPACK_PART__" assert { ...@@ -193,9 +166,7 @@ export { fakeCat } from "__TURBOPACK_PART__" assert {
``` ```
## Merged (module eval) ## Merged (module eval)
```js ```js
import "__TURBOPACK_PART__" assert { import "./lib";
__turbopack_part__: 0 export { };
};
"module evaluation";
``` ```
# Items # Items
Count: 10 Count: 9
## Item 1: Stmt 0, `VarDeclarator(0)` ## Item 1: Stmt 0, `VarDeclarator(0)`
...@@ -133,13 +133,11 @@ graph TD ...@@ -133,13 +133,11 @@ graph TD
Item5; Item5;
Item6; Item6;
Item7; Item7;
Item7["ModuleEvaluation"]; Item7["export addMessageListener"];
Item8; Item8;
Item8["export addMessageListener"]; Item8["export sendMessage"];
Item9; Item9;
Item9["export sendMessage"]; Item9["export connectHMR"];
Item10;
Item10["export connectHMR"];
``` ```
# Phase 2 # Phase 2
```mermaid ```mermaid
...@@ -151,16 +149,14 @@ graph TD ...@@ -151,16 +149,14 @@ graph TD
Item5; Item5;
Item6; Item6;
Item7; Item7;
Item7["ModuleEvaluation"]; Item7["export addMessageListener"];
Item8; Item8;
Item8["export addMessageListener"]; Item8["export sendMessage"];
Item9; Item9;
Item9["export sendMessage"]; Item9["export connectHMR"];
Item10; Item7 --> Item4;
Item10["export connectHMR"]; Item8 --> Item5;
Item8 --> Item4; Item9 --> Item6;
Item9 --> Item5;
Item10 --> Item6;
``` ```
# Phase 3 # Phase 3
```mermaid ```mermaid
...@@ -172,16 +168,14 @@ graph TD ...@@ -172,16 +168,14 @@ graph TD
Item5; Item5;
Item6; Item6;
Item7; Item7;
Item7["ModuleEvaluation"]; Item7["export addMessageListener"];
Item8; Item8;
Item8["export addMessageListener"]; Item8["export sendMessage"];
Item9; Item9;
Item9["export sendMessage"]; Item9["export connectHMR"];
Item10; Item7 --> Item4;
Item10["export connectHMR"]; Item8 --> Item5;
Item8 --> Item4; Item9 --> Item6;
Item9 --> Item5;
Item10 --> Item6;
Item4 --> Item2; Item4 --> Item2;
Item5 --> Item1; Item5 --> Item1;
Item6 --> Item1; Item6 --> Item1;
...@@ -198,16 +192,14 @@ graph TD ...@@ -198,16 +192,14 @@ graph TD
Item5; Item5;
Item6; Item6;
Item7; Item7;
Item7["ModuleEvaluation"]; Item7["export addMessageListener"];
Item8; Item8;
Item8["export addMessageListener"]; Item8["export sendMessage"];
Item9; Item9;
Item9["export sendMessage"]; Item9["export connectHMR"];
Item10; Item7 --> Item4;
Item10["export connectHMR"]; Item8 --> Item5;
Item8 --> Item4; Item9 --> Item6;
Item9 --> Item5;
Item10 --> Item6;
Item4 --> Item2; Item4 --> Item2;
Item5 --> Item1; Item5 --> Item1;
Item6 --> Item1; Item6 --> Item1;
...@@ -222,7 +214,6 @@ graph TD ...@@ -222,7 +214,6 @@ graph TD
N2["Items: [ItemId(2, Normal), ItemId(5, Normal), ItemId(Export((&quot;connectHMR&quot;, #2), &quot;connectHMR&quot;))]"]; N2["Items: [ItemId(2, Normal), ItemId(5, Normal), ItemId(Export((&quot;connectHMR&quot;, #2), &quot;connectHMR&quot;))]"];
N3["Items: [ItemId(3, Normal), ItemId(Export((&quot;addMessageListener&quot;, #2), &quot;addMessageListener&quot;))]"]; N3["Items: [ItemId(3, Normal), ItemId(Export((&quot;addMessageListener&quot;, #2), &quot;addMessageListener&quot;))]"];
N4["Items: [ItemId(4, Normal), ItemId(Export((&quot;sendMessage&quot;, #2), &quot;sendMessage&quot;))]"]; N4["Items: [ItemId(4, Normal), ItemId(Export((&quot;sendMessage&quot;, #2), &quot;sendMessage&quot;))]"];
N5["Items: [ItemId(ModuleEvaluation)]"];
N4 --> N0; N4 --> N0;
N2 --> N1; N2 --> N1;
N2 --> N0; N2 --> N0;
...@@ -232,7 +223,7 @@ graph TD ...@@ -232,7 +223,7 @@ graph TD
``` ```
{ {
ModuleEvaluation: 5, ModuleEvaluation: 6,
Export( Export(
"addMessageListener", "addMessageListener",
): 3, ): 3,
...@@ -242,7 +233,7 @@ graph TD ...@@ -242,7 +233,7 @@ graph TD
Export( Export(
"sendMessage", "sendMessage",
): 4, ): 4,
Exports: 6, Exports: 5,
} }
``` ```
...@@ -360,11 +351,6 @@ export { sendMessage as f } from "__TURBOPACK_VAR__" assert { ...@@ -360,11 +351,6 @@ export { sendMessage as f } from "__TURBOPACK_VAR__" assert {
``` ```
## Part 5 ## Part 5
```js ```js
"module evaluation";
```
## Part 6
```js
export { connectHMR } from "__TURBOPACK_PART__" assert { export { connectHMR } from "__TURBOPACK_PART__" assert {
__turbopack_part__: "export connectHMR" __turbopack_part__: "export connectHMR"
}; };
...@@ -375,17 +361,22 @@ export { sendMessage } from "__TURBOPACK_PART__" assert { ...@@ -375,17 +361,22 @@ export { sendMessage } from "__TURBOPACK_PART__" assert {
__turbopack_part__: "export sendMessage" __turbopack_part__: "export sendMessage"
}; };
```
## Part 6
```js
export { };
``` ```
## Merged (module eval) ## Merged (module eval)
```js ```js
"module evaluation"; export { };
``` ```
# Entrypoints # Entrypoints
``` ```
{ {
ModuleEvaluation: 5, ModuleEvaluation: 6,
Export( Export(
"addMessageListener", "addMessageListener",
): 3, ): 3,
...@@ -395,7 +386,7 @@ export { sendMessage } from "__TURBOPACK_PART__" assert { ...@@ -395,7 +386,7 @@ export { sendMessage } from "__TURBOPACK_PART__" assert {
Export( Export(
"sendMessage", "sendMessage",
): 4, ): 4,
Exports: 6, Exports: 5,
} }
``` ```
...@@ -513,11 +504,6 @@ export { sendMessage as f } from "__TURBOPACK_VAR__" assert { ...@@ -513,11 +504,6 @@ export { sendMessage as f } from "__TURBOPACK_VAR__" assert {
``` ```
## Part 5 ## Part 5
```js ```js
"module evaluation";
```
## Part 6
```js
export { connectHMR } from "__TURBOPACK_PART__" assert { export { connectHMR } from "__TURBOPACK_PART__" assert {
__turbopack_part__: "export connectHMR" __turbopack_part__: "export connectHMR"
}; };
...@@ -528,9 +514,14 @@ export { sendMessage } from "__TURBOPACK_PART__" assert { ...@@ -528,9 +514,14 @@ export { sendMessage } from "__TURBOPACK_PART__" assert {
__turbopack_part__: "export sendMessage" __turbopack_part__: "export sendMessage"
}; };
```
## Part 6
```js
export { };
``` ```
## Merged (module eval) ## Merged (module eval)
```js ```js
"module evaluation"; export { };
``` ```
# Items # Items
Count: 31 Count: 30
## Item 1: Stmt 0, `ImportOfModule` ## Item 1: Stmt 0, `ImportOfModule`
...@@ -470,11 +470,9 @@ graph TD ...@@ -470,11 +470,9 @@ graph TD
Item27; Item27;
Item28; Item28;
Item29; Item29;
Item29["ModuleEvaluation"]; Item29["export structuredError"];
Item30; Item30;
Item30["export structuredError"]; Item30["export IPC"];
Item31;
Item31["export IPC"];
Item2 --> Item1; Item2 --> Item1;
Item3 --> Item2; Item3 --> Item2;
``` ```
...@@ -510,11 +508,9 @@ graph TD ...@@ -510,11 +508,9 @@ graph TD
Item27; Item27;
Item28; Item28;
Item29; Item29;
Item29["ModuleEvaluation"]; Item29["export structuredError"];
Item30; Item30;
Item30["export structuredError"]; Item30["export IPC"];
Item31;
Item31["export IPC"];
Item2 --> Item1; Item2 --> Item1;
Item3 --> Item2; Item3 --> Item2;
Item9 --> Item3; Item9 --> Item3;
...@@ -633,9 +629,9 @@ graph TD ...@@ -633,9 +629,9 @@ graph TD
Item28 -.-> Item5; Item28 -.-> Item5;
Item28 -.-> Item4; Item28 -.-> Item4;
Item28 -.-> Item7; Item28 -.-> Item7;
Item30 --> Item7; Item29 --> Item7;
Item31 --> Item11; Item30 --> Item11;
Item31 --> Item10; Item30 --> Item10;
``` ```
# Phase 3 # Phase 3
```mermaid ```mermaid
...@@ -669,11 +665,9 @@ graph TD ...@@ -669,11 +665,9 @@ graph TD
Item27; Item27;
Item28; Item28;
Item29; Item29;
Item29["ModuleEvaluation"]; Item29["export structuredError"];
Item30; Item30;
Item30["export structuredError"]; Item30["export IPC"];
Item31;
Item31["export IPC"];
Item2 --> Item1; Item2 --> Item1;
Item3 --> Item2; Item3 --> Item2;
Item9 --> Item3; Item9 --> Item3;
...@@ -792,9 +786,9 @@ graph TD ...@@ -792,9 +786,9 @@ graph TD
Item28 -.-> Item5; Item28 -.-> Item5;
Item28 -.-> Item4; Item28 -.-> Item4;
Item28 -.-> Item7; Item28 -.-> Item7;
Item30 --> Item7; Item29 --> Item7;
Item31 --> Item11; Item30 --> Item11;
Item31 --> Item10; Item30 --> Item10;
Item7 --> Item6; Item7 --> Item6;
Item7 --> Item5; Item7 --> Item5;
Item8 --> Item4; Item8 --> Item4;
...@@ -832,11 +826,9 @@ graph TD ...@@ -832,11 +826,9 @@ graph TD
Item27; Item27;
Item28; Item28;
Item29; Item29;
Item29["ModuleEvaluation"]; Item29["export structuredError"];
Item30; Item30;
Item30["export structuredError"]; Item30["export IPC"];
Item31;
Item31["export IPC"];
Item2 --> Item1; Item2 --> Item1;
Item3 --> Item2; Item3 --> Item2;
Item9 --> Item3; Item9 --> Item3;
...@@ -955,14 +947,13 @@ graph TD ...@@ -955,14 +947,13 @@ graph TD
Item28 -.-> Item5; Item28 -.-> Item5;
Item28 -.-> Item4; Item28 -.-> Item4;
Item28 -.-> Item7; Item28 -.-> Item7;
Item30 --> Item7; Item29 --> Item7;
Item31 --> Item11; Item30 --> Item11;
Item31 --> Item10; Item30 --> Item10;
Item7 --> Item6; Item7 --> Item6;
Item7 --> Item5; Item7 --> Item5;
Item8 --> Item4; Item8 --> Item4;
Item8 --> Item7; Item8 --> Item7;
Item29 --> Item28;
``` ```
# Final # Final
```mermaid ```mermaid
...@@ -976,18 +967,18 @@ graph TD ...@@ -976,18 +967,18 @@ graph TD
N6["Items: [ItemId(3, Normal)]"]; N6["Items: [ItemId(3, Normal)]"];
N7["Items: [ItemId(4, Normal), ItemId(5, VarDeclarator(0)), ItemId(6, VarDeclarator(0))]"]; N7["Items: [ItemId(4, Normal), ItemId(5, VarDeclarator(0)), ItemId(6, VarDeclarator(0))]"];
N8["Items: [ItemId(7, Normal)]"]; N8["Items: [ItemId(7, Normal)]"];
N9["Items: [ItemId(8, VarDeclarator(0)), ItemId(9, Normal), ItemId(10, Normal), ItemId(11, Normal), ItemId(12, Normal), ItemId(13, Normal), ItemId(14, Normal), ItemId(15, Normal), ItemId(16, Normal), ItemId(17, Normal), ItemId(18, Normal), ItemId(19, Normal), ItemId(20, Normal), ItemId(21, Normal), ItemId(22, Normal), ItemId(23, Normal), ItemId(24, Normal), ItemId(ModuleEvaluation)]"]; N9["Items: [ItemId(8, VarDeclarator(0)), ItemId(9, Normal), ItemId(10, Normal), ItemId(11, Normal), ItemId(12, Normal), ItemId(13, Normal), ItemId(14, Normal), ItemId(15, Normal), ItemId(16, Normal), ItemId(17, Normal), ItemId(18, Normal), ItemId(19, Normal), ItemId(20, Normal), ItemId(21, Normal), ItemId(22, Normal), ItemId(23, Normal), ItemId(24, Normal)]"];
N10["Items: [ItemId(Export((&quot;IPC&quot;, #2), &quot;IPC&quot;))]"]; N10["Items: [ItemId(Export((&quot;IPC&quot;, #2), &quot;IPC&quot;))]"];
N11["Items: [ItemId(Export((&quot;structuredError&quot;, #2), &quot;structuredError&quot;))]"]; N11["Items: [ItemId(Export((&quot;structuredError&quot;, #2), &quot;structuredError&quot;))]"];
N2 --> N0; N2 --> N0;
N4 --> N2; N4 --> N2;
N9 -.-> N1; N9 -.-> N5;
N9 -.-> N3; N9 -.-> N3;
N11 --> N6; N11 --> N6;
N10 --> N7; N10 --> N7;
N6 --> N5; N6 --> N5;
N3 --> N2;
N5 --> N4; N5 --> N4;
N9 -.-> N6;
N7 -.-> N5; N7 -.-> N5;
N7 -.-> N3; N7 -.-> N3;
N7 --> N1; N7 --> N1;
...@@ -997,13 +988,13 @@ graph TD ...@@ -997,13 +988,13 @@ graph TD
N8 -.-> N3; N8 -.-> N3;
N8 -.-> N1; N8 -.-> N1;
N8 -.-> N6; N8 -.-> N6;
N9 -.-> N1;
N9 -.-> N6;
N7 --> N4; N7 --> N4;
N10 --> N8; N10 --> N8;
N1 --> N0;
N9 -.-> N5;
N9 --> N8; N9 --> N8;
N6 --> N3; N6 --> N3;
N3 --> N2; N1 --> N0;
``` ```
# Entrypoints # Entrypoints
...@@ -1281,16 +1272,16 @@ process.on("uncaughtException", (err)=>{ ...@@ -1281,16 +1272,16 @@ process.on("uncaughtException", (err)=>{
## Part 9 ## Part 9
```js ```js
import "__TURBOPACK_PART__" assert { import "__TURBOPACK_PART__" assert {
__turbopack_part__: 1 __turbopack_part__: 5
}; };
import "__TURBOPACK_PART__" assert { import "__TURBOPACK_PART__" assert {
__turbopack_part__: 3 __turbopack_part__: 3
}; };
import "__TURBOPACK_PART__" assert { import "__TURBOPACK_PART__" assert {
__turbopack_part__: 6 __turbopack_part__: 1
}; };
import "__TURBOPACK_PART__" assert { import "__TURBOPACK_PART__" assert {
__turbopack_part__: 5 __turbopack_part__: 6
}; };
import "__TURBOPACK_PART__" assert { import "__TURBOPACK_PART__" assert {
__turbopack_part__: 8 __turbopack_part__: 8
...@@ -1325,10 +1316,10 @@ improveConsole("timeEnd", "stdout", true); ...@@ -1325,10 +1316,10 @@ improveConsole("timeEnd", "stdout", true);
improveConsole("timeLog", "stdout", true); improveConsole("timeLog", "stdout", true);
improveConsole("timeStamp", "stdout", true); improveConsole("timeStamp", "stdout", true);
improveConsole("assert", "stderr", true); improveConsole("assert", "stderr", true);
"module evaluation";
export { improveConsole as h } from "__TURBOPACK_VAR__" assert { export { improveConsole as h } from "__TURBOPACK_VAR__" assert {
__turbopack_var__: true __turbopack_var__: true
}; };
export { };
``` ```
## Part 10 ## Part 10
...@@ -1363,16 +1354,16 @@ export { structuredError } from "__TURBOPACK_PART__" assert { ...@@ -1363,16 +1354,16 @@ export { structuredError } from "__TURBOPACK_PART__" assert {
## Merged (module eval) ## Merged (module eval)
```js ```js
import "__TURBOPACK_PART__" assert { import "__TURBOPACK_PART__" assert {
__turbopack_part__: 1 __turbopack_part__: 5
}; };
import "__TURBOPACK_PART__" assert { import "__TURBOPACK_PART__" assert {
__turbopack_part__: 3 __turbopack_part__: 3
}; };
import "__TURBOPACK_PART__" assert { import "__TURBOPACK_PART__" assert {
__turbopack_part__: 6 __turbopack_part__: 1
}; };
import "__TURBOPACK_PART__" assert { import "__TURBOPACK_PART__" assert {
__turbopack_part__: 5 __turbopack_part__: 6
}; };
import "__TURBOPACK_PART__" assert { import "__TURBOPACK_PART__" assert {
__turbopack_part__: 8 __turbopack_part__: 8
...@@ -1407,10 +1398,10 @@ improveConsole("timeEnd", "stdout", true); ...@@ -1407,10 +1398,10 @@ improveConsole("timeEnd", "stdout", true);
improveConsole("timeLog", "stdout", true); improveConsole("timeLog", "stdout", true);
improveConsole("timeStamp", "stdout", true); improveConsole("timeStamp", "stdout", true);
improveConsole("assert", "stderr", true); improveConsole("assert", "stderr", true);
"module evaluation";
export { improveConsole as h } from "__TURBOPACK_VAR__" assert { export { improveConsole as h } from "__TURBOPACK_VAR__" assert {
__turbopack_var__: true __turbopack_var__: true
}; };
export { };
``` ```
# Entrypoints # Entrypoints
...@@ -1703,10 +1694,10 @@ improveConsole("timeEnd", "stdout", true); ...@@ -1703,10 +1694,10 @@ improveConsole("timeEnd", "stdout", true);
improveConsole("timeLog", "stdout", true); improveConsole("timeLog", "stdout", true);
improveConsole("timeStamp", "stdout", true); improveConsole("timeStamp", "stdout", true);
improveConsole("assert", "stderr", true); improveConsole("assert", "stderr", true);
"module evaluation";
export { improveConsole as h } from "__TURBOPACK_VAR__" assert { export { improveConsole as h } from "__TURBOPACK_VAR__" assert {
__turbopack_var__: true __turbopack_var__: true
}; };
export { };
``` ```
## Part 10 ## Part 10
...@@ -1773,9 +1764,9 @@ improveConsole("timeEnd", "stdout", true); ...@@ -1773,9 +1764,9 @@ improveConsole("timeEnd", "stdout", true);
improveConsole("timeLog", "stdout", true); improveConsole("timeLog", "stdout", true);
improveConsole("timeStamp", "stdout", true); improveConsole("timeStamp", "stdout", true);
improveConsole("assert", "stderr", true); improveConsole("assert", "stderr", true);
"module evaluation";
export { improveConsole as h } from "__TURBOPACK_VAR__" assert { export { improveConsole as h } from "__TURBOPACK_VAR__" assert {
__turbopack_var__: true __turbopack_var__: true
}; };
export { };
``` ```
# Items # Items
Count: 14 Count: 13
## Item 1: Stmt 0, `VarDeclarator(0)` ## Item 1: Stmt 0, `VarDeclarator(0)`
...@@ -124,11 +124,9 @@ graph TD ...@@ -124,11 +124,9 @@ graph TD
Item10; Item10;
Item11; Item11;
Item12; Item12;
Item12["ModuleEvaluation"]; Item12["export x"];
Item13; Item13;
Item13["export x"]; Item13["export y"];
Item14;
Item14["export y"];
``` ```
# Phase 2 # Phase 2
```mermaid ```mermaid
...@@ -145,11 +143,9 @@ graph TD ...@@ -145,11 +143,9 @@ graph TD
Item10; Item10;
Item11; Item11;
Item12; Item12;
Item12["ModuleEvaluation"]; Item12["export x"];
Item13; Item13;
Item13["export x"]; Item13["export y"];
Item14;
Item14["export y"];
Item2 --> Item1; Item2 --> Item1;
Item3 --> Item1; Item3 --> Item1;
Item4 --> Item3; Item4 --> Item3;
...@@ -169,9 +165,9 @@ graph TD ...@@ -169,9 +165,9 @@ graph TD
Item10 --> Item1; Item10 --> Item1;
Item11 --> Item10; Item11 --> Item10;
Item11 --> Item1; Item11 --> Item1;
Item13 --> Item10; Item12 --> Item10;
Item13 --> Item1; Item12 --> Item1;
Item14 --> Item11; Item13 --> Item11;
``` ```
# Phase 3 # Phase 3
```mermaid ```mermaid
...@@ -188,11 +184,9 @@ graph TD ...@@ -188,11 +184,9 @@ graph TD
Item10; Item10;
Item11; Item11;
Item12; Item12;
Item12["ModuleEvaluation"]; Item12["export x"];
Item13; Item13;
Item13["export x"]; Item13["export y"];
Item14;
Item14["export y"];
Item2 --> Item1; Item2 --> Item1;
Item3 --> Item1; Item3 --> Item1;
Item4 --> Item3; Item4 --> Item3;
...@@ -212,9 +206,9 @@ graph TD ...@@ -212,9 +206,9 @@ graph TD
Item10 --> Item1; Item10 --> Item1;
Item11 --> Item10; Item11 --> Item10;
Item11 --> Item1; Item11 --> Item1;
Item13 --> Item10; Item12 --> Item10;
Item13 --> Item1; Item12 --> Item1;
Item14 --> Item11; Item13 --> Item11;
``` ```
# Phase 4 # Phase 4
```mermaid ```mermaid
...@@ -231,11 +225,9 @@ graph TD ...@@ -231,11 +225,9 @@ graph TD
Item10; Item10;
Item11; Item11;
Item12; Item12;
Item12["ModuleEvaluation"]; Item12["export x"];
Item13; Item13;
Item13["export x"]; Item13["export y"];
Item14;
Item14["export y"];
Item2 --> Item1; Item2 --> Item1;
Item3 --> Item1; Item3 --> Item1;
Item4 --> Item3; Item4 --> Item3;
...@@ -255,45 +247,39 @@ graph TD ...@@ -255,45 +247,39 @@ graph TD
Item10 --> Item1; Item10 --> Item1;
Item11 --> Item10; Item11 --> Item10;
Item11 --> Item1; Item11 --> Item1;
Item13 --> Item10; Item12 --> Item10;
Item13 --> Item1; Item12 --> Item1;
Item14 --> Item11; Item13 --> Item11;
Item12 --> Item4;
``` ```
# Final # Final
```mermaid ```mermaid
graph TD graph TD
N0["Items: [ItemId(0, VarDeclarator(0))]"]; N0["Items: [ItemId(0, VarDeclarator(0))]"];
N1["Items: [ItemId(1, Normal)]"]; N1["Items: [ItemId(1, Normal)]"];
N2["Items: [ItemId(2, Normal), ItemId(3, Normal)]"]; N2["Items: [ItemId(2, Normal), ItemId(3, Normal), ItemId(4, Normal)]"];
N3["Items: [ItemId(4, Normal)]"]; N3["Items: [ItemId(5, Normal), ItemId(6, Normal), ItemId(7, Normal), ItemId(8, Normal), ItemId(9, Normal)]"];
N4["Items: [ItemId(5, Normal), ItemId(6, Normal), ItemId(7, Normal), ItemId(8, Normal), ItemId(9, Normal)]"]; N4["Items: [ItemId(11, VarDeclarator(0)), ItemId(Export((&quot;y&quot;, #2), &quot;y&quot;))]"];
N5["Items: [ItemId(11, VarDeclarator(0)), ItemId(Export((&quot;y&quot;, #2), &quot;y&quot;))]"]; N5["Items: [ItemId(Export((&quot;x&quot;, #2), &quot;x&quot;))]"];
N6["Items: [ItemId(ModuleEvaluation)]"];
N7["Items: [ItemId(Export((&quot;x&quot;, #2), &quot;x&quot;))]"];
N1 --> N0; N1 --> N0;
N5 --> N4;
N4 --> N0;
N2 --> N0;
N3 -.-> N2;
N3 --> N0; N3 --> N0;
N7 --> N4;
N7 --> N0;
N5 --> N0; N5 --> N0;
N6 --> N2; N5 --> N3;
N4 --> N3;
N2 --> N0;
N4 --> N0;
``` ```
# Entrypoints # Entrypoints
``` ```
{ {
ModuleEvaluation: 6, ModuleEvaluation: 2,
Export( Export(
"x", "x",
): 7, ): 5,
Export( Export(
"y", "y",
): 5, ): 4,
Exports: 8, Exports: 6,
} }
``` ```
...@@ -322,20 +308,11 @@ import { a as x } from "__TURBOPACK_PART__" assert { ...@@ -322,20 +308,11 @@ import { a as x } from "__TURBOPACK_PART__" assert {
}; };
x = 3; x = 3;
console.log(x); console.log(x);
```
## Part 3
```js
import { a as x } from "__TURBOPACK_PART__" assert {
__turbopack_part__: -0
};
import "__TURBOPACK_PART__" assert {
__turbopack_part__: 2
};
x = 4; x = 4;
export { };
``` ```
## Part 4 ## Part 3
```js ```js
import { a as x } from "__TURBOPACK_PART__" assert { import { a as x } from "__TURBOPACK_PART__" assert {
__turbopack_part__: -0 __turbopack_part__: -0
...@@ -347,13 +324,13 @@ x += 8; ...@@ -347,13 +324,13 @@ x += 8;
x += 9; x += 9;
``` ```
## Part 5 ## Part 4
```js ```js
import { a as x } from "__TURBOPACK_PART__" assert { import { a as x } from "__TURBOPACK_PART__" assert {
__turbopack_part__: -0 __turbopack_part__: -0
}; };
import "__TURBOPACK_PART__" assert { import "__TURBOPACK_PART__" assert {
__turbopack_part__: 4 __turbopack_part__: 3
}; };
const y = x; const y = x;
export { y }; export { y };
...@@ -362,26 +339,18 @@ export { y as b } from "__TURBOPACK_VAR__" assert { ...@@ -362,26 +339,18 @@ export { y as b } from "__TURBOPACK_VAR__" assert {
}; };
``` ```
## Part 6 ## Part 5
```js
import "__TURBOPACK_PART__" assert {
__turbopack_part__: 2
};
"module evaluation";
```
## Part 7
```js ```js
import { a as x } from "__TURBOPACK_PART__" assert { import { a as x } from "__TURBOPACK_PART__" assert {
__turbopack_part__: -0 __turbopack_part__: -0
}; };
import "__TURBOPACK_PART__" assert { import "__TURBOPACK_PART__" assert {
__turbopack_part__: 4 __turbopack_part__: 3
}; };
export { x }; export { x };
``` ```
## Part 8 ## Part 6
```js ```js
export { y } from "__TURBOPACK_PART__" assert { export { y } from "__TURBOPACK_PART__" assert {
__turbopack_part__: "export y" __turbopack_part__: "export y"
...@@ -393,10 +362,13 @@ export { x } from "__TURBOPACK_PART__" assert { ...@@ -393,10 +362,13 @@ export { x } from "__TURBOPACK_PART__" assert {
``` ```
## Merged (module eval) ## Merged (module eval)
```js ```js
import "__TURBOPACK_PART__" assert { import { a as x } from "__TURBOPACK_PART__" assert {
__turbopack_part__: 2 __turbopack_part__: -0
}; };
"module evaluation"; x = 3;
console.log(x);
x = 4;
export { };
``` ```
# Entrypoints # Entrypoints
...@@ -439,7 +411,7 @@ import { a as x } from "__TURBOPACK_PART__" assert { ...@@ -439,7 +411,7 @@ import { a as x } from "__TURBOPACK_PART__" assert {
}; };
x = 3; x = 3;
console.log(x); console.log(x);
"module evaluation"; export { };
``` ```
## Part 3 ## Part 3
...@@ -505,6 +477,6 @@ import { a as x } from "__TURBOPACK_PART__" assert { ...@@ -505,6 +477,6 @@ import { a as x } from "__TURBOPACK_PART__" assert {
}; };
x = 3; x = 3;
console.log(x); console.log(x);
"module evaluation"; export { };
``` ```
# Items # Items
Count: 31 Count: 30
## Item 1: Stmt 0, `ImportOfModule` ## Item 1: Stmt 0, `ImportOfModule`
...@@ -470,11 +470,9 @@ graph TD ...@@ -470,11 +470,9 @@ graph TD
Item27; Item27;
Item28; Item28;
Item29; Item29;
Item29["ModuleEvaluation"]; Item29["export structuredError"];
Item30; Item30;
Item30["export structuredError"]; Item30["export IPC"];
Item31;
Item31["export IPC"];
Item2 --> Item1; Item2 --> Item1;
Item3 --> Item2; Item3 --> Item2;
``` ```
...@@ -510,11 +508,9 @@ graph TD ...@@ -510,11 +508,9 @@ graph TD
Item27; Item27;
Item28; Item28;
Item29; Item29;
Item29["ModuleEvaluation"]; Item29["export structuredError"];
Item30; Item30;
Item30["export structuredError"]; Item30["export IPC"];
Item31;
Item31["export IPC"];
Item2 --> Item1; Item2 --> Item1;
Item3 --> Item2; Item3 --> Item2;
Item9 --> Item3; Item9 --> Item3;
...@@ -633,9 +629,9 @@ graph TD ...@@ -633,9 +629,9 @@ graph TD
Item28 -.-> Item5; Item28 -.-> Item5;
Item28 -.-> Item4; Item28 -.-> Item4;
Item28 -.-> Item7; Item28 -.-> Item7;
Item30 --> Item7; Item29 --> Item7;
Item31 --> Item11; Item30 --> Item11;
Item31 --> Item10; Item30 --> Item10;
``` ```
# Phase 3 # Phase 3
```mermaid ```mermaid
...@@ -669,11 +665,9 @@ graph TD ...@@ -669,11 +665,9 @@ graph TD
Item27; Item27;
Item28; Item28;
Item29; Item29;
Item29["ModuleEvaluation"]; Item29["export structuredError"];
Item30; Item30;
Item30["export structuredError"]; Item30["export IPC"];
Item31;
Item31["export IPC"];
Item2 --> Item1; Item2 --> Item1;
Item3 --> Item2; Item3 --> Item2;
Item9 --> Item3; Item9 --> Item3;
...@@ -792,9 +786,9 @@ graph TD ...@@ -792,9 +786,9 @@ graph TD
Item28 -.-> Item5; Item28 -.-> Item5;
Item28 -.-> Item4; Item28 -.-> Item4;
Item28 -.-> Item7; Item28 -.-> Item7;
Item30 --> Item7; Item29 --> Item7;
Item31 --> Item11; Item30 --> Item11;
Item31 --> Item10; Item30 --> Item10;
Item7 --> Item6; Item7 --> Item6;
Item7 --> Item5; Item7 --> Item5;
Item8 --> Item4; Item8 --> Item4;
...@@ -832,11 +826,9 @@ graph TD ...@@ -832,11 +826,9 @@ graph TD
Item27; Item27;
Item28; Item28;
Item29; Item29;
Item29["ModuleEvaluation"]; Item29["export structuredError"];
Item30; Item30;
Item30["export structuredError"]; Item30["export IPC"];
Item31;
Item31["export IPC"];
Item2 --> Item1; Item2 --> Item1;
Item3 --> Item2; Item3 --> Item2;
Item9 --> Item3; Item9 --> Item3;
...@@ -955,14 +947,13 @@ graph TD ...@@ -955,14 +947,13 @@ graph TD
Item28 -.-> Item5; Item28 -.-> Item5;
Item28 -.-> Item4; Item28 -.-> Item4;
Item28 -.-> Item7; Item28 -.-> Item7;
Item30 --> Item7; Item29 --> Item7;
Item31 --> Item11; Item30 --> Item11;
Item31 --> Item10; Item30 --> Item10;
Item7 --> Item6; Item7 --> Item6;
Item7 --> Item5; Item7 --> Item5;
Item8 --> Item4; Item8 --> Item4;
Item8 --> Item7; Item8 --> Item7;
Item29 --> Item28;
``` ```
# Final # Final
```mermaid ```mermaid
...@@ -976,18 +967,18 @@ graph TD ...@@ -976,18 +967,18 @@ graph TD
N6["Items: [ItemId(3, Normal)]"]; N6["Items: [ItemId(3, Normal)]"];
N7["Items: [ItemId(4, Normal), ItemId(5, VarDeclarator(0)), ItemId(6, VarDeclarator(0))]"]; N7["Items: [ItemId(4, Normal), ItemId(5, VarDeclarator(0)), ItemId(6, VarDeclarator(0))]"];
N8["Items: [ItemId(7, Normal)]"]; N8["Items: [ItemId(7, Normal)]"];
N9["Items: [ItemId(8, VarDeclarator(0)), ItemId(9, Normal), ItemId(10, Normal), ItemId(11, Normal), ItemId(12, Normal), ItemId(13, Normal), ItemId(14, Normal), ItemId(15, Normal), ItemId(16, Normal), ItemId(17, Normal), ItemId(18, Normal), ItemId(19, Normal), ItemId(20, Normal), ItemId(21, Normal), ItemId(22, Normal), ItemId(23, Normal), ItemId(24, Normal), ItemId(ModuleEvaluation)]"]; N9["Items: [ItemId(8, VarDeclarator(0)), ItemId(9, Normal), ItemId(10, Normal), ItemId(11, Normal), ItemId(12, Normal), ItemId(13, Normal), ItemId(14, Normal), ItemId(15, Normal), ItemId(16, Normal), ItemId(17, Normal), ItemId(18, Normal), ItemId(19, Normal), ItemId(20, Normal), ItemId(21, Normal), ItemId(22, Normal), ItemId(23, Normal), ItemId(24, Normal)]"];
N10["Items: [ItemId(Export((&quot;IPC&quot;, #2), &quot;IPC&quot;))]"]; N10["Items: [ItemId(Export((&quot;IPC&quot;, #2), &quot;IPC&quot;))]"];
N11["Items: [ItemId(Export((&quot;structuredError&quot;, #2), &quot;structuredError&quot;))]"]; N11["Items: [ItemId(Export((&quot;structuredError&quot;, #2), &quot;structuredError&quot;))]"];
N2 --> N0; N2 --> N0;
N4 --> N2; N4 --> N2;
N9 -.-> N1; N9 -.-> N5;
N9 -.-> N3; N9 -.-> N3;
N11 --> N6; N11 --> N6;
N10 --> N7; N10 --> N7;
N6 --> N5; N6 --> N5;
N3 --> N2;
N5 --> N4; N5 --> N4;
N9 -.-> N6;
N7 -.-> N5; N7 -.-> N5;
N7 -.-> N3; N7 -.-> N3;
N7 --> N1; N7 --> N1;
...@@ -997,13 +988,13 @@ graph TD ...@@ -997,13 +988,13 @@ graph TD
N8 -.-> N3; N8 -.-> N3;
N8 -.-> N1; N8 -.-> N1;
N8 -.-> N6; N8 -.-> N6;
N9 -.-> N1;
N9 -.-> N6;
N7 --> N4; N7 --> N4;
N10 --> N8; N10 --> N8;
N1 --> N0;
N9 -.-> N5;
N9 --> N8; N9 --> N8;
N6 --> N3; N6 --> N3;
N3 --> N2; N1 --> N0;
``` ```
# Entrypoints # Entrypoints
...@@ -1281,16 +1272,16 @@ process.on("uncaughtException", (err)=>{ ...@@ -1281,16 +1272,16 @@ process.on("uncaughtException", (err)=>{
## Part 9 ## Part 9
```js ```js
import "__TURBOPACK_PART__" assert { import "__TURBOPACK_PART__" assert {
__turbopack_part__: 1 __turbopack_part__: 5
}; };
import "__TURBOPACK_PART__" assert { import "__TURBOPACK_PART__" assert {
__turbopack_part__: 3 __turbopack_part__: 3
}; };
import "__TURBOPACK_PART__" assert { import "__TURBOPACK_PART__" assert {
__turbopack_part__: 6 __turbopack_part__: 1
}; };
import "__TURBOPACK_PART__" assert { import "__TURBOPACK_PART__" assert {
__turbopack_part__: 5 __turbopack_part__: 6
}; };
import "__TURBOPACK_PART__" assert { import "__TURBOPACK_PART__" assert {
__turbopack_part__: 8 __turbopack_part__: 8
...@@ -1325,10 +1316,10 @@ improveConsole("timeEnd", "stdout", true); ...@@ -1325,10 +1316,10 @@ improveConsole("timeEnd", "stdout", true);
improveConsole("timeLog", "stdout", true); improveConsole("timeLog", "stdout", true);
improveConsole("timeStamp", "stdout", true); improveConsole("timeStamp", "stdout", true);
improveConsole("assert", "stderr", true); improveConsole("assert", "stderr", true);
"module evaluation";
export { improveConsole as h } from "__TURBOPACK_VAR__" assert { export { improveConsole as h } from "__TURBOPACK_VAR__" assert {
__turbopack_var__: true __turbopack_var__: true
}; };
export { };
``` ```
## Part 10 ## Part 10
...@@ -1363,16 +1354,16 @@ export { structuredError } from "__TURBOPACK_PART__" assert { ...@@ -1363,16 +1354,16 @@ export { structuredError } from "__TURBOPACK_PART__" assert {
## Merged (module eval) ## Merged (module eval)
```js ```js
import "__TURBOPACK_PART__" assert { import "__TURBOPACK_PART__" assert {
__turbopack_part__: 1 __turbopack_part__: 5
}; };
import "__TURBOPACK_PART__" assert { import "__TURBOPACK_PART__" assert {
__turbopack_part__: 3 __turbopack_part__: 3
}; };
import "__TURBOPACK_PART__" assert { import "__TURBOPACK_PART__" assert {
__turbopack_part__: 6 __turbopack_part__: 1
}; };
import "__TURBOPACK_PART__" assert { import "__TURBOPACK_PART__" assert {
__turbopack_part__: 5 __turbopack_part__: 6
}; };
import "__TURBOPACK_PART__" assert { import "__TURBOPACK_PART__" assert {
__turbopack_part__: 8 __turbopack_part__: 8
...@@ -1407,10 +1398,10 @@ improveConsole("timeEnd", "stdout", true); ...@@ -1407,10 +1398,10 @@ improveConsole("timeEnd", "stdout", true);
improveConsole("timeLog", "stdout", true); improveConsole("timeLog", "stdout", true);
improveConsole("timeStamp", "stdout", true); improveConsole("timeStamp", "stdout", true);
improveConsole("assert", "stderr", true); improveConsole("assert", "stderr", true);
"module evaluation";
export { improveConsole as h } from "__TURBOPACK_VAR__" assert { export { improveConsole as h } from "__TURBOPACK_VAR__" assert {
__turbopack_var__: true __turbopack_var__: true
}; };
export { };
``` ```
# Entrypoints # Entrypoints
...@@ -1703,10 +1694,10 @@ improveConsole("timeEnd", "stdout", true); ...@@ -1703,10 +1694,10 @@ improveConsole("timeEnd", "stdout", true);
improveConsole("timeLog", "stdout", true); improveConsole("timeLog", "stdout", true);
improveConsole("timeStamp", "stdout", true); improveConsole("timeStamp", "stdout", true);
improveConsole("assert", "stderr", true); improveConsole("assert", "stderr", true);
"module evaluation";
export { improveConsole as h } from "__TURBOPACK_VAR__" assert { export { improveConsole as h } from "__TURBOPACK_VAR__" assert {
__turbopack_var__: true __turbopack_var__: true
}; };
export { };
``` ```
## Part 10 ## Part 10
...@@ -1773,9 +1764,9 @@ improveConsole("timeEnd", "stdout", true); ...@@ -1773,9 +1764,9 @@ improveConsole("timeEnd", "stdout", true);
improveConsole("timeLog", "stdout", true); improveConsole("timeLog", "stdout", true);
improveConsole("timeStamp", "stdout", true); improveConsole("timeStamp", "stdout", true);
improveConsole("assert", "stderr", true); improveConsole("assert", "stderr", true);
"module evaluation";
export { improveConsole as h } from "__TURBOPACK_VAR__" assert { export { improveConsole as h } from "__TURBOPACK_VAR__" assert {
__turbopack_var__: true __turbopack_var__: true
}; };
export { };
``` ```
# Items # Items
Count: 8 Count: 7
## Item 1: Stmt 0, `VarDeclarator(0)` ## Item 1: Stmt 0, `VarDeclarator(0)`
...@@ -106,11 +106,9 @@ graph TD ...@@ -106,11 +106,9 @@ graph TD
Item4; Item4;
Item5; Item5;
Item6; Item6;
Item6["ModuleEvaluation"]; Item6["export wrapClientComponentLoader"];
Item7; Item7;
Item7["export wrapClientComponentLoader"]; Item7["export getClientComponentLoaderMetrics"];
Item8;
Item8["export getClientComponentLoaderMetrics"];
``` ```
# Phase 2 # Phase 2
```mermaid ```mermaid
...@@ -121,13 +119,11 @@ graph TD ...@@ -121,13 +119,11 @@ graph TD
Item4; Item4;
Item5; Item5;
Item6; Item6;
Item6["ModuleEvaluation"]; Item6["export wrapClientComponentLoader"];
Item7; Item7;
Item7["export wrapClientComponentLoader"]; Item7["export getClientComponentLoaderMetrics"];
Item8; Item6 --> Item4;
Item8["export getClientComponentLoaderMetrics"]; Item7 --> Item5;
Item7 --> Item4;
Item8 --> Item5;
``` ```
# Phase 3 # Phase 3
```mermaid ```mermaid
...@@ -138,13 +134,11 @@ graph TD ...@@ -138,13 +134,11 @@ graph TD
Item4; Item4;
Item5; Item5;
Item6; Item6;
Item6["ModuleEvaluation"]; Item6["export wrapClientComponentLoader"];
Item7; Item7;
Item7["export wrapClientComponentLoader"]; Item7["export getClientComponentLoaderMetrics"];
Item8; Item6 --> Item4;
Item8["export getClientComponentLoaderMetrics"]; Item7 --> Item5;
Item7 --> Item4;
Item8 --> Item5;
Item4 --> Item1; Item4 --> Item1;
Item4 --> Item3; Item4 --> Item3;
Item4 --> Item2; Item4 --> Item2;
...@@ -161,13 +155,11 @@ graph TD ...@@ -161,13 +155,11 @@ graph TD
Item4; Item4;
Item5; Item5;
Item6; Item6;
Item6["ModuleEvaluation"]; Item6["export wrapClientComponentLoader"];
Item7; Item7;
Item7["export wrapClientComponentLoader"]; Item7["export getClientComponentLoaderMetrics"];
Item8; Item6 --> Item4;
Item8["export getClientComponentLoaderMetrics"]; Item7 --> Item5;
Item7 --> Item4;
Item8 --> Item5;
Item4 --> Item1; Item4 --> Item1;
Item4 --> Item3; Item4 --> Item3;
Item4 --> Item2; Item4 --> Item2;
...@@ -183,7 +175,6 @@ graph TD ...@@ -183,7 +175,6 @@ graph TD
N2["Items: [ItemId(2, VarDeclarator(0))]"]; N2["Items: [ItemId(2, VarDeclarator(0))]"];
N3["Items: [ItemId(3, Normal), ItemId(Export((&quot;wrapClientComponentLoader&quot;, #2), &quot;wrapClientComponentLoader&quot;))]"]; N3["Items: [ItemId(3, Normal), ItemId(Export((&quot;wrapClientComponentLoader&quot;, #2), &quot;wrapClientComponentLoader&quot;))]"];
N4["Items: [ItemId(4, Normal), ItemId(Export((&quot;getClientComponentLoaderMetrics&quot;, #2), &quot;getClientComponentLoaderMetrics&quot;))]"]; N4["Items: [ItemId(4, Normal), ItemId(Export((&quot;getClientComponentLoaderMetrics&quot;, #2), &quot;getClientComponentLoaderMetrics&quot;))]"];
N5["Items: [ItemId(ModuleEvaluation)]"];
N4 --> N0; N4 --> N0;
N4 --> N2; N4 --> N2;
N3 --> N1; N3 --> N1;
...@@ -195,14 +186,14 @@ graph TD ...@@ -195,14 +186,14 @@ graph TD
``` ```
{ {
ModuleEvaluation: 5, ModuleEvaluation: 6,
Export( Export(
"getClientComponentLoaderMetrics", "getClientComponentLoaderMetrics",
): 4, ): 4,
Export( Export(
"wrapClientComponentLoader", "wrapClientComponentLoader",
): 3, ): 3,
Exports: 6, Exports: 5,
} }
``` ```
...@@ -309,11 +300,6 @@ export { getClientComponentLoaderMetrics as e } from "__TURBOPACK_VAR__" assert ...@@ -309,11 +300,6 @@ export { getClientComponentLoaderMetrics as e } from "__TURBOPACK_VAR__" assert
``` ```
## Part 5 ## Part 5
```js ```js
"module evaluation";
```
## Part 6
```js
export { wrapClientComponentLoader } from "__TURBOPACK_PART__" assert { export { wrapClientComponentLoader } from "__TURBOPACK_PART__" assert {
__turbopack_part__: "export wrapClientComponentLoader" __turbopack_part__: "export wrapClientComponentLoader"
}; };
...@@ -321,24 +307,29 @@ export { getClientComponentLoaderMetrics } from "__TURBOPACK_PART__" assert { ...@@ -321,24 +307,29 @@ export { getClientComponentLoaderMetrics } from "__TURBOPACK_PART__" assert {
__turbopack_part__: "export getClientComponentLoaderMetrics" __turbopack_part__: "export getClientComponentLoaderMetrics"
}; };
```
## Part 6
```js
export { };
``` ```
## Merged (module eval) ## Merged (module eval)
```js ```js
"module evaluation"; export { };
``` ```
# Entrypoints # Entrypoints
``` ```
{ {
ModuleEvaluation: 5, ModuleEvaluation: 6,
Export( Export(
"getClientComponentLoaderMetrics", "getClientComponentLoaderMetrics",
): 4, ): 4,
Export( Export(
"wrapClientComponentLoader", "wrapClientComponentLoader",
): 3, ): 3,
Exports: 6, Exports: 5,
} }
``` ```
...@@ -445,11 +436,6 @@ export { getClientComponentLoaderMetrics as e } from "__TURBOPACK_VAR__" assert ...@@ -445,11 +436,6 @@ export { getClientComponentLoaderMetrics as e } from "__TURBOPACK_VAR__" assert
``` ```
## Part 5 ## Part 5
```js ```js
"module evaluation";
```
## Part 6
```js
export { wrapClientComponentLoader } from "__TURBOPACK_PART__" assert { export { wrapClientComponentLoader } from "__TURBOPACK_PART__" assert {
__turbopack_part__: "export wrapClientComponentLoader" __turbopack_part__: "export wrapClientComponentLoader"
}; };
...@@ -457,9 +443,14 @@ export { getClientComponentLoaderMetrics } from "__TURBOPACK_PART__" assert { ...@@ -457,9 +443,14 @@ export { getClientComponentLoaderMetrics } from "__TURBOPACK_PART__" assert {
__turbopack_part__: "export getClientComponentLoaderMetrics" __turbopack_part__: "export getClientComponentLoaderMetrics"
}; };
```
## Part 6
```js
export { };
``` ```
## Merged (module eval) ## Merged (module eval)
```js ```js
"module evaluation"; export { };
``` ```
...@@ -6,7 +6,7 @@ var { g: global, __dirname } = __turbopack_context__; ...@@ -6,7 +6,7 @@ var { g: global, __dirname } = __turbopack_context__;
{ {
__turbopack_context__.v((parentImport) => { __turbopack_context__.v((parentImport) => {
return Promise.all([ return Promise.all([
"output/4c35f_tests_snapshot_basic-tree-shake_dynamic-import_input_lib_8debd8f1.js" "output/4c35f_tests_snapshot_basic-tree-shake_dynamic-import_input_lib_b2d8c81e.js"
].map((chunk) => __turbopack_context__.l(chunk))).then(() => { ].map((chunk) => __turbopack_context__.l(chunk))).then(() => {
return parentImport("[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic-tree-shake/dynamic-import/input/lib.js [test] (ecmascript)"); return parentImport("[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic-tree-shake/dynamic-import/input/lib.js [test] (ecmascript)");
}); });
......
(globalThis.TURBOPACK = globalThis.TURBOPACK || []).push([ (globalThis.TURBOPACK = globalThis.TURBOPACK || []).push([
"output/4c35f_tests_snapshot_basic-tree-shake_export-named_input_index_16de724d.js", "output/4c35f_tests_snapshot_basic-tree-shake_export-named_input_index_3fbfd0b0.js",
{}, {},
{"otherChunks":["output/b1abf_turbopack-tests_tests_snapshot_basic-tree-shake_export-named_input_8a727493._.js"],"runtimeModuleIds":["[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic-tree-shake/export-named/input/index.js [test] (ecmascript)"]} {"otherChunks":["output/b1abf_turbopack-tests_tests_snapshot_basic-tree-shake_export-named_input_3703679a._.js"],"runtimeModuleIds":["[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic-tree-shake/export-named/input/index.js [test] (ecmascript)"]}
]); ]);
// Dummy runtime // Dummy runtime
\ No newline at end of file
(globalThis.TURBOPACK = globalThis.TURBOPACK || []).push([ (globalThis.TURBOPACK = globalThis.TURBOPACK || []).push([
"output/4c35f_tests_snapshot_basic-tree-shake_export-namespace_input_index_92c69550.js", "output/4c35f_tests_snapshot_basic-tree-shake_export-namespace_input_index_1f26d7d9.js",
{}, {},
{"otherChunks":["output/b1abf_turbopack-tests_tests_snapshot_basic-tree-shake_export-namespace_input_c06df669._.js"],"runtimeModuleIds":["[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic-tree-shake/export-namespace/input/index.js [test] (ecmascript)"]} {"otherChunks":["output/b1abf_turbopack-tests_tests_snapshot_basic-tree-shake_export-namespace_input_b8f1ec03._.js"],"runtimeModuleIds":["[project]/turbopack/crates/turbopack-tests/tests/snapshot/basic-tree-shake/export-namespace/input/index.js [test] (ecmascript)"]}
]); ]);
// Dummy runtime // Dummy runtime
\ No newline at end of file
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