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

Side by Side Diff: sdk/lib/_internal/compiler/implementation/js_emitter/old_emitter/emitter.dart

Issue 582753002: dart2js: add --preserve-uris flag. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Update tests. Created 6 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 unified diff | Download patch | Annotate | Revision Log
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 1191 matching lines...) Expand 10 before | Expand all | Expand 10 after
1202 #; 1202 #;
1203 return properties; 1203 return properties;
1204 }''', [debugCode]); 1204 }''', [debugCode]);
1205 1205
1206 mainBuffer.add(jsAst.prettyPrint(convertToFastObject, compiler)); 1206 mainBuffer.add(jsAst.prettyPrint(convertToFastObject, compiler));
1207 mainBuffer.add(N); 1207 mainBuffer.add(N);
1208 } 1208 }
1209 1209
1210 void writeLibraryDescriptors(CodeBuffer buffer, LibraryElement library) { 1210 void writeLibraryDescriptors(CodeBuffer buffer, LibraryElement library) {
1211 var uri = ""; 1211 var uri = "";
1212 if (!compiler.enableMinification || backend.mustRetainUris) { 1212 if (!compiler.enableMinification || backend.mustPreserveUris) {
1213 uri = library.canonicalUri; 1213 uri = library.canonicalUri;
1214 if (uri.scheme == 'file' && compiler.outputUri != null) { 1214 if (uri.scheme == 'file' && compiler.outputUri != null) {
1215 uri = relativize(compiler.outputUri, library.canonicalUri, false); 1215 uri = relativize(compiler.outputUri, library.canonicalUri, false);
1216 } 1216 }
1217 } 1217 }
1218 ClassBuilder descriptor = elementDescriptors[library]; 1218 ClassBuilder descriptor = elementDescriptors[library];
1219 if (descriptor == null) { 1219 if (descriptor == null) {
1220 // Nothing of the library was emitted. 1220 // Nothing of the library was emitted.
1221 // TODO(floitsch): this should not happen. We currently have an example 1221 // TODO(floitsch): this should not happen. We currently have an example
1222 // with language/prefix6_negative_test.dart where we have an instance 1222 // with language/prefix6_negative_test.dart where we have an instance
(...skipping 764 matching lines...) Expand 10 before | Expand all | Expand 10 after
1987 for (Element element in compiler.enqueuer.codegen.newlyEnqueuedElements) { 1987 for (Element element in compiler.enqueuer.codegen.newlyEnqueuedElements) {
1988 if (element.isInstanceMember) { 1988 if (element.isInstanceMember) {
1989 cachedClassBuilders.remove(element.enclosingClass); 1989 cachedClassBuilders.remove(element.enclosingClass);
1990 1990
1991 nativeEmitter.cachedBuilders.remove(element.enclosingClass); 1991 nativeEmitter.cachedBuilders.remove(element.enclosingClass);
1992 1992
1993 } 1993 }
1994 } 1994 }
1995 } 1995 }
1996 } 1996 }
OLDNEW
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/js_backend/backend.dart ('k') | sdk/lib/_internal/compiler/js_lib/js_mirrors.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698