[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 <nshahan@google.com> Commit-Queue: Srujan Gaddam <srujzs@google.com>
This commit is contained in:
committed by
Commit Queue
parent
09550b33fc
commit
e94de78d2b
@@ -259,7 +259,7 @@ class DdcModuleBuilder extends _ModuleBuilder {
|
||||
|
||||
return Fun(
|
||||
function.params,
|
||||
Block([...importStatements, ...statements, ...function.body.statements]),
|
||||
Block([...importStatements, ...function.body.statements]),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -429,7 +429,7 @@ class AmdModuleBuilder extends _ModuleBuilder {
|
||||
|
||||
return Fun(
|
||||
function.params,
|
||||
Block([...importStatements, ...statements, ...function.body.statements]),
|
||||
Block([...importStatements, ...function.body.statements]),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -518,7 +518,7 @@ class DdcLibraryBundleBuilder extends _ModuleBuilder {
|
||||
|
||||
return Fun(
|
||||
function.params,
|
||||
Block([...importStatements, ...statements, ...function.body.statements]),
|
||||
Block([...importStatements, ...function.body.statements]),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user