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

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

Issue 10381033: Emit defineClass function only if it is used. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 7 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/compiler/implementation/emitter.dart
diff --git a/lib/compiler/implementation/emitter.dart b/lib/compiler/implementation/emitter.dart
index 68a3d1a3a0077c8102d6fa94373805a8dedeaa9d..de895ee701b1e567693f535209fa0779c24990ab 100644
--- a/lib/compiler/implementation/emitter.dart
+++ b/lib/compiler/implementation/emitter.dart
@@ -175,10 +175,12 @@ function() {
}
void addDefineClassAndFinishClassFunctionsIfNecessary(StringBuffer buffer) {
- String isolate = namer.ISOLATE;
- buffer.add("$defineClassName = $defineClassFunction;\n");
- buffer.add("$pendingClassesName = {};\n");
- buffer.add("$finishClassesName = $finishClassesFunction;\n");
+ if (needsDefineClass) {
+ String isolate = namer.ISOLATE;
+ buffer.add("$defineClassName = $defineClassFunction;\n");
+ buffer.add("$pendingClassesName = {};\n");
+ buffer.add("$finishClassesName = $finishClassesFunction;\n");
+ }
}
void emitFinishIsolateConstructor(StringBuffer buffer) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698