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

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

Issue 2430683003: Property extraction getters (tear-offs) are effect-free (Closed)
Patch Set: Created 4 years, 2 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: pkg/compiler/lib/src/ssa/nodes.dart
diff --git a/pkg/compiler/lib/src/ssa/nodes.dart b/pkg/compiler/lib/src/ssa/nodes.dart
index 1b06943251b20d45cd1608838019d5e6c55dcd0b..fd35edd45cdae5c9c61508d36502305c884a7ed6 100644
--- a/pkg/compiler/lib/src/ssa/nodes.dart
+++ b/pkg/compiler/lib/src/ssa/nodes.dart
@@ -1627,6 +1627,10 @@ class HInvokeDynamicGetter extends HInvokeDynamicField {
: super(selector, mask, element, inputs, type);
toString() => 'invoke dynamic getter: selector=$selector, mask=$mask';
accept(HVisitor visitor) => visitor.visitInvokeDynamicGetter(this);
+
+ bool get isTearOff => element != null && element.isFunction;
+
+ bool canThrow() => isTearOff ? inputs.last.canBeNull() : super.canThrow();
Siggi Cherem (dart-lang) 2016/10/18 23:26:02 inputs should be a single element right? maybe do
sra1 2016/10/19 02:16:57 There might be an interceptor, e.g [].add; 'getDa
}
class HInvokeDynamicSetter extends HInvokeDynamicField {

Powered by Google App Engine
This is Rietveld 408576698