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

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

Issue 8462004: Integrate leg as a component in test.py. Also update presubmit script to run tests with leg. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 9 years, 1 month 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) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 Compiler implements Canceler, Logger { 5 class Compiler implements Canceler, Logger {
6 final Script script; 6 final Script script;
7 Queue<SourceString> worklist; 7 Queue<SourceString> worklist;
8 Universe universe; 8 Universe universe;
9 9
10 List<CompilerTask> tasks; 10 List<CompilerTask> tasks;
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 } catch (CompilerCancelledException exception) { 43 } catch (CompilerCancelledException exception) {
44 log(exception.toString()); 44 log(exception.toString());
45 log('compilation failed'); 45 log('compilation failed');
46 return false; 46 return false;
47 } 47 }
48 // TODO(floitsch): the following code can be removed once the HTracer 48 // TODO(floitsch): the following code can be removed once the HTracer
49 // writes directly into a file. 49 // writes directly into a file.
50 if (GENERATE_SSA_TRACE) { 50 if (GENERATE_SSA_TRACE) {
51 print("------------------"); 51 print("------------------");
52 print(new HTracer.singleton()); 52 print(new HTracer.singleton());
53 print("------------------"); 53 print("------------------");
54 } 54 }
55 log('compilation succeeded'); 55 log('compilation succeeded');
56 return true; 56 return true;
57 } 57 }
58 58
59 void runCompiler() { 59 void runCompiler() {
60 scanner.scan(script); 60 scanner.scan(script);
61 while (!worklist.isEmpty()) { 61 while (!worklist.isEmpty()) {
62 SourceString name = worklist.removeLast(); 62 SourceString name = worklist.removeLast();
63 Element element = universe.find(name); 63 Element element = universe.find(name);
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 var print = (typeof console == 'object') 120 var print = (typeof console == 'object')
121 ? function(obj) { console.log(obj); } 121 ? function(obj) { console.log(obj); }
122 : function(obj) { write(obj); write('\\n'); }; 122 : function(obj) { write(obj); write('\\n'); };
123 """; 123 """;
124 124
125 final String ADD_SUPPORT = """ 125 final String ADD_SUPPORT = """
126 function \$add(a, b) { 126 function \$add(a, b) {
127 return a + b; 127 return a + b;
128 } 128 }
129 """; 129 """;
OLDNEW
« no previous file with comments | « dart/frog/frogsh ('k') | dart/frog/leg/scanner/listener.dart » ('j') | dart/frog/presubmit.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698