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

Side by Side Diff: pkg/compiler/lib/src/js_emitter/old_emitter/emitter.dart

Issue 861723003: Fix minified output for FunctionThatReturnsNull. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 11 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 part of dart2js.js_emitter; 5 part of dart2js.js_emitter;
6 6
7 7
8 class OldEmitter implements Emitter { 8 class OldEmitter implements Emitter {
9 final Compiler compiler; 9 final Compiler compiler;
10 final CodeEmitterTask task; 10 final CodeEmitterTask task;
(...skipping 917 matching lines...) Expand 10 before | Expand all | Expand 10 after
928 output.add(N); 928 output.add(N);
929 } 929 }
930 930
931 void emitFunctionThatReturnsNull(CodeOutput output) { 931 void emitFunctionThatReturnsNull(CodeOutput output) {
932 output.addBuffer( 932 output.addBuffer(
933 jsAst.prettyPrint( 933 jsAst.prettyPrint(
934 js.statement('#.# = function() {}', 934 js.statement('#.# = function() {}',
935 [backend.namer.isolateName, 935 [backend.namer.isolateName,
936 backend.rti.getFunctionThatReturnsNullName]), 936 backend.rti.getFunctionThatReturnsNullName]),
937 compiler, monitor: compiler.dumpInfoTask)); 937 compiler, monitor: compiler.dumpInfoTask));
938 output.add(N);
sigurdm 2015/01/20 10:36:16 I guess you could chose to only output this in min
938 } 939 }
939 940
940 jsAst.Expression generateFunctionThatReturnsNull() { 941 jsAst.Expression generateFunctionThatReturnsNull() {
941 return js("#.#", [backend.namer.isolateName, 942 return js("#.#", [backend.namer.isolateName,
942 backend.rti.getFunctionThatReturnsNullName]); 943 backend.rti.getFunctionThatReturnsNullName]);
943 } 944 }
944 945
945 /// Returns the code equivalent to: 946 /// Returns the code equivalent to:
946 /// `function(args) { $.startRootIsolate(X.main$closure(), args); }` 947 /// `function(args) { $.startRootIsolate(X.main$closure(), args); }`
947 jsAst.Expression buildIsolateSetupClosure(Element appMain, 948 jsAst.Expression buildIsolateSetupClosure(Element appMain,
(...skipping 1146 matching lines...) Expand 10 before | Expand all | Expand 10 after
2094 for (Element element in compiler.enqueuer.codegen.newlyEnqueuedElements) { 2095 for (Element element in compiler.enqueuer.codegen.newlyEnqueuedElements) {
2095 if (element.isInstanceMember) { 2096 if (element.isInstanceMember) {
2096 cachedClassBuilders.remove(element.enclosingClass); 2097 cachedClassBuilders.remove(element.enclosingClass);
2097 2098
2098 nativeEmitter.cachedBuilders.remove(element.enclosingClass); 2099 nativeEmitter.cachedBuilders.remove(element.enclosingClass);
2099 2100
2100 } 2101 }
2101 } 2102 }
2102 } 2103 }
2103 } 2104 }
OLDNEW
« 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