* module/system/base/syntax.scm (system): Don't re-export receive or
and-let*; modules should explicitly import these if they want to. Don't
export an empty stack-catch definition!
* module/system/repl/command.scm (system): Pull in and-let*.
* module/system/vm/disasm.scm (system): Don't import and-let*.
* benchmark/lib.scm (fibo): Make fibo actually a fibonacci sequence.
* module/system/base/syntax.scm (system): Forward-declare all exports.
(expand-symbol, slot): Rewrite expand-symbol to expand to a
non-recursive invocation of `slot', so that in the future when we get
rid of this syntax, the replacement will be more palatable to the eyes.
* module/language/scheme/translate.scm (¤t-macros): Removed.
(¤t-macro-module): Removed.
(&compile-time-module): New.
(eval-at-compile-time): New.
(translate): Initialize `&compile-time-module'.
(expand-macro)[use-syntax]: New case.
[begin let...]: Don't expand these built-in macros.
[else]: Rewrote the macro detection and invocation logic. Invoke macro
transformers in the current compile-time module.
(trans): Let `expand-macro' raise an exception if needed.
(trans-pair)[defmacro define-macro]: Evaluate the macro definition in
the compile-time module.
* testsuite/t-match.scm: Use `use-syntax' instead of `use-modules' for
`(ice-9 match)' and `(srfi srfi-9)'.
* testsuite/t-records.scm: Likewise.
git-archimport-id: lcourtes@laas.fr--2005-mobile/guile-vm--mobile--0.6--patch-15
* module/system/vm/assemble.scm (dump-object!): New sub-procedure
`too-long'. For `list' and `vector', encode the length on 2 octets
instead of 1 and report an error if a list/vector is longer than 65535.
* module/system/vm/disasm.scm (original-value): New sub-procedure
`list-or-vector?'; when true, return the number of elements for that
list/vector.
* src/vm_system.c (list): Fetch the length as a two-octet integer.
(vector): Likewise.
* testsuite/t-basic-contructs.scm: New.
* testsuite/Makefile.am (vm_test_files): Added the above file.
* module/system/vm/core.scm (load-compiled): Added a bit of
documentation.
git-archimport-id: lcourtes@laas.fr--2005-mobile/guile-vm--mobile--0.6--patch-11
* module/system/vm/conv.scm: Autoload `(system vm core)' also when
`opcode->instruction' is hit. This fixes an "unbound variable" problem.
git-archimport-id: lcourtes@laas.fr--2005-mobile/guile-vm--mobile--0.6--patch-8
* module/language/scheme/translate.scm (trans): Catch exceptions thrown
by `macroexpand' and throw a syntax error.
(trans-pair): Catch calls to `procedure->memoizing-macro' and raise a
syntax error.
* module/system/base/compile.scm (call-with-compile-error-catch): Made a
macro (a procedure doesn't do the job).
(compile-file): Uncommented call to `call-with-compile-error-catch'.
git-archimport-id: lcourtes@laas.fr--2005-mobile/guile-vm--mobile--0.6--patch-7
* module/language/Makefile.am: New.
* module/language/scheme/Makefile.am: New.
* configure.in: Produce these two new Makefiles.
* doc/guile-vm.texi: Documented `compile-file', `compiled-file-name', and
`compile-in'.
* module/system/base/compile.scm: Cosmetic changes.
* module/system/base/language.scm: Likewise.
* module/system/il/Makefile.am: Tried (and failed) to compile more
things.
* module/system/vm/Makefile.am: All source files in here can now be
compiled without harming further compilation.
* module/system/vm/assemble.scm: Select only specific bindings from
`(system vm core)'.
(dump-object!): Show a more meaningful error message.
* module/system/vm/conv.scm: Select only specific bindings from `(system
vm core)'.
* module/system/vm/debug.scm: Likewise.
* module/system/vm/frame.scm: Changed the header. Use a renamer for
`(system vm core)'.
* src/guilec.in: Added options, via `getopt-long'.
git-archimport-id: lcourtes@laas.fr--2005-mobile/guile-vm--mobile--0.6--patch-6
* module/language/scheme/translate.scm (trans-pair): In the `set!' case,
when a procedure-with-setter is passed, call `trans:pair' with an
actual pair. This fixes a long-lasting bug which prevented compilation
of `set!' statements with procedures-with-setter (this showed up when
compiling `(system vm assemble)').
* module/system/base/compile.scm: Added `objcode->u8vector' to the
`#:select' clause.
* module/system/base/syntax.scm: Cosmetic changes.
* module/system/vm/assemble.scm (preprocess): Removed debugging
statements.
* src/frames.c: Cosmetic changes.
* src/frames.h (SCM_FRAME_SET_DYNAMIC_LINK): New.
* src/objcodes.c: Use `scm_t_uint8' instead of `char' when relevant.
* src/vm.c (vm_heapify_frames_1): Use `SCM_FRAME_SET_DYNAMIC_LINK ()'.
* src/vm_loader.c: Added casts to mute GCC 4 warnings.
* testsuite/run-vm-tests.scm (*scheme*): Renamed to `%scheme'.
(run-test-from-file): Renamed to `compile/run-test-from-file'.
(run-vm-tests): Run each test using both the VM and the interpreter;
compare the results.
* testsuite/t-proc-with-setter.scm: Try out `get/set'.
* doc/Makefile.am (info_TEXINFOS): New.
* doc/guile-vm.texi: Added index entries and indices.
* doc/texinfo.tex: New file.
git-archimport-id: lcourtes@laas.fr--2005-mobile/guile-vm--mobile--0.6--patch-5
* module/system/base/compile.scm: Only import `the-vm' and `vm-load' from
`(system vm core)'.
git-archimport-id: lcourtes@laas.fr--2004-libre/guile-vm--revival--0.6--patch-10
* doc/guile-vm.texi: Documented the compiler (node `The Compiler').
Removed a number of things that might have been relevant to Guile-VM 0.0.
* module/system/il/compile.scm (optimize): Commented out the case
using `<ghil-inst?>'.
* src/vm_engine.c (vm_run)[objects_handle]: New variable.
Before leaving the function, release OBJECTS_HANDLE.
* src/vm_engine.h (CACHE_PROGRAM): Use `scm_vector_writable_elements'
instead of `scm_vector_elements'; don't release the handle right away.
* src/vm_loader.c (load-program): New commented out piece of code
dealing with simple vectors.
* src/vm_system.c (object-ref): Added the type of OBJNUM.
git-archimport-id: lcourtes@laas.fr--2005-mobile/guile-vm--mobile--0.6--patch-3
object file is too small.
* doc/guile-vm.texi: Documented `make-closure'. Improved the documentation
of `load-program'.
* testsuite: New directory.
* configure.in: Added `testsuite/Makefile' to `AC_OUTPUT'.
* Makefile.am (SUBDIRS): Added `testsuite'.
* src/vm_engine.h (VM_CHECK_OBJECT): New option.
(CHECK_OBJECT): New macro.
* src/vm_system.c (object-ref): Use VM_CHECK_OBJECT.
* module/system/vm/assemble.scm (preprocess): Commented out the debugging
code.
* benchmark/lib.scm (do-loop): New procedure.
git-archimport-id: lcourtes@laas.fr--2005-mobile/guile-vm--mobile--0.6--patch-2
* src/Makefile.am (.c.x): Fixed the rule.
* src/envs.c: Use `scm_hash_get_handle ()' instead of
`scm_sym2ovcell_soft ()' and `scm_hash_create_handle_x ()' instead of
`scm_intern_symbol ()'.
* src/objcodes.c (bytecode->objcode): Don't use `SCM_VALIDATE_INUM', use
`SCM_VALIDATE_NUMBER' instead.
(make_objcode_by_mmap): Check whether the file is smaller than the
magic cookies; check whether the magic cookies are there.
* src/frames.c (frame-local-ref): Likewise, but use `SCM_MAKE_VALIDATE'.
(frame-local-set!): Likewise.
* src/instructions.c (opcode->instruction): Likewise.
* src/programs.c (program-external-set!): New function.
* src/guile-disasm.in: New file.
* src/Makefile.am: Produce `guile-disasm'.
* doc/guile-vm.texi: Documented `external-ref', `external-set', `local-ref'
and `local-set'.
* module/system/vm/disasm.scm (disassemble-bytecode): Fixed the way
`load-program' is represented.
git-archimport-id: lcourtes@laas.fr--2005-mobile/guile-vm--mobile--0.6--patch-1
* benchmark/lib.scm: New file.
* benchmark/measure.scm: New file.
* README: Added useful pointers to various threads.
* doc/guile-vm.texi: Fixed the description of `load-program' (it now expects
_immediate_ integers).
* src/*.[ch]: Use immediate integers whereever possible, as in the original
code. For `CONS', use `scm_cell' rather than `scm_cons'.
git-archimport-id: lcourtes@laas.fr--2004-libre/guile-vm--revival--0.6--patch-6
* src/*.[ch]: Replaced the remaining `SCM_MAKINUM', and changed `SCM_VELTS'
into `scm_vector_elements ()'.
* src/vm_loader.c (link): Fixed so that it pushed a variable object on
the stack.
* src/vm_system.c (variable-ref): Fixed so that it uses `scm_variable_ref ()'
and friends.
* module/system/vm/assemble.scm (dump-object!): Fixed the string case.
* src/vm_engine.h (CONS): Use `scm_cons' instead of `SCM_NEWCELL'.
* doc/guile-vm.texi: Added actual instruction definitions, explanations of
the program invocation mechanism, programs' object tables, etc., in the
`Instruction Set' chapter.
git-archimport-id: lcourtes@laas.fr--2004-libre/guile-vm--revival--0.6--patch-5
* doc/guile-vm.texi: Texified and cleaned up.
* src/vm.c: Use `scm_from_locale_string ()' instead of `scm_makfrom0str ()'.
* src/vm_engine.c: Likewise.
* src/programs.c (scm_program_bytecode): Return a u8vector instead of a string.
* module/system/vm/conv.scm (make-byte-decoder): Fixed a few things wrt. to
the string to u8vector transition.
* src/objcodes.c (bytecode->objcode): Fixed a bug where the last 10 bytes of
the bytecode where ignored.
* module/system/vm/assemble.scm (dump-object!): Don't convert everything
to a u8vector, keep strings where it makes sense.
* module/system/vm/conv.scm (code->bytes): Accordingly, convert strings to
u8vectors when needed.
(make-byte-decoder): Accordingly too, when decoding instructions, return
variable-length instructions' argument as strings except for `load-program'.
* module/system/vm/disasm.scm: Export `disassemble-bytecode'.
git-archimport-id: lcourtes@laas.fr--2004-libre/guile-vm--revival--0.6--patch-4
* src/*.c: Removed calls to `scm_must_malloc', `SCM_MUST_MALLOC' and
`scm_must_free'. Same for `SCM_INUMP', `SCM_INUM', `SCM_STRING_CHARS',
and the likes.
* module/system/base/syntax.scm: Do not import `(ice-9 match)' and do
not re-export `match', do not export `syntax-error' which was not
defined here.
* module/system/base/compile.scm (call-with-compile-error-catch): Use
the `catch' form instead of `try'.
* src/instructions.c: Use `scm_from_char ()' instead of the deprecated
macro `SCM_MAKINUM ()'.
* src/instructions.h (scm_instruction): Made `npop' a signed char.
git-archimport-id: lcourtes@laas.fr--2004-libre/guile-vm--revival--0.6--patch-2