mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-22 03:30:22 +02:00
rename <application> to <call>
* doc/ref/compiler.texi (The Scheme Compiler): Update docs. * libguile/expand.h: * libguile/expand.c: * module/language/tree-il.scm: Rename <application> to <call>. Change the external representation from (apply proc arg ...) to (call proc arg ...). * libguile/memoize.c: * module/ice-9/psyntax-pp.scm: * module/ice-9/psyntax.scm: * module/language/brainfuck/compile-tree-il.scm: * module/language/ecmascript/compile-tree-il.scm: * module/language/elisp/compile-tree-il.scm: * module/language/tree-il/analyze.scm: * module/language/tree-il/compile-glil.scm: * module/language/tree-il/fix-letrec.scm: * module/language/tree-il/inline.scm: * module/language/tree-il/primitives.scm: * test-suite/tests/tree-il.test: Update all callers.
This commit is contained in:
parent
d31d703fd4
commit
7081d4f981
16 changed files with 447 additions and 447 deletions
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010
|
||||
/* Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011
|
||||
* Free Software Foundation, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
|
@ -71,8 +71,8 @@ static const char** exp_field_names[SCM_NUM_EXPANDED_TYPES];
|
|||
SCM_MAKE_EXPANDED_TOPLEVEL_DEFINE(src, name, exp)
|
||||
#define CONDITIONAL(src, test, consequent, alternate) \
|
||||
SCM_MAKE_EXPANDED_CONDITIONAL(src, test, consequent, alternate)
|
||||
#define APPLICATION(src, proc, exps) \
|
||||
SCM_MAKE_EXPANDED_APPLICATION(src, proc, exps)
|
||||
#define CALL(src, proc, exps) \
|
||||
SCM_MAKE_EXPANDED_CALL(src, proc, exps)
|
||||
#define SEQUENCE(src, exps) \
|
||||
SCM_MAKE_EXPANDED_SEQUENCE(src, exps)
|
||||
#define LAMBDA(src, meta, body) \
|
||||
|
@ -359,9 +359,9 @@ expand (SCM exp, SCM env)
|
|||
arg_exps = CDR (arg_exps))
|
||||
args = scm_cons (expand (CAR (arg_exps), env), args);
|
||||
if (scm_is_null (arg_exps))
|
||||
return APPLICATION (scm_source_properties (exp),
|
||||
expand (proc, env),
|
||||
scm_reverse_x (args, SCM_UNDEFINED));
|
||||
return CALL (scm_source_properties (exp),
|
||||
expand (proc, env),
|
||||
scm_reverse_x (args, SCM_UNDEFINED));
|
||||
else
|
||||
syntax_error ("expected a proper list", exp, SCM_UNDEFINED);
|
||||
}
|
||||
|
@ -487,10 +487,10 @@ expand_cond_clauses (SCM clause, SCM rest, int elp, int alp, SCM env)
|
|||
scm_list_1 (expand (test, env)),
|
||||
CONDITIONAL (SCM_BOOL_F,
|
||||
LEXICAL_REF (SCM_BOOL_F, tmp, tmp),
|
||||
APPLICATION (SCM_BOOL_F,
|
||||
expand (CADDR (clause), new_env),
|
||||
scm_list_1 (LEXICAL_REF (SCM_BOOL_F,
|
||||
tmp, tmp))),
|
||||
CALL (SCM_BOOL_F,
|
||||
expand (CADDR (clause), new_env),
|
||||
scm_list_1 (LEXICAL_REF (SCM_BOOL_F,
|
||||
tmp, tmp))),
|
||||
rest));
|
||||
}
|
||||
/* FIXME length == 1 case */
|
||||
|
@ -993,9 +993,9 @@ expand_named_let (const SCM expr, SCM env)
|
|||
SCM_BOOL_F, SCM_BOOL_F, var_syms,
|
||||
expand_sequence (CDDDR (expr), inner_env),
|
||||
SCM_BOOL_F))),
|
||||
APPLICATION (SCM_BOOL_F,
|
||||
LEXICAL_REF (SCM_BOOL_F, name, name_sym),
|
||||
expand_exprs (inits, env)));
|
||||
CALL (SCM_BOOL_F,
|
||||
LEXICAL_REF (SCM_BOOL_F, name, name_sym),
|
||||
expand_exprs (inits, env)));
|
||||
}
|
||||
|
||||
static SCM
|
||||
|
@ -1243,7 +1243,7 @@ scm_init_expand ()
|
|||
DEFINE_NAMES (TOPLEVEL_SET);
|
||||
DEFINE_NAMES (TOPLEVEL_DEFINE);
|
||||
DEFINE_NAMES (CONDITIONAL);
|
||||
DEFINE_NAMES (APPLICATION);
|
||||
DEFINE_NAMES (CALL);
|
||||
DEFINE_NAMES (SEQUENCE);
|
||||
DEFINE_NAMES (LAMBDA);
|
||||
DEFINE_NAMES (LAMBDA_CASE);
|
||||
|
|
|
@ -47,7 +47,7 @@ typedef enum
|
|||
SCM_EXPANDED_TOPLEVEL_SET,
|
||||
SCM_EXPANDED_TOPLEVEL_DEFINE,
|
||||
SCM_EXPANDED_CONDITIONAL,
|
||||
SCM_EXPANDED_APPLICATION,
|
||||
SCM_EXPANDED_CALL,
|
||||
SCM_EXPANDED_SEQUENCE,
|
||||
SCM_EXPANDED_LAMBDA,
|
||||
SCM_EXPANDED_LAMBDA_CASE,
|
||||
|
@ -228,18 +228,18 @@ enum
|
|||
#define SCM_MAKE_EXPANDED_CONDITIONAL(src, test, consequent, alternate) \
|
||||
scm_c_make_struct (exp_vtables[SCM_EXPANDED_CONDITIONAL], 0, SCM_NUM_EXPANDED_CONDITIONAL_FIELDS, SCM_UNPACK (src), SCM_UNPACK (test), SCM_UNPACK (consequent), SCM_UNPACK (alternate))
|
||||
|
||||
#define SCM_EXPANDED_APPLICATION_TYPE_NAME "application"
|
||||
#define SCM_EXPANDED_APPLICATION_FIELD_NAMES \
|
||||
#define SCM_EXPANDED_CALL_TYPE_NAME "call"
|
||||
#define SCM_EXPANDED_CALL_FIELD_NAMES \
|
||||
{ "src", "proc", "args", }
|
||||
enum
|
||||
{
|
||||
SCM_EXPANDED_APPLICATION_SRC,
|
||||
SCM_EXPANDED_APPLICATION_PROC,
|
||||
SCM_EXPANDED_APPLICATION_ARGS,
|
||||
SCM_NUM_EXPANDED_APPLICATION_FIELDS,
|
||||
SCM_EXPANDED_CALL_SRC,
|
||||
SCM_EXPANDED_CALL_PROC,
|
||||
SCM_EXPANDED_CALL_ARGS,
|
||||
SCM_NUM_EXPANDED_CALL_FIELDS,
|
||||
};
|
||||
#define SCM_MAKE_EXPANDED_APPLICATION(src, proc, args) \
|
||||
scm_c_make_struct (exp_vtables[SCM_EXPANDED_APPLICATION], 0, SCM_NUM_EXPANDED_APPLICATION_FIELDS, SCM_UNPACK (src), SCM_UNPACK (proc), SCM_UNPACK (args))
|
||||
#define SCM_MAKE_EXPANDED_CALL(src, proc, args) \
|
||||
scm_c_make_struct (exp_vtables[SCM_EXPANDED_CALL], 0, SCM_NUM_EXPANDED_CALL_FIELDS, SCM_UNPACK (src), SCM_UNPACK (proc), SCM_UNPACK (args))
|
||||
|
||||
#define SCM_EXPANDED_SEQUENCE_TYPE_NAME "sequence"
|
||||
#define SCM_EXPANDED_SEQUENCE_FIELD_NAMES \
|
||||
|
|
|
@ -241,12 +241,12 @@ memoize (SCM exp, SCM env)
|
|||
memoize (REF (exp, CONDITIONAL, CONSEQUENT), env),
|
||||
memoize (REF (exp, CONDITIONAL, ALTERNATE), env));
|
||||
|
||||
case SCM_EXPANDED_APPLICATION:
|
||||
case SCM_EXPANDED_CALL:
|
||||
{
|
||||
SCM proc, args;
|
||||
|
||||
proc = REF (exp, APPLICATION, PROC);
|
||||
args = memoize_exps (REF (exp, APPLICATION, ARGS), env);
|
||||
proc = REF (exp, CALL, PROC);
|
||||
args = memoize_exps (REF (exp, CALL, ARGS), env);
|
||||
|
||||
if (SCM_EXPANDED_TYPE (proc) == SCM_EXPANDED_TOPLEVEL_REF)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue