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

Unified Diff: lib/compiler/implementation/js_backend/emitter.dart

Issue 10942028: Support class and typedef literals as expressions. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Add a test for literals. Created 8 years, 2 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: lib/compiler/implementation/js_backend/emitter.dart
diff --git a/lib/compiler/implementation/js_backend/emitter.dart b/lib/compiler/implementation/js_backend/emitter.dart
index b9d30a3fa4b426e1d5f166bf42e43bd1bf763679..a986c72d7bce8a09e60201116ed34d18d6c6eef5 100644
--- a/lib/compiler/implementation/js_backend/emitter.dart
+++ b/lib/compiler/implementation/js_backend/emitter.dart
@@ -1421,11 +1421,11 @@ $classesCollector.$mangledName = {'':
String invocationName = "${namer.closureInvocationName(selector)}";
mainEnsureGetter = "$mainAccess.$invocationName = $mainAccess";
}
-
// TODO(ngeoffray): These globals are currently required by the isolate
// library. They should be removed.
String runtimeTypeCache =
- compiler.enabledRuntimeType ? " context.runtimeTypeCache = {}\n" : "";
+ compiler.needsRuntimeTypeCache() ? " context.runtimeTypeCache = {}\n"
+ : "";
buffer.add("""
var \$globalThis = $currentIsolate;
@@ -1513,7 +1513,7 @@ if (typeof document != 'undefined' && document.readyState != 'complete') {
// constants to be set up.
emitStaticNonFinalFieldInitializations(mainBuffer);
emitLazilyInitializedStaticFields(mainBuffer);
- if (compiler.enabledRuntimeType && !compiler.hasIsolateSupport()) {
+ if (compiler.needsRuntimeTypeCache() && !compiler.hasIsolateSupport()) {
mainBuffer.add('$isolateProperties.runtimeTypeCache = {};\n');
}

Powered by Google App Engine
This is Rietveld 408576698