diff options
author | Mike Pall <mike> | 2012-08-26 19:41:35 +0200 |
---|---|---|
committer | Mike Pall <mike> | 2012-08-26 19:41:35 +0200 |
commit | c0efa6f00ed757bc05d3a0874f98c91fcb88dc68 (patch) | |
tree | ead5e444f8385b5f6e3ee8c0822268a287437f73 /src/lj_bcwrite.c | |
parent | cf3a2630443e3522d68c62a184df11ad1914ec44 (diff) | |
download | luajit2-c0efa6f00ed757bc05d3a0874f98c91fcb88dc68.tar.gz |
Replace divisions with simpler code.
Diffstat (limited to 'src/lj_bcwrite.c')
-rw-r--r-- | src/lj_bcwrite.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lj_bcwrite.c b/src/lj_bcwrite.c index 27f08fe8..5050da07 100644 --- a/src/lj_bcwrite.c +++ b/src/lj_bcwrite.c @@ -324,7 +324,7 @@ static void bcwrite_proto(BCWriteCtx *ctx, GCproto *pt) /* Pass buffer to writer function. */ if (ctx->status == 0) { MSize n = ctx->sb.n - 5; - MSize nn = 1 + lj_fls(n)/7; + MSize nn = (lj_fls(n)+8)*9 >> 6; ctx->sb.n = 5 - nn; bcwrite_uleb128(ctx, n); /* Fill in final size. */ lua_assert(ctx->sb.n == 5); |