| Commit message (Expand) | Author | Age | Files | Lines |
* | deprecate lookup closures...* libguile/deprecated.h (SCM_TOP_LEVEL_LOOKUP_CLOSURE):
* libguile/deprecated.c (scm_lookup_closure_module):
(scm_module_lookup_closure):
(scm_current_module_lookup_closure): Deprecate this part of the eval
closure interface. It was unused internally, after the scm_sym2var
refactor.
* libguile/eval.h:
* libguile/modules.c:
* libguile/modules.h: Remove deprecated code.
* libguile/goops.c (scm_ensure_accessor): Use scm_module_variable
instead of calling the lookup closure. However I'm not sure that this
code is used at all.
| Andy Wingo | 2012-05-23 | 1 | -5/+1 |
* | Rename scm_call_varargs -> scm_call...* libguile/eval.c, libguile/eval.h, doc/ref/api-evaluation.texi,
test-suite/standalone/test-loose-ends.c, NEWS: Rename
scm_call_varargs -> scm_call
Suggested by Ludovic Courtès <ludo@gnu.org>
| Mark H Weaver | 2012-01-30 | 1 | -1/+1 |
* | Implement scm_call_varargs and scm_call_{7,8,9}...* libguile/eval.c (scm_call_7, scm_call_8, scm_call_9,
scm_call_varargs): New functions.
* libguile/eval.h: Add prototypes.
* doc/ref/api-evaluation.texi: Add documentation.
* test-suite/standalone/test-loose-ends.c: Add tests.
* NEWS: Add news entry.
| Mark H Weaver | 2012-01-30 | 1 | -0/+7 |
* | add scm_call_{5,6}...* libguile/eval.h:
* libguile/eval.c (scm_call_5, scm_call_6): New scm_call functions; why
not.
| Andy Wingo | 2011-03-08 | 1 | -1/+5 |
* | scm_badargsp is deprecated...* libguile/eval.h:
* libguile/eval.c:
* libguile/deprecated.h
* libguile/deprecated.c (scm_badargsp): Deprecate scm_badargsp.
| Andy Wingo | 2010-05-13 | 1 | -2/+1 |
* | add scm_call_n, scm_c_run_hookn...* libguile/eval.h:
* libguile/eval.c (scm_call_n): New function, applies a function to an
array of args.
* libguile/hooks.h:
* libguile/hooks.c (scm_c_run_hookn): New function, runs a hook with an
array of args.
| Andy Wingo | 2009-12-21 | 1 | -0/+1 |
* | eval.c closures are now applicable smobs, not tc3s...* libguile/debug.c (scm_procedure_name): Remove a SCM_CLOSUREP case and
some dead code.
(scm_procedure_module): Remove. This was introduced a few months ago
for the hygienic expander, but now it is no longer needed, as the
expander keeps track of this information itself.
* libguile/debug.h: Remove scm_procedure_module.
* libguile/eval.c: Instead of using tc3 closures, define a "boot
closure" applicable smob type, and represent closures with that. The
advantage is that after eval.scm is compiled, boot closures take up no
address space (besides a smob number) in the runtime, and require no
special cases in procedure dispatch.
* libguile/eval.h: Remove the internal functions scm_i_call_closure_0
and scm_closure_apply, and the public function scm_closure.
* libguile/gc.c (scm_storage_prehistory): No tc3_closure displacement
registration.
(scm_i_tag_name): Remove closure case, and a dead cclo case.
* libguile/vm.c (apply_foreign):
* libguile/print.c (iprin1):
* libguile/procs.c (scm_procedure_p, scm_procedure_documentation);
* libguile/evalext.c (scm_self_evaluating_p):
* libguile/goops.c (scm_class_of): Remove tc3_closure/tcs_closure cases.
* libguile/hash.c (scm_hasher):
* libguile/hooks.c (scm_add_hook_x): Use new scm_i_procedure_arity.
* libguile/macros.c (macro_print): Print all macros using the same code.
(scm_macro_transformer): Return any procedure, not just programs.
* libguile/procprop.h:
* libguile/procprop.c (scm_i_procedure_arity): Instead of returning a
list that the caller has to parse, have the same prototype as
scm_i_program_arity. An incompatible change, but it's an internal
function anyway.
(scm_procedure_properties, scm_set_procedure_properties)
(scm_procedure_property, scm_set_procedure_property): Remove closure
cases, and use scm_i_program_arity for arity.
* libguile/procs.h (SCM_CLOSUREP, SCM_CLOSCAR, SCM_CODE)
(SCM_CLOSURE_NUM_REQUIRED_ARGS, SCM_CLOSURE_HAS_REST_ARGS)
(SCM_CLOSURE_BODY, SCM_PROCPROPS, SCM_SETPROCPROPS, SCM_ENV)
(SCM_TOP_LEVEL): Remove these macros that pertain to boot closures
only. Only eval.c should know abut boot closures.
* libguile/procs.c (scm_closure_p): Remove this function. There is a
simple stub in deprecated.scm now.
(scm_thunk_p): Use scm_i_program_arity.
* libguile/tags.h (scm_tc3_closure): Remove. Yay, another tc3 to play
with!
(scm_tcs_closures): Remove.
* libguile/validate.h (SCM_VALIDATE_CLOSURE): Remove.
* module/ice-9/deprecated.scm (closure?): Add stub.
* module/ice-9/documentation.scm (object-documentation)
* module/ice-9/session.scm (help-doc, arity)
* module/oop/goops.scm (compute-getters-n-setters)
* module/oop/goops/describe.scm (describe)
* module/system/repl/describe.scm (display-object, display-type):
Remove calls to closure?.
| Andy Wingo | 2009-12-04 | 1 | -3/+0 |
* | first step to make the vm stop calling the interpreter...* libguile/eval.h:
* libguile/eval.c (scm_closure_apply): New function, applies a closure.
Won't be necessary in the future, but for now here it is, with
internal linkage.
* libguile/gsubr.h:
* libguile/gsubr.c (scm_i_gsubr_apply_array): New function, applies a
gsubr to an array of values, potentially extending that array for
optional arguments and rest arguments and such.
* libguile/vm.c (apply_foreign): New function, applies a foreign
function to arguments on the stack, in place.
* libguile/vm-i-system.c (call): Add a case for procedures-with-setters
(will go away when they are applicable structs). Instead of calling
the evaluator for foreign functions, call apply_foreign.
| Andy Wingo | 2009-12-01 | 1 | -0/+1 |
* | promises are in their own file now...* libguile.h:
* libguile/Makefile.am:
* libguile/eval.c:
* libguile/eval.h:
* libguile/init.c:
* libguile/promises.c:
* libguile/promises.h: Split promises out into their own file.
| Andy Wingo | 2009-12-01 | 1 | -20/+0 |
* | new evaluator, y'all...* libguile/eval.c: So, ladies & gents, a new evaluator. It's similar to
the old one, in that we memoize and then evaluate, but in this
incarnation, memoization of an expression happens before evaluation,
not lazily as the expression is evaluated. This makes the evaluation
itself much cleaner, in addition to being threadsafe. In addition,
since this C evaluator will in the future just serve to bootstrap the
Scheme evaluator, we don't have to pay much concern for debugging
conveniences. So the environment is just a list of values, and the
memoizer pre-computes where it's going to find each individual value
in the environment.
Interface changes are commented below, with eval.h.
(scm_evaluator_traps): No need to reset the debug mode after rnning te
traps thing. But really, the whole traps system needs some love.
* libguile/memoize.h:
* libguile/memoize.c: New memoizer, which runs before evaluation,
checking all syntax before evaluation begins. Significantly, no
debugging information is left for lexical variables, which is not so
great for interactive debugging; perhaps we should change this to have
a var list in the future as per the classic interpreters. But it's
quite fast, and the resulting code is quite good. Also note that it
doesn't produce ilocs, memoized code is a smob whose type is in the
first word of the smob itself.
* libguile/eval.h (scm_sym_and, scm_sym_begin, scm_sym_case)
(scm_sym_cond, scm_sym_define, scm_sym_do, scm_sym_if, scm_sym_lambda)
(scm_sym_let, scm_sym_letstar, scm_sym_letrec, scm_sym_quote)
(scm_sym_quasiquote, scm_sym_unquote, scm_sym_uq_splicing, scm_sym_at)
(scm_sym_atat, scm_sym_atapply, scm_sym_atcall_cc)
(scm_sym_at_call_with_values, scm_sym_delay, scm_sym_eval_when)
(scm_sym_arrow, scm_sym_else, scm_sym_apply, scm_sym_set_x)
(scm_sym_args): Remove public declaration of these symbols.
(scm_ilookup, scm_lookupcar, scm_eval_car, scm_eval_body)
(scm_eval_args, scm_i_eval_x, scm_i_eval): Remove public declaration
of these functions.
(scm_ceval, scm_deval, scm_ceval_ptr): Remove declarations of these
deprecated functions.
(scm_i_print_iloc, scm_i_print_isym, scm_i_unmemocopy_expr)
(scm_i_unmemocopy_body): Remove declarations of these internal
functions.
(scm_primitive_eval_x, scm_eval_x): Redefine as macros for their less
destructive siblings.
* libguile/Makefile.am: Add memoize.[ch] to the build.
* libguile/debug.h (scm_debug_mode_p, scm_check_entry_p)
(scm_check_apply_p, scm_check_exit_p, scm_check_memoize_p)
(scm_debug_eframe_size): Remove these vars that were tied to the old
evaluator's execution model.
(SCM_RESET_DEBUG_MODE): Remove, no more need for this.
(SCM_MEMOIZEDP, SCM_MEMOIZED_EXP, SCM_MEMOIZED_ENV): Remove macros
referring to old memoized code representation.
(scm_local_eval, scm_procedure_environment, scm_memoized_environment)
(scm_make_memoized, scm_memoized_p): Remove functions operating on old
memoized code representation.
(scm_memcons, scm_mem_to_proc, scm_proc_to_mem): Remove debug-only
code for old evaluator.
* libguile/debug.c: Remove code to correspond with debug.h removals.
(scm_debug_options): No need to set the debug mode or frame limit
here, as we don't have C stack limits any more. Perhaps this is a bug,
but as long as we can compile eval.scm, we should be fine.
* libguile/init.c (scm_i_init_guile): Init memoize.c.
* libguile/modules.c (scm_top_level_env, scm_env_top_level)
(scm_env_module, scm_system_module_env_p): Remove these functions.
* libguile/print.c (iprin1): No more need to handle isyms. Adapt to new
form of interpreted procedures.
* libguile/procprop.c (scm_i_procedure_arity): Adapt to new form of
interpreted procedures.
* libguile/procs.c (scm_thunk_p): Adapt to new form of interpreted
procedures.
* libguile/procs.h (SCM_CLOSURE_FORMALS): Removed, this exists no more.
(SCM_CLOSURE_NUM_REQUIRED_ARGS, SCM_CLOSURE_HAS_REST_ARGS): New
accessors.
* libguile/srcprop.c (scm_source_properties, scm_source_property)
(scm_set_source_property_x): Remove special cases for memoized code.
* libguile/stacks.c (read_frame): Remove a source-property case for
interpreted code.
(NEXT_FRAME): Remove a case that I don't fully understand, that seems
to be designed to skip over apply frames. Will be obsolete in the
futures.
(read_frames): Default source value for interpreted frames to #f.
(narrow_stack): Don't pay attention to the system_module thing.
* libguile/tags.h: Remove isyms and ilocs. Whee!
* libguile/validate.h (SCM_VALIDATE_MEMOIZED): Fix to use the new
MEMOIZED_P formulation.
* module/ice-9/psyntax-pp.scm (do, quasiquote, case): Adapt for these no
longer being primitive macros.
* module/ice-9/boot-9.scm: Whitespace change, but just a poke to force a
rebuild due to and/or/cond/... not being primitives any more.
* module/ice-9/deprecated.scm (unmemoize-expr): Deprecate, it's
unmemoize-expression now.
* test-suite/tests/eval.test ("define set procedure-name"): XFAIL a
couple of tests here; I don't know what to do about them. I reckon the
expander should ensure that defined values are named.
* test-suite/tests/chars.test ("basic char handling"): Fix expected
exception when trying to apply a char.
| Andy Wingo | 2009-12-01 | 1 | -58/+4 |
* | factor copy-tree and cons-source out of eval.[ch]...* libguile.h:
* libguile/Makefile.am
* libguile/init.c (scm_i_init_guile): Add trees.[ch] to the build.
* libguile/eval.c:
* libguile/eval.h: Remove scm_copy_tree and scm_cons_source...
* libguile/trees.h:
* libguile/trees.c:
* libguile/srcprop.h:
* libguile/srcprop.c: ... factoring them out here and here,
respectively.
* test-suite/tests/eval.test ("memoization"): Change expected exception
for circular data structures, given new copy-tree location.
| Andy Wingo | 2009-12-01 | 1 | -2/+0 |
* | Use `SCM_DEPRECATED' in declarations of deprecated functions/variables....* libguile/deprecated.c (SCM_BUILDING_DEPRECATED_CODE): New macro.
* libguile/async.c (SCM_BUILDING_DEPRECATED_CODE): Likewise.
* libguile/macros.c (SCM_BUILDING_DEPRECATED_CODE): Likewise.
* libguile/async.h, libguile/deprecated.h, libguile/eval.h,
libguile/gc.h, libguile/gc.h, libguile/macros.h, libguile/ports.h,
libguile/srfi-4.h, libguile/strings.h: Change declarations of
deprecated functions and variables to use `SCM_DEPRECATED' instead of
`SCM_API'.
| Ludovic Courtès | 2009-10-02 | 1 | -3/+3 |
* | Remove deprecated semi-public memoizers....* libguile/eval.c (scm_m_expand_body, scm_macroexp, scm_unmemocar):
Remove.
(scm_m_undefine): Make `static'.
* libguile/eval.h (scm_m_undefine, scm_m_expand_body, scm_unmemocar,
scm_macroexp): Remove declarations.
| Ludovic Courtès | 2009-08-13 | 1 | -9/+0 |
* | Make the evaluator's memoizers private....* libguile/eval.c (macroexp): Move upwards.
(scm_m_quote, scm_m_begin, scm_m_if, scm_m_set_x, scm_m_and, scm_m_or,
scm_m_case, scm_m_cond, scm_m_lambda, scm_m_letstar, scm_m_do,
scm_m_quasiquote, scm_m_delay, scm_m_generalized_set_x,
scm_m_define, scm_m_letrec, scm_m_let, scm_m_at, scm_m_atat,
scm_m_apply, scm_m_cont, scm_m_nil_cond, scm_m_atfop,
scm_m_atbind, scm_m_atslot_ref, scm_m_atslot_set_x,
scm_m_at_call_with_values, scm_m_eval_when): New static
declarations; definitions made static.
(s_atslot_ref, s_atslot_set_x): New, from `goops.c'.
* libguile/eval.h (scm_m_quote, scm_m_begin, scm_m_if, scm_m_set_x,
scm_m_vref, scm_m_vset, scm_m_and, scm_m_or, scm_m_case, scm_m_cond,
scm_m_lambda, scm_m_letstar, scm_m_do, scm_m_quasiquote, scm_m_delay,
scm_m_generalized_set_x, scm_m_future, scm_m_define, scm_m_letrec,
scm_m_let, scm_m_at, scm_m_atat, scm_m_apply, scm_m_cont,
scm_m_nil_cond, scm_m_atfop, scm_m_atbind, scm_m_atslot_ref,
scm_m_atslot_set_x, scm_m_atdispatch, scm_m_at_call_with_values,
scm_m_eval_when): Remove public declarations.
* libguile/goops.c (s_atslot_ref, s_atslot_set_x): Remove.
| Ludovic Courtès | 2009-08-13 | 1 | -35/+1 |
* | Change Guile license to LGPLv3+...(Not quite finished, the following will be done tomorrow.
module/srfi/*.scm
module/rnrs/*.scm
module/scripts/*.scm
testsuite/*.scm
guile-readline/*
)
| Neil Jerram | 2009-06-17 | 1 | -6/+7 |
* | make sure we compile boot code in (guile), not (guile-user)...* libguile/eval.h:
* libguile/eval.c (scm_m_eval_when): Define a cheap eval-when, used
before syncase has booted.
* module/Makefile.am: Reorder to put (system vm) and (system repl)
modules after the compiler, as they are not needed at runtime.
* module/ice-9/boot-9.scm: Move the eval-when earlier, to be the first
thing -- so when we recompile Guile we do so all in the '(guile)
module, not '(guile-user).
* module/ice-9/compile-psyntax.scm: Rewrite to assume that psyntax.scm
will eval-when to set its module, etc. Have everything in a let --
otherwise the `format' call is in (guile), but `target' was defined
in (guile-user). Also, write in an eval-when to the expanded file.
* module/ice-9/psyntax-pp.scm: Regenerate.
* module/ice-9/networking.scm:
* module/ice-9/psyntax.scm:
* module/ice-9/r4rs.scm: Sprinkles of eval-when, for flavor.
| Andy Wingo | 2009-04-24 | 1 | -0/+2 |
* | @ and @@ as primitive macros...* libguile/eval.h:
* libguile/eval.c (error_unbound_variable, error_defined_variable):
Move these prototypes up earlier.
(scm_m_at, scm_m_atat): New functions, provide the @ and @@
functionality. Moved here from defmacros because they are
"special", inasmuch as syncase doesn't really understand them in
interpreted code.
* module/ice-9/boot-9.scm (@, @@): Don't define as defmacros, as
defmacros have to actually return source now.
| Andy Wingo | 2009-04-17 | 1 | -0/+4 |
* | export `make-promise' to scheme...* libguile/eval.h:
* libguile/eval.c (scm_make_promise): Rename from `scm_makprom', and
export as the scheme procedure, `make-promise'.
* libguile/eval.i.c (CEVAL): s/makprom/make_promise/.
| Andy Wingo | 2008-09-25 | 1 | -1/+1 |
* | Add `SCM_INTERNAL' macro, use it. | Ludovic Courtès | 2008-05-31 | 1 | -9/+9 |
* | * backtrace.c, debug.c, debug.h, deprecation.c, eq.c, eval.c...eval.h, gsubr.c, init.c, macros.c, print.c, print.h, read.c,
read.h, stacks.c, symbols.c, throw.c: use private-options.h
* private-options.h: new file: contain hardcoded option
definitions.
| Han-Wen Nienhuys | 2007-01-22 | 1 | -21/+0 |
* | * debug.h (SCM_RESET_DEBUG_MODE): switch to debugging if...memoize-symbol is set.
* eval.h (SCM_MEMOIZE_HDLR): add macros for memoize symbol trap.
* eval.c (CEVAL): add memoize_symbol trap.
* read.c: idem.
* eval.c: terminate option lists with 0.
| Han-Wen Nienhuys | 2007-01-19 | 1 | -5/+8 |
* | * readline.c: terminate option list with NULL....* read.c: idem.
* print.c: idem.
* eval.c: terminate option lists with 0.
* options.c: remove n (for length) from scm_option_X
functions. Detect option list length by looking for NULL name.
| Han-Wen Nienhuys | 2007-01-19 | 1 | -5/+4 |
* | The FSF has a new address. | Marius Vollmer | 2005-05-23 | 1 | -1/+1 |
* | See ChangeLog from 2005-03-02. | Marius Vollmer | 2005-03-02 | 1 | -2/+1 |
* | Reverted changed from 2005/01/24 19:14:54, which was a commit to the...wrong branch. Sorry.
| Marius Vollmer | 2005-01-24 | 1 | -1/+2 |
* | Threading changes. | Marius Vollmer | 2005-01-24 | 1 | -2/+1 |
* | * backtrace.c (display_expression, display_frame): Call... scm_i_unmemoize_expr for unmemoizing a memoized object holding a
single memoized expression.
* debug.c (memoized_print): Don't try to unmemoize the memoized
object, since we can't know whether it holds a single expression
or a body.
(scm_mem_to_proc): Removed check for lambda expression, since it
was moot anyway. Whoever uses these functions for debugging
purposes should know what they do: Creating invalid memoized code
will cause crashes, independent of whether this check is present
or not.
(scm_proc_to_mem): Take the closure's code as it is and don't
append a SCM_IM_LAMBDA isym. To allow easier debugging, the
memoized code should not be modified.
* debug.[ch] (scm_unmemoize, scm_i_unmemoize_expr): Removed
scm_unmemoize from public use, but made scm_i_unmemoize_expr
available as a guile internal function instead. However,
scm_i_unmemoize_expr will only work on memoized objects that hold
a single memoized expression. It won't work with bodies.
* debug.c (scm_procedure_source), macros.c (macro_print), print.c
(scm_iprin1): Call scm_i_unmemocopy_body for unmemoizing a body,
i. e. a list of expressions.
* eval.c (unmemoize_exprs): Drop internal body markers from the
output during unmemoization.
* eval.[ch] (scm_unmemocopy, scm_i_unmemocopy_expr,
scm_i_unmemocopy_body): Removed scm_unmemocopy from public use,
but made scm_i_unmemocopy_expr and scm_i_unmemocopy_body available
as guile internal functions instead. scm_i_unmemoize_expr will
only work on a single memoized expression, while
scm_i_unmemocopy_body will only work on bodies.
| Dirk Herrmann | 2004-06-27 | 1 | -1/+2 |
* | Use SCM_SMOB_* instead of SCM_CELL_* as appropriate. Use...SCM_SMOB_FLAGS and SCM_SET_SMOB_FLAGS instead of accessing the
zeroth word directly. Use SCM_SMOB_PREDICATE as appropriate.
| Marius Vollmer | 2004-05-06 | 1 | -6/+8 |
* | Hide the implementation of ilocs and isyms in eval.c.... * deprecated.h (SCM_IFRINC, SCM_ICDR, SCM_IFRAME, SCM_IDIST,
SCM_ICDRP), eval.c (SCM_IFRINC, SCM_ICDR, SCM_IFRAME, SCM_IDIST,
SCM_ICDRP), eval.h (SCM_ICDR, SCM_IFRINC, SCM_IFRAME, SCM_IDIST,
SCM_ICDRP): Deprecated and added to deprecated.h. Moved from
eval.h to eval.c.
* deprecated.c (scm_isymnames), deprecated.h (scm_isymnames,
SCM_ISYMNUM, SCM_ISYMCHARS), eval.c (SCM_ISYMNUM, isymnames,
scm_unmemocopy, CEVAL), print.c (scm_isymnames), tags.h
(SCM_ISYMNUM, scm_isymnames, SCM_ISYMCHARS): Deprecated
scm_isymnames, SCM_ISYMNUM and SCM_ISYMCHARS and added to
deprecated.[hc]. Moved scm_isymnames from print.c to eval.c and
renamed to isymnames. Moved SCM_ISYMNUM from tags.h to eval.c and
renamed to ISYMNUM.
* eval.c (scm_i_print_iloc, scm_i_print_isym), eval.h
(scm_i_print_iloc, scm_i_print_isym), print.c (scm_iprin1):
Extracted printing of ilocs and isyms to guile internal functions
scm_i_print_iloc, scm_i_print_isym of eval.c.
| Dirk Herrmann | 2004-04-22 | 1 | -6/+2 |
* | Introduce scm_debug_mode_p as a replacement for scm_debug_mode and... SCM_DEBUGGINGP:
* debug.h (scm_debug_mode_p, scm_debug_mode, SCM_DEBUGGINGP),
eval.c (scm_debug_mode_p): Deprecated scm_debug_mode and
SCM_DEBUGGINGP. Provided scm_debug_mode_p instead, to have one
single interface that also matches the naming conventions.
Probably scm_debug_mode_p should be part of the private interface
anyway.
* debug.h (scm_debug_mode_p), backtrace.c (display_error_body),
eval.c (SCM_APPLY, scm_trampoline_0, scm_trampoline_1,
scm_trampoline_2): Change uses of scm_debug_mode or SCM_DEBUGGINGP
to scm_debug_mode_p.
Deprecate direct access to scm_ceval, scm_deval and scm_ceval_ptr:
* eval.h (scm_ceval, scm_deval, scm_ceval_ptr), debug.h
(scm_ceval_ptr): Deprecated. Moved declaration of scm_ceval_ptr
from debug.h to eval.h.
* debug.h (SCM_RESET_DEBUG_MODE): Don't access scm_ceval_ptr any
more, just leave it with setting scm_debug_mode_p, which is
equivalent for practical purposes.
* deprecated.h (SCM_XEVAL, SCM_XEVALCAR): Call scm_i_eval_x
instead of *scm_ceval_ptr. Leave all evaluating to scm_i_eval_x.
* gdbint.c (gdb_eval): Call scm_i_eval_x instead of scm_ceval.
* eval.c (ceval, deval, scm_ceval, scm_deval): Made scm_ceval
static and renamed it to ceval throughout. Provide a new exported
but deprecated function scm_ceval as a wrapper for backwards
compatibility. The same is done for the deval/scm_deval pair of
functions.
* eval.c (CEVAL, SCM_CEVAL): Renamed SCM_CEVAL to CEVAL
throughout. Defined CEVAL to ceval or deval, based on compilation
phase.
* eval.c (SCM_XEVAL, SCM_XEVALCAR): Dispatch on scm_debug_mode_p
to ceval and deval instead of calling *scm_ceval_ptr.
* eval.c (dispatching_eval): New deprecated static function.
* eval.c (scm_ceval_ptr): Initialized to dispatching_eval in order
to emulate its old behaviour as closely as possible.
Change the evaluator such that only expressions for which pair? is
true are passed to CEVAL, and such that all other expressions are
evaluated outside of CEVAL:
* eval.c (EVAL): New, provided in analogy to EVALCAR. Evaluate an
expression that is assumed to be memoized already. All but
expressions of the form '(<form> <form> ...)' are evaluated inline
without calling an evaluator.
* eval.c (SCM_XEVAL, SCM_XEVALCAR, EVALCAR): Evaluate all but
expressions of the form '(<form> <form> ...)' inline without
calling an evaluator.
* eval.c (scm_i_eval_x, scm_i_eval, scm_ceval, scm_deval): Handle
the special case of unmemoized symbols passed on the top level.
* eval.c (CEVAL): Change calls to CEVAL to EVAL, except where it
is known that the expression passed to CEVAL is of the form
'(<form> <form> ...)'. Remove handling of the tc7-objects, since
now it is known that the input expression of CEVAL is a pair.
| Dirk Herrmann | 2004-03-29 | 1 | -3/+7 |
* | * eval.c (s_splicing): Commented and reformulated.... (lookup_global_symbol, lookup_symbol): New static functions.
(s_test, s_bindings, s_duplicate_bindings, s_variable): Removed.
(try_macro_lookup, literal_p): Use lookup_symbol instead of
creating a temporary pair for scm_lookupcar.
(scm_unmemocar, unmemocar): Renamed scm_unmemocar to unmemocar,
created deprecated wrapper function scm_unmemocar.
(SCM_VALIDATE_NON_EMPTY_COMBINATION, scm_sym_else,
scm_sym_unquote, scm_sym_uq_splicing, scm_sym_enter_frame,
scm_sym_apply_frame, scm_sym_exit_frame, scm_sym_trace, f_apply,
undefineds, sym_three_question_marks): Moved around without
modifications.
* eval.c, eval.h (scm_macroexp, scm_unmemocar): Deprecated.
| Dirk Herrmann | 2003-11-16 | 1 | -2/+4 |
* | * eval.c, eval.h (scm_m_expand_body, m_expand_body): Deprecated... public use of scm_m_expand_body in eval.h. In eval.c, renamed
scm_m_expand_body to m_expand_body and made it static. Added
deprecated wrapper scm_m_expand_body.
(scm_eval_body, SCM_CEVAL, SCM_APPLY): Use m_expand_body instead
of scm_m_expand_body.
| Dirk Herrmann | 2003-11-09 | 1 | -1/+3 |
* | * __scm.h, gc-card.c (SCM_DEBUG_DEBUGGER_SUPPORT,... SCM_DEBUG_DEBUGGING_SUPPORT): Renamed macro
SCM_DEBUG_DEBUGGER_SUPPORT to SCM_DEBUG_DEBUGGING_SUPPORT and
generalized it to apply not only to C level functions but also to
scheme level functions.
* debug.c, debug.h, eval.c (make-iloc, scm_make_iloc, iloc?,
scm_iloc_p, dbg-make-iloc, scm_dbg_make_iloc, dbg-iloc?,
scm_dbg_iloc_p): Moved functions scm_make_iloc, scm_iloc_p to
eval.c, made them available under SCM_DEBUG_DEBUGGING_SUPPORT == 1
only and renamed them to scm_dbg_make_iloc, scm_dbg_iloc_p,
respectively.
* deprecated.h, eval.c, eval.h (SCM_ILOC00, SCM_IDINC,
SCM_IDSTMSK): Deprecated. The macro definitions are moved from
eval.h into eval.c and a copy is placed into deprecated.h.
* eval.c, eval.h (SCM_MAKE_ILOC): Removed from eval.h and placed
into eval.c. This definition was not part of the API in any
officially released version of guile and thus does not need to go
through a phase of deprecation.
| Dirk Herrmann | 2003-06-04 | 1 | -9/+0 |
* | * deprecated.c, deprecated.h, eval.c, eval.h: Deprecated... scm_s_expression, scm_s_test, scm_s_body, scm_s_bindings,
scm_s_variable, scm_s_clauses, scm_s_formals. In eval.c the
definitions are make static and renamed from scm_s_xxx to s_xxx.
In deprecated.c the original definitions are copied.
* deprecated.h, eval.c, eval: Deprecated SCM_EVALIM2, SCM_EVALIM,
SCM_XEVAL and SCM_XEVALCAR. The macro definitions are moved from
eval.h into eval.c and a copy (slightly modified to work in user
code) is placed into deprecated.h.
* eval.c: Use the local static s_xxx definitions instead of the
scm_s_xxx definitions throughout.
| Dirk Herrmann | 2003-06-02 | 1 | -26/+0 |
* | * eval.c, eval.h, read.c, read.h (scm_sym_dot): Moved from eval to... read. This will allow to make the definition in read.c static.
| Dirk Herrmann | 2003-05-06 | 1 | -1/+0 |
* | * eval.c, eval.h, evalext.c, evalext.h (scm_m_undefine): Moved... from evalext to eval. This will allow to make some of the
definitions in eval.c static.
| Dirk Herrmann | 2003-05-06 | 1 | -0/+8 |
* | * eval.c, eval.h, goops.c, goops.h (scm_m_atslot_ref,... scm_m_atslot_set_x, scm_m_atdispatch): Move the declarations and
definitions of the special goops memoizers from goops.[ch] to
eval.[ch]. Hmm... it seems that scm_m_atdispatch is not used
throughout guile.
| Dirk Herrmann | 2003-04-25 | 1 | -0/+3 |
* | * eval.h (SCM_ENTER_FRAME_HDLR, SCM_APPLY_FRAME_HDLR,... SCM_EXIT_FRAME_HDLR): Use SCM_PACK to convert data to a SCM value
rather than casting to SCM.
| Dirk Herrmann | 2003-04-23 | 1 | -5/+6 |
* | * eval.c, eval.h, evalext.c, evalext.h (scm_sym_setter,... scm_m_generalized_set_x, scm_init_evalext): Move the declaration
and definition of the memoizer for the generalized set! macro from
evalext.[ch] to eval.[ch]. Use the SCM_SYNTAX snarfer macro to
define the macro object.
* eval.c, eval.h (s_set_x, scm_s_set_x, scm_m_set_x,
scm_m_generalized_set_x): Since now scm_s_set_x is only used in
eval.c, it is made static and renamed to s_set_x.
* evalext.c (scm_defined_p, scm_m_undefine): Prefer !SCM_<foo>
over SCM_N<foo>.
| Dirk Herrmann | 2003-04-20 | 1 | -1/+1 |
* | * eval.c, root.h (scm_undefineds, SCM_NUM_PROTECTS, undefineds,... scm_init_eval): Made scm_undefineds static in eval.c, renamed it
to undefineds and registered the object as a permanent object.
* eval.c, eval.h (scm_f_apply, scm_init_eval): Made scm_f_apply
static in eval.c, renamed it to f_apply and registered the object
as a permanent object.
| Dirk Herrmann | 2003-04-20 | 1 | -2/+0 |
* | * Removed uses of DEBUG_EXTENSIONS and DYNAMIC_LINKING to... fix compile errors with --disable-deprecated.
| Dirk Herrmann | 2003-04-20 | 1 | -7/+0 |
* | Changed license terms to the plain LGPL thru-out. | Marius Vollmer | 2003-04-05 | 1 | -35/+11 |
* | * eval.h: fix various preprocessor usages of new public...symbols to expect 0 or 1 values rather than 1 or undefined.
i.e. change #ifdef to #if, etc.
| Rob Browning | 2003-03-27 | 1 | -1/+1 |
* | * threads.h, threads.c: Moved futures to their own file....* Makefile.am (libguile_la_SOURCES): Added futures.c.
(DOT_X_FILES): Added futures.x.
(DOT_DOC_FILES): Added futures.doc.
(modinclude_HEADERS): Added futures.h.
* threads.c, threads.h (scm_i_create_thread): Renamed from
create_thread and made global.
* eval.c: #include "libguile/futures.h".
* init.c: #include "futures.h"
(scm_init_guile_1): Call scm_init_futures.
* stime.c (SCM_TIME_UNITS_PER_SECOND): Renamed from CLKTCK.
* stime.h (SCM_TIME_UNITS_PER_SECOND): Definition moved here.
* eval.c, eval.h (scm_trampoline_0, scm_i_call_closure_0): New
functions.
* eval.c (scm_trampoline_1): Fixed arguments test for closures.
| Mikael Djurfeldt | 2003-01-23 | 1 | -1/+4 |
* | * __scm.h (SCM_DEFER_INTS, SCM_ALLOW_INTS): New definitions....Simply lock a thread C API recursive mutex.
(SCM_NONREC_CRITICAL_SECTION_START,
SCM_NONREC_CRITICAL_SECTION_END, SCM_REC_CRITICAL_SECTION_START,
SCM_REC_CRITICAL_SECTION_END): Removed.
* eval.c: Replaced SOURCE_SECTION_START / SOURCE_SECTION_END with
direct calls to scm_rec_mutex_lock / unlock around the three calls
to scm_m_expand_body.
* eval.c, eval.h (promise_free): New function.
(scm_force): Rewritten; Now thread-safe; Removed
SCM_DEFER/ALLOW_INTS.
* pthread-threads.h: Added partially implemented plugin interface
for recursive mutexes. These are, for now, only intended to be
used internally within the Guile implementation.
* pthread-threads.c: New file.
* threads.c: Conditionally #include "pthread-threads.c".
* eval.c, eval.h (scm_makprom, scm_force): Rewritten to be
thread-safe;
* snarf.h (SCM_MUTEX, SCM_GLOBAL_MUTEX, SCM_REC_MUTEX,
SCM_GLOBAL_REC_MUTEX): New macros.
* eval.c, threads.c, threads.h, snarf.h: Rewrote critical section
macros---use mutexes instead.
* tags.h (SCM_IM_FUTURE): New tag.
* eval.c (scm_m_future): New primitive macro.
(SCM_CEVAL): Support futures.
(unmemocopy): Support unmemoization of futures.
* print.c (scm_isymnames): Name of future isym.
| Mikael Djurfeldt | 2002-12-15 | 1 | -0/+16 |
* | * eval.h (scm_t_trampoline_1, scm_t_trampoline_2): New types....* eval.c, eval.h (scm_trampoline_1, scm_trampoline_2): New functions.
* eval.c (call_subr2_2, call_lsubr_2, call_closure_2): New functions;
(map, for-each): Handle also application on two args as a special
case; Use trampolines.
* sort.c (scm_cmp_function): Choose subr2less for scm_tc7_subr_2o;
(subr2oless): Removed.
(scm_restricted_vector_sort_x): Use scm_return_first to keep the
vector GC protected.
* eval.c (check_map_args): Use scm_out_of_range_pos instead of
scm_out_of_range.
| Mikael Djurfeldt | 2002-12-01 | 1 | -1/+6 |
* | * eval.h (SCM_MAKE_ILOC): New macro....* debug.c (scm_make_iloc): Use SCM_MAKE_ILOC instead of computing
the iloc bitpattern here.
| Dirk Herrmann | 2002-11-16 | 1 | -0/+6 |
* | prepend libguile/ to include path | Han-Wen Nienhuys | 2002-08-27 | 1 | -1/+1 |
* | * __scm.h, eval.c, eval.h: Removed compile time option...MEMOIZE_LOCALS to clean up the code. Now, caching of local
variable positions during memoization is mandatory. However, the
option to disable the caching has most probably not been used
anyway.
| Dirk Herrmann | 2002-06-28 | 1 | -4/+0 |
* | * First batch of libguile changes for Elisp support....* Fixed a few typos.
* Minor rationalization of macros relating to source breakpoints.
| Neil Jerram | 2002-01-22 | 1 | -5/+2 |