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

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

Issue 1335983004: Add ImportElement and ExportElement (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Updated cf. comments. Created 5 years, 3 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
« no previous file with comments | « pkg/compiler/lib/src/js_backend/namer.dart ('k') | pkg/compiler/lib/src/library_loader.dart » ('j') | 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 library dart2js.js_emitter.full_emitter; 5 library dart2js.js_emitter.full_emitter;
6 6
7 import 'dart:convert'; 7 import 'dart:convert';
8 import 'dart:collection' show HashMap; 8 import 'dart:collection' show HashMap;
9 9
10 import 'package:js_runtime/shared/embedded_names.dart' as embeddedNames; 10 import 'package:js_runtime/shared/embedded_names.dart' as embeddedNames;
(...skipping 1071 matching lines...) Expand 10 before | Expand all | Expand 10 after
1082 var uri = ""; 1082 var uri = "";
1083 if (!compiler.enableMinification || backend.mustPreserveUris) { 1083 if (!compiler.enableMinification || backend.mustPreserveUris) {
1084 uri = library.canonicalUri; 1084 uri = library.canonicalUri;
1085 if (uri.scheme == 'file' && compiler.outputUri != null) { 1085 if (uri.scheme == 'file' && compiler.outputUri != null) {
1086 uri = relativize(compiler.outputUri, library.canonicalUri, false); 1086 uri = relativize(compiler.outputUri, library.canonicalUri, false);
1087 } 1087 }
1088 } 1088 }
1089 1089
1090 String libraryName = 1090 String libraryName =
1091 (!compiler.enableMinification || backend.mustRetainLibraryNames) ? 1091 (!compiler.enableMinification || backend.mustRetainLibraryNames) ?
1092 library.getLibraryName() : 1092 library.libraryName :
1093 ""; 1093 "";
1094 1094
1095 jsAst.Fun metadata = task.metadataCollector.buildMetadataFunction(library); 1095 jsAst.Fun metadata = task.metadataCollector.buildMetadataFunction(library);
1096 1096
1097 ClassBuilder descriptor = elementDescriptors[fragment][library]; 1097 ClassBuilder descriptor = elementDescriptors[fragment][library];
1098 1098
1099 jsAst.ObjectInitializer initializer; 1099 jsAst.ObjectInitializer initializer;
1100 if (descriptor == null) { 1100 if (descriptor == null) {
1101 // Nothing of the library was emitted. 1101 // Nothing of the library was emitted.
1102 // TODO(floitsch): this should not happen. We currently have an example 1102 // TODO(floitsch): this should not happen. We currently have an example
(...skipping 1019 matching lines...) Expand 10 before | Expand all | Expand 10 after
2122 for (Element element in compiler.enqueuer.codegen.newlyEnqueuedElements) { 2122 for (Element element in compiler.enqueuer.codegen.newlyEnqueuedElements) {
2123 if (element.isInstanceMember) { 2123 if (element.isInstanceMember) {
2124 cachedClassBuilders.remove(element.enclosingClass); 2124 cachedClassBuilders.remove(element.enclosingClass);
2125 2125
2126 nativeEmitter.cachedBuilders.remove(element.enclosingClass); 2126 nativeEmitter.cachedBuilders.remove(element.enclosingClass);
2127 2127
2128 } 2128 }
2129 } 2129 }
2130 } 2130 }
2131 } 2131 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/js_backend/namer.dart ('k') | pkg/compiler/lib/src/library_loader.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698