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

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

Issue 1009053005: Do not use the namer for naming closure elements. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Better naming for closure/box fields. 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;
1053 if (emitJavaScript) { 1052 if (emitJavaScript) {
1054 js_backend.JavaScriptBackend jsBackend = 1053 js_backend.JavaScriptBackend jsBackend =
1055 new js_backend.JavaScriptBackend(this, generateSourceMap); 1054 new js_backend.JavaScriptBackend(this, generateSourceMap);
1056 closureNamer = jsBackend.namer;
1057 backend = jsBackend; 1055 backend = jsBackend;
1058 } else { 1056 } else {
1059 closureNamer = new closureMapping.ClosureNamer();
1060 backend = new dart_backend.DartBackend(this, strips, 1057 backend = new dart_backend.DartBackend(this, strips,
1061 multiFile: dart2dartMultiFile); 1058 multiFile: dart2dartMultiFile);
1062 if (dumpInfo) { 1059 if (dumpInfo) {
1063 throw new ArgumentError('--dump-info is not supported for dart2dart.'); 1060 throw new ArgumentError('--dump-info is not supported for dart2dart.');
1064 } 1061 }
1065 } 1062 }
1066 1063
1067 tasks = [ 1064 tasks = [
1068 libraryLoader = new LibraryLoaderTask(this), 1065 libraryLoader = new LibraryLoaderTask(this),
1069 scanner = new ScannerTask(this), 1066 scanner = new ScannerTask(this),
1070 dietParser = new DietParserTask(this), 1067 dietParser = new DietParserTask(this),
1071 parser = new ParserTask(this), 1068 parser = new ParserTask(this),
1072 patchParser = new PatchParserTask(this), 1069 patchParser = new PatchParserTask(this),
1073 resolver = new ResolverTask(this, backend.constantCompilerTask), 1070 resolver = new ResolverTask(this, backend.constantCompilerTask),
1074 closureToClassMapper = new closureMapping.ClosureTask(this, closureNamer), 1071 closureToClassMapper = new closureMapping.ClosureTask(this),
1075 checker = new TypeCheckerTask(this), 1072 checker = new TypeCheckerTask(this),
1076 irBuilder = new IrBuilderTask(this), 1073 irBuilder = new IrBuilderTask(this),
1077 typesTask = new ti.TypesTask(this), 1074 typesTask = new ti.TypesTask(this),
1078 constants = backend.constantCompilerTask, 1075 constants = backend.constantCompilerTask,
1079 deferredLoadTask = new DeferredLoadTask(this), 1076 deferredLoadTask = new DeferredLoadTask(this),
1080 mirrorUsageAnalyzerTask = new MirrorUsageAnalyzerTask(this), 1077 mirrorUsageAnalyzerTask = new MirrorUsageAnalyzerTask(this),
1081 enqueuer = new EnqueueTask(this), 1078 enqueuer = new EnqueueTask(this),
1082 dumpInfoTask = new DumpInfoTask(this), 1079 dumpInfoTask = new DumpInfoTask(this),
1083 reuseLibraryTask = new GenericTask('Reuse library', this), 1080 reuseLibraryTask = new GenericTask('Reuse library', this),
1084 ]; 1081 ];
(...skipping 1335 matching lines...) Expand 10 before | Expand all | Expand 10 after
2420 return futureClass.computeType(compiler).createInstantiation([elementType]); 2417 return futureClass.computeType(compiler).createInstantiation([elementType]);
2421 } 2418 }
2422 2419
2423 @override 2420 @override
2424 InterfaceType streamType([DartType elementType = const DynamicType()]) { 2421 InterfaceType streamType([DartType elementType = const DynamicType()]) {
2425 return streamClass.computeType(compiler).createInstantiation([elementType]); 2422 return streamClass.computeType(compiler).createInstantiation([elementType]);
2426 } 2423 }
2427 } 2424 }
2428 2425
2429 typedef void InternalErrorFunction(Spannable location, String message); 2426 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