| Index: pkg/compiler/lib/src/kernel/world_builder.dart
|
| diff --git a/pkg/compiler/lib/src/kernel/world_builder.dart b/pkg/compiler/lib/src/kernel/world_builder.dart
|
| index 38391d7351edbb177faa59e9f957370a07a4b748..f329a24c6cd3dadfa447320f068640935d5b0dd7 100644
|
| --- a/pkg/compiler/lib/src/kernel/world_builder.dart
|
| +++ b/pkg/compiler/lib/src/kernel/world_builder.dart
|
| @@ -78,6 +78,18 @@ class KernelWorldBuilder extends KernelElementAdapterMixin {
|
| _typeConverter = new DartTypeConverter(this);
|
| }
|
|
|
| + KMethod get _mainFunction {
|
| + return _env.program.mainMethod != null
|
| + ? _getMethod(_env.program.mainMethod)
|
| + : null;
|
| + }
|
| +
|
| + KLibrary get _mainLibrary {
|
| + return _env.program.mainMethod != null
|
| + ? _getLibrary(_env.program.mainMethod.enclosingLibrary)
|
| + : null;
|
| + }
|
| +
|
| @override
|
| CommonElements get commonElements => _commonElements;
|
|
|
| @@ -488,6 +500,12 @@ class KernelElementEnvironment implements ElementEnvironment {
|
| KernelElementEnvironment(this.worldBuilder);
|
|
|
| @override
|
| + LibraryEntity get mainLibrary => worldBuilder._mainLibrary;
|
| +
|
| + @override
|
| + FunctionEntity get mainFunction => worldBuilder._mainFunction;
|
| +
|
| + @override
|
| InterfaceType getThisType(ClassEntity cls) {
|
| return worldBuilder._getThisType(cls);
|
| }
|
|
|