5#ifndef RUNTIME_BIN_DFE_H_
6#define RUNTIME_BIN_DFE_H_
35 if (frontend_filename_ !=
nullptr) {
36 free(frontend_filename_);
45 use_incremental_compiler_ =
value;
61 application_kernel_buffer_ =
buffer;
62 application_kernel_buffer_size_ =
size;
65 *
buffer = application_kernel_buffer_;
66 *
size = application_kernel_buffer_size_;
76 const char* package_config,
88 uint8_t** kernel_buffer,
89 intptr_t* kernel_buffer_size,
92 const char* package_config,
106 uint8_t** kernel_buffer,
107 intptr_t* kernel_buffer_size,
108 bool decode_uri =
true,
109 std::shared_ptr<uint8_t>* kernel_blob_ptr =
nullptr);
124 uint8_t** kernel_buffer,
125 intptr_t* kernel_buffer_size,
126 bool decode_uri =
true,
127 std::shared_ptr<uint8_t>* kernel_blob_ptr =
nullptr);
136 intptr_t* kernel_buffer_size);
138 intptr_t* kernel_service_buffer_size);
145 intptr_t kernel_buffer_size);
151 intptr_t* kernel_length);
158 bool use_incremental_compiler_;
159 char* frontend_filename_;
164 uint8_t* application_kernel_buffer_;
165 intptr_t application_kernel_buffer_size_;
169 intptr_t kernel_blob_counter_ = 0;
170 Mutex kernel_blobs_lock_;
172 void InitKernelServiceAndPlatformDills();
174 DISALLOW_COPY_AND_ASSIGN(
DFE);
183 std::shared_ptr<uint8_t>
buffer() {
return buffer_; }
184 intptr_t
size()
const {
return size_; }
188 std::shared_ptr<uint8_t> buffer_;
189 const intptr_t size_;
200#if defined(DART_HOST_OS_WINDOWS)
201 std::unique_ptr<char[]> sanitized_uri_;
203 const char* sanitized_uri_;
209#if !defined(DART_PRECOMPILED_RUNTIME)
static char * StrDup(const char *s)
bool TryReadKernelFile(const char *script_uri, const AppSnapshot *app_snapshot, uint8_t **kernel_buffer, intptr_t *kernel_buffer_size, bool decode_uri=true, std::shared_ptr< uint8_t > *kernel_blob_ptr=nullptr)
void CompileAndReadScript(const char *script_uri, uint8_t **kernel_buffer, intptr_t *kernel_buffer_size, char **error, int *exit_code, const char *package_config, bool for_snapshot, bool embed_sources)
bool CanUseDartFrontend() const
void set_use_dfe(bool value=true)
std::shared_ptr< uint8_t > TryFindKernelBlob(const char *uri, intptr_t *kernel_length)
const char * GetPlatformBinaryFilename()
void set_verbosity(Dart_KernelCompilationVerbosityLevel verbosity)
Dart_KernelCompilationVerbosityLevel verbosity() const
void set_frontend_filename(const char *name)
void set_application_kernel_buffer(uint8_t *buffer, intptr_t size)
void set_use_incremental_compiler(bool value)
bool UseDartFrontend() const
bool use_incremental_compiler() const
void LoadPlatform(const uint8_t **kernel_buffer, intptr_t *kernel_buffer_size)
const char * RegisterKernelBlob(const uint8_t *kernel_buffer, intptr_t kernel_buffer_size)
Dart_KernelCompilationResult CompileScript(const char *script_uri, bool incremental, const char *package_config, bool for_snapshot, bool embedd_sources)
bool KernelServiceDillAvailable() const
void application_kernel_buffer(const uint8_t **buffer, intptr_t *size) const
void UnregisterKernelBlob(const char *uri)
void ReadScript(const char *script_uri, const AppSnapshot *app_snapshot, uint8_t **kernel_buffer, intptr_t *kernel_buffer_size, bool decode_uri=true, std::shared_ptr< uint8_t > *kernel_blob_ptr=nullptr)
void LoadKernelService(const uint8_t **kernel_service_buffer, intptr_t *kernel_service_buffer_size)
char * frontend_filename() const
KernelBlob(char *uri, uint8_t *buffer, intptr_t size)
std::shared_ptr< uint8_t > buffer()
const char * sanitized_uri() const
PathSanitizer(const char *path)
Dart_KernelCompilationVerbosityLevel
@ Dart_KernelCompilationVerbosityLevel_All
const uint8_t uint32_t uint32_t GError ** error
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir path
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir Path to the cache directory This is different from the persistent_cache_path in embedder which is used for Skia shader cache icu native lib Path to the library file that exports the ICU data vm service The hostname IP address on which the Dart VM Service should be served If not defaults to or::depending on whether ipv6 is specified vm service A custom Dart VM Service port The default is to pick a randomly available open port disable vm Disable the Dart VM Service The Dart VM Service is never available in release mode disable vm service Disable mDNS Dart VM Service publication Bind to the IPv6 localhost address for the Dart VM Service Ignored if vm service host is set endless trace buffer
it will be possible to load the file into Perfetto s trace viewer disable asset Prevents usage of any non test fonts unless they were explicitly Loaded via prefetched default font Indicates whether the embedding started a prefetch of the default font manager before creating the engine run In non interactive keep the shell running after the Dart script has completed enable serial On low power devices with low core running concurrent GC tasks on threads can cause them to contend with the UI thread which could potentially lead to jank This option turns off all concurrent GC activities domain network JSON encoded network policy per domain This overrides the DisallowInsecureConnections switch Embedder can specify whether to allow or disallow insecure connections at a domain level old gen heap size