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

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

Issue 738423002: Use serialized scope info to test incremental compiler. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Merged with r41954. 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/pkg/dart2js_incremental/lib/library_updater.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) 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_incremental; 5 library dart2js_incremental;
6 6
7 import 'dart:async' show 7 import 'dart:async' show
8 Future; 8 Future;
9 9
10 import 'dart:profiler' show 10 import 'dart:profiler' show
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 throw new ArgumentError('libraryRoot is null.'); 68 throw new ArgumentError('libraryRoot is null.');
69 } 69 }
70 if (inputProvider == null) { 70 if (inputProvider == null) {
71 throw new ArgumentError('inputProvider is null.'); 71 throw new ArgumentError('inputProvider is null.');
72 } 72 }
73 if (diagnosticHandler == null) { 73 if (diagnosticHandler == null) {
74 throw new ArgumentError('diagnosticHandler is null.'); 74 throw new ArgumentError('diagnosticHandler is null.');
75 } 75 }
76 } 76 }
77 77
78 LibraryElement get mainApp => _compiler.mainApp;
79
80 Compiler get compiler => _compiler;
81
78 Future<bool> compile(Uri script) { 82 Future<bool> compile(Uri script) {
79 return _reuseCompiler(null).then((Compiler compiler) { 83 return _reuseCompiler(null).then((Compiler compiler) {
80 _compiler = compiler; 84 _compiler = compiler;
81 return compiler.run(script); 85 return compiler.run(script);
82 }); 86 });
83 } 87 }
84 88
85 Future<Compiler> _reuseCompiler( 89 Future<Compiler> _reuseCompiler(
86 Future<bool> reuseLibrary(LibraryElement library)) { 90 Future<bool> reuseLibrary(LibraryElement library)) {
87 List<String> options = this.options == null 91 List<String> options = this.options == null
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 $dart_unsafe_eval.patch(#); 144 $dart_unsafe_eval.patch(#);
141 return main(args); 145 return main(args);
142 }""", updates); 146 }""", updates);
143 147
144 148
145 jsAst.Printer printer = new jsAst.Printer(_compiler, null); 149 jsAst.Printer printer = new jsAst.Printer(_compiler, null);
146 printer.blockOutWithoutBraces(mainRunner); 150 printer.blockOutWithoutBraces(mainRunner);
147 return printer.outBuffer.getText(); 151 return printer.outBuffer.getText();
148 } 152 }
149 } 153 }
OLDNEW
« no previous file with comments | « no previous file | dart/pkg/dart2js_incremental/lib/library_updater.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698