From Lua 5.2: Add string.rep(s, n, sep).

This commit is contained in:
Mike Pall
2012-10-07 17:11:39 +02:00
parent 0561a56938
commit 2f5ed5d0df
6 changed files with 40 additions and 13 deletions

View File

@@ -1696,7 +1696,7 @@ static void build_subroutines(BuildCtx *ctx)
|.ffunc string_rep // Only handle the 1-char case inline.
| ffgccheck
| lw TMP0, HI(BASE)
| sltiu AT, NARGS8:RC, 16
| addiu AT, NARGS8:RC, -16 // Exactly 2 arguments.
| lw CARG4, 8+HI(BASE)
| lw STR:CARG1, LO(BASE)
| addiu TMP0, TMP0, -LJ_TSTR