| Index: pkg/front_end/lib/src/fasta/kernel/kernel_target.dart
|
| diff --git a/pkg/front_end/lib/src/fasta/kernel/kernel_target.dart b/pkg/front_end/lib/src/fasta/kernel/kernel_target.dart
|
| index b7ec22eb16116749c8b57b6734065754180da33f..0b3215cc0bf5eda13cd987647149a53e229993ca 100644
|
| --- a/pkg/front_end/lib/src/fasta/kernel/kernel_target.dart
|
| +++ b/pkg/front_end/lib/src/fasta/kernel/kernel_target.dart
|
| @@ -98,7 +98,7 @@ class KernelTarget extends TargetImplementation {
|
| final Map<String, Source> uriToSource;
|
|
|
| SourceLoader<Library> loader;
|
| - Program _program;
|
| + Program program;
|
|
|
| final List<String> errors = <String>[];
|
|
|
| @@ -223,7 +223,7 @@ class KernelTarget extends TargetImplementation {
|
| print(message);
|
| errors.add(message);
|
| }
|
| - _program = erroneousProgram(isFullProgram);
|
| + program = erroneousProgram(isFullProgram);
|
| }
|
|
|
| @override
|
| @@ -245,9 +245,9 @@ class KernelTarget extends TargetImplementation {
|
| installDefaultConstructors(sourceClasses);
|
| loader.resolveConstructors();
|
| loader.finishTypeVariables(objectClassBuilder);
|
| - _program =
|
| + program =
|
| link(new List<Library>.from(loader.libraries), nameRoot: nameRoot);
|
| - loader.computeHierarchy(_program);
|
| + loader.computeHierarchy(program);
|
| loader.checkOverrides(sourceClasses);
|
| loader.prepareInitializerInference();
|
| loader.performInitializerInference();
|
| @@ -256,7 +256,7 @@ class KernelTarget extends TargetImplementation {
|
| } catch (e, s) {
|
| return reportCrash(e, s, loader?.currentUriForCrashReporting);
|
| }
|
| - return _program;
|
| + return program;
|
| }
|
|
|
| /// Build the kernel representation of the program loaded by this target. The
|
| @@ -278,7 +278,7 @@ class KernelTarget extends TargetImplementation {
|
| handleInputError(null,
|
| isFullProgram: true, trimDependencies: trimDependencies);
|
| if (trimDependencies) trimDependenciesInProgram();
|
| - return _program;
|
| + return program;
|
| }
|
|
|
| try {
|
| @@ -301,7 +301,7 @@ class KernelTarget extends TargetImplementation {
|
| return reportCrash(e, s, loader?.currentUriForCrashReporting);
|
| }
|
| if (trimDependencies) trimDependenciesInProgram();
|
| - return _program;
|
| + return program;
|
| }
|
|
|
| Future writeDepsFile(Uri output, Uri depsFile,
|
| @@ -660,29 +660,29 @@ class KernelTarget extends TargetImplementation {
|
| }
|
|
|
| void transformMixinApplications() {
|
| - new MixinFullResolution(backendTarget).transform(_program);
|
| + new MixinFullResolution(backendTarget).transform(program);
|
| ticker.logMs("Transformed mixin applications");
|
| }
|
|
|
| void otherTransformations() {
|
| // TODO(ahe): Don't generate type variables in the first place.
|
| if (!strongMode) {
|
| - _program.accept(new Erasure());
|
| + program.accept(new Erasure());
|
| ticker.logMs("Erased type variables in generic methods");
|
| }
|
| // TODO(kmillikin): Make this run on a per-method basis.
|
| - transformAsync.transformProgram(_program);
|
| + transformAsync.transformProgram(program);
|
| ticker.logMs("Transformed async methods");
|
| }
|
|
|
| void verify() {
|
| - var verifyErrors = verifyProgram(_program);
|
| + var verifyErrors = verifyProgram(program);
|
| errors.addAll(verifyErrors.map((error) => '$error'));
|
| ticker.logMs("Verified program");
|
| }
|
|
|
| /// Tree-shakes most code from the [dillTarget] by visiting all other
|
| - /// libraries in [_program] and marking the APIs from the [dillTarget]
|
| + /// libraries in [program] and marking the APIs from the [dillTarget]
|
| /// libraries that are in use.
|
| trimDependenciesInProgram() {
|
| var toShake =
|
| @@ -692,8 +692,8 @@ class KernelTarget extends TargetImplementation {
|
| // TODO(sigmund): replace this step with data that is directly computed from
|
| // the builders: we should know the tree-shaking roots without having to do
|
| // a second visit over the tree.
|
| - new RootsMarker(data).run(_program, isIncluded);
|
| - trimProgram(_program, data, isIncluded);
|
| + new RootsMarker(data).run(program, isIncluded);
|
| + trimProgram(program, data, isIncluded);
|
| }
|
|
|
| /// Return `true` if the given [library] was built by this [KernelTarget]
|
|
|