Skip to content

Commit e94de78

Browse files
srujzsCommit Queue
authored andcommitted
[ddc] Remove statements from the Fun returned by buildFunctionWithImports
This list of statements is intended to support additional statements that need to be emitted to handle imports/exports. For the incremental case, no non-import statements exist and can be safely omitted from the body. We should be intentional about including these if needed later to avoid accidentally including unnecessary statements. Change-Id: I726bb9e980d43c1edd1d0bda2d9be897586638ea Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/393163 Reviewed-by: Nicholas Shahan <[email protected]> Commit-Queue: Srujan Gaddam <[email protected]>
1 parent 09550b3 commit e94de78

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pkg/dev_compiler/lib/src/compiler/module_builder.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ class DdcModuleBuilder extends _ModuleBuilder {
259259

260260
return Fun(
261261
function.params,
262-
Block([...importStatements, ...statements, ...function.body.statements]),
262+
Block([...importStatements, ...function.body.statements]),
263263
);
264264
}
265265

@@ -429,7 +429,7 @@ class AmdModuleBuilder extends _ModuleBuilder {
429429

430430
return Fun(
431431
function.params,
432-
Block([...importStatements, ...statements, ...function.body.statements]),
432+
Block([...importStatements, ...function.body.statements]),
433433
);
434434
}
435435

@@ -518,7 +518,7 @@ class DdcLibraryBundleBuilder extends _ModuleBuilder {
518518

519519
return Fun(
520520
function.params,
521-
Block([...importStatements, ...statements, ...function.body.statements]),
521+
Block([...importStatements, ...function.body.statements]),
522522
);
523523
}
524524

0 commit comments

Comments
 (0)