mit-scheme.git
35 years agoFix bug in Do_Compiled_Entry: OBJECT_NEW_DATUM was incorrectly used
Guillermo J. Rozas [Thu, 30 Nov 1989 05:32:10 +0000 (05:32 +0000)]
Fix bug in Do_Compiled_Entry: OBJECT_NEW_DATUM was incorrectly used
for MAKE_OBJECT, and thus all compiled entries were being dumped as
nulls with non-zero datum fields.

35 years agoFix bug in boot.c by which GC_Reserve was set after MemTop was
Guillermo J. Rozas [Thu, 30 Nov 1989 03:04:15 +0000 (03:04 +0000)]
Fix bug in boot.c by which GC_Reserve was set after MemTop was
computed in Clear_Memory.  GC_Reserve is now set by Clear_Memory.

Rename Heap_In_Low_Memory to HEAP_IN_LOW_MEMORY.

Clean up Spectrum stuff and remove previous version of the quad bit
kludge which forced 8 bit type codes to be used.

35 years agoAdd a comment about a future improvement to eliminate the delay slot
Guillermo J. Rozas [Tue, 28 Nov 1989 21:12:51 +0000 (21:12 +0000)]
Add a comment about a future improvement to eliminate the delay slot
nullification in execute cache cells.

35 years agoDocument trampolines and interrupt checks.
Guillermo J. Rozas [Tue, 28 Nov 1989 15:56:16 +0000 (15:56 +0000)]
Document trampolines and interrupt checks.

35 years agoMake EXTRACT_ABSOLUTE_ADDRESS and STORE_ABSOLUTE_ADDRESS call
Guillermo J. Rozas [Tue, 28 Nov 1989 13:08:51 +0000 (13:08 +0000)]
Make EXTRACT_ABSOLUTE_ADDRESS and STORE_ABSOLUTE_ADDRESS call
out-of-line procedures which use bit fields rather than masks.

35 years agoAdd a IN_CMPINT_C flag so that cmpint2.h can insert code.
Guillermo J. Rozas [Tue, 28 Nov 1989 13:07:50 +0000 (13:07 +0000)]
Add a IN_CMPINT_C flag so that cmpint2.h can insert code.

35 years agoFix segment and subsegment directives.
Guillermo J. Rozas [Tue, 28 Nov 1989 05:06:33 +0000 (05:06 +0000)]
Fix segment and subsegment directives.
Fix table load instruction to use short pointer-specified segment.

35 years agoAdd a missing + sign in the computation of REGBLOCK_SIZE.
Guillermo J. Rozas [Tue, 28 Nov 1989 05:03:10 +0000 (05:03 +0000)]
Add a missing + sign in the computation of REGBLOCK_SIZE.

35 years agoFix the encoding of the space register on the instructions that take
Guillermo J. Rozas [Tue, 28 Nov 1989 05:00:45 +0000 (05:00 +0000)]
Fix the encoding of the space register on the instructions that take
a 3-bit space register code.

Remove COMPILER_HOOK_SIZE, no longer needed.

Remove ASM_REGBLOCK and ASM_RESET_HOOK.

35 years agoWhen interconverting ticks and seconds, represent seconds as inexact
Chris Hanson [Tue, 28 Nov 1989 01:28:19 +0000 (01:28 +0000)]
When interconverting ticks and seconds, represent seconds as inexact
numbers and ticks as exact integers.

35 years agoFix a bug in bignum printing.
Guillermo J. Rozas [Mon, 27 Nov 1989 21:57:01 +0000 (21:57 +0000)]
Fix a bug in bignum printing.

35 years agoConditionalize according to HAS_COMPILER_SUPPORT and insert the code
Guillermo J. Rozas [Mon, 27 Nov 1989 20:25:42 +0000 (20:25 +0000)]
Conditionalize according to HAS_COMPILER_SUPPORT and insert the code
previously in compiler.c for the case when there is no support.

35 years agoRemove casts from scalars on the left hand side of assignments. GCC
Guillermo J. Rozas [Mon, 27 Nov 1989 20:23:19 +0000 (20:23 +0000)]
Remove casts from scalars on the left hand side of assignments.  GCC
understands that, but the HP C compiler does not.

35 years agoRemove casts from scalars on the left hand side of assignments. GCC
Guillermo J. Rozas [Mon, 27 Nov 1989 20:22:42 +0000 (20:22 +0000)]
Remove casts from scalars on the left hand side of assignments.  GCC
understands that, but the HP C compiler does not.

35 years agoFix the comment specifying where further documentation may be found.
Guillermo J. Rozas [Mon, 27 Nov 1989 20:21:20 +0000 (20:21 +0000)]
Fix the comment specifying where further documentation may be found.

35 years agoChange all variables assigned by EXTRACT_EXECUTE_CACHE_ADDRESS, etc.
Guillermo J. Rozas [Mon, 27 Nov 1989 20:20:26 +0000 (20:20 +0000)]
Change all variables assigned by EXTRACT_EXECUTE_CACHE_ADDRESS, etc.
to have consisten types.

35 years agoFix typo.
Guillermo J. Rozas [Mon, 27 Nov 1989 18:25:40 +0000 (18:25 +0000)]
Fix typo.

35 years agoFix the LDIL assembly and disassembly. The bits are not contiguous!
Guillermo J. Rozas [Mon, 27 Nov 1989 18:16:04 +0000 (18:16 +0000)]
Fix the LDIL assembly and disassembly.  The bits are not contiguous!

35 years agoAdd save/restore code for registers 15-18, also callee-saves.
Guillermo J. Rozas [Mon, 27 Nov 1989 16:14:00 +0000 (16:14 +0000)]
Add save/restore code for registers 15-18, also callee-saves.

35 years agoFinish translating to Spectrum instruction set.
Guillermo J. Rozas [Mon, 27 Nov 1989 16:12:48 +0000 (16:12 +0000)]
Finish translating to Spectrum instruction set.

35 years agoMake R3 hold trampoline_to_interface rather than scheme_to_interface.
Guillermo J. Rozas [Mon, 27 Nov 1989 03:31:40 +0000 (03:31 +0000)]
Make R3 hold trampoline_to_interface rather than scheme_to_interface.
scheme_to_interface is 4 bytes beyond trampoline_to_interface, so
it can be reached from the same register.

Fix the space register in the BLE instruction that invokes the
handler. We are jumping into code space, and the BLE instruction
does not understand short pointers.

35 years agoInitial revision
Guillermo J. Rozas [Mon, 27 Nov 1989 03:29:16 +0000 (03:29 +0000)]
Initial revision

35 years agoClean up the mess with machine_word.
Guillermo J. Rozas [Mon, 27 Nov 1989 01:03:04 +0000 (01:03 +0000)]
Clean up the mess with machine_word.

35 years agoClean up the mess with machine_word.
Guillermo J. Rozas [Sun, 26 Nov 1989 17:38:57 +0000 (17:38 +0000)]
Clean up the mess with machine_word.

35 years agoFix comment in header.
Guillermo J. Rozas [Sun, 26 Nov 1989 01:50:00 +0000 (01:50 +0000)]
Fix comment in header.

35 years agoUpdate to match the newer cmpint-md.h
Guillermo J. Rozas [Thu, 23 Nov 1989 21:32:46 +0000 (21:32 +0000)]
Update to match the newer cmpint-md.h

35 years agoInitial revision
Guillermo J. Rozas [Thu, 23 Nov 1989 19:52:04 +0000 (19:52 +0000)]
Initial revision

35 years agoChange the comment at the beginning to make it a little clearer and
Guillermo J. Rozas [Thu, 23 Nov 1989 19:51:10 +0000 (19:51 +0000)]
Change the comment at the beginning to make it a little clearer and
general.

Add shortcircuit_apply.

Reorganize the code so that the core, the optimizations, and the
backwards compatibility code are clearly separated.

35 years agoFix a bug backing out of apply. The procedure and number of arguments
Guillermo J. Rozas [Wed, 22 Nov 1989 16:29:55 +0000 (16:29 +0000)]
Fix a bug backing out of apply.  The procedure and number of arguments
were not being pused on the stack consistently, so there were some
paths that could not restart on interrupt, for example.

35 years agoRemove the patch in comentry_lexpr_apply used to temporarily overcome
Guillermo J. Rozas [Tue, 21 Nov 1989 23:32:09 +0000 (23:32 +0000)]
Remove the patch in comentry_lexpr_apply used to temporarily overcome
the fact that dynamic links were not correctly preserved.
The compiler has been fixed, and the patch is no longer necessary.

35 years agoFix a bug in comutil_operator_lexpr_trap.
Guillermo J. Rozas [Tue, 21 Nov 1989 23:31:05 +0000 (23:31 +0000)]
Fix a bug in comutil_operator_lexpr_trap.
The number of arguments stored in the trampoline is 1 greater than the
number of actual arguments passed, but the primitive convention
expects the correct number.

35 years agoFix a bug in local lexprs. The dynamic link register was not
Guillermo J. Rozas [Tue, 21 Nov 1989 22:21:34 +0000 (22:21 +0000)]
Fix a bug in local lexprs.  The dynamic link register was not
preserved accross the call to lexpr-apply.  On the 68k, a gc in
lexpr-apply would corrupt the dynamic link.  On the portable
interface, it was always corrupted.

35 years agoIf `fasload' fails to load debugging information for some reason,
Chris Hanson [Tue, 21 Nov 1989 00:00:31 +0000 (00:00 +0000)]
If `fasload' fails to load debugging information for some reason,
recover and pretend that the debugging info doesn't exist.

35 years agoSimple changes:
Guillermo J. Rozas [Mon, 20 Nov 1989 23:19:36 +0000 (23:19 +0000)]
Simple changes:

- Fix a bug: interface_to_C was not restoring the registers saved by
C_to_interface.

- Add scheme_to_interface_jsr entry point.

- Add a temporary patch to lexpr_apply to prevent the dynamic link
register from being clobbered.

- Add some conditionally assembled code to keep a limited history of
calls from compiled code to the interface.

35 years agoFix a small bug in compiler_interrupt_common: state was not being
Guillermo J. Rozas [Mon, 20 Nov 1989 23:13:16 +0000 (23:13 +0000)]
Fix a small bug in compiler_interrupt_common: state was not being
restored when the interrupt was dismissed.

35 years agoRules that perform index->fixnum conversions must use arithmetic left
Chris Hanson [Wed, 15 Nov 1989 02:48:07 +0000 (02:48 +0000)]
Rules that perform index->fixnum conversions must use arithmetic left
shift so that proper testing for overflow can occur.  The reason:
these rules also get invoked by generic arithmetic because the code
compressor sees them and combines instruction pairs to use them.

35 years agoAdd several missing `int:' prefixes to `ratnum->flonum'. Fix argument
Chris Hanson [Wed, 15 Nov 1989 02:47:09 +0000 (02:47 +0000)]
Add several missing `int:' prefixes to `ratnum->flonum'.  Fix argument
order to `real:atan2' in `complex:angle'.  Fix exact integer argument
test in `real:atan2'.  Add code to perform exact `expt' when the first
argument is a recnum and the second is an exact integer.

35 years agoDefine `int:>' as an integrable constant.
Chris Hanson [Wed, 15 Nov 1989 02:44:07 +0000 (02:44 +0000)]
Define `int:>' as an integrable constant.

35 years agoRules that perform index->fixnum conversions must use arithmetic left
Chris Hanson [Wed, 15 Nov 1989 02:40:21 +0000 (02:40 +0000)]
Rules that perform index->fixnum conversions must use arithmetic left
shift so that proper testing for overflow can occur.  The reason:
these rules also get invoked by generic arithmetic because the code
compressor sees them and combines instruction pairs to use them.

35 years agoAdd a heuristic check to fasload so that it won't get into an infinite
Guillermo J. Rozas [Sat, 11 Nov 1989 19:13:17 +0000 (19:13 +0000)]
Add a heuristic check to fasload so that it won't get into an infinite
loop trying to load something when there is no space.

Merge in Mike Clarkson's changes to x11term.c

Add a new file: x11xtra.c which includes some additional x11 xterm
functionality (scrolling and screen saving/restoring).

35 years agoFixed os/trim-pathname-string() to have "end" point to the end of the
Mark Friedman [Fri, 10 Nov 1989 16:18:42 +0000 (16:18 +0000)]
Fixed os/trim-pathname-string() to have "end" point to the end of the
string, not to one past the end. The old behavior caused it to barf
when presented with a string with a slash at the end (it barfed on the
string-ref in "... ((memv ..."

35 years agoFix bug in *, t he call to reduce was incorrect.
Guillermo J. Rozas [Thu, 9 Nov 1989 22:07:48 +0000 (22:07 +0000)]
Fix bug in *, t he call to reduce was incorrect.

35 years agoInitial revision
Chris Hanson [Thu, 9 Nov 1989 04:02:53 +0000 (04:02 +0000)]
Initial revision

35 years agoAdd optional arithmetic-interface code.
Gerald Jay Sussman [Thu, 9 Nov 1989 03:45:06 +0000 (03:45 +0000)]
Add optional arithmetic-interface code.

35 years agoFix a bug in compiled_entry_type by which lexprs were classified as
Guillermo J. Rozas [Tue, 7 Nov 1989 06:37:27 +0000 (06:37 +0000)]
Fix a bug in compiled_entry_type by which lexprs were classified as
random entries.  The min arity was read as the max, and viceversa.

35 years agoSecond batch of fixes to get scheme up:
Guillermo J. Rozas [Mon, 6 Nov 1989 22:04:26 +0000 (22:04 +0000)]
Second batch of fixes to get scheme up:

Fix EXECUTE_CACHE_ENTRIES_TO_COUNT: It was using the free variable
count rather than the parameter entries.

35 years agoSecond batch of fixes to get scheme up:
Guillermo J. Rozas [Mon, 6 Nov 1989 22:03:29 +0000 (22:03 +0000)]
Second batch of fixes to get scheme up:

- Fix the error backouts:  They cannot use the expression register for
recovery information since the interpreter bashes it with the size of
the compiled code stack segment.

- Fix a couple of problems with the linker:
on restart it must restore the env register.
the recovery count was saved incorrectly (bad macro).

35 years agoFix bug in force_definition to return error code when attempting to
Guillermo J. Rozas [Mon, 6 Nov 1989 22:00:00 +0000 (22:00 +0000)]
Fix bug in force_definition to return error code when attempting to
force a definition in the empty environment.

35 years agoFirst batch of changes to run scheme:
Guillermo J. Rozas [Mon, 6 Nov 1989 17:37:30 +0000 (17:37 +0000)]
First batch of changes to run scheme:

Add MAKE_LINKAGE_SECTION_HEADER definition.

35 years agoFirst batch of changes to run scheme:
Guillermo J. Rozas [Mon, 6 Nov 1989 17:35:29 +0000 (17:35 +0000)]
First batch of changes to run scheme:

Add all the hooks needed for compatibility with the current compiler.

Add an ext.l in comentry_apply.

Add an entry in the register block for trampoline_to_interface.

Clean up the comentry_interrupt_procedure heuristic by invoking two
different comutils: comutil_interrupt_procedure (no dlink) and
comutil_interrupt_dlink.

35 years agoFirst batch of changes to run scheme:
Guillermo J. Rozas [Mon, 6 Nov 1989 17:33:18 +0000 (17:33 +0000)]
First batch of changes to run scheme:

Add ASM_REGISTER_BLOCK definition and ASM_RESET_HOOK.

A6_OFFSET was incorrect.  It corresponded to scheme_to_interface, not
trampoline_to_interface.

Change the definitions of FORMAT_BYTE_MUMBLE and FORMAT_WORD_MUMBLE to
not depend on signed numbers being correctly cast.

35 years agoFirst batch of changes to run scheme:
Guillermo J. Rozas [Mon, 6 Nov 1989 17:31:23 +0000 (17:31 +0000)]
First batch of changes to run scheme:

- Fix syntax problems.

- The trampoline arity table was accessed incorrectly.  The incorrect
index was being computed.

- open_gap had an off-by-one error: The procedure is not on the stack,
so it does not need to be moved.

35 years ago* Change variable-indirection pass to occur after closure analysis.
Chris Hanson [Thu, 2 Nov 1989 08:08:54 +0000 (08:08 +0000)]
* Change variable-indirection pass to occur after closure analysis.
Disable variable-indirection if either the source or target variable
is closed-over.

* Change RTL code-compression to permit compression of
`offset-address' expressions across multiple instructions.  Add two
new rules needed to accomplish this for the standard static-link setup
code.  The goal of this modification is to permit the use of the "pea"
instruction when pushing static-links.

35 years agoFix bug in bchmmg.c by which weak pairs whose cars were compiled
Guillermo J. Rozas [Thu, 2 Nov 1989 04:01:56 +0000 (04:01 +0000)]
Fix bug in bchmmg.c by which weak pairs whose cars were compiled
procedures would not be updated correctly.

35 years agoAdd an extra line to remove junk.c before generating xmakefile.
Guillermo J. Rozas [Thu, 2 Nov 1989 03:45:25 +0000 (03:45 +0000)]
Add an extra line to remove junk.c before generating xmakefile.

35 years agoAdd the instruction typedef (moved here from cmpint.c).
Guillermo J. Rozas [Wed, 1 Nov 1989 18:58:03 +0000 (18:58 +0000)]
Add the instruction typedef (moved here from cmpint.c).

35 years agoRemove the instruction typedef (in cmpint2.h now).
Guillermo J. Rozas [Wed, 1 Nov 1989 18:57:07 +0000 (18:57 +0000)]
Remove the instruction typedef (in cmpint2.h now).

35 years agoInsert cmpgc-stub.h after conditionalizing according to
Guillermo J. Rozas [Wed, 1 Nov 1989 18:54:12 +0000 (18:54 +0000)]
Insert cmpgc-stub.h after conditionalizing according to
HAS_COMPILER_SUPPORT .

Rename to cmpgc.h from cmpgc-portable.h

35 years agoInitial revision
Guillermo J. Rozas [Wed, 1 Nov 1989 18:46:41 +0000 (18:46 +0000)]
Initial revision

35 years agoFix bug in vector-cons by which it was not checking for GC.
Guillermo J. Rozas [Tue, 31 Oct 1989 12:43:08 +0000 (12:43 +0000)]
Fix bug in vector-cons by which it was not checking for GC.

35 years agoReimplement flonum->ratnum conversion to guarantee that the ratnum
Chris Hanson [Tue, 31 Oct 1989 05:06:08 +0000 (05:06 +0000)]
Reimplement flonum->ratnum conversion to guarantee that the ratnum
chosen is the closest representation possible; this is required by
definition of `inexact->exact'.  Previously we used `rationalize' to
find "best" answer in a given range, which is not strictly correct by
the definition.

35 years agoReimplement ratnum->flonum conversion to guarantee that the flonum
Chris Hanson [Tue, 31 Oct 1989 04:41:28 +0000 (04:41 +0000)]
Reimplement ratnum->flonum conversion to guarantee that the flonum
chosen is the closest representation possible.  Also extend
`number->string' to handle a few more of the old formats, specifically
the radix conversion formats.

35 years agoReimplement ratnum->flonum conversion to guarantee that the flonum
Chris Hanson [Tue, 31 Oct 1989 03:35:04 +0000 (03:35 +0000)]
Reimplement ratnum->flonum conversion to guarantee that the flonum
chosen is the closest representation possible.  Also extend
`number->string' to handle a few more of the old formats, specifically
the radix conversion formats.

35 years agoForce the output to have a decimal point even when it can be written
Chris Hanson [Mon, 30 Oct 1989 22:36:38 +0000 (22:36 +0000)]
Force the output to have a decimal point even when it can be written
without one.  This is explicitly required by the text of the report.

35 years agoVarious changes to the garbage collector and other relocators to
Guillermo J. Rozas [Sat, 28 Oct 1989 15:39:09 +0000 (15:39 +0000)]
Various changes to the garbage collector and other relocators to
accomodate machines where jsr-style instructions do not encode the
target address directly and contiguously.

Some changes to cmp68kgc.h to better match the portable version,
cmpgc-portable.h .

Split the defaulting of various macros from gccode.h into
cmpgc-stub.h .  gccode.h includes cmpgc.h which should be a copy of (or
link to) cmp68kgc.h, cmpvaxgc.h, cmpgc-portable.g, or cmpgc-stub.h

35 years agoChange COMPILED_CLOSURE_ENTRY_SIZE to be in machine_word s. The
Guillermo J. Rozas [Sat, 28 Oct 1989 15:30:10 +0000 (15:30 +0000)]
Change COMPILED_CLOSURE_ENTRY_SIZE to be in machine_word s.  The
closure entries may be packed tighter than objects.

35 years agoChange MANIFEST_CLOSURE_COUNT, FIRST_MANIFEST_CLOSURE_ENTRY, and
Guillermo J. Rozas [Sat, 28 Oct 1989 15:28:07 +0000 (15:28 +0000)]
Change MANIFEST_CLOSURE_COUNT, FIRST_MANIFEST_CLOSURE_ENTRY, and
MANIFEST_CLOSURE_END to accomodate BCHSCHEME.

35 years agoFix some random bugs in frexp that should have been caught when it was
Chris Hanson [Sat, 28 Oct 1989 11:00:32 +0000 (11:00 +0000)]
Fix some random bugs in frexp that should have been caught when it was
written.

35 years agoMust discard CSE information at any kind of unknown invocation.
Chris Hanson [Sat, 28 Oct 1989 09:41:27 +0000 (09:41 +0000)]
Must discard CSE information at any kind of unknown invocation.

35 years agoFix bug which caused "1e100" to be rejected as number syntax.
Chris Hanson [Sat, 28 Oct 1989 06:47:35 +0000 (06:47 +0000)]
Fix bug which caused "1e100" to be rejected as number syntax.

35 years agoFix `real:expt' so that it correctly handles negative base. Add
Chris Hanson [Sat, 28 Oct 1989 06:46:39 +0000 (06:46 +0000)]
Fix `real:expt' so that it correctly handles negative base.  Add
special case for flonum base and integer exponent.

35 years agoRemove restriction from first argument of primitive `flonum-expt'.
Chris Hanson [Sat, 28 Oct 1989 06:44:35 +0000 (06:44 +0000)]
Remove restriction from first argument of primitive `flonum-expt'.
Rely on runtime system (or user) to provide correct restrictions.

35 years agoFix typo in `real:min'.
Chris Hanson [Fri, 27 Oct 1989 23:58:51 +0000 (23:58 +0000)]
Fix typo in `real:min'.

35 years agoChange the way that closure and execute cache entry points are
Guillermo J. Rozas [Fri, 27 Oct 1989 13:28:23 +0000 (13:28 +0000)]
Change the way that closure and execute cache entry points are
extracted to accomodate machines that have the addresses "smeared out"
over multiple instructions.

Change the way that closures with multiple entry points are detected.

35 years agoInitial revision
Guillermo J. Rozas [Fri, 27 Oct 1989 13:27:07 +0000 (13:27 +0000)]
Initial revision

35 years agoUpdate to match latest version of cmp68020, ie. make the numeric hooks
Guillermo J. Rozas [Fri, 27 Oct 1989 13:26:24 +0000 (13:26 +0000)]
Update to match latest version of cmp68020, ie. make the numeric hooks
apply the values contained in the fixed objects vector.

35 years agoDon't perform variable-indirection optimization on variables that are
Chris Hanson [Fri, 27 Oct 1989 07:57:36 +0000 (07:57 +0000)]
Don't perform variable-indirection optimization on variables that are
introduced to model continuations.

35 years agoDon't perform variable-indirection optimization on variables that are
Chris Hanson [Fri, 27 Oct 1989 07:27:13 +0000 (07:27 +0000)]
Don't perform variable-indirection optimization on variables that are
introduced to model continuations.

35 years agoIn `number->string', handle a radix argument of '(heur).
Chris Hanson [Fri, 27 Oct 1989 07:25:24 +0000 (07:25 +0000)]
In `number->string', handle a radix argument of '(heur).

35 years agoIn `number->string', handle a radix argument of '(heur).
Chris Hanson [Fri, 27 Oct 1989 07:24:51 +0000 (07:24 +0000)]
In `number->string', handle a radix argument of '(heur).

35 years agoDon't call `compiled-procedure/name' on a compiled-entry unless that
Chris Hanson [Fri, 27 Oct 1989 07:20:32 +0000 (07:20 +0000)]
Don't call `compiled-procedure/name' on a compiled-entry unless that
entry is known to be a procedure type.

35 years agoFix bug finding parent of stack-environment when there is a
Chris Hanson [Fri, 27 Oct 1989 07:19:51 +0000 (07:19 +0000)]
Fix bug finding parent of stack-environment when there is a
continuation block between the starting block and the parent block.

35 years ago*** empty log message ***
Chris Hanson [Fri, 27 Oct 1989 04:43:54 +0000 (04:43 +0000)]
*** empty log message ***

35 years agoForgot to export `denominator'.
Chris Hanson [Fri, 27 Oct 1989 04:43:21 +0000 (04:43 +0000)]
Forgot to export `denominator'.

35 years agoWhen parsing a badly-formed number with a #i prefix, don't blindly
Chris Hanson [Fri, 27 Oct 1989 04:42:59 +0000 (04:42 +0000)]
When parsing a badly-formed number with a #i prefix, don't blindly
attempt to map the result to inexact; test to see if the number is
well-formed first.

35 years agoInitial revision
Chris Hanson [Fri, 27 Oct 1989 02:03:35 +0000 (02:03 +0000)]
Initial revision

35 years ago* Change generic arithmetic primitives to be trampolines into some
Chris Hanson [Thu, 26 Oct 1989 07:50:01 +0000 (07:50 +0000)]
* Change generic arithmetic primitives to be trampolines into some
procedures that are stored in the fixed objects vector.  This permits
some upwards compatibility of new R4RS arithmetic and gives the
compiler a method for invoking the binary arithmetic operators which
are normally not available in the global environment.  It also
provides a solution to the problem of making generic arithmetic
available during the cold load.  The compiled-code interface bypasses
the primitive interface and directly applies these trampolines, thus
avoiding the overhead of the interface when the trampoline is also
compiled.

* Increase the default constant size of the regular band to 400, and
the heap size of the compiler band to 1000.

35 years ago* Rewrite the flonum lap-generation rules to perform register-reusing,
Chris Hanson [Thu, 26 Oct 1989 07:41:21 +0000 (07:41 +0000)]
* Rewrite the flonum lap-generation rules to perform register-reusing,
as is already the case for fixnum rules.  Generalize some tools so
that most code can be shared between fixnum and flonum rules.

* Implement assorted changes to conform to new R4RS arithmetic.

* Redesign closure-analysis/procedure-undrifting.  New design should
perform better than old, and I believe that this one is substantially
more correct.

* Add "variable indirections", which come into play when the a
variable is known to be bound to the value of another variable which
is bound in an ancestor frame of the first variable (i.e. the first
variable can be considered an alias for the second).

* Don't inline-code procedures with rest variables.

* New pass notices when two returns are equivalent, and merges them.
Another new pass notices when the tails of two basic blocks are
equivalent, and merges them.  These two work together to eliminate
multiple copies of suffixes in various cases (most notably
predicates).

* Introduce concept that certain procedures are "boolean-valued" and
can be treated specially if they appear in the predicate of a
disjunction.

* Disconnect registerizable-parameter code because it introduces
instability in the three-stage compilation test.  This code doesn't
seem to be doing much right now anyway.

* Fix bug in "remote links": must use another addressing-mode when the
offset is too large to fit in 16 bits.

* Add rule to permit static-links to be pushed in two instructions
instead of three on the 68020.

* Change RTL constructors to reduce the number of intermediate
registers generated for trivial expressions.  Improve definition of
"trivial expression" to include certain kinds of constants.

* Change open-coded combinations in the case where they appear in
reduction position, and where the open-coding of the combination will
include a close-coded call.  The new strategy is to setup the
arguments as if the combination was close-coded, then open-code
assuming the arguments are in those positions.  This has the advantage
of allowing the internal close-coded call to be transformed into a
jump with no clumsy argument manipulation required.

* Change RTL CSE to treat small (8-bit) numeric constants as cheaper
than registers.

35 years agoInitial revision
Chris Hanson [Thu, 26 Oct 1989 07:40:33 +0000 (07:40 +0000)]
Initial revision

35 years ago* All-new arithmetic and number I/O conforms with R4RS.
Chris Hanson [Thu, 26 Oct 1989 06:50:33 +0000 (06:50 +0000)]
* All-new arithmetic and number I/O conforms with R4RS.

* The variable

  (access flonum-unparser-hook (->environment '(runtime number)))

accepts two arguments (the flonum and the radix), and returns either
the string representation or #f.

* `*unparser-radix*' is recognized only when it is one of (2 8 10 16),
and it affects only exact rationals.  Inexact numbers and non-rational
complex numbers are always printed in base 10.  The radix prefix is
suppressed in base 10, or in the other bases when the number's
absolute value is less than the radix.

* Written representation of compiled entries changed to show the
"block number".

* `pp' no longer accepts hash numbers as arguments; use #@ if you want
that effect (you will need to type '#@ for scode objects).

* `trace'/`break' output changed to show arguments more clearly.

35 years agoInitial revision
Chris Hanson [Thu, 26 Oct 1989 06:49:01 +0000 (06:49 +0000)]
Initial revision

35 years agoA variety of changes to complement the installation of the R4RS
Chris Hanson [Thu, 26 Oct 1989 06:28:19 +0000 (06:28 +0000)]
A variety of changes to complement the installation of the R4RS
arithmetic system in the runtime system.  Most of these changes add
new expansions for arithmetic operations.

35 years agoMinor reorganization.
Guillermo J. Rozas [Thu, 26 Oct 1989 04:25:29 +0000 (04:25 +0000)]
Minor reorganization.

35 years agoWrite the initialization code.
Guillermo J. Rozas [Thu, 26 Oct 1989 04:23:27 +0000 (04:23 +0000)]
Write the initialization code.
Add the SCHEME_UTILITY table and define the TRAMPOLINE_K_ numbers.

35 years agoMore cleaning of the trampoline code so that the assembly language
Guillermo J. Rozas [Tue, 24 Oct 1989 06:05:08 +0000 (06:05 +0000)]
More cleaning of the trampoline code so that the assembly language
is easier to write.

35 years agoSome cleanup of the trampoline code.
Guillermo J. Rozas [Mon, 23 Oct 1989 21:40:57 +0000 (21:40 +0000)]
Some cleanup of the trampoline code.

35 years agoUpdate to use new microcode types and macros.
Guillermo J. Rozas [Mon, 23 Oct 1989 21:36:48 +0000 (21:36 +0000)]
Update to use new microcode types and macros.

35 years agoAdd missing SCHEME_UTILITYs.
Guillermo J. Rozas [Mon, 23 Oct 1989 16:46:59 +0000 (16:46 +0000)]
Add missing SCHEME_UTILITYs.
Fix a bug in comutil_link, and make the restart block match the 68k
and vax versions.
Reorganize and reformat slightly.

35 years agoChange the way that SCHEME_UTILITYs are invoked, and add all of the
Guillermo J. Rozas [Mon, 23 Oct 1989 03:01:25 +0000 (03:01 +0000)]
Change the way that SCHEME_UTILITYs are invoked, and add all of the
utilities currently being used by the compiler.

35 years agoAdd proc_type for the IBM RT.
Guillermo J. Rozas [Fri, 20 Oct 1989 12:39:28 +0000 (12:39 +0000)]
Add proc_type for the IBM RT.