dart-sdk/runtime/vm/native_function.h
Vyacheslav Egorov bda70c8489 [vm] Remove support for dart-ext: imports
Per breaking change #45451 we are removing support for dart-ext:
style native extensions from the Dart VM.

This CL removes the associated VM code, tests and samples. It also ports
a single test which used dart-ext: import to use FFI instead.

TEST=ci

Bug: https://github.com/dart-lang/sdk/issues/45451
Change-Id: Iae984bce32baf29a950b5de1323939006a217b94
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/212050
Commit-Queue: Slava Egorov <vegorov@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2021-09-02 14:14:35 +00:00

35 lines
1.3 KiB
C++

// Copyright (c) 2011, 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_VM_NATIVE_FUNCTION_H_
#define RUNTIME_VM_NATIVE_FUNCTION_H_
#include "vm/allocation.h"
#include "include/dart_api.h"
namespace dart {
// Forward declarations.
class NativeArguments;
// We have three variants of native functions:
// - bootstrap natives, which are called directly from stub code. The callee is
// responsible for safepoint transitions and setting up handle scopes as
// needed. Only VM-defined natives are bootstrap natives; they cannot be
// defined by embedders.
// - no scope natives, which are called through a wrapper function. The wrapper
// function handles the safepoint transition. The callee is responsible for
// setting up API scopes as needed.
// - auto scope natives, which are called through a wrapper function. The
// wrapper function handles the safepoint transition and sets up an API
// scope.
typedef void (*NativeFunction)(NativeArguments* arguments);
typedef void (*NativeFunctionWrapper)(Dart_NativeArguments args,
Dart_NativeFunction func);
} // namespace dart
#endif // RUNTIME_VM_NATIVE_FUNCTION_H_