| OLD | NEW |
| 1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 /// Entity model for elements derived from Kernel IR. | 5 /// Entity model for elements derived from Kernel IR. |
| 6 | 6 |
| 7 import '../elements/elements.dart'; | 7 import '../elements/elements.dart'; |
| 8 import '../elements/entities.dart'; | 8 import '../elements/entities.dart'; |
| 9 | 9 |
| 10 class KLibrary implements LibraryEntity { | 10 class KLibrary implements LibraryEntity { |
| 11 /// Library index used for fast lookup in [KernelWorldBuilder]. | 11 /// Library index used for fast lookup in [KernelWorldBuilder]. |
| 12 final int libraryIndex; | 12 final int libraryIndex; |
| 13 final String name; | 13 final String name; |
| 14 final String libraryName; | |
| 15 | 14 |
| 16 KLibrary(this.libraryIndex, this.name, this.libraryName); | 15 KLibrary(this.libraryIndex, this.name); |
| 17 | 16 |
| 18 String toString() => 'library($name)'; | 17 String toString() => 'library($name)'; |
| 19 } | 18 } |
| 20 | 19 |
| 21 class KClass implements ClassEntity { | 20 class KClass implements ClassEntity { |
| 22 /// Class index used for fast lookup in [KernelWorldBuilder]. | 21 /// Class index used for fast lookup in [KernelWorldBuilder]. |
| 23 final int classIndex; | 22 final int classIndex; |
| 24 final String name; | 23 final String name; |
| 25 | 24 |
| 26 KClass(this.classIndex, this.name); | 25 KClass(this.classIndex, this.name); |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 177 class KLocalFunction implements Local { | 176 class KLocalFunction implements Local { |
| 178 final String name; | 177 final String name; |
| 179 final MemberEntity memberContext; | 178 final MemberEntity memberContext; |
| 180 final Entity executableContext; | 179 final Entity executableContext; |
| 181 | 180 |
| 182 KLocalFunction(this.name, this.memberContext, this.executableContext); | 181 KLocalFunction(this.name, this.memberContext, this.executableContext); |
| 183 | 182 |
| 184 String toString() => | 183 String toString() => |
| 185 'local_function(${memberContext.name}.${name ?? '<anonymous>'})'; | 184 'local_function(${memberContext.name}.${name ?? '<anonymous>'})'; |
| 186 } | 185 } |
| OLD | NEW |