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

Side by Side Diff: lib/compiler/samples/leap/leap_leg.dart

Issue 11090016: Change core lib, dart2js, and more for new optional parameters syntax (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 2 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 | « lib/compiler/implementation/types/concrete_types_inferrer.dart ('k') | lib/core/date.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 compilerIsolate(port) { 5 compilerIsolate(port) {
6 Runner runner = new Runner(); 6 Runner runner = new Runner();
7 runner.init(); 7 runner.init();
8 8
9 port.receive((msg, replyTo) { 9 port.receive((msg, replyTo) {
10 replyTo.send(runner.update(msg)); 10 replyTo.send(runner.update(msg));
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 } 249 }
250 250
251 reportWarning(Node node, var message) { 251 reportWarning(Node node, var message) {
252 print(message); 252 print(message);
253 } 253 }
254 254
255 reportError(Node node, var message) { 255 reportError(Node node, var message) {
256 cancel(message.toString(), node); 256 cancel(message.toString(), node);
257 } 257 }
258 258
259 void cancel([String reason, Node node, token, instruction, element]) { 259 void cancel(String reason, {Node node, token, instruction, element}) {
260 print(reason); 260 print(reason);
261 } 261 }
262 262
263 Element runSelective(Script script) { 263 Element runSelective(Script script) {
264 Stopwatch sw = new Stopwatch()..start(); 264 Stopwatch sw = new Stopwatch()..start();
265 Element e; 265 Element e;
266 try { 266 try {
267 e = runCompilerSelective(script); 267 e = runCompilerSelective(script);
268 } on CompilerCancelledException catch (exception) { 268 } on CompilerCancelledException catch (exception) {
269 log(exception.toString()); 269 log(exception.toString());
270 log('compilation failed'); 270 log('compilation failed');
271 return null; 271 return null;
272 } 272 }
273 log('compilation succeeded: ${sw.elapsedInMs()}ms'); 273 log('compilation succeeded: ${sw.elapsedInMs()}ms');
274 return e; 274 return e;
275 } 275 }
276 276
277 LibraryElement runCompilerSelective(Script script) { 277 LibraryElement runCompilerSelective(Script script) {
278 mainApp = new LibraryElement(script); 278 mainApp = new LibraryElement(script);
279 279
280 universe.libraries.remove(script.uri.toString()); 280 universe.libraries.remove(script.uri.toString());
281 Element element; 281 Element element;
282 withCurrentElement(mainApp, () { 282 withCurrentElement(mainApp, () {
283 scanner.scan(mainApp); 283 scanner.scan(mainApp);
284 }); 284 });
285 return mainApp; 285 return mainApp;
286 } 286 }
287 } 287 }
OLDNEW
« no previous file with comments | « lib/compiler/implementation/types/concrete_types_inferrer.dart ('k') | lib/core/date.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698