| 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 #ifndef RUNTIME_VM_BOOTSTRAP_H_ | 5 #ifndef RUNTIME_VM_BOOTSTRAP_H_ |
| 6 #define RUNTIME_VM_BOOTSTRAP_H_ | 6 #define RUNTIME_VM_BOOTSTRAP_H_ |
| 7 | 7 |
| 8 #include "include/dart_api.h" | 8 #include "include/dart_api.h" |
| 9 #include "vm/allocation.h" | 9 #include "vm/allocation.h" |
| 10 | 10 |
| 11 namespace dart { | 11 namespace dart { |
| 12 | 12 |
| 13 // Forward declarations. | 13 // Forward declarations. |
| 14 class RawError; | 14 class RawError; |
| 15 | 15 |
| 16 class Bootstrap : public AllStatic { | 16 class Bootstrap : public AllStatic { |
| 17 public: | 17 public: |
| 18 static RawError* LoadandCompileScripts(); | 18 // Compile the bootstrap libraries, either from sources or a Kernel binary. |
| 19 // If kernel_buffer is NULL, compile from sources or source paths linked into |
| 20 // the VM. If it is non-NULL it represents a buffer holding a Kernel binary. |
| 21 // The caller of this function is responsible for managing the kernel |
| 22 // buffer's memory, and is welcome to deallocate it after this function |
| 23 // returns. |
| 24 static RawError* DoBootstrapping(const uint8_t* kernel_buffer, |
| 25 intptr_t kernel_buffer_length); |
| 26 |
| 19 static void SetupNativeResolver(); | 27 static void SetupNativeResolver(); |
| 20 static bool IsBootstapResolver(Dart_NativeEntryResolver resolver); | 28 static bool IsBootstapResolver(Dart_NativeEntryResolver resolver); |
| 21 | 29 |
| 22 // Source path mapping for library URI and 'parts'. | 30 // Source path mapping for library URI and 'parts'. |
| 23 static const char* async_source_paths_[]; | 31 static const char* async_source_paths_[]; |
| 24 static const char* core_source_paths_[]; | 32 static const char* core_source_paths_[]; |
| 25 static const char* collection_source_paths_[]; | 33 static const char* collection_source_paths_[]; |
| 26 static const char* convert_source_paths_[]; | 34 static const char* convert_source_paths_[]; |
| 27 static const char* developer_source_paths_[]; | 35 static const char* developer_source_paths_[]; |
| 28 static const char* _internal_source_paths_[]; | 36 static const char* _internal_source_paths_[]; |
| 29 static const char* isolate_source_paths_[]; | 37 static const char* isolate_source_paths_[]; |
| 30 static const char* json_source_paths_[]; | 38 static const char* json_source_paths_[]; |
| 31 static const char* math_source_paths_[]; | 39 static const char* math_source_paths_[]; |
| 32 static const char* mirrors_source_paths_[]; | 40 static const char* mirrors_source_paths_[]; |
| 33 static const char* profiler_source_paths_[]; | 41 static const char* profiler_source_paths_[]; |
| 34 static const char* typed_data_source_paths_[]; | 42 static const char* typed_data_source_paths_[]; |
| 35 static const char* utf_source_paths_[]; | 43 static const char* utf_source_paths_[]; |
| 36 static const char* _vmservice_source_paths_[]; | 44 static const char* _vmservice_source_paths_[]; |
| 37 | 45 |
| 38 // Source path mapping for patch URI and 'parts'. | 46 // Source path mapping for patch URI and 'parts'. |
| 39 static const char* async_patch_paths_[]; | 47 static const char* async_patch_paths_[]; |
| 40 static const char* core_patch_paths_[]; | 48 static const char* core_patch_paths_[]; |
| 41 static const char* collection_patch_paths_[]; | 49 static const char* collection_patch_paths_[]; |
| 42 static const char* convert_patch_paths_[]; | 50 static const char* convert_patch_paths_[]; |
| 43 static const char* developer_patch_paths_[]; | 51 static const char* developer_patch_paths_[]; |
| 44 static const char* _internal_patch_paths_[]; | 52 static const char* _internal_patch_paths_[]; |
| 45 static const char* isolate_patch_paths_[]; | 53 static const char* isolate_patch_paths_[]; |
| 46 static const char* math_patch_paths_[]; | 54 static const char* math_patch_paths_[]; |
| 47 static const char* mirrors_patch_paths_[]; | 55 static const char* mirrors_patch_paths_[]; |
| 48 static const char* profiler_patch_paths_[]; | |
| 49 static const char* typed_data_patch_paths_[]; | |
| 50 static const char* _vmservice_patch_paths_[]; | 56 static const char* _vmservice_patch_paths_[]; |
| 57 |
| 58 // NULL patch paths for libraries that do not have patch files. |
| 59 static const char** profiler_patch_paths_; |
| 60 static const char** typed_data_patch_paths_; |
| 51 }; | 61 }; |
| 52 | 62 |
| 53 } // namespace dart | 63 } // namespace dart |
| 54 | 64 |
| 55 #endif // RUNTIME_VM_BOOTSTRAP_H_ | 65 #endif // RUNTIME_VM_BOOTSTRAP_H_ |
| OLD | NEW |