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

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

Issue 9309061: Implement script tags. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
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
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 10
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 while (!worklist.isEmpty()) { 210 while (!worklist.isEmpty()) {
211 WorkItem work = worklist.removeLast(); 211 WorkItem work = worklist.removeLast();
212 withCurrentElement(work.element, () => (work.run)(this)); 212 withCurrentElement(work.element, () => (work.run)(this));
213 } 213 }
214 enqueueInvokedInstanceMethods(); 214 enqueueInvokedInstanceMethods();
215 } while (!worklist.isEmpty()); 215 } while (!worklist.isEmpty());
216 emitter.assembleProgram(); 216 emitter.assembleProgram();
217 } 217 }
218 218
219 TreeElements analyzeElement(Element element) { 219 TreeElements analyzeElement(Element element) {
220 assert(parser !== null);
220 Node tree = parser.parse(element); 221 Node tree = parser.parse(element);
221 validator.validate(tree); 222 validator.validate(tree);
222 TreeElements elements = resolver.resolve(element); 223 TreeElements elements = resolver.resolve(element);
223 checker.check(tree, elements); 224 checker.check(tree, elements);
224 return elements; 225 return elements;
225 } 226 }
226 227
227 TreeElements analyze(WorkItem work) { 228 TreeElements analyze(WorkItem work) {
228 work.resolutionTree = analyzeElement(work.element); 229 work.resolutionTree = analyzeElement(work.element);
229 return work.resolutionTree; 230 return work.resolutionTree;
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
336 337
337 class CompilerCancelledException implements Exception { 338 class CompilerCancelledException implements Exception {
338 final String reason; 339 final String reason;
339 CompilerCancelledException(this.reason); 340 CompilerCancelledException(this.reason);
340 341
341 String toString() { 342 String toString() {
342 String banner = 'compiler cancelled'; 343 String banner = 'compiler cancelled';
343 return (reason !== null) ? '$banner: $reason' : '$banner'; 344 return (reason !== null) ? '$banner: $reason' : '$banner';
344 } 345 }
345 } 346 }
OLDNEW
« no previous file with comments | « no previous file | dart/frog/leg/elements/elements.dart » ('j') | dart/frog/leg/scanner/scanner_task.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698