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

Side by Side Diff: pkg/compiler/lib/src/common_elements.dart

Issue 3010943002: Add ability to look up type parameters that are associated with ClassEntities with the element envi… (Closed)
Patch Set: Created 3 years, 3 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) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 // TODO(sigmund): rename and move to common/elements.dart 5 // TODO(sigmund): rename and move to common/elements.dart
6 library dart2js.type_system; 6 library dart2js.type_system;
7 7
8 import 'common.dart'; 8 import 'common.dart';
9 import 'common/names.dart' show Identifiers, Uris; 9 import 'common/names.dart' show Identifiers, Uris;
10 import 'constants/values.dart'; 10 import 'constants/values.dart';
(...skipping 1330 matching lines...) Expand 10 before | Expand all | Expand 10 after
1341 1341
1342 /// Returns the type of [function]. 1342 /// Returns the type of [function].
1343 FunctionType getFunctionType(FunctionEntity function); 1343 FunctionType getFunctionType(FunctionEntity function);
1344 1344
1345 /// Returns the type of [field]. 1345 /// Returns the type of [field].
1346 DartType getFieldType(FieldEntity field); 1346 DartType getFieldType(FieldEntity field);
1347 1347
1348 /// Returns the type of the [local] function. 1348 /// Returns the type of the [local] function.
1349 FunctionType getLocalFunctionType(Local local); 1349 FunctionType getLocalFunctionType(Local local);
1350 1350
1351 /// Returns the set of type parameters associated with a given class entity.
1352 /// For example, for a class Foo, declared like this:
1353 ///
1354 /// class Foo<A, B>{}
1355 ///
1356 /// getTypeVariables would return a list containing the [DartType]s
1357 /// corresponding to A and B.
1358 List<DartType> getTypeVariables(ClassEntity cls);
Johnni Winther 2017/09/04 06:59:56 [getClassTypeVariables] is probably better since m
Emily Fortuna 2017/09/05 17:13:31 Done.
1359
1351 /// Gets the constant value of [field], or `null` if [field] is non-const. 1360 /// Gets the constant value of [field], or `null` if [field] is non-const.
1352 ConstantExpression getFieldConstant(FieldEntity field); 1361 ConstantExpression getFieldConstant(FieldEntity field);
1353 1362
1354 /// Returns the 'unaliased' type of [type]. For typedefs this is the function 1363 /// Returns the 'unaliased' type of [type]. For typedefs this is the function
1355 /// type it is an alias of, for other types it is the type itself. 1364 /// type it is an alias of, for other types it is the type itself.
1356 /// 1365 ///
1357 /// Use this during resolution to ensure that the alias has been computed. 1366 /// Use this during resolution to ensure that the alias has been computed.
1358 // TODO(johnniwinther): Remove this when the resolver is removed. 1367 // TODO(johnniwinther): Remove this when the resolver is removed.
1359 DartType getUnaliasedType(DartType type); 1368 DartType getUnaliasedType(DartType type);
1360 1369
(...skipping 10 matching lines...) Expand all
1371 /// Returns the metadata constants declared on [typedef]. 1380 /// Returns the metadata constants declared on [typedef].
1372 Iterable<ConstantValue> getTypedefMetadata(TypedefEntity typedef); 1381 Iterable<ConstantValue> getTypedefMetadata(TypedefEntity typedef);
1373 1382
1374 /// Returns the metadata constants declared on [member]. 1383 /// Returns the metadata constants declared on [member].
1375 Iterable<ConstantValue> getMemberMetadata(MemberEntity member, 1384 Iterable<ConstantValue> getMemberMetadata(MemberEntity member,
1376 {bool includeParameterMetadata: false}); 1385 {bool includeParameterMetadata: false});
1377 1386
1378 /// Returns the function type that is an alias of a [typedef]. 1387 /// Returns the function type that is an alias of a [typedef].
1379 FunctionType getFunctionTypeOfTypedef(TypedefEntity typedef); 1388 FunctionType getFunctionTypeOfTypedef(TypedefEntity typedef);
1380 } 1389 }
OLDNEW
« no previous file with comments | « no previous file | pkg/compiler/lib/src/kernel/element_map_impl.dart » ('j') | pkg/compiler/lib/src/kernel/element_map_impl.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698