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

Unified Diff: lib/compiler/implementation/js_backend/emitter.dart

Issue 10854158: Make selector registration in the resolver and code generator more explicit. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Merge from master. Created 8 years, 4 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: lib/compiler/implementation/js_backend/emitter.dart
diff --git a/lib/compiler/implementation/js_backend/emitter.dart b/lib/compiler/implementation/js_backend/emitter.dart
index a68b0d84375af87fbeba793d57210a3abc24b2fa..aa64cd873ab237454ccc4a199d9bfa8f7380d103 100644
--- a/lib/compiler/implementation/js_backend/emitter.dart
+++ b/lib/compiler/implementation/js_backend/emitter.dart
@@ -685,7 +685,7 @@ function(collectedClasses) {
// create a fake element with the correct name.
// Note: the callElement will not have any enclosingElement.
FunctionElement callElement =
- new ClosureInvocationElement(namer.CLOSURE_INVOCATION_NAME, element);
+ new ClosureInvocationElement(Namer.CLOSURE_INVOCATION_NAME, element);
String staticName = namer.getName(element);
int parameterCount = element.parameterCount(compiler);
String invocationName =
@@ -753,7 +753,7 @@ $classesCollector.$mangledName = {'':
// its stubs we simply create a fake element with the correct name.
// Note: the callElement will not have any enclosingElement.
FunctionElement callElement =
- new ClosureInvocationElement(namer.CLOSURE_INVOCATION_NAME, member);
+ new ClosureInvocationElement(Namer.CLOSURE_INVOCATION_NAME, member);
String invocationName =
namer.instanceMethodName(member.getLibrary(),
@@ -805,7 +805,7 @@ $classesCollector.$mangledName = {'':
String invocationName =
namer.instanceMethodInvocationName(member.getLibrary(), member.name,
selector);
- SourceString callName = namer.CLOSURE_INVOCATION_NAME;
+ SourceString callName = Namer.CLOSURE_INVOCATION_NAME;
String closureCallName =
namer.instanceMethodInvocationName(member.getLibrary(), callName,
selector);
@@ -1017,13 +1017,13 @@ $classesCollector.$mangledName = {'':
for (LibraryElement lib in libraries) {
String jsName = null;
String methodName = null;
- if (selector.kind === SelectorKind.GETTER) {
+ if (selector.isGetter()) {
jsName = namer.getterName(lib, name);
methodName = 'get:$nameString';
- } else if (selector.kind === SelectorKind.SETTER) {
+ } else if (selector.isSetter()) {
jsName = namer.setterName(lib, name);
methodName = 'set:$nameString';
- } else if (selector.kind === SelectorKind.INVOCATION) {
+ } else if (selector.isCall()) {
jsName = namer.instanceMethodInvocationName(lib, name, selector);
methodName = nameString;
} else {
@@ -1054,7 +1054,7 @@ $classesCollector.$mangledName = {'':
// Since we pass the closurized version of the main method to
// the isolate method, we must make sure that it exists.
if (!compiler.codegenWorld.staticFunctionsNeedingGetter.contains(appMain)) {
- Selector selector = new Selector.callAny(0);
+ Selector selector = new Selector.callClosure(0);
String invocationName = "${namer.closureInvocationName(selector)}";
mainEnsureGetter = "$mainAccess.$invocationName = $mainAccess";
}

Powered by Google App Engine
This is Rietveld 408576698