Stephen Adams [Wed, 1 Mar 1995 14:06:55 +0000 (14:06 +0000)]
Amended SIMPLIFY/OPEN-CODE? to take into account that the static
arguments to some cookie calls (e.g. %internal-apply's 'ARITY slot) do
not result in code expansion.
Stephen Adams [Tue, 28 Feb 1995 00:41:04 +0000 (00:41 +0000)]
Static expressions are now cpsconv/trivial?. The effect is that the
nested LETs for creating read/etc caches are rewritten as one (CALL
(LAMBDA ...) ...) which later gets rewritten as a single LET by
simplify.
Stephen Adams [Mon, 27 Feb 1995 22:38:15 +0000 (22:38 +0000)]
Tweaked with if to make it do the old general cps style for BEGIN
actions because rtlgen doesnt like (begin (if x x y) ...). rtlgen
should be fixed too.
Stephen Adams [Mon, 27 Feb 1995 16:30:56 +0000 (16:30 +0000)]
Changed handling of IF and NOT:
For IF: now strips NOTs before & after cleaning up the predicate.
For NOT: (NOT (IF p c a)) => (IF p (NOT c) (NOT a))
when one or more of c & a is an operator for which the NOT will be
compiled out.
Stephen Adams [Sun, 26 Feb 1995 16:28:48 +0000 (16:28 +0000)]
Open coded (NOT x) as (IF x #F #T).
In all likelihood any NOTs left at this stage are in value expressions
(as opposed to predicates) and this rewrite prevents nastiness when X
is a predicate, as in
(lambda (x y) (<= x y))
which is
(lambda (x y) (not (&> x y)))
This rewrite forces the coercion from predicate to value up to the
whole body.
Stephen Adams [Sun, 26 Feb 1995 14:59:03 +0000 (14:59 +0000)]
Removed open-coding of tiny procedures comprising only known
operators. It is a bad idea to do this early as hand coded loop
invariants get substituted back into loops.
This should be added back but with a parameter, so we can have
aggressive inlining if the user wants it, or if there is a
declaration.
Chris Hanson [Sun, 26 Feb 1995 03:34:36 +0000 (03:34 +0000)]
Guarantee that the floating-point register stack is empty when moving
from C to Scheme and vice-versa. This appears to fix a floating-point
stack overflow exception that has been observed under unix and OS/2.
Chris Hanson [Tue, 21 Feb 1995 23:13:58 +0000 (23:13 +0000)]
Add two new primitives, and export an operation to clobber the window
field of an event -- thus allowing "user" events from graphics windows
to contain the "user" graphics device rather than an internal
descriptor.
Chris Hanson [Tue, 21 Feb 1995 23:11:22 +0000 (23:11 +0000)]
Several sweeping changes to graphics and image types. Graphics types
now have their names associated with them so that code can dispatch on
the name. Each image type is now associated with a particular
graphics type, so that it is possible to get the image type given a
graphics type. New procedures GRAPHICS-TYPE and IMAGE-TYPE provide
very general ways to get pointers to such types. New procedure
GRAPHICS-TYPE-NAME gets the name of a graphics type.
These changes necessitated some changes in the interface to the
graphics type definitions. In particular, there's no longer a
procedure to register a graphics type's name, and also the procedure
to construct a graphics type now accepts an additional argument, which
is the name.
Stephen Adams [Tue, 21 Feb 1995 06:33:13 +0000 (06:33 +0000)]
Added constant folding. For now we just do it for the generic
arithmetic. We need to figure out a general and efficient way to do
operations safely so that we can either defer the operation until run
time or compile it into code that signals an error.
Stephen Adams [Tue, 21 Feb 1995 06:27:08 +0000 (06:27 +0000)]
. Changed EARLYREW/NUMBER? -> FORM/NUMBER?
. Improved careful arithmetic to compile into a call the out of line
generic operation rather than signalling an error during compilation.
Stephen Adams [Fri, 17 Feb 1995 23:41:57 +0000 (23:41 +0000)]
Added rewrites for EXPT and SQRT which are `enabled' by using EXPT and
SQRT like this:
((access SQRT system-global-environment) 6.7)
i.e. they dispatch of (CALL %invoke-remote-operator ...) (declare
(usual-integrations)) should be changed to make operator references to
these standard procedures into global references.
SQRT just does constant folding. EXPT also expands to a small
expression trees of <= some number of generic multiplies for a small
exact integer exponent.
Chris Hanson [Thu, 16 Feb 1995 22:45:37 +0000 (22:45 +0000)]
Fix bug in redisplay: when variables that affect display (e.g.
truncate-lines) are changed, the window start marks must be erased.
Otherwise, the old start marks are used, and with the new display
variables in effect, these marks could cause point to be left
offscreen, or even force all of the buffer's text to be offscreen!
Stephen Adams [Wed, 15 Feb 1995 21:54:14 +0000 (21:54 +0000)]
Fixed a bug in the substitution code. Now it keeps a reference to the
call rather than the lookup when the operator of a call is a lookup,
as expected in the rest of the program.
Stephen Adams [Tue, 14 Feb 1995 00:58:08 +0000 (00:58 +0000)]
Added a patch to ensure that out-of-line hooks are not called with a
constructed continuation.
(call 'hook (call %make-stack-closure ...) x y)
=>
(call %invoke-continuation
(call %make-stack-closure ...)
(call 'hook '#F x y))
This is required because out-of-line hooks have to generate their own
continuation to do the restoring, and the code merges with a control
flow path from somewhere prior to the call so that this continuation
is part of the same rgraph, i.e. the RTL graph sblock for an
INVOKE-SPECIAL-PRIMITIVE is connected to the bblock for the
continuation. This means that RTL pseudo register value classes must
agree across this boundary, which is not so if we generate one from
%make-stack-closure.
Chris Hanson [Tue, 14 Feb 1995 00:36:58 +0000 (00:36 +0000)]
Complete redesign uses bitmaps as backing store and transfers the
appropriate part of the backing store to the screen using GpiBitBlt
whenever the PM says it needs to be updated.
Chris Hanson [Tue, 14 Feb 1995 00:35:23 +0000 (00:35 +0000)]
Change definition of OS2/FS-LONG-FILENAMES? so that it is true of any
filesystem type except FAT. This is still not accurate, but is a
better default, since there are compression filesystems that have
unusual types but also have long filenames.
Chris Hanson [Tue, 14 Feb 1995 00:25:43 +0000 (00:25 +0000)]
Rewrite bitmap support to make it be closer to the API calls. This
gives more power to the Scheme programmer at the expense of more
datatypes and primitives.
Stephen Adams [Sat, 11 Feb 1995 02:50:11 +0000 (02:50 +0000)]
IFs with sufficiently simple subexpressions are now handled piecemeal,
reducing all the intermediate procedures that ensue when generic
arithmetic operations are expanded early.
Stephen Adams [Thu, 9 Feb 1995 21:23:49 +0000 (21:23 +0000)]
Fixed COMPILED-PROCEDURE/ENVIRONMENT not to SIGSEGV on compiled
procedures which have no free variables. This happened because the
compiler failed to produce a dbg-block for the dbg-block/parent of the
procedure's dbg-block. An alternative fix would be to modify the
compiler to insert the correct IC dbg-block instead of leaving it as
#F.
Chris Hanson [Wed, 8 Feb 1995 01:21:05 +0000 (01:21 +0000)]
Reimplement OS/2 PM window support to separate the drawing operations
from the windows. All drawing operations now operate on objects that
represent "presentation spaces"; a window has a PS associated with it,
but it is now possible to create other PS objects that represent
bitmaps. Furthermore there are is a bitblt operation that can be used
to move image data between bitmaps and windows. All of this support
allows Scheme to store its graphics output in bitmaps and to refresh
the windows when needed, thus allowing efficient backing store for
windows.