guile-commits
[Top][All Lists]
Advanced

[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-68-g4d63dd0
Date: Mon, 30 Nov 2009 22:32:28 +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=4d63dd07ee79139ff8c6b56a8a29a87befdc3074

The branch, wip-eval-cleanup has been created
        at  4d63dd07ee79139ff8c6b56a8a29a87befdc3074 (commit)

- Log -----------------------------------------------------------------
commit 4d63dd07ee79139ff8c6b56a8a29a87befdc3074
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 98bfb6e753f855d10d4671a4e9e3aaed72f97469
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 8841d567a2389aff5f46660e7b43053141eb4758
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 8a1bc3b8cef5911761b504d52d8a9a7587bed2ff
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 b8a8ffbec43cee4fb6ff9a91430237cc04e741ee
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 1c473270212e1f16dd00ab116c9d33d860a633e3
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 d7ecb302b14c6dc91ec3196c46c3cd968c5fd9c4
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 feb0eec814f0fc779b490df7c0bc29e474ae61f0
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 41610cb7449a61b436df7d3d58f88d323379accb
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 c044e812b92e8ea4275b2f9425a6e749429592e6
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 e635be8448f272f9b73cb3faafcd312a402985ec
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 2ef58117cc12c9c746ce3e8a7d3fa3effcc62e06
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 42c2993330eddb58704cefb6cbd9b34c19da0cf8
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 35ca4f5b951ddcb781f825653dca479f2d8b6cec
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 4ba424b6cda12f09ece578c06d0e75a0f88ebdf9
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 ba9a1a533cafad7767c054b1fdda133745a42798
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 ee23b3c76640fafad35f20765d4f817b9bd6f984
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 de5e5692078f383130d18419452b96d2797c5b58
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 5519e59a3aa9edcc17510b375289dbf65868a6b9
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 060b04ba7ef6a9126892c66981a56c07ee536181
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 75b38343a03854cb4816b4bc1663522a61f573c5
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 9fdb95e992b03eb3a07717d01811d4303fee7479
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 39aba787b95a1f35368cd1c593d8f76aa3984b8c
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 d2f2daf9244af81ab93513deb23af55191013567
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 baf5eebb1f30caa02552b2628d4fc380e247f98e
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 6613e7eaba6a92cebae54c39fed87fe1177740a9
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 9399a040ff4f23895b187b12bd0f1af2812bcef6
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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]