[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] GNU Guile branch, wip-eval-cleanup, created. release_1-9
From: |
Andy Wingo |
Subject: |
[Guile-commits] GNU Guile branch, wip-eval-cleanup, created. release_1-9-5-75-g67e2d80 |
Date: |
Tue, 01 Dec 2009 21:27:41 +0000 |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Guile".
http://git.savannah.gnu.org/cgit/guile.git/commit/?id=67e2d80a6a97b51aefea701cf10112102b09b392
The branch, wip-eval-cleanup has been created
at 67e2d80a6a97b51aefea701cf10112102b09b392 (commit)
- Log -----------------------------------------------------------------
commit 67e2d80a6a97b51aefea701cf10112102b09b392
Author: Andy Wingo <address@hidden>
Date: Tue Dec 1 22:20:03 2009 +0100
apply goes to the vm, not the interpreter
* libguile/eval.c (eval): Call scm_vm_apply instead of apply.
(apply): Deleted, no longer referenced. Heh.
(scm_apply): Call scm_vm_apply.
* libguile/init.c (scm_i_init_guile): Bootstrap the VM before the
evaluator.
* libguile/vm.c (scm_vm_apply): Actually it's not necessary that the
procedure is a program; so that's cool, relax the check.
commit cc8d1f5fcd97de920111d407d2c9e88d6aedbc6d
Author: Andy Wingo <address@hidden>
Date: Tue Dec 1 22:11:15 2009 +0100
vm doesn't call the evaluator at all (at least not directly)
* libguile/vm-i-system.c (goto/args, mv-call): Finish the port to use
apply_foreign instead of scm_apply.
commit 23f276dea70668b7291589de1c7d7ea7ebd9026f
Author: Andy Wingo <address@hidden>
Date: Tue Dec 1 21:59:42 2009 +0100
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.
commit 5161a3c0d7ec59e32a637bd093644a1a5b7b8dcf
Author: Andy Wingo <address@hidden>
Date: Mon Nov 30 23:32:28 2009 +0100
add new scheme evaluator
* module/ice-9/eval.scm: New evaluator, written in Scheme. Whee!
Batteries included but not wired up.
* module/Makefile.am: Abuse touch(1) to make sure eval.go gets built
before everything. Can't just depend on eval.go, because eval.go will
get the timestamp of eval.scm, which might be newer than foo.go (and
thus foo.scm). Something better is warranted.
commit 3149a5b60de3dc55c7349aba5bfb3ff28c594aef
Author: Andy Wingo <address@hidden>
Date: Mon Nov 30 22:21:31 2009 +0100
add memoized expression accessors to scheme
* libguile/eval.c: Fix a comment.
(eval): Abstract out the variable memoization into a function,
scm_memoize_variable_access_x.
* libguile/memoize.c (memoized_tags): Fix a couple names.
(scm_memoize_variable_access_x): New internal function. Actually it's
public to Scheme, but we can't do much about that, because the new
evaluator will need it.
(scm_memoized_expression_typecode, scm_memoized_expression_data): New
accessors for memoized code, for Scheme.
(scm_memoized_typecode): Looks up the typecode for a symbol.
commit c7a2a803bd0c3ca8860929d4700a46e104cf2643
Author: Andy Wingo <address@hidden>
Date: Mon Nov 30 22:17:46 2009 +0100
export scm_define to scheme as define!
* libguile/modules.c (scm_define): Export to Scheme as `define!'. The
evaluator needs it, and actually it's an OK thing to have around.
commit 1d30393fbfac4b80dc9f3a5c8289ba4b55b345bb
Author: Andy Wingo <address@hidden>
Date: Mon Nov 30 22:16:59 2009 +0100
wire through the existing vm ops for variable-ref and variable-set!
* module/language/tree-il/compile-glil.scm (*primcall-ops*): Compile
variable-ref and variable-set instructions specially.
* module/language/tree-il/primitives.scm
(*interesting-primitive-names*): Add cases for variable-ref and
variable-set!. The latter is a little tricky, because the args are
switched for the VM op, and we can't really change that easily.
commit 156d6fa1b5f44d9af0c0e5f6ba9275f4b450c19e
Author: Andy Wingo <address@hidden>
Date: Mon Nov 30 22:14:52 2009 +0100
fixes to variable-ref, variable-set vm ops
* libguile/vm-i-system.c (variable-ref, variable-set): Fix declared
number of pops and pushes.
commit 7b8938196584ac8dee38d26ee90e58772c14d752
Author: Andy Wingo <address@hidden>
Date: Sat Nov 28 11:18:14 2009 +0100
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.
commit b7742c6b7132544b9d6cd9cb32c09e2084ad9e52
Author: Andy Wingo <address@hidden>
Date: Sat Nov 28 01:19:50 2009 +0100
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.
commit 83c76550024c4a96c06cb75d40ab0ba122a0a57c
Author: Andy Wingo <address@hidden>
Date: Sat Nov 28 01:19:31 2009 +0100
goops moving away from evaluator opcodes, and a primitive compilation fix
* module/oop/goops.scm (@slot-ref, @slot-set!): Define "primitives" for
these. Probably should do something more general, though, allowing
@struct-ref.
* module/language/tree-il/primitives.scm (add-interesting-primitive!):
Error if the primitive isn't bound.
commit c58b8c5aed8884f044e7c3af116e649e7e855381
Author: Andy Wingo <address@hidden>
Date: Fri Nov 27 11:37:17 2009 +0100
remove (lang elisp), as it won't work with the new evaluator
* lang/: Delete. This causes me some pain, but the new elisp compiler is
coming soon, and the old one really won't work with the new evaluator.
* Makefile.am:
* configure.ac: Autotoolery for elisp removal.
* test-suite/tests/elisp.test: Comment out the body of the elisp test.
The tests themselves should be useful in the new world, though.
commit 8397a3a69555c73d4e1df89ae96c561d2ea43188
Author: Andy Wingo <address@hidden>
Date: Thu Nov 26 22:11:40 2009 +0100
local-eval will go away
* module/ice-9/debugger/commands.scm:
* module/ice-9/debugging/traps.scm:
* module/ice-9/emacs.scm:
* module/ice-9/gds-client.scm: Add some FIXMEs due to impending
local-eval removal.
* module/oop/goops.scm (make-generic-bound-check-getter): Just the
compiled closure case here.
commit ecdfc95d1c4cca8cb87412cd30a8fbb39afadd21
Author: Andy Wingo <address@hidden>
Date: Fri Nov 27 21:31:43 2009 +0100
no special treatment for memoized code in srcprop.c
* libguile/srcprop.c (scm_set_source_properties_x): No need to treat
memoized code specially.
* test-suite/tests/srcprop.test ("set-source-property!")
("set-source-properties!"): Well, just throw 'unresolved on these for
now, because we need a few more things to land before these can be
fixed, or even considered.
commit 0f458a37259a53adc7b50b66a5944ecc3668ffda
Author: Andy Wingo <address@hidden>
Date: Fri Nov 27 23:12:35 2009 +0100
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.
commit 504864b79fcdaf1c24785327b84190a041c30c0c
Author: Andy Wingo <address@hidden>
Date: Fri Nov 27 21:17:42 2009 +0100
remove unused scm_eval_stack var
* libguile/private-options.h:
* libguile/eval.c (scm_eval_stack): Remove declaration and definition of
unused scm_eval_stack variable.
commit 058234dd9c4d67240b9ca1c7f0ebfeed8037c2de
Author: Andy Wingo <address@hidden>
Date: Sat Nov 28 00:22:47 2009 +0100
remove evaluator-specific code from macros.c
* libguile/macros.c (macro_print): No special printing for macros
whose code is an interpreted procedure.
commit 9d019f9be0a1a7d3aaa507c9996cd5097da53875
Author: Andy Wingo <address@hidden>
Date: Fri Nov 27 20:50:40 2009 +0100
remove class-environment slot, goops grubs less in the evaluator
* libguile/goops.h (scm_sys_tag_body): Remove declaration of undefined
function.
(SCM_CLASS_CLASS_LAYOUT, scm_si_environment, SCM_N_CLASS_SLOTS)
(scm_class_environment) Remove class environment slot and getter.
* libguile/goops.c (compute_getters_n_setters): Use scm_primitive_eval
to produce the init thunk, instead of scm_i_eval_x; though really we
should be doing this in Scheme.
(scm_basic_basic_make_class, build_class_class_slots)
(create_basic_classes, scm_class_environment): Remove class
environment slot.
(get_slot_value, set_slot_value): Use scm_call_1 instead of evaluator
tricks.
* module/oop/goops.scm: Remove class-environment export, and
environments throughout the file.
commit c2c4e281988bf1c5261fde3a74566dc49d8eecf7
Author: Andy Wingo <address@hidden>
Date: Fri Nov 27 20:43:22 2009 +0100
fix to gdb_eval to use newer interfaces
* libguile/gdbint.c (gdb_eval): Use scm_primitive_eval instead of
scm_i_eval_x.
commit a3e923770ef0e491b58aaac94413cba893eebcfc
Author: Andy Wingo <address@hidden>
Date: Fri Nov 27 20:36:09 2009 +0100
formally deprecate trampolines
* libguile/eval.c:
* libguile/deprecated.h:
* libguile/deprecated.c (scm_trampoline_0, scm_trampoline_1)
(scm_trampoline_2): Actually deprecate trampolines.
* srfi/srfi-1.c: Fix all trampoline uses in srfi-1.c.
commit 6c9e8a53542019d1d207f25bfb18fbba9aabf59d
Author: Andy Wingo <address@hidden>
Date: Fri Nov 27 18:13:59 2009 +0100
remove uses of trampolines within guile itself
* libguile/eval.c (scm_map, scm_for_each)
* libguile/hashtab.c (scm_hash_for_each_handle)
* libguile/list.c (scm_filter, scm_filter_x)
* libguile/quicksort.i.c:
* libguile/sort.c (scm_restricted_vector_sort_x, scm_sorted_p)
(scm_merge, scm_merge_list_x, scm_merge_x)
(scm_merge_list_step, scm_sort_x, scm_sort, scm_merge_vector_x)
(scm_merge_vector_step, scm_stable_sort_x, scm_sort_list_x)
(scm_sort_list)nn
* libguile/srfi-13.c (scm_string_any, scm_string_every)
(scm_string_tabulate, scm_string_trim, string_trim_right)
(scm_string_trim_both, scm_string_index, scm_string_index_right)
(scm_string_skip, scm_string_skip_right, scm_string_count)
(scm_string_map, scm_string_map_x, scm_string_for_each)
(scm_string_for_each_index, scm_string_filter, scm_string_delete):
Remove uses of trampolines.
commit b3f04491ee90015cd661b08dcb0b5ae731ee6022
Author: Andy Wingo <address@hidden>
Date: Fri Nov 27 17:35:37 2009 +0100
gut the backtrace implementation for memoized code
* libguile/backtrace.c (display_header, display_expression)
(display_error_body, display_backtrace_get_file_line, display_frame):
Gut the implementation for memoized code, as memoized code as it is
currently understood is going away.
commit f39fc3b38cbd7dda61def29bd8ef2d8f7ca27dd5
Author: Andy Wingo <address@hidden>
Date: Fri Nov 27 17:24:12 2009 +0100
remove some deprecated things, undeprecate scm_the_root_module()
* libguile/deprecated.h
* libguile/deprecated.c (SCM_ILOC00, SCM_IDINC, SCM_IDSTMSK)
(scm_s_expression, scm_s_test, scm_s_body, scm_s_bindings)
(scm_s_variable, scm_s_clauses, scm_s_formals, SCM_EVALIM2)
(SCM_EVALIM, SCM_XEVAL, SCM_XEVALCAR): Remove these macros and
constants, deprecated in 2003.
(scm_the_root_module): Undeprecate, it's actually a useful function,
that other parts of the code use.
* libguile/modules.h (scm_the_root_module): Undeprecated.
* libguile/modules.c (scm_the_root_module): Rename from
the_root_module. Use it in the rest of this file.
commit 1963682290baa7d49f56a0e6aaf8a4880265f868
Author: Andy Wingo <address@hidden>
Date: Fri Aug 21 01:17:32 2009 +0200
tweak to eval.c
* libguile/eval.c (eval_letrec_inits): Rename from ceval_letrec_inits.
Caller changed.
commit 715603951e2b8b521f3cd866d1bccec52d595b60
Author: Andy Wingo <address@hidden>
Date: Fri Aug 21 01:14:57 2009 +0200
eval.i.c -> eval.c
* libguile/Makefile.am:
* libguile/eval.i.c: Remove eval.i.c.
* libguile/eval.c: Fold eval.i.c's contents into eval.c.
commit 44acb034222f51b10a0a445862601f1a60ed9b3b
Author: Andy Wingo <address@hidden>
Date: Fri Aug 21 01:06:00 2009 +0200
more ceval excision
* libguile/eval.c:
* libguile/eval.i.c: Rename deval to eval. Substitute in some
preprocessor macros.
commit 25e8a4721e20e116646a55313a3c8b92ccfa4e71
Author: Andy Wingo <address@hidden>
Date: Fri Aug 21 01:00:28 2009 +0200
remove code from eval.i.c that was only for CEVAL.
* libguile/eval.i.c: Remove CEVAL-only code.
commit a4ac184963d503b9b9cd6a5ead7d8720ee4cad66
Author: Andy Wingo <address@hidden>
Date: Fri Aug 21 00:54:34 2009 +0200
Don't double-include eval.i.c -- let's only build deval.
* libguile/eval.c (SCM_I_XEVAL, SCM_I_XEVALCAR): No more debug_p args,
we are always debugging. Adapt all callers.
(ceval_letrec_inits): For some reason this function is used by deval.
No idea why. Pull it out here.
* libguile/eval.i.c (SCM_APPLY): scm_dapply is scm_apply.
commit 95e59982049ef822933445746a6b78de8f737cb4
Author: Andy Wingo <address@hidden>
Date: Fri Aug 21 00:38:48 2009 +0200
gut trampolines
* libguile/eval.c: Gut the trampoline implementation. We'll be doing
much more clever things here that will obviate the need for the
procedure arg of map and for-each to be allocated in many cases...
trampolines were a noble attempt at optimizing in the wrong place.
* srfi/srfi-1.c (scm_srfi1_lset_difference_x): Validate that we get a
proc, because the trampoline won't do it for us.
* test-suite/tests/sort.test ("sort"):
* test-suite/tests/srfi-1.test ("count", "fold", "list-index"):
Change expected exceptions, due to trampoline functions not doing any
computation.
commit 81b30a35f706105767a0ac1391609147cb7c9383
Author: Andy Wingo <address@hidden>
Date: Fri Aug 21 00:37:39 2009 +0200
expand out named let to letrec in the eval case
* module/ice-9/psyntax.scm: In the eval case, expand out named let to
letrec.
* module/ice-9/psyntax-pp.scm: Regenerated.
-----------------------------------------------------------------------
hooks/post-receive
--
GNU Guile
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Guile-commits] GNU Guile branch, wip-eval-cleanup, created. release_1-9-5-75-g67e2d80,
Andy Wingo <=