| 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 <stdio.h> | 5 #include <stdio.h> |
| 6 | 6 |
| 7 #include "include/dart_api.h" | 7 #include "include/dart_api.h" |
| 8 | 8 |
| 9 #include "bin/builtin.h" | 9 #include "bin/builtin.h" |
| 10 #include "bin/dartutils.h" | 10 #include "bin/dartutils.h" |
| 11 | 11 |
| 12 namespace dart { | 12 namespace dart { |
| 13 namespace bin { | 13 namespace bin { |
| 14 | 14 |
| 15 Builtin::builtin_lib_props Builtin::builtin_libraries_[] = { | 15 Builtin::builtin_lib_props Builtin::builtin_libraries_[] = { |
| 16 /* { url_, source_, patch_url_, patch_source_, has_natives_ } */ | 16 /* { url_, source_, patch_url_, patch_source_, has_natives_ } */ |
| 17 { DartUtils::kBuiltinLibURL, builtin_source_paths_, NULL, NULL, true }, | 17 { DartUtils::kBuiltinLibURL, _builtin_source_paths_, NULL, NULL, true }, |
| 18 { DartUtils::kIOLibURL, io_source_paths_, | 18 { DartUtils::kIOLibURL, io_source_paths_, |
| 19 DartUtils::kIOLibPatchURL, io_patch_paths_, true }, | 19 DartUtils::kIOLibPatchURL, io_patch_paths_, true }, |
| 20 }; | 20 }; |
| 21 | 21 |
| 22 | 22 |
| 23 // Patch all the specified patch files in the array 'patch_files' into the | 23 // Patch all the specified patch files in the array 'patch_files' into the |
| 24 // library specified in 'library'. | 24 // library specified in 'library'. |
| 25 static void LoadPatchFiles(Dart_Handle library, | 25 static void LoadPatchFiles(Dart_Handle library, |
| 26 const char* patch_uri, | 26 const char* patch_uri, |
| 27 const char** patch_files) { | 27 const char** patch_files) { |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 Dart_Handle library = Dart_LookupLibrary(url); | 111 Dart_Handle library = Dart_LookupLibrary(url); |
| 112 if (Dart_IsError(library)) { | 112 if (Dart_IsError(library)) { |
| 113 library = LoadLibrary(url, id); | 113 library = LoadLibrary(url, id); |
| 114 } | 114 } |
| 115 DART_CHECK_VALID(library); | 115 DART_CHECK_VALID(library); |
| 116 return library; | 116 return library; |
| 117 } | 117 } |
| 118 | 118 |
| 119 } // namespace bin | 119 } // namespace bin |
| 120 } // namespace dart | 120 } // namespace dart |
| OLD | NEW |