summaryrefslogtreecommitdiff
path: root/libguile/jit.h
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2018-07-25 13:08:05 +0200
committerAndy Wingo <wingo@pobox.com>2018-07-29 15:47:07 +0200
commita6b5049aa8476408e452603bf2171789ddaac9ea (patch)
tree82403072a3c1a9ead85b8f4be4dbbf9725efd004 /libguile/jit.h
parent87da1c8d20591a9a7dad28eb106161c4f508a2b6 (diff)
downloadguile-a6b5049aa8476408e452603bf2171789ddaac9ea.tar.gz
Emit instrument-loop in loops.
* am/bootstrap.am (SOURCES): * module/Makefile.am (SOURCES): Handle renamve of handle-interrupts.scm to loop-instrumentation.scm. * libguile/jit.h (SCM_JIT_COUNTER_ENTRY_INCREMENT): Rename from SCM_JIT_COUNTER_CALL_INCREMENT. * libguile/vm-engine.c (instrument-entry): Rename from instrument-call. * module/language/cps/compile-bytecode.scm (compile-function): Add handle-interrupts code before calls and returns. Compile the "instrument-loop" primcall to an "instrument-loop" instruction and a "handle-interrupts" instruction. (lower-cps): Adapt to add-loop-instrumentation name change. * module/language/cps/loop-instrumentation.scm: Rename from handle-interrupts.scm and just add "instrument-loop" primcalls in loops. The compiler will add handle-interrupts primcalls as appropriate. * module/system/vm/assembler.scm (<jit-data>): New data type, for emitting embedded JIT data. (<meta>): Add field for current JIT data. (make-meta): Initialize current JIT data. (emit-instrument-entry*, emit-instrument-loop*): New instruction emitters that reference the current JIT data. (end-program): Now that all labels are known, arrange to serialize the JIT data. (link-data): Reserve space for JIT data, and add relocs to initialize the "start" / "end" fields.
Diffstat (limited to 'libguile/jit.h')
-rw-r--r--libguile/jit.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/libguile/jit.h b/libguile/jit.h
index 5067b61f6..fe5332028 100644
--- a/libguile/jit.h
+++ b/libguile/jit.h
@@ -45,7 +45,7 @@ struct scm_jit_function_data
enum scm_jit_counter_value
{
- SCM_JIT_COUNTER_CALL_INCREMENT = 15,
+ SCM_JIT_COUNTER_ENTRY_INCREMENT = 15,
SCM_JIT_COUNTER_LOOP_INCREMENT = 1,
SCM_JIT_COUNTER_THRESHOLD = 50
};