Files
sdk/runtime/bin/kernel_isolate.h
T
Liam Appelbe 9906819fb7 Remove kernel isolate API from the public dart_api.h
This is the first step in moving the kernel isolate out
of the VM and into the standalone embedder.

Bug: https://github.com/dart-lang/sdk/issues/33433
Change-Id: Ie8d9ac1c27efe2661f0441b75275119966d197af
Reviewed-on: https://dart-review.googlesource.com/c/84829
Commit-Queue: Liam Appelbe <liama@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2018-11-26 22:47:20 +00:00

59 lines
1.9 KiB
C++

// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
#ifndef RUNTIME_BIN_KERNEL_ISOLATE_H_
#define RUNTIME_BIN_KERNEL_ISOLATE_H_
#include "include/dart_api.h"
namespace dart {
typedef enum {
Dart_KernelCompilationStatus_Unknown = -1,
Dart_KernelCompilationStatus_Ok = 0,
Dart_KernelCompilationStatus_Error = 1,
Dart_KernelCompilationStatus_Crash = 2,
} Dart_KernelCompilationStatus;
typedef struct {
Dart_KernelCompilationStatus status;
char* error;
uint8_t* kernel;
intptr_t kernel_size;
} Dart_KernelCompilationResult;
DART_EXPORT bool Dart_IsKernelIsolate(Dart_Isolate isolate);
DART_EXPORT bool Dart_KernelIsolateIsRunning();
DART_EXPORT Dart_Port Dart_KernelPort();
DART_EXPORT Dart_KernelCompilationResult
Dart_CompileToKernel(const char* script_uri,
const uint8_t* platform_kernel,
const intptr_t platform_kernel_size,
bool incremental_compile,
const char* package_config);
typedef struct {
const char* uri;
const char* source;
} Dart_SourceFile;
DART_EXPORT Dart_KernelCompilationResult
Dart_CompileSourcesToKernel(const char* script_uri,
const uint8_t* platform_kernel,
intptr_t platform_kernel_size,
int source_files_count,
Dart_SourceFile source_files[],
bool incremental_compile,
const char* package_config,
const char* multiroot_filepaths,
const char* multiroot_scheme);
DART_EXPORT Dart_KernelCompilationResult Dart_KernelListDependencies();
#define DART_KERNEL_ISOLATE_NAME "kernel-service"
} // namespace dart
#endif // RUNTIME_BIN_KERNEL_ISOLATE_H_