[vm/ffi] Rename members in NativeApi to not contain nativeApi

Follow up of: https://dart-review.googlesource.com/c/sdk/+/136962

Change-Id: Icdc8e7f701b0dbc7e476a140e68bcb15b3ac64ae
Cq-Include-Trybots: luci.dart.try:vm-ffi-android-debug-arm-try,vm-kernel-precomp-win-release-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/138283
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
This commit is contained in:
Daco Harkes
2020-03-04 15:21:55 +00:00
committed by commit-bot@chromium.org
parent a8c7757589
commit 54903e5bf0
6 changed files with 22 additions and 24 deletions
+1 -1
View File
@@ -26,7 +26,7 @@ main() async {
print("C T2 = Some C thread executing C.");
print("C = C T1 or C T2.");
print("Dart: Setup.");
registerDart_PostCObject(NativeApi.nativeApiPostCObject);
registerDart_PostCObject(NativeApi.postCObject);
final interactiveCppRequests = ReceivePort()..listen(requestExecuteCallback);
final int nativePort = interactiveCppRequests.sendPort.nativePort;
@@ -35,9 +35,9 @@ main() async {
print("C T2 = Some C thread executing C.");
print("C = C T1 or C T2.");
print("Dart: Setup.");
registerDart_PostCObject(NativeApi.nativeApiPostCObject);
registerDart_NewNativePort(NativeApi.nativeApiNewNativePort);
registerDart_CloseNativePort(NativeApi.nativeApiCloseNativePort);
registerDart_PostCObject(NativeApi.postCObject);
registerDart_NewNativePort(NativeApi.newNativePort);
registerDart_CloseNativePort(NativeApi.closeNativePort);
final interactiveCppRequests = ReceivePort()..listen(handleCppRequests);
final int nativePort = interactiveCppRequests.sendPort.nativePort;
+5 -6
View File
@@ -456,10 +456,10 @@ extension NativePort on SendPort {
int _nativeApiFunctionPointer(String symbol) native "NativeApiFunctionPointer";
@patch
class NativeApi {
abstract class NativeApi {
@patch
static Pointer<NativeFunction<Int8 Function(Int64, Pointer<Dart_CObject>)>>
get nativeApiPostCObject =>
get postCObject =>
Pointer.fromAddress(_nativeApiFunctionPointer("Dart_PostCObject"));
@patch
@@ -468,11 +468,10 @@ class NativeApi {
Int64 Function(
Pointer<Uint8>,
Pointer<NativeFunction<Dart_NativeMessageHandler>>,
Int8)>> get nativeApiNewNativePort =>
Int8)>> get newNativePort =>
Pointer.fromAddress(_nativeApiFunctionPointer("Dart_NewNativePort"));
@patch
static Pointer<NativeFunction<Int8 Function(Int64)>>
get nativeApiCloseNativePort => Pointer.fromAddress(
_nativeApiFunctionPointer("Dart_CloseNativePort"));
static Pointer<NativeFunction<Int8 Function(Int64)>> get closeNativePort =>
Pointer.fromAddress(_nativeApiFunctionPointer("Dart_CloseNativePort"));
}
+4 -4
View File
@@ -629,13 +629,13 @@ class Dart_CObject extends Struct {}
typedef Dart_NativeMessageHandler = Void Function(Int64, Pointer<Dart_CObject>);
/// Exposes function pointers to functions in `dart_native_api.h`.
class NativeApi {
abstract class NativeApi {
/// A function pointer to
/// `bool Dart_PostCObject(Dart_Port port_id, Dart_CObject* message)`
/// in `dart_native_api.h`.
external static Pointer<
NativeFunction<Int8 Function(Int64, Pointer<Dart_CObject>)>>
get nativeApiPostCObject;
get postCObject;
/// A function pointer to
/// ```
@@ -649,11 +649,11 @@ class NativeApi {
Int64 Function(
Pointer<Uint8>,
Pointer<NativeFunction<Dart_NativeMessageHandler>>,
Int8)>> get nativeApiNewNativePort;
Int8)>> get newNativePort;
/// A function pointer to
/// `bool Dart_CloseNativePort(Dart_Port native_port_id)`
/// in `dart_native_api.h`.
external static Pointer<NativeFunction<Int8 Function(Int64)>>
get nativeApiCloseNativePort;
get closeNativePort;
}
+5 -6
View File
@@ -454,10 +454,10 @@ extension NativePort on SendPort {
int _nativeApiFunctionPointer(String symbol) native "NativeApiFunctionPointer";
@patch
class NativeApi {
abstract class NativeApi {
@patch
static Pointer<NativeFunction<Int8 Function(Int64, Pointer<Dart_CObject>)>>
get nativeApiPostCObject =>
get postCObject =>
Pointer.fromAddress(_nativeApiFunctionPointer("Dart_PostCObject"));
@patch
@@ -466,11 +466,10 @@ class NativeApi {
Int64 Function(
Pointer<Uint8>,
Pointer<NativeFunction<Dart_NativeMessageHandler>>,
Int8)>> get nativeApiNewNativePort =>
Int8)>> get newNativePort =>
Pointer.fromAddress(_nativeApiFunctionPointer("Dart_NewNativePort"));
@patch
static Pointer<NativeFunction<Int8 Function(Int64)>>
get nativeApiCloseNativePort => Pointer.fromAddress(
_nativeApiFunctionPointer("Dart_CloseNativePort"));
static Pointer<NativeFunction<Int8 Function(Int64)>> get closeNativePort =>
Pointer.fromAddress(_nativeApiFunctionPointer("Dart_CloseNativePort"));
}
+4 -4
View File
@@ -628,13 +628,13 @@ class Dart_CObject extends Struct {}
typedef Dart_NativeMessageHandler = Void Function(Int64, Pointer<Dart_CObject>);
/// Exposes function pointers to functions in `dart_native_api.h`.
class NativeApi {
abstract class NativeApi {
/// A function pointer to
/// `bool Dart_PostCObject(Dart_Port port_id, Dart_CObject* message)`
/// in `dart_native_api.h`.
external static Pointer<
NativeFunction<Int8 Function(Int64, Pointer<Dart_CObject>)>>
get nativeApiPostCObject;
get postCObject;
/// A function pointer to
/// ```
@@ -648,11 +648,11 @@ class NativeApi {
Int64 Function(
Pointer<Uint8>,
Pointer<NativeFunction<Dart_NativeMessageHandler>>,
Int8)>> get nativeApiNewNativePort;
Int8)>> get newNativePort;
/// A function pointer to
/// `bool Dart_CloseNativePort(Dart_Port native_port_id)`
/// in `dart_native_api.h`.
external static Pointer<NativeFunction<Int8 Function(Int64)>>
get nativeApiCloseNativePort;
get closeNativePort;
}