diff options
author | Mike Pall <mike> | 2011-06-29 01:51:39 +0200 |
---|---|---|
committer | Mike Pall <mike> | 2011-06-29 01:52:23 +0200 |
commit | 82eca898db87bde10fbbb14a0f35ef75b6c3dcc6 (patch) | |
tree | 9b5aa8a81267664430a94fc40a131fe33c1832d7 /src/lj_dispatch.c | |
parent | deeb8196c4d4085f3cc5a3389b568de7da739190 (diff) | |
download | luajit-82eca898db87bde10fbbb14a0f35ef75b6c3dcc6.tar.gz luajit-82eca898db87bde10fbbb14a0f35ef75b6c3dcc6.tar.bz2 luajit-82eca898db87bde10fbbb14a0f35ef75b6c3dcc6.zip |
Prefer recording loops over calls.
Hotcounts are decremented by 2 for loops and by 1 for calls.
Diffstat (limited to 'src/lj_dispatch.c')
-rw-r--r-- | src/lj_dispatch.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lj_dispatch.c b/src/lj_dispatch.c index c29cad46..b1d17add 100644 --- a/src/lj_dispatch.c +++ b/src/lj_dispatch.c | |||
@@ -50,7 +50,8 @@ void lj_dispatch_init(GG_State *GG) | |||
50 | /* Initialize hotcount table. */ | 50 | /* Initialize hotcount table. */ |
51 | void lj_dispatch_init_hotcount(global_State *g) | 51 | void lj_dispatch_init_hotcount(global_State *g) |
52 | { | 52 | { |
53 | HotCount start = (HotCount)G2J(g)->param[JIT_P_hotloop]; | 53 | int32_t hotloop = G2J(g)->param[JIT_P_hotloop]; |
54 | HotCount start = (HotCount)(hotloop*HOTCOUNT_LOOP - 1); | ||
54 | HotCount *hotcount = G2GG(g)->hotcount; | 55 | HotCount *hotcount = G2GG(g)->hotcount; |
55 | uint32_t i; | 56 | uint32_t i; |
56 | for (i = 0; i < HOTCOUNT_SIZE; i++) | 57 | for (i = 0; i < HOTCOUNT_SIZE; i++) |