| 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 cd4d70365c57b9832982092b3fb9c628bef296a7..d7360e72a5a7923f52b1a6998265b3884d000173 100644
|
| --- a/pkg/compiler/lib/src/kernel/world_builder.dart
|
| +++ b/pkg/compiler/lib/src/kernel/world_builder.dart
|
| @@ -60,8 +60,13 @@ class KernelWorldBuilder extends KernelElementAdapterMixin {
|
| KLibrary _getLibrary(ir.Library node, [KLibraryEnv libraryEnv]) {
|
| return _libraryMap.putIfAbsent(node, () {
|
| _libraryEnvs.add(libraryEnv ?? _env.lookupLibrary(node.importUri));
|
| - return new KLibrary(_libraryMap.length, node.name ?? '${node.importUri}',
|
| - node.name ?? node.fileUri ?? '${node.importUri}');
|
| + String name = node.name;
|
| + if (name == null) {
|
| + // Use the file name as script name.
|
| + String path = node.importUri.path;
|
| + name = path.substring(path.lastIndexOf('/') + 1);
|
| + }
|
| + return new KLibrary(_libraryMap.length, name);
|
| });
|
| }
|
|
|
|
|