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

Unified Diff: pkg/kernel/lib/transformations/method_call.dart

Issue 2712983002: Add LookupTable class for finding classes and members by name.
Patch Set: Created 3 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: pkg/kernel/lib/transformations/method_call.dart
diff --git a/pkg/kernel/lib/transformations/method_call.dart b/pkg/kernel/lib/transformations/method_call.dart
index c07a4608e32a6b0d9cd454ac895ce89205890b05..59581a93a1021b64806c94a7bc1831a361a6e759 100644
--- a/pkg/kernel/lib/transformations/method_call.dart
+++ b/pkg/kernel/lib/transformations/method_call.dart
@@ -888,7 +888,7 @@ class MethodCallTransformer extends Transformer {
ConstructorInvocation _createInvocation(
String methodName, Arguments callArguments) {
if (_invocationMirrorConstructor == null) {
- Class clazz = coreTypes.getCoreClass('dart:core', '_InvocationMirror');
+ Class clazz = coreTypes.getClass('dart:core', '_InvocationMirror');
_invocationMirrorConstructor = clazz.constructors[0];
}
@@ -932,10 +932,7 @@ class MethodCallTransformer extends Transformer {
/// Create a fixed length list containing given expressions.
Expression _fixedLengthList(List<Expression> list) {
- if (_listFrom == null) {
- Class clazz = coreTypes.getCoreClass('dart:core', 'List');
- _listFrom = clazz.procedures.firstWhere((c) => c.name.name == "from");
- }
+ _listFrom ??= coreTypes.getMember('dart:core', 'List', 'from');
return new StaticInvocation(
_listFrom,
new Arguments([new ListLiteral(list)],
« no previous file with comments | « pkg/kernel/lib/transformations/continuation.dart ('k') | pkg/kernel/lib/transformations/mixin_full_resolution.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698