Fuse string creation into concats. Optimize single-char concats.

This commit is contained in:
Mike Pall
2013-04-23 00:56:03 +02:00
parent 2cdf90f068
commit 557391c3b7
4 changed files with 37 additions and 8 deletions

View File

@@ -25,9 +25,10 @@ LJ_FUNC void LJ_FASTCALL lj_buf_grow(SBuf *sb, char *en);
LJ_FUNC void LJ_FASTCALL lj_buf_shrink(lua_State *L, SBuf *sb);
LJ_FUNC char *lj_buf_wmem(char *p, const void *q, MSize len);
LJ_FUNC void lj_buf_putmem(SBuf *sb, const void *q, MSize len);
LJ_FUNC SBuf * lj_buf_putmem(SBuf *sb, const void *q, MSize len);
#if LJ_HASJIT
LJ_FUNC SBuf * LJ_FASTCALL lj_buf_putstr(SBuf *sb, GCstr *s);
LJ_FUNC SBuf * LJ_FASTCALL lj_buf_putchar(SBuf *sb, int c);
LJ_FUNC SBuf * LJ_FASTCALL lj_buf_putint(SBuf *sb, int32_t k);
LJ_FUNC SBuf * LJ_FASTCALL lj_buf_putnum(SBuf *sb, cTValue *o);
LJ_FUNC GCstr * LJ_FASTCALL lj_buf_tostr(SBuf *sb);