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

@@ -1619,13 +1619,6 @@ static void build_subroutines(BuildCtx *ctx)
|
|//-- String library -----------------------------------------------------
|
|.ffunc_1 string_len
| li AT, LJ_TSTR
| bne CARG3, AT, ->fff_fallback
|. nop
| b ->fff_resi
|. lw CRET1, STR:CARG1->len
|
|.ffunc string_byte // Only handle the 1-arg case here.
| lw CARG3, HI(BASE)
| lw STR:CARG1, LO(BASE)