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

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

Issue 2791263005: Split MirrorsData methods and MirrorsDataImpl data by element kind. (Closed)
Patch Set: Updated cf. comments. Created 3 years, 8 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
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:collection' show HashMap; 7 import 'dart:collection' show HashMap;
8 import 'dart:convert'; 8 import 'dart:convert';
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 1029 matching lines...) Expand 10 before | Expand all | Expand 10 after
1040 uri = 1040 uri =
1041 relativize(compiler.options.outputUri, library.canonicalUri, false); 1041 relativize(compiler.options.outputUri, library.canonicalUri, false);
1042 } 1042 }
1043 } 1043 }
1044 1044
1045 String libraryName = (!compiler.options.enableMinification || 1045 String libraryName = (!compiler.options.enableMinification ||
1046 backend.mirrorsData.mustRetainLibraryNames) 1046 backend.mirrorsData.mustRetainLibraryNames)
1047 ? library.libraryName 1047 ? library.libraryName
1048 : ""; 1048 : "";
1049 1049
1050 jsAst.Fun metadata = task.metadataCollector.buildMetadataFunction(library); 1050 jsAst.Fun metadata =
1051 task.metadataCollector.buildLibraryMetadataFunction(library);
1051 1052
1052 ClassBuilder descriptor = elementDescriptors[fragment][library]; 1053 ClassBuilder descriptor = elementDescriptors[fragment][library];
1053 1054
1054 jsAst.ObjectInitializer initializer; 1055 jsAst.ObjectInitializer initializer;
1055 if (descriptor == null) { 1056 if (descriptor == null) {
1056 // Nothing of the library was emitted. 1057 // Nothing of the library was emitted.
1057 // TODO(floitsch): this should not happen. We currently have an example 1058 // TODO(floitsch): this should not happen. We currently have an example
1058 // with language/prefix6_negative_test.dart where we have an instance 1059 // with language/prefix6_negative_test.dart where we have an instance
1059 // method without its corresponding class. 1060 // method without its corresponding class.
1060 initializer = new jsAst.ObjectInitializer([]); 1061 initializer = new jsAst.ObjectInitializer([]);
(...skipping 867 matching lines...) Expand 10 before | Expand all | Expand 10 after
1928 // data. 1929 // data.
1929 mapping["_comment"] = "This mapping shows which compiled `.js` files are " 1930 mapping["_comment"] = "This mapping shows which compiled `.js` files are "
1930 "needed for a given deferred library import."; 1931 "needed for a given deferred library import.";
1931 mapping.addAll(compiler.deferredLoadTask.computeDeferredMap()); 1932 mapping.addAll(compiler.deferredLoadTask.computeDeferredMap());
1932 compiler.outputProvider( 1933 compiler.outputProvider(
1933 compiler.options.deferredMapUri.path, '', OutputType.info) 1934 compiler.options.deferredMapUri.path, '', OutputType.info)
1934 ..add(const JsonEncoder.withIndent(" ").convert(mapping)) 1935 ..add(const JsonEncoder.withIndent(" ").convert(mapping))
1935 ..close(); 1936 ..close();
1936 } 1937 }
1937 } 1938 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698