diff options
| author | Mike Pall <mike> | 2012-07-16 22:36:38 +0200 |
|---|---|---|
| committer | Mike Pall <mike> | 2012-07-16 22:36:38 +0200 |
| commit | bf2d4acf005e301ee593d9b73402967a339aa220 (patch) | |
| tree | 79ee80b5bb60ee37e693ce686a59d19438ae6cdd | |
| parent | 0e2f5be14006c343c11e2b42886f8dbfe18b27d2 (diff) | |
| download | luajit-bf2d4acf005e301ee593d9b73402967a339aa220.tar.gz luajit-bf2d4acf005e301ee593d9b73402967a339aa220.tar.bz2 luajit-bf2d4acf005e301ee593d9b73402967a339aa220.zip | |
Correct dispatch table modifications for return hooks.
| -rw-r--r-- | src/lj_dispatch.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lj_dispatch.c b/src/lj_dispatch.c index 427036b4..f795954b 100644 --- a/src/lj_dispatch.c +++ b/src/lj_dispatch.c | |||
| @@ -86,7 +86,7 @@ void lj_dispatch_init_hotcount(global_State *g) | |||
| 86 | #define DISPMODE_REC 0x02 /* Recording active. */ | 86 | #define DISPMODE_REC 0x02 /* Recording active. */ |
| 87 | #define DISPMODE_INS 0x04 /* Override instruction dispatch. */ | 87 | #define DISPMODE_INS 0x04 /* Override instruction dispatch. */ |
| 88 | #define DISPMODE_CALL 0x08 /* Override call dispatch. */ | 88 | #define DISPMODE_CALL 0x08 /* Override call dispatch. */ |
| 89 | #define DISPMODE_RET 0x08 /* Override return dispatch. */ | 89 | #define DISPMODE_RET 0x10 /* Override return dispatch. */ |
| 90 | 90 | ||
| 91 | /* Update dispatch table depending on various flags. */ | 91 | /* Update dispatch table depending on various flags. */ |
| 92 | void lj_dispatch_update(global_State *g) | 92 | void lj_dispatch_update(global_State *g) |
| @@ -167,7 +167,7 @@ void lj_dispatch_update(global_State *g) | |||
| 167 | /* Set dynamic call dispatch. */ | 167 | /* Set dynamic call dispatch. */ |
| 168 | if ((oldmode ^ mode) & DISPMODE_CALL) { /* Update the whole table? */ | 168 | if ((oldmode ^ mode) & DISPMODE_CALL) { /* Update the whole table? */ |
| 169 | uint32_t i; | 169 | uint32_t i; |
| 170 | if ((mode & 8) == 0) { /* No call hooks? */ | 170 | if ((mode & DISPMODE_CALL) == 0) { /* No call hooks? */ |
| 171 | for (i = GG_LEN_SDISP; i < GG_LEN_DDISP; i++) | 171 | for (i = GG_LEN_SDISP; i < GG_LEN_DDISP; i++) |
| 172 | disp[i] = makeasmfunc(lj_bc_ofs[i]); | 172 | disp[i] = makeasmfunc(lj_bc_ofs[i]); |
| 173 | } else { | 173 | } else { |
