Guillermo J. Rozas [Thu, 23 Nov 1989 21:32:46 +0000 (21:32 +0000)]
Update to match the newer cmpint-md.h
Guillermo J. Rozas [Thu, 23 Nov 1989 19:52:04 +0000 (19:52 +0000)]
Initial revision
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
Chris Hanson [Wed, 15 Nov 1989 02:44:07 +0000 (02:44 +0000)]
Define `int:>' as an integrable constant.
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.
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).
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 ..."
Guillermo J. Rozas [Thu, 9 Nov 1989 22:07:48 +0000 (22:07 +0000)]
Fix bug in *, t he call to reduce was incorrect.
Chris Hanson [Thu, 9 Nov 1989 04:02:53 +0000 (04:02 +0000)]
Initial revision
Gerald Jay Sussman [Thu, 9 Nov 1989 03:45:06 +0000 (03:45 +0000)]
Add optional arithmetic-interface code.
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.
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.
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).
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.
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.
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.
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.
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.
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.
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.
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.
Guillermo J. Rozas [Wed, 1 Nov 1989 18:58:03 +0000 (18:58 +0000)]
Add the instruction typedef (moved here from cmpint.c).
Guillermo J. Rozas [Wed, 1 Nov 1989 18:57:07 +0000 (18:57 +0000)]
Remove the instruction typedef (in cmpint2.h now).
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.