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

Unified Diff: pkg/compiler/lib/src/compiler.dart

Issue 868643002: Revert "Change signature of lookupConstructor to only require a name." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 11 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
« no previous file with comments | « pkg/compiler/lib/src/compile_time_constants.dart ('k') | pkg/compiler/lib/src/elements/elements.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/compiler.dart
diff --git a/pkg/compiler/lib/src/compiler.dart b/pkg/compiler/lib/src/compiler.dart
index a74c45baee9f64fc956f56bf25b050437080822a..19fba4a53261a32e10354a9f31356e208b16d5e8 100644
--- a/pkg/compiler/lib/src/compiler.dart
+++ b/pkg/compiler/lib/src/compiler.dart
@@ -920,7 +920,6 @@ abstract class Compiler implements DiagnosticListener {
static const int NO_SUCH_METHOD_ARG_COUNT = 1;
static const String CREATE_INVOCATION_MIRROR =
'createInvocationMirror';
- static const String FROM_ENVIRONMENT = 'fromEnvironment';
static const String RUNTIME_TYPE = 'runtimeType';
@@ -937,6 +936,8 @@ abstract class Compiler implements DiagnosticListener {
Compiler.NO_SUCH_METHOD, null, Compiler.NO_SUCH_METHOD_ARG_COUNT);
final Selector symbolValidatedConstructorSelector = new Selector.call(
'validated', null, 1);
+ final Selector fromEnvironmentSelector = new Selector.callConstructor(
+ 'fromEnvironment', null, 2);
bool enabledNoSuchMethod = false;
bool enabledRuntimeType = false;
@@ -1359,17 +1360,16 @@ abstract class Compiler implements DiagnosticListener {
symbolConstructor = cls.constructors.head;
} else if (symbolImplementationClass == cls) {
symbolValidatedConstructor = symbolImplementationClass.lookupConstructor(
- symbolValidatedConstructorSelector.name);
+ symbolValidatedConstructorSelector);
} else if (mirrorsUsedClass == cls) {
mirrorsUsedConstructor = cls.constructors.head;
} else if (intClass == cls) {
- intEnvironment = intClass.lookupConstructor(FROM_ENVIRONMENT);
+ intEnvironment = intClass.lookupConstructor(fromEnvironmentSelector);
} else if (stringClass == cls) {
stringEnvironment =
- stringClass.lookupConstructor(FROM_ENVIRONMENT);
+ stringClass.lookupConstructor(fromEnvironmentSelector);
} else if (boolClass == cls) {
- boolEnvironment =
- boolClass.lookupConstructor(FROM_ENVIRONMENT);
+ boolEnvironment = boolClass.lookupConstructor(fromEnvironmentSelector);
}
}
@@ -1407,13 +1407,19 @@ abstract class Compiler implements DiagnosticListener {
Element _unnamedListConstructor;
Element get unnamedListConstructor {
if (_unnamedListConstructor != null) return _unnamedListConstructor;
- return _unnamedListConstructor = listClass.lookupDefaultConstructor();
+ Selector callConstructor = new Selector.callConstructor(
+ "", listClass.library);
+ return _unnamedListConstructor =
+ listClass.lookupConstructor(callConstructor);
}
Element _filledListConstructor;
Element get filledListConstructor {
if (_filledListConstructor != null) return _filledListConstructor;
- return _filledListConstructor = listClass.lookupConstructor("filled");
+ Selector callConstructor = new Selector.callConstructor(
+ "filled", listClass.library);
+ return _filledListConstructor =
+ listClass.lookupConstructor(callConstructor);
}
/**
« no previous file with comments | « pkg/compiler/lib/src/compile_time_constants.dart ('k') | pkg/compiler/lib/src/elements/elements.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698