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

Side by Side Diff: frog/leg/scanner/scanner_task.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
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 ScannerTask extends CompilerTask { 5 class ScannerTask extends CompilerTask {
6 ScannerTask(Compiler compiler) : super(compiler); 6 ScannerTask(Compiler compiler) : super(compiler);
7 String get name() => 'Scanner'; 7 String get name() => 'Scanner';
8 8
9 void scan(CompilationUnitElement compilationUnit) { 9 void scan(CompilationUnitElement compilationUnit) {
10 measure(() { 10 measure(() {
11 scanElements(compilationUnit); 11 scanElements(compilationUnit);
12 if (compilationUnit.kind === ElementKind.LIBRARY) { 12 if (compilationUnit.kind === ElementKind.LIBRARY) {
13 processScriptTags(compilationUnit); 13 processScriptTags(compilationUnit);
14 } 14 }
15 native.processNativeClasses(compiler, compilationUnit);
15 }); 16 });
16 } 17 }
17 18
18 void processScriptTags(LibraryElement library) { 19 void processScriptTags(LibraryElement library) {
19 LinkBuilder<ScriptTag> imports = new LinkBuilder<ScriptTag>(); 20 LinkBuilder<ScriptTag> imports = new LinkBuilder<ScriptTag>();
20 Uri cwd = new Uri(scheme: 'file', path: compiler.currentDirectory); 21 Uri cwd = new Uri(scheme: 'file', path: compiler.currentDirectory);
21 Uri base = cwd.resolve(library.script.name.toString()); 22 Uri base = cwd.resolve(library.script.name.toString());
22 for (ScriptTag tag in library.tags.reverse()) { 23 for (ScriptTag tag in library.tags.reverse()) {
23 SourceString argument = tag.argument.value.copyWithoutQuotes(1, 1); 24 SourceString argument = tag.argument.value.copyWithoutQuotes(1, 1);
24 Uri resolved = base.resolve(argument.toString()); 25 Uri resolved = base.resolve(argument.toString());
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 } else { 106 } else {
106 for (Link<Element> link = imported.topLevelElements; !link.isEmpty(); 107 for (Link<Element> link = imported.topLevelElements; !link.isEmpty();
107 link = link.tail) { 108 link = link.tail) {
108 compiler.withCurrentElement(link.head, () { 109 compiler.withCurrentElement(link.head, () {
109 library.define(link.head, compiler); 110 library.define(link.head, compiler);
110 }); 111 });
111 } 112 }
112 } 113 }
113 } 114 }
114 } 115 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698