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

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: 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 202bc87f53da9587a4bf3402877eed0b5e72f8f9..8787a62198b2cae1a95b047a3459e522e7097cd0 100644
--- a/lib/compiler/implementation/js_backend/emitter.dart
+++ b/lib/compiler/implementation/js_backend/emitter.dart
@@ -1442,11 +1442,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;
@@ -1534,7 +1534,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