From e22a0b6c8669ed065d4b02d8cabc7246753c8ce2 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Tue, 24 Apr 2018 06:36:38 -0700 Subject: autoload: few autoload entries needed. With the advent of compiled code, problems are exposed in the autoloader. We can no longer rely on the reference to a macro to load a dependent module. Macros go away during compiling, leaving behind functions. References to those functions have to trigger autoloading. * lisplib.c (place_set_entries): Add new table of sys: functions, containing sys:get-fun-getter-setter, sys:get-mb, sys:get-vb and sys:register-simple-accessor. These seem to be all the macro run-time-support functions in place.tl. (struct_set_entries): Add sys:rslotset. (yield_set_entries): Add sys:obtain-impl. (trace_set_entries): Add sys:trace and sys:untrace. (keyparams_set_entries): Add sys:extract-keys. --- lisplib.c | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) (limited to 'lisplib.c') diff --git a/lisplib.c b/lisplib.c index 8932f2d1..bee38589 100644 --- a/lisplib.c +++ b/lisplib.c @@ -76,6 +76,11 @@ static void intern_only(val *name) static val place_set_entries(val dlt, val fun) { + val sys_name[] = { + lit("get-fun-getter-setter"), lit("get-mb"), lit("get-vb"), + lit("register-simple-accessor"), + nil + }; val name[] = { lit("*place-clobber-expander*"), lit("*place-update-expander*"), lit("*place-delete-expander*"), lit("*place-macro*"), @@ -97,6 +102,7 @@ static val place_set_entries(val dlt, val fun) nil }; + set_dlt_entries_sys(dlt, sys_name, fun); set_dlt_entries(dlt, name, fun); return nil; } @@ -200,7 +206,7 @@ static val path_test_instantiate(val set_fun) static val struct_set_entries(val dlt, val fun) { val sys_name[] = { - lit("define-method"), nil + lit("define-method"), lit("rslotset"), nil }; val name[] = { lit("defstruct"), lit("qref"), lit("uref"), lit("new"), lit("meth"), @@ -296,12 +302,17 @@ static val type_instantiate(val set_fun) static val yield_set_entries(val dlt, val fun) { + val sys_name[] = { + lit("obtain-impl"), nil + }; val name[] = { lit("obtain"), lit("obtain-block"), lit("yield-from"), lit("yield"), lit("obtain*"), lit("obtain*-block"), lit("suspend"), lit("hlet"), lit("hlet*"), nil }; + + set_dlt_entries_sys(dlt, sys_name, fun); set_dlt_entries(dlt, name, fun); return nil; } @@ -430,9 +441,14 @@ static val build_instantiate(val set_fun) static val trace_set_entries(val dlt, val fun) { + val sys_name[] = { + lit("trace"), lit("untrace"), nil + }; val name[] = { lit("*trace-output*"), lit("trace"), lit("untrace"), nil }; + + set_dlt_entries_sys(dlt, sys_name, fun); set_dlt_entries(dlt, name, fun); return nil; } @@ -567,7 +583,12 @@ static val error_instantiate(val set_fun) static val keyparams_set_entries(val dlt, val fun) { + val sys_name[] = { + lit("extract-keys"), + nil + }; val key_k = intern(lit("key"), keyword_package); + set_dlt_entries_sys(dlt, sys_name, fun); if (fun) sethash(dlt, key_k, fun); else -- cgit v1.2.3