]> git.ipfire.org Git - thirdparty/LuaJIT.git/commitdiff
FFI: Compile array/struct copies.
authorMike Pall <mike>
Tue, 9 Oct 2012 19:50:09 +0000 (21:50 +0200)
committerMike Pall <mike>
Tue, 9 Oct 2012 19:51:30 +0000 (21:51 +0200)
doc/ext_ffi_semantics.html
src/lj_crecord.c

index 498bbbb4fa83638fe87b0456a4802e6f7fd8cbfa..36c3be3210a95051285b4bc64495be0b0e1e07b7 100644 (file)
@@ -1140,7 +1140,6 @@ The following operations are currently not compiled and may exhibit
 suboptimal performance, especially when used in inner loops:
 </p>
 <ul>
-<li>Array/<tt>struct</tt> copies and bulk initializations.</li>
 <li>Bitfield accesses and initializations.</li>
 <li>Vector operations.</li>
 <li>Table initializers.</li>
index 47ae65b41915b23b83976d8b97c303812fb8e515..6a22544a3ad6f034a12175ce3883679ea7ae5ddf 100644 (file)
@@ -526,11 +526,11 @@ static TRef crec_ct_ct(jit_State *J, CType *d, CType *s, TRef dp, TRef sp,
 
   /* Destination is an array. */
   case CCX(A, A):
-    goto err_nyi;
-
   /* Destination is a struct/union. */
   case CCX(S, S):
-    goto err_nyi;
+    if (dp == 0) goto err_conv;
+    crec_copy(J, dp, sp, lj_ir_kint(J, dsize), d);
+    break;
 
   default:
   err_conv: