summaryrefslogtreecommitdiff
Commit message (Expand)AuthorAgeFilesLines
* Test signed narrow arguments in FFI better.•••* test-suite/standalone/test-ffi-lib.c (test_ffi_s16_s8): New function. * test-suite/standalone/test-ffi: Test it. Also test test_ffi_sum with both positive and negative values for the narrower-than-64-bit arguments. wip-raeburn-miscKen Raeburn2012-05-212-2/+16
* Eliminate uses of GC_PTR, a holdover from libgc 6.x.•••* libguile/bdw-gc.h (GC_PTR): Don't define. * libguile/finalizers.c (scm_i_set_finalizer): Use void* instead of GC_PTR. * libguile/foreign.c (pointer_finalizer_trampoline): Likewise. * libguile/guardians.c (finalize_guarded, scm_i_guard): Likewise. * libguile/numbers.c (finalize_bignum): Likewise. * libguile/ports.c (finalize_port, finalize_iconv_descriptors): Likewise. * libguile/smob.c (finalize_smob): Likewise. * libguile/struct.c (struct_finalizer_trampoline): Likewise. * libguile/weak-set.c (move_weak_entry, resize_set): (weak_set_add_x, weak_set_remove_x): Likewise, but also change some casts that should've been GC_PTR* to void**, and don't cast pointer values to void*. * libguile/weak-table.c (register_disappearing_links): (unregister_disappearing_links, move_disappearing_links): Likewise. * libguile/weak-vector.c (scm_c_weak_vector_set_x): Likewise. Ken Raeburn2012-05-2111-38/+34
* Don't use addresses of labels with LLVM.•••* libguile/vm-engine.h: If __llvm__ is defined, undef HAVE_LABELS_AS_VALUES. * libguile/vm-expand.h: Likewise. Ken Raeburn2012-05-212-0/+24
* Always use VM_LABEL.•••* libguile/vm-expand.h (VM_TAG) [!HAVE_LABELS_AS_VALUES]: Generate the label as well as the case label, since vm-i-scheme.c uses the labels unconditionally. Ken Raeburn2012-05-211-1/+1
* Report time taken for 'guild compile' commands.•••* am/guilec (.scm.go, .el.go): Report the time taken for each "guild compile" command. * module/Makefile.am (ice-9/psyntax-pp.go): Likewise. Ken Raeburn2012-05-212-3/+3
* Require BDW-GC version 7.2 or better.•••* libguile/bdw-gc.h: Error out if the GC version is less than 7.2. Drop support for including <gc/gc_local_alloc.h> for version 6.x. Ken Raeburn2012-05-211-3/+3
* Fix FFI struct sizing to account for trailing padding.•••* libguile/foreign.c (scm_sizeof): Make sure the overall size is a multiple of the alignment of the structure. * test-suite/tests/foreign.test: Test size of { double, int8 }. Ken Raeburn2012-05-212-1/+6
* Fix lock handling bug in commit aac980de43a0466b968a56607664f5ebbca6b751.•••* libguile/weak-set.c (resize_set): When releasing a lock temporarily to do an allocation, re-lock it afterwards, instead of unlocking again. * libguile/weak-table.c (resize_table): Likewise. Ken Raeburn2012-05-202-2/+2
* inline scm_cons, scm_car, scm_cdr•••* libguile/pairs.h (scm_cons, scm_car, scm_cdr): Define these as inline functions. (scm_is_pair): Move here from inline.h. * libguile/pairs.c: Remove definitions here, and define gsubrs. * libguile/inline.h: Remove scm_is_pair implementation. * libguile/inline.c: Include pairs.h to residualize inlines from pairs.h. Andy Wingo2012-05-174-55/+68
* add guile-2.2 feature•••* module/ice-9/boot-9.scm (%cond-expand-features): Add guile-2.2 feature. Andy Wingo2012-05-171-0/+1
* Merge remote-tracking branch 'origin/stable-2.0'Andy Wingo2012-05-114-7/+20
|\
| * fix more assumptions that the frame-procedure is a procedure•••* libguile/frames.c (scm_frame_source, scm_frame_previous): * libguile/stacks.c (scm_make_stack): * module/ice-9/boot-9.scm (exception-printers): * module/system/vm/frame.scm (frame-call-representation): Fix more assumptions that frame-procedure is a program, or even a procedure. Andy Wingo2012-05-114-8/+21
| * Merge remote-tracking branch 'origin/stable-2.0' into stable-2.0Andy Wingo2012-05-104-15/+57
| |\
* | | Merge remote-tracking branch 'local-2.0/stable-2.0'•••Conflicts: libguile/vm-engine.c libguile/vm-i-system.c libguile/vm.c Andy Wingo2012-05-105-197/+139
|\| |
| * | refactor vm application of non-programs; boot continuation refactor•••* libguile/frames.c (scm_frame_instruction_pointer): * module/system/vm/frame.scm (frame-bindings): (frame-next-source, frame-call-representation): Fix a few locations that thought that the frame-procedure will always be a VM procedure. This will not not be the case when traversing the stack of an application of a non-procedure. * libguile/vm-i-system.c (call, tail-call, mv-call): Instead of special-casing structs and smobs at these call sites, just set up the stack, and jump to a generic apply loop if the proc is not a program. * libguile/vm-engine.c: The generic apply loop is here. Also, the boot program is now simply a boot continuation, and can handle any number of arguments. * libguile/vm.c (make_boot_program): Update the code that makes the boot continuation. Andy Wingo2012-05-105-197/+139
* | | Merge remote-tracking branch 'origin/stable-2.0'•••Conflicts: libguile/ports.c libguile/ports.h libguile/read.c libguile/vm-i-system.c Andy Wingo2012-05-0812-116/+225
|\ \ \ | | |/ | |/|
| * | Add missing `SCM_API' for `scm_take_from_input_buffers'.•••* libguile/ports.h (scm_take_from_input_buffers): Add `SCM_API'. Ludovic Courtès2012-05-081-1/+2
| * | Fix `setvbuf' to leave the line/column number unchanged.•••* libguile/fports.c (scm_setvbuf): Use `scm_take_from_input_buffers' directly instead of `scm_drain_input'; use `scm_unget_byte' instead of `scm_unread_string' to put the drained input back to PORT. This leaves PORT's line/column numbers unchanged, whereas they'd previously be decreased by the `scm_unread_string' call. * libguile/ports.c (scm_take_from_input_buffers): Update description and variable names to refer to "bytes", not "chars". * test-suite/tests/ports.test ("setvbuf"): New test prefix. Ludovic Courtès2012-05-083-14/+55
| |/
| * docbook->texi fix•••* module/texinfo/docbook.scm (*sdocbook->stexi-rules*): Only convert ulink to uref if there is a URL attribute. Andy Wingo2012-05-081-2/+6
| * (texinfo docbook) support for @acronym•••* module/texinfo/docbook.scm (*sdocbook->stexi-rules*): Recognize "acronym" as parsing to the @acronym texinfo command. Andy Wingo2012-05-071-1/+3
| * add support for texinfo parsed arguments, like @acronym•••* module/texinfo.scm (texi-command-specs): Add a new kind of texinfo command, inline-text-args, a sort of a cross between inline-args, which are unparsed, and inline-text, which is. Perhaps this should supersede inline-args at some point. In any case, add acronym as an inline-text-args element. (inline-content?, arguments->attlist, complete-start-command) (parse-inline-text-args, make-dom-parser): Adapt for inline-text-args. * module/texinfo/serialize.scm (inline-text-args): Add serialization for @acronym. * test-suite/tests/texinfo.test ("test-texinfo->stexinfo"): Add some tests. Andy Wingo2012-05-073-12/+87
| * Add a missing SYNC_ALL in variable-ref•••* libguile/vm-i-system.c (variable-ref): Add a missing SYNC_ALL. Andy Wingo2012-05-071-0/+1
| * Optimize `scm_read_string'.•••According to the new benchmarks, this leads a 5% speed improvement when reading small strings, and a 27% improvement when reading large strings. * libguile/read.c (READER_STRING_BUFFER_SIZE): Change to 128; update comment to mention codepoints. (scm_read_string): Make `str' a list of strings, instead of a string. Store characters read in buffer `c_str'. Cons to STR when C_STR is full, and concatenate/reverse at the end. * benchmark-suite/benchmarks/read.bm (small, large): New variables. Set %DEFAULT-PORT-ENCODING to "UTF-8". ("read")["small strings", "large strings"]: New benchmarks. Ludovic Courtès2012-05-072-19/+38
| * Make `scm_unget_byte' public.•••* libguile/ports.h (scm_unget_byte): Make `SCM_API' instead of `SCM_INTERNAL'. Ludovic Courtès2012-05-061-2/+2
| * read: Avoid `void *' pointer arithmetic.•••* libguile/read.c (read_complete_token): Make `new_buf' a `char *' to avoid pointer arithmetic on `void *'. Ludovic Courtès2012-05-061-1/+1
| * Build with `-Wpointer-arith' when available.•••* configure.ac (POTENTIAL_GCC_CFLAGS): Add `-Wpointer-arith'. Ludovic Courtès2012-05-061-3/+1
| * Correct typing of assertion in the `wind' instruction.•••* libguile/vm-i-system.c (wind): Check `scm_to_bool (scm_thunk_p (x))' instead of `scm_thunk_p'. Ludovic Courtès2012-05-051-2/+4
| * Simplify the reader's `read_complete_token'.•••* libguile/read.c (read_token): Remove unneeded `const' before `size_t'. (read_complete_token): Remove `overflow_buffer' parameter; return `char *' instead of `int'. Allocate the overflow buffer with `scm_gc_malloc_pointerless' instead of `scm_malloc'. Return either the overflow buffer or BUFFER. (scm_read_number, scm_read_mixed_case_symbol, scm_read_number_and_radix): Rename `buffer' to `local_buffer', and `overflow_buffer' to `buffer'. Remove `overflow'. Adjust code to new `read_complete_token'. Ludovic Courtès2012-05-041-65/+35
* | Merge remote-tracking branch 'origin/stable-2.0'•••Conflicts: libguile/vm-engine.c libguile/vm-i-system.c Andy Wingo2012-04-309-308/+345
|\|
| * push error handlers out of line in the vm•••* libguile/vm.c: (vm_error): (vm_error_bad_instruction): (vm_error_unbound): (vm_error_unbound_fluid): (vm_error_not_a_variable): (vm_error_not_a_thunk): (vm_error_apply_to_non_list): (vm_error_kwargs_length_not_even): (vm_error_kwargs_invalid_keyword): (vm_error_kwargs_unrecognized_keyword): (vm_error_too_many_args): (vm_error_wrong_num_args): (vm_error_wrong_type_apply): (vm_error_stack_overflow): (vm_error_stack_underflow): (vm_error_improper_list): (vm_error_not_a_pair): (vm_error_not_a_bytevector): (vm_error_not_a_struct): (vm_error_no_values): (vm_error_not_enough_values): (vm_error_continuation_not_rewindable): (vm_error_bad_wide_string_length): (vm_error_invalid_address): (vm_error_object): (vm_error_free_variable): New internal helpers, implementing VM error handling. * libguile/vm-engine.h (VM_ASSERT): New helper macro. (ASSERT, CHECK_OBJECT, CHECK_FREE_VARIABLE): (PRE_CHECK_UNDERFLOW, PUSH_LIST): Use the new helper. * libguile/vm-i-loader.c: * libguile/vm-i-scheme.c: * libguile/vm-i-system.c: Use VM_ASSERT and the out-of-line error handlers. * libguile/vm-engine.c (vm_engine): Remove inline error handlers, and remove a couple of local vars. Use VM_ASSERT. Have halt handle the return itself. Andy Wingo2012-04-306-319/+331
| * add internal SCM_NOINLINE definition•••* libguile/_scm.h (SCM_NOINLINE): New internal define, for things that we definitely don't want the compiler to inline. Andy Wingo2012-04-301-0/+5
| * add scm_c_values helper•••* libguile/values.h: * libguile/values.c (scm_c_values): New public helper. Andy Wingo2012-04-302-5/+18
* | fix peval test for recent merge•••* test-suite/tests/peval.test: Fix test for master. Andy Wingo2012-04-301-2/+2
* | Merge remote-tracking branch 'origin/stable-2.0'•••Conflicts: test-suite/tests/cse.test Andy Wingo2012-04-269-215/+321
|\|
| * vlist performance improvements; allocate vhash data inline•••* module/ice-9/vlist.scm (make-block): If we are making a hash table, allocate it inline with the contents. Otherwise don't even add a pointer to the block. (block-hash-table?): New internal accessor. (block-ref*): Remove. Vhash entries are no longer wrapped. (block-ref): (block-hash-table-next-offset): (block-hash-table-set-next-offset!): (block-hash-table-ref): (block-hash-table-set!): (block-hash-table-add!): Adapt to take content vector explicitly, and to expect the hash table inline with the contents. Some of these accessors are new. Adapt callers. (assert-vlist): New helper. (vlist-cons): Update comment. (vhash?): Update scheme to allocate the hash table and chain links inline with the contents. (%vhash-fold*, %vhash-assoc): Rewrite to be more performant. Andy Wingo2012-04-231-140/+157
| * avoid emitting degenerate aliases in peval•••* module/language/tree-il/peval.scm (<operand>, make-operand) (make-bound-operands, peval): Avoid emitting needless aliases in degenerate cases of let. (visit-operand): If we visit an operand with a fresh counter and have to abort, record that fact. * test-suite/tests/peval.test ("partial evaluation"): Add a test. Andy Wingo2012-04-232-10/+70
| * vlist-cons micro-optimizations•••* module/ice-9/vlist.scm (set-block-next-free!): Define this instead of increment-block-next-free!. (block-append!): Refactor to take an offset, and only append if the offset is the next free value, and there is space in the block. (block-cons): Refactor to not be a loop. The partial evaluator would have to understand effects analysis in order to be able to unroll it, and there's at most one recursion. Recovers the performance loss resulting from the previous commit. Andy Wingo2012-04-231-24/+31
| * slight vlist refactor•••* module/ice-9/vlist.scm: Use define-inlinable instead of define-inline, to ensure strict argument evaluation. There is a slight performance penalty, but I hope subsequent hacks make it up. Andy Wingo2012-04-231-18/+11
| * fix replacement of CSE with lexical-ref•••* module/language/tree-il/cse.scm (cse): Fix dominator unrolling for lexical propagation. * test-suite/tests/cse.test ("cse"): Add test. Andy Wingo2012-04-232-12/+24
| * cse hashing tweak•••* module/language/tree-il/cse.scm (cse): Minor tweak to hash depth based on time profile of compiling peval.scm. Andy Wingo2012-04-231-1/+1
| * more inlining in effects.scm•••* module/language/tree-il/effects.scm (define-effects) (&no-effects, &all-effects-but-bailout): (cause, &depends-on, &causes, depends-on-effects?) (causes-effects?, effects-commute?): Add ham-fisted inlining. Andy Wingo2012-04-231-11/+12
| * better primitives support for bit operations•••* module/language/tree-il/primitives.scm (*interesting-primitive-names*): Add lognot. (*effect-free-primitives*): Add ash, logand, logior, logxor, and lognot. (logior, logand): Define associative expanders. Andy Wingo2012-04-231-1/+14
| * disable optimizations in goops dispatch procedures•••* module/oop/goops/dispatch.scm: Disable peval and cse. Andy Wingo2012-04-231-2/+4
| * enable cse•••* module/language/tree-il/optimize.scm: Enable CSE unless #:cse? #f is passed. * test-suite/tests/tree-il.test: Disable CSE for one test. Andy Wingo2012-04-232-5/+13
* | Merge commit 'f66cbb99ee096186837536885d3436bb334df34d'Andy Wingo2012-04-264-0/+853
|\|
| * new pass: cse•••* module/language/tree-il/cse.scm: New pass, some simple common subexpression elimination with effects analysis. * test-suite/tests/cse.test: New test. * test-suite/Makefile.am: * module/Makefile.am: Adapt. Andy Wingo2012-04-234-0/+854
* | Merge commit '1cd63115be7a25d0ea18aaa0e1eff5658d8db77a'•••Conflicts: module/language/tree-il/peval.scm test-suite/tests/peval.test Andy Wingo2012-04-264-60/+361
|\|
| * minor tweaks to a peval test•••* test-suite/tests/peval.test: Update mutable var test to really ensure that the function can't inline. Andy Wingo2012-04-231-4/+4
| * peval uses effects analysis•••* module/language/tree-il/peval.scm: Use effects analysis from (language tree-il effects) instead of our own constant-expression?. Eagerly mark assigned lexicals as non-copyable. Andy Wingo2012-04-231-53/+25
| * add effects•••* module/language/tree-il/effects.scm: New module, for effects analysis. * module/Makefile.am: Adapt. Andy Wingo2012-04-232-0/+335