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 |
3 | // BSD-style license that can be found in the LICENSE file. |
4 | |
5 | #ifndef RUNTIME_VM_BOOTSTRAP_H_ |
6 | #define RUNTIME_VM_BOOTSTRAP_H_ |
7 | |
8 | #include "include/dart_api.h" |
9 | #include "vm/allocation.h" |
10 | #include "vm/tagged_pointer.h" |
11 | |
12 | namespace dart { |
13 | |
14 | // Forward declarations. |
15 | namespace kernel { |
16 | class Program; |
17 | } |
18 | |
19 | class Bootstrap : public AllStatic { |
20 | public: |
21 | // Compile the bootstrap libraries, either from sources or a Kernel program. |
22 | // If program is NULL, compile from sources or source paths linked into |
23 | // the VM. If it is non-NULL it represents the Kernel program to use for |
24 | // bootstrapping. |
25 | // The caller of this function is responsible for managing the kernel |
26 | // program's memory. |
27 | static ErrorPtr DoBootstrapping(const uint8_t* kernel_buffer, |
28 | intptr_t kernel_buffer_size); |
29 | |
30 | static void SetupNativeResolver(); |
31 | static bool IsBootstrapResolver(Dart_NativeEntryResolver resolver); |
32 | }; |
33 | |
34 | } // namespace dart |
35 | |
36 | #endif // RUNTIME_VM_BOOTSTRAP_H_ |
37 | |