guile-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Guile-commits] GNU Guile branch, wip-case-lambda, created. release_1-9-


From: Andy Wingo
Subject: [Guile-commits] GNU Guile branch, wip-case-lambda, created. release_1-9-4-16-gc0406db
Date: Fri, 16 Oct 2009 13:57:36 +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=c0406dba44d5c2d51c732430699f7304a1b4511f

The branch, wip-case-lambda has been created
        at  c0406dba44d5c2d51c732430699f7304a1b4511f (commit)

- Log -----------------------------------------------------------------
commit c0406dba44d5c2d51c732430699f7304a1b4511f
Author: Andy Wingo <address@hidden>
Date:   Wed Oct 14 00:08:35 2009 +0200

    tree-il support for case-lambda
    
    * module/language/tree-il.scm (<lambda>, <lambda-case>): Split lambda
      into the lambda itself, denoting the procedure, and lambda-case,
      denoting a particular arity case. Lambda-case is fairly featureful,
      and has not yet been fully tested.
      (<let-values>): Use a <lambda-case> as the binding expression. Seems
      to suit the purpose well.
      Adapt parsers, unparsers, traversal operators, etc. Sometimes in this
      first version we assume there are no optional args, rest args, or a
      predicate.
    
    * module/language/tree-il/analyze.scm (analyze-lexicals): Adapt for the
      new case-lambda regime. Fairly well commented. It actually simplifies
      things.
      (report-unused-variables): Update for new tree-il.
    
    * module/language/tree-il/compile-glil.scm: Adapt for the new tree-il.
      There are some first stabs here at proper case-lambda compilation, but
      they are untested as of yet.
    
    * module/language/tree-il/inline.scm (inline!): Rework so we can
      recurse on a single node; though these transformations are strictly
      reductive, so they should complete in bounded time. Simplify
      accordingly, and adapt to case-lambda. Oh, and we handle lambda->let
      in not just the nullary case.
    
    * module/ice-9/psyntax.scm (build-simple-lambda, build-case-lambda)
      (build-lambda-case): New constructors. The idea is that after syntax
      expansion, we shouldn't have to deal with improper lists any more.
      Build-simple-lambda is a shortcut for the common case. The others are
      not fully exercised yet. Adapt callers.
      (syntax): Add some debugging in the lambda case. I don't fully
      understand this, but in practice we don't seem to see rest args here.
      (lambda): Inline chi-lambda-clause, and adapt for build-simple-lambda.
    * module/ice-9/psyntax-pp.scm: Regenerated.
    
    * test-suite/tests/tree-il.test: Update tests for new tree-il lambda
      format, and to expect post-prelude labels for all glil programs.

commit fffbb3befde602912a37a893ed7b1a3f8e881a9f
Author: Andy Wingo <address@hidden>
Date:   Tue Oct 13 23:58:36 2009 +0200

    procedure property efficiency tweak
    
    * libguile/procprop.c (scm_procedure_property)
      scm_set_procedure_property_x): Fix to not call
      scm_procedure_properties(), and thus to avoid consing up the arity as
      well.

commit 0d3b5118d13a03b01b378678f3433f311f613874
Author: Andy Wingo <address@hidden>
Date:   Tue Oct 13 23:55:58 2009 +0200

    flesh out glil support for optional and keyword arguments
    
    * libguile/vm-i-system.c (bind-rest): Renamed from push-rest-list.
      (reserve-locals): Change so that instead of reserving space for some
      additional number of locals, reserve-locals takes the absolute number
      of locals, including the arguments.
    
    * module/language/glil.scm (<glil-std-prelude>, <glil-opt-prelude>)
      (<glil-kw-prelude>): New GLIL constructs, to replace <glil-arity>.
    
    * module/language/glil/compile-assembly.scm (glil->assembly): Compile
      the new preludes. Some instructions are not yet implemented, though.
    
    * module/language/tree-il/analyze.scm (analyze-lexicals): The nlocs for
      a lambda will now be the total number of locals, including arguments.
    
    * module/language/tree-il/compile-glil.scm (flatten-lambda): Update to
      write the new prelude.
    
    * module/system/vm/program.scm (program-bindings-for-ip): If a given
      index doesn't have a binding at the ip given, don't cons it on the
      resulting list.
    
    * test-suite/tests/tree-il.test: Update for GLIL changes.

commit f87b81efe5ca4cfbb844b271db09a7f2dd8aa20c
Author: Andy Wingo <address@hidden>
Date:   Tue Oct 13 23:45:22 2009 +0200

    de-nargs struct scm_objcode; procedure-property refactor
    
    * libguile/objcodes.h (struct scm_objcode): Remove nargs, nrest, and
      nlocs, as they are no longer needed. Also obviates the need for a
      padding word.
    
    * libguile/procs.c (scm_thunk_p): Use scm_i_program_arity for programs.
    
    * libguile/procprop.c (scm_i_procedure_arity): Use scm_i_program_arity
      for programs.
      (scm_procedure_properties, scm_set_procedure_properties_x)
      (scm_procedure_property, scm_set_procedure_property_x): Rework so that
      non-closure properties are stored directly in a weak hash, instead of
      needing a weak hash of "stand-in" closures to hold the properties. Fix
      docstrings also.
    
    * libguile/root.h (scm_stand_in_procs): Remove from the scm_sys_protects
      set. Actually with libGC, we should be able to store the elements of
      scm_sys_protects directly as global variables.
    * libguile/gc.c (scm_init_storage): Remove scm_stand_in_procs
      initialization.
    
    * libguile/programs.c (scm_i_program_arity): New private accessor, tries
      to determine the "minimum arity" of a program.
    
    * libguile/vm.c (really_make_boot_program): Adapt to changes in
      struct scm_objcode.
    
    * module/language/assembly.scm (*program-header-len*, byte-length):
    * module/language/assembly/compile-bytecode.scm (write-bytecode):
    * module/language/assembly/decompile-bytecode.scm (decode-load-program):
    * module/language/assembly/disassemble.scm (disassemble-load-program):
      Adapt to changes in objcode.
    
    * module/system/xref.scm (program-callee-rev-vars): Adapt to changes in
      assembly.
    
    * module/language/glil.scm: Remove nargs, nrest, and nlocs from
      glil-program.
    
    * module/language/glil/compile-assembly.scm (make-meta, glil->assembly):
    * module/language/glil/decompile-assembly.scm (decompile-toplevel):
      (decompile-load-program): Adapt to changes in GLIL and assembly.
    
    * module/language/tree-il/compile-glil.scm (flatten-lambda): Adapt to
      changes in GLIL.
    
    * test-suite/tests/asm-to-bytecode.test: Adapt to assembly and bytecode
      changes.
    * test-suite/tests/tree-il.test: Adapt to GLIL changes.

commit 7f68adaa2f4607b6e2224fce33372d7295d6fecd
Author: Andy Wingo <address@hidden>
Date:   Sun Sep 27 20:25:39 2009 -0400

    callees now check their args, cons rest list, reserve locals
    
    * gdbinit: Ignore SIGPWR and SIGXCPU, which the BDW GC seems to use.
    
    * libguile/vm-engine.h (FETCH_WIDTH): Remove unused macro.
      (INIT_ARGS, INIT_FRAME): Remove; callees now check their args and
      reserve space for their locals.
    
    * libguile/vm-engine.c:
    * libguile/vm-i-system.c: Turn on callee arg checking and local
      reservation. Seems to work!

commit 302deb5c2c9defb0e6d27685d68a476b07b6ea34
Author: Andy Wingo <address@hidden>
Date:   Sun Sep 27 19:50:06 2009 -0400

    callees reserve their own local vars
    
    * libguile/_scm.h (SCM_OBJCODE_MINOR_VERSION): Bump.
    * libguile/vm-i-system.c (reserve-locals): New instruction, to reserve
      space for local vars. Other ops renumbered.
    
    * module/language/tree-il/compile-glil.scm (flatten-lambda): Emit
      reserve-locals instructions as necessary.
    
    * test-suite/tests/tree-il.test: Update to expect reserve-locals as
      appropriate.

commit ed71f50164c5430f554a7dd5611d11c7da3cb311
Author: Andy Wingo <address@hidden>
Date:   Sun Sep 27 19:25:58 2009 -0400

    runtime and debugging support for callee-parsed procedure args
    
    * libguile/objcodes.h: Bump for metadata format change.
    
    * libguile/frames.h: Rework so we don't frob the program's nargs, nlocs,
      etc at runtime. Instead we don't really know what's a local var, an
      argument, or an intermediate value. It's a little unfortunate, but
      this will allow for case-lambda, and eventually for good polymorphic
      generic dispatch; and the nlocs etc can be heuristically
      reconstructed. Such a reconstruction would be better done at the
      Scheme level, though.
      (SCM_FRAME_STACK_ADDRESS): New macro, the pointer to the base of the
      stack elements (not counting the program).
      (SCM_FRAME_UPPER_ADDRESS): Repurpose to be the address of the last
      element in the bookkeeping part of the stack -- i.e. to point to the
      return address.
    
    * libguile/vm-engine.h:
    * libguile/vm-i-system.c: Adapt to removal of stack_base. Though we
      still detect stack-smashing underflow, we don't do so as precisely as
      we did before, because now we only detect overwriting of the frame
      metadata.
    
    * libguile/vm-engine.c (vm_engine): Remove the stack_base variable. It
      is unnecessary, and difficult to keep track of in the face of
      case-lambda. Also fix miscommented "ra" and "mvra" pushes. Push the
      vp->ip as the first ra...
    * libguile/vm-i-system.c (halt): ...because here we can restore the
      vp->ip instead of setting ip to 0. Allows us to introspect ips all
      down the stack, including in recursive VM invocations.
    
    * libguile/frames.h:
    * libguile/frames.c (scm_vm_frame_stack): Removed, because it's getting
      more difficult to tell what's an argument and what's a temporary stack
      element.
      (scm_vm_frame_num_locals): New accessor.
      (scm_vm_frame_instruction_pointer): New accessor.
      (scm_vm_frame_arguments): Defer to an implementation in Scheme.
      (scm_vm_frame_num_locals scm_vm_frame_local_ref)
      (scm_vm_frame_local_set_x): Since we can get not-yet-active frames on
      the stack now, with our current calling convention, we have to add a
      heuristic here to jump over those frames -- because frames have
      pointers in them, not Scheme values.
    
    * libguile/programs.h:
    * libguile/programs.c (scm_program_arity): Remove, in favor of..
      (scm_program_arities): ...this, which a list of arities, in a new
      format, occupying a slot in the metadata.
    
    * module/language/assembly/decompile-bytecode.scm (decode-load-program):
      Fix mv-call decompilation.
    
    * module/system/vm/frame.scm (vm-frame-bindings, vm-frame-binding-ref)
      (vm-frame-binding-set!): New functions, to access bindings by name in
      a frame.
      (vm-frame-arguments): Function now implemented in Scheme. Commented
      fairly extensively.
    
    * module/system/vm/program.scm (program-bindings-by-index)
      (program-bindings-for-ip): New accessors, parsing the program bindings
      metadata into something more useful.
      (program-arities, program-arguments): In a case-lambda world, we have
      to assume that programs can have multiple arities. But it's tough to
      detect this algorithmically; instead we're going to require that the
      program metadata include information about the arities, and the parts
      of the program that that metadata applies to.
      (program-lambda-list): New accessor.
      (write-program): Show multiple arities.
    
    * module/language/glil/compile-assembly.scm (glil->assembly): Add
      "arities" to the state of the compiler, and add arities entries as
      appropriate.

commit c01eb2aae2ff598f80105af5b6d42e68fb0b0387
Author: Andy Wingo <address@hidden>
Date:   Sun Sep 27 18:16:56 2009 -0400

    steps on the way to have the callee check the number of arguments
    
    * libguile/_scm.h (SCM_OBJCODE_MINOR_VERSION): Bump.
    
    * libguile/vm-i-system.c (assert-nargs-ee, assert-nargs-ge)
      (push-rest-list): New instructions, which for now don't actually do
      anything. Renumber the rest of the ops in this file.
    
    * module/language/glil.scm (<glil-arity>): New GLIL type, an entity that
      checks the number of args for a block, optionally consing a rest list,
      and either branching or erroring if the arity doesn't match.
    
    * module/language/glil/compile-assembly.scm (glil->assembly): Compile
      <glil-arity> to assembly. Some of these VM ops are not implemented --
      notably the branching case.
    
    * module/language/tree-il/compile-glil.scm (flatten-lambda): Emit
      <glil-arity>.
    
    * test-suite/tests/tree-il.test: Update.

commit cbeb479c6e4da67ef37efa2548713fd6eadc71f3
Author: Andy Wingo <address@hidden>
Date:   Sun Sep 27 15:57:06 2009 -0400

    comment fixups to tree-il/compile-glil.scm
    
    * module/language/tree-il/compile-glil.scm: Remove some outdated
      comments.

commit 97fcf583b7239ea17dbb73eae9438d21136eb2db
Author: Andy Wingo <address@hidden>
Date:   Thu Sep 17 14:58:31 2009 +0200

    jumps encoded using 24 bits, not 19; blocks no longer aligned
    
    * libguile/_scm.h (SCM_OBJCODE_MINOR_VERSION): Bump.
    * libguile/vm-i-system.c (FETCH_OFFSET, BR): Labels are no longer 8-byte
      aligned; instead, jumps are encoded into 3 bytes instead of 2.
      (br, br-if, br-if-not, br-if-eq, br-if-not-eq, br-if-null)
      (br-if-not-null, mv-call): Adapt for new length of br instructions (3
      bytes instead of 2).
    
    * libguile/vm.c (really_make_boot_program): Adapt hand-coded bytecode
      for new offset regime.
    
    * module/language/assembly.scm (align-block): No alignment necessary.
    
    * module/language/assembly/compile-bytecode.scm (write-bytecode): Write
      out breaks as 24-bit relative jumps.
    * module/language/assembly/decompile-bytecode.scm (decode-load-program):
      Decompile break instructions.

-----------------------------------------------------------------------


hooks/post-receive
-- 
GNU Guile




reply via email to

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