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

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

Issue 755223002: Always enable RTI for incremental compilation. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Merged with r42035. Created 6 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | dart/tests/try/web/incremental_compilation_update_test.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) 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<Compiler> reuseCompiler( 9 Future<Compiler> reuseCompiler(
10 {DiagnosticHandler diagnosticHandler, 10 {DiagnosticHandler diagnosticHandler,
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 oldTag.makeCurrent(); 58 oldTag.makeCurrent();
59 compiler = new Compiler( 59 compiler = new Compiler(
60 inputProvider, 60 inputProvider,
61 outputProvider, 61 outputProvider,
62 diagnosticHandler, 62 diagnosticHandler,
63 libraryRoot, 63 libraryRoot,
64 packageRoot, 64 packageRoot,
65 options, 65 options,
66 environment); 66 environment);
67 JavaScriptBackend backend = compiler.backend; 67 JavaScriptBackend backend = compiler.backend;
68
68 // Much like a scout, an incremental compiler is always prepared. For 69 // Much like a scout, an incremental compiler is always prepared. For
69 // mixins, at least. 70 // mixins, at least.
70 backend.emitter.oldEmitter.needsMixinSupport = true; 71 backend.emitter.oldEmitter.needsMixinSupport = true;
71 return new Future.value(compiler); 72
73 Uri core = Uri.parse("dart:core");
74 return compiler.libraryLoader.loadLibrary(core).then((_) {
75 // Likewise, always be prepared for runtimeType support.
76 // TODO(johnniwinther): Add global switch to force RTI.
77 compiler.enabledRuntimeType = true;
78 backend.registerRuntimeType(
79 compiler.enqueuer.resolution, compiler.globalDependencies);
80 return compiler;
81 });
72 } else { 82 } else {
73 for (final task in compiler.tasks) { 83 for (final task in compiler.tasks) {
74 if (task.watch != null) { 84 if (task.watch != null) {
75 task.watch.reset(); 85 task.watch.reset();
76 } 86 }
77 } 87 }
78 compiler 88 compiler
79 ..outputProvider = outputProvider 89 ..outputProvider = outputProvider
80 ..provider = inputProvider 90 ..provider = inputProvider
81 ..handler = diagnosticHandler 91 ..handler = diagnosticHandler
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 library.isPlatformLibrary || 161 library.isPlatformLibrary ||
152 (packagesAreImmutable && library.isPackageLibrary)); 162 (packagesAreImmutable && library.isPackageLibrary));
153 }; 163 };
154 } 164 }
155 return compiler.libraryLoader.resetAsync(reuseLibrary).then((_) { 165 return compiler.libraryLoader.resetAsync(reuseLibrary).then((_) {
156 oldTag.makeCurrent(); 166 oldTag.makeCurrent();
157 return compiler; 167 return compiler;
158 }); 168 });
159 } 169 }
160 } 170 }
OLDNEW
« no previous file with comments | « no previous file | dart/tests/try/web/incremental_compilation_update_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698