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

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

Issue 2929643002: Introduce JsStrategy skeleton (Closed)
Patch Set: Updated cf. comments Created 3 years, 6 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 | « no previous file | pkg/compiler/lib/src/js_model/elements.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/common_elements.dart
diff --git a/pkg/compiler/lib/src/common_elements.dart b/pkg/compiler/lib/src/common_elements.dart
index 7ec4c139ae4cdba56908fbb5e2c20eaf80c24ade..16267ecc70d016070e468f8b4eae147f89c1482a 100644
--- a/pkg/compiler/lib/src/common_elements.dart
+++ b/pkg/compiler/lib/src/common_elements.dart
@@ -159,10 +159,9 @@ class CommonElements {
/// Whether [element] is the same as [symbolConstructor]. Used to check
/// for the constructor without computing it until it is likely to be seen.
- // TODO(johnniwinther): Change type of [e] to [MemberEntity].
- bool isSymbolConstructor(Entity e) {
- return e == symbolConstructorTarget ||
- e == _findConstructor(symbolClass, '', required: false);
+ bool isSymbolConstructor(ConstructorEntity element) {
+ return element == symbolConstructorTarget ||
+ element == _findConstructor(symbolClass, '', required: false);
}
/// The `MirrorSystem` class in dart:mirrors.
@@ -333,16 +332,12 @@ class CommonElements {
}
/// Returns `true` if [element] is a superclass of `String` or `num`.
- // TODO(johnniwinther): Change types to `ClassEntity` when these are not
- // called with unrelated elements.
- bool isNumberOrStringSupertype(/*Class*/ Entity element) {
+ bool isNumberOrStringSupertype(ClassEntity element) {
return element == _findClass(coreLibrary, 'Comparable', required: false);
}
/// Returns `true` if [element] is a superclass of `String`.
- // TODO(johnniwinther): Change types to `ClassEntity` when these are not
- // called with unrelated elements.
- bool isStringOnlySupertype(/*Class*/ Entity element) {
+ bool isStringOnlySupertype(ClassEntity element) {
return element == _findClass(coreLibrary, 'Pattern', required: false);
}
« no previous file with comments | « no previous file | pkg/compiler/lib/src/js_model/elements.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698