1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-20 11:40:18 +02:00

*** empty log message ***

This commit is contained in:
Keisuke Nishida 2001-04-10 00:32:46 +00:00
parent 5315b8620a
commit be2d2946bc
2 changed files with 18 additions and 19 deletions

View file

@ -264,9 +264,7 @@
;; dump bytecode
(push-code! `(load-program ,bytes)))))
((vlink? x)
;; (push-code! `(local-ref ,(object-index (vlink-module x))))
;; FIXME: Temporary hack
(push-code! (object->code #f))
(dump! (vlink-module x))
(dump! (vlink-name x))
(push-code! `(link)))
((vmod? x)

View file

@ -161,22 +161,23 @@ VM_DEFINE_LOADER (load_program, "load-program")
VM_DEFINE_INSTRUCTION (link, "link", 0, 2, 1)
{
#if 0
sp--;
*sp = scm_c_env_vcell (sp[0], sp[1], 1);
#else
{
/* Temporary hack to support the current module system */
SCM mod = scm_current_module ();
SCM var = scm_eval_closure_lookup (scm_standard_eval_closure (mod),
*sp, SCM_BOOL_F);
if (SCM_FALSEP (var))
/* Create a new variable if not defined yet */
var = scm_eval_closure_lookup (scm_standard_eval_closure (mod),
*sp, SCM_BOOL_T);
*--sp = SCM_VARVCELL (var);
}
#endif
if (!SCM_FALSEP (sp[-1]))
{
sp[-1] = scm_c_env_vcell (sp[-1], sp[0], 1);
sp--;
}
else
{
/* Temporary hack that supports the current module system */
SCM mod = scm_current_module ();
SCM var = scm_eval_closure_lookup (scm_standard_eval_closure (mod),
*sp, SCM_BOOL_F);
if (SCM_FALSEP (var))
/* Create a new variable if not defined yet */
var = scm_eval_closure_lookup (scm_standard_eval_closure (mod),
*sp, SCM_BOOL_T);
*--sp = SCM_VARVCELL (var);
}
NEXT;
}