Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(992)

Side by Side Diff: pkg/compiler/lib/src/kernel/kelements.dart

Issue 2975433002: Assert that we don't mix K and J elements (Closed)
Patch Set: Updated cf. comments Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/entities.dart'; 7 import '../elements/entities.dart';
8 import '../elements/names.dart'; 8 import '../elements/names.dart';
9 import '../elements/types.dart'; 9 import '../elements/types.dart';
10 import 'elements.dart'; 10 import 'elements.dart';
11 11
12 const String kElementPrefix = 'k'; 12 const String kElementPrefix = 'k:';
13 13
14 class KLibrary implements IndexedLibrary { 14 class KLibrary implements IndexedLibrary {
15 /// Library index used for fast lookup in [KernelWorldBuilder]. 15 /// Library index used for fast lookup in [KernelWorldBuilder].
16 final int libraryIndex; 16 final int libraryIndex;
17 final String name; 17 final String name;
18 final Uri canonicalUri; 18 final Uri canonicalUri;
19 19
20 KLibrary(this.libraryIndex, this.name, this.canonicalUri); 20 KLibrary(this.libraryIndex, this.name, this.canonicalUri);
21 21
22 String toString() => '${kElementPrefix}library($name)'; 22 String toString() => '${kElementPrefix}library($name)';
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 final MemberEntity memberContext; 246 final MemberEntity memberContext;
247 final Entity executableContext; 247 final Entity executableContext;
248 final FunctionType functionType; 248 final FunctionType functionType;
249 249
250 KLocalFunction( 250 KLocalFunction(
251 this.name, this.memberContext, this.executableContext, this.functionType); 251 this.name, this.memberContext, this.executableContext, this.functionType);
252 252
253 String toString() => 253 String toString() =>
254 '${kElementPrefix}local_function(${memberContext.name}.${name ?? '<anonymo us>'})'; 254 '${kElementPrefix}local_function(${memberContext.name}.${name ?? '<anonymo us>'})';
255 } 255 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/kernel/element_map_impl.dart ('k') | pkg/compiler/lib/src/kernel/kernel_strategy.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698