瀏覽代碼

FFI: Compile array/struct copies.

Mike Pall 13 年之前
父節點
當前提交
4a97faef7e
共有 2 個文件被更改,包括 3 次插入4 次删除
  1. 0 1
      doc/ext_ffi_semantics.html
  2. 3 3
      src/lj_crecord.c

+ 0 - 1
doc/ext_ffi_semantics.html

@@ -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>

+ 3 - 3
src/lj_crecord.c

@@ -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: