summaryrefslogtreecommitdiff
path: root/libguile/gsubr.h
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2018-08-06 13:30:50 +0200
committerAndy Wingo <wingo@pobox.com>2018-08-06 13:30:50 +0200
commit455015d8e9e888f444f1a216b0287bb3980b8a40 (patch)
tree9283314abc6c64384c608723a35bdb15b74cfa2f /libguile/gsubr.h
parent5ebe58419e43de2d512d37a1732202f29a43dd7e (diff)
downloadguile-455015d8e9e888f444f1a216b0287bb3980b8a40.tar.gz
Fix bugs with primitive code allocator; expose internally
* lib/Makefile.am: Explicitly add flexmember. Already included though. * libguile/gsubr.c (alloc_subr_idx, record_subr_name): Factor out an "expected subr count" variable. (alloc_chunk, alloc): Rework so that when the arena grows, old code is still recognized as primitive. (scm_i_alloc_primitive_code_with_instrumentation): Fix bug whereby the JIT function data was initialized at a bogus address, because we were adding to a uint32_t* instead of a char*. Make internally public. (is_primitive_code): Recognize all allocated code as primitive. (alloc_subr_code): Adapt to scm_i_alloc_primitive_code_with_instrumentation rename. (primitive_subr_idx): If the call IP isn't a subr-call, return a sentinel value. (scm_i_primitive_name, scm_subr_function): Allow for primitives that aren't subrs. * libguile/gsubr.h: Decalre scm_i_alloc_primitive_code_with_instrumentation.
Diffstat (limited to 'libguile/gsubr.h')
-rw-r--r--libguile/gsubr.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/libguile/gsubr.h b/libguile/gsubr.h
index b62e21140..63c2a7603 100644
--- a/libguile/gsubr.h
+++ b/libguile/gsubr.h
@@ -49,6 +49,9 @@
+SCM_INTERNAL uint32_t *
+scm_i_alloc_primitive_code_with_instrumentation (size_t uint32_count,
+ uint32_t **write_ptr);
SCM_INTERNAL int scm_i_primitive_code_p (const uint32_t *code);
SCM_INTERNAL uintptr_t scm_i_primitive_call_ip (SCM subr);
SCM_INTERNAL SCM scm_i_primitive_name (const uint32_t *code);