mirror of
https://github.com/dart-lang/sdk
synced 2024-10-06 14:39:38 +00:00
Fix regression in deferred loading.
Ensure closures are not moved out of the main output unit accidentally. This was seen in a large app, I haven't yet come up with a small repro for our unit tests. Change-Id: Ie1d4b3b5396eeeb41528e355c7f0d4abdfca7154 Reviewed-on: https://dart-review.googlesource.com/57521 Reviewed-by: Stephen Adams <sra@google.com> Commit-Queue: Sigmund Cherem <sigmund@google.com>
This commit is contained in:
parent
2911f1f107
commit
fa9ff9a061
|
@ -522,8 +522,13 @@ abstract class DeferredLoadTask extends CompilerTask {
|
|||
for (Local localFunction in dependencies.localFunctions) {
|
||||
// Local function are not updated recursively because the dependencies are
|
||||
// already visited as dependencies of the enclosing member, so we just
|
||||
// assign the [newSet] to each local function.
|
||||
_localFunctionToSet[localFunction] = newSet;
|
||||
// assign the [newSet] to each local function that is not already assigned
|
||||
// to the main output unit.
|
||||
ImportSet currentSet = _localFunctionToSet[localFunction];
|
||||
if (currentSet != newSet && currentSet != importSets.mainSet) {
|
||||
assert(currentSet == oldSet);
|
||||
_localFunctionToSet[localFunction] = newSet;
|
||||
}
|
||||
}
|
||||
|
||||
for (ConstantValue dependency in dependencies.constants) {
|
||||
|
|
Loading…
Reference in a new issue