| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |