summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* tweaks to the un-integrated test casesvmAndy Wingo2009-03-171-12/+6
| | | | | * testsuite/Makefile.am: Sortof turn these VM tests into more automake-like tests. Needs further work.
* non-srcdir build fixesAndy Wingo2009-03-1712-27/+26
| | | | | | | | | | | | | | | | | | | | | | | * guile-tools.in: Fix the checks to account for non-srcdir builds. * libguile/frames.c: * libguile/objcodes.c: * libguile/programs.c: * libguile/instructions.c: * libguile/vm.c: Fix snarf-includes to cope with non-srcdir builds. * libguile/instructions.h: * libguile/instructions.c: Fix the stubs inclusion to be non-srcdir compatible. * libguile/vm-expand.h (VM_DEFINE_INSTRUCTION): Fix some things so as not to require the instructions.h defintitions, since we have the codes already. Not important tho :) * pre-inst-guile-env.in: Minor tweak that should have no effect. * test-suite/standalone/Makefile.am (all-local): Remove a chmod +x step, the configure.ac rule should do that if necessary.
* try a new way of checking byte orderAndy Wingo2009-03-171-1/+9
|
* decompile source info into <glil-source> annotations.Andy Wingo2009-03-171-0/+26
| | | | | * module/language/glil/decompile-assembly.scm (decompile-load-program): Decompile source information into <glil-source> annotations.
* fix bug serializing filenames in source locationsAndy Wingo2009-03-171-1/+1
| | | | | * module/language/glil/compile-assembly.scm (limn-sources): Fix bug whereby filename was serialized as a ("foo") instead of "foo".
* tweaks to asm->glil decompiler, perhaps fix a (program-source p 0) bugAndy Wingo2009-03-172-15/+50
| | | | | | | | | | | * module/language/ghil/compile-glil.scm (codegen): Push a program's source locations before copying external args to heap -- perhaps fixes (program-source p 0) for some programs. * module/language/glil/decompile-assembly.scm (decompile-load-program): Take another arg, the object vector. Emit <glil-bind> and <glil-unbind> correctly. Properly unparse properties. Just have to deal with source locations now.
* add assembly->glil decompilerAndy Wingo2009-03-173-2/+146
| | | | | | | | * module/language/glil/decompile-assembly.scm: A first pass at an assembly->glil decompiler. Works for a small subset of programs. * module/Makefile.am (GLIL_LANG_SOURCES): * module/language/glil/spec.scm (glil): Add the decompiler.
* update disassembler for changes to decompilerAndy Wingo2009-03-171-4/+5
| | | | | | * module/language/assembly/disassemble.scm (disassemble-load-program) (code-annotation): And update the disassembler for changes to decompiler.
* parse jumps as labels when decompiling bytecode->assemblyAndy Wingo2009-03-171-3/+28
| | | | | * module/language/assembly/decompile-bytecode.scm (decode-load-program): Parse out jumps as labels.
* procedure-arity on vm-compile apply: verily, unresolved.Andy Wingo2009-03-171-1/+3
| | | | | | | | | * test-suite/tests/procprop.test ("procedure-arity"): Procedure-property 'arity on "apply" will fail if "apply" is a program. I suggest that procedure-property is actually the wrong interface for this; if we even want to preseve the old arity forms, we should have an accessor for arity directly that the VM can implement. But in the meantime throw this nasty error while we decide.
* Merge commit 'cb9d473112ac172a3d328bb029b5b550918d4262' into vm-checkAndy Wingo2009-03-1711-176/+203
|\
| * Update `NEWS'.Ludovic Courtès2009-03-091-0/+4
| |
| * Aggregate `Makefile.am' files under `lang/'.Ludovic Courtès2009-03-085-138/+47
| | | | | | | | | | | | * lang/Makefile.am (SUBDIRS): Remove. (elisp_sources): Aggregate the value of `elisp_SOURCES' formerly found in sub-directories' `Makefile.am'.
| * Move `guardians.test' to its own module.Ludovic Courtès2009-03-081-4/+5
| | | | | | | | * test-suite/tests/guardians.test: Add `define-module' clause.
| * Provide a C vararg interface to gsubr invocation.Ludovic Courtès2009-03-083-29/+125
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * libguile/eval.i.c (CEVAL): Update calls to `scm_i_gsubr_apply ()' with a fixed number of arguments. Use `scm_i_gsubr_apply_list ()' for calls with a list of arguments of unknown length. (SCM_APPLY): Use `scm_i_gsubr_apply_list ()' instead of `scm_i_gsubr_apply ()'. * libguile/gsubr.c (gsubr_apply_raw): New. (scm_i_gsubr_apply): Change to take a C vararg list instead of a Scheme list. Use `gsubr_apply_raw ()'. (scm_i_gsubr_apply_list): Use `gsubr_apply_raw ()'. * libguile/gsubr.h (scm_i_gsubr_apply): Update prototype. (scm_i_gsubr_apply_list): New declaration.
| * Slightly simplify gsubr invocation in the evaluator.Ludovic Courtès2009-03-081-7/+6
| | | | | | | | | | * libguile/eval.i.c (CEVAL): Remove the `cclon' label; replace jumps to `cclon' with `RETURN (scm_i_gsubr_apply (...))'.
| * Add new subr invocation benchmarks.Ludovic Courtès2009-03-081-2/+22
| | | | | | | | | | | | | | | | * benchmark-suite/benchmarks/subr.bm (hook1, hook3): New variables. ("subr invocation")("generic subr with rest arg", "generic subr with rest arg and 3+ parameters"): New benchmarks. ("subr application")("generic subr with rest arg", "generic subr with rest arg and 3+ parameters"): New benchmarks.
| * Mark `scm_gsubr_apply ()' as internal.Ludovic Courtès2009-03-023-8/+8
| | | | | | | | | | | | * libguile/gsubr.h (scm_gsubr_apply): Renamed to... (scm_i_gsubr_apply): this. Marked as `SCM_INTERNAL'. Callers updated.
| * Change `scm_gsubr_apply ()' to take the gsubr as its first argument.Ludovic Courtès2009-03-023-12/+10
| | | | | | | | | | | | | | | | | | * libguile/gsubr.c (scm_gsubr_apply): Make SELF the first argument instead of the first element of ARGS. * libguile/gsubr.h: Update. * libguile/eval.i.c (CEVAL): Update.
* | Merge commit 'e20d7001c3f7150400169fecb0bf0eefdf122fe2' into vm-checkAndy Wingo2009-03-1723-245/+281
|\ \ | |/ | | | | | | | | Conflicts: libguile/stacks.c
| * Remove "compiled closures" ("cclos") in favor of a simpler mechanism.Ludovic Courtès2009-03-0216-238/+84
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The idea is to introduce `gsubrs' whose arity is encoded in their type (more precisely in the sizeof (void *) - 8 MSBs). This removes the indirection introduced by cclos and simplifies the code. * libguile/__scm.h (CCLO): Remove. * libguile/debug.c (scm_procedure_source, scm_procedure_environment): Remove references to `scm_tc7_cclo'. * libguile/eval.c (scm_trampoline_0, scm_trampoline_1, scm_trampoline_2): Replace `scm_tc7_cclo' with `scm_tc7_gsubr'. * libguile/eval.i.c (CEVAL): Likewise. No longer make PROC the first argument. Directly invoke `scm_gsubr_apply ()' instead of jump to the `evap(N+1)' label or call to `SCM_APPLY ()'. * libguile/evalext.c (scm_self_evaluating_p): Remove reference to `scm_tc7_cclo'. * libguile/gc-card.c (scm_i_sweep_card, scm_i_tag_name): Likewise. * libguile/gc-mark.c (scm_gc_mark_dependencies): Likewise. * libguile/goops.c (scm_class_of): Likewise. * libguile/print.c (iprin1): Likewise. * libguile/gsubr.c (create_gsubr): Use `unsigned int's for REQ, OPT and RST. Use `scm_tc7_gsubr' instead of `scm_makcclo ()' in the default case. (scm_gsubr_apply): Remove calls to `SCM_GSUBR_PROC ()'. (scm_f_gsubr_apply): Remove. * libguile/gsubr.h (SCM_GSUBR_TYPE): New definition. (SCM_GSUBR_MAX): Changed to 33. (SCM_SET_GSUBR_TYPE, SCM_GSUBR_PROC, SCM_SET_GSUBR_PROC, scm_f_gsubr_apply): Remove. * libguile/procprop.c (scm_i_procedure_arity): Remove reference to `scm_tc7_cclo'; add proper handling of `scm_tc7_gsubr'. * libguile/procs.c (scm_makcclo, scm_make_cclo): Remove. (scm_procedure_p): Remove reference to `scm_tc7_cclo'. (scm_thunk_p): Likewise, plus add proper `scm_tc7_gsubr' handling. * libguile/procs.h (SCM_CCLO_LENGTH, SCM_MAKE_CCLO_TAG, SCM_SET_CCLO_LENGTH, SCM_CCLO_BASE, SCM_SET_CCLO_BASE, SCM_CCLO_REF, SCM_CCLO_SET, SCM_CCLO_SUBR, SCM_SET_CCLO_SUBR, scm_makcclo, scm_make_cclo): Remove. * libguile/stacks.c (read_frames): Remove reference to `scm_f_gsubr_apply'. * libguile/tags.h (scm_tc7_cclo): Remove. (scm_tc7_gsubr): New. (scm_tcs_subrs): Add `scm_tc7_gsubr'.
| * Add subr invocation benchmark.Ludovic Courtès2009-03-022-0/+47
| | | | | | | | * benchmark-suite/Makefile.am (SCM_BENCHMARKS): Add `subr.bm'.
| * Add tests for the stack inspection API.Ludovic Courtès2009-02-171-1/+64
| | | | | | | | | | * test-suite/tests/eval.test (stack->frames): New procedure. ("stacks"): New test prefix.
| * Add new GOOPS tests for built-in types.Ludovic Courtès2009-02-171-1/+19
| | | | | | | | | | * test-suite/tests/goops.test ("classes for built-in types"): New test prefix.
| * Add test for `procedure-properties'.Ludovic Courtès2009-02-162-1/+63
| | | | | | | | * test-suite/Makefile.am (SCM_TESTS): Add `tests/procprop.test'.
| * Update `NEWS'.Ludovic Courtès2009-02-121-1/+4
| |
* | fix marking of double-cell subrsAndy Wingo2009-03-171-1/+7
| | | | | | | | | | * libguile/gc-mark.c (scm_gc_mark_dependencies): Mark the name, generic, and properties of subrs.
* | Merge commit 'e092357058850a6f998bf462bdc5504c6379c96f' into vm-checkAndy Wingo2009-03-174-84/+20
|\ \ | |/
| * Small cleanup relative to the use of double cells for subrs.Ludovic Courtès2009-02-121-7/+1
| | | | | | | | | | * libguile/procs.c (scm_c_make_subr): Remove comments about the number of subrs, improve formatting.
| * Use double-cells to store subrs.Ludovic Courtès2009-02-124-79/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * libguile/procs.c (scm_subr_table, scm_subr_table_size, scm_subr_table_room, subr_table_gc_hint, scm_init_subr_table, scm_mark_subr_table): Remove. (scm_c_make_subr): Simply return a double-cell, with the procedure name and properties stored in a two-element array. (scm_free_subr_entry): Free the meta-info slot. * libguile/init.c (scm_i_init_guile): Remove call to `scm_init_subr_table ()'. * libguile/procs.h (SCM_SUBR_META_INFO): New macro. (SCM_SNAME, SCM_SUBR_PROPS): Use it. (SCM_SUBR_GENERIC, SCM_SET_SUBR_GENERIC, SCM_SET_SUBR_GENERIC_LOC): Update. (scm_t_subr_entry, SCM_SUBR_ENTRY, SCM_SUBRNUM, scm_subr_table, scm_mark_subr_table, scm_init_subr_table): Remove.
* | Merge commit 'feccd2d3100fd2964d4c2df58ab3da7ce4949a66' into vm-checkAndy Wingo2009-03-173-2/+4
|\ \ | |/
| * Add `SCM_SET_SUBR_GENERIC ()' to replace `SCM_SUBR_GENERIC ()' as an lvalue.Ludovic Courtès2009-02-113-2/+4
| | | | | | | | | | | | | | | | | | | | * libguile/goops.c (scm_c_extend_primitive_generic): Use `SCM_SET_SUBR_GENERIC ()' instead of using `SCM_SUBR_GENERIC ()' as an lvalue. * libguile/procs.c (scm_c_make_subr_with_generic): Use `SCM_SET_SUBR_GENERIC_LOC ()'. * libguile/procs.h (SCM_SET_SUBR_GENERIC, SCM_SET_SUBR_GENERIC_LOC): New macros.
* | Merge commit 'cce8b2ce93703aff953750fb40cb53176ea66504' into vm-checkAndy Wingo2009-03-172-7/+7
|\ \ | |/
| * Use `SCM_SNAME ()' when requesting the name of a subr.Ludovic Courtès2009-02-112-7/+7
| | | | | | | | | | | | | | | | | | * libguile/gsubr.c (create_gsubr, create_gsubr_with_generic): Use `SCM_SNAME ()' instead of `SCM_SUBR_ENTRY (subr).name'. * libguile/procs.c (scm_c_define_subr_with_generic, scm_makcclo): Likewise. (scm_c_make_subr_with_generic): Same with `SCM_SUBR_GENERIC ()'.
* | Merge commit '4c9e29ec38350a5206aa3e8e72ad4376512ada2b' into vm-checkAndy Wingo2009-03-171-5/+8
|\ \ | |/
| * Clean lib-version.texiNeil Jerram2009-02-091-5/+8
| | | | | | | | * doc/ref/Makefile.am (CLEANFILES): Add lib-version.texi.
* | Merge commit 'ad5f5ada1d50ecdab634d60ffe3a13b9193156aa' into vm-checkAndy Wingo2009-03-174-3/+16
|\ \ | |/
| * Allow @ to work with (ice-9 syncase)Neil Jerram2009-02-084-3/+16
| | | | | | | | | | | | | | | | | | (Reported by Panicz Maciej Godek.) * test-suite/tests/syncase.test ("@ works with syncase"): New test. * ice-9/syncase.scm (guile-macro): When a Guile macro transformer produces a variable, don't pass it through sc-expand.
* | Merge commit '95a040cd2be7ad03bf197edbdb1fec2c52749ef6' into vm-checkAndy Wingo2009-03-173-1/+3
|\ \ | |/
| * Fix build when compiled with -Wundef -WerrorNeil Jerram2009-02-083-1/+3
| | | | | | | | | | | | | | (Reported by David Fang) * libguile/inline.h: Check if __APPLE_CC__ is defined before testing its value.
* | Merge commit '6290d3f10927f887102a164ccb1a7291cc62288d' into vm-checkAndy Wingo2009-03-173-8/+8
|\ \ | |/
| * GOOPS: Statically allocate the PORT class array.Ludovic Courtès2009-02-033-8/+8
| | | | | | | | | | | | | | | | | | | | | | * libguile/goops.c (scm_port_class): Statically allocate it. (create_port_classes): Don't use `scm_calloc ()'. * libguile/goops.h (scm_port_class): Update declaration. * libguile/ports.c (scm_make_port_type): When checking whether GOOPS is initialized, check whether the first element of SCM_PORT_CLASS is non-zero.
* | Merge commit '5bb2d903b9e54fdd5858a16ba11fa91a9dc0c692' into vm-checkAndy Wingo2009-03-174-10/+14
|\ \ | |/
| * Publish the maximum number of port types as `SCM_I_MAX_PORT_TYPE_COUNT'.Ludovic Courtès2009-02-034-10/+14
| | | | | | | | | | | | | | | | | | | | | | | | * libguile/goops.c (create_port_classes): Use `SCM_I_MAX_PORT_TYPE_COUNT' instead of a hard-wired 256. * libguile/objects.h (SCM_OUT_PCLASS_INDEX, SCM_INOUT_PCLASS_INDEX): Likewise. * libguile/ports.c (scm_make_port_type): Likewise. * libguile/ports.h (SCM_I_MAX_PORT_TYPE_COUNT): New macro.
* | Merge commit '04795a1cb259c20896fb2edb50c58086027281b0' into vm-checkAndy Wingo2009-03-173-7/+6
|\ \ | |/
| * GOOPS: Statically allocate the SMOB class array.Ludovic Courtès2009-02-033-7/+6
| | | | | | | | | | | | | | | | | | | | | | * libguile/goops.c (scm_smob_class): Statically allocate it. (create_smob_classes): Don't malloc(3) `scm_smob_class'. * libguile/goops.h (scm_smob_class): Update declaration. * libguile/smob.c (scm_make_smob_type, scm_set_smob_apply): When checking whether GOOPS is initialized, check whether the first element of SCM_SMOB_CLASS is non-zero.
* | Merge commit '202271f291971cf14175f5a1a193955f72d43d79' into vm-checkAndy Wingo2009-03-173-5/+9
|\ \ | |/
| * Publish the maximum number of SMOB types as `SCM_I_MAX_SMOB_TYPE_COUNT'.Ludovic Courtès2009-02-033-5/+9
| | | | | | | | | | | | | | | | | | * libguile/goops.c (create_smob_classes): Refer to `SCM_I_MAX_SMOB_TYPE_COUNT' rather than 255 (which is wrong) or 256. * libguile/smob.c (MAX_SMOB_COUNT): Alias for `SCM_I_MAX_SMOB_TYPE_COUNT'. * libguile/smob.h (SCM_I_MAX_SMOB_TYPE_COUNT): New macro.
* | Merge commit 'c010924a71f942100dc7b4021d5ef1c6decf9c85' into vm-checkAndy Wingo2009-03-171-4/+4
|\ \ | |/
| * Update SRFI-11 docs to use correct name for let*-values.Julian Graham2009-02-021-4/+4
| | | | | | | | Signed-off-by: Ludovic Courtès <ludo@gnu.org>