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
Guillermo J. Rozas [Wed, 1 Nov 1989 18:46:41 +0000 (18:46 +0000)]
Initial revision
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.
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.
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.
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.
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.
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
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.
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.
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.
Chris Hanson [Sat, 28 Oct 1989 09:41:27 +0000 (09:41 +0000)]
Must discard CSE information at any kind of unknown invocation.
Chris Hanson [Sat, 28 Oct 1989 06:47:35 +0000 (06:47 +0000)]
Fix bug which caused "1e100" to be rejected as number syntax.
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.
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.
Chris Hanson [Fri, 27 Oct 1989 23:58:51 +0000 (23:58 +0000)]
Fix typo in `real:min'.
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.
Guillermo J. Rozas [Fri, 27 Oct 1989 13:27:07 +0000 (13:27 +0000)]
Initial revision
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.
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.
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.
Chris Hanson [Fri, 27 Oct 1989 07:25:24 +0000 (07:25 +0000)]
In `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).
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.
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.
Chris Hanson [Fri, 27 Oct 1989 04:43:54 +0000 (04:43 +0000)]
*** empty log message ***
Chris Hanson [Fri, 27 Oct 1989 04:43:21 +0000 (04:43 +0000)]
Forgot to export `denominator'.
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.
Chris Hanson [Fri, 27 Oct 1989 02:03:35 +0000 (02:03 +0000)]
Initial revision
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.
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.
Chris Hanson [Thu, 26 Oct 1989 07:40:33 +0000 (07:40 +0000)]
Initial revision
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.
Chris Hanson [Thu, 26 Oct 1989 06:49:01 +0000 (06:49 +0000)]
Initial revision
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.
Guillermo J. Rozas [Thu, 26 Oct 1989 04:25:29 +0000 (04:25 +0000)]
Minor reorganization.
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.
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.
Guillermo J. Rozas [Mon, 23 Oct 1989 21:40:57 +0000 (21:40 +0000)]
Some cleanup of the trampoline code.
Guillermo J. Rozas [Mon, 23 Oct 1989 21:36:48 +0000 (21:36 +0000)]
Update to use new microcode types and macros.
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.
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.
Guillermo J. Rozas [Fri, 20 Oct 1989 12:39:28 +0000 (12:39 +0000)]
Add proc_type for the IBM RT.
Guillermo J. Rozas [Fri, 20 Oct 1989 12:36:54 +0000 (12:36 +0000)]
Initial revision
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.
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.
Guillermo J. Rozas [Wed, 11 Oct 1989 15:30:29 +0000 (15:30 +0000)]
Fix a bug in the error exits for &> .
Guillermo J. Rozas [Wed, 11 Oct 1989 15:26:52 +0000 (15:26 +0000)]
Add a global call/cc .
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.
Chris Hanson [Tue, 10 Oct 1989 11:37:35 +0000 (11:37 +0000)]
`environment-parent' wasn't skipping over intermediate static-links
correctly.
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.
Chris Hanson [Tue, 3 Oct 1989 22:56:03 +0000 (22:56 +0000)]
*** empty log message ***
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.
Chris Hanson [Tue, 3 Oct 1989 22:54:29 +0000 (22:54 +0000)]
Add handling for dbg-variables with type `indirect'.
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".
Chris Hanson [Thu, 28 Sep 1989 21:33:52 +0000 (21:33 +0000)]
Add global definitions for selected flonum and integer-generic
primitives.
Chris Hanson [Thu, 28 Sep 1989 21:19:51 +0000 (21:19 +0000)]
Add primitives `fixnum-quotient' and `fixnum-remainder'.
Guillermo J. Rozas [Mon, 25 Sep 1989 21:45:36 +0000 (21:45 +0000)]
Add missing rule.
Chris Hanson [Mon, 25 Sep 1989 17:59:43 +0000 (17:59 +0000)]
Add new primitive `flonum-denormalize'.
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.
Chris Hanson [Mon, 25 Sep 1989 16:51:23 +0000 (16:51 +0000)]
Add new primitive `flonum-denormalize'.
Chris Hanson [Sun, 24 Sep 1989 16:15:01 +0000 (16:15 +0000)]
Fix definition of `flonum_normalize'.
Chris Hanson [Sun, 24 Sep 1989 15:44:23 +0000 (15:44 +0000)]
Export `microcode-id/floating-epsilon'.
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.
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.
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.
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.
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.
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.
Chris Hanson [Sun, 24 Sep 1989 03:46:29 +0000 (03:46 +0000)]
*** empty log message ***
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.
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.
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?'.
Chris Hanson [Fri, 22 Sep 1989 09:33:16 +0000 (09:33 +0000)]
Fix a few random bugs.
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".
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".
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.
Chris Hanson [Thu, 21 Sep 1989 22:48:51 +0000 (22:48 +0000)]
Fix typo which caused segmentation violation on disk-restore.
Chris Hanson [Thu, 21 Sep 1989 02:36:27 +0000 (02:36 +0000)]
*** empty log message ***
Chris Hanson [Thu, 21 Sep 1989 01:55:35 +0000 (01:55 +0000)]
Upgrade to handle split compiled-code files. Improve constants
comparison.
Chris Hanson [Wed, 20 Sep 1989 23:23:37 +0000 (23:23 +0000)]
*** empty log message ***
Chris Hanson [Wed, 20 Sep 1989 23:23:20 +0000 (23:23 +0000)]
Initial revision
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.
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.
Chris Hanson [Wed, 20 Sep 1989 15:11:40 +0000 (15:11 +0000)]
Microcode version 11 requires this runtime version.
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.
Chris Hanson [Wed, 20 Sep 1989 15:05:47 +0000 (15:05 +0000)]
Eliminate dependency on return value of modifier.
Chris Hanson [Tue, 19 Sep 1989 17:53:38 +0000 (17:53 +0000)]
Add Harris HCX type.
Chris Hanson [Tue, 19 Sep 1989 17:51:29 +0000 (17:51 +0000)]
Initial revision
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.
Guillermo J. Rozas [Fri, 15 Sep 1989 17:18:08 +0000 (17:18 +0000)]
Fix bug in 1d-table/alist, and add 1d-table/for-each.
Guillermo J. Rozas [Fri, 15 Sep 1989 17:08:20 +0000 (17:08 +0000)]
Patch remaining bug in interaction between compile-by-procedures? and
first class environment decomposition.
For the time being, compile-by-procedures? is disabled within non top
level first class blocks (ie. in-package and make-environment).
This should ultimately be fixed.
Guillermo J. Rozas [Wed, 13 Sep 1989 20:44:32 +0000 (20:44 +0000)]
Fix bugs in fggen/{canon,fggen}.scm introduced when
compiler:compile-by-procedure? was added.
Arthur Gleckler [Tue, 5 Sep 1989 22:34:52 +0000 (22:34 +0000)]
Create switch COMPILER:OPEN-CODE-FLOATING-POINT-ARITHMETIC? in order to ensure
Bobcat floating-point open-coding is only attempted for Bobcats.
Chris Hanson [Tue, 29 Aug 1989 21:39:43 +0000 (21:39 +0000)]
Fix bug in last change.
Chris Hanson [Tue, 29 Aug 1989 20:04:27 +0000 (20:04 +0000)]
Setup error-handling when re-evaluating arguments (as in
repeat-complex-command), and also when reading expressions from the
keyboard.
Chris Hanson [Mon, 28 Aug 1989 18:34:25 +0000 (18:34 +0000)]
* Add Jinx's changes to support 6 bit type codes.
Chris Hanson [Mon, 28 Aug 1989 18:30:12 +0000 (18:30 +0000)]
* Add Jinx's changes to support 6 bit type codes. Make these the
default for HP 9000 series 300.
* Update Ppband to handle compiled code.
* Significant rewrite of parts of the bignum code. This is the
beginning of a redesign of this code.
* Regularize some of the object selector macros.
Chris Hanson [Tue, 22 Aug 1989 18:08:48 +0000 (18:08 +0000)]
*** empty log message ***
Chris Hanson [Mon, 21 Aug 1989 19:34:39 +0000 (19:34 +0000)]
Change the compiler so that each top-level procedure in the input
expression is compiled separately, producing a different compiled-code
block for each. The load-time linking is removed from the sub-blocks
to be performed in the code for the top-level expression, thus
allowing it to be discarded after the expression is evaluated; only
the code needed by the procedures is retained.
The old behavior of the compiler can be obtained by setting the switch
`compiler:compile-by-procedures?' to #f.