[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] GNU Guile branch, wip-rtl-may-2013, created. v2.1.0-73-g
From: |
Andy Wingo |
Subject: |
[Guile-commits] GNU Guile branch, wip-rtl-may-2013, created. v2.1.0-73-g6b5679e |
Date: |
Fri, 17 May 2013 21:56:03 +0000 |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Guile".
http://git.savannah.gnu.org/cgit/guile.git/commit/?id=6b5679e39a65f38e025c9eab58faf3f45cf0e374
The branch, wip-rtl-may-2013 has been created
at 6b5679e39a65f38e025c9eab58faf3f45cf0e374 (commit)
- Log -----------------------------------------------------------------
commit 6b5679e39a65f38e025c9eab58faf3f45cf0e374
Author: Andy Wingo <address@hidden>
Date: Fri May 17 22:10:16 2013 +0200
procedure-properties for RTL functions
* module/system/vm/assembler.scm (link-procprops, link-objects): Arrange
to write procedure property links out to a separate section.
* libguile/procprop.c (scm_procedure_properties):
* libguile/programs.h:
* libguile/programs.c (scm_i_rtl_program_properties):
* module/system/vm/debug.scm (find-program-properties): Wire up
procedure-properties for RTL procedures. Yeah! Fistpumps! :)
* module/system/vm/debug.scm (find-program-debug-info): Return #f if the
string is "", as it is if we don't have a name. Perhaps
elf-symbol-name should return #f in that case...
(find-program-docstring): Bugfix: increment by docstr-len.
* test-suite/tests/rtl.test: Add some tests.
commit 3bfb859e9fd08f168062985c870f2d424bc114cf
Author: Andy Wingo <address@hidden>
Date: Thu May 16 23:38:29 2013 +0200
procedure-documentation works on RTL procedures
* libguile/procprop.h:
* libguile/procprop.c (scm_procedure_documentation): Move here from
procs.c, and to make the logic more similar to that of procedure-name,
which allows RTL programs to dispatch to rtl-program-documentation.
* libguile/programs.c (scm_i_rtl_program_documentation):
* libguile/programs.h:
* module/system/vm/program.scm (rtl-program-documentation): New
plumbing.
* module/system/vm/debug.scm (find-program-docstring): New interface to
grovel ELF for a docstring.
commit 2bb1ab70e29c7d74b596cc7c36d622de681f996c
Author: Andy Wingo <address@hidden>
Date: Thu May 16 23:35:35 2013 +0200
add rtl arity tests
* test-suite/tests/rtl.test ("simply procedure arity"): Add tests that
arities make it all the way to cold ELF and back to warm Guile.
commit 23e20c4ef6ad2bc0214f6d0c473256f741c4f399
Author: Andy Wingo <address@hidden>
Date: Thu May 16 23:32:09 2013 +0200
add procedure name test
* module/system/vm/debug.scm (find-program-debug-info): Load procedure
names as symbols.
* test-suite/tests/rtl.test ("procedure name"): Add test.
commit 2dca054650731e6de1b9a5e397c7bd681be1813d
Author: Andy Wingo <address@hidden>
Date: Thu May 16 22:30:51 2013 +0200
Write docstrings into RTL ELF images
* module/system/vm/assembler.scm (link-docstrs): Write docstrings.
(link-objects): Link docstrings into the ELF.
commit 1b38955510fb5a4669d00f80042882887c6302ef
Author: Andy Wingo <address@hidden>
Date: Thu May 16 21:15:51 2013 +0200
find-program-arities handles case-lambda appropriately
* module/system/vm/debug.scm (read-sub-arities, find-program-arities):
Handle case-lambda.
(program-minimum-arity): Fix a bunch of bugs!
commit 793d210958308a2373acfba462b4b77a8a48af02
Author: Andy Wingo <address@hidden>
Date: Thu May 16 20:58:54 2013 +0200
Wire up ability to print RTL program arities
* libguile/procprop.c (scm_i_procedure_arity): Allow RTL programs to
dispatch to scm_i_program_arity.
* libguile/programs.c (scm_i_program_print): Refactor reference to
write-program.
(scm_i_rtl_program_minimum_arity): New procedure, dispatches to
Scheme.
(scm_i_program_arity): Dispatch to scm_i_rtl_program_minimum_arity if
appropriate.
* module/system/vm/debug.scm (program-minimum-arity): New export.
* module/system/vm/program.scm (rtl-program-minimum-arity): New internal
function.
(program-arguments-alists): New helper, implemented also for RTL
procedures.
(write-program): Refactor a bit, and call program-arguments-alists.
commit dbe241fcce7b6b411755ed54dad400ba5f070dd0
Author: Andy Wingo <address@hidden>
Date: Thu May 16 20:28:19 2013 +0200
Fix circular module dependencies
I don't think this actually caused me problems (how does that work?) but
it seems a good thing to fix.
* module/system/vm/debug.scm: Don't import (system vm program). Adapt
procedures to always expect an addr, not a program.
* module/system/vm/program.scm (rtl-program-name): Pass rtl program addr
directly.
commit 9eb1082917db07fcf460c0a9b94d4b62421cd048
Author: Andy Wingo <address@hidden>
Date: Thu May 16 18:56:22 2013 +0200
(system vm debug) can read arity information
* module/system/vm/assembler.scm (write-arity-headers): Fill in the
prefix.
* module/system/vm/debug.scm (<arity>): New object, for reading
arities. Unlike <arity> in the assembler, this one only holds on to a
couple of pointers, and doesn't even load in argument names. Unlike
the arity lists in (system vm program), it can load in names. Very
early days but it does seem to work.
(find-program-arities, arity-arguments-alist): New higher-level
interfaces.
commit 908aa266c4335807f804a789633b79610a0565e8
Author: Andy Wingo <address@hidden>
Date: Thu May 16 17:49:39 2013 +0200
remove arity nlocals and alternate fields
* module/system/vm/assembler.scm (<arity>): Remove nlocals and alternate
fields, as they aren't used. Adapt constructor call.
commit 018b17b0d7004cc03b7760a471dc7ab91930639b
Author: Andy Wingo <address@hidden>
Date: Thu May 16 14:06:10 2013 +0200
RTL assembler writes arities information into separate section.
* module/system/vm/assembler.scm: Write arities into a .guile.arities
section and associated .guile.arities.strtab.
commit 6f6fa2f9e5625264a7dc24bc83f7f3574dc25a50
Author: Andy Wingo <address@hidden>
Date: Tue May 14 11:18:05 2013 +0200
Beginnings of tracking of procedure arities in assembler
* module/system/vm/assembler.scm (<meta>, <arity>): Assembler now tracks
arities of a function.
(begin-standard-arity, begin-opt-arity, begin-kw-arity, end-arity):
New macro-assemblers.
* test-suite/tests/rtl.test: Adapt all tests to use begin-standard-arity
and end-arity.
commit c8c72d779ce244473edfa7917ac1dc5badd24f0b
Author: Andy Wingo <address@hidden>
Date: Tue May 14 10:33:43 2013 +0200
add procedure prelude macro-instructions
* module/system/vm/assembler.scm (pack-flags): New helper.
(standard-prelude, opt-prelude, kw-prelude): New macro-instructions.
* test-suite/tests/rtl.test: Update tests to use standard-prelude.
commit 0dc7dc27fdbb0079f9d36336965f85231b5bcb42
Author: Andy Wingo <address@hidden>
Date: Tue May 14 10:25:38 2013 +0200
begin-program takes properties alist
* module/system/vm/assembler.scm (check): New helper macro to check
argument types.
(<meta>): Add properties field. Rename name field to "label" to
indicate that it should be unique.
(make-meta, meta-name): New helpers.
(begin-program): Take additional properties argument.
(emit-init-constants): Adapt to begin-program change.
(link-symtab): Allow for anonymous procedures.
* test-suite/tests/rtl.test: Adapt tests.
commit 7e1770fcf1e6cc1d72e02d22f558fdd44a909ed1
Author: Andy Wingo <address@hidden>
Date: Tue May 14 10:17:07 2013 +0200
"Flag" operands represented with booleans
* libguile/instructions.c (FOR_EACH_INSTRUCTION_WORD_TYPE): Change the
U1_ word types to be B1_ instead, indicating that the Scheme
representation of that operand component should be a boolean.
(br-if-true, br-if-null, br-if-nil, br-if-pair, br-if-struct)
(br-if-char, br-if-tc7, br-if-eq, br-if-eqv, br-if-equal): Update.
* module/system/vm/assembler.scm (assembler):
* module/system/vm/disassembler.scm (disassembler): Update.
commit 296ba392fde0b3c3e9eb68168beadb5157fe3206
Author: Andy Wingo <address@hidden>
Date: Tue May 14 09:48:34 2013 +0200
assembler refactor
* module/system/vm/assembler.scm (assembler, cache-current-module!)
(emit-text): Reset the asm-start after writing opcodes instead of
beforehand.
(reset-asm-start!): Use asm-pos helper.
commit 552110a1f239925bd481067dfd02fb5bc06d859a
Author: Andy Wingo <address@hidden>
Date: Tue May 14 09:32:02 2013 +0200
Add a DWARF comment.
* module/system/vm/dwarf.scm: Comment <dwarf-context>.
commit d14e903c59862cd4dab6a96fd8963387986f5276
Author: Andy Wingo <address@hidden>
Date: Tue May 14 09:31:37 2013 +0200
add assert-nargs-le RTL VM op
* libguile/vm-engine.c (assert-nargs-le): New VM op.
commit fe4589b54f9b116d589f35972e093a3de9c5e802
Author: Andy Wingo <address@hidden>
Date: Tue May 14 09:21:05 2013 +0200
remove nargs register from rtl vm
It used to be that we tried to pass the argument count in a register.
We might still do this when compiling natively, but in the VM, having an
additional piece of mutable state in the VM is an unneeded distraction
to GCC's register allocator. Also it's unneeded now that we update the
VM's stack pointer -- and it doesn't look like removing the stack
pointer entirely will be profitable.
* libguile/vm-engine.c (FRAME_LOCALS_COUNT): New helper, replaces use of
nargs. Adapt callers.
(subr-call, foreign-call, continuation-call): Remove nargs parameter.
(compose-continuation): Rename from partial-cont-call and remove nargs
parameter.
commit 36192fad0d6dffd29a8f7757f9491a85e477f67c
Author: Andy Wingo <address@hidden>
Date: Sun May 5 21:57:51 2013 +0200
add commentary to the DWARF module.
* module/system/vm/dwarf.scm: Add commentary.
commit 17bf887174a43b35c28e157f1db281ade964f05e
Author: Andy Wingo <address@hidden>
Date: Sun May 5 19:19:20 2013 +0200
`disassemble' REPL command works with RTL programs
* module/system/repl/command.scm (disassemble): Work with RTL programs.
commit 67759d2f98d7ca1aedb8e73ab6958ae9687c2767
Author: Andy Wingo <address@hidden>
Date: Sun May 5 18:35:56 2013 +0200
Fix program-debug-info-addr; remove FIXMEs in disassembler.scm
* module/system/vm/debug.scm (program-debug-info-offset): Rename from
program-debug-info-addr to reflect reality.
(program-debug-info-addr): New function.
* module/system/vm/disassembler.scm (disassembler): Remove FIXMEs.
(disassemble-program): Rely on the RTL program to print its name.
commit d273a31b957eeef14b1e68e93aec45e78449e125
Author: Andy Wingo <address@hidden>
Date: Sun May 5 18:26:53 2013 +0200
RTL programs print with their name
* libguile/print.c (iprin1): Use scm_i_program_print for RTL programs
too.
* libguile/procprop.c (scm_procedure_name): For RTL programs, call
scm_i_rtl_program_name if there is no override.
* libguile/programs.h:
* libguile/programs.c (scm_i_rtl_program_name): New helper, dispatches
to (system vm program).
(scm_i_program_print): For RTL programs, the fallback prints the code
pointer too.
* module/system/vm/program.scm (rtl-program-name): Use the debug info to
get an RTL program name.
(write-program): Work with RTL programs too.
commit ca1bc7ea9d5b24755365e01a7b8beeca565e0e7b
Author: Andy Wingo <address@hidden>
Date: Sun May 5 17:52:59 2013 +0200
move procedure-name and procedure-source to procprop.c
* libguile/procprop.h:
* libguile/procprop.c (scm_procedure_name, scm_procedure_source): Move
these functions here, from debug.[ch].
commit bf2321bfd43cbe49d481f1b3c40f26156375a3ae
Author: Andy Wingo <address@hidden>
Date: Sun May 5 16:54:55 2013 +0200
disassembler has more useful annotations
* module/system/vm/disassembler.scm (code-annotation): Provide useful
annotations for more instructions.
(disassemble-buffer): Take the debug context as an argument.
(unpack-scm): Rename from unpack-immediate.
* module/system/vm/debug.scm (debug-context-image, u32-offset->addr)
(program-debug-info-context, program-debug-info-addr): New exports.
(<program-debug-info>): Rename size field to addr.
commit f1de620f2ca81adca9f9d3cce5b8497cd81e5360
Author: Andy Wingo <address@hidden>
Date: Sun May 5 15:40:17 2013 +0200
add (system vm debug)
* module/Makefile.am:
* module/system/vm/debug.scm: New module, split out of the
disassembler.
* module/system/vm/disassembler.scm: Use the new module.
commit bc7e981d1f63c93ad6cabeb5a555c95612fb8632
Author: Andy Wingo <address@hidden>
Date: Sun May 5 14:37:05 2013 +0200
correct rtl instruction comment
* libguile/vm-engine.c (vm_engine): Correct make-array comment.
commit 424b2a5f27dbd072f5820c4da27a6c99ca8b7fd3
Author: Andy Wingo <address@hidden>
Date: Sun May 5 14:34:53 2013 +0200
disassembler prints labels and has better code annotations
* module/system/vm/disassembler.scm (disassembler): Decoding the
instruction syntax is not the right place to decode semantics.
Instead, compute-labels and code-annotation will build labels and
annotations.
(disassemble-one): Decode instructions with rest args.
(code-annotation, compute-labels): New helpers.
(print-info): Print labels if appropriate.
(disassemble-buffer): New helper.
(disassemble-program): Use disassemble-buffer.
commit 035baf41e24fb106e26af22ca30b36bc9c91f38a
Author: Andy Wingo <address@hidden>
Date: Wed May 1 23:24:21 2013 +0200
Better disassembly of signed values
* module/system/vm/disassembler.scm (unpack-s24, unpack-s32): New
helpers.
(disassembler): Use the new helpers.
commit d9da66f0d9442f7e0d1b50dac798f7e4df4fa4e4
Author: Andy Wingo <address@hidden>
Date: Wed May 1 22:45:19 2013 +0200
disassemble-program for rtl
* module/system/vm/assembler.scm:
* module/system/vm/disassembler.scm:
* module/system/vm/rtl.scm: Split rtl.scm into two modules: an assembler
and a disassembler. The disassembler works now. Fixed a couple bugs
related to symbol table creation.
* module/Makefile.am:
* test-suite/tests/rtl.test: Adapt.
commit 9a3b644be9b567c40b3a0bfe07c41554ad439f47
Author: Andy Wingo <address@hidden>
Date: Wed May 1 22:20:15 2013 +0200
fix linker bug
* module/system/vm/linker.scm (add-elf-objects): Fix bug in which
shentsize was specified as phentsize.
commit 76bbaf2fc0f28a187fc5127033ac259d427b6797
Author: Andy Wingo <address@hidden>
Date: Wed May 1 22:19:36 2013 +0200
export find-mapped-elf-image from (system vm objcode)
* module/system/vm/objcode.scm: Export find-mapped-elf-image.
commit 8a3e07c371538eefd066bb6d6d884a1d50782e0c
Author: Andy Wingo <address@hidden>
Date: Wed May 1 22:19:04 2013 +0200
add rtl program predicate and accessor to programs.c
* libguile/programs.c (scm_rtl_program_code): New procedure.
(scm_rtl_program_p): New procedure.
* module/system/vm/program.scm: Export the new functions.
commit fd899af33d84a1263f68c066c2bbb612cdba9606
Author: Andy Wingo <address@hidden>
Date: Wed May 1 22:17:51 2013 +0200
new helpers in elf.scm
* module/system/vm/elf.scm (elf-section-by-name): New helper.
(elf-symbol-table-len): New helper.
commit 825ca5201fa5584a8912d790ce9d0b9183e4756f
Author: Andy Wingo <address@hidden>
Date: Mon Apr 29 23:55:52 2013 +0200
replace mapped-elf-images with find-mapped-elf-image
* libguile/objcodes.c (scm_find_mapped_elf_image): Replace
mapped-elf-images with find-mapped-elf-image, which takes a pointer as
an argument.
commit 907e5d36940e457cf3f62e60b453252a4a9b24eb
Author: Andy Wingo <address@hidden>
Date: Sun Apr 28 14:42:01 2013 +0200
add (mapped-elf-images) procedure to (system vm objcode) module
* libguile/objcodes.c (register_elf, scm_mapped_elf_images): New
interfaces that keep a list of all ELF mappings. Exported to (but not
from) the (system vm objcode) module.
commit 96e97fb222a7abf5e655e4139ca828b8cc5c2cb0
Author: Andy Wingo <address@hidden>
Date: Sun Apr 28 14:23:20 2013 +0200
refactor and simplify ELF loader in objcodes.c
* libguile/objcodes.c (sniff_elf_alignment, alloc_aligned)
(copy_and_align_elf_data): New helpers for portably re-aligning ELF
data from read(2) or from a bytevector.
(load_thunk_from_memory): Simplify! Now there is only one procedure
that loads ELF, and it does less: it simply receives the whole image
in one array, hopefully from mmap.
(scm_load_thunk_from_file): Use new map_file_contents helper, and go
through load_thunk_from_memory.
(scm_load_thunk_from_memory): Pass load_thunk_from_memory a piece of
memory that it owns, and that is appropriately aligned.
commit 82dde214166de8a1d58d2f48c324978136cf7abe
Author: Andy Wingo <address@hidden>
Date: Sun Apr 28 09:31:28 2013 +0200
refactor linker to lay out ELF files and memory in the same way
* module/system/vm/linker.scm (make-linker-object):
(linker-object-section-symbol):
(linker-object-symbols*): Create a symbol to the start of a linker
object. Hide it from the external linker-object-symbols* accessor.
(segment-kind, count-segments): Sections without SHF_ALLOC don't get
segments.
(collate-objects-into-segments): Allow for #f segment types. If two
sections have the same type and flags, leave them in the same order.
(align): Allow for 0 alignment.
(add-elf-objects): New helper: puts the ELF data structures (header,
segment table, and section table) in sections of their own. This
lends a nice clarity and conceptual unity to the linker.
(relocate-section-header, alloc-objects): Lay out segments with
congruent, contiguous addresses, so that we can just mmap the file and
if debugging sections that are not in segments are present, they can
be lazily paged in if needed by the kernel's VM system.
(link-elf): Refactor to use the new interfaces.
commit 49460b177e6bf2b7cd301c3542d99122e96afac9
Author: Andy Wingo <address@hidden>
Date: Sun Apr 28 07:51:42 2013 +0200
elf: add accessors for header members that might need relocation
* module/system/vm/elf.scm (elf-header-shoff-offset)
(elf-section-header-addr-offset, elf-section-header-offset-offset):
New accessors.
commit 4c5969aa9f0257e6d7901e107ffd63afe89aef31
Author: Andy Wingo <address@hidden>
Date: Sun Apr 28 09:11:34 2013 +0200
elf: fix make-elf-segment
* module/system/vm/elf.scm (make-elf-segment): Fix argument order
error.
commit 21ce20e5f809c021567ff0c86243b1e3a35209c3
Author: Andy Wingo <address@hidden>
Date: Sun Apr 21 23:13:13 2013 +0200
assembling RTL writes a symbol table
* module/system/vm/elf.scm (make-elf-symbol*): Add constructor; export
as make-elf-symbol.
(elf-symbol-len): New export.
(write-elf32-symbol, write-elf64-symbol): New helpers.
(write-elf-symbol): New export.
* module/system/vm/rtl.scm (link-symtab): New function.
(link-objects): Write a symbol table into the resulting ELF.
commit 40c122fe9f45267fd8258b98fef961fee4753ebf
Author: Andy Wingo <address@hidden>
Date: Sun Apr 21 16:06:36 2013 +0200
ELF refactor and consequent linker simplifications
* module/system/vm/elf.scm: Add commentary.
(make-elf): Add a constructor similar to make-elf-segment and
make-elf-section.
(write-elf32-header, write-elf64-header, write-elf-header): Take an
<elf> instead of all the fields separately.
(<elf-segment>, <elf-section>): Add "index" property. Adapt
constructors accordingly.
* module/system/vm/rtl.scm (<asm>, next-section-number!, make-object):
* module/language/objcode/elf.scm (bytecode->elf): Arrange to set the
section indexes when creating ELF sections.
* module/system/vm/linker.scm (alloc-segment, relocate-section-header):
Arrange to set segment and section indexes.
(find-shstrndx): New helper, replaces compute-sections-by-name. Now
that sections know their indexes, this is easier.
(allocate-elf, write-elf): New helpers, factored out of link-elf.
Easier now that sections have indexes.
(link-elf): Simplify.
commit 320f390856fc155f5efc343aac2b9ad9e6fe4f3c
Author: Andy Wingo <address@hidden>
Date: Sun Apr 21 13:42:58 2013 +0200
linker: signal error on duplicate symbol definition
* module/system/vm/linker.scm (add-symbols): Signal an error if there is
a duplicate symbol.
commit e770d89c839f321efc819ac925f6807623cbbceb
Author: Andy Wingo <address@hidden>
Date: Sun Apr 21 12:24:49 2013 +0200
add linker commentary
* module/system/vm/linker.scm: Add commentary.
commit e82ce87fb95ff3c26f5906b68b732afbe71ff4fd
Author: Andy Wingo <address@hidden>
Date: Sun Apr 21 16:11:30 2013 +0200
fix rtl linking failure due to name collision
* module/system/vm/rtl.scm (link-shstrtab): Rename from
link-string-table.
(link-objects): Adapt caller.
commit db6e47794757ce055ea80c35f027cd9928868b56
Author: Andy Wingo <address@hidden>
Date: Wed Apr 17 23:07:04 2013 +0200
split linker out of elf module
* module/Makefile.am:
* module/system/vm/linker.scm: New file, split out of (system vm elf).
* module/system/vm/elf.scm: Remove linking capabilities.
* module/system/vm/rtl.scm:
* module/language/objcode/elf.scm: Adapt callers to use (system vm
linker).
commit 44e5b0b6764b9eb4300e27c6d41065783504772e
Author: Andy Wingo <address@hidden>
Date: Thu Apr 11 23:38:33 2013 +0200
update RTL TODO
* module/system/vm/rtl.scm: Update TODO.
commit bf70050bec92f8e3e24bc21b6d399618a4d06521
Author: Andy Wingo <address@hidden>
Date: Wed Apr 10 22:37:19 2013 +0200
add RTL TODO list
* module/system/vm/rtl.scm: Add TODO list.
commit 49f90dd01649b356014fed0bdc3d9d5028a0f218
Author: Andy Wingo <address@hidden>
Date: Thu Jan 24 22:36:22 2013 +0100
add cached-module-ref, cached-module-set! macro-instructions
* module/system/vm/rtl.scm (cached-module-ref, cached-module-set!): New
macro-assemblers.
* test-suite/tests/rtl.test ("cached-module-ref", "cached-module-set!"):
Add tests.
commit 70c4e6787b19fbf130706f90614a164780c70feb
Author: Andy Wingo <address@hidden>
Date: Thu Jan 24 22:35:14 2013 +0100
fix chunking bug in rtl assembler
* module/system/vm/rtl.scm (link-text-object): Fix bug in which previous
chunks were written in the wrong order.
commit a8d4671006ad6627ef92194054c51e28183f791c
Author: Andy Wingo <address@hidden>
Date: Thu Jan 24 22:03:50 2013 +0100
add end-program marks
* module/system/vm/rtl.scm (emit-init-constants):
* test-suite/tests/rtl.test ("call", "tail-call")
("cached-toplevel-ref", "cached-toplevel-set!"): Add missing
`end-program' meta marks.
commit a24e55fdd0ecc4ee3a31b8236d6fa66b868c6d04
Author: Andy Wingo <address@hidden>
Date: Thu Jan 24 21:19:55 2013 +0100
rename cache-current-module! macro op
* module/system/vm/rtl.scm (cache-current-module!): Rename from
save-current-module.
* test-suite/tests/rtl.test ("cached-toplevel-ref")
("cached-toplevel-set!"): Adapt.
commit 41d7621ab541a7977e15401fcbc441c624b0eff6
Author: Andy Wingo <address@hidden>
Date: Thu Jan 24 17:51:35 2013 +0100
add toplevel-set! and module-set! instructions
* libguile/vm-engine.c (return/values): The argument is U24, not R24.
(toplevel-set!, module-set!): New instructions. It seems to be the
right balance between minimizing runtime complexity, compile-time
complexity, and having a decent caching strategy.
Renumber ops.
* module/system/vm/rtl.scm (cached-toplevel-ref): Rename from
cached-toplevel.
(cached-toplevel-set!): New helper macro assembler.
* test-suite/tests/rtl.test ("cached-toplevel-set!"): Add test.
commit be75c01efe6f11015db65c5aeb0a71681b496100
Author: Andy Wingo <address@hidden>
Date: Thu Jan 24 13:21:11 2013 +0100
bugfix in (system vm trace)
* module/system/vm/trace.scm (print-return): Bugfix.
commit e6f107f5ae5be11b619762b8e008313f51a33f90
Author: Andy Wingo <address@hidden>
Date: Thu Jan 24 13:20:54 2013 +0100
add rtl infrastructure for doing toplevel refs
* libguile/vm-engine.c (current-module): New RTL VM instruction.
Relabel the rest.
* module/system/vm/rtl.scm (<cache-cell>): New type of constant.
(intern-constant): Add <cache-cell> case.
(emit-cache-cell, emit-module-cache-cell): New helpers.
(save-current-module, cached-toplevel): New macro-assemblers.
(link-data): Init a <cache-cell> to #f.
* test-suite/tests/rtl.test ("cached-toplevel"): Add test case.
commit e865524c6a37fcfd01f10290741a85dffd16c83f
Author: Noah Lavine <address@hidden>
Date: Wed Jan 23 17:13:15 2013 +0100
add rtl tests for call and tail-call
* test-suite/tests/rtl.test: Add RTL tests.
commit 175b2c42b18bf510377df4d42c8ccfa629d54aee
Author: Andy Wingo <address@hidden>
Date: Tue Jan 22 19:12:49 2013 +0100
fix interruptability of some loops
* libguile/vm-engine.c (BR_UNARY, BR_BINARY, BR_ARITHMETIC): Handle
interrupts if we branch backwards.
commit a000b510a9c4b6943930b1e30ad22513671981c1
Author: Andy Wingo <address@hidden>
Date: Fri Aug 3 15:46:59 2012 +0200
remove return_loc, instead put MV returns on the stack
* libguile/frames.h: Update description of how RTL frames work. The
details are commented.
(SCM_FRAME_RTL_MV_RETURN_ADDRESS):
(SCM_FRAME_SET_RTL_MV_RETURN_ADDRESS): New macros.
* libguile/vm.c (rtl_apply, rtl_values): New static RTL programs.
* libguile/vm.c (vm_dispatch_hook):
* libguile/vm-engine.c (RUN_HOOK): Change hook dispatch mechanism to not
have the rest_p arg.
* libguile/vm-engine.c (PUSH_CONTINUATION_HOOK,
ABORT_CONTINUATION_HOOK): Don't take a rest_p.
(vm_engine, rtl_vm_engine):
* libguile/vm-i-system.c: Adapt {ABORT,POP}_CONTINUATION_HOOK
invocations to not have a rest_p.
* libguile/vm-engine.c (rtl_vm_engine): Adapt to new RTL stack frame
format.
commit bed8e4bcfe1ea4665e0bc19a20d7e4c3523111f0
Author: Andy Wingo <address@hidden>
Date: Thu Jun 28 20:42:07 2012 +0200
beginnings of procedure metadata tracking
* module/system/vm/rtl.scm (<meta>, <asm>): Add procedure meta-data
bookkeeping to <asm>.
(assembler): Move reset-asm-start! invocation to emit-text.
(begin-program): No more nlocals arg. Open a new asm-meta.
(end-program): New macro instruction, closes an asm-meta.
(emit-init-constants): Adapt begin-program invocation.
* test-suite/tests/rtl.test: Adapt begin-program invocations.
commit 9c18030fb0974c618c0a24a98b3cabae206387c9
Author: Andy Wingo <address@hidden>
Date: Thu Jun 28 19:11:41 2012 +0200
remove initial nlocals and meta words on rtl programs
* libguile/programs.h: RTL programs no longer have initial nlocals /
meta words.
* libguile/vm-engine.c:
* libguile/vm.c:
* module/system/vm/rtl.scm: Adapt.
commit ac86a0da65fa06fce462301a20c94fbba360f5fb
Author: Andy Wingo <address@hidden>
Date: Thu Jun 28 17:23:50 2012 +0200
the rtl vm updates vp->sp as appropriate
* libguile/vm-engine.c (SYNC_ALL, CHECK_OVERFLOW, ALLOC_FRAME)
(RESET_FRAME, RESTORE_FRAME): Rework to update vp->sp on entering and
leaving procedures.
(RETURN_ONE_VALUE, RETURN_VALUE_LIST): Adapt to use RESTORE_FRAME.
(rtl_vm_engine): Assume that non-local exits push on a `values' frame
of their own, and thus that we know how many values there are. Adapt
prelude to save space for the function's return values. Adapt various
instructions to use RESTORE_FRAME / RESET_FRAME / ALLOC_FRAME in order
to correctly catch the cases in which stack expansion would be
possible.
commit 1102f1da7bf47fbee9671a40e6d947fcece327d3
Author: Andy Wingo <address@hidden>
Date: Sat Jun 9 18:26:27 2012 +0200
add DWARF parser
* module/Makefile.am:
* module/system/vm/dwarf.scm: New module, a DWARF parser.
commit c10992a55450f4ea60bd54bf4b205ca9495ecf26
Author: Andy Wingo <address@hidden>
Date: Mon May 28 12:37:56 2012 +0200
add (system vm rtl)
* module/system/vm/rtl.scm: New module, implementing an assembler and
disassembler for RTL. Currently the output format is ELF, though we
will provide a version with less boilerplate for use in "online"
compilations.
commit a580a843111a5785f7936a8198eebfb1ce854b8c
Author: Andy Wingo <address@hidden>
Date: Mon May 28 12:22:31 2012 +0200
add new rtl vm
* libguile/vm-engine.c (rtl_vm_engine): Add new VM.
(vm_engine): Add support for calling RTL programs.
* libguile/tags.h (scm_tc7_rtl_program): New type for procedures that
run on the new VM.
* libguile/evalext.c (scm_self_evaluating_p):
* libguile/goops.c (scm_class_of):
* libguile/print.c (iprin1):
* libguile/procprop.c (scm_i_procedure_arity):
* libguile/procs.c (scm_procedure_p): Add hooks for the new tc7.
* libguile/programs.h:
* libguile/programs.c (scm_make_rtl_program, scm_i_rtl_program_print):
* module/system/vm/program.scm: Add constructors for the new "RTL
programs".
* libguile/vm.c (rtl_boot_continuation): Define a boot program.
* libguile/frames.c (scm_frame_num_locals): Adapt for frames of RTL
programs.
* libguile/frames.h: Add support for RTL frames, in which we abuse the
MVRA.
* libguile/Makefile.am: Add rules to generate vm-operations.h.
* .gitignore: Ignore vm-operations.h.
* module/system/vm/instruction.scm:
* libguile/instructions.c:
* libguile/instructions.h: Use vm-operations.h to define enumerated
values for the new RTL opcodes. Define some helper macros to pack and
unpack 32-bit instruction words.
(rtl-instruction-list): New function, exported by (system vm
instruction).
* libguile/objcodes.c: Wire up the bits needed to detect the new RTL
bytecode and load it, as appropriate.
commit ae10f67435c9cb513e0fa2afa83b00380a6ed793
Author: Andy Wingo <address@hidden>
Date: Mon May 28 12:25:43 2012 +0200
refactor to resolve_variable
* libguile/vm.c (resolve_variable): Slight refactor.
commit 1b891621c7a18c658a03eba0213845cbdb50ffee
Author: Andy Wingo <address@hidden>
Date: Mon May 28 12:25:13 2012 +0200
slight change to vm_error_wrong_num_args
* libguile/vm.c (vm_error_wrong_num_args): Take the number of arguments
directly.
* libguile/vm-i-system.c (assert_nargs_ee, assert_nargs_ge)
(assert_nargs_ee_locals): Adapt to vm_error_wrong_num_args change.
commit 511e94c56fbef422ed8ea4984461a06dbb676d0c
Author: Andy Wingo <address@hidden>
Date: Thu May 17 18:35:05 2012 +0200
cpp hygiene in the vm
* libguile/vm-engine.c:
* libguile/vm-i-scheme.c:
* libguile/vm-i-system.c: CPP hygiene: the code that #defines, #undefs.
Makes things cleaner given the multiple inclusion dance we do.
commit a2a2bf7e2c0d840bf84d1edc8e81fe30df795f6b
Author: Andy Wingo <address@hidden>
Date: Fri May 18 12:23:58 2012 +0200
pop-continuation abort-continuation hooks pass return vals directly
* doc/ref/api-debug.texi (VM Hooks): Update documentation.
* libguile/vm-engine.c: Rework the hook machinery so that they can
receive an arbitrary number of arguments. The return and abort hooks
will pass the values that they return to their continuations.
(vm_engine): Adapt to ABORT_CONTINUATION_HOOK change.
* libguile/vm-i-system.c (return, return/values): Adapt to
POP_CONTINUATION_HOOK change.
* module/system/vm/frame.scm (frame-return-values): Remove. The
pop-continuation-hook will pass the values directly.
* module/system/vm/trace.scm (print-return):
(trace-calls-to-procedure):
(trace-calls-in-procedure): Update to receive return values directly.
* module/system/vm/traps.scm (trap-in-procedure)
(trap-in-dynamic-extent): Ignore return values.
(trap-frame-finish, trap-calls-in-dynamic-extent)
(trap-calls-to-procedure): Pass return values to the handlers.
commit ed094734e59d1b2bbf30f2ab17b21377b5dd15fe
Author: Andy Wingo <address@hidden>
Date: Fri May 18 12:21:33 2012 +0200
vm-engine: remove register assignments
* libguile/vm-engine.c: Remove the register assignments inherited from
the 1990s. GCC does seem to allocate reasonably on systems with
enough registers (e.g. x86-64), and on system with too few (x86-32) we
disabled manual allocation. Anyway this code was never tested, so
it's better to leave the compiler to do its own thing, until proven
otherwise. Also in the RTL VM there is no SP, so things are a bit
different there.
commit 8ba3df917b47c33161de1c225757636ddb6ba7ba
Author: Andy Wingo <address@hidden>
Date: Fri May 18 12:21:08 2012 +0200
remove some configurability in vm-engine
* libguile/vm-engine.c: Remove the ability for the VM to check object
access, free variable access, and the ip. They were off by default.
Since they will be different in the RTL VM, their presence is just
making things confusing.
commit c072e1bc8bed5f2dba94a1ee640a875d49e2febb
Author: Andy Wingo <address@hidden>
Date: Fri May 18 11:57:51 2012 +0200
minor vm-engine cleanups
* libguile/vm-engine.c: Some very minor cleanups: indenting, use of
VM_ASSERT, commenting.
commit 099eb548ad27bb8b54adaf1116e72c45130122ee
Author: Andy Wingo <address@hidden>
Date: Thu May 17 11:39:35 2012 +0200
remove CONS macro in VM; use scm_cons instead
* libguile/vm-engine.c (CONS): Remove. Callers should use scm_cons
instead, syncing registers beforehand.
(POP_LIST): Adapt, only synchronizing once.
(POP_LIST_MARK, POP_CONS_MARK): Remove unused macros.
* libguile/vm-i-scheme.c (cons):
* libguile/vm-i-system.c (push-rest, bind-rest): Adapt.
commit 60827e5df16151f2ca77b2dfd4617e23604da6f1
Author: Andy Wingo <address@hidden>
Date: Fri May 18 11:52:12 2012 +0200
inline vm-engine.h into vm-engine.c
* libguile/vm-engine.h:
* libguile/vm-engine.c: Fold vm-engine.h into vm-engine.c.
* libguile/Makefile.am: Adapt.
-----------------------------------------------------------------------
hooks/post-receive
--
GNU Guile
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Guile-commits] GNU Guile branch, wip-rtl-may-2013, created. v2.1.0-73-g6b5679e,
Andy Wingo <=