mit-scheme.git
14 years agoMore updates in preparation for release.
Chris Hanson [Wed, 23 Dec 2009 09:43:35 +0000 (01:43 -0800)]
More updates in preparation for release.

14 years agoUse recursive-lambda icon as default on windows.
Chris Hanson [Wed, 23 Dec 2009 07:42:20 +0000 (23:42 -0800)]
Use recursive-lambda icon as default on windows.

14 years agoForce working directory to user's home-dir when started as mac application bundle.
Chris Hanson [Wed, 23 Dec 2009 05:00:27 +0000 (21:00 -0800)]
Force working directory to user's home-dir when started as mac application bundle.

14 years agoAdd new recursive-lambda icon for use in mac and windows.
Chris Hanson [Wed, 23 Dec 2009 04:59:58 +0000 (20:59 -0800)]
Add new recursive-lambda icon for use in mac and windows.

14 years agoRestrict *.ico rule.
Chris Hanson [Wed, 23 Dec 2009 02:51:11 +0000 (18:51 -0800)]
Restrict *.ico rule.

14 years agoUpdate documentation to reflect changes concerning eq hash tables.
Taylor R Campbell [Mon, 21 Dec 2009 23:41:13 +0000 (18:41 -0500)]
Update documentation to reflect changes concerning eq hash tables.

Document MAKE-WEAK-EQ-HASH-TABLE and MAKE-WEAK-EQV-HASH-TABLE.
Warn that MAKE-EQ-HASH-TABLE and MAKE-EQV-HASH-TABLE may become
aliases for MAKE-STRONG-EQ-HASH-TABLE and MAKE-STRONG-EQV-HASH-TABLE
instead.  Suggest using MAKE-STRONG-EQ-HASH-TABLE for symbol-keyed
tables, rather than MAKE-EQ-HASH-TABLE.

14 years agoEradicate use of MAKE-EQ-HASH-TABLE.
Taylor R Campbell [Mon, 21 Dec 2009 21:15:00 +0000 (16:15 -0500)]
Eradicate use of MAKE-EQ-HASH-TABLE.

Replace each use by a constructor with a more specific name.
Full analysis:

* Use of MAKE-EQ-HASH-TABLE in MIT Scheme, 2009-12-21  -*- outline -*-

In MIT Scheme, MAKE-EQ-HASH-TABLE yields a hash table whose keys are
held only weakly, so that they will be garbage-collected if there are
no strong references to them.  To make a similar hash table whose keys
are held strongly, one must use MAKE-STRONG-EQ-HASH-TABLE explicitly.
Of the sixty-two uses of MAKE-EQ-HASH-TABLE throughout the MIT Scheme
source code, only four appear to need weak references to their keys,
and for only two more is there an obvious reason to use weak
references.  This list categorizes most uses of MAKE-EQ-HASH-TABLE.

Each entry is marked by the decision that was made for it of whether
it should be strong or weak.

** Hash table must be key-weak

*** [weak] edwin/curren.scm, screen-buffer-layouts
*** [weak] edwin/eystep.scm, stepper-buffers
*** [weak] edwin/xterm.scm, display/cached-atoms-table
*** [weak] edwin/xterm.scm, display/selection-records

** Hash table should be key-weak, but will work as key-strong

*** [weak] edwin/comman.scm, permanent-local-variables

As long as Edwin variables are strongly interned, it is safe to use a
key-strong hash table for properties on Edwin variables such as the
permanent-local property, but if Edwin variables were weakly interned
then this would be a space leak.

*** [strong] sos/class.scm, built-in-class-table

Dispatch tags that are garbage-collected shouldn't accumulate space
here.  These might arise, for instance, from re-evaluating
DEFINE-RECORD-TYPE forms causing the old record type's dispatch tags
to be garbage-collected.  That requires key- and datum-weak hash
tables, though.  Using MAKE-WEAK-EQ-HASH-TABLE here breaks the
bootstrap from the 20090107 snapshot, which doesn't have a binding for
that name.  So just use a strong eq hash table for now.

** Hash table should be key-strong, but will work as key-weak

*** [strong] compiler/machines/i386/lapopt.scm, *rules*

If the compiler never generates instructions with certain symbols in
them, and hence the compiler's code has no strong references to those
symbols, then the rules for those symbols may as well be discarded.
But that's pretty sketchy.

*** [strong] compiler/machines/svm/assembler-runtime.scm, symbolic-operators
*** [strong] compiler/machines/svm/assembler-runtime.scm, pvar-type-table
*** [strong] compiler/machines/svm/lapopt.scm, *rules* (not really used)
*** [strong] compiler/machines/x86-64/lapopt.scm, *rules* (not really used)
*** [strong] edwin/nntp.scm, equivalences in build-equivalence-classes

The only reason that this works as a key-weak hash table is that every
key is also strongly referenced by the hash table's data.

*** [strong] edwin/nntp.scm, tables in convert-header-graphs-to-trees

In the only caller of CONVERT-HEADER-GRAPHS-TO-TREES, the (strong)
list of headers is still strongly referenced, so the keys of the two
hash tables in TABLES will not be garbage-collected.

*** [strong] edwin/xterm.scm, built-in-atoms-table

If the binding for BUILT-IN-ATOMS were collected while that for
BUILT-IN-ATOMS-TABLE were not, then the latter would be in trouble.
This generally doesn't happen currently.

*** [strong] microcode/os2pm.scm, type-abbreviations
*** [strong] microcode/os2pm.scm, id-external-roots

This code is probably defunct, but if it weren't, and if the
presentation manager procedure abstraction were used outside this
file, it would probably be necessary to make these two hash tables
key-strong.  Another hash table, PM-PROCEDURES, is incorrectly
key-weak.

*** [strong] runtime/genio.scm, {en,de}coder/sizer/{,de}normalizer maps

Since there are maps in both directions, each hash table's keys also
have strong references in the data positions of the other hash table.
But this is pretty fragile, and in any case there is no need to use
key-weak hash tables.

*** [strong] runtime/syntax-output.scm, unmappings
*** [strong] runtime/syntax-output.scm, rename-databases' mapping-tables
*** [strong] runtime/syntax-output.scm, rename-databases' id-tables
*** [weak] ssp/xmlrpc.scm, methods in get-xmlrpc-method-handler

Since the hash table is used only in one place, and only one key is
fetched out of it, that key will be strongly referenced until it is
fetched, and the other keys don't matter.  (For that matter, why use a
hash table at all?)

*** [strong] xml/turtle.scm, table in write-prefixes

** Hash table must be key-strong

*** [strong] compiler/machines/svm/assembler-runtime.scm, symbol tables

These are probably meant to be treated like the symbol tables
implemented in compiler/back/symtab.scm.

*** [strong] imail/imail-file.scm, file-folder-types
*** [strong] imail/imail-mime.scm, mime-encodings
*** [strong] microcode/os2pm.scm, pm-procedures
*** [strong] runtime/http-syntax.scm, header-value-defns
*** [strong] ssp/mod-lisp.scm, mime-handlers
*** [strong] ssp/xhtml-expander.scm, *sabbr-table*

The processing instructions are processed incrementally as the file is
parsed, so keys in the sabbr table may be garbage-collected and then
re-interned, between which times the associations would be destroyed.

*** [strong] star-parser/matcher.scm, matcher-preprocessors
*** [strong] star-parser/matcher.scm, matcher-compilers
*** [strong] star-parser/parser.scm, parser-preprocessors
*** [strong] star-parser/parser.scm, parser-compilers
*** [strong] star-parser/shared.scm, make-parser-macros
*** [strong] star-parser/shared.scm, *global-parser-macros*
*** [strong] xdoc/validate-xdoc.scm, element-checkers
*** [strong] xdoc/xdoc.scm, html-generators
*** [strong] xdoc/xdoc.scm, when-conditions
*** [strong] xdoc/xdoc.scm, xdoc-content-types
*** [strong] xdoc/xdoc.scm, xdoc-element-types
*** [strong] xdoc/xdoc.scm, xdoc-input-canonicalizers
*** [strong] xdoc/xdoc.scm, xdoc-output-definitions
*** [strong] xml/xhtml.scm, element-context-map

** Other

*** [strong] compiler/machines/C/stackify.scm, stackify count tables

It is not immediately clear to me whether these need to be strong, but
they probably should be.

*** [strong] compiler/rtlbase/rtlobj.scm, label->object maps

It's not immediately obvious to me whether LABEL->OBJECT will ever be
used after the last references to the keys of the hash tables involved
(which cause strong references to those keys to be dropped, if
COMPILER:PRESERVE-DATA-STRUCTURES? is false).  A little further
analysis is required.  A conservative guess would be that these should
to be strong.

*** [weak] edwin/eystep.scm, ynode-regions

What are the keys to these hash tables?  I don't know how long they
persist.

Chris's answer: The keys are stepper nodes; they are stored in a text
property and consequently will be held appropriately.  This should be
a weak table.

*** [weak] edwin/prompt.scm, prompt-histories

Making this key-strong is not likely to be a space leak, but if a
command is garbage-collected, then so may the symbol for its history
be garbage-collected, and its history is presumably no longer needed.

*** [strong-eqv] edwin/win32.scm, event-handlers

The keys in EVENT-HANDLERS are integers.  I think this should be a
key-strong eqv hash table rather than a key-weak eq hash table.

*** [strong] edwin/xterm.scm, selection->record table in display/selection-records

I'm not sure what the domain of possible keys to this hash table is --
it may be just the symbols PRIMARY and CLIPBOARD, which will probably
be strongly referenced by the rest of the Edwin code, but on the other
hand I think this should probably be a key-strong hash table.

*** [strong] edwin/xterm.scm, symbol->x-atom table in display/cached-atoms-table

Whether this should be key-strong or key-weak depends on whether the
set of atoms that it will map is arbitrarily large.

*** [weak] imail/imail-core.scm, memoized-resources

As long as URLs are interned strongly, it doesn't matter whether
MEMOIZED-RESOURCES is key-weak or key-strong.  This requires further
analysis, but leaving it weak for now (i.e. not changing it) is safe
until internment of URLs changes.

*** [strong with comment] runtime/sfile.scm, interned-mime-types

This should really be a key-strong, datum-weak hash table, which the
hash table abstraction does not presently support.  (The same goes for
UNUSUAL-INTERNED-MIME-TYPES.)  Barring that, INTERNED-MIME-TYPES
should be key-strong, although it happens to work as a key-weak hash
table because its data have strong references to its keys anyway.

*** [weak] xdoc/xdoc.scm, *xdoc-element-properties*
*** [weak] xdoc/xdoc.scm, *xdoc-inputs*
*** [weak] xdoc/xdoc.scm, *xdoc-outputs*

As maps from XML elements by identity to properties, these three
should probably be key-weak, but since new ones are created for each
xdoc expansion, they could probably safely be key-strong without
badly leaking memory.

*** [strong] xdoc/xdoc.scm, *xdoc-id-map*

This should be key-strong, although it doesn't matter until XML names
become weakly interned.

*** [strong-eqv] xml/xhtml-entities.scm, table in html-char->name-map

The keys in the table inside HTML-CHAR->NAME-MAP is keyed by
characters.  Should this be a key-strong eqv hash table rather than a
key-weak eq hash table?

*** [strong with comment] xml/xml-names.scm

If we had datum-weak hash tables, then EXPANDED-NAMES should be
key-weak and the other two should be datum-weak.  But we don't, so
instead all three should be strong, since in each one the data all
have strong references to their corresponding keys.

14 years agoReflect specification bug in definition of HASH-TABLE-UPDATE!.
Taylor R Campbell [Mon, 21 Dec 2009 20:11:16 +0000 (15:11 -0500)]
Reflect specification bug in definition of HASH-TABLE-UPDATE!.

We can't use HASH-TABLE/MODIFY! because the specification tacitly
permits the procedure to edit the hash table.  This was a silly
oversight in the SRFI document.

14 years agoAdd names for hash table types with the word `weak' in them.
Taylor R Campbell [Mon, 21 Dec 2009 16:35:39 +0000 (11:35 -0500)]
Add names for hash table types with the word `weak' in them.

New global bindings:
  MAKE-WEAK-EQ-HASH-TABLE
  MAKE-WEAK-EQV-HASH-TABLE
  WEAK-EQ-HASH-TABLE-TYPE
  WEAK-EQV-HASH-TABLE-TYPE

{EQ,EQV}-HASH-TABLE-TYPE and MAKE-{EQ,EQV}-HASH-TABLE are now aliases
for WEAK-{EQ,EQV}-HASH-TABLE-TYPE and MAKE-WEAK-{EQ,EQV}-HASH-TABLE,
as are MAKE-{SYMBOL,OBJECT}-HASH-TABLE.

14 years agoMerge branch 'master' of ssh://git.sv.gnu.org/srv/git/mit-scheme
Taylor R Campbell [Mon, 21 Dec 2009 16:06:01 +0000 (11:06 -0500)]
Merge branch 'master' of ssh://git.sv.gnu.org/srv/git/mit-scheme

14 years agoEliminate dist/windows, moving its contents to other places.
Chris Hanson [Mon, 21 Dec 2009 06:05:16 +0000 (22:05 -0800)]
Eliminate dist/windows, moving its contents to other places.

14 years agoAdjust scripts to account for change to default band.
Chris Hanson [Mon, 21 Dec 2009 05:58:59 +0000 (21:58 -0800)]
Adjust scripts to account for change to default band.

14 years agoTweak rule used for building weak keys, and update comment to match.
Chris Hanson [Mon, 21 Dec 2009 05:22:38 +0000 (21:22 -0800)]
Tweak rule used for building weak keys, and update comment to match.

14 years agoMake sure all necessary load-time dirs and debugging info is present.
Chris Hanson [Mon, 21 Dec 2009 00:16:55 +0000 (16:16 -0800)]
Make sure all necessary load-time dirs and debugging info is present.

14 years agoAllow uninterned symbols to be weak keys.
Joe Marshall [Sun, 20 Dec 2009 19:29:17 +0000 (11:29 -0800)]
Allow uninterned symbols to be weak keys.

14 years agoEnsure weak symbols aren't removed from hash table keys.
Joe Marshall [Sun, 20 Dec 2009 16:19:46 +0000 (08:19 -0800)]
Ensure weak symbols aren't removed from hash table keys.

14 years agoFix: W32 file-system flags can be a bignum.
Chris Hanson [Sun, 20 Dec 2009 10:29:01 +0000 (02:29 -0800)]
Fix: W32 file-system flags can be a bignum.

14 years agoTweak CUSTOM-TABLE-TYPE in hashtb.scm further.
Taylor R Campbell [Sun, 20 Dec 2009 07:59:55 +0000 (02:59 -0500)]
Tweak CUSTOM-TABLE-TYPE in hashtb.scm further.

Use existing names for table types where possible, rather than
repeating the calls to MAKE-*-TYPE.

Reduces the size of hashtb.{bin,com,bci} by 10-12% on i386, and
probably measurably reduces the time to compile them too.

14 years agoMerge branch 'master' of ssh://git.sv.gnu.org/srv/git/mit-scheme
Taylor R Campbell [Sun, 20 Dec 2009 07:40:57 +0000 (02:40 -0500)]
Merge branch 'master' of ssh://git.sv.gnu.org/srv/git/mit-scheme

14 years agoFor SRFI 69's MAKE-HASH-TABLE, always yield strong hash tables.
Taylor R Campbell [Sun, 20 Dec 2009 07:37:04 +0000 (02:37 -0500)]
For SRFI 69's MAKE-HASH-TABLE, always yield strong hash tables.

SRFI 69 (intentionally) says nothing about weak references, and other
implementations always give strong hash tables.

14 years agoDon't depend on special NT_INCLUDE environment variable; instead use
Chris Hanson [Sat, 19 Dec 2009 04:36:26 +0000 (20:36 -0800)]
Don't depend on special NT_INCLUDE environment variable; instead use
standard WATCOM variable.

14 years agoFix thinko.
Chris Hanson [Fri, 18 Dec 2009 08:50:01 +0000 (00:50 -0800)]
Fix thinko.

14 years agoAdd "lib" to list.
Chris Hanson [Fri, 18 Dec 2009 08:48:51 +0000 (00:48 -0800)]
Add "lib" to list.

14 years agoTweak command-line options.
Chris Hanson [Fri, 18 Dec 2009 08:46:46 +0000 (00:46 -0800)]
Tweak command-line options.

14 years agoWrite windows script to copy binaries into "c:\local".
Chris Hanson [Fri, 18 Dec 2009 08:43:29 +0000 (00:43 -0800)]
Write windows script to copy binaries into "c:\local".

14 years agoChange default library path on windows.
Chris Hanson [Fri, 18 Dec 2009 08:31:03 +0000 (00:31 -0800)]
Change default library path on windows.

14 years agoChange make-lib to work more like "make install" on unix.
Chris Hanson [Fri, 18 Dec 2009 08:21:01 +0000 (00:21 -0800)]
Change make-lib to work more like "make install" on unix.

14 years agoTweak build scripts; add new script to build lib directory.
Chris Hanson [Fri, 18 Dec 2009 08:07:21 +0000 (00:07 -0800)]
Tweak build scripts; add new script to build lib directory.

14 years agoFix windows .bat files to work without depending on defaults.
Chris Hanson [Fri, 18 Dec 2009 07:34:47 +0000 (23:34 -0800)]
Fix windows .bat files to work without depending on defaults.

14 years agoMust have fully lower-case makefile for windows.
Chris Hanson [Fri, 18 Dec 2009 07:26:45 +0000 (23:26 -0800)]
Must have fully lower-case makefile for windows.

14 years agoAdd more mostly windows-build patterns.
Chris Hanson [Fri, 18 Dec 2009 07:25:34 +0000 (23:25 -0800)]
Add more mostly windows-build patterns.

14 years agoRestore mistakenly-deleted patterns.
Chris Hanson [Fri, 18 Dec 2009 07:23:16 +0000 (23:23 -0800)]
Restore mistakenly-deleted patterns.

14 years agoAdd various build artifacts to ignore list, including some for the
Chris Hanson [Fri, 18 Dec 2009 07:19:49 +0000 (23:19 -0800)]
Add various build artifacts to ignore list, including some for the
windows build.

14 years agoMove MacOS X file into macosx subdir.
Chris Hanson [Fri, 18 Dec 2009 06:32:52 +0000 (22:32 -0800)]
Move MacOS X file into macosx subdir.

14 years agoAdd files to build and distribute Windows binaries.
Chris Hanson [Fri, 18 Dec 2009 06:32:06 +0000 (22:32 -0800)]
Add files to build and distribute Windows binaries.

14 years agoConvert to use winsock2.h instead of winsock.h.
Chris Hanson [Mon, 14 Dec 2009 10:05:46 +0000 (02:05 -0800)]
Convert to use winsock2.h instead of winsock.h.

14 years agoEliminate use of C99 function copysign; should not be used without
Chris Hanson [Mon, 14 Dec 2009 09:58:56 +0000 (01:58 -0800)]
Eliminate use of C99 function copysign; should not be used without
testing in configure.ac.

14 years agoAdd missing utabmd.*.
Chris Hanson [Mon, 14 Dec 2009 09:56:13 +0000 (01:56 -0800)]
Add missing utabmd.*.

14 years agoChange types to match Open Watcom 1.8.
Chris Hanson [Mon, 14 Dec 2009 09:54:53 +0000 (01:54 -0800)]
Change types to match Open Watcom 1.8.

14 years agoAdd declarations for external references.
Chris Hanson [Mon, 14 Dec 2009 09:53:30 +0000 (01:53 -0800)]
Add declarations for external references.

14 years agoAdd better name for MacOS X app rule.
Chris Hanson [Mon, 14 Dec 2009 05:17:27 +0000 (21:17 -0800)]
Add better name for MacOS X app rule.

14 years agoAdd rule to make MacOS X application.
Chris Hanson [Mon, 14 Dec 2009 05:15:06 +0000 (21:15 -0800)]
Add rule to make MacOS X application.

14 years agoWrap over-long line.
Chris Hanson [Mon, 14 Dec 2009 05:13:45 +0000 (21:13 -0800)]
Wrap over-long line.

14 years agoWrap over-long line.
Chris Hanson [Mon, 14 Dec 2009 05:09:38 +0000 (21:09 -0800)]
Wrap over-long line.

14 years agoRestructure to allow caller to override various environment variables.
Chris Hanson [Mon, 14 Dec 2009 04:29:14 +0000 (20:29 -0800)]
Restructure to allow caller to override various environment variables.

14 years agoUse autoconf macro to capture code that computes native-code value.
Chris Hanson [Mon, 14 Dec 2009 03:56:55 +0000 (19:56 -0800)]
Use autoconf macro to capture code that computes native-code value.

14 years agoMake sure AC_CHECK_DECL is run *after* AC_PROG_CC.
Chris Hanson [Mon, 14 Dec 2009 00:02:07 +0000 (16:02 -0800)]
Make sure AC_CHECK_DECL is run *after* AC_PROG_CC.

14 years agoInclude icon in app.
Chris Hanson [Sun, 13 Dec 2009 06:07:34 +0000 (22:07 -0800)]
Include icon in app.

14 years agoUse much larger default heap size on 64-bit machines.
Chris Hanson [Sun, 13 Dec 2009 05:53:46 +0000 (21:53 -0800)]
Use much larger default heap size on 64-bit machines.

14 years agoUse much larger default heap size on 64-bit machines.
Chris Hanson [Sun, 13 Dec 2009 05:53:01 +0000 (21:53 -0800)]
Use much larger default heap size on 64-bit machines.

14 years agoWhen compiler supports x86-64, use x86-64 in preference to x86.
Chris Hanson [Sun, 13 Dec 2009 05:43:41 +0000 (21:43 -0800)]
When compiler supports x86-64, use x86-64 in preference to x86.

14 years agoFind structure field default value procedures by index, not by name.
Taylor R Campbell [Fri, 11 Dec 2009 01:54:49 +0000 (20:54 -0500)]
Find structure field default value procedures by index, not by name.

Otherwise, every constructor generated by DEFINE-STRUCTURE performs
lookups by name for every field with a default initializer, every
time you call the constructor.

This is a backward-compatible change, in the sense that .bin and .com
files generated with the old definition of DEFINE-STRUCTURE can still
be loaded into images with the new definition of DEFINE-STRUCTURE and
its corresponding run-time support.  However, .bin and .com files
generated with the new definition cannot be loaded into images with
the old run-time support, which lacks procedures needed by the new
definition for lookup by index.

Note: For the full benefit of this change, run at least a two-stage
build so that the runtime will include the new definition and be
compiled with the new definition.

14 years agoBum case canonicalization and character input in the parser.
Taylor R Campbell [Fri, 11 Dec 2009 01:19:15 +0000 (20:19 -0500)]
Bum case canonicalization and character input in the parser.

This avoids an ASSQ for every character read and some interpreter
environment lookups for every character dispatched on and atom read,
and replaces a general unknown procedure call by some open-coded
string and character operations for every character read in an atom
to canonicalize its case.

14 years agoUse PRIMITIVE-OBJECT-SET-TYPE, not OBJECT-SET-TYPE, in EOF-OBJECT.
Taylor R Campbell [Fri, 11 Dec 2009 00:39:15 +0000 (19:39 -0500)]
Use PRIMITIVE-OBJECT-SET-TYPE, not OBJECT-SET-TYPE, in EOF-OBJECT.

Neither is constant-folded, but PRIMITIVE-OBJECT-SET-TYPE is
open-coded while OBJECT-SET-TYPE is not.  (Is there a reason for
this?  An artefact of Multischeme?)

14 years agoExport ERROR:NOT-INPUT-PORT and ERROR:NOT-OUTPUT-PORT.
Taylor R Campbell [Fri, 11 Dec 2009 00:22:08 +0000 (19:22 -0500)]
Export ERROR:NOT-INPUT-PORT and ERROR:NOT-OUTPUT-PORT.

These should be exported anyway, but in particular they caused
INTEGRATE-EXTERNAL in files other than port.scm to generate
references to them out of their scope.

14 years agoReduce (<= a b ...) to (and (<= a b) ...) in genio column tracking.
Taylor R Campbell [Thu, 10 Dec 2009 23:29:17 +0000 (18:29 -0500)]
Reduce (<= a b ...) to (and (<= a b) ...) in genio column tracking.

Neither SF nor LIAR currently performs that reduction, so every
character written to a generic I/O port was causing a rest list to be
consed up and control to go through a generic microcode primitive
trampoline to do the reduction at run-time.

Also use FIX:<= rather than <=, since the numbers in question are all
fixnums.

14 years agoFix ERROR:ILLEGAL-STREAM-ELEMENT in runtime/stream.scm.
Taylor R Campbell [Wed, 9 Dec 2009 17:43:44 +0000 (12:43 -0500)]
Fix ERROR:ILLEGAL-STREAM-ELEMENT in runtime/stream.scm.

The first argument to what CONDITION-CONSTRUCTOR returns must be a
continuation, so (ERROR (MAKE-ILLEGAL-STREAM-ELEMENT ...)) doesn't
work.  Instead use CONDITION-SIGNALLER.

14 years agoFix bug in recent change to runtime/uenvir.scm's WALK-GLOBAL.
Taylor R Campbell [Fri, 4 Dec 2009 21:36:08 +0000 (16:36 -0500)]
Fix bug in recent change to runtime/uenvir.scm's WALK-GLOBAL.

MAP-ENTRY takes two arguments, not just one.

14 years agoUse weak pairs for some entries in obarray buckets.
Taylor R Campbell [Thu, 3 Dec 2009 01:53:54 +0000 (20:53 -0500)]
Use weak pairs for some entries in obarray buckets.

Entries for symbols with global bindings still use ordinary pairs.
This enables interned symbols without global bindings to be garbage-
collected.  Operations in lookup.c that create or destroy global
bindings update the relevant obarray bucket entry to strengthen or
weaken it.

In the process, fix intern.c's string_hash to accept a long string
length, rather than a uint32_t string length, so that strings longer
than 4 GB will not lose on 64-bit systems.

14 years agoFix invocation of out-of-line FIXNUM-LSH hook for i386 and x86-64.
Taylor R Campbell [Tue, 1 Dec 2009 20:24:50 +0000 (15:24 -0500)]
Fix invocation of out-of-line FIXNUM-LSH hook for i386 and x86-64.

Add comment explaining why it is unnecessary to clear the register
map before invoking the hook.

14 years agoClean up texinfo auxiliary files (e.g. imail.aux).
Matt Birkholz [Sun, 29 Nov 2009 21:23:10 +0000 (14:23 -0700)]
Clean up texinfo auxiliary files (e.g. imail.aux).

* doc/make-common.in (clean): Use new TEXINFO_ROOT variable to delete
the texinfo auxiliary files.  Also used it in place of the GNU make
specific "word" function.

* doc/imail/Makefile.in (clean): Set TEXINFO_ROOT.
* doc/sos/Makefile.in (clean): ditto
* doc/ref-manual/ref-manual (clean): ditto
* doc/user-manual/Makefile.in  (clean): ditto

14 years agoUse port/%state in genio ports.
Joe Marshall [Wed, 25 Nov 2009 00:58:00 +0000 (16:58 -0800)]
Use port/%state in genio ports.

14 years agoUse port/%state in stringio ports.
Joe Marshall [Wed, 25 Nov 2009 00:52:58 +0000 (16:52 -0800)]
Use port/%state in stringio ports.

14 years agoExport %char-set-member? to parser.
Joe Marshall [Tue, 24 Nov 2009 20:26:03 +0000 (12:26 -0800)]
Export %char-set-member? to parser.

14 years agoUse faster write-char when transcribing chars.
Joe Marshall [Tue, 24 Nov 2009 16:20:05 +0000 (08:20 -0800)]
Use faster write-char when transcribing chars.

14 years agoUse faster i/o in parse.
Joe Marshall [Tue, 24 Nov 2009 16:00:45 +0000 (08:00 -0800)]
Use faster i/o in parse.

14 years agoEnsure input and output are syntaxed early on.
Joe Marshall [Tue, 24 Nov 2009 02:25:26 +0000 (18:25 -0800)]
Ensure input and output are syntaxed early on.

14 years agoExport fast input and output operations.
Joe Marshall [Tue, 24 Nov 2009 02:23:35 +0000 (18:23 -0800)]
Export fast input and output operations.

14 years agoEnsure port is syntaxed before input and output.
Joe Marshall [Tue, 24 Nov 2009 02:12:55 +0000 (18:12 -0800)]
Ensure port is syntaxed before input and output.

14 years agoAdd fast write-char and discretionary-flush.
Joe Marshall [Tue, 24 Nov 2009 02:03:07 +0000 (18:03 -0800)]
Add fast write-char and discretionary-flush.

14 years agoAdd fast read-char and peek-char.
Joe Marshall [Tue, 24 Nov 2009 02:02:19 +0000 (18:02 -0800)]
Add fast read-char and peek-char.

14 years agoExpose fast port operators.
Joe Marshall [Tue, 24 Nov 2009 01:18:41 +0000 (17:18 -0800)]
Expose fast port operators.

14 years agoCreate some accessors that don't check PORT?
Joe Marshall [Tue, 24 Nov 2009 00:58:58 +0000 (16:58 -0800)]
Create some accessors that don't check PORT?

14 years agoDon't run-boot-inits! if saved-boot-inits is unbound.
Joe Marshall [Tue, 24 Nov 2009 00:30:41 +0000 (16:30 -0800)]
Don't run-boot-inits! if saved-boot-inits is unbound.

14 years agoAdd an assembly hook for SET-INTERRUPT-ENABLES! on i386.
Taylor R Campbell [Thu, 19 Nov 2009 19:06:57 +0000 (14:06 -0500)]
Add an assembly hook for SET-INTERRUPT-ENABLES! on i386.

14 years agoMark OVERFLOW? ignored in FIXNUM-LSH methods on i386 and x86-64.
Taylor R Campbell [Thu, 19 Nov 2009 18:34:43 +0000 (13:34 -0500)]
Mark OVERFLOW? ignored in FIXNUM-LSH methods on i386 and x86-64.

14 years agoShow only current year in start-up copyright.
Chris Hanson [Sun, 15 Nov 2009 08:27:08 +0000 (00:27 -0800)]
Show only current year in start-up copyright.

14 years agoFix references to flonum_zero and flonum_one.
Chris Hanson [Sat, 14 Nov 2009 22:29:34 +0000 (14:29 -0800)]
Fix references to flonum_zero and flonum_one.

14 years agoMake x86 and x86-64 assembly hooks for out-of-line FIXNUM-LSH.
Taylor R Campbell [Fri, 13 Nov 2009 19:52:06 +0000 (14:52 -0500)]
Make x86 and x86-64 assembly hooks for out-of-line FIXNUM-LSH.

I believe this now covers all cases, and is more reasonable than
generating for each FIXNUM-LSH invocation the nearly two dozen
instructions composing the assembly hooks.

Fixes Savannah bug 27384.

14 years agoFix bug in new double_round: flip order of arguments to copysign.
Taylor R Campbell [Fri, 13 Nov 2009 19:29:27 +0000 (14:29 -0500)]
Fix bug in new double_round: flip order of arguments to copysign.

14 years agoUse ja/jb, not jg/jl, in floating-point predicates on x86-64.
Taylor R Campbell [Fri, 13 Nov 2009 04:04:57 +0000 (23:04 -0500)]
Use ja/jb, not jg/jl, in floating-point predicates on x86-64.

14 years agoFix flonum case of ROUND to use IEEE round-to-even, per the R5RS.
Taylor R Campbell [Fri, 13 Nov 2009 03:48:28 +0000 (22:48 -0500)]
Fix flonum case of ROUND to use IEEE round-to-even, per the R5RS.

14 years agoFix i386 and x86-64 generic multiplication hooks on fixnums.
Taylor R Campbell [Thu, 12 Nov 2009 21:44:58 +0000 (16:44 -0500)]
Fix i386 and x86-64 generic multiplication hooks on fixnums.

Before multiplying, both tags must be cleared, and one of the
operands must be shifted to include a factor of 2^6.  Shifting both
operands, so that there is an extra factor of 2^12, or not clearing
the tag on both operands, is wrong.  However, this didn't affect any
real code, since the fixnum case of generic multiplication is always
open-coded by the compiler unless you futz with compiler switches.

14 years agoCache PORT/OPERATION/READ-CHAR in INPUT-PORT/READ-LINE and INPUT-PORT/READ-STRING.
Joe Marshall [Thu, 12 Nov 2009 19:29:35 +0000 (11:29 -0800)]
Cache PORT/OPERATION/READ-CHAR in INPUT-PORT/READ-LINE and INPUT-PORT/READ-STRING.

14 years agoRemove redundant PORT? test.
Joe Marshall [Thu, 12 Nov 2009 19:24:15 +0000 (11:24 -0800)]
Remove redundant PORT? test.

14 years agoFix bug in x86-64 instruction encoder: REX prefix must be last.
Taylor R Campbell [Thu, 12 Nov 2009 18:05:26 +0000 (13:05 -0500)]
Fix bug in x86-64 instruction encoder: REX prefix must be last.

(Thanks, AMD, for making it seem like the 66, F2, and F3 bytes are
part of the `opcode' all throughout the media instruction set
manual.)

Also change ([U]COMISF ...) to be ([U]COMIF S ...) for consistency.

14 years agoFix headings on x86-64's instr1.scm, instr2.scm, and lapgen.scm.
Taylor R Campbell [Wed, 11 Nov 2009 21:37:26 +0000 (16:37 -0500)]
Fix headings on x86-64's instr1.scm, instr2.scm, and lapgen.scm.

14 years agoOpen-code floating-point primitives on AMD x86-64.
Taylor R Campbell [Wed, 11 Nov 2009 20:24:13 +0000 (15:24 -0500)]
Open-code floating-point primitives on AMD x86-64.

Only lightly tested.  Use with caution.  Slippery when wet.  Keep out
of reach of children.

15 years agoTest stack overflow in LIARC interrupt checks.
Taylor R Campbell [Mon, 9 Nov 2009 14:44:11 +0000 (09:44 -0500)]
Test stack overflow in LIARC interrupt checks.

15 years agoProvide default binding for MIT_SCHEME_EXE.
Chris Hanson [Sun, 8 Nov 2009 04:55:56 +0000 (20:55 -0800)]
Provide default binding for MIT_SCHEME_EXE.

15 years agoAdd quote marks to instances of MIT_SCHEME_EXE to provide some
Chris Hanson [Sun, 8 Nov 2009 04:55:23 +0000 (20:55 -0800)]
Add quote marks to instances of MIT_SCHEME_EXE to provide some
protection from the shell.

15 years agoShow "aborted" when leaving the extent of an unfinished notification
Chris Hanson [Sun, 8 Nov 2009 01:06:26 +0000 (17:06 -0800)]
Show "aborted" when leaving the extent of an unfinished notification
thunk.

15 years agoFix typo.
Chris Hanson [Fri, 6 Nov 2009 23:57:25 +0000 (15:57 -0800)]
Fix typo.

15 years agoMerge git pull.
Chris Hanson [Fri, 6 Nov 2009 22:06:13 +0000 (14:06 -0800)]
Merge git pull.

15 years agoAdjust script so that MIT_SCHEME_EXE is just the executable name, not
Chris Hanson [Fri, 6 Nov 2009 22:01:45 +0000 (14:01 -0800)]
Adjust script so that MIT_SCHEME_EXE is just the executable name, not
a partial shell command.  Figure out stage library directory using
wildcard, since it now has an arch-specific suffix.  Allow override of
default stage0 dirs.

15 years agoFix thinko: the boot-root executable is _not_ $(MIT_SCHEME_EXE).
Chris Hanson [Fri, 6 Nov 2009 21:58:38 +0000 (13:58 -0800)]
Fix thinko: the boot-root executable is _not_ $(MIT_SCHEME_EXE).

15 years agoFix typo.
Chris Hanson [Fri, 6 Nov 2009 21:58:00 +0000 (13:58 -0800)]
Fix typo.

15 years agoFix various minor problems introduced in the configure scripts.
Taylor R Campbell [Fri, 6 Nov 2009 21:01:58 +0000 (16:01 -0500)]
Fix various minor problems introduced in the configure scripts.

Also kludge up a fix to etc/run-three-stages.

15 years agoMerge branch 'master' of ssh://git.sv.gnu.org/srv/git/mit-scheme
Taylor R Campbell [Fri, 6 Nov 2009 05:41:15 +0000 (00:41 -0500)]
Merge branch 'master' of ssh://git.sv.gnu.org/srv/git/mit-scheme

15 years agoSimplify x86-64 utility interface, and nuke all x87 code from it.
Taylor R Campbell [Fri, 6 Nov 2009 04:40:26 +0000 (23:40 -0500)]
Simplify x86-64 utility interface, and nuke all x87 code from it.

The calling convention for microcode utilities now more closely
matches the standard calling convention for C on the AMD64, which
reduces the amount of code needed in scheme_to_interface.  The i386
hack to split the assembly hook addresses between negative addresses
and positive addresses is no more; most of what little benefit it
added on the i386, it ceased to add on x86-64, since no hooks fit in
positive byte offsets from the register block start any longer, and
only sixteen would fit in negative byte offsets.  Perhaps later it
would be worth deciding which sixteen deserve byte offsets (e.g.,
scheme-to-interface certainly would), but this is simpler for now.
Note that there is still a space advantage to invoking a hook (jump
to an offset from Registers) over invoking an interface (move its
number to AL, jump to scheme-to-interface), since invoking an
interface requires going through a hook anyway.

These change serves mainly to simplify the code, not to improve
performance, although shuffling the calling convention may improve
performance as a bonus.

The x87 code appears to have been causing problems, and will later
be replaced by the AMD64's 128-bit media (SSEn) instructions anyway.
The compiler still has some x87 vestiges left in it, but not in any
code that is hit, and nearly all of it is commented out now.

*** NOTE:  Since this changes the calling convention of utilities
from compiled code, it breaks all existing x86-64 .com files, which
you must recompile with the new compiler.  This means that you can't
straightforwardly rebuild Scheme the usual way from a prior x86-64
installation.  The easiest way to proceed is to start again from a
LIARC snapshot and rebootstrap the x86-64 code.  Expect more of this
to come; in particular, since we now have a reasonable number of
machine registers, it may be worthwhile to assign one to be the
return value register.