From 2388a7fcc017b9e9a75a4674aa81933b510882f7 Mon Sep 17 00:00:00 2001 From: Mike Pall Date: Tue, 8 Feb 2011 01:20:53 +0100 Subject: [PATCH] FFI: Document current FFI implementation status. --- doc/ext_ffi_semantics.html | 91 ++++++++++++++++++++++++++++++++++---- 1 file changed, 82 insertions(+), 9 deletions(-) diff --git a/doc/ext_ffi_semantics.html b/doc/ext_ffi_semantics.html index 4a1b6c11..9b7cac70 100644 --- a/doc/ext_ffi_semantics.html +++ b/doc/ext_ffi_semantics.html @@ -128,13 +128,13 @@ TODO

Garbage Collection of cdata Objects

-All explicitly (ffi.new() etc.) or implicitly (accessors) -created cdata objects are garbage collected. You need to ensure to -retain valid references to cdata objects somewhere on a Lua stack, an -upvalue or in a Lua table while they are still in use. Once the last -reference to a cdata object is gone, the garbage collector will -automatically free the memory used by it (at the end of the next GC -cycle). +All explicitly (ffi.new(), ffi.cast() etc.) or +implicitly (accessors) created cdata objects are garbage collected. +You need to ensure to retain valid references to cdata objects +somewhere on a Lua stack, an upvalue or in a Lua table while they are +still in use. Once the last reference to a cdata object is gone, the +garbage collector will automatically free the memory used by it (at +the end of the next GC cycle).

Please note that pointers themselves are cdata objects, however they @@ -176,12 +176,85 @@ ffi.C.printf("integer value: %d\n", ffi.new("int", x)) -- Current Status +

+The initial release of the FFI library has some limitations and is +missing some features. Most of these will be fixed in future releases. +

+

+C language support is +currently incomplete: +

+ +

+The JIT compiler already handles a large subset of all FFI operations. +It automatically falls back to the interpreter for unimplemented +operations (you can check for this with the +-jv command line option). +The following operations are currently not compiled and may exhibit +suboptimal performance, especially when used in inner loops: +

+ +

+Other missing features: +

+