Chris Hanson [Mon, 7 Nov 1988 14:33:30 +0000 (14:33 +0000)]
Fix unbound variable bug. Delete unused variable.
Chris Hanson [Mon, 7 Nov 1988 14:08:14 +0000 (14:08 +0000)]
Substantial rewrite of code that computes register map of a basic
block with multiple "previous" edges. The algorithm is roughly as
follows:
* Wait until all of the "previous" nodes have been generated. This
depends on the absence of explicit loops in the graph, and will
require some rethinking when we introduce these loops.
* Compute a "weighted average" register map (the target map) from the
maps of the "previous" nodes. This is a heuristic computation, but it
seems to have about the right effect for simple cases.
* Separate the "previous" maps into equivalence classes, where all the
maps in an equivalence class can be converted to the target map with
an identical sequence of instructions. This could be made
substantially more sophisticated, but for now it will do.
* For each edge, insert code to coerce the "previous" map into the
target map. Heed the equivalence classes that were just computed, and
causes all maps in a given equivalence class to share a single code
sequence.
Chris Hanson [Mon, 7 Nov 1988 13:57:49 +0000 (13:57 +0000)]
Initial revision
Chris Hanson [Mon, 7 Nov 1988 13:57:31 +0000 (13:57 +0000)]
Add new file: "back/mermap".
Chris Hanson [Mon, 7 Nov 1988 13:57:02 +0000 (13:57 +0000)]
(delete-dead-registers!): Rewrite to accomodate change to
`delete-pseudo-registers'.
Chris Hanson [Mon, 7 Nov 1988 13:56:13 +0000 (13:56 +0000)]
(bblock-compress!): when counting previous edges to determine if this
is the beginning of a basic block, we must include edges which have no
left node.
Chris Hanson [Mon, 7 Nov 1988 13:54:44 +0000 (13:54 +0000)]
Fix bugs in previously unused `coerce-map-instructions'. Add new
procedures `register-map:keep-live-registers' and `map-equal?'.
Chris Hanson [Mon, 7 Nov 1988 13:53:43 +0000 (13:53 +0000)]
Add dependency for new file: "back/mermap".
Chris Hanson [Sun, 6 Nov 1988 14:55:10 +0000 (14:55 +0000)]
Improve generic arithmetic by adding branch preferences to type,
range, and overflow tests. These preferences cause the linearizer to
attempt to optimize for the preferred branch.
Chris Hanson [Sun, 6 Nov 1988 14:53:29 +0000 (14:53 +0000)]
Export switches to global environment.
Chris Hanson [Sun, 6 Nov 1988 14:50:00 +0000 (14:50 +0000)]
Heed branch preferences when deciding which branch to generate in line.
Chris Hanson [Sun, 6 Nov 1988 14:40:14 +0000 (14:40 +0000)]
Specify branch preferences for things like type, range, and overflow
checks; the linearizer will heed these when making decisions about
which branch falls through. Recode string operations to do type and
range checks if these are enabled.
Chris Hanson [Sun, 6 Nov 1988 14:38:21 +0000 (14:38 +0000)]
Add operations to allow specification of branch preference in pblocks.
Guillermo J. Rozas [Sun, 6 Nov 1988 13:55:39 +0000 (13:55 +0000)]
An lvalue whose only backward link is itself may be known.
This is a patch. General loops should work as well.
Chris Hanson [Sat, 5 Nov 1988 22:34:28 +0000 (22:34 +0000)]
"machines/bobcat/dassm1" now uses the compiler syntax table.
Chris Hanson [Sat, 5 Nov 1988 22:31:00 +0000 (22:31 +0000)]
Initial revision
Chris Hanson [Sat, 5 Nov 1988 22:21:54 +0000 (22:21 +0000)]
Fix unbound variable error.
Chris Hanson [Sat, 5 Nov 1988 22:14:02 +0000 (22:14 +0000)]
Efficiency improvement to last change.
Chris Hanson [Sat, 5 Nov 1988 05:13:00 +0000 (05:13 +0000)]
*** empty log message ***
Chris Hanson [Sat, 5 Nov 1988 03:03:05 +0000 (03:03 +0000)]
Last change was a little too ambitious. Back off a bit.
Chris Hanson [Sat, 5 Nov 1988 02:59:48 +0000 (02:59 +0000)]
Must adjust stack pointer for special primitive invocations.
Chris Hanson [Fri, 4 Nov 1988 22:37:44 +0000 (22:37 +0000)]
Change code generation for `&=' to significantly improve output code.
Many minor editing changes also.
Chris Hanson [Fri, 4 Nov 1988 21:49:26 +0000 (21:49 +0000)]
Fix typo introduced in last changes.
Chris Hanson [Fri, 4 Nov 1988 12:16:32 +0000 (12:16 +0000)]
Patch up several rules to capture common abstractions. Add a couple
of new rules which are conglomerates of existing rules, and which can
be more efficiently generated as a unit.
Chris Hanson [Fri, 4 Nov 1988 11:11:12 +0000 (11:11 +0000)]
Add declarations to eliminate "unreferenced bound variable" warnings.
Chris Hanson [Fri, 4 Nov 1988 11:08:55 +0000 (11:08 +0000)]
Add declarations to eliminate "unreferenced bound variable" warnings.
Chris Hanson [Fri, 4 Nov 1988 10:58:30 +0000 (10:58 +0000)]
Define procedures to capture the object->{type,datum,address}
conversions.
Chris Hanson [Fri, 4 Nov 1988 10:28:39 +0000 (10:28 +0000)]
Define new procedure `load-temporary-register' which abstracts the
idea of loading a temporary with the value of some expression, and
then using the temporary for something. This is important because of
the timing problems associated with `rtl:make-assignment'. Most
usages of the latter are now translated into usages of the new
procedure.
Chris Hanson [Fri, 4 Nov 1988 10:26:02 +0000 (10:26 +0000)]
Delete random definition of `rtl:make-address->fixnum'. This was a
duplicate definition, but what is worse, it caused incorrect code to
be generated. This happened because `object->fixnum' gets elided in
certain places, in particular the places where `address->fixnum' is
used.
Chris Hanson [Fri, 4 Nov 1988 10:23:30 +0000 (10:23 +0000)]
Conversion of a fixnum to an address must be a logical right shift,
not an arithmetic right shift. This is because an address is an
unsigned quantity; thus a fixnum representing an address must also be
treated as unsigned.
Guillermo J. Rozas [Fri, 4 Nov 1988 02:26:07 +0000 (02:26 +0000)]
Rename disassembler/write-compiled-entry to compiler:disassemble,
export it to the global package, and add some cleverness about
printing linkage sections.
Chris Hanson [Thu, 3 Nov 1988 08:47:20 +0000 (08:47 +0000)]
Don't run second pass unless there are some circularly dependent files
being resyntaxed.
Chris Hanson [Thu, 3 Nov 1988 08:35:47 +0000 (08:35 +0000)]
Don't use the `utime()' or `utimes()' system calls to touch files,
because they are subject to clock skew problems when used on remote
NFS files. Also, add check for file type to file touching code.
Chris Hanson [Thu, 3 Nov 1988 08:21:25 +0000 (08:21 +0000)]
*** empty log message ***
Chris Hanson [Thu, 3 Nov 1988 08:20:03 +0000 (08:20 +0000)]
Echo file deletions, and show passes.
Chris Hanson [Thu, 3 Nov 1988 07:52:04 +0000 (07:52 +0000)]
Echo message informing user when files are being touched. Fix big:
was touching file with no type! Must touch files that SF outputs.
Always touch .bin file, conditionally touch .ext and .unf files.
Chris Hanson [Thu, 3 Nov 1988 07:16:11 +0000 (07:16 +0000)]
Redefine `invert-cc-noncommutative'. This was originally designed to
be like `invert-cc'. However, it is used to adjust the condition code
for the situation of reversing the arguments to a conditional, while
`invert-cc' is used to adjust for reversing the branches. These are
quite different.
Chris Hanson [Thu, 3 Nov 1988 06:33:23 +0000 (06:33 +0000)]
Because special primitive invocations may now have `next' nodes, it is
necessary to invalidate at least the value register and free pointer.
Perhaps we need to invalidate other things as well?
Chris Hanson [Thu, 3 Nov 1988 06:31:15 +0000 (06:31 +0000)]
Define these procedures:
interpreter-value-register
interpreter-environment-register
interpreter-environment-register?
Chris Hanson [Thu, 3 Nov 1988 03:09:00 +0000 (03:09 +0000)]
Reset the set of source nodes whenever the compiler band is reloaded.
This should help prevent problems with non-existent files. Also,
during second pass to resyntax files that have circular dependencies,
touch the dependents that have been syntaxed in the first pass, so
that they have the proper time relationships to the resyntaxed files.
Chris Hanson [Wed, 2 Nov 1988 22:02:08 +0000 (22:02 +0000)]
Eliminate random unreferenced labels from RTL and LAP output.
Eliminate dead branches to continuations. Implement declarations to
disable detection of traps in cached variable references and
assignments.
Chris Hanson [Wed, 2 Nov 1988 21:55:33 +0000 (21:55 +0000)]
(reference->register-transfer): When source was an address register
this compared it to target, succeeding when target was a data
register.
Chris Hanson [Wed, 2 Nov 1988 21:54:15 +0000 (21:54 +0000)]
Use definition of `compiler:default-top-level-declarations'. Add new
class of variables: `assigned'. Add two new declarations:
`ignore-assignment-traps' and `ignore-reference-traps'.
Chris Hanson [Wed, 2 Nov 1988 21:52:31 +0000 (21:52 +0000)]
Add definition of `compiler:default-top-level-declarations', used by
declaration processor. This is used to force defaults, and may also
be fluid bound to provide special defaults.
Chris Hanson [Wed, 2 Nov 1988 21:51:17 +0000 (21:51 +0000)]
Redefine `add-rgraph-entry-node!' to be `add-rgraph-entry-edge!',
because the caller needs an edge to that node, and we wish to avoid
creation of duplicate edges.
Chris Hanson [Wed, 2 Nov 1988 21:49:33 +0000 (21:49 +0000)]
Be more careful when `sblock-continuation' is known. If the
continuation has already been generated, we were previously generating
a jump to the continuation at this point. This jump was dead code
because nobody referenced it.
Chris Hanson [Wed, 2 Nov 1988 21:46:00 +0000 (21:46 +0000)]
Implement `ignore-reference-traps' declaration on free variables.
Chris Hanson [Wed, 2 Nov 1988 21:45:43 +0000 (21:45 +0000)]
Implement `ignore-assignment-traps' declaration on free variables.
Chris Hanson [Wed, 2 Nov 1988 21:45:03 +0000 (21:45 +0000)]
(generate/rgraph): Make only a single edge for the entry of each
rgraph. This is important because the linearizer looks at the number
of edges to determine when labels are needed.
Guillermo J. Rozas [Wed, 2 Nov 1988 21:43:53 +0000 (21:43 +0000)]
Fix bug by which attempting to print a bogus object would kill Scheme.
It now prints #[UNDEFINED-TYPE:<n> <datum>] and does NOT hash the object.
Guillermo J. Rozas [Tue, 1 Nov 1988 22:52:45 +0000 (22:52 +0000)]
Fix missing label bug. OPEN-PROCEDURE-HEADERS define both the
internal and external entry points always.
Guillermo J. Rozas [Tue, 1 Nov 1988 04:58:20 +0000 (04:58 +0000)]
- "Self consistent closing": A group of procedures whose only free
variables represent each other will be represented as trivial closures
that reference each other by direct pc offsets.
- Known trivial closure variables are now integrated.
- Similar procedures used in operator position may not be closed.
There is a notion of a virtual closure: A closure whose environment is
known, but whose code pointer is not.
- Procedures now remember why they were closed.
- Once-only assignments to top-level or completely free variables are
done with local-assignment rather than with assignment caches.
- Variuos fixes to the closure analysis. Lambda expressions in
operand position are closed only if they are escaping their context.
This was broken when the uniform closing strategy (all closures close
to the top) was introduced in the front end.
Guillermo J. Rozas [Tue, 1 Nov 1988 04:51:37 +0000 (04:51 +0000)]
Initial revision
Guillermo J. Rozas [Sun, 30 Oct 1988 14:31:20 +0000 (14:31 +0000)]
Add sf/usual-integrations-default-deletions.
Guillermo J. Rozas [Sun, 30 Oct 1988 14:21:55 +0000 (14:21 +0000)]
Add sf/usual-integrations-default-deletions.
Guillermo J. Rozas [Sat, 29 Oct 1988 05:14:08 +0000 (05:14 +0000)]
Add stage3 and merge with markf's makefile.
Chris Hanson [Sat, 29 Oct 1988 00:13:00 +0000 (00:13 +0000)]
Change `define-structure' macro to handle `named' option better,
allowing it to be a constant which is used as the tag. This allows
redefinition of several structures in the runtime system, making them
fasdumpable. Change handling of packages to attach a package to its
environment if that environment is not already attached to another
package. Change the rep loop to show this package name when the
package is changed; also add command `pe' to return the current
package.
Chris Hanson [Sat, 29 Oct 1988 00:07:15 +0000 (00:07 +0000)]
Add expansion rules for predicates like `vector?', `char?', etc. that
expand into code that the compiler can open code pretty well. Add new
global variables `sf/default-syntax-table' and
`sf/top-level-definitions', the latter being a list of names which
should not be treated specially by `usual-integrations'.
Mark Friedman [Fri, 28 Oct 1988 17:47:53 +0000 (17:47 +0000)]
Fixed bug when multiplying a number by itself.
Chris Hanson [Fri, 28 Oct 1988 07:03:24 +0000 (07:03 +0000)]
Several changes to make package model objects fasdumpable.
Chris Hanson [Thu, 27 Oct 1988 07:07:27 +0000 (07:07 +0000)]
Don't forget to output the return codes with their frames.
Chris Hanson [Thu, 27 Oct 1988 05:22:48 +0000 (05:22 +0000)]
More debugging support.
Chris Hanson [Wed, 26 Oct 1988 21:09:43 +0000 (21:09 +0000)]
Add several new entries to support debugging of compiled code.
Chris Hanson [Wed, 26 Oct 1988 20:01:08 +0000 (20:01 +0000)]
Adjust `RETURN_NAME_TABLE' to contain all current return address
names; some were missing.
Mark Friedman [Wed, 26 Oct 1988 12:33:00 +0000 (12:33 +0000)]
Merged 4.9 with 4.8.1.2.
Chris Hanson [Wed, 26 Oct 1988 04:14:53 +0000 (04:14 +0000)]
Update for new runtime system. Much simpler now that stack parser
does most of the work.
Chris Hanson [Wed, 26 Oct 1988 03:52:13 +0000 (03:52 +0000)]
(compiled_entry_to_block): `suba.w' instruction sign extends its first
argument, which in this case is exactly the wrong thing. Rewrite this
to zero extend the 16 bit offset.
Chris Hanson [Mon, 24 Oct 1988 22:18:41 +0000 (22:18 +0000)]
Continuation can still be sometimes known even when it is passed out.
This was causing bug where continuation was "never known", but because
the return application knew it, it was assuming "sometimes known".
Chris Hanson [Fri, 21 Oct 1988 22:22:10 +0000 (22:22 +0000)]
Change directory reader to default the name/type/version to WILD, and
to be faster for that default case. Also add optional second argument
to disable sorting of output. These changes combine to give a fairly
fast interface to the underlying directory reader.
Chris Hanson [Fri, 21 Oct 1988 22:18:46 +0000 (22:18 +0000)]
If slashification is turned off, it is still necessary to slashify
non-ASCII characters because the output port probably won't have any
representation for them.
Chris Hanson [Fri, 21 Oct 1988 18:21:08 +0000 (18:21 +0000)]
Make sure that TERM_SIGNAL control variables are initialized correctly
even when `dump-world' or job control is used. Also, force control-g
synchronization under Emacs for all unix operating systems.
Chris Hanson [Fri, 21 Oct 1988 16:30:23 +0000 (16:30 +0000)]
Force control-g synchronization always. Turns out BSD had the same
problem as hp-ux.
Chris Hanson [Fri, 21 Oct 1988 15:28:23 +0000 (15:28 +0000)]
Don't use second argument to `interrupt-process' and `quit-process'.
Apparently that causes difficulties under Ultrix.
Arthur Gleckler [Fri, 21 Oct 1988 06:47:35 +0000 (06:47 +0000)]
Two copies of the copyright message at beginning of file; removed one.
Arthur Gleckler [Fri, 21 Oct 1988 03:33:19 +0000 (03:33 +0000)]
Removed extra copyright message; had two copies of it at the beginning of the
file.
Chris Hanson [Fri, 21 Oct 1988 00:18:54 +0000 (00:18 +0000)]
Several changes to make unix signals work right.
Chris Hanson [Fri, 21 Oct 1988 00:18:13 +0000 (00:18 +0000)]
Change this code to use the new `clear-interrupts!' primitive to
disable interrupt bits when the interrupt handlers are invoked.
Chris Hanson [Fri, 21 Oct 1988 00:17:34 +0000 (00:17 +0000)]
(disk-save): Unless IDENTIFY is a string, return a boolean value.
Chris Hanson [Fri, 21 Oct 1988 00:15:37 +0000 (00:15 +0000)]
Fix bug in `disk-save': when the IDENTIFY argument is #F, we should
return #F just after the save, and #T after a restore.
Chris Hanson [Fri, 21 Oct 1988 00:13:07 +0000 (00:13 +0000)]
Fix some problems with unix signals: (1) Emacs uses SIGHUP to kill a
process when its buffer is killed, so treat SIGHUP differently if
under Emacs -- also don't print messages in this case as the buffer is
dead; (2) don't ask for core dump if signal received.
Also define new primitive `clear-interrupts!'; change
`get-next-interrupt-character' and `setup-timer-interrupt' so they
don't clear the interrupt bit. It is now the responsibility of the
runtime system to clear the bit when it gets the interrupt.
Mark Friedman [Thu, 20 Oct 1988 18:50:45 +0000 (18:50 +0000)]
Another stab at open coded generic arithmetic (stiil no floating point yet).
Mark Friedman [Thu, 20 Oct 1988 18:34:36 +0000 (18:34 +0000)]
Transferred version 4.8.1.1 onto the main trunk, essentially undoing
4.9 because we no longer use an expansion phase.
Mark Friedman [Thu, 20 Oct 1988 18:24:59 +0000 (18:24 +0000)]
Added rule for OVERFLOW-TEST in support of generic arithmetic.
Mark Friedman [Thu, 20 Oct 1988 18:21:39 +0000 (18:21 +0000)]
Changed a bunch of fixnum procedures. Fixnums are now shifted 8 bit to
the left before the operations (except multiply, where only one of the
operands is shifted) so that overflow detection gets done
automatically by the hardware.
Also fixed a bug in the fixnum register*register rule which was
manifested when the two source registers were the same and we could
alias them with the target.
Mark Friedman [Thu, 20 Oct 1988 18:15:40 +0000 (18:15 +0000)]
Added generic arithmetic rtl types and overflow-test predicate.
Added fixnum->address and address->fixnum since we have changed the
way fixnum's are handled (i.e. we shift them to the left by 8 bits now).
Removed rtl-constructor stuff since we don't have the expand phase anymore.
Mark Friedman [Thu, 20 Oct 1988 17:59:30 +0000 (17:59 +0000)]
In the open coding of generic arithmetic it is possible to create some
cfg node which are in the rtl-graph but turn out not to be reachable
from the entry edge of the rtl-graph (this happens when we are
creating a pcfg for a type test but the object we are testing is a
constant, for example). We need to make sure that rgraph/compress!
removes these unreachable cfg nodes, because there are some algorithms
which depened on all of node's predecessors being on a path from an
entry edge of the rtl-graph.
Mark Friedman [Thu, 20 Oct 1988 17:46:05 +0000 (17:46 +0000)]
Added expression methods for generic arithmetic RTL types.
Mark Friedman [Thu, 20 Oct 1988 17:22:35 +0000 (17:22 +0000)]
Fixed bugs in generic arithmetic open coding.
Mark Friedman [Thu, 20 Oct 1988 16:19:58 +0000 (16:19 +0000)]
Changed a bunch of fixnum procedures. Fixnums are now shifted 8 bit to
the left before the operations (except multiply, where only one of the
operands is shifted) so that overflow detection gets done
automatically by the hardware.
Mark Friedman [Thu, 20 Oct 1988 16:11:07 +0000 (16:11 +0000)]
fixed shift intructions with dynamic bit counts.
Mark Friedman [Thu, 20 Oct 1988 16:05:53 +0000 (16:05 +0000)]
fixed pcfg*scfg->cfg!
Chris Hanson [Thu, 20 Oct 1988 11:00:23 +0000 (11:00 +0000)]
Improved version of `file-touch' is smarter, will win in more cases
than previous version.
Chris Hanson [Wed, 19 Oct 1988 11:33:35 +0000 (11:33 +0000)]
Use /. suffix on directory names that are targets of mv commands.
Chris Hanson [Mon, 17 Oct 1988 12:10:07 +0000 (12:10 +0000)]
Add most remaining unix primitives, including new `file-touch'.
Chris Hanson [Mon, 17 Oct 1988 11:52:31 +0000 (11:52 +0000)]
Add new primitive `file-touch'.
Chris Hanson [Sat, 15 Oct 1988 21:24:38 +0000 (21:24 +0000)]
Change `char->string' to `string'. `char->string' still defined as
alias.
Chris Hanson [Sat, 15 Oct 1988 17:19:29 +0000 (17:19 +0000)]
Change `char->string' to `string'. `char->string' still defined as
alias.
Chris Hanson [Thu, 13 Oct 1988 11:16:53 +0000 (11:16 +0000)]
*** empty log message ***
Chris Hanson [Thu, 13 Oct 1988 10:34:23 +0000 (10:34 +0000)]
When dynamic link is in use, it must be pushed even if the
continuation is always known.
Chris Hanson [Wed, 12 Oct 1988 07:48:24 +0000 (07:48 +0000)]
Make pathname parser/unparser packages inherit from pathname package.