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

Unified Diff: frog/corejs.dart

Issue 10264021: Fix codegen and isolate issues for frog dart:html (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 8 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
« no previous file with comments | « no previous file | frog/gen.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: frog/corejs.dart
diff --git a/frog/corejs.dart b/frog/corejs.dart
index 5747a21876a45cecf8721276e4cdfb7662bb021c..92652dd3ca1b05768805c4094e21e3a5fd964fb4 100644
--- a/frog/corejs.dart
+++ b/frog/corejs.dart
@@ -19,6 +19,7 @@ class CoreJs {
bool useWrap0 = false;
bool useWrap1 = false;
+ bool useWrap2 = false;
bool useIsolates = false;
// These helpers had to switch to a new pattern, because they can be generated
@@ -180,12 +181,9 @@ class CoreJs {
}
if (!useIsolates) {
- if (useWrap0) {
- _emit(_EMPTY_WRAP_CALL0_FUNCTION);
- }
- if (useWrap1) {
- _emit(_EMPTY_WRAP_CALL1_FUNCTION);
- }
+ if (useWrap0) _emit(_EMPTY_WRAP_CALL0_FUNCTION);
+ if (useWrap1) _emit(_EMPTY_WRAP_CALL1_FUNCTION);
+ if (useWrap2) _emit(_EMPTY_WRAP_CALL2_FUNCTION);
}
// Write operator helpers
@@ -193,7 +191,7 @@ class CoreJs {
_emit(opImpl);
}
- if (world.dom != null) {
+ if (world.dom != null || world.html != null) {
ensureTypeNameOf();
ensureDefProp();
// TODO(jmesserly): we need to find a way to avoid conflicts with other
@@ -608,6 +606,11 @@ final String _EMPTY_WRAP_CALL1_FUNCTION = @"""
function $wrap_call$1(fn) { return fn; };
""";
+/** Snippet for `$wrap_call$2`, in case it was not necessary. */
+final String _EMPTY_WRAP_CALL2_FUNCTION = @"""
+function $wrap_call$2(fn) { return fn; };
+""";
+
/** Snippet that initializes Function.prototype.bind. */
final String _BIND_CODE = @"""
Function.prototype.bind = Function.prototype.bind ||
« no previous file with comments | « no previous file | frog/gen.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698