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 ;; dump bytecode
(push-code! `(load-program ,bytes))))) (push-code! `(load-program ,bytes)))))
((vlink? x) ((vlink? x)
;; (push-code! `(local-ref ,(object-index (vlink-module x)))) (dump! (vlink-module x))
;; FIXME: Temporary hack
(push-code! (object->code #f))
(dump! (vlink-name x)) (dump! (vlink-name x))
(push-code! `(link))) (push-code! `(link)))
((vmod? x) ((vmod? x)

View file

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