[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
guile/guile-core/libguile ChangeLog async.c coo...
From: |
Keisuke Nishida |
Subject: |
guile/guile-core/libguile ChangeLog async.c coo... |
Date: |
Tue, 26 Jun 2001 08:46:40 -0700 |
CVSROOT: /cvs
Module name: guile
Changes by: Keisuke Nishida <address@hidden> 01/06/26 08:46:40
Modified files:
guile-core/libguile: ChangeLog async.c coop-threads.c debug.c
dynwind.c environments.c eval.c eval.h
fluids.c goops.c hashtab.c hooks.c load.c
modules.c ports.c print.c properties.c
ramap.c read.c scmsigs.c sort.c strports.c
throw.c unif.c vports.c
Log message:
* eval.c (scm_call_0, scm_call_1, scm_call_2, scm_call_3,
scm_apply_0, scm_apply_1, scm_apply_2, scm_apply_3): New functions.
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/guile/guile-core/libguile/ChangeLog.diff?cvsroot=OldCVS&tr1=1.1450&tr2=1.1451&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/guile/guile-core/libguile/async.c.diff?cvsroot=OldCVS&tr1=1.57&tr2=1.58&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/guile/guile-core/libguile/coop-threads.c.diff?cvsroot=OldCVS&tr1=1.30&tr2=1.31&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/guile/guile-core/libguile/debug.c.diff?cvsroot=OldCVS&tr1=1.91&tr2=1.92&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/guile/guile-core/libguile/dynwind.c.diff?cvsroot=OldCVS&tr1=1.40&tr2=1.41&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/guile/guile-core/libguile/environments.c.diff?cvsroot=OldCVS&tr1=1.21&tr2=1.22&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/guile/guile-core/libguile/eval.c.diff?cvsroot=OldCVS&tr1=1.231&tr2=1.232&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/guile/guile-core/libguile/eval.h.diff?cvsroot=OldCVS&tr1=1.58&tr2=1.59&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/guile/guile-core/libguile/fluids.c.diff?cvsroot=OldCVS&tr1=1.39&tr2=1.40&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/guile/guile-core/libguile/goops.c.diff?cvsroot=OldCVS&tr1=1.37&tr2=1.38&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/guile/guile-core/libguile/hashtab.c.diff?cvsroot=OldCVS&tr1=1.40&tr2=1.41&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/guile/guile-core/libguile/hooks.c.diff?cvsroot=OldCVS&tr1=1.18&tr2=1.19&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/guile/guile-core/libguile/load.c.diff?cvsroot=OldCVS&tr1=1.62&tr2=1.63&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/guile/guile-core/libguile/modules.c.diff?cvsroot=OldCVS&tr1=1.29&tr2=1.30&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/guile/guile-core/libguile/ports.c.diff?cvsroot=OldCVS&tr1=1.150&tr2=1.151&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/guile/guile-core/libguile/print.c.diff?cvsroot=OldCVS&tr1=1.126&tr2=1.127&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/guile/guile-core/libguile/properties.c.diff?cvsroot=OldCVS&tr1=1.4&tr2=1.5&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/guile/guile-core/libguile/ramap.c.diff?cvsroot=OldCVS&tr1=1.76&tr2=1.77&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/guile/guile-core/libguile/read.c.diff?cvsroot=OldCVS&tr1=1.71&tr2=1.72&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/guile/guile-core/libguile/scmsigs.c.diff?cvsroot=OldCVS&tr1=1.58&tr2=1.59&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/guile/guile-core/libguile/sort.c.diff?cvsroot=OldCVS&tr1=1.35&tr2=1.36&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/guile/guile-core/libguile/strports.c.diff?cvsroot=OldCVS&tr1=1.80&tr2=1.81&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/guile/guile-core/libguile/throw.c.diff?cvsroot=OldCVS&tr1=1.86&tr2=1.87&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/guile/guile-core/libguile/unif.c.diff?cvsroot=OldCVS&tr1=1.116&tr2=1.117&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/guile/guile-core/libguile/vports.c.diff?cvsroot=OldCVS&tr1=1.47&tr2=1.48&r1=text&r2=text
Patches:
Index: guile/guile-core/libguile/ChangeLog
diff -u guile/guile-core/libguile/ChangeLog:1.1450
guile/guile-core/libguile/ChangeLog:1.1451
--- guile/guile-core/libguile/ChangeLog:1.1450 Tue Jun 26 03:59:34 2001
+++ guile/guile-core/libguile/ChangeLog Tue Jun 26 08:46:39 2001
@@ -1,3 +1,32 @@
+2001-06-27 Keisuke Nishida <address@hidden>
+
+ * eval.c (scm_call_0, scm_call_1, scm_call_2, scm_call_3,
+ scm_apply_0, scm_apply_1, scm_apply_2, scm_apply_3): New functions.
+ * eval.h (scm_call_0, scm_call_1, scm_call_2, scm_call_3,
+ scm_apply_0, scm_apply_1, scm_apply_2, scm_apply_3): Declared.
+ * async.c (scm_run_asyncs), coop-threads.c (scheme_body_bootstrip,
+ scheme_handler_bootstrip), debug.c (with_traps_inner), dynwind.c
+ (scm_dynamic_wind, scm_dowinds), environments.c
+ (import_environment_conflict), eval.c (scm_macroexp, scm_force,
+ scm_primitive_eval_x, scm_primitive_eval), fluids.c (apply_thunk),
+ goops.c (GETVAR, purgatory, make_class_from_template,
+ scm_ensure_accessor), hashtab.c (scm_ihashx, scm_sloppy_assx,
+ scm_delx_x, fold_proc), hooks.c (scm_c_run_hook), load.c
+ (scm_primitive_load), modules.c (scm_resolve_module,
+ scm_c_define_module, scm_c_use_module, scm_c_export,
+ module_variable, scm_eval_closure_lookup, scm_sym2var,
+ scm_make_module, scm_ensure_user_module, scm_load_scheme_module),
+ ports.c (scm_port_for_each), print.c (scm_printer_apply),
+ properties.c (scm_primitive_property_ref), ramap.c (ramap,
+ ramap_cxr, rafe, scm_array_index_map_x, read.c (scm_lreadr),
+ scmsigs.c (sys_deliver_signals), sort.c (applyless), strports.c
+ (scm_object_to_string, scm_call_with_output_string,
+ scm_call_with_input_string), throw.c (scm_body_thunk,
+ scm_handle_by_proc, hbpca_body), unif.c (scm_make_shared_array,
+ scm_make_shared_array), vports.c (sf_flush, sf_write,
+ sf_fill_input, sf_close): Use one of the above functions.
+ * goops.c, hashtab.c, scmsigs.c, sort.c: #include "libguile/root.h".
+
2001-06-26 Dirk Herrmann <address@hidden>
* filesys.c (scm_close), ports.c (scm_close_port,
Index: guile/guile-core/libguile/async.c
diff -u guile/guile-core/libguile/async.c:1.57
guile/guile-core/libguile/async.c:1.58
--- guile/guile-core/libguile/async.c:1.57 Thu Jun 14 12:50:43 2001
+++ guile/guile-core/libguile/async.c Tue Jun 26 08:46:40 2001
@@ -363,7 +363,7 @@
if (ASYNC_GOT_IT (a))
{
SET_ASYNC_GOT_IT (a, 0);
- scm_apply (ASYNC_THUNK (a), SCM_EOL, SCM_EOL);
+ scm_call_0 (ASYNC_THUNK (a));
}
scm_mask_ints = 0;
list_of_a = SCM_CDR (list_of_a);
Index: guile/guile-core/libguile/coop-threads.c
diff -u guile/guile-core/libguile/coop-threads.c:1.30
guile/guile-core/libguile/coop-threads.c:1.31
--- guile/guile-core/libguile/coop-threads.c:1.30 Thu Jun 14 12:50:43 2001
+++ guile/guile-core/libguile/coop-threads.c Tue Jun 26 08:46:40 2001
@@ -180,21 +180,19 @@
SCM handler;
} scheme_launch_data;
-extern SCM scm_apply (SCM, SCM, SCM);
-
static SCM
scheme_body_bootstrip (scheme_launch_data* data)
{
/* First save the new root continuation */
data->rootcont = scm_root->rootcont;
- return scm_apply (data->body, SCM_EOL, SCM_EOL);
+ return scm_call_0 (data->body);
}
static SCM
scheme_handler_bootstrip (scheme_launch_data* data, SCM tag, SCM throw_args)
{
scm_root->rootcont = data->rootcont;
- return scm_apply (data->handler, scm_cons (tag, throw_args), SCM_EOL);
+ return scm_apply_1 (data->handler, tag, throw_args);
}
static void
Index: guile/guile-core/libguile/debug.c
diff -u guile/guile-core/libguile/debug.c:1.91
guile/guile-core/libguile/debug.c:1.92
--- guile/guile-core/libguile/debug.c:1.91 Thu Jun 14 12:50:43 2001
+++ guile/guile-core/libguile/debug.c Tue Jun 26 08:46:40 2001
@@ -120,7 +120,7 @@
with_traps_inner (void *data)
{
SCM thunk = SCM_PACK (data);
- return scm_apply (thunk, SCM_EOL, SCM_EOL);
+ return scm_call_0 (thunk);
}
SCM_DEFINE (scm_with_traps, "with-traps", 1, 0, 0,
Index: guile/guile-core/libguile/dynwind.c
diff -u guile/guile-core/libguile/dynwind.c:1.40
guile/guile-core/libguile/dynwind.c:1.41
--- guile/guile-core/libguile/dynwind.c:1.40 Thu Jun 14 12:50:43 2001
+++ guile/guile-core/libguile/dynwind.c Tue Jun 26 08:46:40 2001
@@ -125,11 +125,11 @@
SCM_ASSERT (SCM_NFALSEP (scm_thunk_p (out_guard)),
out_guard,
SCM_ARG3, FUNC_NAME);
- scm_apply (in_guard, SCM_EOL, SCM_EOL);
+ scm_call_0 (in_guard);
scm_dynwinds = scm_acons (in_guard, out_guard, scm_dynwinds);
- ans = scm_apply (thunk, SCM_EOL, SCM_EOL);
+ ans = scm_call_0 (thunk);
scm_dynwinds = SCM_CDR (scm_dynwinds);
- scm_apply (out_guard, SCM_EOL, SCM_EOL);
+ scm_call_0 (out_guard);
return ans;
}
#undef FUNC_NAME
@@ -231,7 +231,7 @@
else if (SCM_GUARDSP (wind_key))
SCM_BEFORE_GUARD (wind_key) (SCM_GUARD_DATA (wind_key));
else if (SCM_TYP3 (wind_key) == scm_tc3_closure)
- scm_apply (wind_key, SCM_EOL, SCM_EOL);
+ scm_call_0 (wind_key);
}
}
scm_dynwinds = to;
@@ -263,7 +263,7 @@
else if (SCM_GUARDSP (wind_key))
SCM_AFTER_GUARD (wind_key) (SCM_GUARD_DATA (wind_key));
else if (SCM_TYP3 (wind_key) == scm_tc3_closure)
- scm_apply (from, SCM_EOL, SCM_EOL);
+ scm_call_0 (from);
}
}
delta--;
Index: guile/guile-core/libguile/environments.c
diff -u guile/guile-core/libguile/environments.c:1.21
guile/guile-core/libguile/environments.c:1.22
--- guile/guile-core/libguile/environments.c:1.21 Thu Jun 14 12:50:43 2001
+++ guile/guile-core/libguile/environments.c Tue Jun 26 08:46:40 2001
@@ -1613,7 +1613,7 @@
SCM conflict_proc = IMPORT_ENVIRONMENT (env)->conflict_proc;
SCM args = scm_cons2 (env, sym, scm_cons (imports, SCM_EOL));
- return scm_apply (conflict_proc, args, SCM_EOL);
+ return scm_apply_0 (conflict_proc, args);
}
Index: guile/guile-core/libguile/eval.c
diff -u guile/guile-core/libguile/eval.c:1.231
guile/guile-core/libguile/eval.c:1.232
--- guile/guile-core/libguile/eval.c:1.231 Sun Jun 24 20:30:02 2001
+++ guile/guile-core/libguile/eval.c Tue Jun 26 08:46:40 2001
@@ -1246,7 +1246,7 @@
return x;
SCM_SETCAR (x, orig_sym); /* Undo memoizing effect of lookupcar */
- res = scm_apply (SCM_MACRO_CODE (proc), x, scm_cons (env, scm_listofnull));
+ res = scm_call_2 (SCM_MACRO_CODE (proc), x, env);
if (scm_ilength (res) <= 0)
res = scm_cons2 (SCM_IM_BEGIN, res, SCM_EOL);
@@ -3245,6 +3245,62 @@
#ifndef DEVAL
+
+/* Simple procedure calls
+ */
+
+SCM
+scm_call_0 (SCM proc)
+{
+ return scm_apply (proc, SCM_EOL, SCM_EOL);
+}
+
+SCM
+scm_call_1 (SCM proc, SCM arg1)
+{
+ return scm_apply (proc, arg1, scm_listofnull);
+}
+
+SCM
+scm_call_2 (SCM proc, SCM arg1, SCM arg2)
+{
+ return scm_apply (proc, arg1, scm_cons (arg2, scm_listofnull));
+}
+
+SCM
+scm_call_3 (SCM proc, SCM arg1, SCM arg2, SCM arg3)
+{
+ return scm_apply (proc, arg1, scm_cons2 (arg2, arg3, scm_listofnull));
+}
+
+/* Simple procedure applies
+ */
+
+SCM
+scm_apply_0 (SCM proc, SCM args)
+{
+ return scm_apply (proc, args, SCM_EOL);
+}
+
+SCM
+scm_apply_1 (SCM proc, SCM arg1, SCM args)
+{
+ return scm_apply (proc, scm_cons (arg1, args), SCM_EOL);
+}
+
+SCM
+scm_apply_2 (SCM proc, SCM arg1, SCM arg2, SCM args)
+{
+ return scm_apply (proc, scm_cons2 (arg1, arg2, args), SCM_EOL);
+}
+
+SCM
+scm_apply_3 (SCM proc, SCM arg1, SCM arg2, SCM arg3, SCM args)
+{
+ return scm_apply (proc, scm_cons (arg1, scm_cons2 (arg2, arg3, args)),
+ SCM_EOL);
+}
+
/* This code processes the arguments to apply:
(apply PROC ARG1 ... ARGS)
@@ -3812,7 +3868,7 @@
SCM_VALIDATE_SMOB (1, x, promise);
if (!((1L << 16) & SCM_CELL_WORD_0 (x)))
{
- SCM ans = scm_apply (SCM_CELL_OBJECT_1 (x), SCM_EOL, SCM_EOL);
+ SCM ans = scm_call_0 (SCM_CELL_OBJECT_1 (x));
if (!((1L << 16) & SCM_CELL_WORD_0 (x)))
{
SCM_DEFER_INTS;
@@ -3948,7 +4004,7 @@
SCM env;
SCM transformer = scm_current_module_transformer ();
if (SCM_NIMP (transformer))
- exp = scm_apply (transformer, exp, scm_listofnull);
+ exp = scm_call_1 (transformer, exp);
env = scm_top_level_env (scm_current_module_lookup_closure ());
return scm_i_eval_x (exp, env);
}
@@ -3962,7 +4018,7 @@
SCM env;
SCM transformer = scm_current_module_transformer ();
if (SCM_NIMP (transformer))
- exp = scm_apply (transformer, exp, scm_listofnull);
+ exp = scm_call_1 (transformer, exp);
env = scm_top_level_env (scm_current_module_lookup_closure ());
return scm_i_eval (exp, env);
}
Index: guile/guile-core/libguile/eval.h
diff -u guile/guile-core/libguile/eval.h:1.58
guile/guile-core/libguile/eval.h:1.59
--- guile/guile-core/libguile/eval.h:1.58 Thu Jun 14 12:50:43 2001
+++ guile/guile-core/libguile/eval.h Tue Jun 26 08:46:40 2001
@@ -231,6 +231,14 @@
extern int scm_badargsp (SCM formals, SCM args);
extern SCM scm_ceval (SCM x, SCM env);
extern SCM scm_deval (SCM x, SCM env);
+extern SCM scm_call_0 (SCM proc);
+extern SCM scm_call_1 (SCM proc, SCM arg1);
+extern SCM scm_call_2 (SCM proc, SCM arg1, SCM arg2);
+extern SCM scm_call_3 (SCM proc, SCM arg1, SCM arg2, SCM arg3);
+extern SCM scm_apply_0 (SCM proc, SCM args);
+extern SCM scm_apply_1 (SCM proc, SCM arg1, SCM args);
+extern SCM scm_apply_2 (SCM proc, SCM arg1, SCM arg2, SCM args);
+extern SCM scm_apply_3 (SCM proc, SCM arg1, SCM arg2, SCM arg3, SCM args);
extern SCM scm_nconc2last (SCM lst);
extern SCM scm_apply (SCM proc, SCM arg1, SCM args);
extern SCM scm_dapply (SCM proc, SCM arg1, SCM args);
Index: guile/guile-core/libguile/fluids.c
diff -u guile/guile-core/libguile/fluids.c:1.39
guile/guile-core/libguile/fluids.c:1.40
--- guile/guile-core/libguile/fluids.c:1.39 Sat Jun 23 08:25:57 2001
+++ guile/guile-core/libguile/fluids.c Tue Jun 26 08:46:40 2001
@@ -213,7 +213,7 @@
static SCM
apply_thunk (void *thunk)
{
- return scm_apply (SCM_PACK (thunk), SCM_EOL, SCM_EOL);
+ return scm_call_0 (SCM_PACK (thunk));
}
SCM_DEFINE (scm_with_fluids, "with-fluids*", 3, 0, 0,
Index: guile/guile-core/libguile/goops.c
diff -u guile/guile-core/libguile/goops.c:1.37
guile/guile-core/libguile/goops.c:1.38
--- guile/guile-core/libguile/goops.c:1.37 Thu Jun 14 12:50:43 2001
+++ guile/guile-core/libguile/goops.c Tue Jun 26 08:46:40 2001
@@ -63,6 +63,7 @@
#include "libguile/ports.h"
#include "libguile/procprop.h"
#include "libguile/random.h"
+#include "libguile/root.h"
#include "libguile/smob.h"
#include "libguile/strings.h"
#include "libguile/strports.h"
@@ -79,9 +80,8 @@
scm_module_goops); }
/* Temporary hack until we get the new module system */
/*fixme* Should optimize by keeping track of the variable object itself */
-#define GETVAR(v) (SCM_VARIABLE_REF (scm_apply (scm_goops_lookup_closure, \
- SCM_LIST2 ((v), SCM_BOOL_F), \
- SCM_EOL)))
+#define GETVAR(v) (SCM_VARIABLE_REF (scm_call_2 (scm_goops_lookup_closure, \
+ (v), SCM_BOOL_F)))
/* Fixme: Should use already interned symbols */
#define CALL_GF1(name,a) (scm_apply (GETVAR (scm_str2symbol (name)), \
@@ -1513,7 +1513,7 @@
static SCM
purgatory (void *args)
{
- return scm_apply (GETVAR (scm_str2symbol ("change-class")), (SCM) args,
SCM_EOL);
+ return scm_apply_0 (GETVAR (scm_str2symbol ("change-class")), (SCM) args);
}
void
@@ -2339,9 +2339,7 @@
/* Only define name if doesn't already exist. */
if (!SCM_GOOPS_UNBOUNDP (name)
- && SCM_FALSEP (scm_apply (scm_goops_lookup_closure,
- SCM_LIST2 (name, SCM_BOOL_F),
- SCM_EOL)))
+ && SCM_FALSEP (scm_call_2 (scm_goops_lookup_closure, name, SCM_BOOL_F)))
DEFVAR (name, class);
return class;
}
@@ -2588,9 +2586,7 @@
SCM
scm_ensure_accessor (SCM name)
{
- SCM gf = scm_apply (SCM_TOP_LEVEL_LOOKUP_CLOSURE,
- SCM_LIST2 (name, SCM_BOOL_F),
- SCM_EOL);
+ SCM gf = scm_call_2 (SCM_TOP_LEVEL_LOOKUP_CLOSURE, name, SCM_BOOL_F);
if (!SCM_IS_A_P (gf, scm_class_generic_with_setter))
{
gf = scm_make (SCM_LIST3 (scm_class_generic, k_name, name));
Index: guile/guile-core/libguile/hashtab.c
diff -u guile/guile-core/libguile/hashtab.c:1.40
guile/guile-core/libguile/hashtab.c:1.41
--- guile/guile-core/libguile/hashtab.c:1.40 Thu Jun 14 12:50:43 2001
+++ guile/guile-core/libguile/hashtab.c Tue Jun 26 08:46:40 2001
@@ -48,6 +48,7 @@
#include "libguile/alist.h"
#include "libguile/hash.h"
#include "libguile/eval.h"
+#include "libguile/root.h"
#include "libguile/vectors.h"
#include "libguile/validate.h"
@@ -380,9 +381,7 @@
{
SCM answer;
SCM_DEFER_INTS;
- answer = scm_apply (closure->hash,
- SCM_LIST2 (obj, scm_ulong2num ((unsigned long)n)),
- SCM_EOL);
+ answer = scm_call_2 (closure->hash, obj, scm_ulong2num ((unsigned long) n));
SCM_ALLOW_INTS;
return SCM_INUM (answer);
}
@@ -394,9 +393,7 @@
{
SCM answer;
SCM_DEFER_INTS;
- answer = scm_apply (closure->assoc,
- SCM_LIST2 (obj, alist),
- SCM_EOL);
+ answer = scm_call_2 (closure->assoc, obj, alist);
SCM_ALLOW_INTS;
return answer;
}
@@ -409,9 +406,7 @@
{
SCM answer;
SCM_DEFER_INTS;
- answer = scm_apply (closure->delete,
- SCM_LIST2 (obj, alist),
- SCM_EOL);
+ answer = scm_call_2 (closure->delete, obj, alist);
SCM_ALLOW_INTS;
return answer;
}
@@ -519,7 +514,7 @@
static SCM
fold_proc (void *proc, SCM key, SCM data, SCM value)
{
- return scm_apply (SCM_PACK (proc), SCM_LIST3 (key, data, value), SCM_EOL);
+ return scm_call_3 (SCM_PACK (proc), key, data, value);
}
SCM_DEFINE (scm_hash_fold, "hash-fold", 3, 0, 0,
Index: guile/guile-core/libguile/hooks.c
diff -u guile/guile-core/libguile/hooks.c:1.18
guile/guile-core/libguile/hooks.c:1.19
--- guile/guile-core/libguile/hooks.c:1.18 Thu Jun 14 12:50:43 2001
+++ guile/guile-core/libguile/hooks.c Tue Jun 26 08:46:40 2001
@@ -307,7 +307,7 @@
SCM procs = SCM_HOOK_PROCEDURES (hook);
while (SCM_NIMP (procs))
{
- scm_apply (SCM_CAR (procs), args, SCM_EOL);
+ scm_apply_0 (SCM_CAR (procs), args);
procs = SCM_CDR (procs);
}
}
Index: guile/guile-core/libguile/load.c
diff -u guile/guile-core/libguile/load.c:1.62
guile/guile-core/libguile/load.c:1.63
--- guile/guile-core/libguile/load.c:1.62 Tue Jun 26 03:59:34 2001
+++ guile/guile-core/libguile/load.c Tue Jun 26 08:46:40 2001
@@ -119,7 +119,7 @@
SCM_EOL);
if (! SCM_FALSEP (hook))
- scm_apply (hook, SCM_LIST1 (filename), SCM_EOL);
+ scm_call_1 (hook, filename);
{ /* scope */
SCM port, save_port;
Index: guile/guile-core/libguile/modules.c
diff -u guile/guile-core/libguile/modules.c:1.29
guile/guile-core/libguile/modules.c:1.30
--- guile/guile-core/libguile/modules.c:1.29 Thu Jun 14 12:50:43 2001
+++ guile/guile-core/libguile/modules.c Tue Jun 26 08:46:40 2001
@@ -162,17 +162,15 @@
SCM
scm_resolve_module (SCM name)
{
- return scm_apply (SCM_VARIABLE_REF (resolve_module_var),
- SCM_LIST1 (name), SCM_EOL);
+ return scm_call_1 (SCM_VARIABLE_REF (resolve_module_var), name);
}
SCM
scm_c_define_module (const char *name,
void (*init)(void *), void *data)
{
- SCM module = scm_apply (SCM_VARIABLE_REF (process_define_module_var),
- SCM_LIST1 (SCM_LIST1 (convert_module_name (name))),
- SCM_EOL);
+ SCM module = scm_call_1 (SCM_VARIABLE_REF (process_define_module_var),
+ SCM_LIST1 (convert_module_name (name)));
if (init)
scm_c_call_with_current_module (module, (SCM (*)(void*))init, data);
return module;
@@ -181,9 +179,8 @@
void
scm_c_use_module (const char *name)
{
- scm_apply (SCM_VARIABLE_REF (process_use_modules_var),
- SCM_LIST1 (SCM_LIST1 (convert_module_name (name))),
- SCM_EOL);
+ scm_call_1 (SCM_VARIABLE_REF (process_use_modules_var),
+ SCM_LIST1 (convert_module_name (name)));
}
static SCM module_export_x_var;
@@ -203,10 +200,8 @@
*tail = scm_cons (scm_str2symbol (n), SCM_EOL);
tail = SCM_CDRLOC (*tail);
}
- scm_apply (SCM_VARIABLE_REF (module_export_x_var),
- SCM_LIST2 (scm_current_module (),
- names),
- SCM_EOL);
+ scm_call_2 (SCM_VARIABLE_REF (module_export_x_var),
+ scm_current_module (), names);
}
/* Environments */
@@ -292,9 +287,7 @@
if (SCM_NFALSEP (binder))
/* 2. Custom binder */
{
- b = scm_apply (binder,
- SCM_LIST3 (module, sym, SCM_BOOL_F),
- SCM_EOL);
+ b = scm_call_3 (binder, module, sym, SCM_BOOL_F);
if (SCM_NFALSEP (b))
return b;
}
@@ -329,9 +322,8 @@
{
if (SCM_EVAL_CLOSURE_INTERFACE_P (eclo))
return SCM_BOOL_F;
- return scm_apply (SCM_VARIABLE_REF (module_make_local_var_x_var),
- SCM_LIST2 (module, sym),
- SCM_EOL);
+ return scm_call_2 (SCM_VARIABLE_REF (module_make_local_var_x_var),
+ module, sym);
}
else
return module_variable (module, sym);
@@ -423,7 +415,7 @@
var = scm_eval_closure_lookup (proc, sym, definep);
}
else
- var = scm_apply (proc, sym, scm_cons (definep, scm_listofnull));
+ var = scm_call_2 (proc, sym, definep);
}
else
{
@@ -686,10 +678,9 @@
scm_c_issue_deprecation_warning ("`scm_make_module' is deprecated. "
"Use `scm_c_define_module instead.");
- return scm_apply (SCM_VARIABLE_REF (make_modules_in_var),
- SCM_LIST2 (scm_the_root_module (),
- scm_module_full_name (name)),
- SCM_EOL);
+ return scm_call_2 (SCM_VARIABLE_REF (make_modules_in_var),
+ scm_the_root_module (),
+ scm_module_full_name (name));
}
SCM
@@ -698,8 +689,7 @@
scm_c_issue_deprecation_warning ("`scm_ensure_user_module' is deprecated. "
"Use `scm_c_define_module instead.");
- scm_apply (SCM_VARIABLE_REF (beautify_user_module_x_var),
- SCM_LIST1 (module), SCM_EOL);
+ scm_call_1 (SCM_VARIABLE_REF (beautify_user_module_x_var), module);
return SCM_UNSPECIFIED;
}
@@ -709,8 +699,7 @@
scm_c_issue_deprecation_warning ("`scm_load_scheme_module' is deprecated. "
"Use `scm_c_resolve_module instead.");
- return scm_apply (SCM_VARIABLE_REF (try_module_autoload_var),
- SCM_LIST1 (name), SCM_EOL);
+ return scm_call_1 (SCM_VARIABLE_REF (try_module_autoload_var), name);
}
#endif
Index: guile/guile-core/libguile/ports.c
diff -u guile/guile-core/libguile/ports.c:1.150
guile/guile-core/libguile/ports.c:1.151
--- guile/guile-core/libguile/ports.c:1.150 Tue Jun 26 03:59:34 2001
+++ guile/guile-core/libguile/ports.c Tue Jun 26 08:46:40 2001
@@ -732,7 +732,7 @@
while (ports != SCM_EOL)
{
- scm_apply (proc, scm_cons (SCM_CAR (ports), SCM_EOL), SCM_EOL);
+ scm_call_1 (proc, SCM_CAR (ports));
ports = SCM_CDR (ports);
}
Index: guile/guile-core/libguile/print.c
diff -u guile/guile-core/libguile/print.c:1.126
guile/guile-core/libguile/print.c:1.127
--- guile/guile-core/libguile/print.c:1.126 Thu Jun 14 12:50:43 2001
+++ guile/guile-core/libguile/print.c Tue Jun 26 08:46:40 2001
@@ -1068,7 +1068,7 @@
SCM pair = scm_cons (port, pstate->handle);
SCM_NEWSMOB (pwps, scm_tc16_port_with_ps, SCM_UNPACK (pair));
pstate->revealed = 1;
- return scm_apply (proc, exp, scm_cons (pwps, scm_listofnull));
+ return scm_call_2 (proc, exp, pwps);
}
SCM_DEFINE (scm_port_with_print_state, "port-with-print-state", 2, 0, 0,
Index: guile/guile-core/libguile/properties.c
diff -u guile/guile-core/libguile/properties.c:1.4
guile/guile-core/libguile/properties.c:1.5
--- guile/guile-core/libguile/properties.c:1.4 Fri Mar 30 07:03:22 2001
+++ guile/guile-core/libguile/properties.c Tue Jun 26 08:46:40 2001
@@ -100,7 +100,7 @@
return SCM_BOOL_F;
else
{
- SCM val = scm_apply (SCM_CAR (prop), SCM_LIST2 (prop, obj), SCM_EOL);
+ SCM val = scm_call_2 (SCM_CAR (prop), prop, obj);
if (SCM_FALSEP (h))
h = scm_hashq_create_handle_x (scm_properties_whash, obj, SCM_EOL);
SCM_SETCDR (h, scm_acons (prop, val, SCM_CDR (h)));
Index: guile/guile-core/libguile/ramap.c
diff -u guile/guile-core/libguile/ramap.c:1.76
guile/guile-core/libguile/ramap.c:1.77
--- guile/guile-core/libguile/ramap.c:1.76 Thu Jun 14 12:50:43 2001
+++ guile/guile-core/libguile/ramap.c Tue Jun 26 08:46:40 2001
@@ -1241,7 +1241,7 @@
ra0 = SCM_ARRAY_V (ra0);
if (SCM_NULLP (ras))
for (; i <= n; i++)
- scm_array_set_x (ra0, scm_apply (proc, SCM_EOL, SCM_EOL), SCM_MAKINUM (i
* inc + base));
+ scm_array_set_x (ra0, scm_call_0 (proc), SCM_MAKINUM (i * inc + base));
else
{
SCM ra1 = SCM_CAR (ras);
@@ -1263,7 +1263,7 @@
for (k = SCM_INUM (scm_uniform_vector_length (ras)); k--;)
args = scm_cons (scm_uniform_vector_ref (ve[k], SCM_MAKINUM (i)),
args);
args = scm_cons (scm_cvref (ra1, i1, SCM_UNDEFINED), args);
- scm_array_set_x (ra0, scm_apply (proc, args, SCM_EOL), SCM_MAKINUM (i
* inc + base));
+ scm_array_set_x (ra0, scm_apply_0 (proc, args), SCM_MAKINUM (i * inc
+ base));
}
}
return 1;
@@ -1285,7 +1285,7 @@
default:
gencase:
for (; n-- > 0; i0 += inc0, i1 += inc1)
- scm_array_set_x (ra0, scm_apply (proc, RVREF (ra1, i1, e1),
scm_listofnull), SCM_MAKINUM (i0));
+ scm_array_set_x (ra0, scm_call_1 (proc, RVREF (ra1, i1, e1)), SCM_MAKINUM
(i0));
break;
case scm_tc7_fvect:
{
@@ -1635,7 +1635,7 @@
ra0 = SCM_ARRAY_V (ra0);
if (SCM_NULLP (ras))
for (; i <= n; i++, i0 += inc0)
- scm_apply (proc, scm_cvref (ra0, i0, SCM_UNDEFINED), scm_listofnull);
+ scm_call_1 (proc, scm_cvref (ra0, i0, SCM_UNDEFINED));
else
{
SCM ra1 = SCM_CAR (ras);
@@ -1657,7 +1657,7 @@
for (k = SCM_INUM (scm_uniform_vector_length (ras)); k--;)
args = scm_cons (scm_uniform_vector_ref (ve[k], SCM_MAKINUM (i)),
args);
args = scm_cons2 (scm_cvref (ra0, i0, SCM_UNDEFINED), scm_cvref (ra1,
i1, SCM_UNDEFINED), args);
- scm_apply (proc, args, SCM_EOL);
+ scm_apply_0 (proc, args);
}
}
return 1;
@@ -1710,7 +1710,7 @@
{
SCM *ve = SCM_VELTS (ra);
for (i = 0; i < SCM_VECTOR_LENGTH (ra); i++)
- ve[i] = scm_apply (proc, SCM_MAKINUM (i), scm_listofnull);
+ ve[i] = scm_call_1 (proc, SCM_MAKINUM (i));
return SCM_UNSPECIFIED;
}
case scm_tc7_string:
@@ -1728,7 +1728,7 @@
{
unsigned long int length = SCM_INUM (scm_uniform_vector_length (ra));
for (i = 0; i < length; i++)
- scm_array_set_x (ra, scm_apply (proc, SCM_MAKINUM (i),
scm_listofnull),
+ scm_array_set_x (ra, scm_call_1 (proc, SCM_MAKINUM (i)),
SCM_MAKINUM (i));
return SCM_UNSPECIFIED;
}
@@ -1740,8 +1740,7 @@
long *vinds = (long *) SCM_VELTS (inds);
int j, k, kmax = SCM_ARRAY_NDIM (ra) - 1;
if (kmax < 0)
- return scm_array_set_x (ra, scm_apply(proc, SCM_EOL, SCM_EOL),
- SCM_EOL);
+ return scm_array_set_x (ra, scm_call_0 (proc), SCM_EOL);
for (k = 0; k <= kmax; k++)
vinds[k] = SCM_ARRAY_DIMS (ra)[k].lbnd;
k = kmax;
@@ -1756,7 +1755,7 @@
for (j = kmax + 1, args = SCM_EOL; j--;)
args = scm_cons (SCM_MAKINUM (vinds[j]), args);
scm_array_set_x (SCM_ARRAY_V (ra),
- scm_apply (proc, args, SCM_EOL),
+ scm_apply_0 (proc, args),
SCM_MAKINUM (i));
i += SCM_ARRAY_DIMS (ra)[k].inc;
}
Index: guile/guile-core/libguile/read.c
diff -u guile/guile-core/libguile/read.c:1.71
guile/guile-core/libguile/read.c:1.72
--- guile/guile-core/libguile/read.c:1.71 Tue Jun 26 03:59:34 2001
+++ guile/guile-core/libguile/read.c Tue Jun 26 08:46:40 2001
@@ -424,9 +424,7 @@
int column = SCM_COL (port) - 2;
SCM got;
- got = scm_apply (sharp,
- SCM_MAKE_CHAR (c),
- scm_acons (port, SCM_EOL, SCM_EOL));
+ got = scm_call_2 (sharp, SCM_MAKE_CHAR (c), port);
if (SCM_EQ_P (got, SCM_UNSPECIFIED))
goto unkshrp;
if (SCM_RECORD_POSITIONS_P)
Index: guile/guile-core/libguile/scmsigs.c
diff -u guile/guile-core/libguile/scmsigs.c:1.58
guile/guile-core/libguile/scmsigs.c:1.59
--- guile/guile-core/libguile/scmsigs.c:1.58 Sat May 19 17:35:42 2001
+++ guile/guile-core/libguile/scmsigs.c Tue Jun 26 08:46:40 2001
@@ -51,6 +51,7 @@
#include "libguile/async.h"
#include "libguile/eval.h"
+#include "libguile/root.h"
#include "libguile/vectors.h"
#include "libguile/validate.h"
@@ -166,9 +167,7 @@
#ifndef HAVE_SIGACTION
signal (i, take_signal);
#endif
- scm_apply (SCM_VELTS (*signal_handlers)[i],
- SCM_LIST1 (SCM_MAKINUM (i)),
- SCM_EOL);
+ scm_call_1 (SCM_VELTS (*signal_handlers)[i], SCM_MAKINUM (i));
}
}
return SCM_UNSPECIFIED;
Index: guile/guile-core/libguile/sort.c
diff -u guile/guile-core/libguile/sort.c:1.35
guile/guile-core/libguile/sort.c:1.36
--- guile/guile-core/libguile/sort.c:1.35 Sun May 27 15:00:03 2001
+++ guile/guile-core/libguile/sort.c Tue Jun 26 08:46:40 2001
@@ -86,6 +86,7 @@
#include "libguile/ramap.h"
#include "libguile/alist.h"
#include "libguile/feature.h"
+#include "libguile/root.h"
#include "libguile/vectors.h"
#include "libguile/validate.h"
@@ -385,10 +386,7 @@
static int
applyless (SCM less, const void *a, const void *b)
{
- return SCM_NFALSEP (scm_apply (less,
- scm_cons (*(SCM *) a,
- scm_cons (*(SCM *) b, SCM_EOL)),
- SCM_EOL));
+ return SCM_NFALSEP (scm_call_2 (less, *(SCM *) a, *(SCM *) b));
} /* applyless */
static cmp_fun_t
Index: guile/guile-core/libguile/strports.c
diff -u guile/guile-core/libguile/strports.c:1.80
guile/guile-core/libguile/strports.c:1.81
--- guile/guile-core/libguile/strports.c:1.80 Tue Jun 26 03:59:34 2001
+++ guile/guile-core/libguile/strports.c Tue Jun 26 08:46:40 2001
@@ -333,7 +333,7 @@
if (SCM_UNBNDP (printer))
scm_write (obj, port);
else
- scm_apply (printer, SCM_LIST2 (obj, port), SCM_EOL);
+ scm_call_2 (printer, obj, port);
return scm_strport_to_string (port);
}
@@ -362,7 +362,7 @@
scm_make_string (SCM_INUM0, SCM_UNDEFINED),
SCM_OPN | SCM_WRTNG,
FUNC_NAME);
- scm_apply (proc, p, scm_listofnull);
+ scm_call_1 (proc, p);
return scm_strport_to_string (p);
}
@@ -376,7 +376,7 @@
#define FUNC_NAME s_scm_call_with_input_string
{
SCM p = scm_mkstrport(SCM_INUM0, string, SCM_OPN | SCM_RDNG, FUNC_NAME);
- return scm_apply (proc, p, scm_listofnull);
+ return scm_call_1 (proc, p);
}
#undef FUNC_NAME
Index: guile/guile-core/libguile/throw.c
diff -u guile/guile-core/libguile/throw.c:1.86
guile/guile-core/libguile/throw.c:1.87
--- guile/guile-core/libguile/throw.c:1.86 Thu Jun 14 12:50:43 2001
+++ guile/guile-core/libguile/throw.c Tue Jun 26 08:46:40 2001
@@ -348,7 +348,7 @@
{
struct scm_body_thunk_data *c = (struct scm_body_thunk_data *) body_data;
- return scm_apply (c->body_proc, SCM_EOL, SCM_EOL);
+ return scm_call_0 (c->body_proc);
}
@@ -367,7 +367,7 @@
{
SCM *handler_proc_p = (SCM *) handler_data;
- return scm_apply (*handler_proc_p, scm_cons (tag, throw_args), SCM_EOL);
+ return scm_apply_1 (*handler_proc_p, tag, throw_args);
}
/* SCM_HANDLE_BY_PROC_CATCHING_ALL is like SCM_HANDLE_BY_PROC but
@@ -383,7 +383,7 @@
hbpca_body (void *body_data)
{
struct hbpca_data *data = (struct hbpca_data *)body_data;
- return scm_apply (data->proc, data->args, SCM_EOL);
+ return scm_apply_0 (data->proc, data->args);
}
SCM
Index: guile/guile-core/libguile/unif.c
diff -u guile/guile-core/libguile/unif.c:1.116
guile/guile-core/libguile/unif.c:1.117
--- guile/guile-core/libguile/unif.c:1.116 Thu Jun 14 12:50:43 2001
+++ guile/guile-core/libguile/unif.c Tue Jun 26 08:46:40 2001
@@ -721,7 +721,7 @@
return ra;
}
}
- imap = scm_apply (mapfunc, scm_reverse (inds), SCM_EOL);
+ imap = scm_apply_0 (mapfunc, scm_reverse (inds));
if (SCM_ARRAYP (oldra))
i = (size_t) scm_aind (oldra, imap, FUNC_NAME);
else
@@ -743,7 +743,7 @@
if (s[k].ubnd > s[k].lbnd)
{
SCM_SETCAR (indptr, SCM_MAKINUM (SCM_INUM (SCM_CAR (indptr)) + 1));
- imap = scm_apply (mapfunc, scm_reverse (inds), SCM_EOL);
+ imap = scm_apply_0 (mapfunc, scm_reverse (inds));
if (SCM_ARRAYP (oldra))
s[k].inc = scm_aind (oldra, imap, FUNC_NAME) - i;
Index: guile/guile-core/libguile/vports.c
diff -u guile/guile-core/libguile/vports.c:1.47
guile/guile-core/libguile/vports.c:1.48
--- guile/guile-core/libguile/vports.c:1.47 Tue Jun 26 03:59:34 2001
+++ guile/guile-core/libguile/vports.c Tue Jun 26 08:46:40 2001
@@ -81,8 +81,7 @@
if (pt->write_pos > pt->write_buf)
{
/* write the byte. */
- scm_apply (SCM_VELTS (stream)[0], SCM_MAKE_CHAR (*pt->write_buf),
- scm_listofnull);
+ scm_call_1 (SCM_VELTS (stream)[0], SCM_MAKE_CHAR (*pt->write_buf));
pt->write_pos = pt->write_buf;
/* flush the output. */
@@ -90,7 +89,7 @@
SCM f = SCM_VELTS (stream)[2];
if (!SCM_FALSEP (f))
- scm_apply (f, SCM_EOL, SCM_EOL);
+ scm_call_0 (f);
}
}
}
@@ -100,9 +99,7 @@
{
SCM p = SCM_PACK (SCM_STREAM (port));
- scm_apply (SCM_VELTS (p)[1],
- scm_cons (scm_mem2string ((char *) data, size), SCM_EOL),
- SCM_EOL);
+ scm_call_1 (SCM_VELTS (p)[1], scm_mem2string ((char *) data, size));
}
/* calling the flush proc (element 2) is in case old code needs it,
@@ -116,7 +113,7 @@
SCM p = SCM_PACK (SCM_STREAM (port));
SCM ans;
- ans = scm_apply (SCM_VELTS (p)[3], SCM_EOL, SCM_EOL); /* get char. */
+ ans = scm_call_0 (SCM_VELTS (p)[3]); /* get char. */
if (SCM_FALSEP (ans) || SCM_EOF_OBJECT_P (ans))
return EOF;
SCM_ASSERT (SCM_CHARP (ans), ans, SCM_ARG1, "sf_fill_input");
@@ -138,7 +135,7 @@
SCM f = SCM_VELTS (p)[4];
if (SCM_FALSEP (f))
return 0;
- f = scm_apply (f, SCM_EOL, SCM_EOL);
+ f = scm_call_0 (f);
errno = 0;
return SCM_FALSEP (f) ? EOF : 0;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- guile/guile-core/libguile ChangeLog async.c coo...,
Keisuke Nishida <=