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

Side by Side Diff: pkg/dart2js_incremental/lib/caching_compiler.dart

Issue 2568723007: Create Namer and Emitter on codegen start. (Closed)
Patch Set: Small fix. Created 4 years 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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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_incremental; 5 part of dart2js_incremental;
6 6
7 /// Do not call this method directly. It will be made private. 7 /// Do not call this method directly. It will be made private.
8 // TODO(ahe): Make this method private. 8 // TODO(ahe): Make this method private.
9 Future<CompilerImpl> reuseCompiler( 9 Future<CompilerImpl> reuseCompiler(
10 {CompilerDiagnostics diagnosticHandler, 10 {CompilerDiagnostics diagnosticHandler,
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 outputProvider, 61 outputProvider,
62 diagnosticHandler, 62 diagnosticHandler,
63 new CompilerOptions.parse( 63 new CompilerOptions.parse(
64 libraryRoot: libraryRoot, 64 libraryRoot: libraryRoot,
65 packageRoot: packageRoot, 65 packageRoot: packageRoot,
66 packageConfig: packageConfig, 66 packageConfig: packageConfig,
67 options: options, 67 options: options,
68 environment: environment)); 68 environment: environment));
69 backend = compiler.backend; 69 backend = compiler.backend;
70 70
71 full.Emitter emitter = backend.emitter.emitter;
72
73 // Much like a scout, an incremental compiler is always prepared. For
74 // mixins, classes, and lazy statics, at least.
75 emitter
76 ..needsClassSupport = true
77 ..needsMixinSupport = true
78 ..needsLazyInitializer = true
79 ..needsStructuredMemberInfo = true;
80
81 Uri core = Uri.parse("dart:core"); 71 Uri core = Uri.parse("dart:core");
82 72
83 return compiler.setupSdk().then((_) { 73 return compiler.setupSdk().then((_) {
84 return compiler.libraryLoader.loadLibrary(core).then((_) { 74 return compiler.libraryLoader.loadLibrary(core).then((_) {
85 // Likewise, always be prepared for runtimeType support. 75 // Likewise, always be prepared for runtimeType support.
86 // TODO(johnniwinther): Add global switch to force RTI. 76 // TODO(johnniwinther): Add global switch to force RTI.
87 compiler.resolverWorld.hasRuntimeTypeSupport = true; 77 compiler.resolverWorld.hasRuntimeTypeSupport = true;
88 compiler.enqueuer.resolution.applyImpact(backend.registerRuntimeType()); 78 compiler.enqueuer.resolution.applyImpact(backend.registerRuntimeType());
89 return compiler; 79 return compiler;
90 }); 80 });
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 final Map<String, String> output = new Map<String, String>(); 180 final Map<String, String> output = new Map<String, String>();
191 181
192 EventSink<String> createEventSink(String name, String extension) { 182 EventSink<String> createEventSink(String name, String extension) {
193 return new StringEventSink((String data) { 183 return new StringEventSink((String data) {
194 output['$name.$extension'] = data; 184 output['$name.$extension'] = data;
195 }); 185 });
196 } 186 }
197 187
198 String operator[] (String key) => output[key]; 188 String operator[] (String key) => output[key];
199 } 189 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/js_emitter/type_test_registry.dart ('k') | tests/compiler/dart2js/type_representation_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698