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

60 commits

Author SHA1 Message Date
Ludovic Court`es
2d80426a3e 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
2008-04-25 19:09:30 +02:00
Ludovic Court`es
238e7a11a8 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
2008-04-25 19:09:30 +02:00
Ludovic Court`es
fa19602c28 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
2008-04-25 19:09:30 +02:00
Ludovic Court`es
054599f117 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
2008-04-25 19:09:29 +02:00
Ludovic Court`es
d8eeb67c89 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
2008-04-25 19:09:29 +02:00
Keisuke Nishida
7a0d0cee1f *** empty log message *** 2001-05-02 15:05:05 +00:00
Keisuke Nishida
abaca96059 *** empty log message *** 2001-04-25 07:42:32 +00:00
Keisuke Nishida
46f215f85b *** empty log message *** 2001-04-25 01:55:45 +00:00
Keisuke Nishida
a6df585ae7 *** empty log message *** 2001-04-23 06:17:52 +00:00
Keisuke Nishida
af988bbf9c *** empty log message *** 2001-04-23 04:28:13 +00:00
Keisuke Nishida
ac99cb0cb1 *** empty log message *** 2001-04-22 02:13:48 +00:00
Keisuke Nishida
061f7faeca *** empty log message *** 2001-04-19 06:28:03 +00:00
Keisuke Nishida
24aa2715f6 *** empty log message *** 2001-04-19 05:59:09 +00:00
Keisuke Nishida
f21dfea659 *** empty log message *** 2001-04-19 03:09:27 +00:00
Keisuke Nishida
8f5cfc810f *** empty log message *** 2001-04-16 03:43:48 +00:00
Keisuke Nishida
78591ef5c3 *** empty log message *** 2001-04-16 00:08:10 +00:00
Keisuke Nishida
cb4cca12e7 *** empty log message *** 2001-04-15 15:02:41 +00:00
Keisuke Nishida
c722838216 *** empty log message *** 2001-04-15 14:54:59 +00:00
Keisuke Nishida
bd5b51c205 SLIB init file for Guile. 2001-04-14 11:26:26 +00:00
Keisuke Nishida
9ddacf866c Import SLIB 2d1. 2001-04-14 11:24:45 +00:00
Keisuke Nishida
92e7e03fae *** empty log message *** 2001-04-12 23:30:38 +00:00
Keisuke Nishida
b0c33ccaa6 *** empty log message *** 2001-04-12 00:15:31 +00:00
Keisuke Nishida
9f59b2c4d0 *** empty log message *** 2001-04-11 23:43:01 +00:00
Keisuke Nishida
712e77f291 *** empty log message *** 2001-04-11 23:27:08 +00:00
Keisuke Nishida
662925356a *** empty log message *** 2001-04-11 23:12:37 +00:00
Keisuke Nishida
75b55db5f8 *** empty log message *** 2001-04-11 21:54:57 +00:00
Keisuke Nishida
41f248a84a *** empty log message *** 2001-04-11 20:57:44 +00:00
Keisuke Nishida
8710eba09b *** empty log message *** 2001-04-10 06:11:26 +00:00
Keisuke Nishida
be2d2946bc *** empty log message *** 2001-04-10 00:32:46 +00:00
Keisuke Nishida
532565b047 *** empty log message *** 2001-04-09 06:36:59 +00:00
Keisuke Nishida
f349065ed9 *** empty log message *** 2001-04-09 04:08:46 +00:00
Keisuke Nishida
880ed584e8 *** empty log message *** 2001-04-09 04:02:01 +00:00
Keisuke Nishida
58995613d9 *** empty log message *** 2001-04-09 01:50:48 +00:00
Keisuke Nishida
f0c9993564 *** empty log message *** 2001-04-09 01:28:16 +00:00
Keisuke Nishida
25ec54b542 *** empty log message *** 2001-04-07 23:14:21 +00:00
Keisuke Nishida
ada1129e78 *** empty log message *** 2001-04-07 12:56:11 +00:00
Keisuke Nishida
540c7f72a3 *** empty log message *** 2001-04-07 12:51:36 +00:00
Keisuke Nishida
4c37ee7456 *** empty log message *** 2001-04-07 12:36:57 +00:00
Keisuke Nishida
0b5437c988 *** empty log message *** 2001-04-07 12:29:06 +00:00
Keisuke Nishida
c4c8c433b9 *** empty log message *** 2001-04-07 12:13:40 +00:00
Keisuke Nishida
c0a25eccef *** empty log message *** 2001-04-07 11:54:36 +00:00
Keisuke Nishida
731f329c29 *** empty log message *** 2001-04-07 10:16:48 +00:00
Keisuke Nishida
3616e9e963 *** empty log message *** 2001-04-07 09:39:38 +00:00
Keisuke Nishida
4bfb26f58f *** empty log message *** 2001-04-06 23:15:53 +00:00
Keisuke Nishida
a80be762c3 *** empty log message *** 2001-04-06 09:11:32 +00:00
Keisuke Nishida
499a4c07c7 *** empty log message *** 2001-04-06 05:00:10 +00:00
Keisuke Nishida
3d5ee0cdcc *** empty log message *** 2001-04-06 00:17:39 +00:00
Keisuke Nishida
bd098a1a93 *** empty log message *** 2001-04-05 11:07:50 +00:00
Keisuke Nishida
206a0622d0 *** empty log message *** 2001-04-05 08:50:39 +00:00
Keisuke Nishida
46cd9a346f *** empty log message *** 2001-04-05 05:48:59 +00:00