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

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

Issue 1299413002: Move common identifiers, names and selectors to a separate library. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Updated cf. comments. Created 5 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
« no previous file with comments | « pkg/compiler/lib/src/elements/elements.dart ('k') | pkg/compiler/lib/src/inferrer/closure_tracer.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/enqueue.dart
diff --git a/pkg/compiler/lib/src/enqueue.dart b/pkg/compiler/lib/src/enqueue.dart
index ff96d8b3c2e592dd5508e22634092e84a0740317..7be81f2bbd6a1703becbfcec01670be0900fa543 100644
--- a/pkg/compiler/lib/src/enqueue.dart
+++ b/pkg/compiler/lib/src/enqueue.dart
@@ -7,6 +7,8 @@ library dart2js.enqueue;
import 'dart:collection' show
Queue;
+import 'common/names.dart' show
+ Identifiers;
import 'common/work.dart' show
ItemCompilationContext,
WorkItem;
@@ -42,6 +44,7 @@ import 'elements/elements.dart' show
Member,
MemberElement,
MethodElement,
+ Name,
TypedElement,
TypedefElement;
import 'js/js.dart' as js;
@@ -246,10 +249,10 @@ abstract class Enqueuer {
} else if (member.isFunction) {
FunctionElement function = member;
function.computeType(compiler);
- if (function.name == Compiler.NO_SUCH_METHOD) {
+ if (function.name == Identifiers.noSuchMethod_) {
registerNoSuchMethod(function);
}
- if (function.name == Compiler.CALL_OPERATOR_NAME &&
+ if (function.name == Identifiers.call &&
!cls.typeVariables.isEmpty) {
registerCallMethodWithFreeTypeVariables(
function, compiler.globalDependencies);
@@ -411,7 +414,8 @@ abstract class Enqueuer {
registerSelectorUse(selector);
if (element.isField) {
UniverseSelector selector = new UniverseSelector(
- new Selector.setter(element.name, element.library), null);
+ new Selector.setter(new Name(
+ element.name, element.library, isSetter: true)), null);
registerInvokedSetter(selector);
}
}
@@ -820,7 +824,7 @@ class ResolutionEnqueuer extends Enqueuer {
}
}
- if (element.isGetter && element.name == Compiler.RUNTIME_TYPE) {
+ if (element.isGetter && element.name == Identifiers.runtimeType_) {
// Enable runtime type support if we discover a getter called runtimeType.
// We have to enable runtime type before hitting the codegen, so
// that constructors know whether they need to generate code for
« no previous file with comments | « pkg/compiler/lib/src/elements/elements.dart ('k') | pkg/compiler/lib/src/inferrer/closure_tracer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698