diff options
author | Mike Pall <mike> | 2013-11-05 19:41:21 +0100 |
---|---|---|
committer | Mike Pall <mike> | 2013-11-05 19:41:21 +0100 |
commit | 5c55b766bd008b60be973b51596f3a72d16b695b (patch) | |
tree | ea95d815d81d8b292366a2d5123eccae58a1cece /src | |
parent | 0315b8735286b9a885452cb9477f81384db2d95c (diff) | |
parent | 7b4d5306c7441a373516ee54bd942218f35348c2 (diff) | |
download | luajit-5c55b766bd008b60be973b51596f3a72d16b695b.tar.gz luajit-5c55b766bd008b60be973b51596f3a72d16b695b.tar.bz2 luajit-5c55b766bd008b60be973b51596f3a72d16b695b.zip |
Merge branch 'master' into v2.1
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 | } |