summaryrefslogtreecommitdiff
Commit message (Expand)AuthorAgeFilesLines
* Another language fix•••* doc/ref/vm.texi: Fix bad sentence. HEADmasterMikael Djurfeldt2018-10-291-3/+3
* Language fix•••* doc/ref/vm.texi: Fix bad sentence. Mikael Djurfeldt2018-10-291-9/+9
* Spelling fixes•••* doc/ref/data-rep.texi: Spelling * doc/ref/vm.texi: Spelling Mikael Djurfeldt2018-10-212-3/+3
* GNU Guile 2.9.1•••* GUILE-VERSION (GUILE_MICRO_VERSION): Bump to 2.9.1. v2.9.1Andy Wingo2018-10-101-1/+1
* Fix GUILE_ENABLE_JIT after latest change•••* acinclude.m4: Fix syntax. Andy Wingo2018-10-101-1/+1
* Bump prerelease version numbering to 2.9.x•••* GUILE-VERSION (GUILE_MINOR_VERSION): Bump to 9. * NEWS: Update expected version numbers. * configure.ac: Update pattern. Andy Wingo2018-10-103-5/+7
* Only enable JIT by default on x86-64•••* acinclude.m4: Disable JIT by default on not-x86-64. Although I got JIT mostly working on 32-bit x86, I got nondeterministic segfaults deep in lightning, on that platform; perhaps indicating a bug in the optimizer. After a day of poking and not solving the problem, I think that I don't want the complexity of Lightning's node representation, especially on platforms that get less testing. In the future we'll use the lightning backends without the node layer. * NEWS: Update. v2.9.0Andy Wingo2018-10-102-3/+9
* Fix JIT of 64-bit comparisons on 32-bit architectures•••* libguile/jit.c (compile_u64_imm_less): Compare high word using not-equal, to avoid a signedness compare. (compile_s64_imm_less, compile_imm_s64_less): Fix the not-less cases. Andy Wingo2018-10-091-8/+8
* Better ursh/ulsh/srsh JIT on 32-bit platforms•••* libguile/jit.c (compile_ursh_immediate, compile_ulsh_immediate) (compile_srsh_immediate): Special-case shifts by 32 bits on 32-bit platforms. Avoids shifting by 0. Andy Wingo2018-10-091-21/+39
* Fix JIT register state tracking for use of SP or FP as temp•••* libguile/jit.c (record_gpr_clobber): If we clobber SP or FP, clear the appropriate register state bits. Only exercised for 32-bit targets in practice! (emit_alloc_frame, emit_push_frame): Fix a couple places where we were failing to track the register state correctly. (compile_umul): Remove a needless register state flush, nowthat qmulr_u has a wrapper that tracks this for us. Andy Wingo2018-10-091-1/+7
* Fix JIT compilation on 32-bit targets•••* libguile/jit.c: Fix compilation on 32-bit targets. Still not working however. Andy Wingo2018-10-081-7/+37
* Fix linker bug that could fail to find the shstrtab•••* module/system/vm/linker.scm (<linker-object>): Add name field. This allows the linker to find sections by name, notably before having found the .shstrtab section. As there can be multiple sections with type SHT_STRTAB, this fixes a bug whereby we could use a section name (a strtab index) into an unrelated strtab. In the past this worked because with ASCII identifiers there won't be an exception, although it is possible to accidentally mistake a shared string tail; but with UTF-8 identifiers, it's possible for a string table index to point in the middle of a codepoint, which is likely not valid UTF-8 and would raise a bug. Keeping an additional section name field fixes this bug. Adapt all callers to pass a name argument to make-linker-object. (find-shstrndx): Update to look at the name field. * module/system/vm/assembler.scm (make-object): Pass name to make-linker-object. Thanks to Daniel Llorens for the test case. Andy Wingo2018-10-082-17/+19
* Fix guile-config for Guile 3.0•••* meta/guile-config.in (guile-module): Use pkg-config for effective version. Andy Wingo2018-10-071-2/+2
* Fix -Wunused-function error for x86 not on sun•••* libguile/lightning/lib/jit_x86-x87.c (_fstcwm): Surround definition with ifdef(sun). Andy Wingo2018-10-071-1/+5
* Fix unused local warning in vm-engine.c•••* libguile/vm-engine.c (return-values): Remove needless frame_size=3 local var. Andy Wingo2018-10-071-1/+0
* Fix lightning build with jit_names.c•••* libguile/lightning/lightning.am (lightning_extra_files): Move jit_names.c here. Andy Wingo2018-10-071-1/+1
* Revert "Remove jit_names.c."•••This reverts commit b74e1f0de322e74930b46b826b0492638eb521b1. Andy Wingo2018-10-073-0/+236
* Remove jit_names.c.•••* libguile/lightning/lib/jit_names.c: Remove unused file. * libguile/lightning/lightning.am (lightning_c_files): Remove jit_names.c. * libguile/lightning/lib/jit_print.c: Remove jit_names.c inclusion. Andy Wingo2018-10-073-236/+0
* Fix GCC warning with %char-set-dump.•••* libguile/srfi-14.c (scm_sys_char_set_dump): Silence an erroneous -Wformat-overflow warning based on an incorrect range inference by increasing output buffer size. Andy Wingo2018-10-071-1/+1
* Deprecate scm_find_executable•••* libguile/deprecated.h: * libguile/deprecated.c (scm_find_executable): Deprecate. Use strdup instead of weird scm_cat_path function. * libguile/script.h: * libguile/script.c: Remove old decls. Andy Wingo2018-10-074-71/+52
* Remove unimplemented decl in script.h•••* libguile/script.h (scm_find_impl_file): Remove unimplemented decl. Andy Wingo2018-10-071-4/+0
* Comment out some unused definitions•••* libguile/jit.c: Comment out unused var decls. Andy Wingo2018-10-071-2/+2
* Fix use of uninstalled header by installed headers•••* libguile/Makefile.am (libpath.h): Remove definition of SCM_EFFECTIVE_VERSION, which is defined in version.h. * libguile/extensions.h: Remove libpath.h inclusion, as it's not installed. * libguile/atomic.c: * libguile/bytevectors.c: * libguile/control.c: * libguile/fdes-finalizers.c: * libguile/foreign-object.c: * libguile/foreign.c: * libguile/fports.c: * libguile/frames.c: * libguile/goops.c: * libguile/i18n.c: * libguile/instructions.c: * libguile/intrinsics.c: * libguile/ioext.c: * libguile/load.c: * libguile/loader.c: * libguile/poll.c: * libguile/ports.c: * libguile/posix.c: * libguile/programs.c: * libguile/r6rs-ports.c: * libguile/srfi-1.c: * libguile/srfi-60.c: * libguile/threads.c: * libguile/unicode.c: * libguile/vm.c: * libguile/weak-vector.c: Include version.h for the SCM_EFFECTIVE_VERSION definition. Andy Wingo2018-10-0728-2/+26
* Update NEWS•••* NEWS: Update. Andy Wingo2018-10-071-5/+44
* Minor additional manual updates•••* doc/ref/api-debug.texi (VM Hooks): Update for changes in VM hook API. * doc/ref/guile.texi: Update copyright years. * doc/ref/preface.texi (Contributors): Update. Andy Wingo2018-10-073-53/+47
* Add manual section on JIT compiler•••* doc/ref/vm.texi (Just-In-Time Native Code): New section. * doc/ref/compiler.texi (Extending the Compiler): Update. Andy Wingo2018-10-072-12/+103
* Fix f32-set! JIT compilation•••* libguile/jit.c (compile_f32_set): Fix to write an f32, not a f64. Andy Wingo2018-10-041-1/+1
* Update compiler.texi•••* doc/ref/compiler.texi: Update for compiler changes in Guile 3. Andy Wingo2018-10-031-51/+106
* Rename $closure to $const-fun•••* module/language/cps.scm ($const-fun): Rename from $closure, as we always use this now with nfree == 0. * module/language/cps/closure-conversion.scm: * module/language/cps/compile-bytecode.scm: * module/language/cps/contification.scm: * module/language/cps/cse.scm: * module/language/cps/dce.scm: * module/language/cps/devirtualize-integers.scm: * module/language/cps/effects-analysis.scm: * module/language/cps/licm.scm: * module/language/cps/peel-loops.scm: * module/language/cps/renumber.scm: * module/language/cps/rotate-loops.scm: * module/language/cps/simplify.scm: * module/language/cps/slot-allocation.scm: * module/language/cps/specialize-numbers.scm: * module/language/cps/types.scm: * module/language/cps/utils.scm: * module/language/cps/verify.scm: Adapt users. Andy Wingo2018-10-0318-40/+36
* Finish updating vm.texi•••* doc/ref/compiler.texi (Bytecode): Update macro-assembler instructions, and move most of them to the instruction set reference. * doc/ref/vm.texi (A Virtual Machine for Guile, VM Programs): Minor fixes. (Instruction Set): Update for Guile 3 instruction set. * libguile/vm-engine.c (vm_engine): Update a few instruction docstrings. Andy Wingo2018-09-303-795/+865
* Update "Variables and the VM"•••* doc/ref/vm.texi (Variables and the VM): Update. Andy Wingo2018-09-281-53/+110
* Update "Stack Layout"•••* doc/ref/vm.texi (Stack Layout): Update. Andy Wingo2018-09-281-23/+32
* Update "VM Concepts"•••* doc/ref/vm.texi (VM Concepts): Update. Andy Wingo2018-09-281-3/+3
* Update "Why a VM?"•••* doc/ref/vm.texi (Why a VM?): Update. Andy Wingo2018-09-281-35/+40
* Update "A Virtual Machine for Guile"•••* doc/ref/vm.texi (A Virtual Machine for Guile): Update. Andy Wingo2018-09-281-10/+26
* Update data representation chapter in the manual•••* doc/ref/data-rep.texi (The SCM Type in Guile): Refer to scm.h. (Relationship Between SCM and scm_t_bits): Better title-case. (Immediate Objects): Better title-case. Prefer "heap object" over "cell". (Non-Immediate Objects): Better title-case. Deprecate the concept of cells. (Allocating Heap Objects): Rename from Allocating Cells. (Heap Object Type Information): Rename from Heap Cell Type Information. (Accessing Heap Object Fields): Rename from Accessing Cell Entries. * doc/ref/vm.texi: Update references. Andy Wingo2018-09-272-149/+132
* Update Conservative GC section of manual•••* doc/ref/data-rep.texi (Conservative GC): Update notes with more details. Andy Wingo2018-09-271-12/+16
* Update history.texi.•••* doc/ref/history.texi (A Timeline of Selected Guile Releases) (Status): Update. Andy Wingo2018-09-251-10/+16
* Update comments in vm-engine.c•••* libguile/jit.c (compile_s64_numerically_equal): Remove as this instruction was removed in previous refactoring. (compile_atomic_scm_set_immediate), compile_atomic_scm_ref_immediate): Adapt to change in C name of these instructions. * libguile/vm-engine.c: Add comments for all instructions. Andy Wingo2018-09-222-49/+453
* Fix case where running abort hook could trash registers•••* libguile/vm-engine.c (abort): If the abort doesn't need to longjmp and the abort hook was enabled, cache registers first to avoid restoring a bad IP to the VM. Andy Wingo2018-09-221-2/+5
* Configure uses 2.3.x tags for version•••* configure.ac: Only pick 2.3.x tags for the version. Will need to bump when we do 3.0. Andy Wingo2018-09-201-1/+1
* Renumber instructions and bump objcode version•••* libguile/loader.h (SCM_OBJCODE_MINIMUM_MINOR_VERSION): (SCM_OBJCODE_MINOR_VERSION): Bump version. * module/system/vm/assembler.scm (*bytecode-minor-version*): Bump. * libguile/vm-engine.c: Rearrange opcodes to be contiguous and in a somewhat sensible order. v2.3.0Andy Wingo2018-09-203-1290/+1179
* Fix --disable-jit compilation•••* libguile/jit.c: Wrap the whole thing in ENABLE_JIT. * libguile/threads.c (on_thread_exit): * libguile/vm.c (scm_call_n): * libguile/init.c (scm_i_init_guile): * libguile/vm-engine.c (VM_NAME): Wrap calls into jit.c with ENABLE_JIT. * configure.ac: Move up AC_CANONICAL_TARGET, as autoconf was complaining about it coming after AC_ARG_PROGRAM. * acinclude.m4 (GUILE_ENABLE_JIT): Fix to honor --enable-jit arg. lightningAndy Wingo2018-09-177-8/+27
* Turn on automatic JIT compilation by default•••* libguile/jit.c (default_jit_threshold): New static const variable. (scm_sys_jit_compile): Remove. (scm_init_jit): Rename GUILE_JIT_COUNTER_THRESHOLD to GUILE_JIT_THRESHOLD, and default to default_jit_threshold. Remove %jit-compile definition. Andy Wingo2018-09-151-26/+6
* Fix emergency aborts to not expand the stack•••* libguile/vm.c (scm_i_vm_emergency_abort): New helper: an abort that doesn't allocate, not even stack. * libguile/throw.c (abort_to_prompt): Use scm_i_vm_emergency_abort. * libguile/vm.h: Declare helper. Andy Wingo2018-09-153-6/+73
* Fix scm_make_foreign_object_n.•••* libguile/foreign-object.c (scm_make_foreign_object_n): Fix computation of slot count; broken in 34b9f22ca. Andy Wingo2018-09-141-1/+1
* Deoptimize to VM when hooks are enabled•••* libguile/vm.c (vm_clear_mcode_return_addresses): New helper. (vm_recompute_disable_mcode): Force a thread to deoptimize if hooks become enabled. (scm_call_n): Don't enter mcode if it's disabled. Also check the right flag for when to run the abort hook (the abort_hook_enabled flag). * libguile/vm-engine.c (instrument-entry, instrument-loop) (return-values, abort, compose-continuation): Don't enter mcode if mcode is disabled for this thread. Andy Wingo2018-09-142-51/+75
* Hook refactors•••* libguile/vm.h (SCM_VM_NUM_HOOKS): Remove hook enumeration. (struct scm_vm): Re-arrange members to be more dense and to use common cache lines for commonly-used members. Declare hooks and their enabled flags by name. * libguile/vm-engine.c (RUN_HOOK): Refer to hooks by name. * libguile/vm.c (FOR_EACH_HOOK): New helper. (vm_hook_compute_enabled, vm_recompute_disable_mcode): New routines to recompute when hooks are enabled, and whether to disable mcode because hooks are active. (set_vm_trace_level): New helper. (invoke_hook): Take hook to invoke by value. (DEFINE_INVOKE_HOOK): Refactor to use named hooks. (scm_i_vm_prepare_stack): Init named hooks. (VM_ADD_HOOK, VM_REMOVE_HOOK): Refactor to use named hooks, and also recompute global disable_mcode flag. (scm_set_vm_trace_level_x, scm_c_set_vm_engine_x): Use internal helper. Andy Wingo2018-09-143-87/+116
* Micro-optimization of scm_vm placement in scm_thread•••* libguile/threads.h (struct scm_thread): Move the embedded "struct scm_vm" earlier in the scm_thread. Since the VM (and the JIT) access VM data (SP, FP, etc) through the thread pointer, this allows more accesses to be encoded in shorter instruction sequences. Andy Wingo2018-09-141-3/+3
* Remove hook intrinsics: hooks are just for the VM•••* libguile/intrinsics.h (SCM_FOR_ALL_VM_INTRINSICS): Remove VM hook intrinsics, now that we're going to rely on the interpreter for stepping and breakpoints. * libguile/jit.c (struct scm_jit_state): Remove "hooks_enabled" member, now that we won't JIT. Remove all code related to calling hooks. * libguile/vm-engine.c (RUN_HOOK): Call hooks directly instead of through intrinsics. Use precise per-hook enable flags. * libguile/vm.c (DEFINE_INVOKE_HOOK): New helper. Use to define the hook invokers. Andy Wingo2018-09-144-73/+26