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

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

Issue 1570813003: dart2js cps: Fix for tear-off of noSuchMethod or toString on null. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Fix Created 4 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 | « no previous file | pkg/compiler/lib/src/cps_ir/optimizers.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/common/names.dart
diff --git a/pkg/compiler/lib/src/common/names.dart b/pkg/compiler/lib/src/common/names.dart
index f777c0a9f6a0496d00a03c5a2ea625a61fdbd1f7..70ebabe33ffec12aa358701972e92acbdffbb71a 100644
--- a/pkg/compiler/lib/src/common/names.dart
+++ b/pkg/compiler/lib/src/common/names.dart
@@ -97,10 +97,18 @@ class Selectors {
static final Selector noSuchMethod_ =
new Selector.call(Names.noSuchMethod_, CallStructure.ONE_ARG);
+ /// The selector for tearing off noSuchMethod.
+ static final Selector noSuchMethodGetter =
+ new Selector.getter(Names.noSuchMethod_);
+
/// The selector for calling the to-string method on 'Object'.
static final Selector toString_ =
new Selector.call(Names.toString_, CallStructure.NO_ARGS);
+ /// The selector for tearing off toString.
+ static final Selector toStringGetter =
+ new Selector.getter(Names.toString_);
+
static final Selector hashCode_ =
new Selector.getter(const PublicName('hashCode'));
@@ -123,8 +131,9 @@ class Selectors {
/// These objects are shared between different runs in batch-mode and must
/// thus remain in the [Selector.canonicalizedValues] map.
static final List<Selector> ALL = <Selector>[
- cancel, current, iterator, moveNext, noSuchMethod_, toString_,
- hashCode_, compareTo, equals, length, codeUnitAt, index, runtimeType_];
+ cancel, current, iterator, moveNext, noSuchMethod_, noSuchMethodGetter,
+ toString_, toStringGetter, hashCode_, compareTo, equals, length,
+ codeUnitAt, index, runtimeType_];
}
/// [Uri]s commonly used.
« no previous file with comments | « no previous file | pkg/compiler/lib/src/cps_ir/optimizers.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698