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

Unified Diff: sdk/lib/_internal/lib/foreign_helper.dart

Issue 15026006: Support for extending native classes (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 4 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: 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); }

Powered by Google App Engine
This is Rietveld 408576698