summaryrefslogtreecommitdiff
path: root/src/lj_opt_loop.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_loop.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_loop.c')
-rw-r--r--src/lj_opt_loop.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lj_opt_loop.c b/src/lj_opt_loop.c
index 3a119f47..2d574089 100644
--- a/src/lj_opt_loop.c
+++ b/src/lj_opt_loop.c
@@ -11,6 +11,7 @@
11#if LJ_HASJIT 11#if LJ_HASJIT
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"
@@ -271,8 +272,7 @@ static void loop_unroll(jit_State *J)
271 ** Caveat: don't call into the VM or run the GC or the buffer may be gone. 272 ** Caveat: don't call into the VM or run the GC or the buffer may be gone.
272 */ 273 */
273 invar = J->cur.nins; 274 invar = J->cur.nins;
274 subst = (IRRef1 *)lj_str_needbuf(J->L, &G(J->L)->tmpbuf, 275 subst = (IRRef1 *)lj_buf_tmp(J->L, (invar-REF_BIAS)*sizeof(IRRef1))-REF_BIAS;
275 (invar-REF_BIAS)*sizeof(IRRef1)) - REF_BIAS;
276 subst[REF_BASE] = REF_BASE; 276 subst[REF_BASE] = REF_BASE;
277 277
278 /* LOOP separates the pre-roll from the loop body. */ 278 /* LOOP separates the pre-roll from the loop body. */