Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
callback.h
Go to the documentation of this file.
1// Copyright (c) 2020, 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_COMPILER_FFI_CALLBACK_H_
6#define RUNTIME_VM_COMPILER_FFI_CALLBACK_H_
7
8#if defined(DART_PRECOMPILED_RUNTIME)
9#error "AOT runtime should not use compiler sources (including header files)"
10#endif // defined(DART_PRECOMPILED_RUNTIME)
11
12#include <platform/globals.h>
13
14#include "vm/object.h"
15#include "vm/raw_object.h"
16
17namespace dart {
18
19namespace compiler {
20
21namespace ffi {
22
23FunctionPtr NativeCallbackFunction(const FunctionType& c_signature,
24 const Function& dart_target,
25 const Instance& exceptional_return,
26 FfiCallbackKind kind);
27
28// Builds a mapping from `callback-id` to code object / ...
29//
30// This mapping is used when a ffi trampoline function is invoked in order to
31// find it's corresponding [Code] object as well as other metadata.
32void SetFfiCallbackCode(Thread* thread,
33 const Function& ffi_trampoline,
34 const Code& code);
35
36} // namespace ffi
37
38} // namespace compiler
39
40} // namespace dart
41
42#endif // RUNTIME_VM_COMPILER_FFI_CALLBACK_H_
void SetFfiCallbackCode(Thread *thread, const Function &ffi_trampoline, const Code &code)
Definition callback.cc:148
FunctionPtr NativeCallbackFunction(const FunctionType &c_signature, const Function &dart_target, const Instance &exceptional_return, FfiCallbackKind kind)
Definition callback.cc:36
FfiCallbackKind
Definition object.h:2964