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

Side by Side Diff: dart/frog/leg/compiler.dart

Issue 9813012: Add "mock" compilation feature to dart2js and use it to improve test coverage. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Address review comments Created 8 years, 9 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) 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 class WorkItem { 5 class WorkItem {
6 final Element element; 6 final Element element;
7 TreeElements resolutionTree; 7 TreeElements resolutionTree;
8 Function run; 8 Function run;
9 Map<int, BailoutInfo> bailouts = null; 9 Map<int, BailoutInfo> bailouts = null;
10 bool allowSpeculativeOptimization = true; 10 bool allowSpeculativeOptimization = true;
(...skipping 452 matching lines...) Expand 10 before | Expand all | Expand 10 after
463 463
464 Script readScript(Uri uri, [ScriptTag node]) { 464 Script readScript(Uri uri, [ScriptTag node]) {
465 unimplemented('Compiler.readScript'); 465 unimplemented('Compiler.readScript');
466 } 466 }
467 467
468 String get legDirectory() { 468 String get legDirectory() {
469 unimplemented('Compiler.legDirectory'); 469 unimplemented('Compiler.legDirectory');
470 } 470 }
471 471
472 Element findHelper(SourceString name) => jsHelperLibrary.find(name); 472 Element findHelper(SourceString name) => jsHelperLibrary.find(name);
473
474 bool get isMockCompilation() => false;
473 } 475 }
474 476
475 class CompilerTask { 477 class CompilerTask {
476 final Compiler compiler; 478 final Compiler compiler;
477 final Stopwatch watch; 479 final Stopwatch watch;
478 480
479 CompilerTask(this.compiler) : watch = new Stopwatch(); 481 CompilerTask(this.compiler) : watch = new Stopwatch();
480 482
481 String get name() => 'Unknown task'; 483 String get name() => 'Unknown task';
482 int get timing() => watch.elapsedInMs(); 484 int get timing() => watch.elapsedInMs();
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
525 } 527 }
526 } 528 }
527 529
528 class SourceSpan { 530 class SourceSpan {
529 final Uri uri; 531 final Uri uri;
530 final int begin; 532 final int begin;
531 final int end; 533 final int end;
532 534
533 const SourceSpan(this.uri, this.begin, this.end); 535 const SourceSpan(this.uri, this.begin, this.end);
534 } 536 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698