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

Side by Side Diff: pkg/compiler/lib/src/compiler.dart

Issue 1022023002: Revert "Do not use the namer for naming closure elements." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 9 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 | « pkg/compiler/lib/src/closure.dart ('k') | pkg/compiler/lib/src/js_backend/minify_namer.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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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; 5 part of dart2js;
6 6
7 /** 7 /**
8 * If true, print a warning for each method that was resolved, but not 8 * If true, print a warning for each method that was resolved, but not
9 * compiled. 9 * compiled.
10 */ 10 */
(...skipping 1031 matching lines...) Expand 10 before | Expand all | Expand 10 after
1042 1042
1043 if (verbose) { 1043 if (verbose) {
1044 progress = new Stopwatch()..start(); 1044 progress = new Stopwatch()..start();
1045 } 1045 }
1046 1046
1047 // TODO(johnniwinther): Separate the dependency tracking from the enqueueing 1047 // TODO(johnniwinther): Separate the dependency tracking from the enqueueing
1048 // for global dependencies. 1048 // for global dependencies.
1049 globalDependencies = 1049 globalDependencies =
1050 new CodegenRegistry(this, new TreeElementMapping(null)); 1050 new CodegenRegistry(this, new TreeElementMapping(null));
1051 1051
1052 closureMapping.ClosureNamer closureNamer;
1052 if (emitJavaScript) { 1053 if (emitJavaScript) {
1053 js_backend.JavaScriptBackend jsBackend = 1054 js_backend.JavaScriptBackend jsBackend =
1054 new js_backend.JavaScriptBackend(this, generateSourceMap); 1055 new js_backend.JavaScriptBackend(this, generateSourceMap);
1056 closureNamer = jsBackend.namer;
1055 backend = jsBackend; 1057 backend = jsBackend;
1056 } else { 1058 } else {
1059 closureNamer = new closureMapping.ClosureNamer();
1057 backend = new dart_backend.DartBackend(this, strips, 1060 backend = new dart_backend.DartBackend(this, strips,
1058 multiFile: dart2dartMultiFile); 1061 multiFile: dart2dartMultiFile);
1059 if (dumpInfo) { 1062 if (dumpInfo) {
1060 throw new ArgumentError('--dump-info is not supported for dart2dart.'); 1063 throw new ArgumentError('--dump-info is not supported for dart2dart.');
1061 } 1064 }
1062 } 1065 }
1063 1066
1064 tasks = [ 1067 tasks = [
1065 libraryLoader = new LibraryLoaderTask(this), 1068 libraryLoader = new LibraryLoaderTask(this),
1066 scanner = new ScannerTask(this), 1069 scanner = new ScannerTask(this),
1067 dietParser = new DietParserTask(this), 1070 dietParser = new DietParserTask(this),
1068 parser = new ParserTask(this), 1071 parser = new ParserTask(this),
1069 patchParser = new PatchParserTask(this), 1072 patchParser = new PatchParserTask(this),
1070 resolver = new ResolverTask(this, backend.constantCompilerTask), 1073 resolver = new ResolverTask(this, backend.constantCompilerTask),
1071 closureToClassMapper = new closureMapping.ClosureTask(this), 1074 closureToClassMapper = new closureMapping.ClosureTask(this, closureNamer),
1072 checker = new TypeCheckerTask(this), 1075 checker = new TypeCheckerTask(this),
1073 irBuilder = new IrBuilderTask(this), 1076 irBuilder = new IrBuilderTask(this),
1074 typesTask = new ti.TypesTask(this), 1077 typesTask = new ti.TypesTask(this),
1075 constants = backend.constantCompilerTask, 1078 constants = backend.constantCompilerTask,
1076 deferredLoadTask = new DeferredLoadTask(this), 1079 deferredLoadTask = new DeferredLoadTask(this),
1077 mirrorUsageAnalyzerTask = new MirrorUsageAnalyzerTask(this), 1080 mirrorUsageAnalyzerTask = new MirrorUsageAnalyzerTask(this),
1078 enqueuer = new EnqueueTask(this), 1081 enqueuer = new EnqueueTask(this),
1079 dumpInfoTask = new DumpInfoTask(this), 1082 dumpInfoTask = new DumpInfoTask(this),
1080 reuseLibraryTask = new GenericTask('Reuse library', this), 1083 reuseLibraryTask = new GenericTask('Reuse library', this),
1081 ]; 1084 ];
(...skipping 1335 matching lines...) Expand 10 before | Expand all | Expand 10 after
2417 return futureClass.computeType(compiler).createInstantiation([elementType]); 2420 return futureClass.computeType(compiler).createInstantiation([elementType]);
2418 } 2421 }
2419 2422
2420 @override 2423 @override
2421 InterfaceType streamType([DartType elementType = const DynamicType()]) { 2424 InterfaceType streamType([DartType elementType = const DynamicType()]) {
2422 return streamClass.computeType(compiler).createInstantiation([elementType]); 2425 return streamClass.computeType(compiler).createInstantiation([elementType]);
2423 } 2426 }
2424 } 2427 }
2425 2428
2426 typedef void InternalErrorFunction(Spannable location, String message); 2429 typedef void InternalErrorFunction(Spannable location, String message);
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/closure.dart ('k') | pkg/compiler/lib/src/js_backend/minify_namer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698