[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] 25/25: Save VM compare result before calling out to hook
From: |
Andy Wingo |
Subject: |
[Guile-commits] 25/25: Save VM compare result before calling out to hooks |
Date: |
Mon, 8 Jan 2018 09:25:05 -0500 (EST) |
wingo pushed a commit to branch master
in repository guile.
commit e2a06249ef08889d7e97f9487561a81bc2321e9e
Author: Andy Wingo <address@hidden>
Date: Mon Jan 8 15:19:55 2018 +0100
Save VM compare result before calling out to hooks
* libguile/vm.c (vm_dispatch_hook): Save the compare result before
calling out to the hook. This only really matters for the "next"
hook, which can be called between a compare and its corresponding
branch instruction.
---
libguile/vm.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/libguile/vm.c b/libguile/vm.c
index feed5c8..5292055 100644
--- a/libguile/vm.c
+++ b/libguile/vm.c
@@ -238,6 +238,7 @@ vm_dispatch_hook (struct scm_vm *vp, int hook_num,
struct scm_frame c_frame;
scm_t_cell *frame;
int saved_trace_level;
+ scm_t_uint8 saved_compare_result;
hook = vp->hooks[hook_num];
@@ -248,6 +249,8 @@ vm_dispatch_hook (struct scm_vm *vp, int hook_num,
saved_trace_level = vp->trace_level;
vp->trace_level = 0;
+ saved_compare_result = vp->compare_result;
+
/* Allocate a frame object on the stack. This is more efficient than calling
`scm_c_make_frame ()' to allocate on the heap, but it forces hooks to not
capture frame objects.
@@ -293,6 +296,7 @@ vm_dispatch_hook (struct scm_vm *vp, int hook_num,
scm_c_run_hook (hook, scm_cons (SCM_PACK_POINTER (frame), args));
}
+ vp->compare_result = saved_compare_result;
vp->trace_level = saved_trace_level;
}
- [Guile-commits] 09/25: Mark word-ref and word-ref/immediate as producing U64 values, (continued)
- [Guile-commits] 09/25: Mark word-ref and word-ref/immediate as producing U64 values, Andy Wingo, 2018/01/08
- [Guile-commits] 12/25: Remove now-unused make-vector et al instructions, Andy Wingo, 2018/01/08
- [Guile-commits] 18/25: Minor compile-cps refactor for cons, Andy Wingo, 2018/01/08
- [Guile-commits] 15/25: CPS type analysis support for mutable vs immutable vectors, Andy Wingo, 2018/01/08
- [Guile-commits] 21/25: Remove pair-related instructions, Andy Wingo, 2018/01/08
- [Guile-commits] 10/25: CPS pass now expects exploded vector primitives, Andy Wingo, 2018/01/08
- [Guile-commits] 13/25: Add CPS compilation support for mutable-vector?, Andy Wingo, 2018/01/08
- [Guile-commits] 24/25: Sync IP before allocating closures, Andy Wingo, 2018/01/08
- [Guile-commits] 19/25: Expand pair-related primcalls, Andy Wingo, 2018/01/08
- [Guile-commits] 16/25: Re-add compiler backend support for immutable vectors, Andy Wingo, 2018/01/08
- [Guile-commits] 25/25: Save VM compare result before calling out to hooks,
Andy Wingo <=
- [Guile-commits] 01/25: Fix verify.scm for call-thunk/no-inline, Andy Wingo, 2018/01/08
- [Guile-commits] 22/25: Better compilation of vector constructors and initializers, Andy Wingo, 2018/01/08
- [Guile-commits] 08/25: Instruction explosion for /immediate variants of vector prims, Andy Wingo, 2018/01/08
- [Guile-commits] 06/25: Fix primitive reification for scm-set! / word-set!., Andy Wingo, 2018/01/08
- [Guile-commits] 17/25: Compiler frontend support for vector mutability checks, Andy Wingo, 2018/01/08
- [Guile-commits] 23/25: Improve make-vector compilation for known big sizes, Andy Wingo, 2018/01/08
- [Guile-commits] 04/25: Make integer devirtualization less eager, Andy Wingo, 2018/01/08
- [Guile-commits] 02/25: Fix specialization of the allocate-words family of instructions, Andy Wingo, 2018/01/08
- [Guile-commits] 14/25: Fix bug in struct-ref effects analysis, Andy Wingo, 2018/01/08
- [Guile-commits] 20/25: Remove special optimizer and backend support for pairs, Andy Wingo, 2018/01/08