| OLD | NEW |
| 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 compilerIsolate(port) { | 5 compilerIsolate(port) { |
| 6 Runner runner = new Runner(); | 6 Runner runner = new Runner(); |
| 7 runner.init(); | 7 runner.init(); |
| 8 | 8 |
| 9 port.receive((msg, replyTo) { | 9 port.receive((msg, replyTo) { |
| 10 replyTo.send(runner.update(msg)); | 10 replyTo.send(runner.update(msg)); |
| (...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 212 final bool throwOnError = false; | 212 final bool throwOnError = false; |
| 213 | 213 |
| 214 final libDir = "../.."; | 214 final libDir = "../.."; |
| 215 | 215 |
| 216 LeapCompiler() : cache = new HttpRequestCache(), super() { | 216 LeapCompiler() : cache = new HttpRequestCache(), super() { |
| 217 tasks = [scanner, dietParser, parser, resolver, checker]; | 217 tasks = [scanner, dietParser, parser, resolver, checker]; |
| 218 } | 218 } |
| 219 | 219 |
| 220 void log(message) { print(message); } | 220 void log(message) { print(message); } |
| 221 | 221 |
| 222 String get legDirectory() => libDir; | 222 String get legDirectory => libDir; |
| 223 | 223 |
| 224 LibraryElement scanBuiltinLibrary(String path) { | 224 LibraryElement scanBuiltinLibrary(String path) { |
| 225 Uri base = new Uri.fromString(html.window.location.toString()); | 225 Uri base = new Uri.fromString(html.window.location.toString()); |
| 226 Uri libraryRoot = base.resolve(libDir); | 226 Uri libraryRoot = base.resolve(libDir); |
| 227 Uri resolved = libraryRoot.resolve(DART2JS_LIBRARY_MAP[path]); | 227 Uri resolved = libraryRoot.resolve(DART2JS_LIBRARY_MAP[path]); |
| 228 LibraryElement library = scanner.loadLibrary(resolved, null); | 228 LibraryElement library = scanner.loadLibrary(resolved, null); |
| 229 return library; | 229 return library; |
| 230 } | 230 } |
| 231 | 231 |
| 232 currentScript() { | 232 currentScript() { |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 278 mainApp = new LibraryElement(script); | 278 mainApp = new LibraryElement(script); |
| 279 | 279 |
| 280 universe.libraries.remove(script.uri.toString()); | 280 universe.libraries.remove(script.uri.toString()); |
| 281 Element element; | 281 Element element; |
| 282 withCurrentElement(mainApp, () { | 282 withCurrentElement(mainApp, () { |
| 283 scanner.scan(mainApp); | 283 scanner.scan(mainApp); |
| 284 }); | 284 }); |
| 285 return mainApp; | 285 return mainApp; |
| 286 } | 286 } |
| 287 } | 287 } |
| OLD | NEW |