Skip to content

Commit 2e2237e

Browse files
author
Marco Antoniotti
committed
SHIFT reborn initial commit.
0 parents  commit 2e2237e

File tree

227 files changed

+80156
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

227 files changed

+80156
-0
lines changed

COMPILER.README

+90
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
# Copyright (c)1996, 1997, 1998 The Regents of the University of
2+
# California (Regents). All Rights Reserved.
3+
#
4+
# Permission to use, copy, modify, and distribute this software and its
5+
# documentation for educational, research, and not-for-profit purposes,
6+
# without fee and without a signed licensing agreement, is hereby
7+
# granted, provided that the above copyright notice, this paragraph and
8+
# the following two paragraphs appear in all copies, modifications, and
9+
# distributions.
10+
#
11+
# Contact The Office of Technology Licensing, UC Berkeley, 2150 Shattuck
12+
# Avenue, Suite 510, Berkeley, CA 94720-1620, (510) 643-7201, for
13+
# commercial licensing opportunities.
14+
#
15+
# IN NO EVENT SHALL REGENTS BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
16+
# SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
17+
# ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
18+
# REGENTS HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
19+
#
20+
# REGENTS SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT
21+
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
22+
# A PARTICULAR PURPOSE. THE SOFTWARE AND ACCOMPANYING DOCUMENTATION, IF
23+
# ANY, PROVIDED HEREUNDER IS PROVIDED "AS IS". REGENTS HAS NO OBLIGATION
24+
# TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR
25+
# MODIFICATIONS.
26+
27+
# README
28+
29+
This is an early pre-release of the SHIFT compiler. Only the
30+
front-end is included. It checks the syntax and static semantics of a
31+
SHIFT program, producing error messages as needed. Not all checks are
32+
implemented, and the existing checks have only been barely tested.
33+
So good luck.
34+
35+
---------------------
36+
BUILDING THE COMPILER
37+
---------------------
38+
39+
To compile the system the first time, do the following.
40+
41+
touch depend
42+
make make-depend
43+
make hasher
44+
make
45+
46+
After the initial bootstrap, it is sufficient to say `make'.
47+
48+
Some versions of `make' will say that the Makefile is bad.
49+
The GNU make (gmake) is known to work.
50+
51+
--------------------
52+
RUNNING THE COMPILER
53+
--------------------
54+
55+
Type
56+
shic <input-file>
57+
58+
---------------------------------------------
59+
TIPS FOR UNDERSTANDING THE COMPILER INTERNALS
60+
---------------------------------------------
61+
62+
The Internal Representation (IR) for a SHIFT program is built out of C
63+
data structures that look like Lisp objects (see lisp.h). These
64+
are the standard Lisp types: cons, fixnum (integer), symbol (see
65+
below), string, plus one additional type, the NODE.
66+
67+
A node has an operator (a symbol), a variable number of arguments
68+
(which must be nodes), and an attribute list. Attributes are
69+
name-value pairs, where the name is a symbol, and the value an
70+
arbitrary Lisp value.
71+
72+
Example: the expression x + y is represented by a node with operator
73+
CALL; an argument list constisting of three nodes with operator
74+
IDENTIFIER (the first for +, the second for x, and the third for y);
75+
and an attribute list consisting of the pair TYPE and a node with
76+
operator NUMBER.
77+
78+
Because symbols are used heavily in the source, and because they are
79+
unique (that is, there may not be two different symbols with the same
80+
name), it is convenient to precompute all symbols known by the
81+
compiler. This is done by the hasher program, which preprocesses all
82+
.c and .h source files looking for identifier which start with the `@'
83+
character, and preallocates symbols for each of them.
84+
85+
------
86+
AUTHOR
87+
------
88+
89+
Luigi Semenzato, Berkeley PATH
90+

COPYRIGHT

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
Copyright �1996, 1997, 1998 The Regents of the University of
2+
California (Regents). All Rights Reserved.
3+
4+
Permission to use, copy, modify, and distribute this software and its
5+
documentation for educational, research, and not-for-profit purposes,
6+
without fee and without a signed licensing agreement, is hereby
7+
granted, provided that the above copyright notice, this paragraph and
8+
the following two paragraphs appear in all copies, modifications, and
9+
distributions.
10+
11+
Contact The Office of Technology Licensing, UC Berkeley, 2150 Shattuck
12+
Avenue, Suite 510, Berkeley, CA 94720-1620, (510) 643-7201, for
13+
commercial licensing opportunities.
14+
15+
IN NO EVENT SHALL REGENTS BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
16+
SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
17+
ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
18+
REGENTS HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
19+
20+
REGENTS SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT
21+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
22+
A PARTICULAR PURPOSE. THE SOFTWARE AND ACCOMPANYING DOCUMENTATION, IF
23+
ANY, PROVIDED HEREUNDER IS PROVIDED "AS IS". REGENTS HAS NO OBLIGATION
24+
TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR
25+
MODIFICATIONS.

ChangeLog

+123
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,123 @@
1+
Copyright �1996, 1997, 1998 The Regents of the University of
2+
California (Regents). All Rights Reserved.
3+
4+
Permission to use, copy, modify, and distribute this software and its
5+
documentation for educational, research, and not-for-profit purposes,
6+
without fee and without a signed licensing agreement, is hereby
7+
granted, provided that the above copyright notice, this paragraph and
8+
the following two paragraphs appear in all copies, modifications, and
9+
distributions.
10+
11+
Contact The Office of Technology Licensing, UC Berkeley, 2150 Shattuck
12+
Avenue, Suite 510, Berkeley, CA 94720-1620, (510) 643-7201, for
13+
commercial licensing opportunities.
14+
15+
IN NO EVENT SHALL REGENTS BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
16+
SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
17+
ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
18+
REGENTS HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
19+
20+
REGENTS SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT
21+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
22+
A PARTICULAR PURPOSE. THE SOFTWARE AND ACCOMPANYING DOCUMENTATION, IF
23+
ANY, PROVIDED HEREUNDER IS PROVIDED "AS IS". REGENTS HAS NO OBLIGATION
24+
TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR
25+
MODIFICATIONS.
26+
27+
28+
Wed Apr 15 16:33:21 1998 Tunc Simsek <[email protected]>
29+
30+
* include/shifttypes.h: Adding support for external data types.
31+
32+
Tue Oct 28 11:18:29 1997 Daniel Wiesmann <[email protected]>
33+
34+
* socket: Removed the config.c, config.h, and the init.h
35+
files. Made the other functions portable for WIN32.
36+
37+
Mon Oct 27 16:09:45 1997 Marco Antoniotti <[email protected]>
38+
39+
* socket: added framework to write a minimal portable layer over
40+
the socket interface in order to take in to account MS Windows.
41+
42+
* socket/socket.c: changed a few things in the file in order to
43+
make it compile on the SGI. Cleaned up in the process.
44+
45+
Tue Aug 26 11:26:39 1997 Marco Antoniotti <[email protected]>
46+
47+
* configure.in: Added condition preprocessor variable
48+
fo OS_MSWINDOWS.
49+
50+
* include/shift_config.h.in: Added condition preprocessor variable
51+
fo OS_MSWINDOWS.
52+
53+
Wed Aug 13 14:16:36 1997 Daniel Wiesmann <[email protected]>
54+
55+
* libTcl/animation-update.c (C_UpdateItem): Changed the change of
56+
the sign or the orientation. Added a <return> bind to the setenv
57+
window.
58+
59+
Fri Aug 1 09:57:37 1997 Daniel Wiesmann <[email protected]>
60+
61+
* Made some changes to the animation-update.c file which was not
62+
returning TCL_OK.
63+
64+
* libTcl/graph-plots.tcl: Changed the labels of graphs from
65+
TimeClick to Time.
66+
67+
Mon Jul 28 14:33:32 1997 Marco Antoniotti <[email protected]>
68+
69+
* libDebug/shift_api_info.c (shift_api_make_array_value): fixed
70+
printing of arrays of instances.
71+
72+
Wed Jul 16 12:28:13 1997 Marco Antoniotti <[email protected]>
73+
74+
* libDebug/shift_api_info.c (shift_api_make_user_value): Added
75+
zeroing of the heap allocated instance if no component is actually
76+
passed in. Some versions of malloc do not zero the memory and
77+
this resulted in a bad reference down the line when printing an
78+
instance.
79+
80+
Thu Jul 3 11:18:54 1997 Marco Antoniotti <[email protected]>
81+
82+
* Modified several calls to 'malloc' into 'safe_malloc'. This
83+
also required making the external definition of this function
84+
available in the file 'include/run-time.h'.
85+
86+
Thu Jun 12 09:59:41 1997 Marco Antoniotti <[email protected]>
87+
88+
* run-time/collection.c (set_membership_X): added specialized
89+
functions for testing membership in number, symbol, array, set,
90+
and instance sets.
91+
(set_equal): added proper definition for 'set_equal'.
92+
93+
* Fixed bug with set membership testing of constant elements.
94+
Modifications in 'include/collection.h', 'run-time/collection.c',
95+
and 'compiler/generate.c'. Possible problems without new hash
96+
code may lurk somewhere.
97+
98+
Thu May 15 15:13:53 1997 Marco Antoniotti <[email protected]>
99+
100+
* Changed all the .in files and the configuration scripts in order
101+
to remove all the dependencies from Itcl/ and Itk.
102+
103+
Wed May 14 08:31:07 1997 Marco Antoniotti <[email protected]>
104+
105+
* Added preliminary Foreign Function interface. A 'function' can
106+
now have arrays as arguments and parameters declared as 'in' or
107+
'out' (a la' Ada - with no combinations). Most machinery is
108+
"incremental": old programs work without modification.
109+
110+
Note however that the FFI may break the RHS first LHS next rule,
111+
when 'out' parameters are present in a function call.
112+
113+
* Fixed bugs here and there.
114+
115+
Mon Mar 3 11:12:32 1997 Marco Antoniotti <[email protected]>
116+
117+
* Added construction of binary distribution.
118+
119+
* Changed the packaging scheme for SHIFT. Now the tar file
120+
unpacks in a directory called 'shift'. The configuration process
121+
must take place in there.
122+
123+

0 commit comments

Comments
 (0)