| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
These were found with:
make GUILE_WARNINGS='-W1 -Wunused-module'
* module/ice-9/copy-tree.scm:
* module/ice-9/eval-string.scm:
* module/ice-9/getopt-long.scm:
* module/ice-9/poll.scm:
* module/ice-9/popen.scm:
* module/ice-9/sandbox.scm:
* module/ice-9/threads.scm:
* module/sxml/apply-templates.scm:
* module/sxml/simple.scm:
* module/system/base/types.scm:
* module/system/repl/command.scm:
* module/system/repl/common.scm:
* module/system/repl/coop-server.scm:
* module/system/repl/debug.scm:
* module/system/repl/error-handling.scm:
* module/system/repl/repl.scm:
* module/system/repl/server.scm:
* module/system/vm/assembler.scm:
* module/system/vm/disassembler.scm:
* module/system/vm/dwarf.scm:
* module/system/vm/elf.scm:
* module/system/vm/frame.scm:
* module/system/vm/inspect.scm:
* module/system/vm/linker.scm:
* module/system/vm/program.scm:
* module/system/vm/trace.scm:
* module/system/vm/trap-state.scm:
* module/system/vm/traps.scm:
* module/system/xref.scm:
* module/texinfo/indexing.scm:
* module/texinfo/plain-text.scm:
* module/texinfo/reflection.scm:
* module/texinfo/string-utils.scm:
* module/web/client.scm:
* module/web/http.scm:
* module/web/request.scm:
* module/web/response.scm: Remove imports of unused modules.
|
|
|
|
|
|
|
|
|
|
|
| |
* module/language/tree-il/analyze.scm (<module-info>): New record type.
(unused-module-analysis): New variable.
(make-unused-module-analysis): New analysis.
(make-analyzer): Add it.
* module/system/base/message.scm (%warning-types): Add 'unused-module'.
* test-suite/tests/tree-il.test (%opts-w-unused-module): New variable.
("warnings")["unused-module"]: New test prefix.
* NEWS: Update.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This reduces the amount of memory that needs to be allocated while
writing the ELF file to disk.
Note: We're abusing #:page-aligned? in 'link-elf' to choose whether to
return a bytevector or a procedure.
* module/system/vm/linker.scm (process-reloc): Subtract SECTION-OFFSET
when writing to BV.
(write-linker-object): Pass BV directly to the linker object writer.
(link-elf): When PAGE-ALIGNED? is false, call 'bytevector-slice' from
here. When it is true, return a procedure that takes a port and writes
to it, without having to allocate a bytevector for the whole ELF
container.
* module/language/bytecode/spec.scm (bytecode->value): Handle X being a
procedure instead of a bytevector.
(bytecode) <#:printer>: Likewise.
* test-suite/tests/linker.test (link-elf-with-one-main-section): Pass
#:page-aligned? #f.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* module/system/vm/linker.scm (write-linker-object): Pass the
'linker-object-writer' a single argument.
(string-table-writer, add-elf-objects): Adjust writers accordingly.
(string-table-writer):
(add-elf-objects):
* module/system/vm/assembler.scm (link-data, link-text-object)
(link-frame-maps, link-dynamic-section)
(link-symtab, link-arities, link-docstrs)
(link-procprops, link-debug): Likewise.
* test-suite/tests/linker.test (link-elf-with-one-main-section):
Likewise.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This reduces the amount of memory used during linking and reduces the
number of copies to be done between bytevectors.
* module/system/vm/linker.scm (<linker-object>): Remove 'bv' field and
add 'size' and 'writer'.
(make-linker-object): Adjust accordingly.
(string-table-size): New procedure.
(link-string-table!): Remove.
(string-table-writer): New procedure.
(allocate-segment): Adjust 'make-linker-object' call.
(find-shstrndx): Call the 'linker-object-writer' of O.
(add-elf-objects): Adjust 'make-linker-object' call. Remove
'make-bytevector' allocations and move serialization to lazy 'writer'
procedures. Define 'segments' and 'add-header-segment!'. Return the
latter as the first value.
* module/system/vm/assembler.scm (make-object): Remove 'bv' parameter
and add 'size' and 'writer'.
(link-data): Remove 'make-bytevector' call and move serialization to
a lazy 'writer' procedure.
(link-text-object): Likewise.
(link-frame-maps): Likewise.
(link-dynamic-section): Likewise.
(link-shstrtab): Likewise.
(link-symtab): Likewise.
(link-arities): Likewise, and remove 'bytevector-append'.
(link-docstrs): Likewise.
(link-procprops): Likewise.
(link-debug): Likewise, and define 'copy-writer'.
* test-suite/tests/linker.test (link-elf-with-one-main-section): Adjust
accordingly.
|
|
|
|
|
|
|
| |
* module/system/vm/linker.scm (add-elf-objects)[write-and-reloc]: Split
into...
[compute-reloc, write-object-elf-header!]: ... this.
Adjust accordingly.
|
|
|
|
|
| |
* module/system/vm/assembler.scm (link-docstrs): Define
'write-docstrings!' and use it.
|
|
|
|
|
| |
* module/system/vm/assembler.scm (link-frame-maps)[make-frame-maps]:
Define 'write!' and use it.
|
|
|
|
|
| |
* module/system/vm/assembler.scm (link-procprops): Define
'write-procprops!' and use it.
|
|
|
|
|
| |
* module/system/vm/assembler.scm (link-dynamic-section): Define 'relocs'
once for all. Define 'write!' and use it.
|
|
|
|
|
| |
* module/system/vm/assembler.scm (link-symtab): Define 'names' and
'write-symbols!'. Use it.
|
|
|
|
|
|
|
|
| |
* module/system/vm/assembler.scm (process-relocs): Remove 'buf'
parameter and turn into a pure function.
(patch-relocs!): New procedure. Perform the side effects previously
done in 'process-relocs'.
(link-text-object): Adjust accordingly.
|
|
|
|
|
|
| |
* module/ice-9/command-line.scm (version-etc):
* module/scripts/compile.scm (show-version):
* module/system/repl/common.scm (*version*): Bump to 2023.
|
|
|
|
|
|
| |
* module/system/base/target.scm (cpu-endianness): Add case for "Loongarch" variants
Signed-off-by: Zhang Ning <zhangn1985@outlook.com>
|
|
|
|
|
|
|
| |
Workaround for <https://bugs.gnu.org/57948>.
* module/system/vm/frame.scm (frame-call-representation): Treat a
binding as "unspecified" if its slot exceeds 'frame-num-locals'.
|
|
|
|
|
|
|
| |
* module/system/vm/disassembler.scm (code-annotation)[intrinsic-name]:
New procedure.
Add clauses for intrinsics.
* NEWS: Update.
|
|
|
|
|
|
|
|
| |
Locations are stored in tree-il records in "source vector" form, but
`location-string' was rendering these as <unknown-location>.
* module/system/base/message.scm (location-string): Support locations
passed as a file/line/column vector.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The code coverage function `coverage-data->lcov` has a documented
`modules` argument, however that was missing from the source. I have
added it so when supplied it only converts the coverage data for the
supplied modules. If not supplied it defaults the old behavour of
including all the modules currently loaded.
* module/system/vm/coverage.scm (coverage-data->lcov): Add #:modules
parameter and honor it.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
NetBSD and pkgsrc have been using an empty vendor string since the
mid-'90s, such as x86_64--netbsd. pkgsrc has been carrying around a
workaround just the guile build for a long time. (Before that,
NetBSD omitted the vendor altogether, so if x86_64 existed then it
might have been `x86_64-netbsd', but that caused more problems.)
This change makes Guile accept an empty vendor string so workarounds
are no longer necessary.
* module/system/base/target.scm (validate-target): Allow empty vendor
string in GNU target triplets.
* test-suite/tests/cross-compilation.test ("cross-compilation"): Add
tests for "x86_64--netbsd".
Co-authored-by: Ludovic Courtès <ludo@gnu.org>
|
|
|
|
|
| |
* module/ice-9/command-line.scm (version-etc):
* module/system/repl/common.scm (*version*): Bump to 2022.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Avoiding systematic conversion from source vectors to property alists
saves 20% on the final heap size of a process doing:
(compile-file FILE #:optimization-level 1)
where FILE is large.
* module/language/tree-il.scm (tree-il-src/ensure-alist): New procedure
with setter. Export as 'tree-il-src'.
* module/ice-9/psyntax.scm (build-void, build-call)
(build-conditional, build-lexical-reference, build-lexical-assignment)
(build-global-reference, build-global-assignment)
(build-global-definition, build-simple-lambda, build-case-lambda)
(build-lambda-case, build-primcall, build-primref)
(build-data, build-sequence, build-let, build-named-let)
(build-letrec, expand-body): Remove (sourcev->alist src) calls.
* module/ice-9/psyntax-pp.scm: Regenerate.
* module/language/tree-il/analyze.scm (shadowed-toplevel-analysis): Use
'tree-il-src' instead of accessing the 'src' slot directly.
* module/system/vm/assembler.scm (link-debug): Adjust so PC can be
followed by a vector or an alist.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* libguile/strings.c (scm_i_make_symbol): Remove 'props' argument. Use
3 words instead of 'scm_double_cell'.
* libguile/strings.h: Adjust accordingly.
* libguile/symbols.c (scm_i_str2symbol, scm_i_str2uninterned_symbol):
Likewise.
(scm_symbol_fref, scm_symbol_pref, scm_symbol_fset_x,
scm_symbol_pset_x): Move to...
* libguile/deprecated.c: ... here. Rewrite in terms of object
properties.
(symbol_function_slot, symbol_property_slot): New variables.
* libguile/symbols.h (SCM_SYMBOL_FUNC, SCM_SET_SYMBOL_FUNC)
(SCM_SYMBOL_PROPS, SCM_SET_SYMBOL_PROPS)
(scm_symbol_fref, scm_symbol_pref, scm_symbol_fset_x)
(scm_symbol_pset_x): Move to...
* libguile/deprecated.h: ... here. Mark declarations as 'SCM_DEPRECATED'.
* module/system/base/types.scm (cell->object): Remove 'props' field for
%TC7-SYMBOL.
* doc/ref/api-data.texi (Symbol Props): Remove.
* NEWS: Update.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* configure.ac:
* Makefile.am (SUBDIRS): Replace bootstrap/ with stage0, stage1, and
stage2.
* am/bootstrap.am: Include all files and all rules.
* meta/build-env.in (GUILE_AUTO_COMPILE): Always turn off
auto-compilation. Take a GUILE_BOOTSTRAP_STAGE argument, which can be
stage0, stage1, stage2, or unset. Adapt the load-compiled path
accordingly.
* meta/uninstalled-env.in: Include .go files from stage2.
* module/Makefile.am: Rework to use boostrap.am.
* module/system/base/optimize.scm (available-optimizations): Punt the
inlinable-exports machinery to -O2.
* stage0/Makefile.am:
* stage1/Makefile.am:
* stage2/Makefile.am: New files.
|
|
|
|
|
|
|
| |
496f69dba2fdf1720b40349932fcdecd444107c3 introduced C99 complex types in
libguile/foreign.h and (system foreign). Since these types are provided
conditionally in foreign.h based on autoconf tests they need to be used
conditionally in (system foreign) based on their presence.
|
|
|
|
|
|
| |
* module/language/cps/optimize.scm (optimize-first-order-cps):
* module/system/base/optimize.scm (available-optimizations): Add
optimize-known-return-types at -O2.
|
|
|
|
|
|
|
|
|
|
| |
* libguile/foreign.h (SCM_FOREIGN_TYPE_COMPLEX_FLOAT,
SCM_FOREIGN_TYPE_COMPLEX_DOUBLE): New enums.
* module/system/foreign.scm (complex-float, complex-double): Export new types.
(make-c-struct, parse-c-struct): Support the new types.
* libguile/foreign.c (complex-float, complex-double): Define new types.
(alignof, sizeof, pack, unpack): Support the new types.
* test-suite/tests/foreign.test: Test.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix the following build failure on riscv32:
system/base/target.scm:132:16: In procedure triplet-pointer-size:
unknown CPU word size "riscv32"
Fixes:
- http://autobuild.buildroot.org/results/6705630c1484239ec8b73d57ebc2e2570fbfc8f8
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
|
|
|
|
|
| |
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
NB: closes https://debbugs.gnu.org/cgi/bugreport.cgi?bug=48816
|
|
|
|
|
|
|
|
|
| |
* module/system/repl/command.scm (*command-table*): Add optimize-cps /
optx.
(optimize-cps): Define meta-command.
* module/system/repl/common.scm (optimize*): New helper.
(repl-optimize): Use helper.
(repl-optimize-cps): New public function.
|
|
|
|
|
| |
* module/system/repl/command.scm: Autoload (system base compile),
(system vm disassembler), and (statprof).
|
|
|
|
|
|
|
| |
To avoid breaking ABI.
* libguile/arrays.h (SCM_I_ARRAY_DIM, scm_i_raw_array): As stated.
* module/system/vm/assembler.scm: As stated.
|
|
|
|
|
|
| |
* module/system/foreign-library.scm (system-library-extensions): fix
darwin host detection. darwin host types have "-darwin" but not
"-darwin-".
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This flag was set, but never used in Guile, and there was no documented
API to access it.
To check if an array is contiguous, use (array-contents <> #t).
* libguile/arrays.h (scm_i_raw_array): New function.
SCM_I_ARRAY_CONTIGUOUS, SCM_SET_ARRAY_CONTIGUOUS_FLAG,
SCM_CLR_ARRAY_CONTIGUOUS_FLAG, SCM_I_ARRAY_CONTP: Remove.
scm_t_array_dim: Declare here, not in array-handle.h.
SCM_I_ARRAY_NDIM: Shift by one bit since the contp flag isn't there
anymore.
* module/syste/vm/assembler.scm: Match removal of contp flag.
* libguile/arrays.c (scm_i_make_array): Reuse scm_i_raw_array.
(scm_i_ra_set_contp): Remove.
(scm_transpose_array): Don't set or clear the contp flag.
(scm_make_shared_array): Don't set or clear the contp flag.
(scm_make_typed_array): Don't set the contp flag.
* libguile/array-map.c (scm_i_array_rebase): Reuse scm_i_raw_array.
|
|
|
|
| |
Fixes #43102 and duplicate #48412.
|
|
|
|
|
|
|
|
|
|
|
| |
* module/language/tree-il/inlinable-exports.scm: New module.
* am/bootstrap.am:
* module/Makefile.am:
* module/language/tree-il/optimize.scm (make-optimizer):
* module/system/base/optimize.scm (available-optimizations): Wire up new
module.
* module/ice-9/boot-9.scm (module): Add inlinable-exports field.
(define-module*): Add #:inlinable-exports kwarg.
|
|
|
|
|
|
|
|
|
|
| |
* am/bootstrap.am (SOURCES):
* module/Makefile.am (SOURCES):
* module/language/tree-il/optimize.scm (make-optimizer): Wire up the new
pass.
* module/language/tree-il/resolve-free-vars.scm: New pass.
* module/system/base/optimize.scm (available-optimizations): Enable new
pass at -O1.
|
|
|
|
|
|
| |
* libguile/loader.h (SCM_OBJCODE_MINOR_VERSION):
* module/system/vm/assembler.scm (*bytecode-minor-version*): Bump, as
we're going to start adding inlinable exports.
|
|
|
|
|
|
|
|
|
|
| |
This enables the compilation from "manually" written Tree-IL to
bytecode. See also <https://bugs.gnu.org/45131>.
* system/base/compile.scm (read-and-compile)[(joint #f)]<? eof-object?>:
Join exps using the default joiner for to.
<exp>: Compute compiler for to.
* test-suite/test/compiler.test ("read-and-compile tree-il"): New test.
|
|
|
|
|
| |
* module/system/base/types/internal.scm (truncate-bits): Use bits-case
in all cases.
|
|
|
|
|
|
| |
* module/system/base/types/internal.scm (truncate-bits): Inline cases
for 16, 32, and 64, to avoid allocating bignums for the boundary
conditions.
|
|
|
|
|
| |
* libguile/loader.h (SCM_OBJCODE_MINOR_VERSION): Bump.
* module/system/vm/assembler.scm (*bytecode-minor-version*): Bump.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* libguile/intrinsics.h:
* libguile/intrinsics.c (lookup_bound_public, lookup_bound_private): Two
new intrinsics.
(scm_bootstrap_intrinsics): Wire them up.
* libguile/jit.c (compile_call_scm_from_scmn_scmn):
(compile_call_scm_from_scmn_scmn_slow):
(COMPILE_X8_S24__N32__N32__C32): Add JIT support for new instruction
kind.
* libguile/vm-engine.c (call-scm<-scmn-scmn): New instruction, takes
arguments as non-immediate offsets, to avoid needless loads and register
pressure.
* module/language/cps/effects-analysis.scm: Add cases for new
primcalls.
* module/language/cps/compile-bytecode.scm (compile-function): Add new
primcalls.
* module/language/cps/reify-primitives.scm (cached-module-box): If the
variable is bound, call lookup-bound-public / lookup-bound-private as
appropriate instead of separately resolving the module, name, and doing
the bound check.
* module/language/tree-il/compile-bytecode.scm (emit-cached-module-box):
Use new instructions.
* module/system/vm/assembler.scm (define-scm<-scmn-scmn-intrinsic):
(lookup-bound-public, lookup-bound-private): Add assembler support.
|
|
|
|
|
|
|
|
|
|
| |
* module/language/cps/elide-arity-checks.scm: New file. Elides argument
count checks for known callers.
* am/bootstrap.am (SOURCES):
* module/Makefile.am (SOURCES): Add new file.
* module/language/cps/optimize.scm (optimize-first-order-cps):
* module/system/base/optimize.scm (available-optimizations): Add new
pass.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* module/language/cps.scm:
* module/language/cps/contification.scm:
* module/language/cps/cse.scm:
* module/language/cps/dce.scm:
* module/language/cps/simplify.scm:
* module/language/cps/slot-allocation.scm:
* module/language/cps/types.scm: Allow $kargs to follow $kfun. In that
case, the function must be well-known and callers are responsible for
calling with the appropriate arity.
* module/language/cps/compile-bytecode.scm: Emit "unchecked-arity" for
$kargs following $kfun.
* module/system/vm/assembler.scm: Adapt.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When using automake and libtool to build DLLs on Cygwin, libtool
will rename libXXX to cygXXX. 'load-foreign-library' should
emulate libltdl behavior and search for DLLs using that convention.
* module/system/foreign-library.scm (lib->cyg): new helper function
(load-foreign-library): add rename-on-cygwin? option to rename
libraries using Cygwin semantics
* test-suite/tests/foreign.test: new test section 'lib->cyg'
* doc/ref/api-foreign.text: document new rename-on-cygwin? option
for load-foreign-library
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* doc/ref/posix.texi (File System): Update to document mkstemp only.
* libguile/filesys.c: Make a mkstemp that doesn't modify the input
template. Instead the caller has to get the file name from
port-filename.
(scm_mkstemp): Use the new mkstemp to implement mkstemp!. Can't
deprecate yet though as the replacement hasn't been there for long
enough.
* libguile/posix.c (scm_tempnam): Update to mention mkstemp instead.
* module/system/base/compile.scm (call-with-output-file/atomic): Use
mkstemp.
* test-suite/tests/posix.test:
* test-suite/tests/r6rs-files.test: Use mkstemp.
* NEWS: Update.
|
|
|
|
|
|
|
| |
* NEWS: Add doc link.
* doc/ref/api-macros.texi (Syntax Transformer Helpers): Document
syntax-sourcev.
* module/system/syntax.scm: Re-export syntax-sourcev.
|
|
|
|
| |
* module/system/syntax.scm (print-syntax): Print source locations.
|
|
|
|
|
|
|
| |
* module/system/vm/assembler.scm (intern-constant, link-data): Write the
vector representation of source instead of the alist. Saves a lot of
heap size, object file size, and init time when serializing syntax
objects with source.
|
|
|
|
|
|
|
|
| |
* module/system/vm/assembler.scm (<asm>, make-assembler)
(intern-constant, emit-init-constants): Instead of loading a dependent
value each time it's needed in the relocation procedure, eagerly patch
values when they are created. Allows keeping values in registers, which
decreases code size.
|