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

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

Issue 847573003: Push updates to browser. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Update package:browser version. Created 5 years, 11 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
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 EventSink, 8 EventSink,
9 Future; 9 Future;
10 10
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 }); 143 });
144 } 144 }
145 145
146 String allUpdates() { 146 String allUpdates() {
147 jsAst.Node updates = jsAst.js.escapedString(_updates.join("")); 147 jsAst.Node updates = jsAst.js.escapedString(_updates.join(""));
148 148
149 JavaScriptBackend backend = _compiler.backend; 149 JavaScriptBackend backend = _compiler.backend;
150 150
151 jsAst.FunctionDeclaration mainRunner = jsAst.js.statement(r""" 151 jsAst.FunctionDeclaration mainRunner = jsAst.js.statement(r"""
152 function dartMainRunner(main, args) { 152 function dartMainRunner(main, args) {
153 #helper.patch(#updates); 153 #helper.patch(#updates + "\n//# sourceURL=initial_patch.js\n");
154 return main(args); 154 return main(args);
155 }""", {'updates': updates, 'helper': backend.namer.accessIncrementalHelper}); 155 }""", {'updates': updates, 'helper': backend.namer.accessIncrementalHelper});
156 156
157 jsAst.Printer printer = new jsAst.Printer(_compiler, null); 157 jsAst.Printer printer = new jsAst.Printer(_compiler, null);
158 printer.blockOutWithoutBraces(mainRunner); 158 printer.blockOutWithoutBraces(mainRunner);
159 return printer.outBuffer.getText(); 159 return printer.outBuffer.getText();
160 } 160 }
161 } 161 }
162 162
163 class IncrementalCompilationFailed { 163 class IncrementalCompilationFailed {
164 final String reason; 164 final String reason;
165 165
166 const IncrementalCompilationFailed(this.reason); 166 const IncrementalCompilationFailed(this.reason);
167 167
168 String toString() => "Can't incrementally compile program.\n\n$reason"; 168 String toString() => "Can't incrementally compile program.\n\n$reason";
169 } 169 }
OLDNEW
« no previous file with comments | « dart/pkg/dart2js_incremental/lib/compiler.dart ('k') | dart/pkg/dart2js_incremental/lib/server.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698