| 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 #include <stdlib.h> | 5 #include <stdlib.h> |
| 6 #include <string.h> | 6 #include <string.h> |
| 7 #include <stdio.h> | 7 #include <stdio.h> |
| 8 | 8 |
| 9 #include "include/dart_api.h" | 9 #include "include/dart_api.h" |
| 10 #include "include/dart_debugger_api.h" | 10 #include "include/dart_debugger_api.h" |
| (...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 270 } | 270 } |
| 271 if (is_dart_scheme_url) { | 271 if (is_dart_scheme_url) { |
| 272 ASSERT(tag == kImportTag); | 272 ASSERT(tag == kImportTag); |
| 273 // Handle imports of other built-in libraries present in the SDK. | 273 // Handle imports of other built-in libraries present in the SDK. |
| 274 if (DartUtils::IsDartIOLibURL(url_string)) { | 274 if (DartUtils::IsDartIOLibURL(url_string)) { |
| 275 return Builtin::LoadLibrary(Builtin::kIOLibrary); | 275 return Builtin::LoadLibrary(Builtin::kIOLibrary); |
| 276 } else if (DartUtils::IsDartJsonLibURL(url_string)) { | 276 } else if (DartUtils::IsDartJsonLibURL(url_string)) { |
| 277 return Builtin::LoadLibrary(Builtin::kJsonLibrary); | 277 return Builtin::LoadLibrary(Builtin::kJsonLibrary); |
| 278 } else if (DartUtils::IsDartUriLibURL(url_string)) { | 278 } else if (DartUtils::IsDartUriLibURL(url_string)) { |
| 279 return Builtin::LoadLibrary(Builtin::kUriLibrary); | 279 return Builtin::LoadLibrary(Builtin::kUriLibrary); |
| 280 } else if (DartUtils::IsDartUtf8LibURL(url_string)) { | 280 } else if (DartUtils::IsDartUtfLibURL(url_string)) { |
| 281 return Builtin::LoadLibrary(Builtin::kUtf8Library); | 281 return Builtin::LoadLibrary(Builtin::kUtfLibrary); |
| 282 } else { | 282 } else { |
| 283 return Dart_Error("Do not know how to load '%s'", url_string); | 283 return Dart_Error("Do not know how to load '%s'", url_string); |
| 284 } | 284 } |
| 285 } else if (is_dart_extension_url) { | 285 } else if (is_dart_extension_url) { |
| 286 if (tag != kImportTag) { | 286 if (tag != kImportTag) { |
| 287 return Dart_Error("Dart extensions must use import: '%s'", url_string); | 287 return Dart_Error("Dart extensions must use import: '%s'", url_string); |
| 288 } | 288 } |
| 289 return Extensions::LoadExtension(url_string, library); | 289 return Extensions::LoadExtension(url_string, library); |
| 290 } | 290 } |
| 291 result = DartUtils::LoadSource(NULL, | 291 result = DartUtils::LoadSource(NULL, |
| (...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 624 DumpPprofSymbolInfo(); | 624 DumpPprofSymbolInfo(); |
| 625 // Shutdown the isolate. | 625 // Shutdown the isolate. |
| 626 Dart_ShutdownIsolate(); | 626 Dart_ShutdownIsolate(); |
| 627 // Terminate event handler. | 627 // Terminate event handler. |
| 628 EventHandler::Terminate(); | 628 EventHandler::Terminate(); |
| 629 // Terminate process exit-code handler. | 629 // Terminate process exit-code handler. |
| 630 Process::TerminateExitCodeHandler(); | 630 Process::TerminateExitCodeHandler(); |
| 631 | 631 |
| 632 return 0; | 632 return 0; |
| 633 } | 633 } |
| OLD | NEW |