Daco Harkes
Daco Harkes
Why inline? Wouldn't you want to generate non-inline functions so that you can actually bind to them from Dart? Depending on how many variadic functions you're looking at, it might...
> It looks like culprit is the way how variadic `ioctl` function is defined in dart https://github.com/timsneath/dart_console/blob/f88ab598bf896878b347013400049d0702eecd0c/lib/src/ffi/unix/ioctl.dart#L35 > > ``` > // int ioctl(int, unsigned long, ...); > typedef IOCtlNative...
When doing FFI calls to variadic functions we need a binding for a specific amount of arguments on the Dart side. We need to generate machine code ahead of time...
> `List args` I believe this will not work, because we need the native types for the arguments at compile time to generate the correct trampoline. (I don't believe every...
> @dcharkes Oh right. For integers and doubles we need the right size. Maybe then: > > ```dart > @FfiNative > external int printf(Pointer fmt, List args); > ``` >...
We can use record types: ```dart /// `int printf(const char *format, ...)` with `int` and `double` as varargs. typedef NativePrintfIntDouble = Int Function(Pointer, VarArgs); ```
Potentially blocked by * https://github.com/dart-lang/sdk/issues/49719 We need at least to be able to traverse the types in the VM. ```dart /// `int printf(const char *format, ...)` with `int` and `double`...
On a different bot: flaky -> timeout. ``` --- Command "vm" (took 02:00.000256s): DART_CONFIGURATION=DebugX64C out/DebugX64C/dart --optimization-counter-threshold=5 --no-background-compilation -Dtest_runner.configuration=dartk-linux-debug-x64c --ignore-unrecognized-flags --packages=/b/s/w/ir/.dart_tool/package_config.json /b/s/w/ir/tests/corelib_2/bigint_from_test.dart exit code: 1 diagnostics: Process list including children: [23286]...
> Currently a `Type` object cannot be reified as a type. The only types that can occur as the types of type variables are types that exist as type arguments...
The callback is invoked on a different thread, which is currently not (yet) supported in `dart:ffi`: https://github.com/dart-lang/sdk/issues/37022. The work around is to use the `dart_api` with its native ports, see...