diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/lj_gc.c | 6 | ||||
| -rw-r--r-- | src/lj_trace.c | 2 |
2 files changed, 5 insertions, 3 deletions
diff --git a/src/lj_gc.c b/src/lj_gc.c index 572e4710..ddbaa645 100644 --- a/src/lj_gc.c +++ b/src/lj_gc.c | |||
| @@ -684,12 +684,14 @@ int LJ_FASTCALL lj_gc_step(lua_State *L) | |||
| 684 | } while ((int32_t)lim > 0); | 684 | } while ((int32_t)lim > 0); |
| 685 | if (g->gc.debt < GCSTEPSIZE) { | 685 | if (g->gc.debt < GCSTEPSIZE) { |
| 686 | g->gc.threshold = g->gc.total + GCSTEPSIZE; | 686 | g->gc.threshold = g->gc.total + GCSTEPSIZE; |
| 687 | g->vmstate = ostate; | ||
| 688 | return 1; | ||
| 687 | } else { | 689 | } else { |
| 688 | g->gc.debt -= GCSTEPSIZE; | 690 | g->gc.debt -= GCSTEPSIZE; |
| 689 | g->gc.threshold = g->gc.total; | 691 | g->gc.threshold = g->gc.total; |
| 692 | g->vmstate = ostate; | ||
| 693 | return 0; | ||
| 690 | } | 694 | } |
| 691 | g->vmstate = ostate; | ||
| 692 | return 0; | ||
| 693 | } | 695 | } |
| 694 | 696 | ||
| 695 | /* Ditto, but fix the stack top first. */ | 697 | /* Ditto, but fix the stack top first. */ |
diff --git a/src/lj_trace.c b/src/lj_trace.c index 2b8d931f..466d9cd2 100644 --- a/src/lj_trace.c +++ b/src/lj_trace.c | |||
| @@ -781,7 +781,7 @@ int LJ_FASTCALL lj_trace_exit(jit_State *J, void *exptr) | |||
| 781 | /* Just exit to interpreter. */ | 781 | /* Just exit to interpreter. */ |
| 782 | } else if (G(L)->gc.state == GCSatomic || G(L)->gc.state == GCSfinalize) { | 782 | } else if (G(L)->gc.state == GCSatomic || G(L)->gc.state == GCSfinalize) { |
| 783 | if (!(G(L)->hookmask & HOOK_GC)) | 783 | if (!(G(L)->hookmask & HOOK_GC)) |
| 784 | lj_gc_step(L); /* Exited because of GC: drive GC forward. */ | 784 | lj_gc_check(L); /* Exited because of GC: drive GC forward. */ |
| 785 | } else { | 785 | } else { |
| 786 | trace_hotside(J, pc); | 786 | trace_hotside(J, pc); |
| 787 | } | 787 | } |
