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

Unified Diff: pkg/compiler/lib/src/native/behavior.dart

Issue 1607373002: dart2js: switching isolate is not 'PURE' (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: 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/native/behavior.dart
diff --git a/pkg/compiler/lib/src/native/behavior.dart b/pkg/compiler/lib/src/native/behavior.dart
index 438dbe6d1797ecdcef10d0ae306075f3c9bfdcab..2ac21b970668342aa08df07f4b602dad62a1bb70 100644
--- a/pkg/compiler/lib/src/native/behavior.dart
+++ b/pkg/compiler/lib/src/native/behavior.dart
@@ -111,6 +111,9 @@ class NativeBehavior {
static NativeBehavior get PURE => NativeBehavior._makePure();
static NativeBehavior get PURE_ALLOCATION =>
NativeBehavior._makePure(isAllocation: true);
+ static NativeBehavior get CHANGES_STATIC_PROPERTY =>
+ NativeBehavior._makeAssignsStaticProperty();
+
String toString() {
return 'NativeBehavior('
@@ -132,6 +135,16 @@ class NativeBehavior {
return behavior;
}
+ static NativeBehavior _makeAssignsStaticProperty() {
+ NativeBehavior behavior = new NativeBehavior();
+ behavior.sideEffects.clearAllDependencies();
+ behavior.sideEffects.clearAllSideEffects();
+ behavior.sideEffects.setChangesStaticProperty();
+ behavior.throwBehavior = NativeThrowBehavior.NEVER;
+ behavior.isAllocation = false;
+ return behavior;
+ }
+
/// Processes the type specification string of a call to JS and stores the
/// result in the [typesReturned] and [typesInstantiated]. It furthermore
/// computes the side effects, and, if given, invokes [setSideEffects] with

Powered by Google App Engine
This is Rietveld 408576698