Index: sdk/lib/_internal/lib/foreign_helper.dart |
diff --git a/sdk/lib/_internal/lib/foreign_helper.dart b/sdk/lib/_internal/lib/foreign_helper.dart |
index 7268eada2f47be243b79ec10e76e0257c060dfdf..a6807f5badaa1f9a446c987d43b0004c3beb3c6a 100644 |
--- a/sdk/lib/_internal/lib/foreign_helper.dart |
+++ b/sdk/lib/_internal/lib/foreign_helper.dart |
@@ -235,3 +235,20 @@ JS_GLOBAL_OBJECT() {} |
* Obtain [name] from Namer. |
*/ |
String JS_GET_NAME(String name) {} |
+ |
ahe
2013/08/13 18:31:47
Extra line.
sra1
2013/08/14 04:36:47
Done.
|
+ |
+/** |
+ * Pretend [code] is executed. Generates no executable code. This is used to |
+ * model effects at some other point in external code. For example, the |
+ * following models an assignment to foo with an unknown value. |
+ * |
+ * var foo; |
+ * |
+ * main() { |
+ * JS_EFFECT((_){ foo = _; }) |
+ * } |
+ * |
+ * TODO(sra): Replace this hack with something to mark the volatile or |
+ * externally initialized elements. |
+ */ |
+void JS_EFFECT(Function code) { code(null); } |