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

@@ -1706,12 +1706,6 @@ static void build_subroutines(BuildCtx *ctx)
|
|//-- String library -----------------------------------------------------
|
|.ffunc_1 string_len
| checkstr CARG2, ->fff_fallback
| ldr CARG1, STR:CARG1->len
| mvn CARG2, #~LJ_TISNUM
| b ->fff_restv
|
|.ffunc string_byte // Only handle the 1-arg case here.
| ldrd CARG12, [BASE]
| ldr PC, [BASE, FRAME_PC]