1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-04-30 11:50:28 +02:00
Commit graph

58 commits

Author SHA1 Message Date
Andy Wingo
73f6146bd8 Minor CPS documentation cleanups
* doc/ref/compiler.texi (Continuation-Passing Style): Minor cleanups.
2015-09-18 10:13:35 +02:00
Andy Wingo
d701e8a3d3 Update CPS language documentation
* doc/ref/compiler.texi (Continuation-Passing Style): Update to latest
  CPS language.
2015-09-17 20:14:35 +02:00
Andy Wingo
34ff3af9f0 Replace $letrec with $rec
* module/language/cps.scm ($rec): Replace $letrec with $rec, which is an
  expression, not a term.  This means that the names bound by the letrec
  appear twice: once in the $rec term, and once in the continuation.
  This is not very elegant, but the situation is better than it was
  before.  Adapt all callers.

* doc/ref/compiler.texi (CPS in Guile): Incomplete documentation
  updates.  I'll update these later when the IL settles down.
2015-04-01 10:10:10 +02:00
Andy Wingo
b3ae2b5068 Add VM and compiler support for calls to known procedures
* module/language/cps.scm ($callk): New expression type, for calls to
  known labels.  Part of "low CPS".
* module/language/cps/arities.scm:
* module/language/cps/closure-conversion.scm:
* module/language/cps/compile-bytecode.scm:
* module/language/cps/dce.scm:
* module/language/cps/dfg.scm:
* module/language/cps/effects-analysis.scm:
* module/language/cps/simplify.scm:
* module/language/cps/slot-allocation.scm:
* module/language/cps/verify.scm: Adapt call sites.

* libguile/vm-engine.c (call-label, tail-call-label): New instructions.
  Renumber the rest; this is an ABI change.

* libguile/_scm.h (SCM_OBJCODE_MINOR_VERSION):
* module/system/vm/assembler.scm (*bytecode-minor-version*): Bump.

* doc/ref/compiler.texi (CPS in Guile): Document $callk.
2014-02-02 23:19:22 +01:00
Andy Wingo
69dc8268c2 Finish documenting the new compiler
* doc/ref/compiler.texi (An Introduction to CPS): Reword.
  (Compiling CPS): New sub-sub-section.
  (Bytecode): New sub-section.
2014-01-16 15:34:08 +01:00
Andy Wingo
507c58b28e Fix CPS doc typos
* doc/ref/compiler.texi (CPS in Guile): Fix a couple typos.
2014-01-16 15:34:08 +01:00
Andy Wingo
bdad134016 Finish CPS documentation
* doc/ref/compiler.texi (Continuation-Passing Style): Flesh out the
  documentation.
2014-01-12 15:37:30 +01:00
Andy Wingo
18e1113513 Quick documentation fixes.
* doc/ref/compiler.texi: Make it build.
2013-12-10 19:53:55 +01:00
Andy Wingo
58b2315657 Beginnings of CPS section in manual
* doc/ref/compiler.texi (Continuation-Passing Style): Beginnings of this
  section.  Will be finished when we fix implicit truncation.
2013-12-10 19:49:56 +01:00
Andy Wingo
d297e544d9 compiler.texi tweaks
* doc/ref/compiler.texi (Compiler Tower): Reword a couple things.
  (Tree-IL): Add more vertical space, for readability in info.
2013-12-05 11:55:10 +01:00
Andy Wingo
67915ab079 Doc updates to macroexpansion, compiled procs, and compiler.texi
* doc/ref/api-macros.texi (Macro Expansion): New section.
* doc/ref/api-procedures.texi (Compiled Procedures): Beginnings of a
  revision.  Not finished.
* doc/ref/compiler.texi (Compiling to the Virtual Machine): Beginnings
  of a revision.  CPS and bytecode are not done yet.
2013-12-04 20:46:02 +01:00
Andy Wingo
c32b7c4cef Remove with-fluids; replaced by with-fluid* and inlined push-fluid primops
* libguile/vm-i-system.c (push-fluid, pop-fluid):
* doc/ref/vm.texi (Dynamic Environment Instructions): Rename wind-fluids
  to push-fluid, and unwind-fluids to pop-fluid.  They now only work on
  one fluid binding at a time.

* module/ice-9/boot-9.scm (with-fluid*): Implement in Scheme in terms of
  primcalls to push-fluid and pop-fluid.
  (custom-throw-handler, catch, with-throw-handler): Use with-fluid*
  instead of with-fluids, as with-fluids is no longer available before
  psyntax is loaded.
  (with-fluids): Define in Scheme in terms of with-fluid*.

* libguile/fluids.c (scm_with_fluid): Rename from scm_with_fluids, and
  don't expose to Scheme.

* libguile/eval.c (eval): Remove SCM_M_WITH_FLUIDS case.
* libguile/expand.c (expand_with_fluids): Remove with-fluids syntax.
  (DYNLET): Remove, no longer defining dynlet in the %expanded-vtables.
* libguile/expand.h: Remove dynlet definitions.
* module/ice-9/eval.scm (primitive-eval): Remove with-fluids case.
* libguile/memoize.c (do_push_fluid, do_pop_fluid): New primitive
  helpers, like wind and unwind.
  (memoize): Memoize wind and unwind primcalls.  Don't memoize dynlet to
  with-fluids.
  (scm_init_memoize): Initialize push_fluid and pop_fluid here.
* libguile/memoize.h (SCM_M_WITH_FLUIDS): Remove definition.

* module/ice-9/psyntax.scm (build-dynlet): Remove; this just supported
  with-fluids, which is now defined in boot-9.
* module/ice-9/psyntax-pp.scm: Regenerate.

* doc/ref/compiler.texi (Tree-IL):
* module/language/tree-il.scm:
* module/language/tree-il/analyze.scm:
* module/language/tree-il/canonicalize.scm:
* module/language/tree-il/compile-glil.scm:
* module/language/tree-il/cse.scm:
* module/language/tree-il/debug.scm:
* module/language/tree-il/effects.scm: Remove <dynlet>.  Add cases for
  primcalls to push-fluid and pop-fluid in compile-glil.scm and
  effects.scm.

* module/language/tree-il/peval.scm (peval): Factor out
  with-temporaries; probably a bad idea, but works for now.  Factor out
  make-begin0 (a better idea).  Inline primcalls to with-fluid*, and
  remove dynlet cases.

* module/language/tree-il/primitives.scm (*interesting-primitive-names*):
  Add with-fluid*.
2013-06-28 19:52:09 +02:00
Andy Wingo
5e0253f19e replace <dynset> with primcalls to fluid-set!
* doc/ref/compiler.texi (Tree-IL): Remove mention of <dynset>.
* module/language/scheme/decompile-tree-il.scm (do-decompile):
  (choose-output-names): Remove dynset.
* module/language/tree-il.scm (<tree-il>, parse-tree-il):
  (unparse-tree-il, make-tree-il-folder, pre-post-order): Remove
  <dynset>.

* module/language/tree-il/analyze.scm (analyze-lexicals):

* module/language/tree-il/compile-glil.scm (*primcall-ops*): Add
  fluid-set!.
  (flatten-lambda-case): Remove <dynset> case.

* module/language/tree-il/cse.scm (cse):
* module/language/tree-il/debug.scm (verify-tree-il): Remove <dynset>
  cases.

* module/language/tree-il/effects.scm (make-effects-analyzer): Remove
  <dynset> case.  Add a primcall fluid-set! case.

* module/language/tree-il/peval.scm (peval): Remove dynset cases.

* module/language/tree-il/primitives.scm (*primitive-expand-table*):
  Remove fluid-set! -> dynset transformation.
2013-06-27 22:02:43 +02:00
Andy Wingo
86d0eb31df replace <dynref> with primcalls to fluid-ref
* doc/ref/compiler.texi (Tree-IL): Remove mention of <dynref>.
* module/language/scheme/decompile-tree-il.scm (do-decompile):
  (choose-output-names): Remove dynref.
* module/language/tree-il.scm (<tree-il>, parse-tree-il):
  (unparse-tree-il, make-tree-il-folder, pre-post-order): Remove
  <dynref>.

* module/language/tree-il/analyze.scm (analyze-lexicals):

* module/language/tree-il/compile-glil.scm (*primcall-ops*): Add
  fluid-ref.
  (flatten-lambda-case): Remove <dynref> case.

* module/language/tree-il/cse.scm (cse):
* module/language/tree-il/debug.scm (verify-tree-il): Remove <dynref>
  cases.

* module/language/tree-il/effects.scm (make-effects-analyzer): Remove
  <dynref> case.  Add a primcall fluid-ref case.

* module/language/tree-il/peval.scm (peval): Remove dynref cases.

* module/language/tree-il/primitives.scm (*primitive-expand-table*):
  Remove fluid-ref -> dynref transformation.
2013-06-27 22:02:43 +02:00
Andy Wingo
bb97e4abd4 dynamic-wind in terms of wind and unwind; remove <dynwind>, @dynamic-wind
* doc/ref/compiler.texi: Remove mention of <dynwind>.
* libguile/eval.c (eval): Remove SCM_M_DYNWIND case.
* libguile/expand.c: Remove scm_sym_at_dynamic_wind.
* libguile/memoize.c (do_wind, do_unwind): A couple of hacky subrs.  If
  we see a wind or unwind primcall, we expand to a call of a quoted subr
  value.  It works and removes a kind of memoized value from the
  interpreter.  For the compiler,primcalls to wind and unwind are
  handled specially.
  (MAKMEMO_DYNWIND): Remove.
  (scm_tc16_memoizer): Remove.  Yay!
  (memoize): Remove speculative lookup for toplevels to see if they are
  memoizers: there are no more memoizers.  Memoize calls to the wind and
  unwind primitives.
  (m_dynamic_wind): Remove.
  (unmemoize): Remove dynwind case.
  (scm_init_memoize): Add wind and unwind local definitions.

* module/ice-9/boot-9.scm (dynamic-wind): Reimplement in terms of "wind"
  and "unwind" primitives.  These primitives are not exposed to other
  modules.

* module/ice-9/eval.scm (primitive-eval): Remove dynwind case.
* module/language/scheme/decompile-tree-il.scm (do-decompile):
  (choose-output-names): Remove dynwind cases.

* module/language/tree-il.scm: Remove <dynwind>.  Yaaay!

* module/language/tree-il/analyze.scm (analyze-lexicals): Remove dynwind
  cases.

* module/language/tree-il/compile-glil.scm (*primcall-ops*): Add wind
  and unwind.
  (flatten-lambda-case): Remove dynwind case.  Yay!

* module/language/tree-il/cse.scm (cse):
* module/language/tree-il/debug.scm (verify-tree-il):
* module/language/tree-il/effects.scm (make-effects-analyzer):
* module/language/tree-il/peval.scm (singly-valued-expression?, peval):
  Remove <dywind> cases.  Inline primcalls to dynamic-wind.  Add
  constant folding for thunk?.

* module/language/tree-il/primitives.scm (*interesting-primitive-names*):
  Remove @dynamic-wind, and add procedure? and thunk?.
  (*effect+exception-free-primitives*): Add procedure? and thunk?.
  (*multiply-valued-primitives*): Remove @dynamic-wind.
  Remove @dynamic-wind expander.

* test-suite/tests/peval.test ("partial evaluation"): Update tests for
  dynwind desugaring.
2013-06-27 22:02:43 +02:00
Mark H Weaver
26d148066f Merge remote-tracking branch 'origin/stable-2.0'
Conflicts:
	configure.ac
	libguile/deprecated.c
	libguile/deprecated.h
	libguile/filesys.h
	libguile/fluids.c
	libguile/fports.c
	libguile/gc.c
	libguile/guile.c
	libguile/numbers.c
	libguile/objcodes.c
	libguile/r6rs-ports.c
	libguile/smob.c
	libguile/socket.c
	libguile/threads.h
	module/language/scheme/decompile-tree-il.scm
	module/language/tree-il/peval.scm
	test-suite/tests/syncase.test
2013-03-28 05:09:53 -04:00
Jason Earl
a4b4fbbdaa excise use of "iff" in the manual
* doc/ref/api-compound.texi:
* doc/ref/api-control.texi:
* doc/ref/api-data.texi:
* doc/ref/api-macros.texi:
* doc/ref/api-modules.texi:
* doc/ref/api-procedures.texi:
* doc/ref/api-scheduling.texi:
* doc/ref/api-smobs.texi:
* doc/ref/api-undocumented.texi:
* doc/ref/api-utility.texi:
* doc/ref/compiler.texi:
* doc/ref/intro.texi:
* doc/ref/scheme-using.texi:
* doc/ref/sxml.texi:
* doc/ref/web.texi: Change uses of "iff" to "if, otherwise".  Fixes bug
  10302.
2013-03-10 22:29:18 +01:00
Bake Timmons
994d87be35 Improve keyword notation of Texinfo function definitions.
* doc/ref/api-debug.texi:
* doc/ref/api-evaluation.texi:
* doc/ref/api-modules.texi:
* doc/ref/compiler.texi:
* doc/ref/web.texi: Make Texinfo function headers more consistent.
  Change lesser used keyword notation to the predominant form.

* doc/ref/api-procedures.texi: Fix an argument name in a header that should
  use repeated argument notation.

* doc/ref/srfi-modules.texi: Update references in Texinfo function
  definition body to match previously updated variable notation in
  definition header.
2013-03-02 20:34:29 +01:00
Andy Wingo
180ac9d7b0 Merge remote-tracking branch 'origin/stable-2.0'
Conflicts:
	module/ice-9/psyntax-pp.scm
	module/ice-9/psyntax.scm
	module/language/bytecode/spec.scm
	module/language/tree-il/spec.scm
2013-01-31 11:52:42 +01:00
Mark H Weaver
b34e25359a Add 'for-humans?' flag to <language> specifications.
* module/system/base/language.scm (<language>): Add 'for-humans?'
  field, and export new 'language-for-humans?' predicate.

* doc/ref/compiler.texi (Compiler Tower): Document.

* module/language/assembly/spec.scm, module/language/bytecode/spec.scm,
  module/language/glil/spec.scm, module/language/objcode/spec.scm,
  module/language/tree-il/spec.scm, module/language/value/spec.scm:
  Mark these languages as 'for-humans?'.
2013-01-27 10:16:40 -05:00
Andy Wingo
747bd5347d merge stable-2.0
There are some bugs with command-line handling that will be sorted out
with the next commit.
2013-01-23 16:12:08 +01:00
Andy Wingo
5745de9172 current-language is a parameter in boot-9
* module/ice-9/boot-9.scm (current-language): New parameter.

* module/system/base/language.scm (*current-language*): Pull fluid from
  parameter.
  (current-language): Now a re-exported parameter.

* doc/ref/compiler.texi: Update reference from *current-language* fluid
  to current-language parameter.

* module/system/base/compile.scm (compile-and-load):
* module/ice-9/top-repl.scm (top-repl): Default to the current language,
  not to Scheme.

* module/ice-9/eval-string.scm:
* module/system/base/language.scm:
* module/system/repl/command.scm:
* module/system/repl/repl.scm: Update to use current-language parameter
  and parameterize.
2013-01-22 15:38:04 +01:00
Andy Wingo
b8bc86bce1 instead of our custom .go format, use elf
* libguile/objcodes.c: Change to expect objcode on disk to be embedded
  in ELF instead of having the funky cookie.

  (to_native_order): Use already existing SCM_BYTE_ORDER style byte
  order instead of chars.
  (bytecode_to_objcode): No need for word_size arg.
  (scm_bytecode_to_objcode, scm_objcode_to_bytecode): Take optional
  endianness arg instead of sometimes using target-endianness.
  (scm_load_objcode, scm_write_objcode, scm_bytecode_to_native_objcode):
  Remove.

* libguile/objcodes.h: Adapt.

* libguile/vm.c (scm_load_compiled_with_vm): Use
  scm_load_thunk_from_file.
  (make_boot_program): Adapt to use scm_bytecode_to_objcode with
  endianness arg.

* module/Makefile.am (OBJCODE_LANG_SOURCES): Add (language objcode
  elf).
* module/language/objcode/elf.scm: New module, embeds objcode in ELF.

* module/language/bytecode/spec.scm (compile-objcode):
  (decompile-objcode): Use (target-endianness).

* module/language/objcode/spec.scm: use (language objcode elf) for
  write-objcode.

* module/scripts/disassemble.scm (disassemble):
* module/system/repl/command.scm (disassemble-file): Use
  load-thunk-from-file.

* module/system/vm/objcode.scm: Remove load-objcode and write-objcode.

* test-suite/tests/asm-to-bytecode.test (test-target): Adapt to the new
  ELF world.
2012-06-22 13:40:50 +02:00
Andy Wingo
0858753e82 Merge remote-tracking branch 'origin/stable-2.0'
Conflicts:
	GUILE-VERSION
	libguile/gc-malloc.c
	libguile/ports.c
2012-02-08 11:48:08 +01:00
Bake Timmons
64de6db5c6 Make consistent the usage of variable names in the function definitions found in the Texinfo docs.
* doc/r5rs/r5rs.texi:
* doc/ref/api-compound.texi:
* doc/ref/api-data.texi:
* doc/ref/api-debug.texi:
* doc/ref/api-evaluation.texi:
* doc/ref/api-io.texi:
* doc/ref/api-modules.texi:
* doc/ref/api-procedures.texi:
* doc/ref/api-scheduling.texi:
* doc/ref/api-smobs.texi:
* doc/ref/compiler.texi:
* doc/ref/misc-modules.texi:
* doc/ref/posix.texi:
* doc/ref/scheme-using.texi:
* doc/ref/srfi-modules.texi:
* doc/ref/vm.texi:
* doc/ref/web.texi:
* doc/sources/env.texi: Make usage of variable names of function definitions
  more consistent.
2012-02-02 12:04:16 +01:00
Andy Wingo
880e794812 inline dynwind guards for normal control flow
* module/language/tree-il.scm (<tree-il>): Add `pre' and `post' fields
  to <dynwind>, so that we can inline the guard bodies in the normal
  control-flow case.  It also avoids duplicating code in compile-glil,
  which probably hides more bugs in 2.0.
  (parse-tree-il, unparse-tree-il, tree-il->scheme, tree-il-fold)
  (make-tree-il-folder, post-order!, pre-order!): Update.

* module/language/tree-il/analyze.scm (analyze-lexicals): Update.

* module/language/tree-il/compile-glil.scm (flatten-lambda-case): Update
  to use `pre' and `post' instead of compiling code twice.

* module/language/tree-il/debug.scm (verify-tree-il): Update.

* module/language/tree-il/peval.scm (peval): Update.  Instead of doing
  complicated things in <dynwind>, handle 'dynamic-wind primcalls.

* module/language/tree-il/primitives.scm (*primitive-expand-table*):
  Remove 'dynamic-wind mess.  Adapt '@dynamic-wind.

* test-suite/tests/tree-il.test ("partial evaluation"): Update tests.
2011-11-09 19:38:44 +01:00
Andy Wingo
a881a4ae3b add <primcall> to tree-il
* libguile/expand.c:
* libguile/expand.h (SCM_EXPANDED_PRIMCALL_TYPE_NAME):
  (SCM_EXPANDED_PRIMCALL_FIELD_NAMES):
  (SCM_EXPANDED_PRIMCALL_SRC):
  (SCM_EXPANDED_PRIMCALL_NAME):
  (SCM_EXPANDED_PRIMCALL_ARGS):
  (SCM_MAKE_EXPANDED_PRIMCALL): Add "primcall" Tree-IL type.

* doc/ref/compiler.texi (Tree-IL): Update docs.

* libguile/memoize.c (memoize): Memoizer for primcalls.

* module/ice-9/psyntax.scm: Build primcalls, sometimes.  Also change
  build-primref to just make a primitive-ref.

* module/language/tree-il.scm: Add primcall to the exports, parsers,
  serializers, etc.

* 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:
* module/language/elisp/compile-tree-il.scm: Add primcall support.

* test-suite/tests/tree-il.test: Use primcalls sometimes.
2011-06-02 17:45:58 +02:00
Andy Wingo
7081d4f981 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.
2011-06-02 13:42:55 +02:00
Neil Jerram
8fa6525e82 Rewording for "make an intervention".
* doc/ref/compiler.texi (Extending the Compiler): Rephrase first sentence.
2011-02-18 20:08:59 +00:00
Neil Jerram
6bc746d865 No sublimated desires
* doc/ref/compiler.texi: Delete "subliminated".
2011-02-18 20:08:54 +00:00
Neil Jerram
dd6e37d032 Rewording for "make an intervention".
* doc/ref/compiler.texi (Extending the Compiler): Rephrase first sentence.
2011-02-16 00:17:14 +00:00
Neil Jerram
0b6042a4c2 No sublimated desires
* doc/ref/compiler.texi: Delete "subliminated".
2011-02-15 23:50:05 +00:00
Neil Jerram
679cceeda4 Misc textual editing
* doc/ref/api-scheduling.texi (Asyncs): "queueing" -> "queuing".

* benchmark-suite/lib.scm, doc/sources/unix.texi (Unix conventions),
  test-suite/lib.scm: "postpend" -> "append".

* doc/ref/api-compound.texi (Array Syntax, Dictionary Types),
  doc/ref/api-control.texi (Catch), doc/ref/api-data.texi (Complex
  Numbers, Conversion, Random, Symbol Props, Symbol Uninterned),
  doc/ref/api-options.texi (Build Config, Common Feature Symbols),
  doc/ref/api-regex.texi (Match Structures),
  doc/ref/api-undocumented.texi, doc/ref/compiler.texi (Tree-IL,
  GLIL), doc/ref/data-rep.texi (Immediate objects), doc/ref/goops.texi
  (Slot Description Example), doc/ref/history.texi (A Scheme of Many
  Maintainers, Status), doc/ref/libguile-program.texi (Available
  Functionality), doc/ref/misc-modules.texi (Formatted Output),
  doc/ref/mod-getopt-long.texi (getopt-long Reference),
  doc/ref/posix.texi (Network Socket Address, Network Sockets and
  Communication), doc/ref/srfi-modules.texi (SRFI-1 Association Lists,
  SRFI-10, SRFI-19 String to date, SRFI-27 Random Sources),
  doc/ref/vm.texi (Instruction Set, Top-Level Environment
  Instructions, Procedure Call and Return Instructions),
  doc/sources/unix.texi (Unix conventions): Correct spacing after
  "i.e." and "e.g.".
2011-02-13 22:13:33 +00:00
Ralf Wildenhues
ecb8733562 docs: fix typos in manual, and a couple in code comments.
* doc/ref/api-binding.texi, doc/ref/api-compound.texi,
doc/ref/api-control.texi, doc/ref/api-debug.texi,
doc/ref/api-io.texi, doc/ref/api-macros.texi,
doc/ref/api-procedures.texi, doc/ref/api-scheduling.texi,
doc/ref/api-undocumented.texi, doc/ref/api-utility.texi,
doc/ref/compiler.texi, doc/ref/goops.texi,
doc/ref/libguile-concepts.texi, doc/ref/misc-modules.texi,
doc/ref/posix.texi, doc/ref/r6rs.texi, doc/ref/slib.texi,
doc/ref/srfi-modules.texi, doc/ref/sxml-match.texi,
doc/ref/tools.texi, doc/ref/vm.texi, doc/ref/web.texi,
doc/sources/env.texi, doc/sources/jimb-org.texi,
doc/sources/scheme-concepts.texi, doc/sources/unix.texi,
module/ice-9/optargs.scm: Fix typos.
* doc/r4rs/r5rs.texi: Likewise.  Do not capitalize code symbols
even at the start of a sentence.
* doc/ref/api-data.texi: Likewise.  Also, remove executable bit.
2011-02-09 22:28:49 +00:00
Andy Wingo
172988eeb4 fix <letrec> docs
* doc/ref/compiler.texi (Tree-IL): Fix docs for external representation
  of letrec. Thanks to No Itisnt.
2010-08-27 09:16:44 -07:00
Andy Wingo
935c7acac7 letrec* in docs, and some r6rs fixes
* doc/ref/api-binding.texi: Add docs for letrec*, and revise some other
  text.
* doc/ref/compiler.texi: Update <letrec> for in-order?.
* doc/ref/r6rs.texi: Add letrec* entry.

* module/rnrs.scm:
* module/rnrs/base.scm: Export letrec*.
2010-08-06 11:52:27 +02:00
Andy Wingo
dc3b266118 update manual for value history on by default
* doc/ref/compiler.texi: Update for new ,pp meta-command.
* doc/ref/scheme-using.texi (Using Guile Interactively): Show value
  history in examples.
  (Value Historyx): Update docs to mention the repl option and the
  programmatic interface.
2010-07-10 11:38:47 +02:00
Andy Wingo
0a715b9adc Update example disassemblies
* doc/ref/compiler.texi:
* doc/ref/vm.texi: Update example disassemblies for current compiler,
  which uses assert-nargs-ee/locals.
2010-05-02 14:18:58 +02:00
Andy Wingo
41e64dd73c update compiler.texi
* doc/ref/compiler.texi (Compiler Tower): Update for removal of version
  from <language>, and add joiner and make-default-environment fields.
  Update examples.
  (The Scheme Compiler): Update for `macroexpand' instead of
  `sc-expand', and that the environment must be a module.
  (Tree-IL): Update for new Tree-IL, and change from "vars" to
  "gensyms".
  (GLIL): Update for new GLIL, including preludes and prompts.
  (Assembly): Update for current output (which seems quite verbose).
  (Bytecode and Objcode): Update for current output, and some procedure
  name changes.
2010-05-02 12:46:50 +02:00
Andy Wingo
acc51c3e65 update documentation for vm instructions
* doc/ref/vm.texi: Update with documentation for new-ish instructions,
  and reorganize the sections a bit.

* doc/ref/compiler.texi (GLIL): Fix up a couple xrefs.
2010-05-01 17:02:39 +02:00
Neil Jerram
42a438e893 Fix typo
* doc/ref/compiler.texi (Bytecode and Objcode): Remove extraneous
  comma.
2010-04-25 18:12:01 +01:00
Ludovic Courtès
1ebe6a6368 Document the interaction of the "compilee" with the compiler's current module.
This is a followup to 87c595c757 ("Compile
in a fresh module by default.") and
f65e2b1ec5 ("Honor and confine
expansion-time side-effects to `current-reader'.").

* doc/ref/api-evaluation.texi (Loading): Explain how to change
  `current-reader' in a compiler-friendly way.

* doc/ref/compiler.texi (The Scheme Compiler): Explain use of a fresh
  compilation module and separate `current-reader' fluid.

* test-suite/tests/compiler.test ("current-reader")["with eval-when"]:
  New test.
2009-10-15 21:29:42 +02:00
Neil Jerram
5f5f251895 Merge branch 'wip-manual' of ssh://ossau@git.sv.gnu.org/srv/git/guile
Conflicts:

	doc/ref/autoconf.texi
	doc/ref/vm.texi
2009-08-21 22:04:03 +01:00
Andy Wingo
98850fd727 update docs for recent vm/compiler work
* doc/ref/compiler.texi:
* doc/ref/vm.texi: Update for recent changes.
* module/language/assembly/disassemble.scm (disassemble-load-program):
  Don't print nops, they are distracting.
2009-08-12 23:38:05 +02:00
Neil Jerram
45867c2ace Fix overfull hboxes 2009-08-04 12:10:16 +01:00
Andy Wingo
4e432dab1f link to brainfuck wikipedia page
* doc/ref/compiler.texi: Point to more info on Brainfuck. Patch by
  Daniel Kraft.
2009-06-21 15:06:03 +02:00
Daniel Kraft
e63d888ef6 added documenting comments to the brainfuck compiler and mention it in the VM documentation.
* doc/ref/compiler.texi: Mention the new brainfuck compiler as an example.
* module/language/brainfuck/compile-scheme.scm: Add a lot of documentation comments.
* module/language/brainfuck/parse.scm: Ditto.
* module/language/brainfuck/spec.scm: Ditto.
2009-06-21 15:06:03 +02:00
Andy Wingo
7364333952 update docs -- sections on assembly and objcode
* doc/ref/api-procedures.texi:
* doc/ref/compiler.texi:
* doc/ref/vm.texi: Update the docs some more.
2009-05-25 22:45:42 +02:00
Andy Wingo
81fd315299 update docs, clean up VM vestiges, macro docs, fix (/ a b c)
* doc/ref/api-procedures.texi (Compiled Procedures): Fix for API changes.

* doc/ref/compiler.texi (Compiling to the Virtual Machine): Replace GHIL
  docs with Tree-IL docs. Update the bits about the Scheme compiler to
  talk about Tree-IL and the expander instead of GHIL. Remove
  <glil-argument>. Add placeholder sections for assembly and bytecode.

* doc/ref/vm.texi: Update examples with what currently happens. Reword
  some things. Fix a couple errors.

* libguile/vm-i-system.c (externals): Remove this instruction, it's not
  used.

* module/ice-9/documentation.scm (object-documentation): If the object is
  a macro, try to return documentation on the macro transformer.

* module/language/assembly/disassemble.scm (disassemble-load-program):
  Fix problem in which we skipped the first element of the object vector,
  because of changes to procedure layouts a few months ago.

* module/language/scheme/spec.scm (read-file): Remove read-file
  definition.

* module/language/tree-il.scm: Reorder exports. Remove <lexical>, it was
  a compat shim to something that was never released. Fix `location'.

* module/language/tree-il/primitives.scm (/): Fix expander for more than
  two args to /.

* module/system/base/compile.scm (read-file-in): Remove unused
  definition.

* module/system/base/language.scm (system): Remove language-read-file.

* module/language/ecmascript/spec.scm (ecmascript): Remove read-file
  definition.
2009-05-24 13:09:01 +02:00
Andy Wingo
86872cc392 fold in ludovic's suggestions for new manual sections
* INSTALL: Update from newest merge

* doc/ref/compiler.texi:
* doc/ref/vm.texi: Fold in Ludovic's suggestions
2009-01-15 23:04:06 +01:00