1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-03 05:20:16 +02:00
Commit graph

5606 commits

Author SHA1 Message Date
Andy Wingo
5c4926209f ditch the 8-bit compiled form of program parameters
* libguile/vm-i-loader.c (load-program):
* module/system/vm/assemble.scm (dump-object!): There are cases in which
  we use the 16-bit representation for program params (nargs, nexts,
  etc), but the actual 16-bit number actually fits into 8 bits -- which
  is then misinterpreted by the loader as the 8-bit form. So ditch the
  8-bit form entirely (it was never much of an optimization), and just
  use the 16-bit form. Make sure to clear out all your .go files before
  recompiling this one!
2008-09-02 10:30:39 -07:00
Andy Wingo
7950b4cffb fix a bug loading functions with 8 or more arguments
* libguile/vm-i-loader.c: A combination of superstition and a bugfix:
  make sure that we treat bits as being of a type as wide as we think it
  is, and, more importantly, allow for programs with 8 <= nargs < 16.
2008-09-02 10:30:39 -07:00
Julian Graham
37a5203955 Resolve a deadlock caused by not checking mutex state after calling `SCM_TICK'.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2008-08-31 21:17:18 +02:00
Andy Wingo
e0b20b68b0 shamefully disable some more gc asserts
* libguile/gc-freelist.c: Disable some more asserts. I have no idea why
  they're hitting, however.
2008-08-27 17:19:41 -07:00
Ludovic Courtès
cc39ff0ea1 Remove `coop-threads' files that had been useless since 2005-03-02. 2008-08-27 23:47:56 +02:00
Ludovic Courtès
70eca63557 Fix builds `--without-threads'. 2008-08-27 23:05:44 +02:00
Han-Wen Nienhuys
f85ea2a85f Merge branch 'master' of git://git.sv.gnu.org/guile into nits 2008-08-26 23:48:20 -03:00
Han-Wen Nienhuys
487b9dec2e Only sanity check numbers if SCM_DEBUG_CELL_ACCESSES is unset.
SCM_DEBUG_CELL_ACCESSES uses the mark bits for its own purposes.
2008-08-26 23:46:39 -03:00
Han-Wen Nienhuys
80237dcc77 Set SRCPROP{PLIST,COPY} through a macro, so SCM_DEBUG_CELL_ACCESSES compiles. 2008-08-26 22:47:19 -03:00
Andy Wingo
1976ad74b8 fix casting-pointers-to-ints bug
* libguile/vm.c: Cast pointers to intptr_t, not int.

Patch from C. K. Jester-Young <cky944 <at> gmail.com>.
2008-08-26 13:48:19 -07:00
Andy Wingo
b264227691 fetch an inum's bits into a scm_bits_t, not an int
* libguile/vm-i-scheme.c (FUNC1): Remove, cause it's not used.
  (FUNC2): Don't assume an inum can fit into an int, use scm_bits_t
  instead. In reality though we should probably do use different checks,
  i.e. for multiplication probably we overflow. (That would be a bug.)

Based on a patch by C. K. Jester-Young <cky944 <at> gmail.com>.
2008-08-26 13:48:12 -07:00
Andy Wingo
05ddc073c3 disable gc statistics asserts
* libguile/gc.c: Disable the statistics asserts; see
  http://thread.gmane.org/gmane.lisp.guile.devel/7505
2008-08-26 13:29:55 -07:00
Andy Wingo
fdc0a82263 merge from guile master
Had to fix up .gitignore for some conflicts.
2008-08-26 12:51:19 -07:00
Ludovic Courtès
582a4997ab Use $(GCC_CFLAGS) for `-Werror' et al. so that it's not used to compile
Gnulib code.
2008-08-25 22:11:53 +02:00
Ludovic Courtès
bfb2e11358 Use $(GCC_CFLAGS) for `-Werror' et al. so that it's not used to compile
Gnulib code.
2008-08-25 22:08:45 +02:00
Han-Wen Nienhuys
4b7513463d Fix 2 indentation nitpicks. 2008-08-21 23:21:57 -03:00
Han-Wen Nienhuys
1f5844000e Style nitpicks: space before () in function call. 2008-08-21 23:16:20 -03:00
Andy Wingo
83495480e8 merge guile-vm into libguile itself
* ice-9/boot-9.scm: Only define load-compiled as #f if it's not already
  defined, which won't normally be the case.

* libguile/guile-vm.c: Removed, there's no more guile-vm binary.

* libguile/frames.c: (with change frame? -> heap-frame?)
* libguile/frames.h:
* libguile/instructions.c:
* libguile/instructions.h:
* libguile/objcodes.c:
* libguile/objcodes.h:
* libguile/programs.c:
* libguile/programs.h:
* libguile/vm-bootstrap.h: (was bootstrap.h)
* libguile/vm-engine.c: (was vm_engine.c)
* libguile/vm-engine.h: (was vm_engine.h)
* libguile/vm-expand.h: (was vm_expand.h)
* libguile/vm-i-loader.c: (was vm_loader.c)
* libguile/vm-i-scheme.c: (was vm_scheme.c)
* libguile/vm-i-system.c: (was vm_system.c)
* libguile/vm.c:
* libguile/vm.h: These files moved here from src/, as guile-vm is now a
  part of libguile.

* libguile/init.c: Bootstrap the VM. Yay!

* libguile/Makefile.am: The necessary chicanery here.

* module/system/vm/Makefile.am:
* module/system/vm/bootstrap.scm:
* module/system/vm/frame.scm:
* module/system/vm/instruction.scm:
* module/system/vm/objcode.scm:
* module/system/vm/program.scm:
* module/system/vm/vm.scm:

* pre-inst-guile-env.in: Add builddirs to the load path; add module/ to
  the path in the empty-$GUILE_LOAD_PATH case as well.

* src/Makefile.am: Moved out everything except guilec and guile-disasm,
  which probably should be moved to the scripts directory?

* testsuite/Makefile.am: Update to find guile-vm in the right place.

* module/system/vm/Makefile.am:
* module/system/vm/bootstrap.scm: Removed bootstrap.scm, scm_init_guile
  handles the bootstrapping for us.

* module/system/vm/frame.scm:
* module/system/vm/instruction.scm:
* module/system/vm/objcode.scm:
* module/system/vm/program.scm:
* module/system/vm/vm.scm: Call the init functions in libguile; should
  fix at some point to avoid the dlopen?
2008-08-21 18:39:30 -07:00
Ludovic Courtès
417566ebc9 Never define _GNU_SOURCE' explicitly since AC_USE_SYSTEM_EXTENSIONS'
takes care of it.

Conflicts:

	ChangeLog
	configure.in
	libguile/eval.c
	libguile/srfi-14.c
	libguile/threads.c
2008-08-20 19:31:46 +02:00
Ludovic Courtès
4a1db3a91f Add ChangeLog and NEWS entry for the GOOPS `class-redefinition' memory
corruption fix.
2008-08-19 19:13:39 +02:00
Ludovic Courtès
bb764c0e3c Complete fix of `hell' allocation in GOOPS. 2008-08-19 19:08:29 +02:00
Han-Wen Nienhuys
408bcd99d3 Fix sizeof() nitpick for goops corruption. 2008-08-18 11:19:59 -03:00
Han-Wen Nienhuys
5bfb683e12 Make marked conservatively statistic accumulative. 2008-08-16 15:34:04 -03:00
Han-Wen Nienhuys
676d9cc553 If realloc() fails in scm_realloc, then do a complete GC with complete
sweep directly.
2008-08-16 15:20:55 -03:00
Han-Wen Nienhuys
40945e5e9f Add a statistic for tracking how many cells are marked conservatively.
This allows an informed choice for deciding how many segments to
create.  After startup, ~2% of the cells are scanned conservatively.
2008-08-16 15:03:48 -03:00
Han-Wen Nienhuys
82ae1b8eb3 Garbage collection cleanup.
* New file gc-segment-table.c: hold code for the segment table.

* Remove data that might be out of date; remove
  scm_i_adjust_min_yield().  We don't store min_yields, since they
  are only accurate at one point in time (when the sweep finishes). 
  We decide the min yield at that point from min_yield_fraction and
  freelist->collected / freelist->swept

* Introduce scm_i_gc_heap_size_delta() replacing
  scm_i_gc_grow_heap_p().
  
* Remove foo_1 fields containing penultimate results.

* After GC, count mark bit vector to discover number of live
  objects. This simplifies hairy updates.

* Many formatting and layout cleanups.

* Fix in scm_i_sweep_card(): return the length of free_list returned,
  rather than number of deleted objects.

* For mtrigger GCs: do not also run a full sweep after the gc() call, as
  this is inconsistent with lazy sweeping.

* Remove scm_i_make_initial_segment().

* Use calloc in scm_i_make_empty_heap_segment() to save on
  initialization code.

* New function scm_i_sweep_for_freelist() which sweeps, with proper
  statistic variable updates.

* New segments are conceptually blocks with 100% reclaimable cells.

* Remove some useless constants/comments: SCM_HEAP_SIZE,
  SCM_INIT_HEAP_SIZE, SCM_EXPHEAP, SCM_HEAP_SEG_SIZE

* Do not increment scm_cells_allocated() from the
  scm_[double]cell(). This would be a race condition.

* Move some deprecation checks in separate functions to not distract
  from main code flow.
2008-08-16 13:57:23 -03:00
Han-Wen Nienhuys
b474ac33ee Remove comments about removed variables. 2008-08-16 13:27:17 -03:00
Han-Wen Nienhuys
d09752ffd1 Introduce scm_i_marking to detect when GC mark bits are touched
outside of marking stage.
2008-08-16 13:21:42 -03:00
Han-Wen Nienhuys
e89b7b3625 Remove unused macro UNMARKED_CELL_P() 2008-08-16 13:21:32 -03:00
Han-Wen Nienhuys
569aa529d5 Use word_2 to store mark bits for freeing structs and vtables in the
correct order.

This ensures that we only use GC Marks during the actual GC Mark.
2008-08-16 13:21:21 -03:00
Han-Wen Nienhuys
51ef99f7fa Fix memory corruption issue with hell[] array: realloc/calloc need to
factor in sizeof(scm_t_bits)
2008-08-16 02:32:00 -03:00
Han-Wen Nienhuys
01621bf62e Include min-yields in gc-stats output. 2008-08-14 02:16:41 -03:00
Han-Wen Nienhuys
2072309c1c Whitespace and formatting fixes.
Conflicts:

	libguile/gc-freelist.c
	libguile/gc-segment.c
	libguile/gc.h
2008-08-14 01:51:24 -03:00
Neil Jerram
76dae88158 Fix misleading output from `(help rationalize)'
* numbers.c (scm_rationalize): Update docstring to match the
	manual (which is more correct).  Change argument "err" to "eps",
	also to match the manual.
2008-08-03 00:27:32 +01:00
Andy Wingo
d351811347 Fixes to make guile-vm compile in guile source tree
* INSTALL: Updated.
* m4/gnulib-cache.m4: Regenerated.

* Makefile.am: Spelling fix.

* guilec.mk:
* src/Makefile.am:
* src/vm.c: Update to actually work inside a guile source tree.

* libguile/Makefile.am: Don't error on warnings in the flex-generated
  c-tokenize function.
2008-08-02 12:17:27 +02:00
Neil Jerram
2b3df509f6 ChangeLog for "Improved MIPS/Linux gc_os_dep.c definitions" 2008-07-17 22:26:41 +01:00
Ludovic Courtès
450be18dff Handle lack of struct dirent64' and readdir64_r ()' on HP-UX 11.11. 2008-07-17 00:20:31 +02:00
Neil Jerram
c0a658c4db Improved MIPS/Linux gc_os_dep.c definitions
From Thiemo Seufer <ths@networkno.de>:

	* gc_os_dep.c (CPP_WORDSZ, ALIGN_DOUBLE, DATAEND,
	DYNAMIC_LOADING): Added #defines.
	(_fdata, _end): Added declarations.
	(DATASTART): Use _fdata instead of __data_start.
	(STACKBOTTOM): Changed from 0x80000000 to 0x7fff8000.
2008-07-12 19:33:21 +01:00
Ludovic Courtès
071bb6a840 Add `scm_c_symbol_length ()'. 2008-07-05 20:16:12 +02:00
Ludovic Courtès
b6137ed741 Don't declare scm_i_locale_mutex' as SCM_INTERNAL'. 2008-07-04 22:22:06 +02:00
Ludovic Courtès
3e28462ffb Fix `SCM_INTERNAL' with GCC 4.3. 2008-07-04 22:02:56 +02:00
Ludovic Courtès
47871d5a16 Modernize Automake files. 2008-06-28 22:15:52 +02:00
Ludovic Courtès
95c6523b03 Disable type-checking of `SCM_UNPACK' for the broken HP compilers. 2008-06-28 20:31:01 +02:00
Ludovic Courtès
6eadcdab98 Work around `#define except' on Tru64. 2008-06-02 21:43:07 +02:00
Ludovic Courtès
102dbb6f6c Add `SCM_INTERNAL' macro, use it. 2008-05-31 23:21:02 +02:00
Neil Jerram
241d9cea20 Delete trailing whitespace. 2008-05-15 00:00:57 +01:00
Julian Graham
184af225b8 ChangeLog updates for latest set of SRFI-18 changes 2008-05-14 23:58:50 +01:00
Neil Jerram
74926120a3 Delete trailing whitespace. 2008-05-14 23:52:49 +01:00
Julian Graham
adc085f17c latest set of SRFI-18 support changes to core threads 2008-05-14 23:33:16 +01:00
Neil Jerram
e4c1d4cf61 Expand DEFFROM and DEFTO macros in discouraged.c
* discouraged.c: Expand DEFFROM and DEFTO macros, to avoid
compiler warnings about excess semicolons.  (Reported by Didier
Godefroy.)
2008-05-13 00:00:34 +01:00