aboutsummaryrefslogtreecommitdiff
path: root/src/lj_opt_split.c
diff options
context:
space:
mode:
authorMike Pall <mike>2013-02-27 17:11:31 +0100
committerMike Pall <mike>2013-02-27 17:29:35 +0100
commit28cfcf77445e144335961a020e3e08d84cf0091f (patch)
tree1a769d0ee0fab26a79073a118ba4f9e1557b081a /src/lj_opt_split.c
parentd44337a566bb3de06a6ac4ecf2d2a77767b86029 (diff)
downloadluajit-28cfcf77445e144335961a020e3e08d84cf0091f.tar.gz
luajit-28cfcf77445e144335961a020e3e08d84cf0091f.tar.bz2
luajit-28cfcf77445e144335961a020e3e08d84cf0091f.zip
String buffer refactoring, part 1.
Move string buffer handling to lj_buf.*. Use common buffer resizing function.
Diffstat (limited to 'src/lj_opt_split.c')
-rw-r--r--src/lj_opt_split.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lj_opt_split.c b/src/lj_opt_split.c
index 303af03c..2b04e77d 100644
--- a/src/lj_opt_split.c
+++ b/src/lj_opt_split.c
@@ -11,6 +11,7 @@
11#if LJ_HASJIT && (LJ_SOFTFP || (LJ_32 && LJ_HASFFI)) 11#if LJ_HASJIT && (LJ_SOFTFP || (LJ_32 && LJ_HASFFI))
12 12
13#include "lj_err.h" 13#include "lj_err.h"
14#include "lj_buf.h"
14#include "lj_str.h" 15#include "lj_str.h"
15#include "lj_ir.h" 16#include "lj_ir.h"
16#include "lj_jit.h" 17#include "lj_jit.h"
@@ -201,7 +202,7 @@ static void split_ir(jit_State *J)
201 IRRef nins = J->cur.nins, nk = J->cur.nk; 202 IRRef nins = J->cur.nins, nk = J->cur.nk;
202 MSize irlen = nins - nk; 203 MSize irlen = nins - nk;
203 MSize need = (irlen+1)*(sizeof(IRIns) + sizeof(IRRef1)); 204 MSize need = (irlen+1)*(sizeof(IRIns) + sizeof(IRRef1));
204 IRIns *oir = (IRIns *)lj_str_needbuf(J->L, &G(J->L)->tmpbuf, need); 205 IRIns *oir = (IRIns *)lj_buf_tmp(J->L, need);
205 IRRef1 *hisubst; 206 IRRef1 *hisubst;
206 IRRef ref; 207 IRRef ref;
207 208