summaryrefslogtreecommitdiff
path: root/libguile/programs.h
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2018-07-29 15:36:07 +0200
committerAndy Wingo <wingo@pobox.com>2018-07-29 15:47:07 +0200
commitb8a9a666f140282fc3928f1027f235f01bad1ade (patch)
tree508dd64aae9dd247cf2b7fcd5b14adb380b01cce /libguile/programs.h
parent5077e6737128b04e840b96775627b000e29c63f1 (diff)
downloadguile-b8a9a666f140282fc3928f1027f235f01bad1ade.tar.gz
Rewrite subr implementation
* libguile/gsubr.c: Reimplement to store subr names and procedures in a side table, and to allocate fresh vcode for each subr. This allows JIT of subrs, moves to a uniform all-code-starts-with-instrument-entry regime, and also allows statprof to distinguish between subrs based on IP. * libguile/gsubr.h (SCM_SUBRF, SCM_SUBR_NAME): Call out to functions, now that these are in a side table. (scm_subr_function, scm_subr_name): New exports. (scm_i_primitive_name): New internal function, for looking up a primitive name based on IP. (scm_apply_subr): Take the subr index. * libguile/vm-engine.c (subr-call): * libguile/jit.c (compile_subr_call): Adapt to take index as arg. * module/statprof.scm (sample-stack-procs, count-call): (stack-samples->procedure-data): Update to always record IP in stack samples and call counts. * module/system/vm/frame.scm (frame-procedure-name): Simplify. (frame-instruction-pointer-or-primitive-procedure-name): Removed. * libguile/programs.h: * libguile/programs.c (scm_primitive_code_name): New function. * module/system/vm/program.scm (primitive-code-name): New export.
Diffstat (limited to 'libguile/programs.h')
-rw-r--r--libguile/programs.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/libguile/programs.h b/libguile/programs.h
index cbb0f6fcc..fb5921362 100644
--- a/libguile/programs.h
+++ b/libguile/programs.h
@@ -60,6 +60,7 @@ SCM_INTERNAL SCM scm_program_p (SCM obj);
SCM_INTERNAL SCM scm_program_code (SCM program);
SCM_INTERNAL SCM scm_primitive_code_p (SCM code);
+SCM_INTERNAL SCM scm_primitive_code_name (SCM code);
SCM_INTERNAL SCM scm_primitive_call_ip (SCM prim);
SCM_INTERNAL SCM scm_i_program_name (SCM program);