| 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 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 328 } | 328 } |
| 329 Dart_Handle dart_args[2]; | 329 Dart_Handle dart_args[2]; |
| 330 dart_args[0] = library_url; | 330 dart_args[0] = library_url; |
| 331 dart_args[1] = url; | 331 dart_args[1] = url; |
| 332 return Dart_Invoke( | 332 return Dart_Invoke( |
| 333 builtin_lib, Dart_NewString("_resolveUri"), 2, dart_args); | 333 builtin_lib, Dart_NewString("_resolveUri"), 2, dart_args); |
| 334 } | 334 } |
| 335 if (is_dart_scheme_url) { | 335 if (is_dart_scheme_url) { |
| 336 ASSERT(tag == kImportTag); | 336 ASSERT(tag == kImportTag); |
| 337 // Handle imports of other built-in libraries present in the SDK. | 337 // Handle imports of other built-in libraries present in the SDK. |
| 338 if (DartUtils::IsDartIOLibURL(url_string)) { | 338 if (DartUtils::IsDartCryptoLibURL(url_string)) { |
| 339 return Builtin::LoadLibrary(Builtin::kCryptoLibrary); |
| 340 } else if (DartUtils::IsDartIOLibURL(url_string)) { |
| 339 return Builtin::LoadLibrary(Builtin::kIOLibrary); | 341 return Builtin::LoadLibrary(Builtin::kIOLibrary); |
| 340 } else if (DartUtils::IsDartJsonLibURL(url_string)) { | 342 } else if (DartUtils::IsDartJsonLibURL(url_string)) { |
| 341 return Builtin::LoadLibrary(Builtin::kJsonLibrary); | 343 return Builtin::LoadLibrary(Builtin::kJsonLibrary); |
| 342 } else if (DartUtils::IsDartUriLibURL(url_string)) { | 344 } else if (DartUtils::IsDartUriLibURL(url_string)) { |
| 343 return Builtin::LoadLibrary(Builtin::kUriLibrary); | 345 return Builtin::LoadLibrary(Builtin::kUriLibrary); |
| 344 } else if (DartUtils::IsDartUtfLibURL(url_string)) { | 346 } else if (DartUtils::IsDartUtfLibURL(url_string)) { |
| 345 return Builtin::LoadLibrary(Builtin::kUtfLibrary); | 347 return Builtin::LoadLibrary(Builtin::kUtfLibrary); |
| 346 } else { | 348 } else { |
| 347 return Dart_Error("Do not know how to load '%s'", url_string); | 349 return Dart_Error("Do not know how to load '%s'", url_string); |
| 348 } | 350 } |
| (...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 695 Dart_ShutdownIsolate(); | 697 Dart_ShutdownIsolate(); |
| 696 // Terminate process exit-code handler. | 698 // Terminate process exit-code handler. |
| 697 Process::TerminateExitCodeHandler(); | 699 Process::TerminateExitCodeHandler(); |
| 698 | 700 |
| 699 free(const_cast<char*>(original_script_name)); | 701 free(const_cast<char*>(original_script_name)); |
| 700 free(const_cast<char*>(original_working_directory)); | 702 free(const_cast<char*>(original_working_directory)); |
| 701 free(const_cast<char*>(original_script_url)); | 703 free(const_cast<char*>(original_script_url)); |
| 702 | 704 |
| 703 return 0; | 705 return 0; |
| 704 } | 706 } |
| OLD | NEW |