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

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

Issue 2970943002: Use index in J/KTypeVariable and fix remaining inequivalence (Closed)
Patch Set: Fix 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
« no previous file with comments | « pkg/compiler/lib/src/kernel/elements.dart ('k') | pkg/compiler/lib/src/ssa/builder.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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';
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 {bool isStatic, this.isAssignable, this.isConst}) 222 {bool isStatic, this.isAssignable, this.isConst})
223 : super(memberIndex, library, enclosingClass, name, isStatic: isStatic); 223 : super(memberIndex, library, enclosingClass, name, isStatic: isStatic);
224 224
225 @override 225 @override
226 bool get isField => true; 226 bool get isField => true;
227 227
228 String get _kind => 'field'; 228 String get _kind => 'field';
229 } 229 }
230 230
231 class KTypeVariable implements TypeVariableEntity, IndexedTypeVariable { 231 class KTypeVariable implements TypeVariableEntity, IndexedTypeVariable {
232 final int typeVariableIndex;
232 final Entity typeDeclaration; 233 final Entity typeDeclaration;
233 final String name; 234 final String name;
234 final int index; 235 final int index;
235 236
236 KTypeVariable(this.typeDeclaration, this.name, this.index); 237 KTypeVariable(
238 this.typeVariableIndex, this.typeDeclaration, this.name, this.index);
237 239
238 String toString() => 240 String toString() =>
239 '${kElementPrefix}type_variable(${typeDeclaration.name}.$name)'; 241 '${kElementPrefix}type_variable(${typeDeclaration.name}.$name)';
240 } 242 }
241 243
242 class KLocalFunction implements Local { 244 class KLocalFunction implements Local {
243 final String name; 245 final String name;
244 final MemberEntity memberContext; 246 final MemberEntity memberContext;
245 final Entity executableContext; 247 final Entity executableContext;
246 final FunctionType functionType; 248 final FunctionType functionType;
247 249
248 KLocalFunction( 250 KLocalFunction(
249 this.name, this.memberContext, this.executableContext, this.functionType); 251 this.name, this.memberContext, this.executableContext, this.functionType);
250 252
251 String toString() => 253 String toString() =>
252 '${kElementPrefix}local_function(${memberContext.name}.${name ?? '<anonymo us>'})'; 254 '${kElementPrefix}local_function(${memberContext.name}.${name ?? '<anonymo us>'})';
253 } 255 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/kernel/elements.dart ('k') | pkg/compiler/lib/src/ssa/builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698