diff options
author | Andy Wingo <wingo@pobox.com> | 2012-04-30 21:34:58 +0200 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2012-04-30 21:34:58 +0200 |
commit | 4d497b629b73afda35ba409c3dcbfb665fe41dde (patch) | |
tree | 50c50532046f5573d4fcaf2af5047fe4c2d4b0c2 /libguile/vm-i-scheme.c | |
parent | 4105f688e33e592534b809c048451d94db82681a (diff) | |
parent | 53bdfcf03418c4709127140d64f12ede970c174b (diff) | |
download | guile-4d497b629b73afda35ba409c3dcbfb665fe41dde.tar.gz |
Merge remote-tracking branch 'origin/stable-2.0'
Conflicts:
libguile/vm-engine.c
libguile/vm-i-system.c
Diffstat (limited to 'libguile/vm-i-scheme.c')
-rw-r--r-- | libguile/vm-i-scheme.c | 26 |
1 files changed, 4 insertions, 22 deletions
diff --git a/libguile/vm-i-scheme.c b/libguile/vm-i-scheme.c index 89c3555ce..0e3956363 100644 --- a/libguile/vm-i-scheme.c +++ b/libguile/vm-i-scheme.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2001, 2009, 2010, 2011 Free Software Foundation, Inc. +/* Copyright (C) 2001, 2009, 2010, 2011, 2012 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License @@ -136,11 +136,7 @@ VM_DEFINE_FUNCTION (142, cons, "cons", 2) } #define VM_VALIDATE_CONS(x, proc) \ - if (SCM_UNLIKELY (!scm_is_pair (x))) \ - { func_name = proc; \ - finish_args = x; \ - goto vm_error_not_a_pair; \ - } + VM_ASSERT (scm_is_pair (x), vm_error_not_a_pair (proc, x)) VM_DEFINE_FUNCTION (143, car, "car", 1) { @@ -562,12 +558,7 @@ VM_DEFINE_INSTRUCTION (170, make_array, "make-array", 3, -1, 1) * Structs */ #define VM_VALIDATE_STRUCT(obj, proc) \ - if (SCM_UNLIKELY (!SCM_STRUCTP (obj))) \ - { \ - func_name = proc; \ - finish_args = (obj); \ - goto vm_error_not_a_struct; \ - } + VM_ASSERT (SCM_STRUCTP (obj), vm_error_not_a_pair (proc, obj)) VM_DEFINE_FUNCTION (171, struct_p, "struct?", 1) { @@ -713,16 +704,7 @@ VM_DEFINE_INSTRUCTION (178, slot_set, "slot-set", 0, 3, 0) * Bytevectors */ #define VM_VALIDATE_BYTEVECTOR(x, proc) \ - do \ - { \ - if (SCM_UNLIKELY (!SCM_BYTEVECTOR_P (x))) \ - { \ - func_name = proc; \ - finish_args = x; \ - goto vm_error_not_a_bytevector; \ - } \ - } \ - while (0) + VM_ASSERT (SCM_BYTEVECTOR_P (x), vm_error_not_a_bytevector (proc, x)) #define BV_REF_WITH_ENDIANNESS(stem, fn_stem) \ { \ |