Chris Hanson [Fri, 23 Dec 1988 21:39:10 +0000 (21:39 +0000)]
Don't bother putting out cref information for global and primitive
references. For a program like the compiler, these comprise about
half the total cref, and are of little use.
Chris Hanson [Fri, 23 Dec 1988 04:50:23 +0000 (04:50 +0000)]
Fix definition of `stack-top-address' to make it consistent with
definition of `object-datum' (which will be used to extract the
address value of a stack address). Implement new primitive
`stack-address-offset' which computes the offset (in objects) between
the stack-address argument and the top of stack.
Chris Hanson [Fri, 23 Dec 1988 04:32:55 +0000 (04:32 +0000)]
Fix definition of `stack-top-address' to make it consistent with
definition of `object-datum' (which will be used to extract the
address value of a stack address). Implement new primitive
`stack-address-offset' which computes the offset (in objects) between
the stack-address argument and the top of stack.
Chris Hanson [Mon, 19 Dec 1988 20:25:08 +0000 (20:25 +0000)]
Tweak popping-limits computation once again: the external block is not
necessarily one of the limits, and assuming that it is forces the use
of dynamic links in many common situations.
Chris Hanson [Mon, 19 Dec 1988 20:23:28 +0000 (20:23 +0000)]
Do not require `object-immutable?' of arguments to constant folding
operations. Because of the rule which says that constants appearing
in program text must be immutable, we can freely constant fold
anything that we can get our hands on, provided that we never constant
fold anything to does a cons-like operation.
Chris Hanson [Tue, 13 Dec 1988 13:10:38 +0000 (13:10 +0000)]
Change modifiers to return `unassigned'. This will result in superior
compiled code as the compiler will not attempt to produce the original
value of the location being modified.
Chris Hanson [Tue, 13 Dec 1988 12:41:27 +0000 (12:41 +0000)]
Change analysis in two ways: (1) static link computation now uses
`initial-backward-links' to get much more precise notion of when
parent is the stack link. (2) dynamic link computation stores all of
the popping limits in the caller block for use by the combination code
generator.
Chris Hanson [Mon, 12 Dec 1988 21:53:00 +0000 (21:53 +0000)]
New type: stack-overwrite. Remove changes to delete unreachable
nodes, as this code was buggy. No longer needed because of changes to
code generator, but we'll replace it soon anyway.
Chris Hanson [Mon, 12 Dec 1988 21:51:16 +0000 (21:51 +0000)]
* Add `popping-limits' components to block.
* Change `ic-block?' to be non-integrable.
* Change `block-ancestry' to eliminate random extra argument.
* Define new procedure `block-partial-ancestry' which is like
`block-ancestry' except that it stops at a given ancestor.
* Make `stack-block/static-link?' be more sophisticated: static link
is not needed unless the block has some free variables. Also, for IC
parent, check to see if lookup is being used on the parent.
* Define new procedures `block-original-parent', and
`{dis,}own-block-child!'.
Chris Hanson [Sun, 11 Dec 1988 11:24:36 +0000 (11:24 +0000)]
Change modifiers to return `unassigned'. This will result in superior
compiled code as the compiler will not attempt to produce the original
value of the location being modified.
1) Integrated parameters are filtered before we design the closure
block. This fixes a bug by which closures with no free variables were
created.
2) Add paranoia checks to make sure that a trivial closure remains
trivial after its closure block is computed. This is important
because if it was previously considered trivial, it may already have
been integrated into some other closure. This check would have caught
the bug fixed in 1.
Improve constant folding:
- Mutable objects can now be known values of variables, although
operations will not be open coded over them.
- The outer analysis has been changed to have passed-out and passed-in
counters rather than flags. In this way it is easy to recompute their
values value after an operation has been constant folded, and decide
whether further propagation can occur or not.
- Non-primitive operations can now be constant folded. There is a new
declaration: USUAL-DEFINITION which allows the variables to which it
applies to be constant folded to their usual (global) definition.
Examples of this are ATAN, GCD, etc.
- Fix bug in base/utils.scm by which temporary label names were being
interned. This would cause the compiler to run out of storage after
many compilations.
Chris Hanson [Sat, 12 Nov 1988 06:47:24 +0000 (06:47 +0000)]
Rewrite unix file opening code to be really careful about what kinds
of files can be opened, and how. As of now, only regular files and
character special files are allowed; symbolic links are detected when
opening output files and deleted, thus overwriting the link rather
than writing through it.
Implement new primitive `file-flush-output' which is needed since we
changed file I/O to use buffered stdio some time ago.
Chris Hanson [Tue, 8 Nov 1988 06:56:06 +0000 (06:56 +0000)]
Add new primitive `compiled-closure->entry', and new predicate
`compiled-closure?'. Change the unparser to print compiled code
entries differently, showing their offset and absolute address for
better debugging. Closures show this information for their entry
point, and additionally show the address of the closure itself.