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

Remove remaining uses of discouraged constructs, really.

* libguile/throw.c, libguile/vm-engine.h, libguile/vm-i-system.c,
  libguile/vm.c:  Replace uses of discouraged constructs by their
  current counterparts.
This commit is contained in:
Ludovic Courtès 2009-11-28 22:52:16 +01:00
parent 5c8cefe591
commit 8b22ed7abd
4 changed files with 8 additions and 8 deletions

View file

@ -211,7 +211,7 @@ scm_c_catch (SCM tag,
throw_tag = jbr.throw_tag; throw_tag = jbr.throw_tag;
jbr.throw_tag = SCM_EOL; jbr.throw_tag = SCM_EOL;
jbr.retval = SCM_EOL; jbr.retval = SCM_EOL;
if (SCM_NFALSEP (vm)) if (scm_is_true (vm))
{ {
SCM_VM_DATA (vm)->sp = sp; SCM_VM_DATA (vm)->sp = sp;
SCM_VM_DATA (vm)->fp = fp; SCM_VM_DATA (vm)->fp = fp;
@ -222,7 +222,7 @@ scm_c_catch (SCM tag,
- (sp + 1 - SCM_VM_DATA (vm)->stack_base)) * sizeof(SCM)); - (sp + 1 - SCM_VM_DATA (vm)->stack_base)) * sizeof(SCM));
#endif #endif
} }
else if (SCM_NFALSEP ((vm = scm_the_vm ()))) else if (scm_is_true ((vm = scm_the_vm ())))
{ {
/* oof, it's possible this catch was called before the vm was /* oof, it's possible this catch was called before the vm was
booted... yick. anyway, try to reset the vm stack. */ booted... yick. anyway, try to reset the vm stack. */

View file

@ -208,7 +208,7 @@
#if VM_USE_HOOKS #if VM_USE_HOOKS
#define RUN_HOOK(h) \ #define RUN_HOOK(h) \
{ \ { \
if (SCM_UNLIKELY (!SCM_FALSEP (vp->hooks[h])))\ if (SCM_UNLIKELY (scm_is_true (vp->hooks[h])))\
{ \ { \
SYNC_REGISTER (); \ SYNC_REGISTER (); \
vm_dispatch_hook (vp, vp->hooks[h], hook_args); \ vm_dispatch_hook (vp, vp->hooks[h], hook_args); \

View file

@ -769,7 +769,7 @@ VM_DEFINE_INSTRUCTION (53, call, "call", 1, -1, 1)
/* /*
* Other interpreted or compiled call * Other interpreted or compiled call
*/ */
if (!SCM_FALSEP (scm_procedure_p (x))) if (!scm_is_false (scm_procedure_p (x)))
{ {
SCM args; SCM args;
/* At this point, the stack contains the frame, the procedure and each one /* At this point, the stack contains the frame, the procedure and each one
@ -848,7 +848,7 @@ VM_DEFINE_INSTRUCTION (54, goto_args, "goto/args", 1, -1, 1)
/* /*
* Other interpreted or compiled call * Other interpreted or compiled call
*/ */
if (!SCM_FALSEP (scm_procedure_p (x))) if (!scm_is_false (scm_procedure_p (x)))
{ {
SCM args; SCM args;
POP_LIST (nargs); POP_LIST (nargs);
@ -933,7 +933,7 @@ VM_DEFINE_INSTRUCTION (57, mv_call, "mv-call", 4, -1, 1)
/* /*
* Other interpreted or compiled call * Other interpreted or compiled call
*/ */
if (!SCM_FALSEP (scm_procedure_p (x))) if (!scm_is_false (scm_procedure_p (x)))
{ {
SCM args; SCM args;
/* At this point, the stack contains the procedure and each one of its /* At this point, the stack contains the procedure and each one of its

View file

@ -421,7 +421,7 @@ SCM_DEFINE (scm_the_vm, "the-vm", 0, 0, 0,
{ {
scm_i_thread *t = SCM_I_CURRENT_THREAD; scm_i_thread *t = SCM_I_CURRENT_THREAD;
if (SCM_UNLIKELY (SCM_FALSEP ((t->vm)))) if (SCM_UNLIKELY (scm_is_false ((t->vm))))
t->vm = make_vm (); t->vm = make_vm ();
return t->vm; return t->vm;
@ -482,7 +482,7 @@ SCM_DEFINE (scm_vm_fp, "vm:fp", 1, 0, 0,
struct scm_vm *vp; \ struct scm_vm *vp; \
SCM_VALIDATE_VM (1, vm); \ SCM_VALIDATE_VM (1, vm); \
vp = SCM_VM_DATA (vm); \ vp = SCM_VM_DATA (vm); \
if (SCM_FALSEP (vp->hooks[n])) \ if (scm_is_false (vp->hooks[n])) \
vp->hooks[n] = scm_make_hook (SCM_I_MAKINUM (1)); \ vp->hooks[n] = scm_make_hook (SCM_I_MAKINUM (1)); \
return vp->hooks[n]; \ return vp->hooks[n]; \
} }