Replace string.len with bytecode builtin.

This commit is contained in:
Mike Pall
2013-04-26 18:40:39 +02:00
parent 47fa9a8d8f
commit f9421f2b9f
8 changed files with 24 additions and 54 deletions

View File

@@ -2202,15 +2202,6 @@ static void build_subroutines(BuildCtx *ctx)
|
|//-- String library -----------------------------------------------------
|
|.ffunc_1 string_len
| cmp dword [BASE+4], LJ_TSTR; jne ->fff_fallback
| mov STR:RB, [BASE]
|.if DUALNUM
| mov RB, dword STR:RB->len; jmp ->fff_resi
|.else
| cvtsi2sd xmm0, dword STR:RB->len; jmp ->fff_resxmm0
|.endif
|
|.ffunc string_byte // Only handle the 1-arg case here.
| cmp NARGS:RD, 1+1; jne ->fff_fallback
| cmp dword [BASE+4], LJ_TSTR; jne ->fff_fallback