mit-scheme.git
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.

35 years agoInitial revision
Guillermo J. Rozas [Fri, 20 Oct 1989 12:36:54 +0000 (12:36 +0000)]
Initial revision

35 years agoRemove static keyword from the declaration of memory_base. GCC does
Guillermo J. Rozas [Fri, 20 Oct 1989 04:44:00 +0000 (04:44 +0000)]
Remove static keyword from the declaration of memory_base.  GCC does
not like something to be declared both extern and static, and it is
declared extern in object.h, included here.

35 years agoFix syntax/cond so that:
Guillermo J. Rozas [Sat, 14 Oct 1989 15:48:39 +0000 (15:48 +0000)]
Fix syntax/cond so that:
a: (cond) is legal.
b: (cond 3) gives a reasonable error message.

35 years agoFix a bug in the error exits for &> .
Guillermo J. Rozas [Wed, 11 Oct 1989 15:30:29 +0000 (15:30 +0000)]
Fix a bug in the error exits for &> .

35 years agoAdd a global call/cc .
Guillermo J. Rozas [Wed, 11 Oct 1989 15:26:52 +0000 (15:26 +0000)]
Add a global call/cc .

35 years ago`stack-frame/ref' needs to be able to address elements in subsequent
Chris Hanson [Tue, 10 Oct 1989 11:38:30 +0000 (11:38 +0000)]
`stack-frame/ref' needs to be able to address elements in subsequent
stack frames as well as the given one.

35 years ago`environment-parent' wasn't skipping over intermediate static-links
Chris Hanson [Tue, 10 Oct 1989 11:37:35 +0000 (11:37 +0000)]
`environment-parent' wasn't skipping over intermediate static-links
correctly.

35 years agoAdd new integer and flonum primitives. Delete arithmetic ops that
Chris Hanson [Wed, 4 Oct 1989 02:49:48 +0000 (02:49 +0000)]
Add new integer and flonum primitives.  Delete arithmetic ops that
will no longer be primitives.

35 years ago*** empty log message ***
Chris Hanson [Tue, 3 Oct 1989 22:56:03 +0000 (22:56 +0000)]
*** empty log message ***

35 years agoFix bug which prevented correct recognition of debugging info for the
Chris Hanson [Tue, 3 Oct 1989 22:55:38 +0000 (22:55 +0000)]
Fix bug which prevented correct recognition of debugging info for the
root block of a multiple-block compilation.

35 years agoAdd handling for dbg-variables with type `indirect'.
Chris Hanson [Tue, 3 Oct 1989 22:54:29 +0000 (22:54 +0000)]
Add handling for dbg-variables with type `indirect'.

35 years agoChange order of source directories to match order in which files are
Chris Hanson [Fri, 29 Sep 1989 22:18:36 +0000 (22:18 +0000)]
Change order of source directories to match order in which files are
compiled by "comp.cbf".

35 years agoAdd global definitions for selected flonum and integer-generic
Chris Hanson [Thu, 28 Sep 1989 21:33:52 +0000 (21:33 +0000)]
Add global definitions for selected flonum and integer-generic
primitives.

35 years agoAdd primitives `fixnum-quotient' and `fixnum-remainder'.
Chris Hanson [Thu, 28 Sep 1989 21:19:51 +0000 (21:19 +0000)]
Add primitives `fixnum-quotient' and `fixnum-remainder'.

35 years agoAdd missing rule.
Guillermo J. Rozas [Mon, 25 Sep 1989 21:45:36 +0000 (21:45 +0000)]
Add missing rule.

35 years agoAdd new primitive `flonum-denormalize'.
Chris Hanson [Mon, 25 Sep 1989 17:59:43 +0000 (17:59 +0000)]
Add new primitive `flonum-denormalize'.

35 years agoFix bug in `grow_data_buffer': forgot to update the pointers into the
Chris Hanson [Mon, 25 Sep 1989 17:47:41 +0000 (17:47 +0000)]
Fix bug in `grow_data_buffer': forgot to update the pointers into the
reallocated structure.

35 years agoAdd new primitive `flonum-denormalize'.
Chris Hanson [Mon, 25 Sep 1989 16:51:23 +0000 (16:51 +0000)]
Add new primitive `flonum-denormalize'.

35 years agoFix definition of `flonum_normalize'.
Chris Hanson [Sun, 24 Sep 1989 16:15:01 +0000 (16:15 +0000)]
Fix definition of `flonum_normalize'.

35 years agoExport `microcode-id/floating-epsilon'.
Chris Hanson [Sun, 24 Sep 1989 15:44:23 +0000 (15:44 +0000)]
Export `microcode-id/floating-epsilon'.

35 years agoEliminate hand-coded flonum parameters in favor of those in "float.h".
Chris Hanson [Sun, 24 Sep 1989 15:25:19 +0000 (15:25 +0000)]
Eliminate hand-coded flonum parameters in favor of those in "float.h".
These new parameters can be generated by hard-params, or if the system
has <float.h> we can use that instead.

35 years agoEliminate hand-coded flonum parameters in favor of those in "float.h".
Chris Hanson [Sun, 24 Sep 1989 15:13:11 +0000 (15:13 +0000)]
Eliminate hand-coded flonum parameters in favor of those in "float.h".
These new parameters can be generated by hard-params, or if the system
has <float.h> we can use that instead.

35 years agofixed-objects-vector now contains flonum-epsilon instead of
Chris Hanson [Sun, 24 Sep 1989 14:51:41 +0000 (14:51 +0000)]
fixed-objects-vector now contains flonum-epsilon instead of
flonum-exponent-bits.

35 years agofixed-objects-vector now contains flonum-epsilon instead of
Chris Hanson [Sun, 24 Sep 1989 14:47:07 +0000 (14:47 +0000)]
fixed-objects-vector now contains flonum-epsilon instead of
flonum-exponent-bits.

35 years agoMicrocode's fixed-objects-vector now contains flonum-epsilon instead
Chris Hanson [Sun, 24 Sep 1989 14:18:07 +0000 (14:18 +0000)]
Microcode's fixed-objects-vector now contains flonum-epsilon instead
of flonum-exponent-bits; change microcode table code to accomodate.

35 years agoAdd primitives to normalize flonums, and to produce the key flonum
Chris Hanson [Sun, 24 Sep 1989 13:50:26 +0000 (13:50 +0000)]
Add primitives to normalize flonums, and to produce the key flonum
parameters: number of bits in significand, and smallest number which
can be added to one and still produce different result.

35 years ago*** empty log message ***
Chris Hanson [Sun, 24 Sep 1989 03:46:29 +0000 (03:46 +0000)]
*** empty log message ***

35 years agoDon't set `*info-output-filename*' or `*rtl-output-pathname*' in
Chris Hanson [Sun, 24 Sep 1989 03:39:40 +0000 (03:39 +0000)]
Don't set `*info-output-filename*' or `*rtl-output-pathname*' in
`compiler:reset!'; they are fluid-bound instead.

35 years agoChange criterion used to decide whether or not to close procedures.
Chris Hanson [Sun, 24 Sep 1989 03:37:31 +0000 (03:37 +0000)]
Change criterion used to decide whether or not to close procedures.
New criterion is to examine `procedure-closure-context', which will be
set to #t by the closure analysis iff it decides that the procedure
needs to be closed.

35 years agoChange code back to clobber the procedure-block's parent when a
Chris Hanson [Sun, 24 Sep 1989 03:33:55 +0000 (03:33 +0000)]
Change code back to clobber the procedure-block's parent when a
procedure is undrifted.  If this is not done the operations
`block-ancestor-or-self?' and `block-nearest-common-ancestor' return
the wrong answers, and consequently must be replaced with new
operations that take the undrifting into account (yet another set of
nearly-identical operations!).

Rather than do this, I attacked the problem of why clobbering the
parent causes problems.  The losing scenario seems to be as follows:
procedure A is a child of procedure B; procedure B and procedure C are
siblings; procedure A is a free-caller of procedure C (and so is
procedure B by transitivity); procedure B has drifted up one or more
blocks, while A and C have not drifted at all.

The problem occurs when A is examined before B for undrifting: because
C is not accessible from A (due to B's drifting), it is undrifted.
Later, B is also undrifted (because it is also a free-caller of C);
note that had B been undrifted before we looked at A there would have
been no reason to undrift A.  Finally, `setup-block-types!' closes
both A and B because they have been undrifted, which allows them both
to reference their free variables; this reference is possible
-because- the original parent was not changed when the undrifting
occurred.  Had the original parent been changed at that time, the
closing would have failed.

Now many times the only reason that A and B are being closed is
because of the undrifting -- there is really no reason for them to be
closed at all (in these cases, we would have been better off never
having tried to drift procedure A in the first place).  Furthermore,
because this closing is bypassing the normal closing mechanism, some
other inconsistencies are introduced, in particular the
`virtual-closure?' bit is not cleared (it was the bug caused by this
inconsistency which forced me to reexamine this code in the first
place).

OK, so let's try this again.  Suppose we -don't- close undrifted
procedures unless there's some other reason to do so (which we can
detect by looking at the `closure-context' or `closure-reasons').
Then the way to avoid the losing scenario above is to guarantee that
we undrift B before considering A for undrifting.  This is easily
accomplished by performing a topological sort on the `free-callers'.
This sorting is sufficient because the decision to undrift A can only
depend on ancestors who are also members of the `free-callers' set.

So that's the story: I've added a topological sort of
`procedure-free-callers', changed `undrift-procedure!' to immediately
update the `procedure-closing-block', and changed `setup-block-types!'
to base the closing decision on `procedure-closure-context' rather
than (the now inaptly named) `close-procedure?'.

35 years agoFix a few random bugs.
Chris Hanson [Fri, 22 Sep 1989 09:33:16 +0000 (09:33 +0000)]
Fix a few random bugs.

35 years agoAdd new switch `HAS_MODF', and conditionalize "missing.c" to use it.
Chris Hanson [Fri, 22 Sep 1989 08:47:32 +0000 (08:47 +0000)]
Add new switch `HAS_MODF', and conditionalize "missing.c" to use it.
Change makefile to include "missing.o".

35 years agoAdd new switch `HAS_MODF', and conditionalize "missing.c" to use it.
Chris Hanson [Fri, 22 Sep 1989 08:45:36 +0000 (08:45 +0000)]
Add new switch `HAS_MODF', and conditionalize "missing.c" to use it.
Change makefile to include "missing.o".

35 years agoWork around bug in portable representation of flonums: the flonum 0.0
Chris Hanson [Thu, 21 Sep 1989 22:53:12 +0000 (22:53 +0000)]
Work around bug in portable representation of flonums: the flonum 0.0
is written as "06 + 0".  But this program always reads two numbers
after the sign, and furthermore treats the first one as the exponent,
and the -second- as the size in bits.  This caused it to gobble up the
type code of the next word by accident.

35 years agoFix typo which caused segmentation violation on disk-restore.
Chris Hanson [Thu, 21 Sep 1989 22:48:51 +0000 (22:48 +0000)]
Fix typo which caused segmentation violation on disk-restore.

35 years ago*** empty log message ***
Chris Hanson [Thu, 21 Sep 1989 02:36:27 +0000 (02:36 +0000)]
*** empty log message ***

35 years agoUpgrade to handle split compiled-code files. Improve constants
Chris Hanson [Thu, 21 Sep 1989 01:55:35 +0000 (01:55 +0000)]
Upgrade to handle split compiled-code files.  Improve constants
comparison.

35 years ago*** empty log message ***
Chris Hanson [Wed, 20 Sep 1989 23:23:37 +0000 (23:23 +0000)]
*** empty log message ***

35 years agoInitial revision
Chris Hanson [Wed, 20 Sep 1989 23:23:20 +0000 (23:23 +0000)]
Initial revision

35 years agoMassive rewrite of microcode. All new object macros and organization.
Chris Hanson [Wed, 20 Sep 1989 23:13:36 +0000 (23:13 +0000)]
Massive rewrite of microcode.  All new object macros and organization.
New number primitives to support R4RS-compatible number system.
This microcode requires runtime version 14.58 or later.

35 years agoFix another bug in first class environment code when combined with
Guillermo J. Rozas [Wed, 20 Sep 1989 16:39:48 +0000 (16:39 +0000)]
Fix another bug in first class environment code when combined with
compile-by-procedures.

35 years agoMicrocode version 11 requires this runtime version.
Chris Hanson [Wed, 20 Sep 1989 15:11:40 +0000 (15:11 +0000)]
Microcode version 11 requires this runtime version.

35 years agoChange algorithm used to compute prime numbers to make it more
Chris Hanson [Wed, 20 Sep 1989 15:06:47 +0000 (15:06 +0000)]
Change algorithm used to compute prime numbers to make it more
efficient.

35 years agoEliminate dependency on return value of modifier.
Chris Hanson [Wed, 20 Sep 1989 15:05:47 +0000 (15:05 +0000)]
Eliminate dependency on return value of modifier.

35 years agoAdd Harris HCX type.
Chris Hanson [Tue, 19 Sep 1989 17:53:38 +0000 (17:53 +0000)]
Add Harris HCX type.

35 years agoInitial revision
Chris Hanson [Tue, 19 Sep 1989 17:51:29 +0000 (17:51 +0000)]
Initial revision

35 years agoFix bug in 1d-table/alist, and add 1d-table/for-each.
Guillermo J. Rozas [Fri, 15 Sep 1989 18:10:43 +0000 (18:10 +0000)]
Fix bug in 1d-table/alist, and add 1d-table/for-each.