Browse Source

ARM: Add table.getn() fast function.

Mike Pall 14 năm trước cách đây
mục cha
commit
16e0ecaf54
1 tập tin đã thay đổi với 5 bổ sung1 xóa
  1. 5 1
      src/buildvm_arm.dasc

+ 5 - 1
src/buildvm_arm.dasc

@@ -1145,7 +1145,11 @@ static void build_subroutines(BuildCtx *ctx)
   |//-- Table library ------------------------------------------------------
   |
   |.ffunc_1 table_getn
-  |  NYI
+  |  checktab CARG2, ->fff_fallback
+  |  bl extern lj_tab_len		// (GCtab *t)
+  |  // Returns uint32_t (but less than 2^31).
+  |  mvn CARG2, #~LJ_TISNUM
+  |  b ->fff_restv
   |
   |//-- Bit library --------------------------------------------------------
   |