Ludovic Court`es [Fri, 28 Oct 2005 14:49:25 +0000 (14:49 +0000)]
Minor binding name clash tweak.
* 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
Ludovic Courtes [Sat, 25 Jun 2005 06:57:20 +0000 (06:57 +0000)]
Started documenting the compiler.
* 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
Ludovic Courtes [Sat, 25 Jun 2005 03:13:56 +0000 (03:13 +0000)]
* src/objcodes.c (make_objcode_by_mmap): Fixed the error type when the
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
Ludovic Courtes [Fri, 24 Jun 2005 17:25:36 +0000 (17:25 +0000)]
Removed a few more deprecated function calls; documented closures.
* 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
Ludovic Court`es [Tue, 3 May 2005 15:13:42 +0000 (15:13 +0000)]
Playing with the procedure call mechanism.
* src/objcodes.c (do-pair): New experiment.
* src/vm_engine.h (ALIGN_AS_NON_IMMEDIATE): New macro.
(POP_LIST_ON_STACK): New experimental macro.
* src/vm_engine.c (call): In the procedure call case, I tried using the above
macro.
git-archimport-id: lcourtes@laas.fr--2004-libre/guile-vm--revival--0.6--patch-8
Ludovic Court`es [Mon, 2 May 2005 16:32:32 +0000 (16:32 +0000)]
Fixed a stack leak. Now observing actual performance.
* src/*.[ch]: Replaced `scm_mem2symbol' by `scm_from_locale_symboln' and
`scm_ulong2num' by `scm_from_ulong'.
* src/vm_system.c (tail-call): Fixed stack leak (SP lacked decrement by
one more Scheme object in the tail-recursive case).
* benchmark/measure.scm (measure): Make sure we are using the compiled
procedure (i.e. a program object) when measuring. This yields better
results than before. :-)
* doc/guile-vm.texi: Augmented the instruction set documentation with
branch instructions, `call' and `tail-call'.
git-archimport-id: lcourtes@laas.fr--2004-libre/guile-vm--revival--0.6--patch-7
Ludovic Court`es [Fri, 29 Apr 2005 14:12:12 +0000 (14:12 +0000)]
Improved the VM's efficiency. The VM is as fast as the interpreter. :-(
* 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
Ludovic Court`es [Thu, 28 Apr 2005 15:45:59 +0000 (15:45 +0000)]
Got the VM up and running! Augmented the documentation.
* 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
Ludovic Court`es [Wed, 27 Apr 2005 09:36:52 +0000 (09:36 +0000)]
Fixed the compiler, got the disassembler working.
* 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
Ludovic Court`es [Mon, 25 Apr 2005 16:56:18 +0000 (16:56 +0000)]
Updated the assembly process so that `u8vectors' are used. Compilation works.
* module/system/vm/conv.scm (encode-length): Use u8vectors.
(code->bytes): Likewise.
* module/system/vm/assemble.scm (codegen): Use u8vectors instead
of strings.
* src/objcodes.c (objcode->string): Removed.
(objcode->u8vector): New function.
* module/system/base/compile.scm (compile-file): Use `objcode->u8vector'
and `uniform-vector-write'.
git-archimport-id: lcourtes@laas.fr--2004-libre/guile-vm--revival--0.6--patch-3
Ludovic Court`es [Fri, 22 Apr 2005 16:00:33 +0000 (16:00 +0000)]
Translation from Scheme to GHIL, and compilation to GLIL work.
* 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
Ludovic Court`es [Fri, 22 Apr 2005 11:07:06 +0000 (11:07 +0000)]
Updated the C code base so that it compiles with Guile 1.7.2.
* src/*.[ch]: Introduced changes so that it compiles with Guile 1.7.2.
git-archimport-id: lcourtes@laas.fr--2004-libre/guile-vm--revival--0.6--patch-1
Keisuke Nishida [Wed, 2 May 2001 15:05:05 +0000 (15:05 +0000)]
*** empty log message ***
Keisuke Nishida [Wed, 25 Apr 2001 07:42:32 +0000 (07:42 +0000)]
*** empty log message ***
Keisuke Nishida [Wed, 25 Apr 2001 01:55:45 +0000 (01:55 +0000)]
*** empty log message ***
Keisuke Nishida [Mon, 23 Apr 2001 06:17:52 +0000 (06:17 +0000)]
*** empty log message ***
Keisuke Nishida [Mon, 23 Apr 2001 04:28:13 +0000 (04:28 +0000)]
*** empty log message ***
Keisuke Nishida [Sun, 22 Apr 2001 11:16:37 +0000 (11:16 +0000)]
*** empty log message ***
Keisuke Nishida [Sun, 22 Apr 2001 02:13:48 +0000 (02:13 +0000)]
*** empty log message ***
Keisuke Nishida [Fri, 20 Apr 2001 18:35:59 +0000 (18:35 +0000)]
*** empty log message ***
Keisuke Nishida [Fri, 20 Apr 2001 18:35:59 +0000 (18:35 +0000)]
*** empty log message ***
Keisuke Nishida [Thu, 19 Apr 2001 06:28:03 +0000 (06:28 +0000)]
*** empty log message ***
Keisuke Nishida [Thu, 19 Apr 2001 05:59:09 +0000 (05:59 +0000)]
*** empty log message ***
Keisuke Nishida [Thu, 19 Apr 2001 03:09:27 +0000 (03:09 +0000)]
*** empty log message ***
Keisuke Nishida [Mon, 16 Apr 2001 03:43:48 +0000 (03:43 +0000)]
*** empty log message ***
Keisuke Nishida [Mon, 16 Apr 2001 00:08:10 +0000 (00:08 +0000)]
*** empty log message ***
Keisuke Nishida [Sun, 15 Apr 2001 15:02:41 +0000 (15:02 +0000)]
*** empty log message ***
Keisuke Nishida [Sun, 15 Apr 2001 14:54:59 +0000 (14:54 +0000)]
*** empty log message ***
Keisuke Nishida [Sat, 14 Apr 2001 11:26:26 +0000 (11:26 +0000)]
SLIB init file for Guile.
Keisuke Nishida [Sat, 14 Apr 2001 11:24:45 +0000 (11:24 +0000)]
Import SLIB 2d1.
Keisuke Nishida [Thu, 12 Apr 2001 23:30:38 +0000 (23:30 +0000)]
*** empty log message ***
Keisuke Nishida [Thu, 12 Apr 2001 00:15:31 +0000 (00:15 +0000)]
*** empty log message ***
Keisuke Nishida [Wed, 11 Apr 2001 23:43:01 +0000 (23:43 +0000)]
*** empty log message ***
Keisuke Nishida [Wed, 11 Apr 2001 23:27:08 +0000 (23:27 +0000)]
*** empty log message ***
Keisuke Nishida [Wed, 11 Apr 2001 23:12:37 +0000 (23:12 +0000)]
*** empty log message ***
Keisuke Nishida [Wed, 11 Apr 2001 21:54:57 +0000 (21:54 +0000)]
*** empty log message ***
Keisuke Nishida [Wed, 11 Apr 2001 20:57:44 +0000 (20:57 +0000)]
*** empty log message ***
Keisuke Nishida [Tue, 10 Apr 2001 06:11:26 +0000 (06:11 +0000)]
*** empty log message ***
Keisuke Nishida [Tue, 10 Apr 2001 00:32:46 +0000 (00:32 +0000)]
*** empty log message ***
Keisuke Nishida [Mon, 9 Apr 2001 06:44:26 +0000 (06:44 +0000)]
*** empty log message ***
Keisuke Nishida [Mon, 9 Apr 2001 06:36:59 +0000 (06:36 +0000)]
*** empty log message ***
Keisuke Nishida [Mon, 9 Apr 2001 05:57:15 +0000 (05:57 +0000)]
*** empty log message ***
Keisuke Nishida [Mon, 9 Apr 2001 04:08:46 +0000 (04:08 +0000)]
*** empty log message ***
Keisuke Nishida [Mon, 9 Apr 2001 04:02:01 +0000 (04:02 +0000)]
*** empty log message ***
Keisuke Nishida [Mon, 9 Apr 2001 01:50:48 +0000 (01:50 +0000)]
*** empty log message ***
Keisuke Nishida [Mon, 9 Apr 2001 01:28:16 +0000 (01:28 +0000)]
*** empty log message ***
Keisuke Nishida [Sat, 7 Apr 2001 23:32:30 +0000 (23:32 +0000)]
*** empty log message ***
Keisuke Nishida [Sat, 7 Apr 2001 23:32:03 +0000 (23:32 +0000)]
apply
Keisuke Nishida [Sat, 7 Apr 2001 23:14:21 +0000 (23:14 +0000)]
*** empty log message ***
Keisuke Nishida [Sat, 7 Apr 2001 12:56:11 +0000 (12:56 +0000)]
*** empty log message ***
Keisuke Nishida [Sat, 7 Apr 2001 12:51:36 +0000 (12:51 +0000)]
*** empty log message ***
Keisuke Nishida [Sat, 7 Apr 2001 12:36:57 +0000 (12:36 +0000)]
*** empty log message ***
Keisuke Nishida [Sat, 7 Apr 2001 12:29:06 +0000 (12:29 +0000)]
*** empty log message ***
Keisuke Nishida [Sat, 7 Apr 2001 12:13:40 +0000 (12:13 +0000)]
*** empty log message ***
Keisuke Nishida [Sat, 7 Apr 2001 11:54:36 +0000 (11:54 +0000)]
*** empty log message ***
Keisuke Nishida [Sat, 7 Apr 2001 10:16:48 +0000 (10:16 +0000)]
*** empty log message ***
Keisuke Nishida [Sat, 7 Apr 2001 09:39:38 +0000 (09:39 +0000)]
*** empty log message ***
Keisuke Nishida [Fri, 6 Apr 2001 23:15:53 +0000 (23:15 +0000)]
*** empty log message ***
Keisuke Nishida [Fri, 6 Apr 2001 10:06:32 +0000 (10:06 +0000)]
*** empty log message ***
Keisuke Nishida [Fri, 6 Apr 2001 09:11:32 +0000 (09:11 +0000)]
*** empty log message ***
Keisuke Nishida [Fri, 6 Apr 2001 05:00:10 +0000 (05:00 +0000)]
*** empty log message ***
Keisuke Nishida [Fri, 6 Apr 2001 00:17:39 +0000 (00:17 +0000)]
*** empty log message ***
Keisuke Nishida [Thu, 5 Apr 2001 11:07:50 +0000 (11:07 +0000)]
*** empty log message ***
Keisuke Nishida [Thu, 5 Apr 2001 08:50:39 +0000 (08:50 +0000)]
*** empty log message ***
Keisuke Nishida [Thu, 5 Apr 2001 05:48:59 +0000 (05:48 +0000)]
*** empty log message ***
Keisuke Nishida [Thu, 5 Apr 2001 02:04:26 +0000 (02:04 +0000)]
*** empty log message ***
Keisuke Nishida [Thu, 5 Apr 2001 01:38:38 +0000 (01:38 +0000)]
*** empty log message ***
Keisuke Nishida [Wed, 4 Apr 2001 20:37:32 +0000 (20:37 +0000)]
Quick documentation.
Keisuke Nishida [Wed, 4 Apr 2001 20:23:13 +0000 (20:23 +0000)]
Don't use module.scm.
Keisuke Nishida [Wed, 4 Apr 2001 20:14:34 +0000 (20:14 +0000)]
*** empty log message ***
Keisuke Nishida [Wed, 4 Apr 2001 19:58:40 +0000 (19:58 +0000)]
Better current module system support.
Keisuke Nishida [Wed, 4 Apr 2001 18:46:11 +0000 (18:46 +0000)]
Don't load modules explicitly at initialization.
Keisuke Nishida [Tue, 3 Apr 2001 22:39:38 +0000 (22:39 +0000)]
Current module support hack.
Keisuke Nishida [Tue, 3 Apr 2001 22:14:41 +0000 (22:14 +0000)]
Current module support hack.
Keisuke Nishida [Tue, 3 Apr 2001 21:44:40 +0000 (21:44 +0000)]
*** empty log message ***
Keisuke Nishida [Sun, 1 Apr 2001 05:33:45 +0000 (05:33 +0000)]
New files.
Keisuke Nishida [Sun, 1 Apr 2001 05:10:15 +0000 (05:10 +0000)]
*** empty log message ***
Keisuke Nishida [Sun, 1 Apr 2001 05:03:41 +0000 (05:03 +0000)]
New VM.
Keisuke Nishida [Sun, 1 Apr 2001 04:57:52 +0000 (04:57 +0000)]
*** empty log message ***
Keisuke Nishida [Fri, 6 Oct 2000 00:40:00 +0000 (00:40 +0000)]
*** empty log message ***
Keisuke Nishida [Fri, 6 Oct 2000 00:39:44 +0000 (00:39 +0000)]
Use `values\' and `call-with-values\'.
Keisuke Nishida [Fri, 29 Sep 2000 18:08:19 +0000 (18:08 +0000)]
*** empty log message ***
Keisuke Nishida [Fri, 29 Sep 2000 18:08:00 +0000 (18:08 +0000)]
Create *.i from *.c and include them.
Keisuke Nishida [Wed, 27 Sep 2000 23:41:10 +0000 (23:41 +0000)]
*** empty log message ***
Keisuke Nishida [Wed, 27 Sep 2000 23:29:45 +0000 (23:29 +0000)]
Indirect threaded. Performance is the same as before. Wow\!
Keisuke Nishida [Fri, 22 Sep 2000 17:38:49 +0000 (17:38 +0000)]
ChangeLog
Keisuke Nishida [Fri, 22 Sep 2000 17:38:36 +0000 (17:38 +0000)]
* src/vm.c: SCM_CHARS -> SCM_SYMBOL_CHARS.
Keisuke Nishida [Fri, 22 Sep 2000 11:08:28 +0000 (11:08 +0000)]
*** empty log message ***
Keisuke Nishida [Fri, 22 Sep 2000 11:08:17 +0000 (11:08 +0000)]
* src/vm_system.c (call): Call return-hook before reinstating a
continuation.
(tail_call): Call return-hook before a proper tail call.
Keisuke Nishida [Wed, 20 Sep 2000 21:13:26 +0000 (21:13 +0000)]
*** empty log message ***
Keisuke Nishida [Wed, 20 Sep 2000 21:13:12 +0000 (21:13 +0000)]
* src/vm_system.c (br_if_not_null): Set ac = SCM_BOOL_F if not null.
Keisuke Nishida [Wed, 20 Sep 2000 21:08:25 +0000 (21:08 +0000)]
*** empty log message ***
Keisuke Nishida [Wed, 20 Sep 2000 21:08:12 +0000 (21:08 +0000)]
* src/vm_number.c (FUNC2): New macro.
(add2, sub2): Use FUNC2.
(remainder): New instruction.
Keisuke Nishida [Wed, 20 Sep 2000 21:07:49 +0000 (21:07 +0000)]
* vm/bytecomp.scm (translate-ref): Combined translate-local-ref,
translate-external-ref, and translate-top-level-ref.
(translate-set): Combined translate-local-set,
translate-external-set, and translate-top-level-ref.
Set a name to the object.
(translate-and, translate-or): Bug fixed.
Keisuke Nishida [Wed, 20 Sep 2000 21:07:12 +0000 (21:07 +0000)]
* vm/shell.scm (vm-frame->call): Updated.
Keisuke Nishida [Wed, 20 Sep 2000 21:06:51 +0000 (21:06 +0000)]
* src/vm_system.c (name): New instruction.
(savet): Don't set name.
Keisuke Nishida [Wed, 20 Sep 2000 21:06:30 +0000 (21:06 +0000)]
* src/vm.c (scm_name_property): New variable.
(scm_name, scm_set_name_x): New procedures.
(scm_smob_print_with_name, init_name_property): New functions.
(print_program, scm_program_name): Removed.
(init_program_type, init_vm_type): Use scm_smob_print_with_name.
(scm_init_vm): Call init_name_property.
Keisuke Nishida [Wed, 20 Sep 2000 09:29:31 +0000 (09:29 +0000)]
*** empty log message ***
Keisuke Nishida [Wed, 20 Sep 2000 09:29:18 +0000 (09:29 +0000)]
* src/vm_scheme.c (cons): Bug fixed.
* src/vm_system.c (br_if_null): Set ac = SCM_BOOL_T if null.
Keisuke Nishida [Mon, 11 Sep 2000 09:18:59 +0000 (09:18 +0000)]
*** empty log message ***