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

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

Issue 9418045: Support for native in leg, and start moving native tests to a specific test suite. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 10 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 | « no previous file | frog/leg/elements/elements.dart » ('j') | frog/leg/emitter.dart » ('J')
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 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 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 } 246 }
247 } 247 }
248 } 248 }
249 } 249 }
250 } 250 }
251 } 251 }
252 252
253 void runCompiler(Script script) { 253 void runCompiler(Script script) {
254 scanBuiltinLibraries(); 254 scanBuiltinLibraries();
255 mainApp = new LibraryElement(script); 255 mainApp = new LibraryElement(script);
256 if (script.name.contains('dart/frog/tests/native/src')) {
ahe 2012/02/19 14:38:02 I like this.
Lasse Reichstein Nielsen 2012/02/20 07:33:56 I would prefer to have it only enabled by a flag (
ngeoffray 2012/02/20 17:00:02 As discussed, that's half-way intended :)
257 mainApp.define(new ForeignElement(
258 const SourceString('native'), mainApp), this);
259 }
260
256 Element element; 261 Element element;
257 withCurrentElement(mainApp, () { 262 withCurrentElement(mainApp, () {
258 scanner.scan(currentElement); 263 scanner.scan(currentElement);
259 element = mainApp.find(MAIN); 264 element = mainApp.find(MAIN);
260 if (element === null) cancel('Could not find $MAIN'); 265 if (element === null) cancel('Could not find $MAIN');
261 }); 266 });
262 worklist.add(new WorkItem.toCompile(element)); 267 worklist.add(new WorkItem.toCompile(element));
263 do { 268 do {
264 while (!worklist.isEmpty()) { 269 while (!worklist.isEmpty()) {
265 WorkItem work = worklist.removeLast(); 270 WorkItem work = worklist.removeLast();
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
399 404
400 class CompilerCancelledException implements Exception { 405 class CompilerCancelledException implements Exception {
401 final String reason; 406 final String reason;
402 CompilerCancelledException(this.reason); 407 CompilerCancelledException(this.reason);
403 408
404 String toString() { 409 String toString() {
405 String banner = 'compiler cancelled'; 410 String banner = 'compiler cancelled';
406 return (reason !== null) ? '$banner: $reason' : '$banner'; 411 return (reason !== null) ? '$banner: $reason' : '$banner';
407 } 412 }
408 } 413 }
OLDNEW
« no previous file with comments | « no previous file | frog/leg/elements/elements.dart » ('j') | frog/leg/emitter.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698