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

Unified Diff: pkg/compiler/lib/src/cps_ir/builtin_operator.dart

Issue 1645053002: dart2js cps: Refactor tracking of side effects. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Clarification 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
Index: pkg/compiler/lib/src/cps_ir/builtin_operator.dart
diff --git a/pkg/compiler/lib/src/cps_ir/builtin_operator.dart b/pkg/compiler/lib/src/cps_ir/builtin_operator.dart
index 2db4ac5bf62d70ee7a348e735609df5152f1abfd..48e8851b950b84d4591a38b3670bbf43032b19d8 100644
--- a/pkg/compiler/lib/src/cps_ir/builtin_operator.dart
+++ b/pkg/compiler/lib/src/cps_ir/builtin_operator.dart
@@ -5,6 +5,8 @@ library builtin_operator;
// This is shared by the CPS and Tree IRs.
// Both cps_ir_nodes and tree_ir_nodes import and re-export this file.
+import 'effects.dart';
+
/// An operator supported natively in the CPS and Tree IRs using the
/// `ApplyBuiltinOperator` instructions.
///
@@ -196,3 +198,12 @@ bool isCompoundableOperator(BuiltinOperator operator) {
return false;
}
}
+
+int getEffectsOfBuiltinMethod(BuiltinMethod method) {
+ switch (method) {
+ case BuiltinMethod.Push:
+ return Effects.changesIndexableContent | Effects.changesIndexableLength;
+ case BuiltinMethod.Pop:
+ return Effects.dependsOnIndexableContent | Effects.changesIndexableLength;
+ }
+}

Powered by Google App Engine
This is Rietveld 408576698