mirror of
https://gcc.gnu.org/git/gcc.git
synced 2026-02-22 12:00:03 -05:00
Compare commits
284 Commits
devel/noth
...
devel/modu
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4f27bc50e6 | ||
|
|
2e0ff34783 | ||
|
|
fb2a3f4708 | ||
|
|
144b3ad102 | ||
|
|
2922dd0987 | ||
|
|
28f261c515 | ||
|
|
0ce58b3761 | ||
|
|
ea1c601751 | ||
|
|
d5d3e57d33 | ||
|
|
5a359399d8 | ||
|
|
74d1529a36 | ||
|
|
fd7e057183 | ||
|
|
f6984c8112 | ||
|
|
d90b603b6b | ||
|
|
4487e05a7c | ||
|
|
aaa673daca | ||
|
|
442bcd0e9f | ||
|
|
e487d6fa02 | ||
|
|
98b201a33b | ||
|
|
5405813b8a | ||
|
|
db80db0aab | ||
|
|
60035bdefe | ||
|
|
14e295ecf0 | ||
|
|
071c72a9e4 | ||
|
|
e171e6b291 | ||
|
|
2ed9ad9b91 | ||
|
|
54ea48efe1 | ||
|
|
bdec440d71 | ||
|
|
cad9dac282 | ||
|
|
918e3a0d1f | ||
|
|
5d09bba11a | ||
|
|
806751e5e9 | ||
|
|
deaeee4c18 | ||
|
|
55ca43c9f2 | ||
|
|
fd4db55374 | ||
|
|
7b0ef381ac | ||
|
|
1e33c0019b | ||
|
|
59f312880b | ||
|
|
5561d86a22 | ||
|
|
681cb6addd | ||
|
|
b0545fc190 | ||
|
|
81b4437fd0 | ||
|
|
0685f29d72 | ||
|
|
5c95b7e7dc | ||
|
|
0c1fe5e2aa | ||
|
|
d1eed60431 | ||
|
|
fe8cdf1cab | ||
|
|
b7bbab2f69 | ||
|
|
0fea4cded3 | ||
|
|
63edc9963c | ||
|
|
be86a95e80 | ||
|
|
f879a1e7e7 | ||
|
|
a72dedb728 | ||
|
|
09d45192ff | ||
|
|
b94c3d78cf | ||
|
|
28504e8e71 | ||
|
|
59a8e4ef46 | ||
|
|
494609a749 | ||
|
|
ca91bc242a | ||
|
|
a0fa580fb0 | ||
|
|
b66b8be4a0 | ||
|
|
a2bb2bc376 | ||
|
|
1c4163fda4 | ||
|
|
f7b2d2d0ab | ||
|
|
4a7481c6ed | ||
|
|
c92177a3eb | ||
|
|
b8bcd40cae | ||
|
|
2cd0f1de97 | ||
|
|
72db6dad8e | ||
|
|
389e72cc5e | ||
|
|
c9e2b1929b | ||
|
|
f2c218d067 | ||
|
|
8239b43c4b | ||
|
|
4ba09edbfd | ||
|
|
92a438dee0 | ||
|
|
a5bebf26c9 | ||
|
|
d2e4f24ef5 | ||
|
|
c7ddd74ac0 | ||
|
|
206c4f7760 | ||
|
|
59ad15abea | ||
|
|
37e5e898dd | ||
|
|
737bcb5ef6 | ||
|
|
6ca7afc483 | ||
|
|
d5e34c12f8 | ||
|
|
fd24c17e62 | ||
|
|
34a21a5666 | ||
|
|
89ef821b08 | ||
|
|
971d9ba31f | ||
|
|
4b1cbb1e4f | ||
|
|
ae6d944ee8 | ||
|
|
7b1a727b06 | ||
|
|
3e960b43e6 | ||
|
|
589b0719a2 | ||
|
|
65bc1e9925 | ||
|
|
06c977f80e | ||
|
|
3eced900a6 | ||
|
|
54111a6d18 | ||
|
|
6ed0a391b3 | ||
|
|
846d4284ea | ||
|
|
b47bc3ef67 | ||
|
|
28be13f565 | ||
|
|
03322fa685 | ||
|
|
ecba4ac821 | ||
|
|
627be3b3ac | ||
|
|
8ee798366e | ||
|
|
6e8e31eb93 | ||
|
|
352fd437af | ||
|
|
b824d80744 | ||
|
|
820fb90479 | ||
|
|
06642d296d | ||
|
|
82bcda7e2a | ||
|
|
1d7705735b | ||
|
|
d7183fef74 | ||
|
|
c560f1cecb | ||
|
|
a3192a7ec4 | ||
|
|
8ea7cdc1d0 | ||
|
|
9fb8757161 | ||
|
|
36e6b503bc | ||
|
|
e5fc377213 | ||
|
|
c497ca7343 | ||
|
|
57900dd7f9 | ||
|
|
c9642b5a67 | ||
|
|
f55158f3ef | ||
|
|
0c69befbfe | ||
|
|
5916ce2dac | ||
|
|
90b9a1e447 | ||
|
|
dcc8de83f4 | ||
|
|
abd47db327 | ||
|
|
6a828f6369 | ||
|
|
f6b11ec15d | ||
|
|
d6bbca5ee9 | ||
|
|
79e5e3fe3d | ||
|
|
f9812a605a | ||
|
|
301cbc1baf | ||
|
|
619a463632 | ||
|
|
212dacafc2 | ||
|
|
1e0e7e1222 | ||
|
|
6bafc4d528 | ||
|
|
9fcf394b7c | ||
|
|
c196fa13e0 | ||
|
|
bd2f92560f | ||
|
|
d0e4bdcd79 | ||
|
|
9109c9ebe2 | ||
|
|
568b62ce92 | ||
|
|
9409a75aa9 | ||
|
|
f17a10fdcf | ||
|
|
9f1a305893 | ||
|
|
2bbc95a9c0 | ||
|
|
3c46ace3d1 | ||
|
|
4e4cd35644 | ||
|
|
efc2d06325 | ||
|
|
af714e8280 | ||
|
|
e907dc7cea | ||
|
|
c7570ba482 | ||
|
|
a762d9f0a6 | ||
|
|
6f1b137440 | ||
|
|
2ac2256255 | ||
|
|
bd048913f0 | ||
|
|
bf9e93834c | ||
|
|
31ab57c82f | ||
|
|
4476710042 | ||
|
|
a6dce3480f | ||
|
|
bec4c840b3 | ||
|
|
67ce904a2e | ||
|
|
f5a02fa669 | ||
|
|
22ba1fbcce | ||
|
|
db1ed08b56 | ||
|
|
b69680044c | ||
|
|
519791ac80 | ||
|
|
70fe0035c0 | ||
|
|
beb9098be0 | ||
|
|
b387a11618 | ||
|
|
ae56a3ce25 | ||
|
|
b94876d89d | ||
|
|
85de466e31 | ||
|
|
f39c518e3d | ||
|
|
b8c70285c3 | ||
|
|
b624e1e9dc | ||
|
|
f043f7346c | ||
|
|
955517d6fe | ||
|
|
cf78131316 | ||
|
|
f3673984ea | ||
|
|
9348eb1ddb | ||
|
|
979ad601ea | ||
|
|
e684d1aa61 | ||
|
|
9506c9f1ab | ||
|
|
98e435df7b | ||
|
|
c55d3d27ad | ||
|
|
f828bee467 | ||
|
|
6ac8c270ed | ||
|
|
0d22cf81a2 | ||
|
|
cc2a7dabd1 | ||
|
|
8685e718a2 | ||
|
|
eae2c45ec9 | ||
|
|
2412370904 | ||
|
|
5e1d6d85ef | ||
|
|
cecd72c6eb | ||
|
|
c684b7809e | ||
|
|
11470d2c21 | ||
|
|
8df4f2c9f5 | ||
|
|
7714b511fc | ||
|
|
80fe93e644 | ||
|
|
e20252827b | ||
|
|
961f687cb2 | ||
|
|
e51baa548c | ||
|
|
4a83a112c2 | ||
|
|
a211188aea | ||
|
|
7cbd60d58f | ||
|
|
5f6e0d8f3a | ||
|
|
faff2e5af1 | ||
|
|
07395a6e22 | ||
|
|
183c123117 | ||
|
|
d08981bfd0 | ||
|
|
dce2ffd510 | ||
|
|
51bc4b8156 | ||
|
|
77bed20166 | ||
|
|
027bcf0b7f | ||
|
|
2525979b7b | ||
|
|
c4d5b401d1 | ||
|
|
6d7456f841 | ||
|
|
252a99461a | ||
|
|
3d864fce4b | ||
|
|
e6e2c18a77 | ||
|
|
c6cdf493ee | ||
|
|
a126471588 | ||
|
|
b34dbb71fb | ||
|
|
b917f555c3 | ||
|
|
3431b882d9 | ||
|
|
7f1006fd39 | ||
|
|
7f91bb254c | ||
|
|
fa4a4a2ee5 | ||
|
|
966f05c85e | ||
|
|
c9afa63c3b | ||
|
|
fd948137c5 | ||
|
|
d270aab6ff | ||
|
|
d9973d8e0b | ||
|
|
740db39124 | ||
|
|
016519cc0e | ||
|
|
c62f597484 | ||
|
|
e61ec3e273 | ||
|
|
416ca65d27 | ||
|
|
4f37535124 | ||
|
|
507c189745 | ||
|
|
386e7057d7 | ||
|
|
595922b25a | ||
|
|
f737a5994d | ||
|
|
9513dbcb39 | ||
|
|
d914a14e24 | ||
|
|
fafe664110 | ||
|
|
d23f74ee5d | ||
|
|
8bb70f83e3 | ||
|
|
65c5a20d6e | ||
|
|
5e2c046e06 | ||
|
|
8559a6cdfa | ||
|
|
12ab545439 | ||
|
|
933e82ea6a | ||
|
|
37529f1a0a | ||
|
|
85251cc0b1 | ||
|
|
447e74e402 | ||
|
|
e9e0d6237e | ||
|
|
58352eb716 | ||
|
|
d838b5f228 | ||
|
|
c31cb58bc7 | ||
|
|
74896c9b8f | ||
|
|
8cd66d28b1 | ||
|
|
ddde4597e7 | ||
|
|
257e9cdaa8 | ||
|
|
f9d489dbbe | ||
|
|
7e20439cde | ||
|
|
b4d74a80f3 | ||
|
|
bc56488abd | ||
|
|
867acc2e2e | ||
|
|
75db6b4f11 | ||
|
|
f33123de65 | ||
|
|
0593d8a669 | ||
|
|
c9fba1bc6c | ||
|
|
20db8b340b | ||
|
|
4b3d4810cf | ||
|
|
7098eb60a3 | ||
|
|
ab813f8b06 | ||
|
|
35e03669f2 | ||
|
|
f7698b15ab | ||
|
|
e13aec77b9 | ||
|
|
7401123f97 |
33
Makefile.def
33
Makefile.def
@@ -10,12 +10,12 @@ AutoGen definitions Makefile.tpl;
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation; either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program; see the file COPYING3. If not see
|
||||
// <http://www.gnu.org/licenses/>.
|
||||
@@ -46,7 +46,7 @@ host_modules= { module= fixincludes; bootstrap=true;
|
||||
missing= install-dvi; };
|
||||
host_modules= { module= flex; no_check_cross= true; };
|
||||
host_modules= { module= gas; bootstrap=true; };
|
||||
host_modules= { module= gcc; bootstrap=true;
|
||||
host_modules= { module= gcc; bootstrap=true;
|
||||
extra_make_flags="$(EXTRA_GCC_FLAGS)"; };
|
||||
host_modules= { module= gmp; lib_path=.libs; bootstrap=true;
|
||||
// Work around in-tree gmp configure bug with missing flex.
|
||||
@@ -131,7 +131,7 @@ host_modules= { module= gdb; };
|
||||
host_modules= { module= expect; };
|
||||
host_modules= { module= guile; };
|
||||
host_modules= { module= tk; };
|
||||
host_modules= { module= libtermcap; no_check=true;
|
||||
host_modules= { module= libtermcap; no_check=true;
|
||||
missing=mostlyclean;
|
||||
missing=clean;
|
||||
missing=distclean;
|
||||
@@ -185,6 +185,7 @@ target_modules = { module= libffi; no_install=true; };
|
||||
target_modules = { module= zlib; bootstrap=true; };
|
||||
target_modules = { module= rda; };
|
||||
target_modules = { module= libada; };
|
||||
target_modules = { module= libgm2; lib_path=.libs; };
|
||||
target_modules = { module= libgomp; bootstrap= true; lib_path=.libs; };
|
||||
target_modules = { module= libitm; lib_path=.libs; };
|
||||
target_modules = { module= libatomic; bootstrap=true; lib_path=.libs; };
|
||||
@@ -193,29 +194,29 @@ target_modules = { module= libatomic; bootstrap=true; lib_path=.libs; };
|
||||
// Not all; these are the ones which don't have special options.
|
||||
// "depend" indicates that a target depends on another target uniformly
|
||||
// for each subdirectory. There can be several such lines per target.
|
||||
recursive_targets = { make_target= info;
|
||||
recursive_targets = { make_target= info;
|
||||
depend=configure; };
|
||||
recursive_targets = { make_target= dvi;
|
||||
recursive_targets = { make_target= dvi;
|
||||
depend=configure; };
|
||||
recursive_targets = { make_target= pdf;
|
||||
recursive_targets = { make_target= pdf;
|
||||
depend=configure; };
|
||||
recursive_targets = { make_target= html;
|
||||
recursive_targets = { make_target= html;
|
||||
depend=configure; };
|
||||
recursive_targets = { make_target= TAGS;
|
||||
recursive_targets = { make_target= TAGS;
|
||||
depend=configure; };
|
||||
recursive_targets = { make_target= install-info;
|
||||
recursive_targets = { make_target= install-info;
|
||||
depend=configure;
|
||||
depend=info; };
|
||||
recursive_targets = { make_target= install-dvi;
|
||||
depend=configure;
|
||||
depend=dvi; };
|
||||
recursive_targets = { make_target= install-pdf;
|
||||
recursive_targets = { make_target= install-pdf;
|
||||
depend=configure;
|
||||
depend=pdf; };
|
||||
recursive_targets = { make_target= install-html;
|
||||
recursive_targets = { make_target= install-html;
|
||||
depend=configure;
|
||||
depend=html; };
|
||||
recursive_targets = { make_target= installcheck;
|
||||
recursive_targets = { make_target= installcheck;
|
||||
depend=configure; };
|
||||
recursive_targets = { make_target= mostlyclean; };
|
||||
recursive_targets = { make_target= clean; };
|
||||
@@ -307,6 +308,8 @@ flags_to_pass = { flag= GOC_FOR_TARGET ; };
|
||||
flags_to_pass = { flag= GOCFLAGS_FOR_TARGET ; };
|
||||
flags_to_pass = { flag= GDC_FOR_TARGET ; };
|
||||
flags_to_pass = { flag= GDCFLAGS_FOR_TARGET ; };
|
||||
flags_to_pass = { flag= GM2_FOR_TARGET ; };
|
||||
flags_to_pass = { flag= GM2FLAGS_FOR_TARGET ; };
|
||||
flags_to_pass = { flag= LD_FOR_TARGET ; };
|
||||
flags_to_pass = { flag= LIPO_FOR_TARGET ; };
|
||||
flags_to_pass = { flag= LDFLAGS_FOR_TARGET ; };
|
||||
@@ -618,6 +621,8 @@ dependencies = { module=configure-target-libgo; on=all-target-libstdc++-v3; };
|
||||
dependencies = { module=all-target-libgo; on=all-target-libbacktrace; };
|
||||
dependencies = { module=all-target-libgo; on=all-target-libffi; };
|
||||
dependencies = { module=all-target-libgo; on=all-target-libatomic; };
|
||||
dependencies = { module=configure-target-libgm2; on=all-target-libstdc++-v3; };
|
||||
dependencies = { module=all-target-libgm2; on=all-target-libatomic; };
|
||||
dependencies = { module=configure-target-libphobos; on=configure-target-libbacktrace; };
|
||||
dependencies = { module=configure-target-libphobos; on=configure-target-zlib; };
|
||||
dependencies = { module=all-target-libphobos; on=all-target-libbacktrace; };
|
||||
@@ -673,6 +678,8 @@ languages = { language=obj-c++; gcc-check-target=check-obj-c++; };
|
||||
languages = { language=go; gcc-check-target=check-go;
|
||||
lib-check-target=check-target-libgo;
|
||||
lib-check-target=check-gotools; };
|
||||
languages = { language=m2; gcc-check-target=check-m2;
|
||||
lib-check-target=check-target-libgm2; };
|
||||
languages = { language=d; gcc-check-target=check-d;
|
||||
lib-check-target=check-target-libphobos; };
|
||||
languages = { language=jit; gcc-check-target=check-jit; };
|
||||
|
||||
552
Makefile.in
552
Makefile.in
@@ -10,12 +10,12 @@
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; see the file COPYING3. If not see
|
||||
# <http://www.gnu.org/licenses/>.
|
||||
@@ -163,6 +163,8 @@ BUILD_EXPORTS = \
|
||||
GOCFLAGS="$(GOCFLAGS_FOR_BUILD)"; export GOCFLAGS; \
|
||||
GDC="$(GDC_FOR_BUILD)"; export GDC; \
|
||||
GDCFLAGS="$(GDCFLAGS_FOR_BUILD)"; export GDCFLAGS; \
|
||||
GM2="$(GM2_FOR_BUILD)"; export GM2; \
|
||||
GM2FLAGS="$(GM2FLAGS_FOR_BUILD)"; export GM2FLAGS; \
|
||||
DLLTOOL="$(DLLTOOL_FOR_BUILD)"; export DLLTOOL; \
|
||||
DSYMUTIL="$(DSYMUTIL_FOR_BUILD)"; export DSYMUTIL; \
|
||||
LD="$(LD_FOR_BUILD)"; export LD; \
|
||||
@@ -201,6 +203,7 @@ HOST_EXPORTS = \
|
||||
GFORTRAN="$(GFORTRAN)"; export GFORTRAN; \
|
||||
GOC="$(GOC)"; export GOC; \
|
||||
GDC="$(GDC)"; export GDC; \
|
||||
GM2="$(GM2)"; export GM2; \
|
||||
AR="$(AR)"; export AR; \
|
||||
AS="$(AS)"; export AS; \
|
||||
CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
|
||||
@@ -304,6 +307,7 @@ BASE_TARGET_EXPORTS = \
|
||||
GFORTRAN="$(GFORTRAN_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export GFORTRAN; \
|
||||
GOC="$(GOC_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export GOC; \
|
||||
GDC="$(GDC_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export GDC; \
|
||||
GM2="$(GM2_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export GM2; \
|
||||
DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \
|
||||
DSYMUTIL="$(DSYMUTIL_FOR_TARGET)"; export DSYMUTIL; \
|
||||
LD="$(COMPILER_LD_FOR_TARGET)"; export LD; \
|
||||
@@ -370,6 +374,7 @@ DSYMUTIL_FOR_BUILD = @DSYMUTIL_FOR_BUILD@
|
||||
GFORTRAN_FOR_BUILD = @GFORTRAN_FOR_BUILD@
|
||||
GOC_FOR_BUILD = @GOC_FOR_BUILD@
|
||||
GDC_FOR_BUILD = @GDC_FOR_BUILD@
|
||||
GM2_FOR_BUILD = @GM2_FOR_BUILD@
|
||||
LDFLAGS_FOR_BUILD = @LDFLAGS_FOR_BUILD@
|
||||
LD_FOR_BUILD = @LD_FOR_BUILD@
|
||||
NM_FOR_BUILD = @NM_FOR_BUILD@
|
||||
@@ -440,6 +445,7 @@ CXXFLAGS = @CXXFLAGS@
|
||||
LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates
|
||||
GOCFLAGS = $(CFLAGS)
|
||||
GDCFLAGS = $(CFLAGS)
|
||||
GM2FLAGS = $(CFLAGS)
|
||||
|
||||
# Pass additional PGO and LTO compiler options to the PGO build.
|
||||
BUILD_CFLAGS = $(PGO_BUILD_CFLAGS) $(PGO_BUILD_LTO_CFLAGS)
|
||||
@@ -655,6 +661,7 @@ RAW_CXX_FOR_TARGET=$(STAGE_CC_WRAPPER) @RAW_CXX_FOR_TARGET@
|
||||
GFORTRAN_FOR_TARGET=$(STAGE_CC_WRAPPER) @GFORTRAN_FOR_TARGET@
|
||||
GOC_FOR_TARGET=$(STAGE_CC_WRAPPER) @GOC_FOR_TARGET@
|
||||
GDC_FOR_TARGET=$(STAGE_CC_WRAPPER) @GDC_FOR_TARGET@
|
||||
GM2_FOR_TARGET=$(STAGE_CC_WRAPPER) @GM2_FOR_TARGET@
|
||||
DLLTOOL_FOR_TARGET=@DLLTOOL_FOR_TARGET@
|
||||
DSYMUTIL_FOR_TARGET=@DSYMUTIL_FOR_TARGET@
|
||||
LD_FOR_TARGET=@LD_FOR_TARGET@
|
||||
@@ -680,6 +687,7 @@ CXXFLAGS_FOR_TARGET = @CXXFLAGS_FOR_TARGET@
|
||||
LIBCFLAGS_FOR_TARGET = $(CFLAGS_FOR_TARGET)
|
||||
LIBCXXFLAGS_FOR_TARGET = $(CXXFLAGS_FOR_TARGET) -fno-implicit-templates
|
||||
LDFLAGS_FOR_TARGET = @LDFLAGS_FOR_TARGET@
|
||||
GM2FLAGS_FOR_TARGET = -O2 -g
|
||||
GOCFLAGS_FOR_TARGET = -O2 -g
|
||||
GDCFLAGS_FOR_TARGET = -O2 -g
|
||||
|
||||
@@ -706,7 +714,7 @@ all:
|
||||
|
||||
# This is the list of directories that may be needed in RPATH_ENVVAR
|
||||
# so that programs built for the target machine work.
|
||||
TARGET_LIB_PATH = $(TARGET_LIB_PATH_libstdc++-v3)$(TARGET_LIB_PATH_libsanitizer)$(TARGET_LIB_PATH_libvtv)$(TARGET_LIB_PATH_libssp)$(TARGET_LIB_PATH_libphobos)$(TARGET_LIB_PATH_libgomp)$(TARGET_LIB_PATH_libitm)$(TARGET_LIB_PATH_libatomic)$(HOST_LIB_PATH_gcc)
|
||||
TARGET_LIB_PATH = $(TARGET_LIB_PATH_libstdc++-v3)$(TARGET_LIB_PATH_libsanitizer)$(TARGET_LIB_PATH_libvtv)$(TARGET_LIB_PATH_libssp)$(TARGET_LIB_PATH_libphobos)$(TARGET_LIB_PATH_libgm2)$(TARGET_LIB_PATH_libgomp)$(TARGET_LIB_PATH_libitm)$(TARGET_LIB_PATH_libatomic)$(HOST_LIB_PATH_gcc)
|
||||
|
||||
@if target-libstdc++-v3
|
||||
TARGET_LIB_PATH_libstdc++-v3 = $$r/$(TARGET_SUBDIR)/libstdc++-v3/src/.libs:
|
||||
@@ -728,6 +736,10 @@ TARGET_LIB_PATH_libssp = $$r/$(TARGET_SUBDIR)/libssp/.libs:
|
||||
TARGET_LIB_PATH_libphobos = $$r/$(TARGET_SUBDIR)/libphobos/src/.libs:
|
||||
@endif target-libphobos
|
||||
|
||||
@if target-libgm2
|
||||
TARGET_LIB_PATH_libgm2 = $$r/$(TARGET_SUBDIR)/libgm2/.libs:
|
||||
@endif target-libgm2
|
||||
|
||||
@if target-libgomp
|
||||
TARGET_LIB_PATH_libgomp = $$r/$(TARGET_SUBDIR)/libgomp/.libs:
|
||||
@endif target-libgomp
|
||||
@@ -873,6 +885,8 @@ BASE_FLAGS_TO_PASS = \
|
||||
"GOCFLAGS_FOR_TARGET=$(GOCFLAGS_FOR_TARGET)" \
|
||||
"GDC_FOR_TARGET=$(GDC_FOR_TARGET)" \
|
||||
"GDCFLAGS_FOR_TARGET=$(GDCFLAGS_FOR_TARGET)" \
|
||||
"GM2_FOR_TARGET=$(GM2_FOR_TARGET)" \
|
||||
"GM2FLAGS_FOR_TARGET=$(GM2FLAGS_FOR_TARGET)" \
|
||||
"LD_FOR_TARGET=$(LD_FOR_TARGET)" \
|
||||
"LIPO_FOR_TARGET=$(LIPO_FOR_TARGET)" \
|
||||
"LDFLAGS_FOR_TARGET=$(LDFLAGS_FOR_TARGET)" \
|
||||
@@ -946,6 +960,7 @@ EXTRA_HOST_FLAGS = \
|
||||
'GFORTRAN=$(GFORTRAN)' \
|
||||
'GOC=$(GOC)' \
|
||||
'GDC=$(GDC)' \
|
||||
'GM2=$(GM2)' \
|
||||
'LD=$(LD)' \
|
||||
'LIPO=$(LIPO)' \
|
||||
'NM=$(NM)' \
|
||||
@@ -972,6 +987,7 @@ POSTSTAGE1_FLAGS_TO_PASS = \
|
||||
CC="$${CC}" CC_FOR_BUILD="$${CC_FOR_BUILD}" \
|
||||
CXX="$${CXX}" CXX_FOR_BUILD="$${CXX_FOR_BUILD}" \
|
||||
GDC="$${GDC}" GDC_FOR_BUILD="$${GDC_FOR_BUILD}" \
|
||||
GM2="$${GM2}" GM2_FOR_BUILD="$${GM2_FOR_BUILD}" \
|
||||
GNATBIND="$${GNATBIND}" \
|
||||
LDFLAGS="$${LDFLAGS}" \
|
||||
HOST_LIBS="$${HOST_LIBS}" \
|
||||
@@ -1007,6 +1023,8 @@ EXTRA_TARGET_FLAGS = \
|
||||
'GOCFLAGS=$$(GOCFLAGS_FOR_TARGET)' \
|
||||
'GDC=$$(GDC_FOR_TARGET) $$(XGCC_FLAGS_FOR_TARGET) $$(TFLAGS)' \
|
||||
'GDCFLAGS=$$(GDCFLAGS_FOR_TARGET)' \
|
||||
'GM2=$$(GM2_FOR_TARGET) $$(XGCC_FLAGS_FOR_TARGET) $$(TFLAGS)' \
|
||||
'GM2FLAGS=$$(GM2FLAGS_FOR_TARGET)' \
|
||||
'LD=$(COMPILER_LD_FOR_TARGET)' \
|
||||
'LDFLAGS=$$(LDFLAGS_FOR_TARGET)' \
|
||||
'LIBCFLAGS=$$(LIBCFLAGS_FOR_TARGET)' \
|
||||
@@ -1033,6 +1051,7 @@ TARGET_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS)
|
||||
# cross-building scheme.
|
||||
EXTRA_GCC_FLAGS = \
|
||||
"GCC_FOR_TARGET=$(GCC_FOR_TARGET) $$TFLAGS" \
|
||||
"GM2_FOR_TARGET=$(GM2_FOR_TARGET) $$TFLAGS" \
|
||||
"`echo 'STMP_FIXPROTO=$(STMP_FIXPROTO)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`" \
|
||||
"`echo 'LIMITS_H_TEST=$(LIMITS_H_TEST)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`"
|
||||
|
||||
@@ -1120,6 +1139,7 @@ configure-target: \
|
||||
maybe-configure-target-zlib \
|
||||
maybe-configure-target-rda \
|
||||
maybe-configure-target-libada \
|
||||
maybe-configure-target-libgm2 \
|
||||
maybe-configure-target-libgomp \
|
||||
maybe-configure-target-libitm \
|
||||
maybe-configure-target-libatomic
|
||||
@@ -1313,6 +1333,7 @@ all-target: maybe-all-target-zlib
|
||||
@endif target-zlib-no-bootstrap
|
||||
all-target: maybe-all-target-rda
|
||||
all-target: maybe-all-target-libada
|
||||
all-target: maybe-all-target-libgm2
|
||||
@if target-libgomp-no-bootstrap
|
||||
all-target: maybe-all-target-libgomp
|
||||
@endif target-libgomp-no-bootstrap
|
||||
@@ -1411,6 +1432,7 @@ info-target: maybe-info-target-libffi
|
||||
info-target: maybe-info-target-zlib
|
||||
info-target: maybe-info-target-rda
|
||||
info-target: maybe-info-target-libada
|
||||
info-target: maybe-info-target-libgm2
|
||||
info-target: maybe-info-target-libgomp
|
||||
info-target: maybe-info-target-libitm
|
||||
info-target: maybe-info-target-libatomic
|
||||
@@ -1500,6 +1522,7 @@ dvi-target: maybe-dvi-target-libffi
|
||||
dvi-target: maybe-dvi-target-zlib
|
||||
dvi-target: maybe-dvi-target-rda
|
||||
dvi-target: maybe-dvi-target-libada
|
||||
dvi-target: maybe-dvi-target-libgm2
|
||||
dvi-target: maybe-dvi-target-libgomp
|
||||
dvi-target: maybe-dvi-target-libitm
|
||||
dvi-target: maybe-dvi-target-libatomic
|
||||
@@ -1589,6 +1612,7 @@ pdf-target: maybe-pdf-target-libffi
|
||||
pdf-target: maybe-pdf-target-zlib
|
||||
pdf-target: maybe-pdf-target-rda
|
||||
pdf-target: maybe-pdf-target-libada
|
||||
pdf-target: maybe-pdf-target-libgm2
|
||||
pdf-target: maybe-pdf-target-libgomp
|
||||
pdf-target: maybe-pdf-target-libitm
|
||||
pdf-target: maybe-pdf-target-libatomic
|
||||
@@ -1678,6 +1702,7 @@ html-target: maybe-html-target-libffi
|
||||
html-target: maybe-html-target-zlib
|
||||
html-target: maybe-html-target-rda
|
||||
html-target: maybe-html-target-libada
|
||||
html-target: maybe-html-target-libgm2
|
||||
html-target: maybe-html-target-libgomp
|
||||
html-target: maybe-html-target-libitm
|
||||
html-target: maybe-html-target-libatomic
|
||||
@@ -1767,6 +1792,7 @@ TAGS-target: maybe-TAGS-target-libffi
|
||||
TAGS-target: maybe-TAGS-target-zlib
|
||||
TAGS-target: maybe-TAGS-target-rda
|
||||
TAGS-target: maybe-TAGS-target-libada
|
||||
TAGS-target: maybe-TAGS-target-libgm2
|
||||
TAGS-target: maybe-TAGS-target-libgomp
|
||||
TAGS-target: maybe-TAGS-target-libitm
|
||||
TAGS-target: maybe-TAGS-target-libatomic
|
||||
@@ -1856,6 +1882,7 @@ install-info-target: maybe-install-info-target-libffi
|
||||
install-info-target: maybe-install-info-target-zlib
|
||||
install-info-target: maybe-install-info-target-rda
|
||||
install-info-target: maybe-install-info-target-libada
|
||||
install-info-target: maybe-install-info-target-libgm2
|
||||
install-info-target: maybe-install-info-target-libgomp
|
||||
install-info-target: maybe-install-info-target-libitm
|
||||
install-info-target: maybe-install-info-target-libatomic
|
||||
@@ -1945,6 +1972,7 @@ install-dvi-target: maybe-install-dvi-target-libffi
|
||||
install-dvi-target: maybe-install-dvi-target-zlib
|
||||
install-dvi-target: maybe-install-dvi-target-rda
|
||||
install-dvi-target: maybe-install-dvi-target-libada
|
||||
install-dvi-target: maybe-install-dvi-target-libgm2
|
||||
install-dvi-target: maybe-install-dvi-target-libgomp
|
||||
install-dvi-target: maybe-install-dvi-target-libitm
|
||||
install-dvi-target: maybe-install-dvi-target-libatomic
|
||||
@@ -2034,6 +2062,7 @@ install-pdf-target: maybe-install-pdf-target-libffi
|
||||
install-pdf-target: maybe-install-pdf-target-zlib
|
||||
install-pdf-target: maybe-install-pdf-target-rda
|
||||
install-pdf-target: maybe-install-pdf-target-libada
|
||||
install-pdf-target: maybe-install-pdf-target-libgm2
|
||||
install-pdf-target: maybe-install-pdf-target-libgomp
|
||||
install-pdf-target: maybe-install-pdf-target-libitm
|
||||
install-pdf-target: maybe-install-pdf-target-libatomic
|
||||
@@ -2123,6 +2152,7 @@ install-html-target: maybe-install-html-target-libffi
|
||||
install-html-target: maybe-install-html-target-zlib
|
||||
install-html-target: maybe-install-html-target-rda
|
||||
install-html-target: maybe-install-html-target-libada
|
||||
install-html-target: maybe-install-html-target-libgm2
|
||||
install-html-target: maybe-install-html-target-libgomp
|
||||
install-html-target: maybe-install-html-target-libitm
|
||||
install-html-target: maybe-install-html-target-libatomic
|
||||
@@ -2212,6 +2242,7 @@ installcheck-target: maybe-installcheck-target-libffi
|
||||
installcheck-target: maybe-installcheck-target-zlib
|
||||
installcheck-target: maybe-installcheck-target-rda
|
||||
installcheck-target: maybe-installcheck-target-libada
|
||||
installcheck-target: maybe-installcheck-target-libgm2
|
||||
installcheck-target: maybe-installcheck-target-libgomp
|
||||
installcheck-target: maybe-installcheck-target-libitm
|
||||
installcheck-target: maybe-installcheck-target-libatomic
|
||||
@@ -2301,6 +2332,7 @@ mostlyclean-target: maybe-mostlyclean-target-libffi
|
||||
mostlyclean-target: maybe-mostlyclean-target-zlib
|
||||
mostlyclean-target: maybe-mostlyclean-target-rda
|
||||
mostlyclean-target: maybe-mostlyclean-target-libada
|
||||
mostlyclean-target: maybe-mostlyclean-target-libgm2
|
||||
mostlyclean-target: maybe-mostlyclean-target-libgomp
|
||||
mostlyclean-target: maybe-mostlyclean-target-libitm
|
||||
mostlyclean-target: maybe-mostlyclean-target-libatomic
|
||||
@@ -2390,6 +2422,7 @@ clean-target: maybe-clean-target-libffi
|
||||
clean-target: maybe-clean-target-zlib
|
||||
clean-target: maybe-clean-target-rda
|
||||
clean-target: maybe-clean-target-libada
|
||||
clean-target: maybe-clean-target-libgm2
|
||||
clean-target: maybe-clean-target-libgomp
|
||||
clean-target: maybe-clean-target-libitm
|
||||
clean-target: maybe-clean-target-libatomic
|
||||
@@ -2479,6 +2512,7 @@ distclean-target: maybe-distclean-target-libffi
|
||||
distclean-target: maybe-distclean-target-zlib
|
||||
distclean-target: maybe-distclean-target-rda
|
||||
distclean-target: maybe-distclean-target-libada
|
||||
distclean-target: maybe-distclean-target-libgm2
|
||||
distclean-target: maybe-distclean-target-libgomp
|
||||
distclean-target: maybe-distclean-target-libitm
|
||||
distclean-target: maybe-distclean-target-libatomic
|
||||
@@ -2568,6 +2602,7 @@ maintainer-clean-target: maybe-maintainer-clean-target-libffi
|
||||
maintainer-clean-target: maybe-maintainer-clean-target-zlib
|
||||
maintainer-clean-target: maybe-maintainer-clean-target-rda
|
||||
maintainer-clean-target: maybe-maintainer-clean-target-libada
|
||||
maintainer-clean-target: maybe-maintainer-clean-target-libgm2
|
||||
maintainer-clean-target: maybe-maintainer-clean-target-libgomp
|
||||
maintainer-clean-target: maybe-maintainer-clean-target-libitm
|
||||
maintainer-clean-target: maybe-maintainer-clean-target-libatomic
|
||||
@@ -2629,7 +2664,7 @@ local-maintainer-clean:
|
||||
clean: do-clean local-clean
|
||||
mostlyclean: do-mostlyclean local-clean
|
||||
distclean: do-distclean local-clean local-distclean
|
||||
maintainer-clean: local-maintainer-clean do-maintainer-clean local-clean
|
||||
maintainer-clean: local-maintainer-clean do-maintainer-clean local-clean
|
||||
maintainer-clean: local-distclean
|
||||
realclean: maintainer-clean
|
||||
|
||||
@@ -2715,6 +2750,7 @@ check-target: \
|
||||
maybe-check-target-zlib \
|
||||
maybe-check-target-rda \
|
||||
maybe-check-target-libada \
|
||||
maybe-check-target-libgm2 \
|
||||
maybe-check-target-libgomp \
|
||||
maybe-check-target-libitm \
|
||||
maybe-check-target-libatomic
|
||||
@@ -2906,6 +2942,7 @@ install-target: \
|
||||
maybe-install-target-zlib \
|
||||
maybe-install-target-rda \
|
||||
maybe-install-target-libada \
|
||||
maybe-install-target-libgm2 \
|
||||
maybe-install-target-libgomp \
|
||||
maybe-install-target-libitm \
|
||||
maybe-install-target-libatomic
|
||||
@@ -3015,6 +3052,7 @@ install-strip-target: \
|
||||
maybe-install-strip-target-zlib \
|
||||
maybe-install-strip-target-rda \
|
||||
maybe-install-strip-target-libada \
|
||||
maybe-install-strip-target-libgm2 \
|
||||
maybe-install-strip-target-libgomp \
|
||||
maybe-install-strip-target-libitm \
|
||||
maybe-install-strip-target-libatomic
|
||||
@@ -3038,7 +3076,7 @@ dir.info: do-install-info
|
||||
|
||||
dist:
|
||||
@echo "Building a full distribution of this tree isn't done"
|
||||
@echo "via 'make dist'. Check out the etc/ subdirectory"
|
||||
@echo "via 'make dist'. Check out the etc/ subdirectory"
|
||||
|
||||
etags tags: TAGS
|
||||
|
||||
@@ -58104,6 +58142,491 @@ maintainer-clean-target-libada:
|
||||
|
||||
|
||||
|
||||
.PHONY: configure-target-libgm2 maybe-configure-target-libgm2
|
||||
maybe-configure-target-libgm2:
|
||||
@if gcc-bootstrap
|
||||
configure-target-libgm2: stage_current
|
||||
@endif gcc-bootstrap
|
||||
@if target-libgm2
|
||||
maybe-configure-target-libgm2: configure-target-libgm2
|
||||
configure-target-libgm2:
|
||||
@: $(MAKE); $(unstage)
|
||||
@r=`${PWD_COMMAND}`; export r; \
|
||||
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
|
||||
echo "Checking multilib configuration for libgm2..."; \
|
||||
$(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libgm2; \
|
||||
$(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libgm2/multilib.tmp 2> /dev/null; \
|
||||
if test -r $(TARGET_SUBDIR)/libgm2/multilib.out; then \
|
||||
if cmp -s $(TARGET_SUBDIR)/libgm2/multilib.tmp $(TARGET_SUBDIR)/libgm2/multilib.out; then \
|
||||
rm -f $(TARGET_SUBDIR)/libgm2/multilib.tmp; \
|
||||
else \
|
||||
rm -f $(TARGET_SUBDIR)/libgm2/Makefile; \
|
||||
mv $(TARGET_SUBDIR)/libgm2/multilib.tmp $(TARGET_SUBDIR)/libgm2/multilib.out; \
|
||||
fi; \
|
||||
else \
|
||||
mv $(TARGET_SUBDIR)/libgm2/multilib.tmp $(TARGET_SUBDIR)/libgm2/multilib.out; \
|
||||
fi; \
|
||||
test ! -f $(TARGET_SUBDIR)/libgm2/Makefile || exit 0; \
|
||||
$(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libgm2; \
|
||||
$(NORMAL_TARGET_EXPORTS) \
|
||||
echo Configuring in $(TARGET_SUBDIR)/libgm2; \
|
||||
cd "$(TARGET_SUBDIR)/libgm2" || exit 1; \
|
||||
case $(srcdir) in \
|
||||
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
|
||||
*) topdir=`echo $(TARGET_SUBDIR)/libgm2/ | \
|
||||
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
|
||||
esac; \
|
||||
module_srcdir=libgm2; \
|
||||
rm -f no-such-file || : ; \
|
||||
CONFIG_SITE=no-such-file $(SHELL) \
|
||||
$$s/$$module_srcdir/configure \
|
||||
--srcdir=$${topdir}/$$module_srcdir \
|
||||
$(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
|
||||
--target=${target_alias} \
|
||||
|| exit 1
|
||||
@endif target-libgm2
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.PHONY: all-target-libgm2 maybe-all-target-libgm2
|
||||
maybe-all-target-libgm2:
|
||||
@if gcc-bootstrap
|
||||
all-target-libgm2: stage_current
|
||||
@endif gcc-bootstrap
|
||||
@if target-libgm2
|
||||
TARGET-target-libgm2=all
|
||||
maybe-all-target-libgm2: all-target-libgm2
|
||||
all-target-libgm2: configure-target-libgm2
|
||||
@: $(MAKE); $(unstage)
|
||||
@r=`${PWD_COMMAND}`; export r; \
|
||||
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
|
||||
$(NORMAL_TARGET_EXPORTS) \
|
||||
(cd $(TARGET_SUBDIR)/libgm2 && \
|
||||
$(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS) \
|
||||
$(TARGET-target-libgm2))
|
||||
@endif target-libgm2
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.PHONY: check-target-libgm2 maybe-check-target-libgm2
|
||||
maybe-check-target-libgm2:
|
||||
@if target-libgm2
|
||||
maybe-check-target-libgm2: check-target-libgm2
|
||||
|
||||
check-target-libgm2:
|
||||
@: $(MAKE); $(unstage)
|
||||
@r=`${PWD_COMMAND}`; export r; \
|
||||
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
|
||||
$(NORMAL_TARGET_EXPORTS) \
|
||||
(cd $(TARGET_SUBDIR)/libgm2 && \
|
||||
$(MAKE) $(TARGET_FLAGS_TO_PASS) check)
|
||||
|
||||
@endif target-libgm2
|
||||
|
||||
.PHONY: install-target-libgm2 maybe-install-target-libgm2
|
||||
maybe-install-target-libgm2:
|
||||
@if target-libgm2
|
||||
maybe-install-target-libgm2: install-target-libgm2
|
||||
|
||||
install-target-libgm2: installdirs
|
||||
@: $(MAKE); $(unstage)
|
||||
@r=`${PWD_COMMAND}`; export r; \
|
||||
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
|
||||
$(NORMAL_TARGET_EXPORTS) \
|
||||
(cd $(TARGET_SUBDIR)/libgm2 && \
|
||||
$(MAKE) $(TARGET_FLAGS_TO_PASS) install)
|
||||
|
||||
@endif target-libgm2
|
||||
|
||||
.PHONY: install-strip-target-libgm2 maybe-install-strip-target-libgm2
|
||||
maybe-install-strip-target-libgm2:
|
||||
@if target-libgm2
|
||||
maybe-install-strip-target-libgm2: install-strip-target-libgm2
|
||||
|
||||
install-strip-target-libgm2: installdirs
|
||||
@: $(MAKE); $(unstage)
|
||||
@r=`${PWD_COMMAND}`; export r; \
|
||||
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
|
||||
$(NORMAL_TARGET_EXPORTS) \
|
||||
(cd $(TARGET_SUBDIR)/libgm2 && \
|
||||
$(MAKE) $(TARGET_FLAGS_TO_PASS) install-strip)
|
||||
|
||||
@endif target-libgm2
|
||||
|
||||
# Other targets (info, dvi, pdf, etc.)
|
||||
|
||||
.PHONY: maybe-info-target-libgm2 info-target-libgm2
|
||||
maybe-info-target-libgm2:
|
||||
@if target-libgm2
|
||||
maybe-info-target-libgm2: info-target-libgm2
|
||||
|
||||
info-target-libgm2: \
|
||||
configure-target-libgm2
|
||||
@: $(MAKE); $(unstage)
|
||||
@[ -f $(TARGET_SUBDIR)/libgm2/Makefile ] || exit 0; \
|
||||
r=`${PWD_COMMAND}`; export r; \
|
||||
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
|
||||
$(NORMAL_TARGET_EXPORTS) \
|
||||
echo "Doing info in $(TARGET_SUBDIR)/libgm2"; \
|
||||
for flag in $(EXTRA_TARGET_FLAGS); do \
|
||||
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
|
||||
done; \
|
||||
(cd $(TARGET_SUBDIR)/libgm2 && \
|
||||
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
|
||||
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
|
||||
"RANLIB=$${RANLIB}" \
|
||||
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
|
||||
info) \
|
||||
|| exit 1
|
||||
|
||||
@endif target-libgm2
|
||||
|
||||
.PHONY: maybe-dvi-target-libgm2 dvi-target-libgm2
|
||||
maybe-dvi-target-libgm2:
|
||||
@if target-libgm2
|
||||
maybe-dvi-target-libgm2: dvi-target-libgm2
|
||||
|
||||
dvi-target-libgm2: \
|
||||
configure-target-libgm2
|
||||
@: $(MAKE); $(unstage)
|
||||
@[ -f $(TARGET_SUBDIR)/libgm2/Makefile ] || exit 0; \
|
||||
r=`${PWD_COMMAND}`; export r; \
|
||||
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
|
||||
$(NORMAL_TARGET_EXPORTS) \
|
||||
echo "Doing dvi in $(TARGET_SUBDIR)/libgm2"; \
|
||||
for flag in $(EXTRA_TARGET_FLAGS); do \
|
||||
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
|
||||
done; \
|
||||
(cd $(TARGET_SUBDIR)/libgm2 && \
|
||||
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
|
||||
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
|
||||
"RANLIB=$${RANLIB}" \
|
||||
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
|
||||
dvi) \
|
||||
|| exit 1
|
||||
|
||||
@endif target-libgm2
|
||||
|
||||
.PHONY: maybe-pdf-target-libgm2 pdf-target-libgm2
|
||||
maybe-pdf-target-libgm2:
|
||||
@if target-libgm2
|
||||
maybe-pdf-target-libgm2: pdf-target-libgm2
|
||||
|
||||
pdf-target-libgm2: \
|
||||
configure-target-libgm2
|
||||
@: $(MAKE); $(unstage)
|
||||
@[ -f $(TARGET_SUBDIR)/libgm2/Makefile ] || exit 0; \
|
||||
r=`${PWD_COMMAND}`; export r; \
|
||||
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
|
||||
$(NORMAL_TARGET_EXPORTS) \
|
||||
echo "Doing pdf in $(TARGET_SUBDIR)/libgm2"; \
|
||||
for flag in $(EXTRA_TARGET_FLAGS); do \
|
||||
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
|
||||
done; \
|
||||
(cd $(TARGET_SUBDIR)/libgm2 && \
|
||||
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
|
||||
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
|
||||
"RANLIB=$${RANLIB}" \
|
||||
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
|
||||
pdf) \
|
||||
|| exit 1
|
||||
|
||||
@endif target-libgm2
|
||||
|
||||
.PHONY: maybe-html-target-libgm2 html-target-libgm2
|
||||
maybe-html-target-libgm2:
|
||||
@if target-libgm2
|
||||
maybe-html-target-libgm2: html-target-libgm2
|
||||
|
||||
html-target-libgm2: \
|
||||
configure-target-libgm2
|
||||
@: $(MAKE); $(unstage)
|
||||
@[ -f $(TARGET_SUBDIR)/libgm2/Makefile ] || exit 0; \
|
||||
r=`${PWD_COMMAND}`; export r; \
|
||||
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
|
||||
$(NORMAL_TARGET_EXPORTS) \
|
||||
echo "Doing html in $(TARGET_SUBDIR)/libgm2"; \
|
||||
for flag in $(EXTRA_TARGET_FLAGS); do \
|
||||
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
|
||||
done; \
|
||||
(cd $(TARGET_SUBDIR)/libgm2 && \
|
||||
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
|
||||
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
|
||||
"RANLIB=$${RANLIB}" \
|
||||
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
|
||||
html) \
|
||||
|| exit 1
|
||||
|
||||
@endif target-libgm2
|
||||
|
||||
.PHONY: maybe-TAGS-target-libgm2 TAGS-target-libgm2
|
||||
maybe-TAGS-target-libgm2:
|
||||
@if target-libgm2
|
||||
maybe-TAGS-target-libgm2: TAGS-target-libgm2
|
||||
|
||||
TAGS-target-libgm2: \
|
||||
configure-target-libgm2
|
||||
@: $(MAKE); $(unstage)
|
||||
@[ -f $(TARGET_SUBDIR)/libgm2/Makefile ] || exit 0; \
|
||||
r=`${PWD_COMMAND}`; export r; \
|
||||
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
|
||||
$(NORMAL_TARGET_EXPORTS) \
|
||||
echo "Doing TAGS in $(TARGET_SUBDIR)/libgm2"; \
|
||||
for flag in $(EXTRA_TARGET_FLAGS); do \
|
||||
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
|
||||
done; \
|
||||
(cd $(TARGET_SUBDIR)/libgm2 && \
|
||||
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
|
||||
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
|
||||
"RANLIB=$${RANLIB}" \
|
||||
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
|
||||
TAGS) \
|
||||
|| exit 1
|
||||
|
||||
@endif target-libgm2
|
||||
|
||||
.PHONY: maybe-install-info-target-libgm2 install-info-target-libgm2
|
||||
maybe-install-info-target-libgm2:
|
||||
@if target-libgm2
|
||||
maybe-install-info-target-libgm2: install-info-target-libgm2
|
||||
|
||||
install-info-target-libgm2: \
|
||||
configure-target-libgm2 \
|
||||
info-target-libgm2
|
||||
@: $(MAKE); $(unstage)
|
||||
@[ -f $(TARGET_SUBDIR)/libgm2/Makefile ] || exit 0; \
|
||||
r=`${PWD_COMMAND}`; export r; \
|
||||
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
|
||||
$(NORMAL_TARGET_EXPORTS) \
|
||||
echo "Doing install-info in $(TARGET_SUBDIR)/libgm2"; \
|
||||
for flag in $(EXTRA_TARGET_FLAGS); do \
|
||||
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
|
||||
done; \
|
||||
(cd $(TARGET_SUBDIR)/libgm2 && \
|
||||
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
|
||||
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
|
||||
"RANLIB=$${RANLIB}" \
|
||||
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
|
||||
install-info) \
|
||||
|| exit 1
|
||||
|
||||
@endif target-libgm2
|
||||
|
||||
.PHONY: maybe-install-dvi-target-libgm2 install-dvi-target-libgm2
|
||||
maybe-install-dvi-target-libgm2:
|
||||
@if target-libgm2
|
||||
maybe-install-dvi-target-libgm2: install-dvi-target-libgm2
|
||||
|
||||
install-dvi-target-libgm2: \
|
||||
configure-target-libgm2 \
|
||||
dvi-target-libgm2
|
||||
@: $(MAKE); $(unstage)
|
||||
@[ -f $(TARGET_SUBDIR)/libgm2/Makefile ] || exit 0; \
|
||||
r=`${PWD_COMMAND}`; export r; \
|
||||
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
|
||||
$(NORMAL_TARGET_EXPORTS) \
|
||||
echo "Doing install-dvi in $(TARGET_SUBDIR)/libgm2"; \
|
||||
for flag in $(EXTRA_TARGET_FLAGS); do \
|
||||
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
|
||||
done; \
|
||||
(cd $(TARGET_SUBDIR)/libgm2 && \
|
||||
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
|
||||
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
|
||||
"RANLIB=$${RANLIB}" \
|
||||
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
|
||||
install-dvi) \
|
||||
|| exit 1
|
||||
|
||||
@endif target-libgm2
|
||||
|
||||
.PHONY: maybe-install-pdf-target-libgm2 install-pdf-target-libgm2
|
||||
maybe-install-pdf-target-libgm2:
|
||||
@if target-libgm2
|
||||
maybe-install-pdf-target-libgm2: install-pdf-target-libgm2
|
||||
|
||||
install-pdf-target-libgm2: \
|
||||
configure-target-libgm2 \
|
||||
pdf-target-libgm2
|
||||
@: $(MAKE); $(unstage)
|
||||
@[ -f $(TARGET_SUBDIR)/libgm2/Makefile ] || exit 0; \
|
||||
r=`${PWD_COMMAND}`; export r; \
|
||||
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
|
||||
$(NORMAL_TARGET_EXPORTS) \
|
||||
echo "Doing install-pdf in $(TARGET_SUBDIR)/libgm2"; \
|
||||
for flag in $(EXTRA_TARGET_FLAGS); do \
|
||||
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
|
||||
done; \
|
||||
(cd $(TARGET_SUBDIR)/libgm2 && \
|
||||
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
|
||||
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
|
||||
"RANLIB=$${RANLIB}" \
|
||||
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
|
||||
install-pdf) \
|
||||
|| exit 1
|
||||
|
||||
@endif target-libgm2
|
||||
|
||||
.PHONY: maybe-install-html-target-libgm2 install-html-target-libgm2
|
||||
maybe-install-html-target-libgm2:
|
||||
@if target-libgm2
|
||||
maybe-install-html-target-libgm2: install-html-target-libgm2
|
||||
|
||||
install-html-target-libgm2: \
|
||||
configure-target-libgm2 \
|
||||
html-target-libgm2
|
||||
@: $(MAKE); $(unstage)
|
||||
@[ -f $(TARGET_SUBDIR)/libgm2/Makefile ] || exit 0; \
|
||||
r=`${PWD_COMMAND}`; export r; \
|
||||
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
|
||||
$(NORMAL_TARGET_EXPORTS) \
|
||||
echo "Doing install-html in $(TARGET_SUBDIR)/libgm2"; \
|
||||
for flag in $(EXTRA_TARGET_FLAGS); do \
|
||||
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
|
||||
done; \
|
||||
(cd $(TARGET_SUBDIR)/libgm2 && \
|
||||
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
|
||||
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
|
||||
"RANLIB=$${RANLIB}" \
|
||||
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
|
||||
install-html) \
|
||||
|| exit 1
|
||||
|
||||
@endif target-libgm2
|
||||
|
||||
.PHONY: maybe-installcheck-target-libgm2 installcheck-target-libgm2
|
||||
maybe-installcheck-target-libgm2:
|
||||
@if target-libgm2
|
||||
maybe-installcheck-target-libgm2: installcheck-target-libgm2
|
||||
|
||||
installcheck-target-libgm2: \
|
||||
configure-target-libgm2
|
||||
@: $(MAKE); $(unstage)
|
||||
@[ -f $(TARGET_SUBDIR)/libgm2/Makefile ] || exit 0; \
|
||||
r=`${PWD_COMMAND}`; export r; \
|
||||
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
|
||||
$(NORMAL_TARGET_EXPORTS) \
|
||||
echo "Doing installcheck in $(TARGET_SUBDIR)/libgm2"; \
|
||||
for flag in $(EXTRA_TARGET_FLAGS); do \
|
||||
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
|
||||
done; \
|
||||
(cd $(TARGET_SUBDIR)/libgm2 && \
|
||||
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
|
||||
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
|
||||
"RANLIB=$${RANLIB}" \
|
||||
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
|
||||
installcheck) \
|
||||
|| exit 1
|
||||
|
||||
@endif target-libgm2
|
||||
|
||||
.PHONY: maybe-mostlyclean-target-libgm2 mostlyclean-target-libgm2
|
||||
maybe-mostlyclean-target-libgm2:
|
||||
@if target-libgm2
|
||||
maybe-mostlyclean-target-libgm2: mostlyclean-target-libgm2
|
||||
|
||||
mostlyclean-target-libgm2:
|
||||
@: $(MAKE); $(unstage)
|
||||
@[ -f $(TARGET_SUBDIR)/libgm2/Makefile ] || exit 0; \
|
||||
r=`${PWD_COMMAND}`; export r; \
|
||||
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
|
||||
$(NORMAL_TARGET_EXPORTS) \
|
||||
echo "Doing mostlyclean in $(TARGET_SUBDIR)/libgm2"; \
|
||||
for flag in $(EXTRA_TARGET_FLAGS); do \
|
||||
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
|
||||
done; \
|
||||
(cd $(TARGET_SUBDIR)/libgm2 && \
|
||||
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
|
||||
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
|
||||
"RANLIB=$${RANLIB}" \
|
||||
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
|
||||
mostlyclean) \
|
||||
|| exit 1
|
||||
|
||||
@endif target-libgm2
|
||||
|
||||
.PHONY: maybe-clean-target-libgm2 clean-target-libgm2
|
||||
maybe-clean-target-libgm2:
|
||||
@if target-libgm2
|
||||
maybe-clean-target-libgm2: clean-target-libgm2
|
||||
|
||||
clean-target-libgm2:
|
||||
@: $(MAKE); $(unstage)
|
||||
@[ -f $(TARGET_SUBDIR)/libgm2/Makefile ] || exit 0; \
|
||||
r=`${PWD_COMMAND}`; export r; \
|
||||
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
|
||||
$(NORMAL_TARGET_EXPORTS) \
|
||||
echo "Doing clean in $(TARGET_SUBDIR)/libgm2"; \
|
||||
for flag in $(EXTRA_TARGET_FLAGS); do \
|
||||
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
|
||||
done; \
|
||||
(cd $(TARGET_SUBDIR)/libgm2 && \
|
||||
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
|
||||
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
|
||||
"RANLIB=$${RANLIB}" \
|
||||
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
|
||||
clean) \
|
||||
|| exit 1
|
||||
|
||||
@endif target-libgm2
|
||||
|
||||
.PHONY: maybe-distclean-target-libgm2 distclean-target-libgm2
|
||||
maybe-distclean-target-libgm2:
|
||||
@if target-libgm2
|
||||
maybe-distclean-target-libgm2: distclean-target-libgm2
|
||||
|
||||
distclean-target-libgm2:
|
||||
@: $(MAKE); $(unstage)
|
||||
@[ -f $(TARGET_SUBDIR)/libgm2/Makefile ] || exit 0; \
|
||||
r=`${PWD_COMMAND}`; export r; \
|
||||
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
|
||||
$(NORMAL_TARGET_EXPORTS) \
|
||||
echo "Doing distclean in $(TARGET_SUBDIR)/libgm2"; \
|
||||
for flag in $(EXTRA_TARGET_FLAGS); do \
|
||||
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
|
||||
done; \
|
||||
(cd $(TARGET_SUBDIR)/libgm2 && \
|
||||
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
|
||||
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
|
||||
"RANLIB=$${RANLIB}" \
|
||||
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
|
||||
distclean) \
|
||||
|| exit 1
|
||||
|
||||
@endif target-libgm2
|
||||
|
||||
.PHONY: maybe-maintainer-clean-target-libgm2 maintainer-clean-target-libgm2
|
||||
maybe-maintainer-clean-target-libgm2:
|
||||
@if target-libgm2
|
||||
maybe-maintainer-clean-target-libgm2: maintainer-clean-target-libgm2
|
||||
|
||||
maintainer-clean-target-libgm2:
|
||||
@: $(MAKE); $(unstage)
|
||||
@[ -f $(TARGET_SUBDIR)/libgm2/Makefile ] || exit 0; \
|
||||
r=`${PWD_COMMAND}`; export r; \
|
||||
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
|
||||
$(NORMAL_TARGET_EXPORTS) \
|
||||
echo "Doing maintainer-clean in $(TARGET_SUBDIR)/libgm2"; \
|
||||
for flag in $(EXTRA_TARGET_FLAGS); do \
|
||||
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
|
||||
done; \
|
||||
(cd $(TARGET_SUBDIR)/libgm2 && \
|
||||
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
|
||||
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
|
||||
"RANLIB=$${RANLIB}" \
|
||||
"DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \
|
||||
maintainer-clean) \
|
||||
|| exit 1
|
||||
|
||||
@endif target-libgm2
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.PHONY: configure-target-libgomp maybe-configure-target-libgomp
|
||||
maybe-configure-target-libgomp:
|
||||
@if gcc-bootstrap
|
||||
@@ -61221,6 +61744,14 @@ check-gcc-go:
|
||||
(cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) check-go);
|
||||
check-go: check-gcc-go check-target-libgo check-gotools
|
||||
|
||||
.PHONY: check-gcc-m2 check-m2
|
||||
check-gcc-m2:
|
||||
r=`${PWD_COMMAND}`; export r; \
|
||||
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
|
||||
$(HOST_EXPORTS) \
|
||||
(cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) check-m2);
|
||||
check-m2: check-gcc-m2 check-target-libgm2
|
||||
|
||||
.PHONY: check-gcc-d check-d
|
||||
check-gcc-d:
|
||||
r=`${PWD_COMMAND}`; export r; \
|
||||
@@ -61304,7 +61835,7 @@ LEAN = false
|
||||
# reliable.
|
||||
|
||||
# 'touch' doesn't work right on some platforms.
|
||||
STAMP = echo timestamp >
|
||||
STAMP = echo timestamp >
|
||||
|
||||
# We only want to compare .o files, so set this!
|
||||
objext = .o
|
||||
@@ -64679,6 +65210,7 @@ configure-stageautoprofile-target-zlib: maybe-all-stageautoprofile-gcc
|
||||
configure-stageautofeedback-target-zlib: maybe-all-stageautofeedback-gcc
|
||||
configure-target-rda: stage_last
|
||||
configure-target-libada: stage_last
|
||||
configure-target-libgm2: stage_last
|
||||
configure-stage1-target-libgomp: maybe-all-stage1-gcc
|
||||
configure-stage2-target-libgomp: maybe-all-stage2-gcc
|
||||
configure-stage3-target-libgomp: maybe-all-stage3-gcc
|
||||
@@ -64720,6 +65252,7 @@ configure-target-libffi: maybe-all-gcc
|
||||
configure-target-zlib: maybe-all-gcc
|
||||
configure-target-rda: maybe-all-gcc
|
||||
configure-target-libada: maybe-all-gcc
|
||||
configure-target-libgm2: maybe-all-gcc
|
||||
configure-target-libgomp: maybe-all-gcc
|
||||
configure-target-libitm: maybe-all-gcc
|
||||
configure-target-libatomic: maybe-all-gcc
|
||||
@@ -66006,6 +66539,8 @@ all-target-fastjar: maybe-all-target-zlib
|
||||
configure-target-libgo: maybe-all-target-libstdc++-v3
|
||||
all-target-libgo: maybe-all-target-libbacktrace
|
||||
all-target-libgo: maybe-all-target-libatomic
|
||||
configure-target-libgm2: maybe-all-target-libstdc++-v3
|
||||
all-target-libgm2: maybe-all-target-libatomic
|
||||
configure-target-newlib: maybe-all-binutils
|
||||
configure-target-newlib: maybe-all-ld
|
||||
configure-target-libgfortran: maybe-all-target-libbacktrace
|
||||
@@ -66111,6 +66646,7 @@ configure-target-libffi: maybe-all-target-libgcc
|
||||
configure-target-zlib: maybe-all-target-libgcc
|
||||
configure-target-rda: maybe-all-target-libgcc
|
||||
configure-target-libada: maybe-all-target-libgcc
|
||||
configure-target-libgm2: maybe-all-target-libgcc
|
||||
configure-target-libgomp: maybe-all-target-libgcc
|
||||
configure-target-libitm: maybe-all-target-libgcc
|
||||
configure-target-libatomic: maybe-all-target-libgcc
|
||||
@@ -66153,6 +66689,8 @@ configure-target-rda: maybe-all-target-newlib maybe-all-target-libgloss
|
||||
|
||||
configure-target-libada: maybe-all-target-newlib maybe-all-target-libgloss
|
||||
|
||||
configure-target-libgm2: maybe-all-target-newlib maybe-all-target-libgloss
|
||||
|
||||
configure-target-libgomp: maybe-all-target-newlib maybe-all-target-libgloss
|
||||
|
||||
configure-target-libitm: maybe-all-target-newlib maybe-all-target-libgloss
|
||||
@@ -66169,7 +66707,7 @@ all-gdb: $(gdbnlmrequirements) $(GDB_TK)
|
||||
install-gdb: $(INSTALL_GDB_TK)
|
||||
|
||||
# Serialization dependencies. Host configures don't work well in parallel to
|
||||
# each other, due to contention over config.cache. Target configures and
|
||||
# each other, due to contention over config.cache. Target configures and
|
||||
# build configures are similar.
|
||||
@serialization_dependencies@
|
||||
|
||||
|
||||
31
Makefile.tpl
31
Makefile.tpl
@@ -13,12 +13,12 @@ in
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; see the file COPYING3. If not see
|
||||
# <http://www.gnu.org/licenses/>.
|
||||
@@ -166,6 +166,8 @@ BUILD_EXPORTS = \
|
||||
GOCFLAGS="$(GOCFLAGS_FOR_BUILD)"; export GOCFLAGS; \
|
||||
GDC="$(GDC_FOR_BUILD)"; export GDC; \
|
||||
GDCFLAGS="$(GDCFLAGS_FOR_BUILD)"; export GDCFLAGS; \
|
||||
GM2="$(GM2_FOR_BUILD)"; export GM2; \
|
||||
GM2FLAGS="$(GM2FLAGS_FOR_BUILD)"; export GM2FLAGS; \
|
||||
DLLTOOL="$(DLLTOOL_FOR_BUILD)"; export DLLTOOL; \
|
||||
DSYMUTIL="$(DSYMUTIL_FOR_BUILD)"; export DSYMUTIL; \
|
||||
LD="$(LD_FOR_BUILD)"; export LD; \
|
||||
@@ -204,6 +206,7 @@ HOST_EXPORTS = \
|
||||
GFORTRAN="$(GFORTRAN)"; export GFORTRAN; \
|
||||
GOC="$(GOC)"; export GOC; \
|
||||
GDC="$(GDC)"; export GDC; \
|
||||
GM2="$(GM2)"; export GM2; \
|
||||
AR="$(AR)"; export AR; \
|
||||
AS="$(AS)"; export AS; \
|
||||
CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
|
||||
@@ -307,6 +310,7 @@ BASE_TARGET_EXPORTS = \
|
||||
GFORTRAN="$(GFORTRAN_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export GFORTRAN; \
|
||||
GOC="$(GOC_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export GOC; \
|
||||
GDC="$(GDC_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export GDC; \
|
||||
GM2="$(GM2_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export GM2; \
|
||||
DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \
|
||||
DSYMUTIL="$(DSYMUTIL_FOR_TARGET)"; export DSYMUTIL; \
|
||||
LD="$(COMPILER_LD_FOR_TARGET)"; export LD; \
|
||||
@@ -373,6 +377,7 @@ DSYMUTIL_FOR_BUILD = @DSYMUTIL_FOR_BUILD@
|
||||
GFORTRAN_FOR_BUILD = @GFORTRAN_FOR_BUILD@
|
||||
GOC_FOR_BUILD = @GOC_FOR_BUILD@
|
||||
GDC_FOR_BUILD = @GDC_FOR_BUILD@
|
||||
GM2_FOR_BUILD = @GM2_FOR_BUILD@
|
||||
LDFLAGS_FOR_BUILD = @LDFLAGS_FOR_BUILD@
|
||||
LD_FOR_BUILD = @LD_FOR_BUILD@
|
||||
NM_FOR_BUILD = @NM_FOR_BUILD@
|
||||
@@ -443,6 +448,7 @@ CXXFLAGS = @CXXFLAGS@
|
||||
LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates
|
||||
GOCFLAGS = $(CFLAGS)
|
||||
GDCFLAGS = $(CFLAGS)
|
||||
GM2FLAGS = $(CFLAGS)
|
||||
|
||||
# Pass additional PGO and LTO compiler options to the PGO build.
|
||||
BUILD_CFLAGS = $(PGO_BUILD_CFLAGS) $(PGO_BUILD_LTO_CFLAGS)
|
||||
@@ -578,6 +584,7 @@ RAW_CXX_FOR_TARGET=$(STAGE_CC_WRAPPER) @RAW_CXX_FOR_TARGET@
|
||||
GFORTRAN_FOR_TARGET=$(STAGE_CC_WRAPPER) @GFORTRAN_FOR_TARGET@
|
||||
GOC_FOR_TARGET=$(STAGE_CC_WRAPPER) @GOC_FOR_TARGET@
|
||||
GDC_FOR_TARGET=$(STAGE_CC_WRAPPER) @GDC_FOR_TARGET@
|
||||
GM2_FOR_TARGET=$(STAGE_CC_WRAPPER) @GM2_FOR_TARGET@
|
||||
DLLTOOL_FOR_TARGET=@DLLTOOL_FOR_TARGET@
|
||||
DSYMUTIL_FOR_TARGET=@DSYMUTIL_FOR_TARGET@
|
||||
LD_FOR_TARGET=@LD_FOR_TARGET@
|
||||
@@ -603,6 +610,7 @@ CXXFLAGS_FOR_TARGET = @CXXFLAGS_FOR_TARGET@
|
||||
LIBCFLAGS_FOR_TARGET = $(CFLAGS_FOR_TARGET)
|
||||
LIBCXXFLAGS_FOR_TARGET = $(CXXFLAGS_FOR_TARGET) -fno-implicit-templates
|
||||
LDFLAGS_FOR_TARGET = @LDFLAGS_FOR_TARGET@
|
||||
GM2FLAGS_FOR_TARGET = -O2 -g
|
||||
GOCFLAGS_FOR_TARGET = -O2 -g
|
||||
GDCFLAGS_FOR_TARGET = -O2 -g
|
||||
|
||||
@@ -709,6 +717,7 @@ EXTRA_HOST_FLAGS = \
|
||||
'GFORTRAN=$(GFORTRAN)' \
|
||||
'GOC=$(GOC)' \
|
||||
'GDC=$(GDC)' \
|
||||
'GM2=$(GM2)' \
|
||||
'LD=$(LD)' \
|
||||
'LIPO=$(LIPO)' \
|
||||
'NM=$(NM)' \
|
||||
@@ -735,6 +744,7 @@ POSTSTAGE1_FLAGS_TO_PASS = \
|
||||
CC="$${CC}" CC_FOR_BUILD="$${CC_FOR_BUILD}" \
|
||||
CXX="$${CXX}" CXX_FOR_BUILD="$${CXX_FOR_BUILD}" \
|
||||
GDC="$${GDC}" GDC_FOR_BUILD="$${GDC_FOR_BUILD}" \
|
||||
GM2="$${GM2}" GM2_FOR_BUILD="$${GM2_FOR_BUILD}" \
|
||||
GNATBIND="$${GNATBIND}" \
|
||||
LDFLAGS="$${LDFLAGS}" \
|
||||
HOST_LIBS="$${HOST_LIBS}" \
|
||||
@@ -770,6 +780,8 @@ EXTRA_TARGET_FLAGS = \
|
||||
'GOCFLAGS=$$(GOCFLAGS_FOR_TARGET)' \
|
||||
'GDC=$$(GDC_FOR_TARGET) $$(XGCC_FLAGS_FOR_TARGET) $$(TFLAGS)' \
|
||||
'GDCFLAGS=$$(GDCFLAGS_FOR_TARGET)' \
|
||||
'GM2=$$(GM2_FOR_TARGET) $$(XGCC_FLAGS_FOR_TARGET) $$(TFLAGS)' \
|
||||
'GM2FLAGS=$$(GM2FLAGS_FOR_TARGET)' \
|
||||
'LD=$(COMPILER_LD_FOR_TARGET)' \
|
||||
'LDFLAGS=$$(LDFLAGS_FOR_TARGET)' \
|
||||
'LIBCFLAGS=$$(LIBCFLAGS_FOR_TARGET)' \
|
||||
@@ -796,6 +808,7 @@ TARGET_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS)
|
||||
# cross-building scheme.
|
||||
EXTRA_GCC_FLAGS = \
|
||||
"GCC_FOR_TARGET=$(GCC_FOR_TARGET) $$TFLAGS" \
|
||||
"GM2_FOR_TARGET=$(GM2_FOR_TARGET) $$TFLAGS" \
|
||||
"`echo 'STMP_FIXPROTO=$(STMP_FIXPROTO)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`" \
|
||||
"`echo 'LIMITS_H_TEST=$(LIMITS_H_TEST)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`"
|
||||
|
||||
@@ -956,7 +969,7 @@ local-maintainer-clean:
|
||||
clean: do-clean local-clean
|
||||
mostlyclean: do-mostlyclean local-clean
|
||||
distclean: do-distclean local-clean local-distclean
|
||||
maintainer-clean: local-maintainer-clean do-maintainer-clean local-clean
|
||||
maintainer-clean: local-maintainer-clean do-maintainer-clean local-clean
|
||||
maintainer-clean: local-distclean
|
||||
realclean: maintainer-clean
|
||||
|
||||
@@ -1113,7 +1126,7 @@ dir.info: do-install-info
|
||||
|
||||
dist:
|
||||
@echo "Building a full distribution of this tree isn't done"
|
||||
@echo "via 'make dist'. Check out the etc/ subdirectory"
|
||||
@echo "via 'make dist'. Check out the etc/ subdirectory"
|
||||
|
||||
etags tags: TAGS
|
||||
|
||||
@@ -1486,9 +1499,9 @@ ELSE normal_cxx +]
|
||||
ENDIF raw_cxx +]
|
||||
(cd $(TARGET_SUBDIR)/[+module+] && \
|
||||
$(MAKE) $(TARGET_FLAGS_TO_PASS) [+
|
||||
IF raw_cxx
|
||||
+] 'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)' [+
|
||||
ENDIF raw_cxx
|
||||
IF raw_cxx
|
||||
+] 'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)' [+
|
||||
ENDIF raw_cxx
|
||||
+] [+extra_make_flags+] check)
|
||||
[+ ENDIF no_check +]
|
||||
@endif target-[+module+]
|
||||
@@ -1681,7 +1694,7 @@ LEAN = false
|
||||
# reliable.
|
||||
|
||||
# 'touch' doesn't work right on some platforms.
|
||||
STAMP = echo timestamp >
|
||||
STAMP = echo timestamp >
|
||||
|
||||
# We only want to compare .o files, so set this!
|
||||
objext = .o
|
||||
@@ -2063,7 +2076,7 @@ all-gdb: $(gdbnlmrequirements) $(GDB_TK)
|
||||
install-gdb: $(INSTALL_GDB_TK)
|
||||
|
||||
# Serialization dependencies. Host configures don't work well in parallel to
|
||||
# each other, due to contention over config.cache. Target configures and
|
||||
# each other, due to contention over config.cache. Target configures and
|
||||
# build configures are similar.
|
||||
@serialization_dependencies@
|
||||
|
||||
|
||||
229
configure
vendored
229
configure
vendored
@@ -613,6 +613,7 @@ DSYMUTIL_FOR_TARGET
|
||||
DLLTOOL_FOR_TARGET
|
||||
AS_FOR_TARGET
|
||||
AR_FOR_TARGET
|
||||
GM2_FOR_TARGET
|
||||
GDC_FOR_TARGET
|
||||
GOC_FOR_TARGET
|
||||
GFORTRAN_FOR_TARGET
|
||||
@@ -803,6 +804,7 @@ enable_compressed_debug_sections
|
||||
enable_libquadmath
|
||||
enable_libquadmath_support
|
||||
enable_libada
|
||||
enable_libgm2
|
||||
enable_libssp
|
||||
enable_libstdcxx
|
||||
enable_bootstrap
|
||||
@@ -880,6 +882,7 @@ GCC_FOR_TARGET
|
||||
GFORTRAN_FOR_TARGET
|
||||
GOC_FOR_TARGET
|
||||
GDC_FOR_TARGET
|
||||
GM2_FOR_TARGET
|
||||
AR_FOR_TARGET
|
||||
AS_FOR_TARGET
|
||||
DLLTOOL_FOR_TARGET
|
||||
@@ -1540,6 +1543,7 @@ Optional Features:
|
||||
--disable-libquadmath-support
|
||||
disable libquadmath support for Fortran
|
||||
--enable-libada build libada directory
|
||||
--enable-libgm2 build libgm2 directory
|
||||
--enable-libssp build libssp directory
|
||||
--disable-libstdcxx do not build libstdc++-v3 directory
|
||||
--enable-bootstrap enable bootstrapping [yes if native build]
|
||||
@@ -1674,6 +1678,8 @@ Some influential environment variables:
|
||||
GOC for the target
|
||||
GDC_FOR_TARGET
|
||||
GDC for the target
|
||||
GM2_FOR_TARGET
|
||||
GM2 for the target
|
||||
AR_FOR_TARGET
|
||||
AR for the target
|
||||
AS_FOR_TARGET
|
||||
@@ -2812,7 +2818,7 @@ host_libs="intl libiberty opcodes bfd readline tcl tk itcl libgui zlib libbacktr
|
||||
# binutils, gas and ld appear in that order because it makes sense to run
|
||||
# "make check" in that particular order.
|
||||
# If --enable-gold is used, "gold" may replace "ld".
|
||||
host_tools="texinfo flex bison binutils gas ld fixincludes gcc cgen sid sim gdb gdbserver gprof etc expect dejagnu m4 utils guile fastjar gnattools libcc1 gotools c++tools"
|
||||
host_tools="texinfo flex bison binutils gas ld fixincludes gcc cgen sid sim gdb gdbserver gprof etc expect dejagnu m4 utils guile fastjar gnattools libcc1 gm2tools gotools c++tools"
|
||||
|
||||
# these libraries are built for the target environment, and are built after
|
||||
# the host libraries and the host tools (which may be a cross compiler)
|
||||
@@ -2833,6 +2839,7 @@ target_libraries="target-libgcc \
|
||||
target-libffi \
|
||||
target-libobjc \
|
||||
target-libada \
|
||||
target-libgm2 \
|
||||
target-libgo \
|
||||
target-libphobos \
|
||||
target-zlib"
|
||||
@@ -3176,6 +3183,17 @@ if test "${ENABLE_LIBADA}" != "yes" ; then
|
||||
noconfigdirs="$noconfigdirs gnattools"
|
||||
fi
|
||||
|
||||
# Check whether --enable-libgm2 was given.
|
||||
if test "${enable_libgm2+set}" = set; then :
|
||||
enableval=$enable_libgm2; ENABLE_LIBGM2=$enableval
|
||||
else
|
||||
ENABLE_LIBGM2=no
|
||||
fi
|
||||
|
||||
if test "${ENABLE_LIBGM2}" != "yes" ; then
|
||||
noconfigdirs="$noconfigdirs gm2tools"
|
||||
fi
|
||||
|
||||
# Check whether --enable-libssp was given.
|
||||
if test "${enable_libssp+set}" = set; then :
|
||||
enableval=$enable_libssp; ENABLE_LIBSSP=$enableval
|
||||
@@ -13786,6 +13804,167 @@ fi
|
||||
|
||||
|
||||
|
||||
if test -n "$GM2_FOR_TARGET"; then
|
||||
ac_cv_prog_GM2_FOR_TARGET=$GM2_FOR_TARGET
|
||||
elif test -n "$ac_cv_prog_GM2_FOR_TARGET"; then
|
||||
GM2_FOR_TARGET=$ac_cv_prog_GM2_FOR_TARGET
|
||||
fi
|
||||
|
||||
if test -n "$ac_cv_prog_GM2_FOR_TARGET"; then
|
||||
for ncn_progname in gm2; do
|
||||
# Extract the first word of "${ncn_progname}", so it can be a program name with args.
|
||||
set dummy ${ncn_progname}; ac_word=$2
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
|
||||
$as_echo_n "checking for $ac_word... " >&6; }
|
||||
if ${ac_cv_prog_GM2_FOR_TARGET+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
if test -n "$GM2_FOR_TARGET"; then
|
||||
ac_cv_prog_GM2_FOR_TARGET="$GM2_FOR_TARGET" # Let the user override the test.
|
||||
else
|
||||
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
|
||||
for as_dir in $PATH
|
||||
do
|
||||
IFS=$as_save_IFS
|
||||
test -z "$as_dir" && as_dir=.
|
||||
for ac_exec_ext in '' $ac_executable_extensions; do
|
||||
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
|
||||
ac_cv_prog_GM2_FOR_TARGET="${ncn_progname}"
|
||||
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
|
||||
break 2
|
||||
fi
|
||||
done
|
||||
done
|
||||
IFS=$as_save_IFS
|
||||
|
||||
fi
|
||||
fi
|
||||
GM2_FOR_TARGET=$ac_cv_prog_GM2_FOR_TARGET
|
||||
if test -n "$GM2_FOR_TARGET"; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GM2_FOR_TARGET" >&5
|
||||
$as_echo "$GM2_FOR_TARGET" >&6; }
|
||||
else
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
$as_echo "no" >&6; }
|
||||
fi
|
||||
|
||||
|
||||
done
|
||||
fi
|
||||
|
||||
if test -z "$ac_cv_prog_GM2_FOR_TARGET" && test -n "$with_build_time_tools"; then
|
||||
for ncn_progname in gm2; do
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ncn_progname} in $with_build_time_tools" >&5
|
||||
$as_echo_n "checking for ${ncn_progname} in $with_build_time_tools... " >&6; }
|
||||
if test -x $with_build_time_tools/${ncn_progname}; then
|
||||
ac_cv_prog_GM2_FOR_TARGET=$with_build_time_tools/${ncn_progname}
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
||||
$as_echo "yes" >&6; }
|
||||
break
|
||||
else
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
$as_echo "no" >&6; }
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
if test -z "$ac_cv_prog_GM2_FOR_TARGET"; then
|
||||
for ncn_progname in gm2; do
|
||||
if test -n "$ncn_target_tool_prefix"; then
|
||||
# Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
|
||||
set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
|
||||
$as_echo_n "checking for $ac_word... " >&6; }
|
||||
if ${ac_cv_prog_GM2_FOR_TARGET+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
if test -n "$GM2_FOR_TARGET"; then
|
||||
ac_cv_prog_GM2_FOR_TARGET="$GM2_FOR_TARGET" # Let the user override the test.
|
||||
else
|
||||
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
|
||||
for as_dir in $PATH
|
||||
do
|
||||
IFS=$as_save_IFS
|
||||
test -z "$as_dir" && as_dir=.
|
||||
for ac_exec_ext in '' $ac_executable_extensions; do
|
||||
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
|
||||
ac_cv_prog_GM2_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
|
||||
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
|
||||
break 2
|
||||
fi
|
||||
done
|
||||
done
|
||||
IFS=$as_save_IFS
|
||||
|
||||
fi
|
||||
fi
|
||||
GM2_FOR_TARGET=$ac_cv_prog_GM2_FOR_TARGET
|
||||
if test -n "$GM2_FOR_TARGET"; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GM2_FOR_TARGET" >&5
|
||||
$as_echo "$GM2_FOR_TARGET" >&6; }
|
||||
else
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
$as_echo "no" >&6; }
|
||||
fi
|
||||
|
||||
|
||||
fi
|
||||
if test -z "$ac_cv_prog_GM2_FOR_TARGET" && test $build = $target ; then
|
||||
# Extract the first word of "${ncn_progname}", so it can be a program name with args.
|
||||
set dummy ${ncn_progname}; ac_word=$2
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
|
||||
$as_echo_n "checking for $ac_word... " >&6; }
|
||||
if ${ac_cv_prog_GM2_FOR_TARGET+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
if test -n "$GM2_FOR_TARGET"; then
|
||||
ac_cv_prog_GM2_FOR_TARGET="$GM2_FOR_TARGET" # Let the user override the test.
|
||||
else
|
||||
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
|
||||
for as_dir in $PATH
|
||||
do
|
||||
IFS=$as_save_IFS
|
||||
test -z "$as_dir" && as_dir=.
|
||||
for ac_exec_ext in '' $ac_executable_extensions; do
|
||||
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
|
||||
ac_cv_prog_GM2_FOR_TARGET="${ncn_progname}"
|
||||
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
|
||||
break 2
|
||||
fi
|
||||
done
|
||||
done
|
||||
IFS=$as_save_IFS
|
||||
|
||||
fi
|
||||
fi
|
||||
GM2_FOR_TARGET=$ac_cv_prog_GM2_FOR_TARGET
|
||||
if test -n "$GM2_FOR_TARGET"; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GM2_FOR_TARGET" >&5
|
||||
$as_echo "$GM2_FOR_TARGET" >&6; }
|
||||
else
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
$as_echo "no" >&6; }
|
||||
fi
|
||||
|
||||
|
||||
fi
|
||||
test -n "$ac_cv_prog_GM2_FOR_TARGET" && break
|
||||
done
|
||||
fi
|
||||
|
||||
if test -z "$ac_cv_prog_GM2_FOR_TARGET" ; then
|
||||
set dummy gm2
|
||||
if test $build = $target ; then
|
||||
GM2_FOR_TARGET="$2"
|
||||
else
|
||||
GM2_FOR_TARGET="${ncn_target_tool_prefix}$2"
|
||||
fi
|
||||
else
|
||||
GM2_FOR_TARGET="$ac_cv_prog_GM2_FOR_TARGET"
|
||||
fi
|
||||
|
||||
|
||||
|
||||
cat > conftest.c << \EOF
|
||||
#ifdef __GNUC__
|
||||
gcc_yay;
|
||||
@@ -17718,6 +17897,51 @@ $as_echo "pre-installed" >&6; }
|
||||
fi
|
||||
fi
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the target gm2" >&5
|
||||
$as_echo_n "checking where to find the target gm2... " >&6; }
|
||||
if test "x${build}" != "x${host}" ; then
|
||||
if expr "x$GM2_FOR_TARGET" : "x/" > /dev/null; then
|
||||
# We already found the complete path
|
||||
ac_dir=`dirname $GM2_FOR_TARGET`
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed in $ac_dir" >&5
|
||||
$as_echo "pre-installed in $ac_dir" >&6; }
|
||||
else
|
||||
# Canadian cross, just use what we found
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed" >&5
|
||||
$as_echo "pre-installed" >&6; }
|
||||
fi
|
||||
else
|
||||
ok=yes
|
||||
case " ${configdirs} " in
|
||||
*" gcc "*) ;;
|
||||
*) ok=no ;;
|
||||
esac
|
||||
case ,${enable_languages}, in
|
||||
*,m2,*) ;;
|
||||
*) ok=no ;;
|
||||
esac
|
||||
if test $ok = yes; then
|
||||
# An in-tree tool is available and we can use it
|
||||
GM2_FOR_TARGET='$$r/$(HOST_SUBDIR)/gcc/gm2 -B$$r/$(HOST_SUBDIR)/gcc/'
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: just compiled" >&5
|
||||
$as_echo "just compiled" >&6; }
|
||||
elif expr "x$GM2_FOR_TARGET" : "x/" > /dev/null; then
|
||||
# We already found the complete path
|
||||
ac_dir=`dirname $GM2_FOR_TARGET`
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed in $ac_dir" >&5
|
||||
$as_echo "pre-installed in $ac_dir" >&6; }
|
||||
elif test "x$target" = "x$host"; then
|
||||
# We can use an host tool
|
||||
GM2_FOR_TARGET='$(GM2)'
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: host tool" >&5
|
||||
$as_echo "host tool" >&6; }
|
||||
else
|
||||
# We need a cross tool
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: pre-installed" >&5
|
||||
$as_echo "pre-installed" >&6; }
|
||||
fi
|
||||
fi
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the target ld" >&5
|
||||
$as_echo_n "checking where to find the target ld... " >&6; }
|
||||
if test "x${build}" != "x${host}" ; then
|
||||
@@ -18279,6 +18503,9 @@ fi
|
||||
# Specify what files to not compare during bootstrap.
|
||||
|
||||
compare_exclusions="gcc/cc*-checksum\$(objext) | gcc/ada/*tools/*"
|
||||
compare_exclusions="$compare_exclusions | gcc/m2/gm2-compiler-boot/M2Version*"
|
||||
compare_exclusions="$compare_exclusions | gcc/m2/gm2-compiler-boot/SYSTEM*"
|
||||
compare_exclusions="$compare_exclusions | gcc/m2/gm2version*"
|
||||
case "$target" in
|
||||
hppa*64*-*-hpux*) ;;
|
||||
powerpc*-ibm-aix*) compare_exclusions="$compare_exclusions | *libgomp*\$(objext)" ;;
|
||||
|
||||
17
configure.ac
17
configure.ac
@@ -140,7 +140,7 @@ host_libs="intl libiberty opcodes bfd readline tcl tk itcl libgui zlib libbacktr
|
||||
# binutils, gas and ld appear in that order because it makes sense to run
|
||||
# "make check" in that particular order.
|
||||
# If --enable-gold is used, "gold" may replace "ld".
|
||||
host_tools="texinfo flex bison binutils gas ld fixincludes gcc cgen sid sim gdb gdbserver gprof etc expect dejagnu m4 utils guile fastjar gnattools libcc1 gotools c++tools"
|
||||
host_tools="texinfo flex bison binutils gas ld fixincludes gcc cgen sid sim gdb gdbserver gprof etc expect dejagnu m4 utils guile fastjar gnattools libcc1 gm2tools gotools c++tools"
|
||||
|
||||
# these libraries are built for the target environment, and are built after
|
||||
# the host libraries and the host tools (which may be a cross compiler)
|
||||
@@ -161,6 +161,7 @@ target_libraries="target-libgcc \
|
||||
target-libffi \
|
||||
target-libobjc \
|
||||
target-libada \
|
||||
target-libgm2 \
|
||||
target-libgo \
|
||||
target-libphobos \
|
||||
target-zlib"
|
||||
@@ -464,6 +465,14 @@ if test "${ENABLE_LIBADA}" != "yes" ; then
|
||||
noconfigdirs="$noconfigdirs gnattools"
|
||||
fi
|
||||
|
||||
AC_ARG_ENABLE(libgm2,
|
||||
[AS_HELP_STRING([--enable-libgm2], [build libgm2 directory])],
|
||||
ENABLE_LIBGM2=$enableval,
|
||||
ENABLE_LIBGM2=no)
|
||||
if test "${ENABLE_LIBGM2}" != "yes" ; then
|
||||
noconfigdirs="$noconfigdirs gm2tools"
|
||||
fi
|
||||
|
||||
AC_ARG_ENABLE(libssp,
|
||||
[AS_HELP_STRING([--enable-libssp], [build libssp directory])],
|
||||
ENABLE_LIBSSP=$enableval,
|
||||
@@ -3579,6 +3588,7 @@ NCN_STRICT_CHECK_TARGET_TOOLS(GCC_FOR_TARGET, gcc, ${CC_FOR_TARGET})
|
||||
NCN_STRICT_CHECK_TARGET_TOOLS(GFORTRAN_FOR_TARGET, gfortran)
|
||||
NCN_STRICT_CHECK_TARGET_TOOLS(GOC_FOR_TARGET, gccgo)
|
||||
NCN_STRICT_CHECK_TARGET_TOOLS(GDC_FOR_TARGET, gdc)
|
||||
NCN_STRICT_CHECK_TARGET_TOOLS(GM2_FOR_TARGET, gm2)
|
||||
|
||||
ACX_CHECK_INSTALLED_TARGET_TOOL(AR_FOR_TARGET, ar)
|
||||
ACX_CHECK_INSTALLED_TARGET_TOOL(AS_FOR_TARGET, as)
|
||||
@@ -3617,6 +3627,8 @@ GCC_TARGET_TOOL(gccgo, GOC_FOR_TARGET, GOC,
|
||||
[gcc/gccgo -B$$r/$(HOST_SUBDIR)/gcc/], go)
|
||||
GCC_TARGET_TOOL(gdc, GDC_FOR_TARGET, GDC,
|
||||
[gcc/gdc -B$$r/$(HOST_SUBDIR)/gcc/], d)
|
||||
GCC_TARGET_TOOL(gm2, GM2_FOR_TARGET, GM2,
|
||||
[gcc/gm2 -B$$r/$(HOST_SUBDIR)/gcc/], m2)
|
||||
GCC_TARGET_TOOL(ld, LD_FOR_TARGET, LD, [ld/ld-new])
|
||||
GCC_TARGET_TOOL(lipo, LIPO_FOR_TARGET, LIPO)
|
||||
GCC_TARGET_TOOL(nm, NM_FOR_TARGET, NM, [binutils/nm-new])
|
||||
@@ -3743,6 +3755,9 @@ AC_SUBST(stage2_werror_flag)
|
||||
# Specify what files to not compare during bootstrap.
|
||||
|
||||
compare_exclusions="gcc/cc*-checksum\$(objext) | gcc/ada/*tools/*"
|
||||
compare_exclusions="$compare_exclusions | gcc/m2/gm2-compiler-boot/M2Version*"
|
||||
compare_exclusions="$compare_exclusions | gcc/m2/gm2-compiler-boot/SYSTEM*"
|
||||
compare_exclusions="$compare_exclusions | gcc/m2/gm2version*"
|
||||
case "$target" in
|
||||
hppa*64*-*-hpux*) ;;
|
||||
powerpc*-ibm-aix*) compare_exclusions="$compare_exclusions | *libgomp*\$(objext)" ;;
|
||||
|
||||
@@ -211,6 +211,12 @@
|
||||
#endif
|
||||
|
||||
|
||||
/* If --with-multiarch option is used */
|
||||
#ifndef USED_FOR_TARGET
|
||||
#undef ENABLE_MULTIARCH
|
||||
#endif
|
||||
|
||||
|
||||
/* Define to 1 if translation of program messages to the user's native
|
||||
language is requested. */
|
||||
#ifndef USED_FOR_TARGET
|
||||
@@ -2324,12 +2330,6 @@
|
||||
#endif
|
||||
|
||||
|
||||
/* Specify if mutliarch is enabled. */
|
||||
#ifndef USED_FOR_TARGET
|
||||
#undef ENABLE_MULTIARCH
|
||||
#endif
|
||||
|
||||
|
||||
/* The size of `dev_t', as computed by sizeof. */
|
||||
#ifndef USED_FOR_TARGET
|
||||
#undef SIZEOF_DEV_T
|
||||
|
||||
85
gcc/configure
vendored
85
gcc/configure
vendored
@@ -805,6 +805,8 @@ am__leading_dot
|
||||
doc_build_sys
|
||||
AR
|
||||
NM
|
||||
HAVE_PYTHON
|
||||
PYTHON
|
||||
BISON
|
||||
FLEX
|
||||
GENERATED_MANPAGES
|
||||
@@ -8899,6 +8901,84 @@ done
|
||||
test -n "$BISON" || BISON="$MISSING bison"
|
||||
|
||||
|
||||
# Python3?
|
||||
|
||||
# Extract the first word of "python3", so it can be a program name with args.
|
||||
set dummy python3; ac_word=$2
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
|
||||
$as_echo_n "checking for $ac_word... " >&6; }
|
||||
if ${ac_cv_prog_PYTHON+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
if test -n "$PYTHON"; then
|
||||
ac_cv_prog_PYTHON="$PYTHON" # Let the user override the test.
|
||||
else
|
||||
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
|
||||
for as_dir in $PATH
|
||||
do
|
||||
IFS=$as_save_IFS
|
||||
test -z "$as_dir" && as_dir=.
|
||||
for ac_exec_ext in '' $ac_executable_extensions; do
|
||||
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
|
||||
ac_cv_prog_PYTHON="python3"
|
||||
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
|
||||
break 2
|
||||
fi
|
||||
done
|
||||
done
|
||||
IFS=$as_save_IFS
|
||||
|
||||
fi
|
||||
fi
|
||||
PYTHON=$ac_cv_prog_PYTHON
|
||||
if test -n "$PYTHON"; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
|
||||
$as_echo "$PYTHON" >&6; }
|
||||
else
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
$as_echo "no" >&6; }
|
||||
fi
|
||||
|
||||
|
||||
if test -n "$PYTHON"; then
|
||||
# Found it, now check the version.
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for modern python3" >&5
|
||||
$as_echo_n "checking for modern python3... " >&6; }
|
||||
if ${gcc_cv_prog_python3_modern+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
ac_prog_version=`eval $PYTHON --version 2>&1 |
|
||||
sed -n 's/^.*Python.* \([0-9][0-9.]*\).*$/\1/p'`
|
||||
|
||||
case $ac_prog_version in
|
||||
'') gcc_cv_prog_python3_modern=no;;
|
||||
3.[4-9]*|3.[1-9][0-9]*|[4-9].*|[1-9][0-9]*) gcc_cv_prog_python3_modern=yes;;
|
||||
*) gcc_cv_prog_python3_modern=no;;
|
||||
esac
|
||||
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_prog_python3_modern" >&5
|
||||
$as_echo "$gcc_cv_prog_python3_modern" >&6; }
|
||||
else
|
||||
gcc_cv_prog_python3_modern=no
|
||||
fi
|
||||
if test $gcc_cv_prog_python3_modern = no; then
|
||||
PYTHON="${CONFIG_SHELL-/bin/sh} $ac_aux_dir/missing python3"
|
||||
fi
|
||||
|
||||
if test $gcc_cv_prog_python3_modern = no; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
|
||||
*** Python3 is missing.
|
||||
*** Documentation for modula-2 will not include the target SYSTEM module." >&5
|
||||
$as_echo "$as_me: WARNING:
|
||||
*** Python3 is missing.
|
||||
*** Documentation for modula-2 will not include the target SYSTEM module." >&2;}
|
||||
HAVE_PYTHON=no
|
||||
else
|
||||
HAVE_PYTHON=yes
|
||||
fi
|
||||
|
||||
|
||||
# Binutils are not build modules, unlike bison/flex/makeinfo. So we
|
||||
# check for build == host before using them.
|
||||
|
||||
@@ -19712,7 +19792,7 @@ else
|
||||
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
|
||||
lt_status=$lt_dlunknown
|
||||
cat > conftest.$ac_ext <<_LT_EOF
|
||||
#line 19715 "configure"
|
||||
#line 19795 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
#if HAVE_DLFCN_H
|
||||
@@ -19818,7 +19898,7 @@ else
|
||||
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
|
||||
lt_status=$lt_dlunknown
|
||||
cat > conftest.$ac_ext <<_LT_EOF
|
||||
#line 19821 "configure"
|
||||
#line 19901 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
#if HAVE_DLFCN_H
|
||||
@@ -33909,4 +33989,3 @@ if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
|
||||
$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
|
||||
fi
|
||||
|
||||
|
||||
|
||||
@@ -137,7 +137,7 @@ AC_ARG_WITH([native-system-header-dir],
|
||||
configured_native_system_header_dir="${withval}"
|
||||
], [configured_native_system_header_dir=])
|
||||
|
||||
AC_ARG_WITH(build-sysroot,
|
||||
AC_ARG_WITH(build-sysroot,
|
||||
[AS_HELP_STRING([--with-build-sysroot=sysroot],
|
||||
[use sysroot as the system root during the build])],
|
||||
[if test x"$withval" != x ; then
|
||||
@@ -169,10 +169,10 @@ AC_ARG_WITH(sysroot,
|
||||
yes) TARGET_SYSTEM_ROOT='${exec_prefix}/${target_noncanonical}/sys-root' ;;
|
||||
*) TARGET_SYSTEM_ROOT=$with_sysroot ;;
|
||||
esac
|
||||
|
||||
|
||||
TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"'
|
||||
CROSS_SYSTEM_HEADER_DIR='$(TARGET_SYSTEM_ROOT)$${sysroot_headers_suffix}$(NATIVE_SYSTEM_HEADER_DIR)'
|
||||
|
||||
|
||||
case ${TARGET_SYSTEM_ROOT} in
|
||||
"${test_prefix}"|"${test_prefix}/"*|\
|
||||
"${test_exec_prefix}"|"${test_exec_prefix}/"*|\
|
||||
@@ -282,14 +282,14 @@ elif test x$withval != xno; then
|
||||
fi])
|
||||
|
||||
# We would like to our source tree to be readonly. However when releases or
|
||||
# pre-releases are generated, the flex/bison generated files as well as the
|
||||
# pre-releases are generated, the flex/bison generated files as well as the
|
||||
# various formats of manuals need to be included along with the rest of the
|
||||
# sources. Therefore we have --enable-generated-files-in-srcdir to do
|
||||
# sources. Therefore we have --enable-generated-files-in-srcdir to do
|
||||
# just that.
|
||||
|
||||
AC_MSG_CHECKING([whether to place generated files in the source directory])
|
||||
dnl generated-files-in-srcdir is disabled by default
|
||||
AC_ARG_ENABLE(generated-files-in-srcdir,
|
||||
AC_ARG_ENABLE(generated-files-in-srcdir,
|
||||
[AS_HELP_STRING([--enable-generated-files-in-srcdir],
|
||||
[put copies of generated files in source dir
|
||||
intended for creating source tarballs for users
|
||||
@@ -585,7 +585,7 @@ ACX_PROG_CXX_WARNING_OPTS(
|
||||
ACX_PROG_CC_WARNING_OPTS(
|
||||
m4_quote(m4_do([-Wold-style-definition -Wc++-compat])), [c_strict_warn])
|
||||
ACX_PROG_CXX_WARNING_ALMOST_PEDANTIC(
|
||||
m4_quote(m4_do([-Wno-long-long -Wno-variadic-macros ],
|
||||
m4_quote(m4_do([-Wno-long-long -Wno-variadic-macros ],
|
||||
[-Wno-overlength-strings])), [strict_warn])
|
||||
ACX_PROG_CXX_WARNINGS_ARE_ERRORS([manual], [strict_warn])
|
||||
|
||||
@@ -605,7 +605,7 @@ AC_SUBST(warn_cxxflags)
|
||||
ACX_PROG_CC_WARNING_OPTS(
|
||||
m4_quote(m4_do([-fno-exceptions -fno-rtti -fasynchronous-unwind-tables])),
|
||||
[noexception_flags])
|
||||
|
||||
|
||||
# Enable expensive internal checks
|
||||
is_release=
|
||||
if test x"`cat $srcdir/DEV-PHASE`" != xexperimental; then
|
||||
@@ -835,7 +835,7 @@ esac],
|
||||
[coverage_flags=""])
|
||||
AC_SUBST(coverage_flags)
|
||||
|
||||
AC_ARG_ENABLE(gather-detailed-mem-stats,
|
||||
AC_ARG_ENABLE(gather-detailed-mem-stats,
|
||||
[AS_HELP_STRING([--enable-gather-detailed-mem-stats],
|
||||
[enable detailed memory allocation stats gathering])], [],
|
||||
[enable_gather_detailed_mem_stats=no])
|
||||
@@ -1218,7 +1218,7 @@ ACX_PROG_LN($LN_S)
|
||||
AC_PROG_RANLIB
|
||||
ranlib_flags=""
|
||||
AC_SUBST(ranlib_flags)
|
||||
|
||||
|
||||
gcc_AC_PROG_INSTALL
|
||||
|
||||
# See if cmp has --ignore-initial.
|
||||
@@ -1263,6 +1263,20 @@ AC_CHECK_PROGS([FLEX], flex, [$MISSING flex])
|
||||
# Bison?
|
||||
AC_CHECK_PROGS([BISON], bison, [$MISSING bison])
|
||||
|
||||
# Python3?
|
||||
ACX_CHECK_PROG_VER(PYTHON, python3, --version,
|
||||
[Python.* \([0-9][0-9.]*\)],
|
||||
[3.[4-9]*|3.[1-9][0-9]*|[4-9].*|[1-9][0-9]*])
|
||||
if test $gcc_cv_prog_python3_modern = no; then
|
||||
AC_MSG_WARN([
|
||||
*** Python3 is missing.
|
||||
*** Documentation for modula-2 will not include the target SYSTEM module.])
|
||||
HAVE_PYTHON=no
|
||||
else
|
||||
HAVE_PYTHON=yes
|
||||
fi
|
||||
AC_SUBST(HAVE_PYTHON)
|
||||
|
||||
# Binutils are not build modules, unlike bison/flex/makeinfo. So we
|
||||
# check for build == host before using them.
|
||||
|
||||
@@ -1550,7 +1564,7 @@ GCC_AC_FUNC_MMAP_BLACKLIST
|
||||
|
||||
case "${host}" in
|
||||
*-*-*vms*)
|
||||
# Under VMS, vfork works very differently than on Unix. The standard test
|
||||
# Under VMS, vfork works very differently than on Unix. The standard test
|
||||
# won't work, and it isn't easily adaptable. It makes more sense to
|
||||
# just force it.
|
||||
ac_cv_func_vfork_works=yes
|
||||
@@ -1782,7 +1796,7 @@ fi
|
||||
CFLAGS="$saved_CFLAGS"
|
||||
CXXFLAGS="$saved_CXXFLAGS"
|
||||
|
||||
# mkdir takes a single argument on some systems.
|
||||
# mkdir takes a single argument on some systems.
|
||||
gcc_AC_FUNC_MKDIR_TAKES_ONE_ARG
|
||||
|
||||
# File extensions
|
||||
@@ -2025,7 +2039,7 @@ if test x$enable___cxa_atexit = xyes || \
|
||||
esac
|
||||
else
|
||||
# We can't check for __cxa_atexit when building a cross, so assume
|
||||
# it is available
|
||||
# it is available
|
||||
use_cxa_atexit=yes
|
||||
fi
|
||||
if test x$use_cxa_atexit = xyes; then
|
||||
@@ -2058,7 +2072,7 @@ AC_SUBST(extra_opt_files)
|
||||
# auto-host.h is the file containing items generated by autoconf and is
|
||||
# the first file included by config.h.
|
||||
# If host=build, it is correct to have bconfig include auto-host.h
|
||||
# as well. If host!=build, we are in error and need to do more
|
||||
# as well. If host!=build, we are in error and need to do more
|
||||
# work to find out the build config parameters.
|
||||
if test x$host = x$build
|
||||
then
|
||||
@@ -2068,7 +2082,7 @@ else
|
||||
# We create a subdir, then run autoconf in the subdir.
|
||||
# To prevent recursion we set host and build for the new
|
||||
# invocation of configure to the build for this invocation
|
||||
# of configure.
|
||||
# of configure.
|
||||
tempdir=build.$$
|
||||
rm -rf $tempdir
|
||||
mkdir $tempdir
|
||||
@@ -2274,7 +2288,7 @@ case $host_os in
|
||||
&& test "x$enable_win32_registry" != x; then
|
||||
AC_DEFINE_UNQUOTED(WIN32_REGISTRY_KEY, "$enable_win32_registry",
|
||||
[Define to be the last component of the Windows registry key under which
|
||||
to look for installation paths. The full key used will be
|
||||
to look for installation paths. The full key used will be
|
||||
HKEY_LOCAL_MACHINE/SOFTWARE/Free Software Foundation/{WIN32_REGISTRY_KEY}.
|
||||
The default is the GCC version number.])
|
||||
fi
|
||||
@@ -2517,7 +2531,7 @@ AC_SUBST([collect2])
|
||||
case $use_collect2 in
|
||||
no) use_collect2= ;;
|
||||
"") ;;
|
||||
*)
|
||||
*)
|
||||
host_xm_defines="${host_xm_defines} USE_COLLECT2"
|
||||
xm_defines="${xm_defines} USE_COLLECT2"
|
||||
case $host_can_use_collect2 in
|
||||
@@ -2582,7 +2596,7 @@ AC_SUBST(ORIGINAL_AS_FOR_TARGET)
|
||||
case "$ORIGINAL_AS_FOR_TARGET" in
|
||||
./as | ./as$build_exeext) ;;
|
||||
*) AC_CONFIG_FILES(as:exec-tool.in, [chmod +x as]) ;;
|
||||
esac
|
||||
esac
|
||||
|
||||
default_ld=
|
||||
AC_ARG_ENABLE(ld,
|
||||
@@ -2690,7 +2704,7 @@ AC_MSG_CHECKING(gold linker with split stack support as non default)
|
||||
# Check to see if default ld is not gold, but gold is
|
||||
# available and has support for split stack. If gcc was configured
|
||||
# with gold then no checking is done.
|
||||
#
|
||||
#
|
||||
if test x$ld_is_gold = xno && which ${gcc_cv_ld}.gold >/dev/null 2>&1; then
|
||||
|
||||
# For platforms other than powerpc64*, enable as appropriate.
|
||||
@@ -2727,7 +2741,7 @@ AC_SUBST(ORIGINAL_LD_FOR_TARGET)
|
||||
case "$ORIGINAL_LD_FOR_TARGET" in
|
||||
./collect-ld | ./collect-ld$build_exeext) ;;
|
||||
*) AC_CONFIG_FILES(collect-ld:exec-tool.in, [chmod +x collect-ld]) ;;
|
||||
esac
|
||||
esac
|
||||
|
||||
AC_MSG_CHECKING(what linker to use)
|
||||
if test "$gcc_cv_ld" = ../ld/ld-new$build_exeext \
|
||||
@@ -2894,7 +2908,7 @@ AC_SUBST(ORIGINAL_DSYMUTIL_FOR_TARGET)
|
||||
case "$ORIGINAL_DSYMUTIL_FOR_TARGET" in
|
||||
./dsymutil | ./dsymutil$build_exeext) ;;
|
||||
*) AC_CONFIG_FILES(dsymutil:exec-tool.in, [chmod +x dsymutil]) ;;
|
||||
esac
|
||||
esac
|
||||
|
||||
# Figure out what assembler alignment features are present.
|
||||
gcc_GAS_CHECK_FEATURE([.balign and .p2align], gcc_cv_as_balign_and_p2align,,
|
||||
@@ -3421,7 +3435,7 @@ if test $gcc_cv_as_section_exclude_e = no; then
|
||||
;;
|
||||
i?86-*-solaris2* | x86_64-*-solaris2*)
|
||||
conftest_s='.section foo1, #exclude'
|
||||
;;
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
@@ -3722,17 +3736,17 @@ foo: .long 25
|
||||
addil LT%foo-$tls_gdidx$,gp
|
||||
ldo RT%foo-$tls_gdidx$(%r1),%arg0
|
||||
b __tls_get_addr
|
||||
nop
|
||||
nop
|
||||
addil LT%foo-$tls_ldidx$,gp
|
||||
b __tls_get_addr
|
||||
ldo RT%foo-$tls_ldidx$(%r1),%arg0
|
||||
addil LR%foo-$tls_dtpoff$,%ret0
|
||||
ldo RR%foo-$tls_dtpoff$(%r1),%t1
|
||||
mfctl %cr27,%t1
|
||||
mfctl %cr27,%t1
|
||||
addil LT%foo-$tls_ieoff$,gp
|
||||
ldw RT%foo-$tls_ieoff$(%r1),%t2
|
||||
add %t1,%t2,%t3
|
||||
mfctl %cr27,%t1
|
||||
add %t1,%t2,%t3
|
||||
mfctl %cr27,%t1
|
||||
addil LR%foo-$tls_leoff$,%t1
|
||||
ldo RR%foo-$tls_leoff$(%r1),%t2'
|
||||
tls_as_opt=--fatal-warnings
|
||||
@@ -3798,7 +3812,7 @@ foo: .long 25
|
||||
case $gas_flag in
|
||||
yes) tls_as_opt="$tls_as_opt --64" ;;
|
||||
no) tls_as_opt="$tls_as_opt -xarch=amd64" ;;
|
||||
esac
|
||||
esac
|
||||
fi
|
||||
conftest_s="$conftest_s
|
||||
foo: .long 25
|
||||
@@ -4855,7 +4869,7 @@ tls_ld:
|
||||
.section .text,"ax",@progbits
|
||||
.globl _start
|
||||
.type _start, @function
|
||||
_start:
|
||||
_start:
|
||||
leal value@tlsldm(%ebx), %eax
|
||||
call ___tls_get_addr@plt
|
||||
|
||||
@@ -6642,7 +6656,7 @@ AC_CACHE_CHECK(linker --sysroot support,
|
||||
if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 16 -o "$gcc_cv_gld_major_version" -gt 2 ; then
|
||||
gcc_cv_ld_sysroot=yes
|
||||
fi
|
||||
elif test x$gcc_cv_ld != x; then
|
||||
elif test x$gcc_cv_ld != x; then
|
||||
if $gcc_cv_ld --help 2>&1 | grep sysroot > /dev/null; then
|
||||
gcc_cv_ld_sysroot=yes
|
||||
fi
|
||||
@@ -6650,7 +6664,7 @@ AC_CACHE_CHECK(linker --sysroot support,
|
||||
if test x"$gcc_cv_ld_sysroot" = xyes; then
|
||||
AC_DEFINE(HAVE_LD_SYSROOT, 1,
|
||||
[Define if your linker supports --sysroot.])
|
||||
fi
|
||||
fi
|
||||
|
||||
case $target in
|
||||
*-*-solaris2*)
|
||||
@@ -7060,7 +7074,7 @@ changequote(,)dnl
|
||||
# sources implementing front-end to GCC tree converters), and for
|
||||
# build infrastructure purposes (Make-lang.in, etc.)
|
||||
#
|
||||
# This will be <subdir> (relative to $srcdir) if a line like
|
||||
# This will be <subdir> (relative to $srcdir) if a line like
|
||||
# gcc_subdir="<subdir>" or gcc_subdir=<subdir>
|
||||
# is found in <langdir>/config-lang.in, and will remain <langdir>
|
||||
# otherwise.
|
||||
@@ -7349,7 +7363,7 @@ AC_ARG_VAR(GMPINC,[How to find GMP include files])
|
||||
|
||||
AC_ARG_VAR(ISLLIBS,[How to link isl])
|
||||
AC_ARG_VAR(ISLINC,[How to find isl include files])
|
||||
if test "x${ISLLIBS}" != "x" ; then
|
||||
if test "x${ISLLIBS}" != "x" ; then
|
||||
AC_DEFINE(HAVE_isl, 1, [Define if isl is in use.])
|
||||
fi
|
||||
|
||||
@@ -7648,7 +7662,6 @@ for d in $subdirs doc build common c-family
|
||||
do
|
||||
test -d $d || mkdir $d
|
||||
done
|
||||
],
|
||||
],
|
||||
[subdirs='$subdirs'])
|
||||
AC_OUTPUT
|
||||
|
||||
|
||||
2838
gcc/doc/gm2.texi
Normal file
2838
gcc/doc/gm2.texi
Normal file
File diff suppressed because it is too large
Load Diff
@@ -308,6 +308,13 @@ On some targets, @samp{libphobos} isn't enabled by default, but compiles
|
||||
and works if @option{--enable-libphobos} is used. Specifics are
|
||||
documented for affected targets.
|
||||
|
||||
@item @anchor{GM2-prerequisite}GM2
|
||||
|
||||
Python3 is required if you want to build the complete Modula-2
|
||||
documentation including the target @code{SYSTEM} definition module.
|
||||
If Python3 is unavailable Modula-2 documentation will include a target
|
||||
independent version of the SYSTEM modules.
|
||||
|
||||
@item A ``working'' POSIX compatible shell, or GNU bash
|
||||
|
||||
Necessary when running @command{configure} because some
|
||||
@@ -436,6 +443,34 @@ Necessary to build GCC with zstd compression used for LTO bytecode.
|
||||
The library is searched in your default library patch search.
|
||||
Alternatively, the @option{--with-zstd} configure option should be used.
|
||||
|
||||
@item Python3 modules
|
||||
|
||||
The complete list of Python3 modules broken down by GCC subcomponent
|
||||
is shown below:
|
||||
|
||||
@table @asis
|
||||
@item internal debugging in gdbhooks
|
||||
@code{gdb}, @code{gdb.printing}, @code{gdb.types},
|
||||
@code{os.path}, @code{re}, @code{sys} and @code{tempfile},
|
||||
|
||||
@item g++ testsuite
|
||||
@code{gcov}, @code{gzip}, @code{json}, @code{os} and @code{pytest}.
|
||||
|
||||
@item c++ cxx api generation
|
||||
@code{csv}, @code{os}, @code{sys} and @code{time}.
|
||||
|
||||
@item modula-2 documentation
|
||||
@code{argparse}, @code{os}, @code{pathlib}, @code{shutil} and
|
||||
@code{sys}.
|
||||
|
||||
@item git developer tools
|
||||
@code{os} and @code{sys}.
|
||||
|
||||
@item ada documentation
|
||||
@code{latex_elements}, @code{os}, @code{pygments}, @code{re},
|
||||
@code{sys} and @code{time}.
|
||||
@end table
|
||||
|
||||
@end table
|
||||
|
||||
@heading Tools/packages necessary for modifying GCC
|
||||
@@ -1853,11 +1888,13 @@ grep ^language= */config-lang.in
|
||||
@end smallexample
|
||||
Currently, you can use any of the following:
|
||||
@code{all}, @code{default}, @code{ada}, @code{c}, @code{c++}, @code{d},
|
||||
@code{fortran}, @code{go}, @code{jit}, @code{lto}, @code{objc}, @code{obj-c++}.
|
||||
@code{fortran}, @code{go}, @code{jit}, @code{lto}, @code{m2},
|
||||
@code{objc}, @code{obj-c++}.
|
||||
Building the Ada compiler has special requirements, see below.
|
||||
If you do not pass this flag, or specify the option @code{default}, then the
|
||||
default languages available in the @file{gcc} sub-tree will be configured.
|
||||
Ada, D, Go, Jit, and Objective-C++ are not default languages. LTO is not a
|
||||
Ada, D, Go, Jit, Objective-C++ and Modula-2 are not default languages.
|
||||
LTO is not a
|
||||
default language, but is built by default because @option{--enable-lto} is
|
||||
enabled by default. The other languages are default languages. If
|
||||
@code{all} is specified, then all available languages are built. An
|
||||
@@ -1885,6 +1922,10 @@ be built. This can be useful for debugging, or for compatibility with
|
||||
previous Ada build procedures, when it was required to explicitly
|
||||
do a @samp{make -C gcc gnatlib_and_tools}.
|
||||
|
||||
@item --disable-libgm2
|
||||
Specify that the run-time libraries and tools used by Modula-2 should not
|
||||
be built. This can be useful for debugging.
|
||||
|
||||
@item --disable-libsanitizer
|
||||
Specify that the run-time libraries for the various sanitizers should
|
||||
not be built.
|
||||
@@ -2854,8 +2895,8 @@ version 2.21 or later).
|
||||
|
||||
@item @samp{bootstrap-lto-noplugin}
|
||||
This option is similar to @code{bootstrap-lto}, but is intended for
|
||||
hosts that do not support the linker plugin. Without the linker plugin
|
||||
static libraries are not compiled with link-time optimizations. Since
|
||||
hosts that do not support the linker plugin. Without the linker plugin
|
||||
static libraries are not compiled with link-time optimizations. Since
|
||||
the GCC middle end and back end are in @file{libbackend.a} this means
|
||||
that only the front end is actually LTO optimized.
|
||||
|
||||
@@ -3144,10 +3185,10 @@ on a simulator as described at @uref{https://gcc.gnu.org/simtest-howto.html}.
|
||||
In order to run sets of tests selectively, there are targets
|
||||
@samp{make check-gcc} and language specific @samp{make check-c},
|
||||
@samp{make check-c++}, @samp{make check-d} @samp{make check-fortran},
|
||||
@samp{make check-ada}, @samp{make check-objc}, @samp{make check-obj-c++},
|
||||
@samp{make check-lto}
|
||||
in the @file{gcc} subdirectory of the object directory. You can also
|
||||
just run @samp{make check} in a subdirectory of the object directory.
|
||||
@samp{make check-ada}, @samp{make check-m2}, @samp{make check-objc},
|
||||
@samp{make check-obj-c++}, @samp{make check-lto} in the @file{gcc}
|
||||
subdirectory of the object directory. You can also just run
|
||||
@samp{make check} in a subdirectory of the object directory.
|
||||
|
||||
|
||||
A more selective way to just run all @command{gcc} execute tests in the
|
||||
@@ -3572,7 +3613,7 @@ GNU Compiler Collection on your machine.
|
||||
Note that this list of install notes is @emph{not} a list of supported
|
||||
hosts or targets. Not all supported hosts and targets are listed
|
||||
here, only the ones that require host-specific or target-specific
|
||||
information have to.
|
||||
information have to.
|
||||
|
||||
@ifhtml
|
||||
@itemize
|
||||
|
||||
@@ -97,6 +97,9 @@ The GCC runtime library.
|
||||
@item libgfortran
|
||||
The Fortran runtime library.
|
||||
|
||||
@item libgm2
|
||||
The Modula-2 runtime library.
|
||||
|
||||
@item libgo
|
||||
The Go runtime library. The bulk of this library is mirrored from the
|
||||
@uref{https://github.com/@/golang/go, master Go repository}.
|
||||
@@ -184,7 +187,8 @@ The @file{gcc} directory contains the following subdirectories:
|
||||
@item @var{language}
|
||||
Subdirectories for various languages. Directories containing a file
|
||||
@file{config-lang.in} are language subdirectories. The contents of
|
||||
the subdirectories @file{c} (for C), @file{cp} (for C++),
|
||||
the subdirectories @file{c} (for C), @file{cp} (for C++), @file{m2}
|
||||
(for Modula-2),
|
||||
@file{objc} (for Objective-C), @file{objcp} (for Objective-C++),
|
||||
and @file{lto} (for LTO) are documented in this
|
||||
manual (@pxref{Passes, , Passes and Files of the Compiler});
|
||||
|
||||
@@ -25221,6 +25221,8 @@ gen_compile_unit_die (const char *filename)
|
||||
}
|
||||
else if (strcmp (language_string, "GNU F77") == 0)
|
||||
language = DW_LANG_Fortran77;
|
||||
else if (strcmp (language_string, "GNU Modula-2") == 0)
|
||||
language = DW_LANG_Modula2;
|
||||
else if (dwarf_version >= 3 || !dwarf_strict)
|
||||
{
|
||||
if (strcmp (language_string, "GNU Ada") == 0)
|
||||
|
||||
397
gcc/m2/COPYING.FDL
Normal file
397
gcc/m2/COPYING.FDL
Normal file
@@ -0,0 +1,397 @@
|
||||
GNU Free Documentation License
|
||||
Version 1.2, November 2002
|
||||
|
||||
|
||||
Copyright (C) 2000-2022 Free Software Foundation, Inc.
|
||||
51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
|
||||
0. PREAMBLE
|
||||
|
||||
The purpose of this License is to make a manual, textbook, or other
|
||||
functional and useful document "free" in the sense of freedom: to
|
||||
assure everyone the effective freedom to copy and redistribute it,
|
||||
with or without modifying it, either commercially or noncommercially.
|
||||
Secondarily, this License preserves for the author and publisher a way
|
||||
to get credit for their work, while not being considered responsible
|
||||
for modifications made by others.
|
||||
|
||||
This License is a kind of "copyleft", which means that derivative
|
||||
works of the document must themselves be free in the same sense. It
|
||||
complements the GNU General Public License, which is a copyleft
|
||||
license designed for free software.
|
||||
|
||||
We have designed this License in order to use it for manuals for free
|
||||
software, because free software needs free documentation: a free
|
||||
program should come with manuals providing the same freedoms that the
|
||||
software does. But this License is not limited to software manuals;
|
||||
it can be used for any textual work, regardless of subject matter or
|
||||
whether it is published as a printed book. We recommend this License
|
||||
principally for works whose purpose is instruction or reference.
|
||||
|
||||
|
||||
1. APPLICABILITY AND DEFINITIONS
|
||||
|
||||
This License applies to any manual or other work, in any medium, that
|
||||
contains a notice placed by the copyright holder saying it can be
|
||||
distributed under the terms of this License. Such a notice grants a
|
||||
world-wide, royalty-free license, unlimited in duration, to use that
|
||||
work under the conditions stated herein. The "Document", below,
|
||||
refers to any such manual or work. Any member of the public is a
|
||||
licensee, and is addressed as "you". You accept the license if you
|
||||
copy, modify or distribute the work in a way requiring permission
|
||||
under copyright law.
|
||||
|
||||
A "Modified Version" of the Document means any work containing the
|
||||
Document or a portion of it, either copied verbatim, or with
|
||||
modifications and/or translated into another language.
|
||||
|
||||
A "Secondary Section" is a named appendix or a front-matter section of
|
||||
the Document that deals exclusively with the relationship of the
|
||||
publishers or authors of the Document to the Document's overall subject
|
||||
(or to related matters) and contains nothing that could fall directly
|
||||
within that overall subject. (Thus, if the Document is in part a
|
||||
textbook of mathematics, a Secondary Section may not explain any
|
||||
mathematics.) The relationship could be a matter of historical
|
||||
connection with the subject or with related matters, or of legal,
|
||||
commercial, philosophical, ethical or political position regarding
|
||||
them.
|
||||
|
||||
The "Invariant Sections" are certain Secondary Sections whose titles
|
||||
are designated, as being those of Invariant Sections, in the notice
|
||||
that says that the Document is released under this License. If a
|
||||
section does not fit the above definition of Secondary then it is not
|
||||
allowed to be designated as Invariant. The Document may contain zero
|
||||
Invariant Sections. If the Document does not identify any Invariant
|
||||
Sections then there are none.
|
||||
|
||||
The "Cover Texts" are certain short passages of text that are listed,
|
||||
as Front-Cover Texts or Back-Cover Texts, in the notice that says that
|
||||
the Document is released under this License. A Front-Cover Text may
|
||||
be at most 5 words, and a Back-Cover Text may be at most 25 words.
|
||||
|
||||
A "Transparent" copy of the Document means a machine-readable copy,
|
||||
represented in a format whose specification is available to the
|
||||
general public, that is suitable for revising the document
|
||||
straightforwardly with generic text editors or (for images composed of
|
||||
pixels) generic paint programs or (for drawings) some widely available
|
||||
drawing editor, and that is suitable for input to text formatters or
|
||||
for automatic translation to a variety of formats suitable for input
|
||||
to text formatters. A copy made in an otherwise Transparent file
|
||||
format whose markup, or absence of markup, has been arranged to thwart
|
||||
or discourage subsequent modification by readers is not Transparent.
|
||||
An image format is not Transparent if used for any substantial amount
|
||||
of text. A copy that is not "Transparent" is called "Opaque".
|
||||
|
||||
Examples of suitable formats for Transparent copies include plain
|
||||
ASCII without markup, Texinfo input format, LaTeX input format, SGML
|
||||
or XML using a publicly available DTD, and standard-conforming simple
|
||||
HTML, PostScript or PDF designed for human modification. Examples of
|
||||
transparent image formats include PNG, XCF and JPG. Opaque formats
|
||||
include proprietary formats that can be read and edited only by
|
||||
proprietary word processors, SGML or XML for which the DTD and/or
|
||||
processing tools are not generally available, and the
|
||||
machine-generated HTML, PostScript or PDF produced by some word
|
||||
processors for output purposes only.
|
||||
|
||||
The "Title Page" means, for a printed book, the title page itself,
|
||||
plus such following pages as are needed to hold, legibly, the material
|
||||
this License requires to appear in the title page. For works in
|
||||
formats which do not have any title page as such, "Title Page" means
|
||||
the text near the most prominent appearance of the work's title,
|
||||
preceding the beginning of the body of the text.
|
||||
|
||||
A section "Entitled XYZ" means a named subunit of the Document whose
|
||||
title either is precisely XYZ or contains XYZ in parentheses following
|
||||
text that translates XYZ in another language. (Here XYZ stands for a
|
||||
specific section name mentioned below, such as "Acknowledgements",
|
||||
"Dedications", "Endorsements", or "History".) To "Preserve the Title"
|
||||
of such a section when you modify the Document means that it remains a
|
||||
section "Entitled XYZ" according to this definition.
|
||||
|
||||
The Document may include Warranty Disclaimers next to the notice which
|
||||
states that this License applies to the Document. These Warranty
|
||||
Disclaimers are considered to be included by reference in this
|
||||
License, but only as regards disclaiming warranties: any other
|
||||
implication that these Warranty Disclaimers may have is void and has
|
||||
no effect on the meaning of this License.
|
||||
|
||||
|
||||
2. VERBATIM COPYING
|
||||
|
||||
You may copy and distribute the Document in any medium, either
|
||||
commercially or noncommercially, provided that this License, the
|
||||
copyright notices, and the license notice saying this License applies
|
||||
to the Document are reproduced in all copies, and that you add no other
|
||||
conditions whatsoever to those of this License. You may not use
|
||||
technical measures to obstruct or control the reading or further
|
||||
copying of the copies you make or distribute. However, you may accept
|
||||
compensation in exchange for copies. If you distribute a large enough
|
||||
number of copies you must also follow the conditions in section 3.
|
||||
|
||||
You may also lend copies, under the same conditions stated above, and
|
||||
you may publicly display copies.
|
||||
|
||||
|
||||
3. COPYING IN QUANTITY
|
||||
|
||||
If you publish printed copies (or copies in media that commonly have
|
||||
printed covers) of the Document, numbering more than 100, and the
|
||||
Document's license notice requires Cover Texts, you must enclose the
|
||||
copies in covers that carry, clearly and legibly, all these Cover
|
||||
Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on
|
||||
the back cover. Both covers must also clearly and legibly identify
|
||||
you as the publisher of these copies. The front cover must present
|
||||
the full title with all words of the title equally prominent and
|
||||
visible. You may add other material on the covers in addition.
|
||||
Copying with changes limited to the covers, as long as they preserve
|
||||
the title of the Document and satisfy these conditions, can be treated
|
||||
as verbatim copying in other respects.
|
||||
|
||||
If the required texts for either cover are too voluminous to fit
|
||||
legibly, you should put the first ones listed (as many as fit
|
||||
reasonably) on the actual cover, and continue the rest onto adjacent
|
||||
pages.
|
||||
|
||||
If you publish or distribute Opaque copies of the Document numbering
|
||||
more than 100, you must either include a machine-readable Transparent
|
||||
copy along with each Opaque copy, or state in or with each Opaque copy
|
||||
a computer-network location from which the general network-using
|
||||
public has access to download using public-standard network protocols
|
||||
a complete Transparent copy of the Document, free of added material.
|
||||
If you use the latter option, you must take reasonably prudent steps,
|
||||
when you begin distribution of Opaque copies in quantity, to ensure
|
||||
that this Transparent copy will remain thus accessible at the stated
|
||||
location until at least one year after the last time you distribute an
|
||||
Opaque copy (directly or through your agents or retailers) of that
|
||||
edition to the public.
|
||||
|
||||
It is requested, but not required, that you contact the authors of the
|
||||
Document well before redistributing any large number of copies, to give
|
||||
them a chance to provide you with an updated version of the Document.
|
||||
|
||||
|
||||
4. MODIFICATIONS
|
||||
|
||||
You may copy and distribute a Modified Version of the Document under
|
||||
the conditions of sections 2 and 3 above, provided that you release
|
||||
the Modified Version under precisely this License, with the Modified
|
||||
Version filling the role of the Document, thus licensing distribution
|
||||
and modification of the Modified Version to whoever possesses a copy
|
||||
of it. In addition, you must do these things in the Modified Version:
|
||||
|
||||
A. Use in the Title Page (and on the covers, if any) a title distinct
|
||||
from that of the Document, and from those of previous versions
|
||||
(which should, if there were any, be listed in the History section
|
||||
of the Document). You may use the same title as a previous version
|
||||
if the original publisher of that version gives permission.
|
||||
B. List on the Title Page, as authors, one or more persons or entities
|
||||
responsible for authorship of the modifications in the Modified
|
||||
Version, together with at least five of the principal authors of the
|
||||
Document (all of its principal authors, if it has fewer than five),
|
||||
unless they release you from this requirement.
|
||||
C. State on the Title page the name of the publisher of the
|
||||
Modified Version, as the publisher.
|
||||
D. Preserve all the copyright notices of the Document.
|
||||
E. Add an appropriate copyright notice for your modifications
|
||||
adjacent to the other copyright notices.
|
||||
F. Include, immediately after the copyright notices, a license notice
|
||||
giving the public permission to use the Modified Version under the
|
||||
terms of this License, in the form shown in the Addendum below.
|
||||
G. Preserve in that license notice the full lists of Invariant Sections
|
||||
and required Cover Texts given in the Document's license notice.
|
||||
H. Include an unaltered copy of this License.
|
||||
I. Preserve the section Entitled "History", Preserve its Title, and add
|
||||
to it an item stating at least the title, year, new authors, and
|
||||
publisher of the Modified Version as given on the Title Page. If
|
||||
there is no section Entitled "History" in the Document, create one
|
||||
stating the title, year, authors, and publisher of the Document as
|
||||
given on its Title Page, then add an item describing the Modified
|
||||
Version as stated in the previous sentence.
|
||||
J. Preserve the network location, if any, given in the Document for
|
||||
public access to a Transparent copy of the Document, and likewise
|
||||
the network locations given in the Document for previous versions
|
||||
it was based on. These may be placed in the "History" section.
|
||||
You may omit a network location for a work that was published at
|
||||
least four years before the Document itself, or if the original
|
||||
publisher of the version it refers to gives permission.
|
||||
K. For any section Entitled "Acknowledgements" or "Dedications",
|
||||
Preserve the Title of the section, and preserve in the section all
|
||||
the substance and tone of each of the contributor acknowledgements
|
||||
and/or dedications given therein.
|
||||
L. Preserve all the Invariant Sections of the Document,
|
||||
unaltered in their text and in their titles. Section numbers
|
||||
or the equivalent are not considered part of the section titles.
|
||||
M. Delete any section Entitled "Endorsements". Such a section
|
||||
may not be included in the Modified Version.
|
||||
N. Do not retitle any existing section to be Entitled "Endorsements"
|
||||
or to conflict in title with any Invariant Section.
|
||||
O. Preserve any Warranty Disclaimers.
|
||||
|
||||
If the Modified Version includes new front-matter sections or
|
||||
appendices that qualify as Secondary Sections and contain no material
|
||||
copied from the Document, you may at your option designate some or all
|
||||
of these sections as invariant. To do this, add their titles to the
|
||||
list of Invariant Sections in the Modified Version's license notice.
|
||||
These titles must be distinct from any other section titles.
|
||||
|
||||
You may add a section Entitled "Endorsements", provided it contains
|
||||
nothing but endorsements of your Modified Version by various
|
||||
parties--for example, statements of peer review or that the text has
|
||||
been approved by an organization as the authoritative definition of a
|
||||
standard.
|
||||
|
||||
You may add a passage of up to five words as a Front-Cover Text, and a
|
||||
passage of up to 25 words as a Back-Cover Text, to the end of the list
|
||||
of Cover Texts in the Modified Version. Only one passage of
|
||||
Front-Cover Text and one of Back-Cover Text may be added by (or
|
||||
through arrangements made by) any one entity. If the Document already
|
||||
includes a cover text for the same cover, previously added by you or
|
||||
by arrangement made by the same entity you are acting on behalf of,
|
||||
you may not add another; but you may replace the old one, on explicit
|
||||
permission from the previous publisher that added the old one.
|
||||
|
||||
The author(s) and publisher(s) of the Document do not by this License
|
||||
give permission to use their names for publicity for or to assert or
|
||||
imply endorsement of any Modified Version.
|
||||
|
||||
|
||||
5. COMBINING DOCUMENTS
|
||||
|
||||
You may combine the Document with other documents released under this
|
||||
License, under the terms defined in section 4 above for modified
|
||||
versions, provided that you include in the combination all of the
|
||||
Invariant Sections of all of the original documents, unmodified, and
|
||||
list them all as Invariant Sections of your combined work in its
|
||||
license notice, and that you preserve all their Warranty Disclaimers.
|
||||
|
||||
The combined work need only contain one copy of this License, and
|
||||
multiple identical Invariant Sections may be replaced with a single
|
||||
copy. If there are multiple Invariant Sections with the same name but
|
||||
different contents, make the title of each such section unique by
|
||||
adding at the end of it, in parentheses, the name of the original
|
||||
author or publisher of that section if known, or else a unique number.
|
||||
Make the same adjustment to the section titles in the list of
|
||||
Invariant Sections in the license notice of the combined work.
|
||||
|
||||
In the combination, you must combine any sections Entitled "History"
|
||||
in the various original documents, forming one section Entitled
|
||||
"History"; likewise combine any sections Entitled "Acknowledgements",
|
||||
and any sections Entitled "Dedications". You must delete all sections
|
||||
Entitled "Endorsements".
|
||||
|
||||
|
||||
6. COLLECTIONS OF DOCUMENTS
|
||||
|
||||
You may make a collection consisting of the Document and other documents
|
||||
released under this License, and replace the individual copies of this
|
||||
License in the various documents with a single copy that is included in
|
||||
the collection, provided that you follow the rules of this License for
|
||||
verbatim copying of each of the documents in all other respects.
|
||||
|
||||
You may extract a single document from such a collection, and distribute
|
||||
it individually under this License, provided you insert a copy of this
|
||||
License into the extracted document, and follow this License in all
|
||||
other respects regarding verbatim copying of that document.
|
||||
|
||||
|
||||
7. AGGREGATION WITH INDEPENDENT WORKS
|
||||
|
||||
A compilation of the Document or its derivatives with other separate
|
||||
and independent documents or works, in or on a volume of a storage or
|
||||
distribution medium, is called an "aggregate" if the copyright
|
||||
resulting from the compilation is not used to limit the legal rights
|
||||
of the compilation's users beyond what the individual works permit.
|
||||
When the Document is included in an aggregate, this License does not
|
||||
apply to the other works in the aggregate which are not themselves
|
||||
derivative works of the Document.
|
||||
|
||||
If the Cover Text requirement of section 3 is applicable to these
|
||||
copies of the Document, then if the Document is less than one half of
|
||||
the entire aggregate, the Document's Cover Texts may be placed on
|
||||
covers that bracket the Document within the aggregate, or the
|
||||
electronic equivalent of covers if the Document is in electronic form.
|
||||
Otherwise they must appear on printed covers that bracket the whole
|
||||
aggregate.
|
||||
|
||||
|
||||
8. TRANSLATION
|
||||
|
||||
Translation is considered a kind of modification, so you may
|
||||
distribute translations of the Document under the terms of section 4.
|
||||
Replacing Invariant Sections with translations requires special
|
||||
permission from their copyright holders, but you may include
|
||||
translations of some or all Invariant Sections in addition to the
|
||||
original versions of these Invariant Sections. You may include a
|
||||
translation of this License, and all the license notices in the
|
||||
Document, and any Warranty Disclaimers, provided that you also include
|
||||
the original English version of this License and the original versions
|
||||
of those notices and disclaimers. In case of a disagreement between
|
||||
the translation and the original version of this License or a notice
|
||||
or disclaimer, the original version will prevail.
|
||||
|
||||
If a section in the Document is Entitled "Acknowledgements",
|
||||
"Dedications", or "History", the requirement (section 4) to Preserve
|
||||
its Title (section 1) will typically require changing the actual
|
||||
title.
|
||||
|
||||
|
||||
9. TERMINATION
|
||||
|
||||
You may not copy, modify, sublicense, or distribute the Document except
|
||||
as expressly provided for under this License. Any other attempt to
|
||||
copy, modify, sublicense or distribute the Document is void, and will
|
||||
automatically terminate your rights under this License. However,
|
||||
parties who have received copies, or rights, from you under this
|
||||
License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
|
||||
|
||||
10. FUTURE REVISIONS OF THIS LICENSE
|
||||
|
||||
The Free Software Foundation may publish new, revised versions
|
||||
of the GNU Free Documentation License from time to time. Such new
|
||||
versions will be similar in spirit to the present version, but may
|
||||
differ in detail to address new problems or concerns. See
|
||||
http://www.gnu.org/copyleft/.
|
||||
|
||||
Each version of the License is given a distinguishing version number.
|
||||
If the Document specifies that a particular numbered version of this
|
||||
License "or any later version" applies to it, you have the option of
|
||||
following the terms and conditions either of that specified version or
|
||||
of any later version that has been published (not as a draft) by the
|
||||
Free Software Foundation. If the Document does not specify a version
|
||||
number of this License, you may choose any version ever published (not
|
||||
as a draft) by the Free Software Foundation.
|
||||
|
||||
|
||||
ADDENDUM: How to use this License for your documents
|
||||
|
||||
To use this License in a document you have written, include a copy of
|
||||
the License in the document and put the following copyright and
|
||||
license notices just after the title page:
|
||||
|
||||
Copyright (c) YEAR YOUR NAME.
|
||||
Permission is granted to copy, distribute and/or modify this document
|
||||
under the terms of the GNU Free Documentation License, Version 1.2
|
||||
or any later version published by the Free Software Foundation;
|
||||
with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
|
||||
A copy of the license is included in the section entitled "GNU
|
||||
Free Documentation License".
|
||||
|
||||
If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts,
|
||||
replace the "with...Texts." line with this:
|
||||
|
||||
with the Invariant Sections being LIST THEIR TITLES, with the
|
||||
Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST.
|
||||
|
||||
If you have Invariant Sections without Cover Texts, or some other
|
||||
combination of the three, merge those two alternatives to suit the
|
||||
situation.
|
||||
|
||||
If your document contains nontrivial examples of program code, we
|
||||
recommend releasing these examples in parallel under your choice of
|
||||
free software license, such as the GNU General Public License,
|
||||
to permit their use in free software.
|
||||
73
gcc/m2/COPYING.RUNTIME
Normal file
73
gcc/m2/COPYING.RUNTIME
Normal file
@@ -0,0 +1,73 @@
|
||||
GCC RUNTIME LIBRARY EXCEPTION
|
||||
|
||||
Version 3.1, 31 March 2009
|
||||
|
||||
Copyright (C) 2009-2022 Free Software Foundation, Inc. <http://fsf.org/>
|
||||
|
||||
Everyone is permitted to copy and distribute verbatim copies of this
|
||||
license document, but changing it is not allowed.
|
||||
|
||||
This GCC Runtime Library Exception ("Exception") is an additional
|
||||
permission under section 7 of the GNU General Public License, version
|
||||
3 ("GPLv3"). It applies to a given file (the "Runtime Library") that
|
||||
bears a notice placed by the copyright holder of the file stating that
|
||||
the file is governed by GPLv3 along with this Exception.
|
||||
|
||||
When you use GCC to compile a program, GCC may combine portions of
|
||||
certain GCC header files and runtime libraries with the compiled
|
||||
program. The purpose of this Exception is to allow compilation of
|
||||
non-GPL (including proprietary) programs to use, in this way, the
|
||||
header files and runtime libraries covered by this Exception.
|
||||
|
||||
0. Definitions.
|
||||
|
||||
A file is an "Independent Module" if it either requires the Runtime
|
||||
Library for execution after a Compilation Process, or makes use of an
|
||||
interface provided by the Runtime Library, but is not otherwise based
|
||||
on the Runtime Library.
|
||||
|
||||
"GCC" means a version of the GNU Compiler Collection, with or without
|
||||
modifications, governed by version 3 (or a specified later version) of
|
||||
the GNU General Public License (GPL) with the option of using any
|
||||
subsequent versions published by the FSF.
|
||||
|
||||
"GPL-compatible Software" is software whose conditions of propagation,
|
||||
modification and use would permit combination with GCC in accord with
|
||||
the license of GCC.
|
||||
|
||||
"Target Code" refers to output from any compiler for a real or virtual
|
||||
target processor architecture, in executable form or suitable for
|
||||
input to an assembler, loader, linker and/or execution
|
||||
phase. Notwithstanding that, Target Code does not include data in any
|
||||
format that is used as a compiler intermediate representation, or used
|
||||
for producing a compiler intermediate representation.
|
||||
|
||||
The "Compilation Process" transforms code entirely represented in
|
||||
non-intermediate languages designed for human-written code, and/or in
|
||||
Java Virtual Machine byte code, into Target Code. Thus, for example,
|
||||
use of source code generators and preprocessors need not be considered
|
||||
part of the Compilation Process, since the Compilation Process can be
|
||||
understood as starting with the output of the generators or
|
||||
preprocessors.
|
||||
|
||||
A Compilation Process is "Eligible" if it is done using GCC, alone or
|
||||
with other GPL-compatible software, or if it is done without using any
|
||||
work based on GCC. For example, using non-GPL-compatible Software to
|
||||
optimize any GCC intermediate representations would not qualify as an
|
||||
Eligible Compilation Process.
|
||||
|
||||
1. Grant of Additional Permission.
|
||||
|
||||
You have permission to propagate a work of Target Code formed by
|
||||
combining the Runtime Library with Independent Modules, even if such
|
||||
propagation would otherwise violate the terms of GPLv3, provided that
|
||||
all Target Code was generated by Eligible Compilation Processes. You
|
||||
may then convey such a combination under terms of your choice,
|
||||
consistent with the licensing of the Independent Modules.
|
||||
|
||||
2. No Weakening of GCC Copyleft.
|
||||
|
||||
The availability of this Exception does not imply any general
|
||||
presumption that third-party software is unaffected by the copyleft
|
||||
requirements of the license of GCC.
|
||||
|
||||
675
gcc/m2/COPYING3
Normal file
675
gcc/m2/COPYING3
Normal file
@@ -0,0 +1,675 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The GNU General Public License is a free, copyleft license for
|
||||
software and other kinds of works.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
the GNU General Public License is intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users. We, the Free Software Foundation, use the
|
||||
GNU General Public License for most of our software; it applies also to
|
||||
any other work released this way by its authors. You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to prevent others from denying you
|
||||
these rights or asking you to surrender the rights. Therefore, you have
|
||||
certain responsibilities if you distribute copies of the software, or if
|
||||
you modify it: responsibilities to respect the freedom of others.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must pass on to the recipients the same
|
||||
freedoms that you received. You must make sure that they, too, receive
|
||||
or can get the source code. And you must show them these terms so they
|
||||
know their rights.
|
||||
|
||||
Developers that use the GNU GPL protect your rights with two steps:
|
||||
(1) assert copyright on the software, and (2) offer you this License
|
||||
giving you legal permission to copy, distribute and/or modify it.
|
||||
|
||||
For the developers' and authors' protection, the GPL clearly explains
|
||||
that there is no warranty for this free software. For both users' and
|
||||
authors' sake, the GPL requires that modified versions be marked as
|
||||
changed, so that their problems will not be attributed erroneously to
|
||||
authors of previous versions.
|
||||
|
||||
Some devices are designed to deny users access to install or run
|
||||
modified versions of the software inside them, although the manufacturer
|
||||
can do so. This is fundamentally incompatible with the aim of
|
||||
protecting users' freedom to change the software. The systematic
|
||||
pattern of such abuse occurs in the area of products for individuals to
|
||||
use, which is precisely where it is most unacceptable. Therefore, we
|
||||
have designed this version of the GPL to prohibit the practice for those
|
||||
products. If such problems arise substantially in other domains, we
|
||||
stand ready to extend this provision to those domains in future versions
|
||||
of the GPL, as needed to protect the freedom of users.
|
||||
|
||||
Finally, every program is threatened constantly by software patents.
|
||||
States should not allow patents to restrict development and use of
|
||||
software on general-purpose computers, but in those that do, we wish to
|
||||
avoid the special danger that patents applied to a free program could
|
||||
make it effectively proprietary. To prevent this, the GPL assures that
|
||||
patents cannot be used to render the program non-free.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU General Public License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a "modified version" of the
|
||||
earlier work or a work "based on" the earlier work.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices"
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code.
|
||||
|
||||
The "source code" for a work means the preferred form of the work
|
||||
for making modifications to it. "Object code" means any non-source
|
||||
form of a work.
|
||||
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
"keep intact all notices".
|
||||
|
||||
c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, "normally used" refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. Use with the GNU Affero General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU Affero General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the special requirements of the GNU Affero General Public License,
|
||||
section 13, concerning interaction through a network will apply to the
|
||||
combination as such.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Program specifies that a certain numbered version of the GNU General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
state the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program does terminal interaction, make it output a short
|
||||
notice like this when it starts in an interactive mode:
|
||||
|
||||
<program> Copyright (C) <year> <name of author>
|
||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, your program's commands
|
||||
might be different; for a GUI interface, you would use an "about box".
|
||||
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU GPL, see
|
||||
<http://www.gnu.org/licenses/>.
|
||||
|
||||
The GNU General Public License does not permit incorporating your program
|
||||
into proprietary programs. If your program is a subroutine library, you
|
||||
may consider it more useful to permit linking proprietary applications with
|
||||
the library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License. But first, please read
|
||||
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
|
||||
|
||||
165
gcc/m2/COPYING3.LIB
Normal file
165
gcc/m2/COPYING3.LIB
Normal file
@@ -0,0 +1,165 @@
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
|
||||
This version of the GNU Lesser General Public License incorporates
|
||||
the terms and conditions of version 3 of the GNU General Public
|
||||
License, supplemented by the additional permissions listed below.
|
||||
|
||||
0. Additional Definitions.
|
||||
|
||||
As used herein, "this License" refers to version 3 of the GNU Lesser
|
||||
General Public License, and the "GNU GPL" refers to version 3 of the GNU
|
||||
General Public License.
|
||||
|
||||
"The Library" refers to a covered work governed by this License,
|
||||
other than an Application or a Combined Work as defined below.
|
||||
|
||||
An "Application" is any work that makes use of an interface provided
|
||||
by the Library, but which is not otherwise based on the Library.
|
||||
Defining a subclass of a class defined by the Library is deemed a mode
|
||||
of using an interface provided by the Library.
|
||||
|
||||
A "Combined Work" is a work produced by combining or linking an
|
||||
Application with the Library. The particular version of the Library
|
||||
with which the Combined Work was made is also called the "Linked
|
||||
Version".
|
||||
|
||||
The "Minimal Corresponding Source" for a Combined Work means the
|
||||
Corresponding Source for the Combined Work, excluding any source code
|
||||
for portions of the Combined Work that, considered in isolation, are
|
||||
based on the Application, and not on the Linked Version.
|
||||
|
||||
The "Corresponding Application Code" for a Combined Work means the
|
||||
object code and/or source code for the Application, including any data
|
||||
and utility programs needed for reproducing the Combined Work from the
|
||||
Application, but excluding the System Libraries of the Combined Work.
|
||||
|
||||
1. Exception to Section 3 of the GNU GPL.
|
||||
|
||||
You may convey a covered work under sections 3 and 4 of this License
|
||||
without being bound by section 3 of the GNU GPL.
|
||||
|
||||
2. Conveying Modified Versions.
|
||||
|
||||
If you modify a copy of the Library, and, in your modifications, a
|
||||
facility refers to a function or data to be supplied by an Application
|
||||
that uses the facility (other than as an argument passed when the
|
||||
facility is invoked), then you may convey a copy of the modified
|
||||
version:
|
||||
|
||||
a) under this License, provided that you make a good faith effort to
|
||||
ensure that, in the event an Application does not supply the
|
||||
function or data, the facility still operates, and performs
|
||||
whatever part of its purpose remains meaningful, or
|
||||
|
||||
b) under the GNU GPL, with none of the additional permissions of
|
||||
this License applicable to that copy.
|
||||
|
||||
3. Object Code Incorporating Material from Library Header Files.
|
||||
|
||||
The object code form of an Application may incorporate material from
|
||||
a header file that is part of the Library. You may convey such object
|
||||
code under terms of your choice, provided that, if the incorporated
|
||||
material is not limited to numerical parameters, data structure
|
||||
layouts and accessors, or small macros, inline functions and templates
|
||||
(ten or fewer lines in length), you do both of the following:
|
||||
|
||||
a) Give prominent notice with each copy of the object code that the
|
||||
Library is used in it and that the Library and its use are
|
||||
covered by this License.
|
||||
|
||||
b) Accompany the object code with a copy of the GNU GPL and this license
|
||||
document.
|
||||
|
||||
4. Combined Works.
|
||||
|
||||
You may convey a Combined Work under terms of your choice that,
|
||||
taken together, effectively do not restrict modification of the
|
||||
portions of the Library contained in the Combined Work and reverse
|
||||
engineering for debugging such modifications, if you also do each of
|
||||
the following:
|
||||
|
||||
a) Give prominent notice with each copy of the Combined Work that
|
||||
the Library is used in it and that the Library and its use are
|
||||
covered by this License.
|
||||
|
||||
b) Accompany the Combined Work with a copy of the GNU GPL and this license
|
||||
document.
|
||||
|
||||
c) For a Combined Work that displays copyright notices during
|
||||
execution, include the copyright notice for the Library among
|
||||
these notices, as well as a reference directing the user to the
|
||||
copies of the GNU GPL and this license document.
|
||||
|
||||
d) Do one of the following:
|
||||
|
||||
0) Convey the Minimal Corresponding Source under the terms of this
|
||||
License, and the Corresponding Application Code in a form
|
||||
suitable for, and under terms that permit, the user to
|
||||
recombine or relink the Application with a modified version of
|
||||
the Linked Version to produce a modified Combined Work, in the
|
||||
manner specified by section 6 of the GNU GPL for conveying
|
||||
Corresponding Source.
|
||||
|
||||
1) Use a suitable shared library mechanism for linking with the
|
||||
Library. A suitable mechanism is one that (a) uses at run time
|
||||
a copy of the Library already present on the user's computer
|
||||
system, and (b) will operate properly with a modified version
|
||||
of the Library that is interface-compatible with the Linked
|
||||
Version.
|
||||
|
||||
e) Provide Installation Information, but only if you would otherwise
|
||||
be required to provide such information under section 6 of the
|
||||
GNU GPL, and only to the extent that such information is
|
||||
necessary to install and execute a modified version of the
|
||||
Combined Work produced by recombining or relinking the
|
||||
Application with a modified version of the Linked Version. (If
|
||||
you use option 4d0, the Installation Information must accompany
|
||||
the Minimal Corresponding Source and Corresponding Application
|
||||
Code. If you use option 4d1, you must provide the Installation
|
||||
Information in the manner specified by section 6 of the GNU GPL
|
||||
for conveying Corresponding Source.)
|
||||
|
||||
5. Combined Libraries.
|
||||
|
||||
You may place library facilities that are a work based on the
|
||||
Library side by side in a single library together with other library
|
||||
facilities that are not Applications and are not covered by this
|
||||
License, and convey such a combined library under terms of your
|
||||
choice, if you do both of the following:
|
||||
|
||||
a) Accompany the combined library with a copy of the same work based
|
||||
on the Library, uncombined with any other library facilities,
|
||||
conveyed under the terms of this License.
|
||||
|
||||
b) Give prominent notice with the combined library that part of it
|
||||
is a work based on the Library, and explaining where to find the
|
||||
accompanying uncombined form of the same work.
|
||||
|
||||
6. Revised Versions of the GNU Lesser General Public License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions
|
||||
of the GNU Lesser General Public License from time to time. Such new
|
||||
versions will be similar in spirit to the present version, but may
|
||||
differ in detail to address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Library as you received it specifies that a certain numbered version
|
||||
of the GNU Lesser General Public License "or any later version"
|
||||
applies to it, you have the option of following the terms and
|
||||
conditions either of that published version or of any later version
|
||||
published by the Free Software Foundation. If the Library as you
|
||||
received it does not specify a version number of the GNU Lesser
|
||||
General Public License, you may choose any version of the GNU Lesser
|
||||
General Public License ever published by the Free Software Foundation.
|
||||
|
||||
If the Library as you received it specifies that a proxy can decide
|
||||
whether future versions of the GNU Lesser General Public License shall
|
||||
apply, that proxy's public statement of acceptance of any version is
|
||||
permanent authorization for you to choose that version for the
|
||||
Library.
|
||||
68
gcc/m2/ChangeLog-2001
Normal file
68
gcc/m2/ChangeLog-2001
Normal file
@@ -0,0 +1,68 @@
|
||||
2001-08-01 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* brought gm2 up to date with gcc-3.0
|
||||
* fixed opaque handling in the new parser
|
||||
* now using new parser by default
|
||||
* rewritten NameKey.mod, removing any static limits on array
|
||||
sizes by using dynamic data structures throughout.
|
||||
* improved p2c so that it handles opaque types properly.
|
||||
* modified Lists.def, SymbolKey.def to use opaque types.
|
||||
|
||||
2001-03-09 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* fixed bug in FpuIO.mod which failed to issue a '-' when emitting
|
||||
real numbers.
|
||||
* added many new tests to the regression directory (autotest).
|
||||
* fixed bugs in the bnf descriptions. Compiler is now using
|
||||
automatically generated parser for P1, P2 and P3. Just PH
|
||||
remains hand built.
|
||||
* Introduced a number of small regression tests following
|
||||
Olivier's extensive bug report on (m2f). Fixed a number
|
||||
of bugs reported, see gm2/m2/comp/BUGS for details.
|
||||
* Fixed bug in M2Lexical.mod causing mismatch between
|
||||
source line numbers and gdb information.
|
||||
* Fixed + - / of constant sets.
|
||||
* removed tests for the interim (they exist under
|
||||
bitset3.mod.breaks and string.mod.breaks respectively)
|
||||
* modifications to stop overflow on max CARDINAL when converting
|
||||
numbers into strings (NumberIO.mod)
|
||||
|
||||
2001-02-28 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* using new parser P1SyntaxCheck.mod and P2Build.mod
|
||||
P1SyntaxCheck.mod now inserts simple missing tokens.
|
||||
* both automatically generated and provide better error
|
||||
recovery
|
||||
* improved some error messages
|
||||
|
||||
2001-01-23 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* brought gm2 up to date with gcc-20001204
|
||||
* introduced configure and moved all makefiles to Makefile.in
|
||||
* tidied up p2c a little, in an attempt to reduce the compile
|
||||
time warnings
|
||||
|
||||
2000-12-02 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* brought gm2 up to date with gcc-20001120
|
||||
* garbage collection now working in gm2
|
||||
* introduced EXPORT UNQUALIFIED as a method for writing
|
||||
definition modules as interfaces for C libraries
|
||||
* altered link tools to reflect EXPORT UNQUALIFIED
|
||||
* started work on preprocessing source when -Wcpp is supplied
|
||||
* tidied up gccgm2.c
|
||||
|
||||
2000-09-25 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* added error messages to lang-spec.h. Issued if wrong combination
|
||||
of -Wuselist -Wmodules -Wmakelist and -c are supplied.
|
||||
|
||||
2000-09-14 Matthias Kurz <mk@baerlap.north.de>
|
||||
|
||||
* Many makefile portability corrections (tests for symbol links).
|
||||
Made makeversion more portable via guessing email address.
|
||||
Added setenv emulation in libc.c.
|
||||
Inserted missing Close(fo) to gm2lgen.mod.GenMain().
|
||||
Improved README,
|
||||
Added QUIAT to the makefiles.
|
||||
Cast EOF to (char) inside mkfor.c mklink.c.
|
||||
59
gcc/m2/ChangeLog-2002
Normal file
59
gcc/m2/ChangeLog-2002
Normal file
@@ -0,0 +1,59 @@
|
||||
2002-12-20 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* added __ATTRIBUTE__ __BUILTIN__ ((Ident))
|
||||
rules for obtaining target compiler constants
|
||||
* fixed handling of recursive procedure type definitions
|
||||
bug reported by Iztok Kobal
|
||||
* improved base types to aid gdb in displaying data types
|
||||
* checked in some sketchy initial ISO library implementation
|
||||
modules
|
||||
|
||||
2002-11-03 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* GM2 Release 0.33
|
||||
* implemented large sets
|
||||
* implemented ISO complient sets
|
||||
* definition modules no longer have to explicitly export
|
||||
identifiers
|
||||
|
||||
2002-06-20 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* GM2 Release 0.32
|
||||
* now supports building a cross compiler (strong-arm) tested
|
||||
|
||||
2002-06-09 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* brought gm2 up to date with gcc-3.2
|
||||
* fixed the $(srcdir) in all Makefile.in's
|
||||
* configuring and building gm2 is now recommended
|
||||
to occur outside the source tree.
|
||||
* many changes to gccgm2.c to reflect gcc-3.2
|
||||
|
||||
2002-05-04 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* implemented DEFINITION MODULE FOR "C"
|
||||
* implemented -Wmakeall
|
||||
* implemented varargs in "C" modules
|
||||
* added gm2/examples directory
|
||||
* updated documentation
|
||||
* gm2m and gm2l are now built from ebnf descriptions
|
||||
by ppg
|
||||
|
||||
2002-04-15 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* GM2 Release 0.21
|
||||
* brought gm2 up to date with gcc-3.0.4
|
||||
* make paranoid works on Debian GNU/Linux (Athlon)
|
||||
* finally finished rewrite of a number of key modules
|
||||
* Strings.mod used instead of StrLib.mod allowing for
|
||||
dynamic arrays
|
||||
* new flex built lexical analyser in use.
|
||||
* cpp is run on all definition/implementation modules if
|
||||
-Wcpp is used.
|
||||
* gm2m rewritten
|
||||
* gm2 and its utilities now use -I for path specification
|
||||
rather than -M
|
||||
* Makefiles much simplified, removed most recursive makes.
|
||||
* all parsers are now mechanically generated using ppg.
|
||||
* ppg built if required.
|
||||
|
||||
284
gcc/m2/ChangeLog-2003
Normal file
284
gcc/m2/ChangeLog-2003
Normal file
@@ -0,0 +1,284 @@
|
||||
2003-12-26 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* increased the number of regression tests to 1332
|
||||
* gm2 passes 1317 and fails 15
|
||||
* many bug fixes..
|
||||
* improved documentation, gm2.texi. Now contains
|
||||
a ebnf description of GNU Modula-2 extracted from
|
||||
bnf/m2.bnf.
|
||||
* completed the optional final parameter argument.
|
||||
* reimplemented the CAP standard function so that it
|
||||
can be used within constant expressions.
|
||||
|
||||
2003-11-27 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* fixed a bug in the handling of the -Wcpp option so that it uses
|
||||
-traditional-cpp
|
||||
* integrated the gm2 and m2f regression tests into the GNU GCC
|
||||
dejagnu format - all the m2f tests are now used to test gm2.
|
||||
* started work on a minor extension to GNU Modula-2 which allows
|
||||
the last parameter to be optional. In turn this allows a
|
||||
Modula-2 implementation of the ISO module COROUTINES which is
|
||||
in development.
|
||||
|
||||
2003-11-13 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* modified the generated .h files to be prefixed with `G' to avoid
|
||||
name clashes which in turn allows gm2 to be built under a vfat
|
||||
file system.
|
||||
|
||||
2003-11-07 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* changed the flag name -Wverbose to -Wsources
|
||||
|
||||
2003-11-07 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* improved array index type debugging description in gccgm2.c
|
||||
which allows gdb to understand that arrays are declared ARRAY
|
||||
[low..high] rather than ARRAY [0..high-low]
|
||||
|
||||
2003-11-04 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* fixed bug in procedure type declaration.
|
||||
|
||||
2003-11-03 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* modified ProcedureBlock rule in bnf/m2.bnf, bnf/m2-[23h].bnf
|
||||
to comply with ISO syntax. The 'BEGIN' statement sequence is
|
||||
optional.
|
||||
* updated the gm2.texi to include a description about
|
||||
the -Wextended-opaque option.
|
||||
|
||||
2003-10-23 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* fixes to opaque type (in)compatibility for expression and assignments.
|
||||
|
||||
2003-10-09 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* fixed gm2 build with ./configure --enable-checking
|
||||
|
||||
2003-10-07 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* introduced -Wextended-opaque which enables the GM2 extension
|
||||
to opaque types. This allows opaque types to be non pointer
|
||||
types, but requires that GM2 parse the corresponding
|
||||
implementation module.
|
||||
* modified GM2 to default to the standard opaque implementation
|
||||
of using SYSTEM.ADDRESS as the `opaque type' outside the
|
||||
module of its declaration.
|
||||
* introduced -Wverbose to allow users see the source file names
|
||||
for modules as they are being compiled.
|
||||
|
||||
2003-09-30 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* fixed bug in ADDADR as reported by Iztok
|
||||
* fixed bug in exported type name clashes as reported by Iztok
|
||||
* fixed bug with multiple type references to a SET
|
||||
* fixed Min`basetype' to contain the type `basetype'
|
||||
* tidied up IsReallyPointer in M2Quads.mod
|
||||
|
||||
2003-09-25 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* fixed -Wmakeall option.
|
||||
* fixed CARDINAL type to have range 0..max(unsigned int)
|
||||
rather than 0..max(integer) as reported by Iztok.
|
||||
* fixed set type incomparability as reported by Iztok.
|
||||
* fixed README note about make gm2.paranoid as reported by
|
||||
Matthias Kurz.
|
||||
* fixed many of the example programs which were broken during
|
||||
the migration to gcc-3.3.1.
|
||||
* fixed lang-specs.h to invoke new cpp.
|
||||
* removed the M2PATH environment variable usage.
|
||||
* added more modules to make gm2.paranoid.
|
||||
* fixed gm2->gcc declaration of arrays.
|
||||
* fixed infinite loop in M2GenGCC.mod and M2Optimize.mod
|
||||
* added more regression tests.
|
||||
* fixed Make-file.in as suggested by Matthias Kurz.
|
||||
* fixed tools-src/makeversion and tools-src/buildpg to be
|
||||
more portable as suggested by Matthias Kurz.
|
||||
* fixed examples/pthread
|
||||
|
||||
2003-09-19 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* GM2 release 0.40
|
||||
* brought GM2 up to date with gcc-3.3.1
|
||||
* introduced new files gm2-common.h, gm2-common.c,
|
||||
gm2-lang.h, gm2-tree.h to reflect the new garbage collection
|
||||
mechanism.
|
||||
* major changes to gccgm2.c to reflect migration from gcc-3.2 to
|
||||
gcc-3.3.1
|
||||
* introduced gm2-compiler/M2Scope.def, gm2-compiler/M2Scope.mod
|
||||
to manage the quadruples which represent a particular scope
|
||||
* major recoding of M2Code and the order that quadruples are coded
|
||||
into GCC trees. This in turn fixes a very serious nested
|
||||
procedure bug. (gm2/m2/comp/autotest/gm2/localproc.mod and
|
||||
convert.mod).
|
||||
* changes to M2GCCDeclare.mod, M2GenGCC.mod, M2BasicBlock.mod
|
||||
to allow quadruples to be translated via outer scope to inner
|
||||
scope ordering.
|
||||
* M2Code.mod is much cleaner.
|
||||
* fixed a number of uninitialised variable errors and bad pointer
|
||||
errors. All caught by the extremely useful x86 utility valgrind.
|
||||
In turn this fixes a Redhat 9.0 build problem.
|
||||
* fixed bugs in DynamicStrings.mod, ppg.mod, SEnvironment.mod
|
||||
* introduced the debian package files (gm2/debian) so that .deb
|
||||
package (gm2) can be built.
|
||||
* fixes to gm2 so that it can compile the University of Ulm's
|
||||
system modules.
|
||||
|
||||
2003-06-01 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* added the LONGCARD data type.
|
||||
* fixed subrange declarations so that they can be prefixed
|
||||
by a qualident.
|
||||
* fixed variant record for ISO syntax
|
||||
(gm2/m2/comp/autotest/gm2/caseiso.mod).
|
||||
* fixed importing of an enumerated element
|
||||
(gm2/m2/comp/autotest/gm2/impm.mod).
|
||||
|
||||
2003-05-27 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* fixed bug reported by Iztok Kobal
|
||||
(gm2/m2/comp/autotest/gm2/realbitscast.mod).
|
||||
Fixed cast to copy data.
|
||||
* enabled SIZE to be invoked from constant expressions.
|
||||
|
||||
2003-05-20 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* fixed bug reported by Iztok Kobal
|
||||
(gm2/m2/comp/autotest/gm2/testlength3.mod)
|
||||
LENGTH is now mapped onto M2RTS.Length if the parameter is
|
||||
not a constant at compile time.
|
||||
|
||||
2003-05-16 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* fixed bug reported by Iztok Kobal
|
||||
(gm2/m2/comp/autotest/gm2/longstrimp.mod)
|
||||
and also (gm2/m2/comp/autotest/gm2/imp[deghij].mod)
|
||||
|
||||
2003-05-08 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* implemented the standard function LENGTH
|
||||
* allowed standard functions to be called from constant expressions
|
||||
* improved cyclic data type dependancy error messages
|
||||
* SIZE is now only exported from SYSTEM if the switch -Wiso is absent
|
||||
SIZE is declared as a standard procedure if -Wiso is present
|
||||
|
||||
2003-05-07 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* implemented ISO BITSET as a standard type which takes
|
||||
effect when -Wiso is present on the command line.
|
||||
* backed out garbage collection change to m2.lex
|
||||
* fixed bugs reported by Iztok Kobal
|
||||
(gm2/m2/comp/autotest/gm2/[testexit.mod, bitset3.mod bits32.mod])
|
||||
|
||||
2003-05-06 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* modified Storage and SysStorage modules so that the procedure
|
||||
DEALLOCATE assigns the pointer to NIL
|
||||
* fixed bug reported by Iztok Kobal
|
||||
(gm2/m2/comp/autotest/gm2/bitset2.mod)
|
||||
|
||||
2003-05-05 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* fixed two bugs reported by Iztok Kobal.
|
||||
* fixed bug in M2GCCDeclare.mod (BITSET's subrange was undeclared).
|
||||
* added BITNUM, the subrange from which BITSET is constructed,
|
||||
in SYSTEM.
|
||||
* added regression test case for this bug.
|
||||
* also modified c.lex to use xstrdup and not strdup.
|
||||
|
||||
2003-05-01 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* added pseudo functions, CAP, ODD, ABS
|
||||
* removed gm2-libs/Math.def which defined ABS
|
||||
|
||||
2003-04-29 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* examples/pthreads cleaned up
|
||||
* introduced ISO SYSTEM. Limitations, TSIZE only takes one parameter,
|
||||
and SHIFT, ROTATE are not implemented yet
|
||||
* renamed gm2-libs/Strings to gm2-libs/DynamicStrings to avoid name
|
||||
clash with gm2-iso/Strings
|
||||
* p2c modified to understand DEFINITION MODULE FOR "C"
|
||||
* gm2-libs/libc.def modified to use DEFINITION MODULE FOR "C"
|
||||
* gm2-iso/libc.def removed
|
||||
* linking references to libc (in gm2/init/*init) removed
|
||||
* gm2/tools-src/def2texi finished
|
||||
* gm2/gm2-libs.texi built via gm2/tools-src/def2texi
|
||||
* gm2/gm2.texi now contains library definition modules and index
|
||||
* added -Wiso switch to gm2 driver
|
||||
|
||||
2003-04-12 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* first cut of h2def released
|
||||
* examples/pthreads introduced
|
||||
* examples/vga.def generated by h2def
|
||||
* fixed bug in CodeBecomes
|
||||
* fixed constant set bug in M2GenGCC.mod
|
||||
* updated gm2.texi to reflect introduction of h2def
|
||||
* build mechanism tidied up. p2c is now built from the top level
|
||||
makefile.
|
||||
* some portability features of p2c fixed, so that it builds
|
||||
cleanly under Apple Darwin
|
||||
* many internal changes made to ppg to handle recursive ebnf
|
||||
rules.
|
||||
* fixed automatic export of unqualified identifiers from a
|
||||
DEFINITION MODULE FOR "C"
|
||||
|
||||
2003-02-02 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* fixed bug reported by Iztok Kobal, the gm2-iso/ChanConsts module
|
||||
failed to compile. Added a regression test to catch this.
|
||||
|
||||
2003-02-01 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* bug fixes in error handling. In particular duplicate symbols
|
||||
are better handled.
|
||||
* development checkin of the h2def tool and subsidiary modules.
|
||||
|
||||
2003-01-20 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* bug fixes for gm2m and link-specs.h which allow libraries
|
||||
to be added with the -Wmakeall option.
|
||||
* fixed a number of built-in definitions in Builtin.def
|
||||
* also added MathLib0.def and MathLib0.mod to the pim libraries.
|
||||
* fixed svga example test
|
||||
* added long double math built-ins
|
||||
|
||||
2003-01-17 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* bug fixes to the line numbering debugging info
|
||||
which is passed to gcc. Resulting in better gdb support.
|
||||
|
||||
2003-01-14 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* added the C `double' math built-ins
|
||||
* fixed path in Make-lang.in which caused `file not found
|
||||
error' during build
|
||||
* updated documentation to show correspondance between C and
|
||||
M2 data types.
|
||||
* fixed bug in M2SubExp.mod shown by indirect procedure calls
|
||||
* fixed bug in M2Constants.mod
|
||||
* introduced SHORTREAL data type and removed the pseudo module
|
||||
MATH as built-ins are handled via gcc backend.
|
||||
* removed corresponding gm2-compiler/M2Math module.
|
||||
|
||||
2003-01-11 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* changed ebnf to allow empty variant clauses in a case
|
||||
statement. Now complies with ISO case statement syntax.
|
||||
(Bug reported by Iztok Kobal)
|
||||
|
||||
2003-01-09 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* initial checkin of complete built-in function support
|
||||
to obvious C functions.
|
||||
* gm2-libs/libc.c, gm2-libs/libc.def:: modified reference
|
||||
to cfree to free as suggested by John Calley
|
||||
|
||||
2003-01-02 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* fixed bug reported by Matthias Manhart
|
||||
(procedure type).
|
||||
|
||||
396
gcc/m2/ChangeLog-2004
Normal file
396
gcc/m2/ChangeLog-2004
Normal file
@@ -0,0 +1,396 @@
|
||||
2004-12-22 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* more fixes to enable to the Z type to work.
|
||||
* introduced GetM2ZRealType which maps onto the largest
|
||||
real type tree.
|
||||
* 24 regression test failures out of 2148 on the Opteron LP64
|
||||
9 fail within ulm libraries (Procedure/Module scope nesting).
|
||||
15 fail with ISO import/export of enumeration types.
|
||||
* exactly the same regression test failures on 32 bit i386
|
||||
implementation.
|
||||
* fixed regression test path, all tests are build and run
|
||||
using gm2-harness-0.3
|
||||
|
||||
2004-11-29 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* internal changes to ordinal type which now use the Z
|
||||
type (long_long_int) for internal calculations before
|
||||
being converted into the actual ordinal type at assignment
|
||||
to a variable or procedure parameter or return value.
|
||||
* works on a 32 bit i386 but fails on the Opteron LP64 model.
|
||||
|
||||
2004-11-22 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* compiler now checks for overflow at compile time
|
||||
when constructing constant expressions.
|
||||
|
||||
2004-11-17 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* fixed ppg to generate a comment for in-built rules when
|
||||
producing the EBNF documentation within gm2.texi
|
||||
* updated gm2/gm2.texi to reflect availability of the
|
||||
gm2-harness which will build and test gm2 automatically.
|
||||
|
||||
2004-11-12 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* fixed bug reported by John B. Wallace, Jr <wallacjb@enter.net>
|
||||
concerning negating a LONGINT constant
|
||||
(see testsuite/gm2/pim/run/TestLong[34].mod).
|
||||
* updated gm2/TODO list
|
||||
* gm2/gccgm2.c added functions to determine the size necessary
|
||||
for a Modula-2 constant.
|
||||
* gm2/gm2.texi modified documentation to reflect the ISO rules
|
||||
concerning importing enumerated types.
|
||||
* gm2/gm2-compiler/SymbolTable.mod fixed possible buffer overflow
|
||||
and integrated MakeConstLit with the changes to gccgm2.c.
|
||||
* minor modifications made to gm2/gm2-libs-pim/README.texi
|
||||
* moved a number of regression tests into pass/fail directories
|
||||
to reflect the expected ISO enumeration behaviour. Note
|
||||
that many of these now fail.
|
||||
|
||||
2004-11-05 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* fixed bug reported by John B. Wallace, Jr <wallacjb@enter.net>
|
||||
concerning assignment of a constant to a LONGINT
|
||||
(see testsuite/gm2/pim/run/TestLong.mod).
|
||||
Creation of LONGINT and LONGCARD constant literals
|
||||
was broken for values > MAX(INTEGER).
|
||||
|
||||
2004-10-29 John B. Wallace, Jr <wallacjb@enter.net>
|
||||
|
||||
* fixed infinite loop when calling StrToLongInt.
|
||||
* contributed test code testsuite/gm2/pim/run/TestLong.mod
|
||||
|
||||
2004-10-26 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* fixed -Wpedantic-param-names option.
|
||||
* added runtime tests and also parameter switch tests
|
||||
* added testsuite/gm2/switches/pedantic-params
|
||||
* added testsuite/gm2/pim/run and a number of old m2f tests
|
||||
* made compiler check to see that opaque types are really
|
||||
equivalent to a pointer type if -Wextended-opaque is absent.
|
||||
* added testsuite/gm2/switches/extended-opaque/{pass,fail}
|
||||
to stress this check.
|
||||
|
||||
2004-10-19 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* added -Wpedantic-param-names option to check that
|
||||
parameters to procedures declared in definition modules
|
||||
have identical names to their implementation module
|
||||
procedure counterparts.
|
||||
* fixed bug report by Iztok Kobal. The compiler would
|
||||
crash when a constant was assigned to a procedure.
|
||||
|
||||
2004-10-18 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* modified gm2/lang-specs.h to make the front end run
|
||||
with only the -S option. No longer requires -S -c.
|
||||
Bug reported by john o goyo <jgoyo@ca.inter.net>.
|
||||
|
||||
2004-10-12 Diego Rodr=EDguez Rodr=EDguez <dieymir@yahoo.es>
|
||||
|
||||
* gm2/Make-lang.in introduced gm2.install rule so that
|
||||
GNU Modula-2 can be installed without overwriting an
|
||||
existing installation of gcc.
|
||||
* gm2/README updated to explain how to only install gm2.
|
||||
|
||||
2004-10-12 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* fixed bug reported by John B. Wallace, Jr
|
||||
<wallacjb@enter.net>. See testsuite/gm2/pim/run/pass/str6.mod.
|
||||
|
||||
2004-10-07 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* fixed bug reported by Iztok Kobal,
|
||||
GNU Modula-2 now allows a RETURN statement in the
|
||||
initialization section of the module.
|
||||
* fixed another bug reported by Iztok Kobal,
|
||||
binary and unary large set operators failed when
|
||||
handling constant set values.
|
||||
|
||||
2004-09-20 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* fixed varient record bug as reported by John B. Wallace, Jr
|
||||
<wallacjb@enter.net>. See testsuite/gm2/pim/pass/varient.mod.
|
||||
|
||||
2004-09-16 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* fixed bug in gm2/gm2-compiler/Indexing.mod which
|
||||
occurred after the p2c translation.
|
||||
* in turn this fixed a gm2m problem. The bug resulted in
|
||||
touching memory which would not have been malloced so
|
||||
this fix may have cured a number of problems.
|
||||
|
||||
2004-09-14 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* fixed the ncurses definition module and WindowDevice module.
|
||||
* fixed M2RTS:Termination to call termination procedures in
|
||||
reverse.
|
||||
|
||||
2004-09-07 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* tidied up gm2-compiler/M2Base.mod and introduced
|
||||
compatability matrices which include all the base
|
||||
types.
|
||||
|
||||
2004-09-03 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* introduced SHORTINT and SHORTCARD data types.
|
||||
* added ncurses.def example in examples/ncurses
|
||||
|
||||
2004-08-31 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* modified SIZE handling so that SIZE is only available
|
||||
from SYSTEM when -Wpim2 is present.
|
||||
* fixed bug as reported by "John B. Wallace, Jr."
|
||||
<wallacjb@enter.net>. A variable which when implicitly
|
||||
imported via an IMPORT module; failed.
|
||||
The variable was not being declared correctly by the
|
||||
GNU Modula-2 front end to the GCC back end.
|
||||
|
||||
2004-08-27 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* added new switch -Wpim2 to stipulate the Modula-2 PIM-2
|
||||
dialect.
|
||||
* Made SIZE pervasive for ISO Modula-2 and PIM-[34] Modula-2
|
||||
As reported by Diego RodrÃguez RodrÃguez <dieymir@yahoo.es>.
|
||||
SIZE can be imported from SYSTEM when -Wpim2 is present.
|
||||
* removed the association with ".def" and "@modula-2"
|
||||
inside gm2/lang-specs.h as this conflicts with shared library
|
||||
file extension .def used by gcc. Bug reported by Gerrit P. Haase
|
||||
<gp@familiehaase.de>.
|
||||
|
||||
2004-08-26 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* implemented type PROCESS for SYSTEM in the pim library
|
||||
directory (gm2/gm2-libs-coroutines).
|
||||
* SYSTEM implements NEWPROCESS, TRANSFER, IOTRANSFER.
|
||||
This is achieved by using the GNU pthread library context
|
||||
mechanism.
|
||||
* provided an Executive and TimerHandler module in
|
||||
(gm2/examples/executive).
|
||||
* many bug fixes and regression tests show that 3 ulm standard
|
||||
library modules fail.
|
||||
* implemented MAX(REAL), MIN(REAL) and also provided access to
|
||||
three more gcc builtin functions: huge_val, huge_vall, huge_valf
|
||||
* started work on a Logitech 3.0 compatible library.
|
||||
|
||||
2004-07-06 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* improved error handling of unknown objects in EXPORT lists.
|
||||
* added regression test
|
||||
* implemented a few procedures in the ISO libraries.
|
||||
|
||||
2004-07-02 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* fixed many IMPORT bugs in inner modules
|
||||
|
||||
2004-06-30 Gerrit Haase <gp@familiehaase.de>
|
||||
|
||||
* cygwin patch for gm2/Make-lang.in
|
||||
|
||||
2004-06-29 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* fixed EXPORT of an object from an inner module into an
|
||||
implementation module which EXPORTs the same object.
|
||||
* fixed EXPORT of a procedure from an inner module into an
|
||||
outer module which is not exported but is assigned to a
|
||||
variable.
|
||||
|
||||
2004-06-28 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* made flex lexical analysers ignore carriage return
|
||||
* fixed bug in M2Quads.mod checking parameter of
|
||||
a const var before value was known.
|
||||
* fixed local MODULEs so that they can FROM mod IMPORT
|
||||
* tidied up some ulm implementation modules in ulm-lib-gm2/std
|
||||
|
||||
2004-06-22 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* allowed LONGCARD compatibility with INTEGER
|
||||
* allowed LONGINT compatibility with CARDINAL
|
||||
* allowed LONGCARD compatibility with CARDINAL
|
||||
* allowed LONGINT compatibility with INTEGER
|
||||
|
||||
2004-06-21 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* fixed bug in constant set declaration
|
||||
(see ulm library ulm-lib-gm2/std/Calendar.mod and
|
||||
testsuite/gm2/pim/pass/setconst.mod and
|
||||
testsuite/gm2/pim/pass/setconst2.mod)
|
||||
* all regression tests pass on the Opteron port of gm2.
|
||||
|
||||
2004-06-18 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* implemented nested module within procedures.
|
||||
This allows a few more ulm library modules to compile.
|
||||
|
||||
2004-06-07 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* renamed the -Wunbounded-by-reference option to
|
||||
-funbounded-by-reference as suggested by Waldek Hebisch.
|
||||
* finished ISO SYSTEM implementation.
|
||||
* ROTATE, SHIFT now work with smaller than WORD sized sets,
|
||||
WORD sized sets and larger than WORD sized sets.
|
||||
* gm2-iso/SYSTEM.mod is called by the back end if larger than
|
||||
WORD sized sets are ROTATEd or SHIFTed.
|
||||
* updated gm2.texi to include new sections describing ISO and PIM
|
||||
versions of the SYSTEM module.
|
||||
* renamed m2.lex as m2.flex, c.lex as c.flex to fix a bug
|
||||
reported by Gerrit Haase while attempting the cygwin port.
|
||||
* renamed gm2-compiler/m2lex.def as gm2-compiler/m2flex.def
|
||||
* modified gm2-compiler/M2Comp to use m2flex
|
||||
* modified Make-lang.in to use m2.flex and c.flex
|
||||
* modified init/h2definit, init/gm2linit to use m2flex
|
||||
|
||||
2004-05-10 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* gm2 now builds on FreeBSD 5.2.1
|
||||
* removed to_upper and to_lower in p2c
|
||||
* made gm2/gm2-libs/configure and friends test for `strsignal'
|
||||
* fixed initialization bug (missing memset)
|
||||
in gm2/gm2-compiler/Indexing.mod
|
||||
|
||||
2004-05-06 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* added SHIFT and ROTATE into ISO SYSTEM and
|
||||
made the compiler shift and rotate word and multi-word
|
||||
set types. Multi-word set rotate and shifts are implemented
|
||||
by calling ISO SYSTEM runtime procedures. Word sized sets or
|
||||
smaller are implemented inline using shift/rotate instructions.
|
||||
|
||||
2004-05-05 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* fixed bug report by Paul Whittington <pwhittington@nitrodata.com>
|
||||
(see testsuite/gm2/link/pim/fail/import.mod).
|
||||
|
||||
2004-04-30 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* updated gm2.texi to reflect new options and changes to the
|
||||
run-time system.
|
||||
|
||||
2004-04-28 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* introduced -Wunbounded-by-reference option which will make a
|
||||
reference to non VAR unbounded data providing it is not written to
|
||||
within the callee procedure.
|
||||
* introduced -Wverbose-unbounded option which displays names of
|
||||
unbounded parameters which the compiler will implement as
|
||||
references even though they were specified as non VAR parameters.
|
||||
|
||||
2004-04-27 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* introduced -Wcase, -Wnil runtime checks
|
||||
* introduced -Wcheck-all to enable all runtime flags
|
||||
* updated documentation to refect new options
|
||||
|
||||
2004-04-19 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* added more address regression tests
|
||||
* fixed address arithmetic bugs as reported by Waldek Hebisch
|
||||
* fixed record referencing bug as reported by Waldek Hebisch
|
||||
|
||||
2004-04-08 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* tagged CVS using gm2_0_43
|
||||
|
||||
2004-04-07 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* GM2 Release 0.43
|
||||
* The opteron port is finally integrated into CVS
|
||||
* fixed bug in vararg parameter declaration which in turn..
|
||||
* fixed varargs within the opteron port
|
||||
* checked in "work in progress" gm2/gm2-iso/COROUTINES.mod
|
||||
|
||||
2004-04-06 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* removed gm2-compiler/M2Stack.def gm2-compiler/M2Stack.mod
|
||||
* made bnf/h2def.bnf 64 bit clean, but not fixed any bugs in h2def.
|
||||
|
||||
2004-04-05 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* fixed gm2.paranoid and all regression tests for the Opteron port
|
||||
* checked in the opteron port which includes many changes
|
||||
* int/word based types are now separated from pointer based types.
|
||||
* modified p2c to use int for INTEGER and unsigned int for
|
||||
CARDINAL rather than int and unsigned long.
|
||||
* added gm2-compiler/M2StackWord and gm2-compiler/M2StackAddress
|
||||
* added gm2-compiler/Indexing to handle arbitary sized arrays of
|
||||
pointers.
|
||||
* removed many INTEGER/CARDINAL <-> ADDRESS coersions
|
||||
* fixed compiler to use new modules above (many changes)
|
||||
* have moved away from M2Printf using WORD parameters to ARRAY OF
|
||||
BYTE as this was not 64 bit clean
|
||||
* fixed p2c to handle ARRAY OF BYTE correctly
|
||||
* fixed gm2 to handle ARRAY OF BYTE correctly
|
||||
|
||||
2004-04-01 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* fixed record parameter equivalence bug as reported by Waldek
|
||||
(see testsuite/gm2/pim/pass/record4.mod)
|
||||
|
||||
2004-03-26 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* fixed array type equivalence bug as reported by Waldek
|
||||
(see testsuite/gm2/pim/pass/array2.mod)
|
||||
|
||||
2004-03-25 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* Implemented __FUNCTION__ keyword which is translated
|
||||
into a string containing the name of the current visible
|
||||
function.
|
||||
* Retrofitted a function name into many of the runtime
|
||||
procedures within M2RTS and added a new
|
||||
procedure Halt to M2RTS.
|
||||
|
||||
2004-03-18 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* Implemented MIN and MAX for types LONGINT and LONGCARD
|
||||
|
||||
2004-03-17 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* GM2 Release 0.42
|
||||
* MinGW cross compilation port entered into CVS
|
||||
* added -Wtarget-ar to gm2lcc.mod, gm2specs.c lang-specs.h
|
||||
* added gm2/configure and associated files to determine
|
||||
the whereabouts of target `ar'.
|
||||
* added gm2/gm2-libs/configure and associated files to
|
||||
test for target libraries, header files and C functions.
|
||||
Required to implement the gm2-libs.
|
||||
|
||||
2004-02-13 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* GM2 Release 0.41
|
||||
* native sparc port passes make gm2.paranoid and make check-gm2
|
||||
* native i386 port passes make gm2.paranoid and make check-gm2
|
||||
* fixed bug in M2GenGCC.mod, coerced constant set parameter
|
||||
values to correct set type.
|
||||
* fixed bug in M2GenGCC.mod when assigning constant to an ISO WORD
|
||||
|
||||
2004-02-10 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* fixed bug in gccgm2.c CompareTrees should be tested for <= 0
|
||||
when testing for small set sizes.
|
||||
* fixed Make-lang.in so that we only link gm2-compiler-boot/clex.o
|
||||
during stage1. This build error showed up during cross building.
|
||||
|
||||
2004-02-05 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* fixed bug as demonstrated in
|
||||
testsuite/gm2/pim/pass/subrange4.mod
|
||||
* all regression tests now pass on the *86 platform
|
||||
under Debian Woody.
|
||||
|
||||
2004-02-05 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* fixed more constant subrange bugs.
|
||||
* added new quad to delimit the start of declaration
|
||||
scope of a procedure.
|
||||
* regression test failures reduced from 9 to 3.
|
||||
|
||||
2004-01-03 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* fixed bugs in forward and previous references within gm2.texi
|
||||
* fixed more constant set conversion bugs which reduces
|
||||
the number of regression failures from 15 to 9.
|
||||
|
||||
535
gcc/m2/ChangeLog-2005
Normal file
535
gcc/m2/ChangeLog-2005
Normal file
@@ -0,0 +1,535 @@
|
||||
2005-12-29 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* corrections made to gm2/gm2.texi
|
||||
|
||||
2005-12-24 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* joined lines in gm2/tools-src/createUlmSys as
|
||||
requested by Christoph <modula2@myrealbox.com>
|
||||
so that gm2 will build on netbsd 2.1.
|
||||
* added time and tm to gm2/gm2-libs/libc.def.
|
||||
* added partial implementation of
|
||||
gm2/gm2-libs-pim/TimeDate.def
|
||||
gm2/gm2-libs-pim/TimeDate.mod
|
||||
|
||||
2005-12-22 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* added gm2/gm2-libs-pim/Random.def and
|
||||
gm2/gm2-libs-pim/Random.mod and
|
||||
* modified gm2/Make-lang.in to install new module.
|
||||
* remove Random from the TODO list.
|
||||
|
||||
2005-12-21 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* added gm2/gm2-libs-pim/Strings.def and
|
||||
gm2/gm2-libs-pim/Strings.mod
|
||||
* modified gm2/Make-lang.in to install new module.
|
||||
|
||||
2005-12-19 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* implemented logitech compatible library
|
||||
gm2/gm2-libs-pim/RealConversions.def and
|
||||
gm2/gm2-libs-pim/RealConversions.mod
|
||||
* added regression test for RealConversions
|
||||
testsuite/gm2/pimlib/logitech/run/pass/realconv.mod
|
||||
* fixed regression test expect script to set the
|
||||
library path correctly.
|
||||
* updated gm2/gm2-libs.texi to reflect addition of
|
||||
RealConversions.mods
|
||||
* added gm2/gm2-libs-pim/FloatingUtilities.def
|
||||
* added gm2/gm2-libs-pim/FloatingUtilities.mod
|
||||
* increased number of builtin functions accessible to GNU Modula-2.
|
||||
|
||||
2005-12-13 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* gm2/gccgm2.c:default_conversion now checks the base type.
|
||||
* gm2/gm2-compiler/M2GCCDeclare.mod: add Subrange types onto the
|
||||
to do list, if they are not yet resolved.
|
||||
|
||||
2005-12-10 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* fixed Copyright in gm2/gm2-libs-pim library modules
|
||||
* gm2/gm2-compiler/M2Quads.mod:BuildForToByDo allowed Z type by value.
|
||||
* gm2/gm2-compiler/M2Quads.mod:BuildPseudoBy converted by value if type
|
||||
is known.
|
||||
* fixes a bug reported by: James V. Cox example given in
|
||||
testsuite/gm2/pim/run/pass/EnumTest.mod
|
||||
|
||||
2005-12-10 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* fixed Copyright in gm2/gm2-libs-pim library modules
|
||||
|
||||
2005-12-06 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* fixed Copyright in University of Ulm modules and also p2c.
|
||||
* heavily tidied up the p2c source tree.
|
||||
|
||||
2005-12-05 Peter P. Eiserloh <peter@eiserloh.org>
|
||||
|
||||
* contributed the gm2 manual page and associated Makefile
|
||||
in the new subdirectory: gm2/man.
|
||||
|
||||
2005-11-29 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* fixed bug reported by John Wallace and Juan Reyes
|
||||
concerning FOR loops with negative step values.
|
||||
* added new runtime regression tests gm2/pim/run/pass/For[78].mod
|
||||
to test these new changes.
|
||||
* changes to gm2/gm2-compiler/M2Base.mod, gm2-compiler/M2Code.mod,
|
||||
gm2/gm2-compiler/M2GenGCC.mod, gm2/gm2-compiler/M2Quads.mod
|
||||
to ensure that the Negate operator works on large data types
|
||||
LONGCARD contants are changed into LONGINT and overflow is
|
||||
checked.
|
||||
|
||||
2005-11-22 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* modified ppg to take an extra parameter -f which emits the
|
||||
Free Documentation License header when producing texinfo
|
||||
ebnf rules.
|
||||
* fixed many dates on source files.
|
||||
|
||||
2005-11-21 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* fixed many Copyright dates and GPL, LGPL and FDL license
|
||||
issues.
|
||||
* replaced gm2/ulm-lib-gm2/std/Storage.mod with an implementation
|
||||
which uses malloc and free. This in turn fixes a runtime regression
|
||||
test (hello world) now works with the Ulm libraries.
|
||||
* fixed gm2/gm2.texi to include FDL notice and also fixed all
|
||||
included texi files in the same way.
|
||||
* added GPL, Modula-2 and Copyright notices to all gm2/tools-src
|
||||
files.
|
||||
|
||||
2005-11-15 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* added more regression tests and
|
||||
* completed the printing of set types within gdb
|
||||
* completed the printing of array and subrange types within gdb
|
||||
* made gdb print Modula-2 style CHARs and improved type printing
|
||||
within gdb.
|
||||
* rationalised the gdb and gcc patches within the gm2/patch
|
||||
subdirectories.
|
||||
* modified gm2-harness-0.6 to apply patches in order.
|
||||
* minor fixes to gm2/gccgm2.c to give better type information.
|
||||
* improved gdb section within gm2/gm2.texi
|
||||
|
||||
2005-11-11 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* fixed minor node bugs in gm2/gm2.texi, gm2/gpl.texi, gm2/gnu.texi
|
||||
|
||||
2005-11-10 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* added gm2/COPYING.LGPL
|
||||
* changed all references of the old FSF address to the new address.
|
||||
* fixed bugs reported by John Wallace (MAX(INTEGER), MAX(LONGINT),
|
||||
MIN(INTEGER) and MIN(LONGINT)) were not correctly converted in
|
||||
gm2/gm2-libs-pim/InOut.mod, gm2/gm2-libs/FpuIO.mod,
|
||||
gm2/gm2-libs/NumberIO.mod.
|
||||
* added new regression tests in
|
||||
gm2/switches/pim4/run/pass/InOutBug.mod and
|
||||
gm2/switches/pim4/run/pass/FpuIOBug.mod which perform regression
|
||||
runtime tests.
|
||||
|
||||
2005-11-07 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* added gm2/COPYING and included licence information
|
||||
inside gm2/gm2.texi
|
||||
* added gm2/gnu.texi and gm2/gpl.texi and referenced
|
||||
them from gm2/gm2.texi
|
||||
|
||||
2005-11-06 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* improved the gdb patches
|
||||
|
||||
2005-11-03 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* fixes to set types and subranges which in turn
|
||||
when applied with the patches made to ../../gcc/dwarf2out.c
|
||||
and also gdb/gdb/dwarf2read.c allow subranges and
|
||||
set types to be debugged when using the dwarf2 format.
|
||||
* included the patches to gcc-3.3.6 and gdb-6.3 under the
|
||||
new directory gm2/patches
|
||||
* fixed patch for gdb-6.3
|
||||
* updated gm2/gm2.texi
|
||||
* released gm2-harness-0.6 which will automatically patch
|
||||
gcc-3.3.6 and gdb-6.3, build and install these components.
|
||||
* fixed warnings from within the gcc patch
|
||||
|
||||
2005-10-14 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* fixed set type debugging information.
|
||||
Many changes to gm2/gccgm2.c and
|
||||
minor changes to gm2/gm2-compiler/M2GenGCC.mod.
|
||||
Debugging set types with gdb now works if -gstabs
|
||||
are used on the command line of gm2 and also the
|
||||
modified gdb-6.3 is used.
|
||||
|
||||
2005-10-13 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* fixed call to ranlib in gm2/gm2-compiler/gm2lcc.mod
|
||||
|
||||
2005-10-10 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* introduced an invocation to ranlib after producing the
|
||||
archive to fix a linking bug on MacOS OS 10.3.9 reported
|
||||
by: Thomas Ahn <TAhnMaple@gmx.de>.
|
||||
* propagated ranlib though the various subcomponents of
|
||||
gm2: gm2/gm2spec.c gm2/lang-specs.h gm2/Make-lang.in
|
||||
gm2/gm2-compiler/gm2lcc.mod gm2/gm2-compiler/M2Options.mod
|
||||
|
||||
2005-10-07 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* replaced MathLib.mod onto the list of ULM modules
|
||||
which prior to installation.
|
||||
* fixed ggc bug so that types are remembered and marked.
|
||||
These types are declared in M2GCCDeclare.mod before
|
||||
code generation takes place and do not experience the
|
||||
`push_decl' function.
|
||||
|
||||
2005-10-03 Michael H Lambert <lambert@psc.edu>
|
||||
|
||||
* removed $(LIBS) from the dependancies of cc1gm2 in
|
||||
stage1, stage2 and stage3.
|
||||
|
||||
2005-09-30 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* fixed bug in gm2/gm2-libs/FpuIO.mod so that the sign is
|
||||
not prepended to the string if the number is positive.
|
||||
* fixed gm2/gm2-libs-pim/Break.c to use HAVE_STDLIB_H and
|
||||
HAVE_MALLOC_H as detected by the configure script.
|
||||
* removed ulm-lib-gm2/std/MathLib.mod from the build
|
||||
process as a temporary work around to get gm2 working
|
||||
under opendarwin.
|
||||
|
||||
2005-09-27 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* finally fixed _toupper porting problem in p2c as reported
|
||||
by Thomas Ahn <TAhnMaple@gmx.de>, Ed Smith-Rowland
|
||||
<3dw4rd@verizon.net>, John o goyo <jgoyo@ca.inter.net>,
|
||||
Eduardo Abela <eabela@mac.com>, John Calley
|
||||
<calleys@iquest.net> and many others.
|
||||
* finally fixed the linking problem when building under
|
||||
opendarwin. I suspect this will fix the same problems
|
||||
under MacOS.
|
||||
|
||||
2005-09-16 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* implemented -Wpositive-mod-floor-div option
|
||||
* updated gm2/gm2.texi and added many switch testing
|
||||
regression tests.
|
||||
|
||||
2005-09-13 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* implemented REM
|
||||
* implemented MOD, DIV, / as per ISO, PIM2, PIM3, PIM4
|
||||
* updated gm2/gm2.texi documentation to reflect the rules
|
||||
|
||||
2005-09-12 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* fixed bug reported by John B. Wallace, Jr <wallacjb@enter.net>
|
||||
testsuite/gm2/pim/options/bounds/fail/IdentifierBug.mod
|
||||
* fixed bug reported by John B. Wallace, Jr <wallacjb@enter.net>
|
||||
testsuite/gm2/testsuite/gm2/pim/pass/ABSBug.mod
|
||||
* fixed bug reported by John B. Wallace, Jr <wallacjb@enter.net>
|
||||
testsuite/gm2/pim/run/pass/FpuIOBug.mod
|
||||
|
||||
2005-09-06 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* fixed bug reported by John B. Wallace, Jr <wallacjb@enter.net>
|
||||
gm2-libs/StringConvert.mod incorrect assumption of negative valued
|
||||
modulus operator.
|
||||
* added testsuite/gm2/pimlib/{logitech, ulm} with tests to check
|
||||
that programs can be linked against logitech and the ulm libraries.
|
||||
* added testsuite/gm2/pim/run/pass/modulus.mod which tests for
|
||||
various division and modulus cases.
|
||||
|
||||
2005-09-01 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* implemented -Wdef=extension and -Wmod=extension switches
|
||||
into GNU Modula-2 compiler and subcomponents (gm2l and gm2m).
|
||||
* documented the new switches in gm2/gm2.texi
|
||||
|
||||
2005-08-09 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* fixed nested WITH statement bug and added
|
||||
* testsuite/gm2/pim/run/pass/nestedwith.mod to regressively
|
||||
check the fix.
|
||||
|
||||
2005-08-08 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* fixed many bugs in gm2/gm2-libs-coroutines/SysVec.mod
|
||||
* minor updates to gm2/gm2-libs-coroutines/TimerHandler.mod
|
||||
|
||||
2005-07-26 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* modified debian directory so that 0.49 can be built as
|
||||
a debian package
|
||||
|
||||
2005-07-25 Michel Derosa <derosa@videotron.ca>
|
||||
|
||||
* fixed malloc.h include for BSD based systems in
|
||||
gm2/gm2-libs-pim/Break.c
|
||||
|
||||
2005-07-21 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* moved gm2/examples/executive/Executive, TimerHandler, Debug,
|
||||
SysVec to gm2/gm2-libs-coroutines and
|
||||
* made gm2/Make-lang.in install these modules
|
||||
* removed the -Wulm option and replaced it with -Wlibs=ulm
|
||||
* added -Wlibs=logitech, -Wlibs=pim, -Wlibs=iso,
|
||||
-Wlibs=pim-coroutine
|
||||
* altered gm2/Make-lang.in so that the correct library modules
|
||||
are placed into the correct directories during install.
|
||||
|
||||
2005-07-20 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* fixed bug exposed by: testsuite/gm2/pim/pass/maxlongint.mod
|
||||
* modified IsMathType in gm2/gm2-compiler/M2Base.mod accordingly.
|
||||
|
||||
2005-07-18 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* updated gm2/gm2.texi and gm2/gm2-libs.texi
|
||||
* introduced modules Delay, ErrorCode, DebugTrace
|
||||
and Break into gm2/gm2-libs-pim
|
||||
* modified gm2/Make-file.in so that these modules
|
||||
are built and installed.
|
||||
|
||||
2005-07-14 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* GM2 Release 0.49
|
||||
* tagged CVS using gm2_0_49
|
||||
|
||||
* introduced SHORTCARD into p2c
|
||||
* added gm2/gm2-libs-pim/CardinalIO.def and
|
||||
gm2/gm2-libs-pim/CardinalIO.mod
|
||||
* added a number of procedures to implement CardinalIO.mod
|
||||
in gm2/gm2-libs/StringConvert.mod
|
||||
* improved gm2/gm2.texi
|
||||
* modified gm2/Make-file.in so that the library modules
|
||||
in gm2/gm2-libs-pim are also built and installed
|
||||
|
||||
2005-07-10 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* constant literal string array assignment of smaller sizes to
|
||||
array variables and parameters.
|
||||
|
||||
2005-07-09 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* implemented MAX(ADDRESS) and MIN(ADDRESS)
|
||||
|
||||
2005-07-08 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* finally all ulm modules compile under GM2
|
||||
* fixed negative integer bug which was exposed in the 32 bit port
|
||||
of gm2 when compiling testsuite/gm2/pim/pass/setoverflow.mod
|
||||
and also gm2/ulm-lib-gm2/std/TimeIO.mod
|
||||
|
||||
2005-07-06 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* fixed a number of bugs relating to gm2 failuring to compile
|
||||
gm2/ulm-lib-gm2/std/TimeIO.mod. Nested modules within
|
||||
procedures exporting variables.
|
||||
* alterations include correct type declaration ahead of
|
||||
variable creation.
|
||||
* creating all variables in the outer most procedure scope
|
||||
if these variables are exported from inner modules.
|
||||
* also fixed gm2/gccgm2.c so that pointer to sets are cast
|
||||
into a generic ptr
|
||||
* also fixed offset into sets (which had assumed sets started
|
||||
with an element value zero).
|
||||
|
||||
2005-06-22 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* fixed bug reported by John O Goyo <jgoyo@ca.inter.net>
|
||||
multiple indexed arrays were internally defined incorrectly
|
||||
and did not allow users to mix array indices by a[x,y,z] and
|
||||
a[x][y,z] etc as per PIM and ISO specification.
|
||||
see testsuite/gm2/pim/pass/index.mod and
|
||||
testsuite/gm2/pim/pass/index2.mod and
|
||||
testsuite/gm2/pim/run/pass/index3.mod
|
||||
|
||||
2005-06-20 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* added code to treat LOC as a system type in parameter
|
||||
passing.
|
||||
|
||||
2005-06-17 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* fixed bug reported by John O Goyo <jgoyo@ca.inter.net>
|
||||
CAST of different sized variables would fail.
|
||||
* added new switch -Wpedantic-cast which warns if a cast
|
||||
is converting a variable of a different size to the type.
|
||||
|
||||
2005-06-08 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* fixed bug which occurred if a constant set was created
|
||||
in a procedure through the CONST construct.
|
||||
* fixed a number of -Wextended-opaque issues in gm2/bnf/m2-h.bnf
|
||||
* modified gm2/Make-lang.in to use -Wextended-opaque (for testing)
|
||||
|
||||
2005-06-07 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* fixed bug which occurred if an enumerated type field
|
||||
was imported by another module.
|
||||
(See testsuite/gm2/pim/pass/set10.mod)
|
||||
* fixed circular dependancy bug in record generation.
|
||||
|
||||
2005-06-03 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* reverted some of the changes made to the ulm libraries
|
||||
in the light of fixing arrays with huge indices.
|
||||
* mofified gm2/bnf/m2-h.bnf so that expressions within
|
||||
statement sequences are ignored.
|
||||
|
||||
2005-06-02 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* gm2/gccgm2.c fixed BuildArrayIndexType so that gm2 can build
|
||||
arrays which have huge indices. This removes a failure from
|
||||
the regression tests on systems which have a 32 bit long.
|
||||
|
||||
2005-06-01 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* gm2/Make-file.in altered grep -e to aid portability under
|
||||
Solaris (as reported by john o goyo <jgoyo@ca.inter.net>).
|
||||
* gm2/examples/server added example of a threaded server
|
||||
which uses the executive, transfer and iotransfer.
|
||||
* gm2/examples/executive/Executive added KillProcess.
|
||||
* gm2/gm2-libs-coroutines/SysVec.mod fixed vector selection
|
||||
bug.
|
||||
|
||||
2005-05-27 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* gm2/gccgm2.c fixed to detect array indices which exceed
|
||||
sizetype.
|
||||
* gm2/lang-specs.h fixed to propagate the -Wcpp flags though
|
||||
to gm2 subcomponents.
|
||||
|
||||
2005-05-25 Michel Derosa <derosa@videotron.ca>
|
||||
|
||||
* applied patches to gm2/gm2.texi which describe FreeBSD
|
||||
build instructions.
|
||||
|
||||
2005-05-19 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* rebuilt gm2/gm2-libs/configure
|
||||
* gm2/gm2.texi added section heading for advice on building
|
||||
GNU Modula-2 under FreeBSD 5.3
|
||||
|
||||
2005-05-19 Michel Derosa <derosa@videotron.ca>
|
||||
|
||||
* applied patches to make gm2 build on FreeBSD 5.3
|
||||
* gm2/gm2-libs/configure.in test for signal.h and direct.h
|
||||
* gm2/gm2-libs/gm2-libs-host.h.in test for signal.h and direct.h
|
||||
* gm2/tools-src/createUlmSys test for signal.h and direct.h
|
||||
|
||||
2005-05-18 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* testsuite/gm2/types/run/pass/varient5.mod introduced to stress
|
||||
variant records (equivalent to a C union for casting BYTES
|
||||
into a CARDINAL). Based on an idea from Michel Derosa.
|
||||
|
||||
2005-05-17 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* gm2/gm2-compiler/M2Quads.mod modified to accept zero length strings
|
||||
as compatible with type CHAR.
|
||||
* gm2/gm2-compiler/M2GenGCC.mod many modifications/refactoring to enable
|
||||
strings of 1 or 0 characters to be type compatible with CHAR.
|
||||
* these fixes allow Iztok's ISO library to compile cleanly.
|
||||
|
||||
2005-05-16 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* gm2/gm2-compiler/M2GenGCC.mod fixed to allow HIGH(ch) where ch is
|
||||
of type CHAR.
|
||||
* gm2/gm2-compiler/M2GenGCC.mod fixed to allow comparison of literals
|
||||
against subrange types.
|
||||
* gm2/gm2-compiler/M2GenGCC.mod fixed to allow automatic conversion
|
||||
of strings of 1 or 0 characters to be passed to a parameter of
|
||||
type CHAR.
|
||||
* these fixes allow more of the third party tests (from Iztok)
|
||||
to pass.
|
||||
|
||||
2005-05-13 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* gm2/Make-lang.in shell invocation to use $(SHELL) and also
|
||||
converted bashisms into pure sh as suggested by
|
||||
Michel Derosa <derosa@videotron.ca>
|
||||
|
||||
2005-05-12 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* gm2/gm2-compiler/SymbolTable.mod and gm2/gm2-compiler/P2SymBuild.mod
|
||||
modified to detect double declaration on import and produce useful
|
||||
error messages.
|
||||
* gm2/Make-lang.in fixes to the gm2.install rule.
|
||||
* gm2/gm2-compiler/M2Quads.mod fixed BuildStaticArray to calculate
|
||||
indices using INTEGER data type.
|
||||
|
||||
2005-05-11 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* P2SymBuild.mod added call to CheckForEnumerationInCurrentModule
|
||||
to fix 5 regression tests and allow enumeration types to be
|
||||
visible when aliased via TYPEs and later IMPORTed.
|
||||
(see testsuite/gm2/pim/pass/impf.mod)
|
||||
|
||||
2005-05-10 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* major changes which now allow GM2 to compile nested varient records
|
||||
(such as found in gm2/ulm-lib-gm2/std/RTErrors.def)
|
||||
* added runtime regression test in testsuite/types/run/pass
|
||||
* gm2/Make-lang.in modified to include RTErrors.mod to be built with
|
||||
the ulm libraries. Grammer files are built without the -l option to pge.
|
||||
* gm2/gccgm2.c new functions gccgm2_BuildOffset1 determinePenultimateField
|
||||
which implement modifications to record/varient field calculation.
|
||||
* gm2/gm2.texi contains gm2 internal documentation on how the front end
|
||||
symbol table represents records, field and varient records.
|
||||
* gm2/bnf/m2-2.bnf removed commented out code.
|
||||
* gm2/examples/map/Makefile builds the utility semantic.
|
||||
* gm2/gm2-compiler/M2Base.mod modifications to reflect change in PutFieldRecord
|
||||
* gm2/gm2-compiler/M2GCCDeclare.mod added debugging procedures PrintVerbose
|
||||
and PrintSymbol, which can be called interactively from gdb. Also fixed
|
||||
varient record declaration.
|
||||
* gm2/gm2-compiler/M2GenGCC.mod fixed varient record field calculation.
|
||||
* gm2/gm2-compiler/M2Quads.mod changed operands to OffsetOp.
|
||||
* gm2/gm2-compiler/M2SubExp.mod changes to reflect OffsetOp change.
|
||||
* gm2/gm2-compiler/P2SymBuild.mod changed to allow nested varient records.
|
||||
* gm2/gm2-compiler/SymbolTable.[def, mod] changes to varient record
|
||||
representation. Fixed memory leak.
|
||||
* gm2/gm2-compiler/gccgm2.def changed BuildOffset and added BuildOffset1
|
||||
* gm2/ulm-lib-gm2/std/RTErrors.def changed parameter name to match
|
||||
implementation module.
|
||||
* gm2/ulm-lib-gm2/std/RTErrors.mod fixed pointer/integer constant type clash.
|
||||
|
||||
2005-04-11 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* fixed examples/executive
|
||||
|
||||
2005-03-24 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* included the keyword MODULE as an stop set element
|
||||
in gm2m and gm2l.
|
||||
|
||||
2005-03-15 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* GM2 Release 0.44
|
||||
* tagged CVS using gm2_0_44
|
||||
|
||||
2005-03-14 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* finished tools-src/createUlmSys which builds a SYSTEM.c
|
||||
(from ./configure results) ULM library compatible interface.
|
||||
* modified Make-lang.in to install the ULM libraries.
|
||||
* added new switch -Wulm which modifies the default search
|
||||
path so that the ULM libraries are included.
|
||||
|
||||
2005-01-05 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* fixed bug reported by john o goyo <jgoyo@ca.inter.net>.
|
||||
(testsuite/gm2/pim/run/pass/Countdown.mod)
|
||||
* for loops are now implemented as per ISO description.
|
||||
GNU Modula-2 now calculates the last iteration value
|
||||
before the start of a loop. It then initializes the
|
||||
iteration value and works towards the final value,
|
||||
rather than testing to see whether the iteration value
|
||||
exceeds or preceeds the limit value (this fails when using
|
||||
a CARDINAL iterator and stopping at 0).
|
||||
* added a number of run tests to exercise these changes.
|
||||
|
||||
388
gcc/m2/ChangeLog-2006
Normal file
388
gcc/m2/ChangeLog-2006
Normal file
@@ -0,0 +1,388 @@
|
||||
2006-12-25 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/Make-file.in: fixed conditional building of library files.
|
||||
Bug reported by Michael Lambert <lambert@psc.edu>.
|
||||
|
||||
2006-12-21 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/Make-lang.in: fixed manual page installation.
|
||||
* gm2/lang-options.h: include -Wlibs=min option.
|
||||
* gm2/gm2-libs-min/libc.c: added parameters to functions.
|
||||
* gm2/gm2-libs-min/libc.def: added.
|
||||
|
||||
2006-12-20 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/gm2-libs-min: added
|
||||
* gm2/gm2spec.c: modified to relect introduction of -Wlibs=min
|
||||
* gm2/gm2.texi: document -Wlibs=min
|
||||
* gm2/config-lang.in: include gm2cc to be installed
|
||||
* GNU Modula-2 can be built as a cross compiler for the avr
|
||||
microprocessor.
|
||||
|
||||
2006-12-18 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/www/index.ms: updated web page to reflect G5 successful
|
||||
make gm2.paranoid using gcc-3.3.6 and CVS
|
||||
tag D2006.06.23.04.00.00
|
||||
* gm2/gccgm2.c: use integer_type_node instead of boolean_type_node
|
||||
as the size of boolean_type_node can differ from the
|
||||
size of an integer_type_node.
|
||||
* make gm2.paranoid works on LP64 opteron with a patched gcc-4.1.0
|
||||
|
||||
2006-12-17 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* fixed line number debugging information at the end of a
|
||||
function.
|
||||
|
||||
2006-12-05 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/gm2-compiler/M2Quads.mod: BuildCastFunction allow arrays
|
||||
to be cast.
|
||||
* testsuite/gm2/iso/stringchar.mod: fixed typos.
|
||||
* gm2/gm2-compiler/M2Quads.mod: BuildDynamicArray,
|
||||
BuildStaticArray, BuildDesignatorArray all SkipType to allow
|
||||
type equivalence between arrays.
|
||||
|
||||
2006-11-02 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/lang-specs.h: use gm2cc rather than the gcc driver.
|
||||
* gm2/gm2-compiler/gm2lcc.mod: also use gm2cc rather
|
||||
than gcc.
|
||||
* gm2/gm2-compiler/gm2lcc.mod: corrected extern
|
||||
declaration of exit.
|
||||
* gm2/Make-lang.in: generate gm2cc from xgcc and install
|
||||
it correcly.
|
||||
* testsuite/gm2/pim/options/optimize/run/pass/gm2.exp: fixed
|
||||
library module build.
|
||||
|
||||
2006-10-20 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/gccgm2.c: fixed building of constants strings.
|
||||
Constants are also placed into the global scope so
|
||||
that they are not garbage collected.
|
||||
* gm2/M2GenGCC.mod: CodeXIndr handle special case of
|
||||
null string.
|
||||
* gm2/Make-lang.in: add automatically generated modules
|
||||
to the verify12 rule.
|
||||
* added a string assignment regression test.
|
||||
|
||||
2006-10-19 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* www/index.ms: updated gm2-harness release to 0.96.
|
||||
* gm2/gm2-compiler/SymbolConversion.mod: Poison must
|
||||
not check for gcc poisoning as it is called after a
|
||||
function has been emitted and potentially poisoned.
|
||||
|
||||
2006-10-18 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/gm2-config.in: added.
|
||||
* gm2/Make-lang.in: include gm2/gm2-config.
|
||||
* gm2/configure.in: generate gm2/gm2-config.
|
||||
* backed out above changes
|
||||
|
||||
2006-10-17 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/aclocal.m4: added.
|
||||
* gm2/configure: rebuilt.
|
||||
|
||||
2006-10-14 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/Make-lang.in: minor fixes to build manual pages.
|
||||
|
||||
2006-10-13 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/gccgm2.c: call gimplify_function on all
|
||||
functions.
|
||||
* gm2/Make-lang.in: added ability to optionally build
|
||||
the ulm libraries which matches gm2-harness-0.94.
|
||||
|
||||
2006-10-12 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/patches/gcc/4.1.1/01.gaius_patch_gcc: added.
|
||||
|
||||
2006-10-07 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/gccgm.2c: fixed conditional goto expressions.
|
||||
|
||||
2006-10-04 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/gccgm.2c: added debugging stub.
|
||||
|
||||
2006-10-03 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/gm2-compiler/M2GenGCC.mod: fixed BuildEnd
|
||||
to use IsProcedureGccNested in CodeKillLocalVar.
|
||||
* gm2/gm2-compiler/M2GCCDeclare.def:
|
||||
export IsProcedureGccNested.
|
||||
|
||||
2006-10-01 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/gm2-compiler/M2GenGCC.mod: modified BuildEnd
|
||||
to taken an extra parameter, nested, and set it
|
||||
accordingly.
|
||||
|
||||
2006-09-30 Waldek Hebisch <hebisch@math.uni.wroc.pl>
|
||||
|
||||
* gm2/gccgm2.c: (gccgm2_BuildEndFunctionCode) only
|
||||
call gimplify_function_tree and cgraph_finalize_function
|
||||
if the procedure is not nested.
|
||||
|
||||
2006-09-29 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* removed execute permissions for source files.
|
||||
* gm2/patches/gcc/4.1.0/01.gaius_patch_gcc: improved.
|
||||
* gm2/gccgm2.c: fixed comment.
|
||||
|
||||
2006-09-20 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/patches/4.1.0/01.gaius_patch_gcc: added.
|
||||
|
||||
2006-09-19 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* huge amount of changes to bring gm2 up to gcc-4.1.0 and
|
||||
also make it build with gcc-4.1.0.
|
||||
* modified gm2/
|
||||
Make-lang.in config-lang.in configure.in gccgm2.c
|
||||
gm2-common.h gm2-lang.c gm2-lang.h gm2-tree.h gm2.texi
|
||||
gm2builtins.c gm2spec.c lang-specs.h bnf/m2-3.bnf
|
||||
examples/server/sckt.c examples/server/sckt.def
|
||||
gm2-compiler/M2Comp.mod gm2-compiler/M2GCCDeclare.mod
|
||||
gm2-compiler/M2GenGCC.mod gm2-compiler/M2Options.def
|
||||
gm2-compiler/M2Options.mod gm2-compiler/M2Preprocess.mod
|
||||
gm2-compiler/gccgm2.def gm2-compiler/gm2.mod
|
||||
gm2-compiler/gm2lgen.mod gm2-libs/ASCII.def gm2-libs/ASCII.mod
|
||||
gm2-libs/Args.def gm2-libs/Debug.def gm2-libs/IO.mod
|
||||
gm2-libs/SYSTEM.mod gm2-libs/StdIO.mod gm2-libs/StrLib.mod
|
||||
gm2-libs/StringConvert.def gm2-libs/libc.def
|
||||
gm2-libs-coroutines/KeyBoardLEDs.c
|
||||
gm2-libs-coroutines/Makefile gm2-libs-coroutines/SysVec.mod
|
||||
gm2-libs-coroutines/TimerHandler.mod p2c/p2c.h
|
||||
p2c/p2c-src/src/makeproto.c p2c/p2c-src/src/p2c-config.h
|
||||
p2c/p2c-src/src/p2clib.c tools-src/mklink.c www/index.ms
|
||||
* added files:
|
||||
gm2/gm2-common.c gm2/gm2-tree.def gm2/lang.opt
|
||||
|
||||
2006-08-31 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/gm2-libs/ASCII.def: changed EOL to equal to nl rather
|
||||
than cr.
|
||||
|
||||
2006-08-10 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* fixed ASM statement.
|
||||
* gm2/bnf/m2-3.bnf: fixed Pass3 and Pass2 const
|
||||
* gm2/gccgm2.c: modified gccgm2_BuildAsm to use add_stmt
|
||||
rather than expand_asm_expr.
|
||||
|
||||
2006-08-09 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* GM2 Release 0.53
|
||||
* changed release number in configure.in, gm2.texi, Make-lang.in
|
||||
* builds with gcc-4.1.0
|
||||
|
||||
2006-08-08 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* GM2 Release 0.52
|
||||
* tagged CVS using gm2_0_52
|
||||
* gm2/NEWS updated
|
||||
* changed release number in configure.in, gm2.texi, Make-lang.in
|
||||
* rebuilt configure
|
||||
|
||||
2006-08-07 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/www/index.ms: updated to reflect release of gm2-harness-0.9
|
||||
|
||||
2006-06-23 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/www/index.ms: updated to reflect release of gdb-6.5 which
|
||||
contains enhanced Modula-2 language support. It also
|
||||
documents that gm2-harness-0.8 has been released.
|
||||
|
||||
2006-05-22 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/www/index.ms: updated to reflect sparc build success from
|
||||
John O Goyo <jgoyo@ca.inter.net>
|
||||
|
||||
2006-05-04 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* implemented __INLINE__
|
||||
* gm2/gccgm2.c: modified to inline procedures if requested.
|
||||
* gm2/m2.flex: added new keyword __INLINE__
|
||||
* gm2/gm2-compiler/M2Reserved.def
|
||||
* gm2/gm2-compiler/M2Reserved.mod: added new keyword __INLINE__
|
||||
* gm2/gm2-compiler/P1SymBuild.mod: builds inlined procedure
|
||||
* gm2/gm2-compiler/M2GenGCC.mod: passes front end inlined procedure
|
||||
to gccgm2.
|
||||
|
||||
2006-04-24 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* GM2 Release 0.51
|
||||
* tagged CVS using gm2_0_51
|
||||
* gm2/NEWS updated
|
||||
* rebuilt configure
|
||||
* finished implementing declaration of variables at addresses.
|
||||
* modified gm2/bnf/m2-3.bnf, gm2/gm2-compiler/M2Quads,
|
||||
gm2/gm2-compiler/SymbolTable.mod, gm2-compiler/P3SymBuild.mod
|
||||
|
||||
2006-04-22 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* implemented the declaration of a variable at an address.
|
||||
* modified gm2/bnf/m2-3.bnf, gm2/bnf/m2-2.bnf, gm2/gm2-compiler/M2Quads.mod
|
||||
|
||||
2006-04-21 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* added testsuite/gm2/pim/pass/varaddress.mod
|
||||
* modified gm2/bnf/m2.bnf, gm2/bnf/m2-2.bnf, gm2/bnf/m2-3.bnf,
|
||||
gm2/bnf/m2-h.bnf to allow parsing of variables declared at addresses.
|
||||
|
||||
2006-04-19 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* added testsuite/gm2/pim/pass/sets5.mod
|
||||
* fixed bug report by John O Goyo <jgoyo@ca.inter.net>
|
||||
* (testsuite/gm2/pim/pass/sets5.mod and testsuite/gm2/pim/pass/sets4.mod)
|
||||
|
||||
2006-04-19 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* added testsuite/gm2/pim/pass/sets5.mod
|
||||
* fixed bug report by John O Goyo <jgoyo@ca.inter.net>
|
||||
* (testsuite/gm2/pim/pass/sets5.mod and testsuite/gm2/pim/pass/sets4.mod)
|
||||
|
||||
2006-03-25 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* added testsuite/gm2/pim/pass/sets4.mod
|
||||
* gm2/gm2-compiler/P2SymBuild.mod: added more robust error detection
|
||||
* gm2/gm2-compiler/M2GenGCC.mod: added more robust error detection
|
||||
|
||||
2006-03-17 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* added successful build reports to the web page
|
||||
|
||||
2006-02-21 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/gm2.texi: fixed new urls and added missing escaped @
|
||||
* gm2/gm2-libs.texi: rebuilt
|
||||
* gm2/gm2-iso/README.texi: fixed typo
|
||||
|
||||
2006-02-20 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/NEWS updated
|
||||
|
||||
2006-02-13 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* GM2 Release 0.50
|
||||
* tagged CVS using gm2_0_50
|
||||
* gm2/NEWS: added, which contains news of user visible changes.
|
||||
* gm2/Make-lang.in: updated version number
|
||||
* gm2/gm2.texi: updated gm2 release number to 0.50 and gm2-harness number to 0.7
|
||||
and improved install section.
|
||||
* gm2/www: added homepage documents
|
||||
|
||||
2006-02-10 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/ulm-lib-gm2/std/GetPass.mod: modified to work with:
|
||||
* gm2/ulm-lib-gm2/sys/termios.def: new definition module for C
|
||||
* gm2/ulm-lib-gm2/sys/termios.c: portable implmentation module for termios
|
||||
interface
|
||||
* gm2/ulm-lib-gm2/sys/SysTermIO.def: Modula-2 interface to the underlying
|
||||
termios library.
|
||||
* gm2/ulm-lib-gm2/sys/SysTermIO.mod: Modula-2 interface to termios.c.
|
||||
* all regression tests pass on LP64
|
||||
|
||||
2006-02-07 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* fixed copyright notices for all ISO definition modules in
|
||||
gm2/gm2-iso.
|
||||
|
||||
2006-01-23 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* gm2/gm2-compiler/M2Options.mod: allow -p option.
|
||||
* gm2/gm2-compiler/M2Quads.mod: remove call to stress stack during
|
||||
Initialization
|
||||
|
||||
2006-01-17 Michael H Lambert <lambert@psc.edu>
|
||||
|
||||
* testsuite/gm2/iso/pass/realbitscast.mod: modified to detect whether
|
||||
it is being run under alpha and 64 bit architecture.
|
||||
* testsuite/gm2/cpp/pass/subaddr.mod: modified to detect whether
|
||||
it is being run under alpha and 64 bit architecture.
|
||||
|
||||
2006-01-17 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* gm2/gm2-compiler/M2GenGCC.mod: coerse constants passed to parameter
|
||||
of SYSTEM types. Fixes the make gm2.paranoid on ppc architecture.
|
||||
* testsuite/gm2/iso/pass/realbitscast.mod: modified to detect whether
|
||||
it is being run under ia64 architecture.
|
||||
* testsuite/gm2/cpp/pass/subaddr.mod: modified to detect whether
|
||||
it is being run under ia64 architecture.
|
||||
|
||||
2006-01-16 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* gm2/gccgm2.c: altered INCL, EXCL and bit tests so that they subtract the
|
||||
low value of the subrange before performing the bit operation.
|
||||
* testsuite/gm2/pim/run/pass/setcritical.mod to test bugfix.
|
||||
* gm2/gm2-compiler/gm2lcc.mod: added -B option
|
||||
* gm2/lang-specs.h: pass -B option to gm2lcc
|
||||
|
||||
2006-01-10 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* fixed INTEGER, SHORTINT and LONGINT so that they all
|
||||
call upon gccgm2_GetM2<type> rather than their C counterparts.
|
||||
* fixed constant overflow on 32 bit address architectures when
|
||||
compiling arrayhuge.mod and arrayhuge2.mod (as reported by
|
||||
Michael H Lambert <lambert@psc.edu>)
|
||||
* M2Code.mod::Code: call FlushWarnings and FlushErrors after StartDeclareScope
|
||||
which flushes errors before code generation starts. This fixes
|
||||
a timeout bug in the regression tests reported by
|
||||
(John B Wallace Jr <wallacjb@enter.net>).
|
||||
* M2GenGCC.mod::CodeSavePriority: introduced PriorityDebugging and turned
|
||||
off debugging messages
|
||||
* M2GenGCC.mod::CodeRestorePriority: introduced PriorityDebugging and turned
|
||||
off debugging messages
|
||||
* all regression tests now pass on GNU/Linux i386 (Debian Sarge)
|
||||
* gm2/gm2-compiler/M2Quads.mod::LoopAnalysis:fixed bug in while loop
|
||||
* corrected testsuite/gm2/errors/fail/testimport.mod to include a double import.
|
||||
|
||||
2006-01-09 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* fixed LONGINT/LONGCARD bugs so that
|
||||
testsuite/gm2/switches/pim4/run/pass/FpuIOBug.mod now passes.
|
||||
LONGINT and LONGCARD are declared as long long int and
|
||||
long long unsigned int respectively.
|
||||
* updated gm2/gm2.texi to reflect changes in LONGINT and LONGCARD.
|
||||
|
||||
2006-01-08 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* modified examples to utilize the module priority mechanism.
|
||||
|
||||
2006-01-06 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* improved implementation of module priorities so that
|
||||
only externally accessible procedures save and restore
|
||||
interrupts.
|
||||
* added testsuite/gm2/pimlib/coroutines/pass/priority3.mod and
|
||||
testsuite/gm2/pimlib/coroutines/pass/priority3.def to test exporting
|
||||
of procedures which need to save and restore interrupt priorities.
|
||||
|
||||
2006-01-05 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* gm2/Make-lang.in: removed GM2_DIRS from the dependancies of
|
||||
various rules, which in turn removed a number of "build loops"
|
||||
* gm2/config-lang.in: removed reference to gm2/p2c/p2c-src/examples/Makefile
|
||||
|
||||
2006-01-04 Gaius Mulley <gaius@glam.ac.uk>
|
||||
|
||||
* implemented module priorities.
|
||||
* implemented gm2/gm2-libs-pim/TimeDate.mod
|
||||
* added testsuite/gm2/pimlib/coroutines/pass/priority.mod,
|
||||
testsuite/gm2/pimlib/coroutines/pass/priority2.mod and
|
||||
testsuite/gm2/pimlib/logitech/run/pass/timedate.mod
|
||||
* included TimeDate to be installed as part of the pim
|
||||
libraries.
|
||||
|
||||
2006-01-03 Michael H Lambert <lambert@psc.edu>
|
||||
|
||||
* fixed typo in gm2/gm2.texi
|
||||
* added __ppc__ ifdefs into testsuite/gm2/iso/pass/realbitscast.mod
|
||||
so that it ignores the REAL96 test on the G5
|
||||
* added __ppc__ ifdefs into testsuite/gm2/switches/pim4/run/pass/FpuIOBug.mod
|
||||
|
||||
378
gcc/m2/ChangeLog-2007
Normal file
378
gcc/m2/ChangeLog-2007
Normal file
@@ -0,0 +1,378 @@
|
||||
2007-12-10 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/NEWS: updated.
|
||||
* gm2/tools-src/def2texi.py: modified so that references
|
||||
to types, variables and constants are added to the index
|
||||
at the end of the documentation.
|
||||
* gm2-libs-pim/RealInOut.def: all long procedures are also
|
||||
exported.
|
||||
|
||||
2007-12-07 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/NEWS: updated.
|
||||
* gm2/gm2.texi: documented new -fxcode option and minor
|
||||
fixes.
|
||||
* gm2/lang-options.h: added -fxcode to list of options.
|
||||
* gm2/lang.opt: added -fxcode to list of options.
|
||||
* gm2/m2.flex: added m2flex_GetColumnNo.
|
||||
* gm2/gm2-compiler/M2Error.mod: OutString modified to
|
||||
use column and produce GNU and Xcode format errors.
|
||||
* gm2/gm2-compiler/M2LexBuf.def: export column
|
||||
related procedures.
|
||||
* gm2/gm2-compiler/M2LexBuf.mod: introduced recording
|
||||
of the column position. GetColumnNo, TokenToColumnNo
|
||||
new procedures.
|
||||
* gm2/gm2-compiler/M2Options.def: added Xcode.
|
||||
* gm2/gm2-compiler/M2Options.mod: set Xcode accordingly.
|
||||
* gm2/gm2/gm2-compiler/M2Students.mod: fixed spelling
|
||||
mistake.
|
||||
* gm2/gm2-compiler/P1SymBuild.mod: tidied up error
|
||||
message.
|
||||
* gm2/gm2-compiler/SymbolTable.mod: ditto.
|
||||
* gm2/gm2-compiler/m2flex.def: added GetColumnNo
|
||||
procedure.
|
||||
* gm2/gm2-libs-pim/BitBlockOps.mod: intemediate checkin.
|
||||
|
||||
2007-12-06 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/tools-src/gensum.py: new file.
|
||||
|
||||
2007-11-14 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/gm2.texi: corrected urls and last edit.
|
||||
* gm2/gm2-libs.texi: recreated.
|
||||
|
||||
2007-11-10 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/m2.flex: added explicit cast.
|
||||
* gm2/Make-lang.in: now build h2def during stage2.
|
||||
* gm2/gm2/c.flex: modified so that it ignores tabs.
|
||||
* gm2/bnf/h2def.bnf: many bugfixes, still broken though.
|
||||
* gm2/gm2-compiler/CLexBuf.mod: improved Debugging support.
|
||||
* gm2/gm2-compiler/gm2lcc.mod: refactored comment handling
|
||||
code to use the RemoveComment, RemoveWhiteSuffix and
|
||||
RemoveWhitePrefix procedures in DynamicStrings module.
|
||||
* gm2/gm2-compiler/gm2lgen.mod: likewise handle comments.
|
||||
* gm2/gm2-libs/DynamicStrings.def: export
|
||||
RemoveWhitePrefix, RemoveWhitePostfix, RemoveComment.
|
||||
* gm2/gm2-libs/DynamicStrings.mod: implement above.
|
||||
|
||||
2007-11-07 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/Make-lang.in: updated version to 0.63
|
||||
* gm2/gm2.texi: updated version to 0.63 and updated
|
||||
unbounded-by-reference documentation.
|
||||
* gm2/gm2-compiler/M2GenGCC.mod: modified optimization
|
||||
of unbounded addresses to test the memory range of
|
||||
each unbounded parameter against a type compatible
|
||||
var parameter, any overlapping addresses results in
|
||||
a alloca and memcpy of the non var unbounded array.
|
||||
|
||||
2007-11-02 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/gm2-compiler/M2GenGCC.mod: completed the further
|
||||
optimization of unbounded addresses. It checks to
|
||||
see if the contents of a type compatible unbounded
|
||||
ARRAY matches the contents of a VAR parameter.
|
||||
It checks against any VAR parameter (not just
|
||||
unbounded VAR parameters - consider ARRAY OF BYTE).
|
||||
* gm2/gm2.texi: documented the implementation of
|
||||
the -funbounded-by-reference optimization flag
|
||||
giving examples.
|
||||
|
||||
2007-10-30 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/gm2.texi: fixed @xref punctuation requirement.
|
||||
* gm2/gm2-compiler/M2GenGCC.mod: fixed unbounded-by-reference
|
||||
so that it works out whether two parameters might contain
|
||||
the same contents. Further optimization is possible via
|
||||
runtime checking of unbounded addresses.
|
||||
* gm2/gm2-compiler/SymbolTable.mod: factored out some code.
|
||||
|
||||
2007-10-26 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/gm2-libs/sckt.def: moved here from examples/server.
|
||||
* gm2/gm2-libs-ch/sckt.c: moved here from examples/server.
|
||||
* gm2/examples/ncurses/Makefile: changed switches from -W
|
||||
to -f
|
||||
* gm2/gm2-libs-coroutines/Makefile: changed switches from -W
|
||||
to -f
|
||||
* gm2/gm2-libs-coroutines/SysVec.mod: added many Asserts and
|
||||
fixed some bugs relating to microseconds.
|
||||
* gm2/gm2-libs-coroutines/TimerHandler.mod: fixed bug relating
|
||||
to time vector.
|
||||
|
||||
2007-10-25 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/gccgm2.c: CHAR is now declared as an unsigned char.
|
||||
* testsuite/gm2/pimlib/logitech/run/pass/bbits.mod: new file.
|
||||
* testsuite/gm2/pimlib/logitech/run/pass/intb.mod: new file.
|
||||
|
||||
2007-10-23 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/gm2.texi: more building documentation fixes.
|
||||
* gm2/www/index.ms: updated documentation to reflect
|
||||
changes to the gm2.texi building instructions.
|
||||
|
||||
2007-10-22 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/gm2-libs-pim/BitBlockOps.{def,mod}: added.
|
||||
* gm2/Make-lang.in: added BitBlockOps to the Logitech list
|
||||
of modules.
|
||||
* gm2/gm2.texi: improved building documentation which now
|
||||
relates to the daily CVS snapshot held on
|
||||
http://floppsie.comp.glam.ac.uk/download/c
|
||||
|
||||
2007-10-18 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/www/index.ms: rationalised the building instructions
|
||||
between the web page and gm2/gm2.texi
|
||||
* gm2/gm2.texi: updated the building instructions.
|
||||
|
||||
2007-10-14 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/Make-lang.in: fixed bug in gm2/gm2-libs/gm2-libs-host.h
|
||||
target so that configure uses the correct CC and CPP.
|
||||
|
||||
2007-10-09 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/README: updated to reflect new homepage and mailing
|
||||
list address.
|
||||
|
||||
2007-10-07 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* fixed bug reported by Dmitry Shatrov <shatrov@gmail.com>
|
||||
* gm2/gm2-compiler/M2Quads.mod: added CheckNotConstAndVar
|
||||
procedure. BuildAssignment use CheckNotConstAndVar.
|
||||
* gm2/testsuite/gm2/pim/fail/constvar.mod: added new
|
||||
regression test.
|
||||
* gm2/gm2.texi: updated the last update field.
|
||||
|
||||
2007-10-05 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/Make-lang.in: updated version to 0.62
|
||||
* gm2/Make-lang.in: altered all -W options to their new
|
||||
-f counterparts
|
||||
* gm2/README: modified the advised build command
|
||||
* gm2/gccgm2.c: removed all section of code inside #if 0
|
||||
blocks (which were not part of the orig gcc source).
|
||||
* gm2/gccgm2.c: modified OPT_W to OPT_f to reflect change
|
||||
of -W flags to -f flags.
|
||||
* gm2/gccgm2.c: reintroduced the -fcpp handling code.
|
||||
* gm2/gm2.texi: updated version number to 0.62
|
||||
* gm2/gm2.texi: altered all -W options to -f options
|
||||
for code generation options. Left warning options
|
||||
to use -W to mirror the gcc paradigm.
|
||||
* gm2/gm2/gm2builtins.c: memmove introduced.
|
||||
* gm2/gm2spec.c: changed all -W options to -f.
|
||||
* gm2/lang-specs.h: changed all -W options to -f.
|
||||
* gm2/lang.opt: changed all -W options to -f.
|
||||
* gm2/bnf/gm2l.bnf: changed all -W options to -f.
|
||||
* gm2/bnf/gm2m.bnf: changed all -W options to -f.
|
||||
* gm2/gm2-libs-pim/BlockOps.{def,mod}: added to repository.
|
||||
* gm2/examples/map/Makefile: changed all -W options to -f and
|
||||
added -O3.
|
||||
* gm2/gm2/gm2-compiler/M2Options.def: changed comments.
|
||||
* gm2/gm2-compiler/M2Options.mod: changed all -W options to -f.
|
||||
* gm2/gm2-compiler/M2Quads.mod: changed all -W options to -f.
|
||||
* gm2/gm2-compiler/SymbolTable.mod: changed all -W options to -f.
|
||||
* gm2/gm2-compiler/gm2.mod: changed all -W options to -f.
|
||||
* gm2/gm2-compiler/gm2lcc.mod: changed all -W options to -f.
|
||||
* gm2/gm2/gm2-compiler/ppg.mod: modified compile-command.
|
||||
* gm2/gm2-libs/Builtins.def: added memmove to the list of
|
||||
builtins.
|
||||
* gm2/gm2-libs/Builtins.mod: implemented M2 wrapper for memmove.
|
||||
* gm2/gm2-libs/cbuiltin.def: added access to C memmove.
|
||||
* gm2/man/gm2.man: changed all -W options to -f.
|
||||
|
||||
2007-09-27 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/gm2-libs/SYSTEM.mod: added SHIFT, ROTATE and their
|
||||
support counterparts.
|
||||
* gm2/gm2-libs-pim/BitByteOps.{def,mod}: added.
|
||||
* gm2/gm2-libs-pim/BitWordOps.{def,mod}: completed.
|
||||
* gm2/gm2.texi: updated to reflect the addition of SHIFT,
|
||||
ROTATE procedures in PIM SYSTEM.mod.
|
||||
* gm2/gm2/Make-lang.in:
|
||||
* gm2/gm2/README:
|
||||
* gm2/gm2/gccgm2.c:
|
||||
* gm2/gm2/gm2.texi:
|
||||
* gm2/gm2/gm2spec.c:
|
||||
* gm2/gm2/lang-options.h:
|
||||
* gm2/gm2/lang-specs.h:
|
||||
* gm2/gm2/lang.opt:
|
||||
* gm2/gm2/bnf/gm2l.bnf:
|
||||
* gm2/gm2/bnf/gm2m.bnf:
|
||||
* gm2/gm2/gm2-compiler/M2Options.def:
|
||||
* gm2/gm2/gm2-compiler/M2Options.mod:
|
||||
* gm2/gm2/gm2-compiler/M2Quads.mod:
|
||||
* gm2/gm2/gm2-compiler/SymbolTable.mod:
|
||||
* gm2/gm2/gm2-compiler/gm2.mod:
|
||||
* gm2/gm2/gm2-compiler/gm2lcc.mod:
|
||||
* gm2/gm2/gm2-compiler/ppg.mod: all changed to reflect moving
|
||||
-W switches to -f switches as per gcc. Only using -W for
|
||||
compile time warnings, -f for language features including
|
||||
runtime checking.
|
||||
|
||||
2007-09-14 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* www/index.ms: updated web pages to reflect 0.60 release
|
||||
and availability of debian packages.
|
||||
|
||||
2007-08-14 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/patches/gcc/4.1.2/02.gaius_rs6000_lang: new patch to
|
||||
enable gm2 to build on the PS3 (ppc) based machines.
|
||||
|
||||
2007-08-08 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/Make-lang.in: fixes to enable avr cross compile to
|
||||
build (use cross gcc and add -B./ when building libraries).
|
||||
|
||||
2007-07-23 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/gccgm2.c: gccgm2_BuildSubrangeType switched over to using
|
||||
the implementation of the subrange type as opposed to the base
|
||||
INTEGER type.
|
||||
* gm2/gm2-compiler/M2Quads.mod: CheckSubrange converts the
|
||||
Exp into an INTEGER type before generating the range checking
|
||||
quadruples. This in turn allows M2SubExp.mod to be built with
|
||||
optimization. make gm2.paranoid with -O works against gcc-4.1.2.
|
||||
|
||||
2007-07-06 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* added gm2/gm2-harness.
|
||||
* gm2/Make-lang.in: added interactive debugging module
|
||||
gm2/m2pp.o to link targets.
|
||||
* gm2/gccgm2.c: rewritten pushdecl and friends and vastly
|
||||
simplified and reduced the code. Modified all parameters
|
||||
to use ANSI C rather than K&R C. Rewritten create
|
||||
gccgm2_BuildStartFunctionCode and gccgm2_BuildEndFunctionCode.
|
||||
Also ensured that all variables are added to the statement list
|
||||
via DECL_EXPR and ensured that BIND_EXPR and BLOCKs are created
|
||||
in exactly the same way as their C counterparts.
|
||||
Fixed important bug in creating TREEs which represent parameters.
|
||||
* gm2/m2pp.c: new interactive debugging module will print a GCC
|
||||
tree using Modula-2 syntax.
|
||||
* gm2/m2pp.h: prototype for the above.
|
||||
* gm2/gm2-compiler/M2GCCDeclare.mod: unbounded types are now uniquely
|
||||
created from their basic type. Improved debugging of unbounded type.
|
||||
* gm2/gm2-compiler/M2GenGCC.mod: DoCopyString new function which is
|
||||
used by CodeBecomes and CodeXIndr. Simplified CodeIndrX and CodeXIndr
|
||||
in light of bugs fixed in gm2/gccgm2.c.
|
||||
* gm2/gm2-compiler/M2Quads.mod: made the type following more accurate
|
||||
during the construction of array arithmetic and indirection. This
|
||||
in turn allows -O to be used in GCC's backend.
|
||||
* gm2/gm2-compiler/SymbolTable.def: modified interface to unbounded
|
||||
symbols.
|
||||
* gm2/gm2-compiler/SymbolTable.def: implemented above.
|
||||
* GM2 now builds when -O is suppled to stage2 or stage3.
|
||||
* GM2 now builds with (a patched) gcc-4.1.2
|
||||
|
||||
2007-05-28 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2-compiler/M2Quads.mod: replaced PutVarTypeAndSize with
|
||||
PutLeftValueFrontBackType.
|
||||
* gm2-compiler/SymbolTable.mod: implemented
|
||||
PutLeftValueFrontBackType and GetLeftValueFrontBackType.
|
||||
* gm2/gm2-compiler/M2GCCDeclare.mod: rationalised variable
|
||||
creation by introducing function: DoVariableDeclaration.
|
||||
All variables are created via this function.
|
||||
Use GetLeftValueFrontBackType.
|
||||
|
||||
2007-05-18 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/Make-lang.in: removed -O for paranoid
|
||||
|
||||
2007-05-11 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/Make-lang.in: added -O for paranoid
|
||||
* gm2/gccgm2.c:
|
||||
* gm2/gm2-compiler/M2Base.def: removed generic Unbounded type
|
||||
* gm2/gm2-compiler/M2Base.mod: removed generic Unbounded type
|
||||
creation.
|
||||
* gm2/gm2-compiler/M2Code.mod: tidied up comments and semicolon.
|
||||
* gm2/gm2-compiler/M2GCCDeclare.def: export DeclareParameters.
|
||||
* gm2/gm2-compiler/M2GCCDeclare.mod: implement
|
||||
DeclareParameters and new unbounded type mechanism.
|
||||
* gm2/gm2-compiler/M2GenGCC.mod: modified references
|
||||
to unbounded fields. Fixed two major optimization bugs
|
||||
in CodeXIndr and CodeIndrX pointer types
|
||||
now use generic pointer types when building indirect GCC
|
||||
trees.
|
||||
* gm2/gm2-compiler/M2Quads: now create a specific unbounded type
|
||||
rather than cast to a generic unbounded record. Again this fixes
|
||||
bugs in Tree construction which were exposed by the back end
|
||||
when -O was enabled.
|
||||
* gm2/gm2-compiler/SymbolTable.def: declared Unbounded record and
|
||||
field operators.
|
||||
* gm2/gm2-compiler/SymbolTable.mod: implement Unbounded record and
|
||||
field operators.
|
||||
|
||||
2007-04-25 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/gm2-libs: regenerated configure
|
||||
|
||||
2007-02-16 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/bnf/gm2m.bnf: fixed string deallocation bug.
|
||||
* gm2/gm2-libs-pim/FileSystem.{def,mod}: exported Reset
|
||||
and fixed filename and string conversion.
|
||||
|
||||
2007-02-07 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/gm2-compiler/M2GCCDeclare.mod: added FindOuterModule
|
||||
to determine whether a symbol should be declared in the
|
||||
GCC global scope.
|
||||
* fixes ulm library building problem introduced by the previous
|
||||
interim checkin.
|
||||
|
||||
2007-02-06 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* interim checkin, due to optimization fixes.
|
||||
* gm2/gccgm2.c: changes to the way variables are declared.
|
||||
Removed calls to expand_decl.
|
||||
* gm2-compiler/M2GCCDeclare.mod: passes boolean to
|
||||
DeclareKnownVariable indicating whether the variable was
|
||||
declared in the outer global scope.
|
||||
|
||||
2007-01-26 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/gccgm2.c: mark_function_addresses_referenced added.
|
||||
* gm2/gccgm2.c: gccgm2_MarkFunctionReferenced added.
|
||||
* gm2/gccgm2.c: gccgm2_SetFlagUnitAtATime added.
|
||||
* gm2/gm2-compiler/M2Code.mod: MarkExported used.
|
||||
* gm2-compiler/M2GCCDeclare.def: MakeExported defined.
|
||||
* gm2-compiler/M2GCCDeclare.mod: MakeExported added.
|
||||
* gm2/gm2-compiler/gccgm2.def: SetFlagUnitAtATime,
|
||||
MarkFunctionReferenced, defined.
|
||||
|
||||
2007-01-19 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/gm2-libs-pim/FileSystem.mod: added.
|
||||
* gm2/Make-lang.in: introduced GM2_O_S3 variable so that
|
||||
optimization can be introduced into stage3 only.
|
||||
* gm2/gccgm2.c: added gccgm2_FinishBackend.
|
||||
* gm2/gm2-compiler/M2Code.mod: use gccgm2_FinishBackend.
|
||||
|
||||
2007-01-18 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/gccgm2.c: use gm2_mark_addressable rather than
|
||||
the TREE_ADDRESSABLE macro for consistency.
|
||||
|
||||
2007-01-05 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/Make-file.in: added FileSystem.mod to the gm2-libs-pim
|
||||
set of libraries.
|
||||
* gm2/TODO: removed FileSystem.mod from the list
|
||||
* gm2/gm2-compiler/P1SymBuild.mod: added error message
|
||||
* gm2/gm2-libs/FIO.mod: fixed copyright message
|
||||
* gm2/gm2-libs/M2RTS.def: fixed typo.
|
||||
* gm2/gm2-libs/libc.def: added rename function.
|
||||
* gm2/gm2-libs/wrapc.def: modified filesize so that it modifies
|
||||
two unsigned ints as the size, rather than return a long unsigned.
|
||||
* gm2/gm2/gm2-libs-ch/libc.c: added unlink function.
|
||||
* gm2/gm2/gm2-libs-ch/wrapc.c: implemented filesize.
|
||||
* gm2/gm2/gm2-libs-pim/FileSystem.def: improved comments and added
|
||||
more file state to the File record.
|
||||
|
||||
1994
gcc/m2/ChangeLog-2008
Normal file
1994
gcc/m2/ChangeLog-2008
Normal file
File diff suppressed because it is too large
Load Diff
1720
gcc/m2/ChangeLog-2009
Normal file
1720
gcc/m2/ChangeLog-2009
Normal file
File diff suppressed because it is too large
Load Diff
3680
gcc/m2/ChangeLog-2010
Normal file
3680
gcc/m2/ChangeLog-2010
Normal file
File diff suppressed because it is too large
Load Diff
493
gcc/m2/ChangeLog-2011
Normal file
493
gcc/m2/ChangeLog-2011
Normal file
@@ -0,0 +1,493 @@
|
||||
2011-12-01 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/Make-lang.in: added ServerSocket.mod to be compiled and
|
||||
installed in the iso library.
|
||||
* gm2/gm2-libs-iso/ServerSocket.c: added dummy return value so
|
||||
that this incomplete module compiles.
|
||||
|
||||
2011-11-30 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/gm2-compiler/SymbolTable.mod: fixed a poor error message
|
||||
bug reported by <doug@dougtelford.com>. Arrays are now checked
|
||||
for a correct subscript type before M2GCCDeclare is called.
|
||||
|
||||
2011-11-18 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/gm2-compiler/M2Range.mod: removed calls to FlushErrors
|
||||
to allow the compiler to issue many more error messages before
|
||||
exiting.
|
||||
|
||||
2011-11-16 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/gm2-compiler/M2CaseList.def: add TypeCaseBounds to the
|
||||
definition module.
|
||||
* gm2/gm2-compiler/M2CaseList.mod: GetVariantTagType, checkTypes,
|
||||
inRange, TypeCaseBounds (New procedure functions). Check to
|
||||
see that case bounds are of the correct type.
|
||||
* gm2/gm2-compiler/M2MetaError.mod: fix internal error message.
|
||||
* gm2/gm2-compiler/M2Options.def: new boolean VariantValueChecking
|
||||
which is set if -fiso is used. FinaliseOptions new procedure.
|
||||
* gm2/gm2-compiler/M2Quads.mod: reverse PopT(r1) and PopT(r2)
|
||||
to correct range bug.
|
||||
* gm2/gm2-compiler/M2Range.mod: only check missing values
|
||||
in variant record case bounds if VariantValueChecking is enabled.
|
||||
We always check for overlapping bounds.
|
||||
* testsuite/gm2/pim/fail/variant.mod: new file.
|
||||
* testsuite/gm2/pim/fail/variant2.mod: new file.
|
||||
* testsuite/gm2/pim/fail/variant3.mod: new file.
|
||||
|
||||
2011-11-08 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/Make-lang.in: altered bnf rules to depend upon
|
||||
gm2/pge$(exeext).
|
||||
* gm2/bnf/m2-c.bnf: reimplemented Qualident and PushQualident
|
||||
to fix a bug reported by Alexandr Simon:
|
||||
<http://lists.gnu.org/archive/html/gm2/2011-04/msg00002.html>
|
||||
|
||||
2011-11-07 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/gccgm2.c: BuildCall2, BuildCall3 (New functions).
|
||||
* gm2/gm2.texi: document the new command line switch
|
||||
-fdebug-builtins.
|
||||
* gm2/lang.opt: define -fdebug-builtins.
|
||||
* gm2/gm2-compiler/M2Base.mod: InitBuiltins (New procedure).
|
||||
* gm2/gm2-compiler/M2Batch.def: Tidied up spacing.
|
||||
* gm2/gm2-compiler/M2GenGCC.mod: implemented MaybeDebugBuiltinAlloca,
|
||||
MaybeDebugBuiltinMemcpy and call then instead of BuiltinAlloca,
|
||||
BuiltinMemcpy. Modified CanUseBuiltin to return FALSE if
|
||||
DebugBuiltins is TRUE.
|
||||
* gm2/gm2-compiler/M2Options.def: DebugBuiltins new boolean flag.
|
||||
* gm2/gm2-compiler/M2Options.mod: set DebugBuiltins if -fdebug-builtins
|
||||
is present.
|
||||
* gm2/gm2-compiler/gccgm2.def: define BuildCall2, BuildCall3.
|
||||
* gm2/gm2-libs/Builtins.def: alloca_trace (New procedure function).
|
||||
* gm2/gm2-libs/Builtins.mod: tidied up comment and implemented
|
||||
alloca_trace.
|
||||
* gm2/gm2-compiler/M2GenGCC.mod: fixed GetSizeOfHighFromUnbounded
|
||||
bug reported by John O Goyo
|
||||
<http://lists.gnu.org/archive/html/gm2/2011-11/msg00004.html>
|
||||
and Martin KalbfuÃ
|
||||
<http://lists.gnu.org/archive/html/gm2/2011-10/msg00023.html>.
|
||||
|
||||
2011-10-29 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/gccgm2.c: gccgm2_BuildAddr call gm2_mark_addressable.
|
||||
* gm2/gccgm2.c: gccgm2_BuildComponentRef, convertToSizeT
|
||||
(New functions).
|
||||
* gm2/gm2builtins.c: gm2builtins_BuiltInAlloca call convertToSizeT.
|
||||
* gm2/gm2-compiler/M2GenGCC.mod: use gccgm2_BuildComponentRef
|
||||
to access high and address fields within unbounded records.
|
||||
This fixes a bug reported by Scott Iverson which has been
|
||||
expressed as testsuite/gm2/pim/run/pass/passparam.mod and
|
||||
testsuite/gm2/pim/run/pass/passparam2.mod. Manifested
|
||||
itself when attempting to take the address of a parameter.
|
||||
This does not work with -O2 as parameters are passed in
|
||||
registers on some architectures (x86_64). These changes
|
||||
introduce no new regression test failures.
|
||||
|
||||
2011-10-26 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/Make-lang.in: added LMathLib0.def LegacyReal.def
|
||||
MemUtils.def to the list of GM2-LIBS-DEFS and
|
||||
LMathLib0.mod LegacyReal.mod MemUtils.mod to
|
||||
GM2-LIBS-MODS. This corrects a bug reported by
|
||||
Steve Giess.
|
||||
|
||||
2011-10-25 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/gm2-compiler/M2GCCDeclare.mod: added debugging
|
||||
and also fixed a bug reported by Scott Iverson.
|
||||
(non-free/scott-iverson/test25/fail/WinShell.mod).
|
||||
* gm2/gm2-compiler/M2Quads.mod: added error checking
|
||||
to detect a nul typed constructor.
|
||||
* gm2/gm2-compiler/Sets.mod: added internal debugging.
|
||||
|
||||
2011-10-04 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/version.c: updated to 1.0.5
|
||||
* gm2/gm2-libs/config-host.in: updated to 1.0.5.
|
||||
* gm2/gm2-libs/config-target.in: updated to 1.0.5
|
||||
|
||||
2011-10-02 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* tagged GM2 gcc_4_1_2_gm2_1_0_4_0 post checkin.
|
||||
|
||||
2011-09-30 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* released GM2 1.0.4
|
||||
* tagged with: gcc_4_1_2_gm2_1_0_4 prior checkin.
|
||||
* gm2/version.c: updated to 1.0.4
|
||||
* gm2/gm2-libs/config-host: rebuilt.
|
||||
* gm2/gm2-libs/config-host.in: updated to 1.0.4.
|
||||
* gm2/gm2-libs/config-target: rebuilt.
|
||||
* gm2/gm2-libs/config-target.in: updated to 1.0.4
|
||||
|
||||
2011-07-28 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/Make-lang.in: add dependencies for the constuction of
|
||||
gm2/gm2-libs.texi.
|
||||
|
||||
2011-07-27 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/gm2-compiler/M2Base.mod: allow a dataType to be
|
||||
passed to ARRAY OF dataType. Bug fix for:
|
||||
testsuite/gm2/pim/pass/charstring.mod.
|
||||
* gm2/version.c: updated to 1.0.3
|
||||
* gm2/gm2-libs/config-host: rebuilt.
|
||||
* gm2/gm2-libs/config-host.in: updated to 1.0.3.
|
||||
* gm2/gm2-libs/config-target: rebuilt.
|
||||
* gm2/gm2-libs/config-target.in: updated to 1.0.3.
|
||||
|
||||
2011-07-26 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/gm2-compiler/M2ALU.mod: allow constant array strings
|
||||
to be created with const chars. Bug fix for:
|
||||
testsuite/gm2/iso/pass/constchar.mod.
|
||||
* gm2/gm2-compiler/M2ALU.mod: fixed obvious bugs to previous
|
||||
patch.
|
||||
|
||||
2011-07-25 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/gm2.texi: corrected typo in the documentation.
|
||||
|
||||
2011-07-15 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/gm2-libs-iso/StdChans.mod: allow raw operators on
|
||||
stdin, stdout and stderr. Bug fix to an error reported
|
||||
by Scott Iverson
|
||||
(http://lists.gnu.org/archive/html/gm2/2011-07/msg00003.html).
|
||||
|
||||
2011-07-07 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/gm2.texi: improved the Extended Asm section and changed
|
||||
the example for the x86_64 processor.
|
||||
|
||||
2011-07-05 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/gccgm2.c: BuildAsm now has an extra parameter (isSimple).
|
||||
Also call resolve_asm_operand_names.
|
||||
* gm2/bnf/m2-2.bnf: parse full GNU asm syntax (including
|
||||
operand names).
|
||||
* gm2/bnf/m2-3.bnf: implement full GNU asm syntax (including
|
||||
operand names). Record all asm operand names, specifiers
|
||||
and trash lists. Also record whether it was a simple kind.
|
||||
* gm2/bnf/m2-c.bnf: parse full GNU asm syntax (including
|
||||
operand names).
|
||||
* gm2/bnf/m2-h.bnf: parse full GNU asm syntax (including
|
||||
operand names).
|
||||
* gm2/bnf/m2.bnf: parse full GNU asm syntax (including
|
||||
operand names).
|
||||
* gm2/gm2-compiler/M2GenGCC.mod: correct generation of
|
||||
input, output and trash values for the asm operands.
|
||||
* gm2/gm2-compiler/SymbolTable.def: New procedures
|
||||
(PutGnuAsmSimple) and (IsGnuAsmSimple). Added extra
|
||||
parameter to (GetRegInterface).
|
||||
* gm2/gm2-compiler/SymbolTable.mod: Implemented new procedures
|
||||
(PutGnuAsmSimple) and (IsGnuAsmSimple). Added extra
|
||||
parameter to (GetRegInterface) to correct a bug.
|
||||
* gm2/gm2-compiler/gccgm2.def: modified declaration of
|
||||
(BuildAsm) to include an extra parameter, IsSimple.
|
||||
* These fixes allow GNU ASM syntax to behave in exactly
|
||||
the same way as the other GCC front ends.
|
||||
|
||||
2011-07-01 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/gccgm2.c: modified gccgm2_ChainOnParamValue to contain a
|
||||
name, str and value.
|
||||
* gm2/bnf/m2-3.bnf: many fixes in AsmList, AsmOperands, TrashList
|
||||
with respect to interface sym and gnuasm sym.
|
||||
* gm2/gm2-compiler/M2GenGCC.mod: call BuildTreeFromInterface
|
||||
instead of BuildTrashTreeFromInterface.
|
||||
* gm2/gm2-compiler/SymbolTable.def: fix GetRegInterface so that
|
||||
NulSym are returned in string and object if i exceeds number of
|
||||
parameters.
|
||||
* gm2/gm2-compiler/gccgm2.def: changed definition of
|
||||
ChainOnParamValue.
|
||||
|
||||
2011-06-29 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/bnf/m2-3.bnf: maintain a count of the number of asm operands
|
||||
in both the AsmElement and TrashList.
|
||||
* gm2/gm2-compiler/SymbolTable.def: PutRegInterface, GetRegInterface
|
||||
now specify which parameter number they are manipulating.
|
||||
* gm2/gm2-compiler/SymbolTable.def: modified the implementation of
|
||||
PutRegInterface, GetRegInterface to use dynamic array Indexing rather
|
||||
than the List.
|
||||
|
||||
2011-06-28 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/gm2spec.c: modified default libraries to iso,pim if -fiso is
|
||||
used. Fixes a bug reported by Scott Iverson
|
||||
(http://lists.gnu.org/archive/html/gm2/2011-06/msg00026.html).
|
||||
|
||||
2011-06-22 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/Make-lang.in: specify source and build directories to def2texi.py.
|
||||
* gm2/gm2.texi: modified to document the new behaviour of specifying
|
||||
library ordering.
|
||||
* gm2/gm2spec.c: default library is 'pim'. Large number of changes
|
||||
which remove the implicit ordering of library search paths in favour
|
||||
of users specifying the explicit order via -flibs=pim,iso,ulm etc.
|
||||
* gm2/lang.opt: -flibs= takes a number of Joined arguments.
|
||||
* gm2/examples/hello/Makefile.in: removed -fno-exceptions from the
|
||||
command line build.
|
||||
* fixes a bug reported by Scott Iverson
|
||||
(http://lists.gnu.org/archive/html/gm2/2011-06/msg00002.html).
|
||||
* gm2/gm2-libs-iso/README.texi: corrected status of copyright and
|
||||
implementation modules. Removed all information about incomplete
|
||||
modules.
|
||||
* gm2/tools-src/def2texi.py: fixed bug in building the www pages
|
||||
by adding an option to specify the build and source directory.
|
||||
|
||||
2011-06-15 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/gm2-compiler/PCSymBuild.mod: fixed bug in deduceTypes
|
||||
so that binary constant expressions can correctly identify
|
||||
their types. Fixes a bug report by Scott Iverson.
|
||||
|
||||
2011-06-13 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/gccgm2.c: gccgm2_GetArrayNoOfElements (New function).
|
||||
* gm2/gm2-compiler/M2GenGCC.mod: checkArrayElements (New
|
||||
procedure function). CodeBecomes modified to call
|
||||
checkArrayElements to test whether assigned arrays contain
|
||||
the same number of elements.
|
||||
* gm2/gm2-compiler/M2Quads.mod: CheckBecomesMeta tidied up
|
||||
error messages and added extra check to ensure that
|
||||
we are not assigning from an unbounded array.
|
||||
* gm2/gccgm2.def: export GetArrayNoOfElements.
|
||||
Fixes a bug reported by Scott Iverson.
|
||||
|
||||
2011-06-11 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/gm2-compiler/M2ALU.mod: added a limit check to SetNegate
|
||||
which fixes a bug reported by Scott Iverson
|
||||
(http://lists.gnu.org/archive/html/gm2/2011-06/msg00001.html).
|
||||
|
||||
2011-06-10 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/gm2-compiler/M2Quads.mod: modified CheckNotConstAndVar
|
||||
to CheckBecomesMeta so that it also checks that we are
|
||||
not assigning to a unbounded array. Fixes a bug reported
|
||||
by Scott Iverson
|
||||
(http://lists.gnu.org/archive/html/gm2/2011-06/msg00010.html).
|
||||
|
||||
2011-05-04 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2: tagged with gcc_4_1_2_0
|
||||
* gm2: created branch using "cvs tag -r gcc_4_1_2_0 -b gcc_4_1_2_gm2"
|
||||
* testsuite: tagged with gcc_4_1_2_0
|
||||
* testsuite: created branch using "cvs tag -r gcc_4_1_2_0 -b gcc_4_1_2_gm2"
|
||||
|
||||
2011-04-27 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* patches/gcc/4.1.2/01-patches: corrected bug in patch.
|
||||
* gm2/gm2-compiler/M2Quads.mod: fixed bug reported by
|
||||
John O Goyo
|
||||
(http://lists.nongnu.org/archive/html/gm2/2011-04/msg00031.html).
|
||||
|
||||
2011-04-22 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* patches/gcc/4.1.2/ChangeLog: New file.
|
||||
* patches/gcc/4.1.2/01-patches: New file.
|
||||
These patches have been regenerated and rationalised. They
|
||||
have also been regression tested against the C and C++
|
||||
regression tests. Both these sets of regression tests are
|
||||
unaffected by these patches.
|
||||
|
||||
2011-04-09 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/Make-lang.in: modified to build O2 versions of gm2-libs-min.
|
||||
|
||||
2011-04-06 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/Make-lang.in: modified to allow gm2 to coexist with
|
||||
gcc as the linker support rather than g++. Useful for
|
||||
embedded targets which don't yet support g++. Separated
|
||||
target from host when building libraries and use separate
|
||||
configure scripts for both.
|
||||
* gm2/README: removed warning about development code.
|
||||
* gm2/config-lang.in: added gm2lorder.
|
||||
* gm2/gm2.texi: updated documentation to reflect release 1.0.
|
||||
Corrected statements such as GNU Modula-2 is fully ISO
|
||||
compliant.
|
||||
* gm2/gm2spec.c: only include -lstdc++ if -fno-exceptions is
|
||||
not present.
|
||||
* gm2/gm2-libs/README.texi: tidied up dates.
|
||||
* gm2/gm2-libs-iso/README.texi: corrected status of modules
|
||||
given release of 1.0.
|
||||
* gm2/gm2-libs-iso/Strings.mod: fixed performance bug reported
|
||||
by Scott Iverson
|
||||
(http://lists.nongnu.org/archive/html/gm2/2011-03/msg00035.html).
|
||||
* gm2/p2c/p2c.h: test BUILD_GM2_LIBS_TARGET and include appropriate
|
||||
configure header.
|
||||
* gm2/tools-src/makeversion: added another consistency test.
|
||||
* gm2/gm2-libs/config-host.in: new file.
|
||||
* gm2/gm2-libs/config-target.in: new file.
|
||||
* gm2/gm2-libs/configure: removed.
|
||||
* gm2/gm2-libs/configure.in: removed.
|
||||
* gm2/gm2-libs/config-host: new file.
|
||||
* gm2/gm2-libs/config-target: new file.
|
||||
* gm2/gm2-libs/gm2-libs-target.h.in: new file.
|
||||
|
||||
2011-02-24 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/gm2.texi: changed lenny to squeeze in repository
|
||||
definitions.
|
||||
|
||||
2011-02-23 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/www/tools/texi2tr/src/texi2tr.py: implemented
|
||||
section alphabetically sorted index. Also implemented
|
||||
@ifhtml.
|
||||
|
||||
2011-02-22 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* www/tools/texi2tr/src/outputdev.py: added no_tag so
|
||||
table elements can easily be added - fixes a bug
|
||||
with enumerate.
|
||||
* gm2/www/tools/texi2tr/src/texi2tr.py: fixed pushSpecifier
|
||||
and fixed 'enum' with 'enumerate'. Enumerations work
|
||||
for integer and alphabetical values.
|
||||
|
||||
2011-02-19 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/gm2spec.c: ensure that the prev
|
||||
value is reset before each include path is added.
|
||||
* gm2/examples/gravity/Makefile.in: changed python version
|
||||
and fixed exec prefix.
|
||||
|
||||
2011-02-18 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/gm2.texi: changed node About to Overview.
|
||||
* gm2/www/tools/texi2tr/src: added function index.
|
||||
|
||||
2011-02-17 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/gm2.texi: many bug fixes to nodes.
|
||||
* gm2/www/tools/texi2tr: added html, png subdirs.
|
||||
* gm2/www/tools/texi2tr/src: many bug fixes applied.
|
||||
|
||||
2011-02-15 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/gm2.texi: incorporated the contents of the
|
||||
web page gm2/www/index.ms into gm2.texi.
|
||||
|
||||
2011-02-10 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/Make-lang.in: modified gm2.html rule.
|
||||
* gm2/gm2.texi: changed Function Index to Indices.
|
||||
* gm2/examples/texi2tr/src/outputdev.py: added
|
||||
templatePath.
|
||||
* gm2/examples/texi2tr/src/texi2tr.py: added
|
||||
rootName, templatePath, baseName options.
|
||||
* gm2/www/Makefile.in: new building instructions
|
||||
for the web site now that texi2tr is useable.
|
||||
* gm2/www/index.ms: minor changes.
|
||||
|
||||
2011-02-09 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* texi2tr is now able to translate the gm2.texi
|
||||
into html. First usable version.
|
||||
* gm2/examples/texi2tr/src/config.py: many changes.
|
||||
* gm2/examples/texi2tr/src/outputdev.py: many changes.
|
||||
* gm2/examples/texi2tr/src/navigate.py: many changes.
|
||||
* gm2/examples/texi2tr/src/texi2tr.py: many changes.
|
||||
|
||||
2011-02-04 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/examples/texi2tr: new directory.
|
||||
* gm2/examples/texi2tr/src: new directory.
|
||||
* gm2/examples/texi2tr/src/config.py: new file.
|
||||
* gm2/examples/texi2tr/src/outputdev.py: new file.
|
||||
* gm2/examples/texi2tr/src/navigate.py: new file.
|
||||
* gm2/examples/texi2tr/src/texi2tr.py: new file.
|
||||
|
||||
2011-01-30 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/gm2.texi: fixed some typos and corrected the
|
||||
python version number. Also foxed some texinfo variable
|
||||
references.
|
||||
* gm2/gm2/gm2spec.c: tided up code. Also modified the
|
||||
driver to add easily maintainable ordered lists of
|
||||
object paths and library paths.
|
||||
* gm2/el/g-mode.el: updated the dates.
|
||||
* gm2/gm2/Make-lang.in: use the new tool texi2tr to
|
||||
generate the html documentation which is currently
|
||||
under development.
|
||||
|
||||
2011-01-22 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* fixed a bug reported by Steve Giess.
|
||||
* testsuite/gm2/pim/pass/constcast.mod: New file.
|
||||
* testsuite/gm2/pim/pass/constmax.mod: New file.
|
||||
* gm2/gm2-compiler/PCSymBuild.mod: WalkLeaf detect
|
||||
if the symbol is a type in which case copy the
|
||||
type rather than get the type of a type.
|
||||
|
||||
2011-01-14 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/Make-lang.in: modified the stage2 and Modula-2
|
||||
library objects built from C sources to use XGCC.
|
||||
Define XGCC to the locally built ./xgcc -B./
|
||||
This allows gm2 to build under Darwin OS X
|
||||
Snow Leopard.
|
||||
|
||||
2011-01-12 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* released version 1.0.1 of gm2.
|
||||
* gm2/version.c: updated to version 1.0.1
|
||||
* gm2/www/index.ms: updated news of 1.0.1 release.
|
||||
* gm2/gm2-libs/configure.in: updated to 1.0.1
|
||||
* gm2/gm2-libs/configure: rebuilt.
|
||||
* gm2/configure: rebuilt.
|
||||
|
||||
2011-01-11 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* fixed many bug reported by
|
||||
DragiÅ¡a DuriÄ (dragisa-duric/testcase20).
|
||||
* gm2/gm2-compiler/SymbolTable.mod: new procedure
|
||||
SanityCheckConstants which checks to see types
|
||||
are used in formal parameters.
|
||||
* gm2/gm2-compiler/SymbolTable.def: export new procedure
|
||||
SanityCheckConstants.
|
||||
* gm2/gm2-compiler/M2Comp.mod: call SanityCheckConstants
|
||||
after Pass C.
|
||||
* gm2/gm2-compiler/M2Quads.mod: skip types in CheckParameters
|
||||
* gm2/gm2-compiler/M2MetaError.def: add ebnf comments.
|
||||
|
||||
2011-01-10 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* fixed many constant type related bugs reported by
|
||||
DragiÅ¡a DuriÄ (dragisa-duric/testcase18 and
|
||||
dragisa-duric/testcase19).
|
||||
* gm2/Make-lang.in: modified texi2html build rule.
|
||||
* gm2/bnf/m2-c.bnf: major number of changes to incorporate
|
||||
parsing const expressions to deduce their types.
|
||||
* gm2/gm2-compiler/M2Base.mod: added return types to the
|
||||
builtin procedure functions so that if they are used in
|
||||
constant expressions m2-c can determine their types.
|
||||
* gm2/gm2-compiler/M2Comp.mod: ResolveConstType is now
|
||||
exported from PCSymBuild rather than P2SymBuild.
|
||||
* gm2/gm2-compiler/M2GenGCC.mod: allow procedures to be
|
||||
assigned to constants.
|
||||
* gm2/gm2-compiler/M2Quads.def: export new procedure
|
||||
function Top.
|
||||
* gm2/gm2-compiler/M2Quads.mod: implement new procedure
|
||||
function Top.
|
||||
* gm2/gm2-compiler/M2StackAddress.mod: fixed bug in
|
||||
M2StackAddress.NoOfItemsInStackAddress.
|
||||
* gm2/gm2-compiler/M2StackWord.mod: fixed same bug in
|
||||
M2StackWord.NoOfItemsInStackAddress.
|
||||
* gm2/gm2-compiler/P2SymBuild.def: removed many of the
|
||||
constant type resolution procedures and moved them to
|
||||
PCSymBuild.
|
||||
* gm2/gm2-compiler/PCSymBuild.def: export many constant
|
||||
type related procedures.
|
||||
* gm2/gm2-compiler/PCSymBuild.mod: major reimplementation
|
||||
to allow constant expression trees to be built so that
|
||||
types can be deduced.
|
||||
* gm2/init/gm2-gccinit: added new M2Const.
|
||||
* gm2/www/index.ms: web page now contains info relating
|
||||
to release 1.0.
|
||||
|
||||
310
gcc/m2/ChangeLog-2012
Normal file
310
gcc/m2/ChangeLog-2012
Normal file
@@ -0,0 +1,310 @@
|
||||
2012-12-10 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/gm2-libs-pim/Random.mod: fixed bug in RandomLongReal
|
||||
report by Steve Giess. Incorrect data type was used which
|
||||
caused a NaN to be generated.
|
||||
|
||||
2012-12-08 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/examples/gravity/twoDsim.mod: (added semicolon).
|
||||
* gm2/gm2-libs-pim/InOut.def: improved comment to
|
||||
OpenOutput.
|
||||
* gm2/gm2-libs-pim/InOut.mod: fixed so that the file
|
||||
can only be written to if it does not already exist.
|
||||
|
||||
2012-12-03 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/gm2-libs-iso/RandomNumber.def: (added file).
|
||||
* gm2/gm2-libs-iso/RandomNumber.mod: (added file).
|
||||
|
||||
2012-11-26 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/gm2-libs-pim/Random.def: fixed declaration of
|
||||
RandomBytes to use VAR parameter.
|
||||
* gm2/gm2-libs-pim/Random.mod: fixed declaration of
|
||||
RandomBytes to use VAR parameter. Also improved
|
||||
implementation of RandomReal and RandomLongReal.
|
||||
* gm2/gm2-libs-iso/RandomNumber.def: (New module).
|
||||
* gm2/gm2-libs-iso/RandomNumber.mod: (New module).
|
||||
* gm2/Make-lang.in: add RandomNumber.mod to the list
|
||||
of ISO modules.
|
||||
* gm2/gm2-libs-iso/RandomNumber.def: Fixed description.
|
||||
|
||||
2012-11-21 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/gm2-libs-pim/Random.def: export RandomLongReal and
|
||||
RandomBytes. Fixes a bug reported by Steve Giess.
|
||||
|
||||
2012-09-19 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/gm2-compiler/SymbolTable.mod: bug fix to fix up all
|
||||
unbounded parameter types if they are produced via partial
|
||||
unbounded symbols. Fixes a bug exposed by macroObjects.mod
|
||||
in a new example directory.
|
||||
|
||||
2012-06-28 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/gm2-compiler/M2GenGCC.mod: CodeAddr can now obtain the
|
||||
address of CHAR constants. Fixes a bug reported by Scott
|
||||
Iverson.
|
||||
* gm2/gm2-compiler/M2GenGCC.mod: corrected CodeAddr to ensure
|
||||
that the address of a char is only converted into address of
|
||||
a string for constants.
|
||||
|
||||
2012-05-04 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/gm2spec.c: detect -fonlylink. Ensure that -fonlylink is
|
||||
present on the command line if -fmakeall is used. Otherwise
|
||||
the driver will compile and link the main module object together
|
||||
with the main module compiled via the make. Fixes a bug reported
|
||||
by Scott Iverson, linking a shared library.
|
||||
|
||||
2012-05-03 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/gm2-compiler/M2GenGCC.mod: (BinaryOperands) New procedure function.
|
||||
Used by FoldAdd, CodeAdd, FoldSub, CodeSub, FoldMult, CodeMult,
|
||||
FoldDivTrunc, CodeDivTrunc, FoldModFloor, CodeModFloor.
|
||||
|
||||
2012-05-02 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/gccgm2.c: (convert_for_comparison) New function.
|
||||
gccgm2_BuildEqualTo, gccgm2_BuildNotEqualTo use
|
||||
convert_for_comparison. This fixes comparison between a
|
||||
WORD operand. Bug reported by Scott Iverson.
|
||||
* gm2/gccgm2.c: applied fix for all WORD sizes.
|
||||
|
||||
2012-05-01 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/gm2-compiler/M2GenGCC.mod: (CodeStandardFunction) implement
|
||||
TBITSIZE. (FoldStandardFunction) implement TBITSIZE.
|
||||
* gm2/gm2-compiler/M2Quads.mod: (BuildTBitSizeFunction) New
|
||||
procedure function.
|
||||
* gm2/gm2-compiler/M2System.def: (TBitSize) define and export.
|
||||
Tidied up formatting (sym used instead of Sym).
|
||||
* gm2/gm2-compiler/M2System.mod: initialise TBitSize.
|
||||
Tidied up formatting (sym used instead of Sym).
|
||||
(IsPseudoSystemFunction) includes TBitSize.
|
||||
|
||||
2012-04-30 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/gm2-compiler/M2GCCDeclare.mod: (BuildRecord) fixed bit
|
||||
field calculation.
|
||||
|
||||
2012-04-28 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/gm2-compiler/M2Range.mod: (firstmention) New field
|
||||
in Range. (FirstMention) New procedure function.
|
||||
FoldTypeAssign, FoldTypeParam, FoldTypeExpr, CodeTypeAssign,
|
||||
CodeTypeParam, CodeTypeExpr call FirstMention before
|
||||
emitting an error message. Multiple related messages have
|
||||
been chained. This fixes a bug report by Scott Iverson
|
||||
(duplicate error messages).
|
||||
* gm2/Make-lang.in: tidied up formatting and added a commented
|
||||
out short cut used during development.
|
||||
* gm2/gccgm2.c: tidied up formatting of gccgm2_GetSizeOf.
|
||||
gccgm2_GetSizeOf now detects COMPONENT_REF.
|
||||
gccgm2_GetSizeOfInBits now detects COMPONENT_REF.
|
||||
* gm2/gm2.texi: added new example of how bit field packing
|
||||
can be achieved.
|
||||
* gm2/bnf/m2-3.bnf: removed call to dummy
|
||||
CheckOuterScopeProcedureVariable procedure.
|
||||
* gm2/bnf/m2-h.bnf: removed import CheckOuterScopeProcedureVariable.
|
||||
* gm2/gm2-compiler/M2GCCDeclare.mod: (WalkComponentDependants)
|
||||
New procedure. (IsValueDeendants) New procedure function.
|
||||
* gm2/gm2-compiler/M2GenGCC.mod: (FoldRecordField, CodeRecordField)
|
||||
New procedures. CodeUnbounded simplified.
|
||||
* gm2/gm2-compiler/M2Quads.def: Removed
|
||||
CheckOuterScopeProcedureVariable.
|
||||
* gm2/gm2-compiler/M2Quads.mod: many changes to allow
|
||||
record accesses to be achieved via the GCC Tree
|
||||
COMPONENT_REF. To this end we use a front end symbol
|
||||
component which mirrors the eventual GCC Tree.
|
||||
BuildAdrFunction altered to obtain the address of
|
||||
Components and the WITH statement has been rewritten.
|
||||
(CheckOuterScopeProcedureVariable) removed.
|
||||
New quadruple operator RecordFieldOp introduced to
|
||||
generate components. All unbounded accesses use the
|
||||
new component record mechanism.
|
||||
* gm2/gm2-compiler/SymbolTable.def: (MakeComponentRecord),
|
||||
(MakeComponentRef), (IsComponent) New procedure functions.
|
||||
* gm2/gm2-compiler/SymbolTable.mod: (MakeComponentRecord),
|
||||
(MakeComponentRef), (IsComponent), (GetNthFromComponent),
|
||||
(buildTemporary). MakeTemporary use buildTemporary.
|
||||
New procedure functions.
|
||||
|
||||
2012-04-11 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/gm2-compiler/M2GCCDeclare.mod: (DeclarePackedSet) New
|
||||
procedure.
|
||||
* gm2/gm2-compiler/SymbolTable.mod: (MakeSet) creates an
|
||||
equivalent packedInfo placeholder. (MakeEquivalent)
|
||||
and (GetPackedEquivalent) modified to handle set type.
|
||||
|
||||
2012-04-07 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/gccgm2.c: (calcNbits) New function.
|
||||
* gm2/m2pp.c: (ptc), (m2pp_getaligned),
|
||||
(m2pp_recordfield_alignment) New functions.
|
||||
* gm2/gm2-compiler/M2GCCDeclare.mod: fixes to DeclarePackedType.
|
||||
* gm2/gm2-compiler/P2SymBuild.mod: fixes to HandleRecordFieldPragmas.
|
||||
* gm2/gm2-compiler/SymbolTable.mod: fixes to
|
||||
GetDefaultRecordFieldAlignment.
|
||||
|
||||
2012-03-27 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/gm2-compiler/M2GCCDeclare.mod: added missing RETURN
|
||||
statement.
|
||||
* gm2/examples/gravity/twoDsim.mod: added debugging procedure
|
||||
to display the definition of the polygon.
|
||||
|
||||
2012-03-17 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/gm2-compiler/SymbolTable.mod: record when an unknown
|
||||
symbol is reported and ensure that we only report unknown
|
||||
symbols once. Fixes a bug reported by Scott Iverson.
|
||||
Procedure UnknownSymbolError uses IsUnreportedUnknown and
|
||||
populates ReportedUnknowns whenever an error message is
|
||||
generated. New procedure function (IsUnreportedUnknown).
|
||||
* gm2/gm2-compiler/M2GCCDeclare.mod: renamed MaybePackField
|
||||
by MakebeAlignField.
|
||||
* gm2/gm2-compiler/SymbolTable.mod: GetAlignment modified
|
||||
to return the alignment of Varient and VarientFields.
|
||||
|
||||
2012-02-23 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/gccgm2.c: (gccgm2_BuildStartFieldVarient,
|
||||
gccgm2_BuildEndFieldVarient) New functions.
|
||||
* gm2/m2pp.c: detect FIELD_DECL in m2pp_type.
|
||||
* gm2/gm2-compiler/M2GCCDeclare.mod: use
|
||||
BuildStartFieldVarient rather than BuildStartVarient.
|
||||
Use BuildEndFieldVarient rather than BuildEndVarient.
|
||||
This fixes a number of regression test bugs including:
|
||||
testsuite/gm2/extensions/run/pass/align8.mod.
|
||||
* gm2/gm2-compiler/gccgm2.def: define BuildStartFieldVarient
|
||||
and BuildEndFieldVarient.
|
||||
|
||||
2012-02-15 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/gccgm2.c: (gccgm2_BuildTBitSize) detect if TYPE_DECL is passed.
|
||||
|
||||
2012-02-14 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
The following changes are a change to the type declaration system
|
||||
which is necessary to implement bit alignment of record fields.
|
||||
|
||||
* gm2/gm2-compiler/M2DebugStack.def: New file.
|
||||
* gm2/gm2-compiler/M2DebugStack.mod: New file.
|
||||
* gm2/Make-lang.in: tidied up the file and introduced a commented
|
||||
rule which allows stage2 to be built from a prebuilt stage1. This
|
||||
is only ever used during heavy development and allows debugging in
|
||||
Modula-2 to occur rather than in the translated, C, files.
|
||||
* gm2/gccgm2.c: gccgm2_BuildStartEnumeration, gccgm2_BuildEndRecord,
|
||||
start_enum (new parameter ispacked). New functions
|
||||
(gccgm2_SetTypePacked, gccgm2_SetDeclPacked,
|
||||
gccgm2_GetPackedBooleanType, gccgm2_SetRecordFieldOffset,
|
||||
gccgm2_GetTBitSize, noBitsRequired, gccgm2_BuildStartVarient,
|
||||
gccgm2_BuildEndVarient, gccgm2_BuildSmallestTypeRange,
|
||||
gccgm2_BuildTBitSize).
|
||||
* gm2/lang.opt: introduce debugging option -fd.
|
||||
* gm2/m2.flex: introduce <* *> into the set of lexical tokens.
|
||||
* gm2/m2pp.c: pretty print union types and also whether records and their
|
||||
fields are aligned, packed, offset values and addressible.
|
||||
* gm2/bnf/gm2l.bnf: introduce <* *> into the set of lexical tokens.
|
||||
* gm2/bnf/gm2m.bnf: introduce <* *> into the set of lexical tokens.
|
||||
* gm2/bnf/m2-2.bnf: introduce <* *> into the set of lexical tokens.
|
||||
extended the ebnf to include a default record alignment using pragmas.
|
||||
Also extended the ebnf to include field alignment and packing using
|
||||
pragmas.
|
||||
* gm2/bnf/m2-3.bnf: introduce <* *> into the set of lexical tokens.
|
||||
extended the ebnf to include a default record alignment using pragmas.
|
||||
Also extended the ebnf to include field alignment and packing using
|
||||
pragmas.
|
||||
* gm2/bnf/m2-c.bnf: introduce <* *> into the set of lexical tokens.
|
||||
extended the ebnf to include a default record alignment using pragmas.
|
||||
Also extended the ebnf to include field alignment and packing using
|
||||
pragmas.
|
||||
* gm2/bnf/m2-h.bnf: introduce <* *> into the set of lexical tokens.
|
||||
extended the ebnf to include a default record alignment using pragmas.
|
||||
Also extended the ebnf to include field alignment and packing using
|
||||
pragmas.
|
||||
* gm2/bnf/m2.bnf: introduce <* *> into the set of lexical tokens.
|
||||
extended the ebnf to include a default record alignment using pragmas.
|
||||
Also extended the ebnf to include field alignment and packing using
|
||||
pragmas.
|
||||
* gm2/el/g-mode.el: removed PACKED as a keyword.
|
||||
* gm2/gm2-compiler/M2GCCDeclare.mod: huge number of changes and
|
||||
many aspects have been rewritten. The main changes occur from
|
||||
delaying a records declaration into a GCC Tree until its alignment
|
||||
is known. Varient records are also handled in this way. Much
|
||||
debugging code added as well. Simple types can also be declared
|
||||
as packed (Subranges, Boolean) and enumeration types.
|
||||
* gm2/gm2-compiler/M2Quads.def: new procedures BuildBitLength,
|
||||
BuildPragmaField, BuildDefaultFieldAlignment, OperandAnno,
|
||||
Annotate).
|
||||
* gm2/gm2-compiler/M2Quads.mod: implement all of the above.
|
||||
Provide a useful internal debugging procedure function 'ds'
|
||||
which display the quadruple stack.
|
||||
* gm2/gm2-compiler/M2Reserved.def: add LDirectiveTok and
|
||||
RDirectiveTok.
|
||||
* gm2/gm2-compiler/M2Reserved.mod: implement above.
|
||||
* gm2/gm2-compiler/P2SymBuild.def: new procedure functions
|
||||
P2BuildDefaultFieldAlignment, BuildPragmaConst.
|
||||
* gm2/gm2-compiler/P2SymBuild.mod: implement above.
|
||||
* gm2/gm2-compiler/Sets.mod: no longer import BITSET from SYSTEM.
|
||||
* gm2/gm2-compiler/SymbolTable.def: new procedures
|
||||
(GetDefaultRecordFieldAlignment, PutDeclaredPacked,
|
||||
IsDeclaredPacked, IsDeclaredPackedResolved,
|
||||
GetPackedEquivalent, GetNonPackedEquivalent,
|
||||
PutDefaultRecordFieldAlignment, PutUnused, IsUnused).
|
||||
* gm2/gm2-compiler/SymbolTable.mod: implement above.
|
||||
* gm2/gm2-compiler/gccgm2.def: remove procedure function
|
||||
BuildStartVarientRecord and add procedure functions
|
||||
BuildStartVarient, BuildEndVarient, BuildSmallestTypeRange,
|
||||
GetPackedBooleanType, SetDeclPacked, SetTypePacked,
|
||||
SetRecordFieldOffset, BuildTBitSize.
|
||||
* gm2/gm2-compiler/ppg.mod: remove BITSET from SYSTEM
|
||||
import list.
|
||||
* gm2/gm2-libs-iso/SYSTEM.def: define new builtin procedure
|
||||
function TBITSIZE.
|
||||
|
||||
2012-02-05 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/gccgm2.c: fixed bug reported by Scott Iverson.
|
||||
The bug occurred when a procedure was used in a constructor.
|
||||
The solution is to take the address of the FUNCTION_DECL.
|
||||
|
||||
2012-01-13 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/gm2-compiler/M2GCCDeclare.mod: declare procedures in
|
||||
topological order with constants and types. This fixes a bug
|
||||
reported by Scott Iverson.
|
||||
|
||||
2012-01-12 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/gm2-compiler/Indexing.mod: removed import of BITSET from SYSTEM.
|
||||
* gm2/gm2-compiler/M2Base.mod: BITSET is now declared as a pervasive
|
||||
type.
|
||||
* gm2/gm2-compiler/M2Error.mod: removed import of BITSET from SYSTEM.
|
||||
* gm2/gm2-compiler/M2Printf.mod: removed import of BITSET from SYSTEM.
|
||||
* gm2/gm2-compiler/M2System.mod: removed BITSET from being declared.
|
||||
* gm2/gm2-libs/SYSTEM.def: removed BITSET from export list.
|
||||
* gm2/gm2-libs-min/SYSTEM.def: removed BITSET from export list.
|
||||
* gm2/gm2-libs-coroutines/SYSTEM.def: removed BITSET from export list.
|
||||
* gm2/gm2-libs/Indexing.mod: BITSET is now a pervasive type.
|
||||
* gm2/gm2-libs/M2RTS.mod: BITSET is now a pervasive type.
|
||||
* gm2/gm2.texi: added new section on packed records and also BITSET
|
||||
is no longer exported from SYSTEM but is a pervasive type.
|
||||
* gm2/ulm-lib-gm2/std/M2RTS.mod: no longer import BITSET.
|
||||
* gm2/ulm-lib-gm2/std/MathLib.mod: no longer import BITSET.
|
||||
* gm2/ulm-lib-gm2/std/Plot.mod: no longer import BITSET.
|
||||
* gm2/ulm-lib-gm2/sys/SYSTEM.def: no longer export BITSET.
|
||||
* gm2/ulm-lib-gm2/sys/SysStat.def: no longer import BITSET.
|
||||
* gm2/ulm-lib-gm2/sys/SysStat.mod: no longer import BITSET.
|
||||
* gm2/ulm-lib-gm2/std/Archive.def: no longer import BITSET.
|
||||
* gm2/ulm-lib-gm2/sys/SysIoctl.def: no longer import BITSET.
|
||||
* gm2/gm2-libs-pim/BitBlockOps.mod: no longer import BITSET.
|
||||
* gm2/gm2-libs-pim/BitBlockOps.mod: no longer import BITSET.
|
||||
* gm2/gm2-libs-pim/BitByteOps.mod: no longer import BITSET.
|
||||
* gm2/gm2-libs-pim/BitWordOps.mod: no longer import BITSET.
|
||||
* gm2/gm2/examples/map/AdvMap.def: no longer import BITSET.
|
||||
|
||||
810
gcc/m2/ChangeLog-2013
Normal file
810
gcc/m2/ChangeLog-2013
Normal file
@@ -0,0 +1,810 @@
|
||||
2013-12-25 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/gm2-compiler/M2GCCDeclare.mod: PushNoOfBits (New
|
||||
procedure). DeclareLargeSet use PushNoOfBits.
|
||||
* gm2/gm2-compiler/SymbolKey.def: import WORD from SYSTEM.
|
||||
|
||||
2013-12-24 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/gm2-gcc/m2convert.c: doOrdinal (New function).
|
||||
m2convert_BuildConvert call doOrdinal is value
|
||||
is a STRING_CST and its length <= 1. Refactor
|
||||
type computation.
|
||||
* gm2/gm2-gcc/m2statement.c:
|
||||
m2statement_BuildUnaryForeachWordDo remove p1, p2
|
||||
pointer calculations and use m2treelib_get_set_field_rhs
|
||||
and m2treelib_get_set_field_des instead.
|
||||
m2statement_BuildExcludeVarConst remove p1 and use
|
||||
m2treelib_get_set_field_des and m2treelib_get_set_field_rhs
|
||||
instead. m2statement_BuildIncludeVarConst use
|
||||
m2treelib_get_set_field_des instead of
|
||||
m2treelib_get_set_field_rhs.
|
||||
|
||||
2013-12-20 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/gm2-gcc/m2builtins.c: (builtin_function) use
|
||||
add_builtin_function and set source line appropriately.
|
||||
|
||||
2013-12-11 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/gm2-libs-coroutines/SYSTEM.def: added commented
|
||||
internal procedure function definitions.
|
||||
* gm2/gm2-lang.c: remove the Go defaults in
|
||||
gm2_langhook_init_options_struct. No longer attempt
|
||||
to split the stack, which fixes regression test failures
|
||||
in gm2/coroutines/pim/run/pass/testiotransfer.mod
|
||||
and gm2/coroutines/pim/run/pass/testtransfer.mod.
|
||||
|
||||
2013-12-09 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/gm2-libs-coroutines/SYSTEM.def: added definition
|
||||
of the internal procedure functions
|
||||
ShiftVal, ShiftLeft, ShiftRight, RotateVal,
|
||||
RotateLeft, RotateRight to handle large sets.
|
||||
* gm2/gm2-libs-coroutines/SYSTEM.mod: added implementation
|
||||
of the internal procedure functions
|
||||
ShiftVal, ShiftLeft, ShiftRight, RotateVal,
|
||||
RotateLeft, RotateRight to handle large sets.
|
||||
* gm2/gm2-compiler/M2GenGCC.mod: fixed type change
|
||||
bug which occurred if a large bitset is compared to
|
||||
an empty set. Use ConvertBinaryOperands for the
|
||||
special case as well.
|
||||
* gm2/gm2-gcc/m2expr.c: corrected function indirect
|
||||
prototype to include location_t.
|
||||
* gm2/gm2-gcc/m2expr.h: corrected function indirect
|
||||
prototype to include location_t.
|
||||
|
||||
2013-12-06 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* testsuite/gm2/pimcoroutes/pass/gm2.exp:
|
||||
* testsuite/gm2/pimcoroutes/pass/exports.mod:
|
||||
* testsuite/gm2/pimcoroutes/pass/exports2.mod:
|
||||
(New files)
|
||||
* gm2/gm2-libs-coroutines/SYSTEM.def: corrected
|
||||
export list taking care to only have data types on the
|
||||
(* @SYSTEM_DATATYPES@ *) line.
|
||||
* gm2/Make-lang.in: add
|
||||
gm2/Make-lang.in to be a dependant of gm2/gm2-libs.texi.
|
||||
Add new rule to build $(objdir)/gm2/gm2-libs-coroutines/SYSTEM.def.
|
||||
Add $(objdir)/gm2/gm2-libs-coroutines/SYSTEM.def to build-system.
|
||||
|
||||
2013-12-05 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/gm2.texi: added information on
|
||||
how to build a gcc-4.1.2 based gm2 under a multiarch
|
||||
linux system.
|
||||
* gm2/gm2.texi: changed configure
|
||||
examples to reflect new source tree layout.
|
||||
|
||||
2013-12-01 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/examples/pge/deviceGroff.mod: (newFrame)
|
||||
emit leading .ll 8i.
|
||||
* gm2/examples/pge/foo.mod: (regenerated).
|
||||
* gm2/gm2-gcc/m2builtins.c: (m2builtins_BuildBuiltinTree)
|
||||
corrected formatting.
|
||||
* testsuite/gm2/pim/pass/builtin.def: corrected sinf
|
||||
to use and return SHORTREAL types.
|
||||
* testsuite/gm2/pim/pass/builtin.mod: corrected sinf
|
||||
to use and return SHORTREAL types.
|
||||
* testsuite/gm2/pim/pass/testsinf.mod: corrected test
|
||||
to use REAL rather than SHORTREAL with sinf.
|
||||
|
||||
2013-11-20 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/config-lang.in: added target-libgm2
|
||||
to the list of target_libs.
|
||||
* gm2/examples/pge/foo.fig: new example.
|
||||
* gm2/examples/pge/foo.mod: regenerated.
|
||||
* gm2/gm2-compiler/M2GenGCC.mod: change
|
||||
type to Address if lvalue is used, this fixes the
|
||||
regression test failure in
|
||||
testsuite/gm2/iso/run/pass/unbounded.mod.
|
||||
* gm2/gm2spec.c: remove extern int force_no_linker.
|
||||
Changed variable name force_no_linker to allow_linker and
|
||||
switched boolean value. allow_linker now exported via gcc.h.
|
||||
* gm2/patches/gcc/4.7.3/0[0-9]-patches:
|
||||
regenerated.
|
||||
* gm2/patches/gcc/4.7.3/10-patches:
|
||||
regenerated.
|
||||
|
||||
2013-11-15 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/gm2-libs-iso/LongWholeIO.mod: (ReadInt)
|
||||
* gm2/gm2-libs-iso/ShortWholeIO.mod: (ReadInt)
|
||||
* gm2/gm2-libs-iso/WholeIO.mod: (ReadInt)
|
||||
catch overflow and set the read result accordingly.
|
||||
* gm2/gm2-libs-iso/LongWholeIO.mod: (ReadInt)
|
||||
* gm2/gm2-libs-iso/ShortWholeIO.mod: (ReadInt)
|
||||
* gm2/gm2-libs-iso/WholeIO.mod: (ReadInt)
|
||||
reference SetReadResult correctly via IOChan.
|
||||
|
||||
2013-11-14 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/gm2-compiler/M2GenGCC.mod: (FoldBinary)
|
||||
convert left and right operands to the result type.
|
||||
* gm2/gm2-libs-iso/ShortWholeIO.mod: (ReadInt)
|
||||
handle negative value without overflowing.
|
||||
* gm2/gm2-libs-iso/WholeIO.mod: (ReadInt)
|
||||
handle negative value without overflowing.
|
||||
|
||||
2013-11-13 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/gm2-compiler/M2ALU.mod: (InitialiseArrayWith)
|
||||
convert low and high bounds into integers when creating array
|
||||
constants.
|
||||
* gm2/gm2-gcc/m2expr.c: (m2expr_BuildAdd),
|
||||
(m2expr_BuildSub), (m2expr_BuildDivTrunc), (m2expr_BuildModTrunc),
|
||||
(m2expr_BuildDivFloor), (m2expr_BuildModFloor), (m2expr_BuildLSL),
|
||||
(m2expr_BuildLSR), (m2expr_BuildLRL), (m2expr_BuildLRR),
|
||||
(m2expr_BuildMask) all fold operands and also their results.
|
||||
(m2expr_BuildLRotate) New function. (m2expr_BuildRRotate)
|
||||
New function.
|
||||
|
||||
2013-11-12 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/gm2-gcc/m2expr.c: (m2expr_BuildCmplx) check
|
||||
to see that the expressions are REAL_CST before calling
|
||||
build_complex.
|
||||
* gm2/gm2-compiler/M2Options.def: (FinaliseOptions)
|
||||
exported.
|
||||
* gm2/gm2-gcc/m2options.h: (FinaliseOptions)
|
||||
declared extern.
|
||||
* gm2/gm2-lang.c: (gm2_langhook_post_options)
|
||||
call M2Options_FinaliseOptions.
|
||||
|
||||
2013-11-10 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/gcc-gm2/m2expr.c: (m2expr_BuildCap) fold results of each
|
||||
subexpression to ensure a constant is returned if a constant
|
||||
parameter is given.
|
||||
|
||||
2013-11-08 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/examples/pge/fig.py: added abiltity to set a default velocity.
|
||||
* gm2/examples/pge/foo.fig: changed default demo.
|
||||
* gm2/examples/pge/foo.fig: changed default demo.
|
||||
* gm2/tools-src/makeversion: simplified to use 'cat'.
|
||||
Necessary as the top level directory name no longer contains
|
||||
the release number.
|
||||
* gm2/www/tools/texi2tr/html/download.html: changed to
|
||||
reflect change from cvs to git.
|
||||
|
||||
2013-10-28 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/gm2-gcc/m2block.c: iterate over the tree chain adding declaration
|
||||
statements (of variables) to the statement list.
|
||||
|
||||
2013-10-17 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/gm2.texi: added new section (Building gcc-4.7
|
||||
under Debian), added new section (Building gcc-4.7
|
||||
under Solaris).
|
||||
* gm2/examples/pge/Fractions.mod: updated dates.
|
||||
* gm2/examples/pge/circles.mxm: added comments and rewritten to use
|
||||
max2code syntax.
|
||||
* gm2/examples/pge/mxmmaxima.py: corrected getPolynomials.
|
||||
* gm2/examples/pge/mxmparser.py: many changes to allow stdout as a filename
|
||||
specified by '-'.
|
||||
* gm2/examples/pge/mxmtree.py: many changes and additions.
|
||||
* gm2/examples/pge/ramps2.mod: useGroff (New constant).
|
||||
* gm2/examples/pge/rotating-line.mxm: added comments and rewritten to
|
||||
use max2code syntax.
|
||||
* gm2/examples/pge/snooker.mod: added a boundary to the snooker table.
|
||||
* gm2/examples/pge/test.mxm: rewritten to use max2code syntax.
|
||||
* gm2/examples/pge/twoDsim.mod: minor changes to allow circle on circle
|
||||
collision to be calculated from a max2code included source file.
|
||||
|
||||
2013-10-02 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/examples/pge/circles.mxm: (New file).
|
||||
* gm2/examples/pge/debugt: (New file).
|
||||
* gm2/examples/pge/max2code.py: (New file).
|
||||
* gm2/examples/pge/mxmmaxima.py: (New file).
|
||||
* gm2/examples/pge/mxmout.py: (New file).
|
||||
* gm2/examples/pge/mxmparser.py: (New file).
|
||||
* gm2/examples/pge/mxmstack.py: (New file).
|
||||
* gm2/examples/pge/mxmtree.py: (New file).
|
||||
* gm2/examples/pge/mxmutils.py: (New file).
|
||||
* gm2/examples/pge/pge.py: (New file).
|
||||
* gm2/examples/pge/rotating-circles.mxm: (New file).
|
||||
* gm2/examples/pge/rotating-line.mxm: (New file).
|
||||
* gm2/examples/pge/runt: (New file).
|
||||
* gm2/examples/pge/test.mxm: (New file).
|
||||
|
||||
2013-09-27 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/gm2-compiler/M2GenGCC.mod: (CodeHigh) convert high value into
|
||||
a cardinal. (FoldHigh) convert high value into cardinal. Fixes
|
||||
a bug exposed when compiling ulm-lib-gm2/std/StrSpec.mod.
|
||||
* gm2/gm2-compiler/M2GenGCC.mod: (FoldHigh) convert constant into
|
||||
a cardinal.
|
||||
|
||||
2013-09-26 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/gm2-libs-iso/LongWholeIO.def: (Re-added).
|
||||
* ShortIO.def: (Re-added).
|
||||
* ShortWholeIO.def: (Re-added).
|
||||
* SLongWholeIO.def: (Re-added).
|
||||
* SShortIO.def: (Re-added).
|
||||
* SShortWholeIO.def: (Re-added).
|
||||
* LongWholeIO.mod: (Re-added).
|
||||
* ShortIO.mod: (Re-added).
|
||||
* ShortWholeIO.mod: (Re-added).
|
||||
* SLongWholeIO.mod: (Re-added).
|
||||
* SShortIO.mod: (Re-added).
|
||||
* SShortWholeIO.mod: (Re-added).
|
||||
|
||||
2013-09-25 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/patches/gcc/4.7.3/[01-10] (New patches created).
|
||||
Added configure which fixes the absence of libgm2 being built.
|
||||
|
||||
2013-09-24 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/gm2-compiler/M2ALU.mod: (BuildBitset) now return a
|
||||
BITSET type rather than an integer.
|
||||
* gm2/gm2-compiler/M2GenGCC.mod: (CodeInclude) do not convert the IntegerTree.
|
||||
(CodeExclude) do not convert the IntegerTree.
|
||||
* gm2/gm2-gcc/m2expr.c: (m2expr_BuildLogicalShift) convert op2 and op3
|
||||
ToWord. (m2expr_BuildIfConstInVar) use varset rather than p1.
|
||||
(m2expr_BuildComponentRef) call m2tree_skip_reference_type.
|
||||
(m2expr_BuildBinaryForeachWordDo) call m2treelib_get_set_field_des.
|
||||
* gm2/gm2-gcc/m2statement.c: (m2statement_BuildIncludeVarConst)
|
||||
use op1, rather than p1 in m2treelib_get_set_field_rhs.
|
||||
* gm2/gm2-gcc/m2tree.c: (m2tree_skip_reference_type) New function.
|
||||
* gm2/gm2-gcc/m2tree.h: (m2tree_skip_reference_type) New declaration.
|
||||
* gm2/gm2-gcc/m2treelib.c: (m2treelib_get_set_field_des) New function.
|
||||
* gm2/gm2-gcc/m2treelib.h: (m2treelib_get_set_field_des) New declaration.
|
||||
|
||||
2013-09-20 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/patches/gcc/4.7.3: remade patch set which now includes toplevel
|
||||
Makefile.def.
|
||||
|
||||
2013-09-18 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/gm2-compiler/M2GCCDeclare.mod: (SkipModuleScope) New procedure
|
||||
function. PushBinding use SkipModuleScope. PopBinding use
|
||||
SkipModuleScope.
|
||||
* gm2/gm2-compiler/M2GenGCC.mod: CodeAddr checks whether
|
||||
op3 IsConstString.
|
||||
* gm2/gm2-gcc/m2convert.c: (m2convert_ToBitset) New function.
|
||||
* gm2/gm2-gcc/m2convert.h: (m2convert_ToBitset) New function.
|
||||
* gm2/gm2-gcc/m2expr.c: many changes to use m2expr_FoldAndStrip
|
||||
for binary operands. Also many changes to set operators so
|
||||
that COMPOUND_REF are used whenever possible and that operands
|
||||
to binary operators are converted to the same types.
|
||||
Use m2expr_BuildAddAddress instead of BuildAdd for address
|
||||
arithmetic.
|
||||
* gm2/gm2-gcc/m2expr.h: fix header for m2expr_BuildAddAddress.
|
||||
* gm2/gm2-gcc/m2statement.c: many changes to set operators so
|
||||
that COMPOUND_REF are used whenever possible and that operands
|
||||
to binary operators are converted to the same types.
|
||||
Use m2expr_BuildAddAddress instead of BuildAdd for address
|
||||
arithmetic.
|
||||
* gm2/gm2-gcc/m2treelib.c: use COMPOUND_REF whenever possible.
|
||||
Convert all set return values to BITSET. Use m2expr_BuildAddr
|
||||
rather than m2expr_build_unary_op.
|
||||
|
||||
2013-09-14 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/gm2-gcc/m2block.c: more fixes for nested procedures
|
||||
in finishFunctionDecl. Also enabled three asserts.
|
||||
|
||||
2013-09-10 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/gm2-compiler/M2GenGCC.mod: convert all operands for
|
||||
comparison operators.
|
||||
|
||||
2013-09-06 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/gm2-gcc/m2block.c: (cosmetic changes).
|
||||
* gm2/gm2-gcc/m2statement.c: (m2statement_BuildEndFunctionCode)
|
||||
call cgraph_get_create_node for a nested function otherwise
|
||||
call cgraph_finalize_function and gm2_gimplify_function_code.
|
||||
Fixes allow nested procedures to be compiled.
|
||||
|
||||
2013-08-14 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/gm2-lang.c: (gm2_langhook_init_options) New function.
|
||||
(is_cpp_filename) New function. gm2_langhook_post_options
|
||||
call M2Options_SetCC1Quiet. gm2_parse_input_files only call
|
||||
init_PerCompilationInit if filename is not a cpp filename argument.
|
||||
* gm2/gm2spec.c: corrected comment typo. (get_B_or_prefix)
|
||||
New function. add_exec_name use find_executable_path.
|
||||
(lang_register_spec_functions). New function.
|
||||
(add_exec_dir) modified to create the argument -fcppprog=.
|
||||
* gm2/lang-specs.h: add %:exec_prefix(cc1) to all -fcpp options.
|
||||
* gm2/lang.opt: added imultilib to Modula-2.
|
||||
* gm2/gm2-compiler/M2DriverOptions.def: (CppCommandLine) New function.
|
||||
* gm2/gm2-compiler/M2DriverOptions.mod: (CppCommandLine) implemented
|
||||
new function.
|
||||
* gm2/gm2-compiler/M2Options.def: (SetCC1Quiet) New function.
|
||||
* gm2/gm2-compiler/M2Options.mod: (ScanCppArgs) Removed function.
|
||||
(CppCommandLine) New function. (CppProg) New function.
|
||||
(CppArg) New function. (SetCC1Quiet) New function.
|
||||
* gm2/gm2-compiler/M2Preprocess.mod: removed hack inside PreprocessModule.
|
||||
* gm2/gm2-gcc/m2options.h: New definitions for M2Options_SetCC1Quiet,
|
||||
M2Options_CppProg and M2Options_CppArg.
|
||||
* gm2/patches/gcc/4.7.3/01-patches: rebuilt.
|
||||
* gm2/patches/gcc/4.7.3/02-patches: rebuilt.
|
||||
* gm2/patches/gcc/4.7.3/03-patches: rebuilt.
|
||||
* gm2/patches/gcc/4.7.3/04-patches: rebuilt.
|
||||
* gm2/patches/gcc/4.7.3/05-patches: rebuilt.
|
||||
* gm2/patches/gcc/4.7.3/06-patches: rebuilt.
|
||||
* gm2/patches/gcc/4.7.3/07-patches: rebuilt.
|
||||
* gm2/patches/gcc/4.7.3/08-patches: rebuilt.
|
||||
|
||||
2013-07-20 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/configure.in: corrected dates.
|
||||
* gm2/gm2spec.c: (add_B_prefix) now calls insert_option. (add_library)
|
||||
calls insert_option. (insert_option) New function.
|
||||
* gm2/bnf/gm2l.bnf: corrected dates and also emit full path to the
|
||||
source file in the comment section. Also exit(1) if no source file
|
||||
can be found.
|
||||
* gm2/gm2-compiler/gm2lcc.mod: allow -B to either take a concatenated
|
||||
argument or use the next argument.
|
||||
|
||||
2013-07-15 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/gm2spec.c: (fe_generate_option) fixed cast to XCNEWVEC.
|
||||
(printOption) moved function earlier in the file.
|
||||
(add_library) position is now declared as unsigned int.
|
||||
(add_library) more debugging, also copy arguments correctly
|
||||
into the new array. (lang_specific_driver) corrected strncmp
|
||||
count.
|
||||
|
||||
2013-07-12 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/gm2spec.c: get_prefix removed string literal and replaced it with
|
||||
PREFIX. Fix to call add_link_from_include swapped parameters. Use
|
||||
unsigned int as a comparison. Removed unused variable.
|
||||
* gm2/Make-lang.in: add -DPREFIX to the build rule for gm2spec.o.
|
||||
* gm2/gm2.texi: removed item about limitation to link as this is now fixed.
|
||||
|
||||
2013-07-11 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/gm2-lang.c: gm2_langhook_getdecls return value from m2block_GetGlobals().
|
||||
gm2_langhook_write_globals call write_global_declarations.
|
||||
* gm2/gm2spec.c: (purge_include_options) New function. Call ge_generate_option
|
||||
if -I is found.
|
||||
* gm2/gm2-compiler/M2GenGCC.mod: corrected dates.
|
||||
* gm2/gm2-gcc/m2block.c: assert_global_names (New function). m2block_GetGlobals
|
||||
call assert_global_names and return global_binding_level->names.
|
||||
* gm2/gm2-gcc/m2block.def: GetGlobals (New procedure function).
|
||||
* gm2/gm2-gcc/m2block.h: GetGlobals (New procedure function).
|
||||
* gm2/gm2-gcc/m2decl.c: added debugging hooks to detect variables being declared.
|
||||
* gm2/gm2spec.c: convert_include_into_link (New procedure function).
|
||||
|
||||
2013-07-08 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/Make-lang.in: removed installation rules for library modules.
|
||||
* gm2/gm2.texi: added information on how to build gm2 grafted onto gcc-4.7.3.
|
||||
* gm2/gm2spec.c: many changes which reintroduce the gm2 linking mechanism and
|
||||
via specs. Many changes due to the differences between gcc-4.7.3 and gcc-4.1.2.
|
||||
* gm2/lang-specs.h: corrected dates.
|
||||
* gm2/gm2-compiler/M2Defaults.def: corrected dates.
|
||||
* gm2/gm2-compiler/M2Defaults.mod: corrected dates.
|
||||
* gm2/gm2-compiler/M2FileName.def: corrected dates.
|
||||
* gm2/gm2-compiler/M2FileName.mod: corrected dates.
|
||||
* gm2/gm2-compiler/M2Options.mod: added Debugging and printf1.
|
||||
* gm2/gm2-compiler/M2Search.def: corrected dates.
|
||||
* gm2/gm2-compiler/M2Search.mod: corrected dates.
|
||||
* gm2/gm2-compiler/gm2lcc.mod: corrected dates.
|
||||
* gm2/www/Makefile.in: commented out texisrc subcomponents and fixed path for
|
||||
TEXI2HTML.
|
||||
* gm2/patches/gcc/4.7.3/01-patches: (Re-made patch).
|
||||
* gm2/patches/gcc/4.7.3/02-patches: (Re-made patch).
|
||||
* gm2/patches/gcc/4.7.3/03-patches: (Re-made patch).
|
||||
* gm2/patches/gcc/4.7.3/04-patches: (Re-made patch).
|
||||
* gm2/patches/gcc/4.7.3/05-patches: (New file).
|
||||
|
||||
2013-06-14 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/Make-lang.in: removed many of the library building rules.
|
||||
* gm2/Makefile.in: added description comment.
|
||||
* gm2/gm2.texi: updated dependencies for building gm2 on the gcc-4.7.x.
|
||||
* gm2/examples/pge/rotating-line.asc: rebuilt the .asc.
|
||||
* gm2/gm2-libs-ch/termios.c: include correct target/host configure header file.
|
||||
* gm2/gm2-libs-min/libc.c: updated copyright dates.
|
||||
* gm2/p2c/p2c.h: tidied formatting.
|
||||
* gm2/p2c/p2c-src/include/system.h: remove include <varargs.h>. Add
|
||||
include of <stddef.h>.
|
||||
|
||||
2013-04-30 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/gm2-compiler/M2ALU.def: (ConvertToType) New procedure.
|
||||
* gm2/gm2-compiler/M2ALU.mod: (ConvertToType) New procedure
|
||||
implemented.
|
||||
Call ToInteger to change internal GCC types when computing bitsets.
|
||||
* gm2/gm2-compiler/M2GenGCC.mod: GetFieldNo converts M2ALU gcc trees
|
||||
using ToCardinal.
|
||||
* gm2/gm2-compiler/M2Quads.mod: (GetProtection) New procedure function.
|
||||
(CheckNeedPriorityBegin) create variable of PROTECTION type rather than
|
||||
CARDINAL.
|
||||
* gm2/gm2-gcc/m2convert.c: (ToInteger) New function.
|
||||
* gm2/gm2-gcc/m2convert.def: (ToInteger) New procedure function.
|
||||
* gm2/gm2-gcc/m2convert.h: (ToInteger) New procedure function.
|
||||
* gm2/gm2-gcc/m2expr.c: (m2expr_BuildLogicalShift) convert binary
|
||||
operands to the same type.
|
||||
* gm2/gm2-gcc/m2statement.c: (m2statement_BuildUnaryForeachWordDo)
|
||||
convert binary operands to the same type and correct the call to
|
||||
(*unop).
|
||||
* gm2/gm2-gcc/m2statement.h: corrected parameter (*unop) to
|
||||
include the location_t parameter.
|
||||
|
||||
2013-04-25 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/c.flex: changed variable names try into ctry to avoid compiler
|
||||
warning.
|
||||
* gm2/gm2-lang.c: (gimplify_expr_stmt) New function.
|
||||
(gm2_langhook_gimplify_expr) reimplemented to gimplify THROW_EXPR
|
||||
and EXPR_STMT.
|
||||
* gm2/gm2-tree.def: fixed dates.
|
||||
* gm2/m2pp.c: (m2pp_simple_expression) added CLEANUP_POINT_EXPR
|
||||
handling. Check issue begin before exception related nodes to aid
|
||||
pretty printing.
|
||||
* gm2/gm2-gcc/m2except.c: huge rewrite to bring it into line with
|
||||
the exception handling schema used in gcc-4.7.1. Use
|
||||
m2statements to call the exception handling helper functions.
|
||||
* gm2/gm2-gcc/m2statement.c: fixed typo in comment.
|
||||
* gm2/gm2spec.c: change fseen_no_exceptions into fseen_exceptions
|
||||
and invert logic.
|
||||
* gm2/lang.opt: use fexceptions rather than fno-exceptions
|
||||
and use the option value which by default is TRUE.
|
||||
|
||||
2013-04-18 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/gm2-libs/config-host: rebuilt.
|
||||
* gm2/gm2-libs/config-host.in: fix to generate SIZEOF_long and
|
||||
presence of struct timeval.
|
||||
* gm2/gm2-libs/config-target: rebuilt.
|
||||
* gm2/gm2-libs/config-target.in: fix to generate SIZEOF_long and
|
||||
presence of struct timeval.
|
||||
* gm2/gm2-libs/gm2-libs-host.h.in: add define for SIZEOF_LONG and
|
||||
HAVE_TIMEVAL.
|
||||
* gm2/gm2-libs/gm2-libs-target.h.in: add define for SIZEOF_LONG and
|
||||
HAVE_TIMEVAL.
|
||||
* gm2/Make-lang.in: (gm2.maintainer-reconfigure)
|
||||
(gm2.maintainer-help) New rules.
|
||||
* gm2/configure.in: fixed release number to 1.0.5.
|
||||
* gm2/configure: rebuilt.
|
||||
|
||||
2013-04-11 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/gm2-gcc/m2type.c: (m2type_GetArrayNoOfElements) call
|
||||
m2expr_FoldAndStrip to ensure array bounds are defined by
|
||||
constants. (m2type_BuildArrayIndexType) call
|
||||
m2expr_FoldAndStrip to ensure array bounds are defined by
|
||||
constants. This fix allows DynamicStrings.mod to compile.
|
||||
* gm2/gm2-gcc/m2type.c: (m2type_BuildEndRecord) removed call
|
||||
to m2block_pushDecl.
|
||||
|
||||
2013-04-10 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/gm2-lang.c: comment out definition for LANG_HOOKS_GIMPLIFY_EXPR.
|
||||
* gm2/gm2-compiler/M2ALU.mod: Convert top of stack to Integer type.
|
||||
* gm2/gm2-compiler/M2GenGCC.mod: ensure that the global scope is in use in CodeEndFile,
|
||||
CodeStartDefFile, CodeStartModFile. ConvertForComparison convert pointer types to
|
||||
ADDRESS. Fix calls to BuildThrow to use a location initial parameter.
|
||||
* gm2/gm2-compiler/M2Range.mod: (CodeWholeZero) convert const lit zero into the same
|
||||
type as, e.
|
||||
* gm2/gm2-gcc/m2block.c: added DEBUGGING macro and debugging prints.
|
||||
* gm2/gm2-gcc/m2convert.c: (m2convert_BuildConvert) added more steps to aid debugging.
|
||||
* gm2/gm2-gcc/m2convert.h: (m2convert_BuildConvert) changed parameter names.
|
||||
* gm2/gm2-gcc/m2except.def: (BuildThrow) added missing initial parameter.
|
||||
* gm2/gm2-gcc/m2expr.c: (gm2/gm2-gcc/m2expr.c) added conversion between
|
||||
pointer types for MINUS_EXPR.
|
||||
* gm2/gm2-gcc/m2statement.c: (m2statement_BuildEndFunctionCode) call
|
||||
gm2_gimplify_function_node.
|
||||
* gm2/gm2-gcc/m2treelib.c: (m2treelib_do_jump_if_bit) use m2expr_GetWordZero
|
||||
rather than m2expr_GetIntegerZero.
|
||||
* gm2/gm2-gcc/m2type.c: (m2type_InitBaseTypes) call m2expr_init.
|
||||
|
||||
2013-03-27 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/gm2spec.c: intemediate checkin. With enough changes to allow the
|
||||
libraries to compile.
|
||||
* gm2/lang-specs.h: intemediate checkin. With enough changes to allow the
|
||||
libraries to compile.
|
||||
* gm2/lang.opt: changed help strings for options which are shared by C into
|
||||
comments.
|
||||
* gm2/gm2-compiler/M2GCCDeclare.mod: convert resolved constants into a
|
||||
specific type.
|
||||
* gm2/gm2-compiler/M2GenGCC.mod: (ConvertBinaryOperands) New procedure.
|
||||
Convert binary operands into same types.
|
||||
* gm2/gm2-compiler/M2Options.mod: Quiet default to TRUE.
|
||||
* gm2/gm2-compiler/M2Range.mod: convert operands to IfOutsideLimits to
|
||||
the same type.
|
||||
* gm2/gm2-gcc/m2expr.c: convert operands to BuildLessThan to the same types.
|
||||
* gm2/gm2-gcc/m2expr.def: (BuildAddAddress) New procedure function.
|
||||
* gm2/gm2-gcc/m2expr.h: (BuildAddAddress) New procedure function.
|
||||
* gm2/gm2-gcc/m2statement.c: BuildIndirectProcedureCall use TREE_VALUE (t)
|
||||
rather than, t.
|
||||
|
||||
2013-03-22 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/gm2spec.c: many bug fixes relating to using (*in_options)[]
|
||||
rather than options[].
|
||||
|
||||
2013-03-20 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/Make-lang.in: added gm2/gm2-gcc/m2assert.o to list
|
||||
of objects.
|
||||
* gm2/TODO: added new future change request.
|
||||
* gm2/gm2-lang.c: added -flocation= flag for internal debugging.
|
||||
Tidied up file by removing some of the #if 0 code.
|
||||
* gm2/gm2spec.c: re-written comment for clarity.
|
||||
* gm2/lang-options.h: added -x and -flocation= options.
|
||||
* gm2/lang.opt: added -flocation= and -x specifications.
|
||||
* gm2/m2.flex: override the current location if -flocation is set.
|
||||
* gm2/m2pp.c: add debugging code and also handle the expression node
|
||||
POINTER_PLUS_EXPR.
|
||||
* gm2/gm2-compiler/M2GenGCC.mod: added location to many of the build tree functions.
|
||||
Also convert operands correctly in FoldBecomes. Added type checking in binary
|
||||
operators.
|
||||
* gm2/gm2-compiler/M2Options.def: (OverrideLocation, SetForcedLocation) New Procedures.
|
||||
* gm2/gm2-compiler/M2Options.mod: (OverrideLocation, SetForcedLocation) Implemented.
|
||||
* gm2/gm2-compiler/M2Quads.mod: Set types for intemediate constants when calculating
|
||||
unbounded array indices.
|
||||
* gm2/gm2-compiler/M2Range.mod: ensure that max min values are checked against the
|
||||
same typed variable.
|
||||
* gm2/gm2-compiler/M2System.def: add location to InitSystem.
|
||||
* gm2/gm2-compiler/M2System.mod: add location to InitSystem.
|
||||
* gm2/gm2-gcc/m2assert.h: added m2assert_AssertLocation prototype. Convert m2assert.h
|
||||
to general modular style header file.
|
||||
* gm2/gm2-gcc/m2block.c: ensure that all declarations are added to the BIND_EXPR_BODY.
|
||||
* gm2/gm2-gcc/m2builtins.def: add location_t to many of the build tree procedure functions.
|
||||
* gm2/gm2-gcc/m2convert.c: use m2assert_AssertLocation.
|
||||
* gm2/gm2-gcc/m2decl.c: use m2assert_AssertLocation.
|
||||
* gm2/gm2-gcc/m2except.c: use m2assert_AssertLocation.
|
||||
* gm2/gm2-gcc/m2expr.c: use m2assert_AssertLocation. Fixed bugs in type conversion.
|
||||
* gm2/gm2-gcc/m2expr.h: added m2expr_GetCardinalZero and m2expr_GetCardinalOne.
|
||||
* gm2/gm2-gcc/m2options.h: M2Options_SetForcedLocation, M2Options_OverrideLocation (New
|
||||
procedure functions).
|
||||
* gm2/gm2-gcc/m2statement.c: use m2assert_AssertLocation.
|
||||
* gm2/gm2-gcc/m2top.c: remove call to cgraph_finalize_compilation_unit.
|
||||
* gm2/gm2-gcc/m2treelib.c: fix DoCall by using TREE_VALUE (l) rather than, l.
|
||||
* gm2/gm2-gcc/m2type.c: use m2assert_AssertLocation.
|
||||
* gm2/gm2-libs/FIO.mod: cast position to INTEGER before comparing it to the return
|
||||
value for write.
|
||||
* gm2/gm2-gcc/m2assert.c: (New file).
|
||||
|
||||
2013-02-21 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/patches/gcc/4.7.1/01-patches: (New file).
|
||||
* gm2/patches/gcc/4.7.1/02-patches: (New file).
|
||||
|
||||
2013-02-18 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/gm2-libs-iso/RandomNumber.def: (New file).
|
||||
* gm2/gm2-libs-iso/RandomNumber.mod: (New file).
|
||||
|
||||
2013-02-11 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
|
||||
* gm2/gm2-lang.c: removed reference to gm2-common.h.
|
||||
* gm2/gm2-lang.h: include gm2_langhook_init and gm2_langhook_handle_option.
|
||||
* gm2/gm2-gcc/m2options.h: corrected spelling of M2Options_setdefextension
|
||||
and M2Options_setmodextension.
|
||||
* gm2/gm2-compiler/M2DebugStack.def: (New file).
|
||||
* gm2/gm2-compiler/M2DebugStack.mod: (New file).
|
||||
* gm2/gm2-compiler/M2DriverOptions.def: (New file).
|
||||
* gm2/gm2-compiler/M2DriverOptions.mod: (New file).
|
||||
|
||||
2013-02-09 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/Make-lang.in: build rules changed to enable gm2 to be built
|
||||
with gcc-4.7.1.
|
||||
* gm2/NEWS: minor version number change.
|
||||
* gm2/config-lang.in: removed gcc-3.x.y version checking.
|
||||
* gm2/configure: rebuilt.
|
||||
* gm2/configure.in: updated as gccgm2.c is no longer used.
|
||||
* gm2/gccgm2.c: (removed). The contents of this 12000 line file
|
||||
have been replaced by the modular equivalent in gm2/gm2-gcc/*.[ch]
|
||||
* gm2/gm2-common.h: (removed).
|
||||
* gm2/gm2-common.c: (removed).
|
||||
* gm2/gm2-lang.c: changed to use the gm2/gm2-gcc structure and gcc-4.7.1.
|
||||
* gm2/gm2-lang.h: changed to use the gm2/gm2-gcc structure and gcc-4.7.1.
|
||||
* gm2/gm2-tree.def: removed THROW_EXPR, TRY_BLOCK, HANDLER, EXPR_STMT definitions.
|
||||
* gm2/gm2-tree.h: commented out the language tree code.
|
||||
* gm2/gm2.texi: modified to reflect library command line switch changes between
|
||||
1.0.1 and 1.0.4. Improved the assembly language example together with an explanation.
|
||||
Added alignment information. Updated the Solaris building instructions.
|
||||
* gm2/gm2config.h.in: (updated to reflect gcc-4.7.1).
|
||||
* gm2/gm2spec.c: (updated to reflect gcc-4.7.1).
|
||||
* gm2/lang-options.h: changed -fverbose-unbounded to -Wverbose-unbounded.
|
||||
* gm2/lang.opt: changed so that libraries dialects can be ordered.
|
||||
* gm2/m2.flex: updated to reflect gcc-4.7.1 and the new gm2/gm2-gcc structure.
|
||||
* gm2/m2pp.c: updated to reflect gcc-4.7.1 and the new gm2/gm2-gcc structure.
|
||||
* gm2/p2crc: added many more AvoidNames to avoid conflicts with C header files.
|
||||
* gm2/version.c: updated to 1.0.5.
|
||||
* gm2/bnf/gm2l.bnf: updated to reflect gcc-4.7.1 and the new gm2/gm2-gcc structure.
|
||||
* gm2/bnf/gm2m.bnf: updated to reflect gcc-4.7.1 and the new gm2/gm2-gcc structure.
|
||||
* gm2/bnf/m2-2.bnf: updated to reflect gcc-4.7.1 and the new gm2/gm2-gcc structure.
|
||||
* gm2/bnf/m2-3.bnf: updated to reflect gcc-4.7.1 and the new gm2/gm2-gcc structure.
|
||||
* gm2/bnf/m2-c.bnf: updated to reflect gcc-4.7.1 and the new gm2/gm2-gcc structure.
|
||||
* gm2/bnf/m2-h.bnf: updated to reflect gcc-4.7.1 and the new gm2/gm2-gcc structure.
|
||||
* gm2/bnf/m2.bnf: updated to reflect gcc-4.7.1 and the new gm2/gm2-gcc structure.
|
||||
* gm2/el/g-mode.el: updated to reflect gcc-4.7.1 and the new gm2/gm2-gcc structure.
|
||||
* gm2/examples/gravity/README: updated package versions required.
|
||||
* gm2/examples/gravity/twoDsim.def: updated dates.
|
||||
* gm2/examples/gravity/twoDsim.mod: updated dates and improved debugging.
|
||||
* gm2/examples/gravity/doc/collision.ms: reorganised document.
|
||||
* gm2/examples/hello/Makefile.in: modified build rules.
|
||||
* gm2/examples/hello/hello.mod: added blank line.
|
||||
* gm2/examples/map/AdvMap.def: removed BITSET import.
|
||||
* gm2/gm2-compiler/Indexing.mod: updated to reflect gcc-4.7.1 and the new gm2/gm2-gcc structure.
|
||||
* gm2/gm2-compiler/M2ALU.def: updated to reflect gcc-4.7.1 and the new gm2/gm2-gcc structure.
|
||||
* gm2/gm2-compiler/M2ALU.mod: updated to reflect gcc-4.7.1 and the new gm2/gm2-gcc structure.
|
||||
* gm2/gm2-compiler/M2Base.def: updated to reflect gcc-4.7.1 and the new gm2/gm2-gcc structure.
|
||||
* gm2/gm2-compiler/M2Base.mod: updated to reflect gcc-4.7.1 and the new gm2/gm2-gcc structure.
|
||||
* gm2/gm2-compiler/M2Batch.def: updated to reflect gcc-4.7.1 and the new gm2/gm2-gcc structure.
|
||||
* gm2/gm2-compiler/M2Batch.mod: updated to reflect gcc-4.7.1 and the new gm2/gm2-gcc structure.
|
||||
* gm2/gm2-compiler/M2Bitset.mod: updated to reflect gcc-4.7.1 and the new gm2/gm2-gcc structure.
|
||||
* gm2/gm2-compiler/M2CaseList.def: updated to reflect gcc-4.7.1 and the new gm2/gm2-gcc structure.
|
||||
* gm2/gm2-compiler/M2CaseList.mod: updated to reflect gcc-4.7.1 and the new gm2/gm2-gcc structure.
|
||||
* gm2/gm2-compiler/M2Code.mod: updated to reflect gcc-4.7.1 and the new gm2/gm2-gcc structure.
|
||||
* gm2/gm2-compiler/M2Comp.def: updated to reflect gcc-4.7.1 and the new gm2/gm2-gcc structure.
|
||||
* gm2/gm2-compiler/M2Comp.mod: updated to reflect gcc-4.7.1 and the new gm2/gm2-gcc structure.
|
||||
* gm2/gm2-compiler/M2Error.mod: updated to reflect gcc-4.7.1 and the new gm2/gm2-gcc structure.
|
||||
* gm2/gm2-compiler/M2GCCDeclare.def: updated to reflect gcc-4.7.1 and the new gm2/gm2-gcc structure.
|
||||
* gm2/gm2-compiler/M2GCCDeclare.mod: updated to reflect gcc-4.7.1 and the new gm2/gm2-gcc structure.
|
||||
* gm2/gm2-compiler/M2GenGCC.def: updated to reflect gcc-4.7.1 and the new gm2/gm2-gcc structure.
|
||||
* gm2/gm2-compiler/M2GenGCC.mod: updated to reflect gcc-4.7.1 and the new gm2/gm2-gcc structure.
|
||||
* gm2/gm2-compiler/M2LexBuf.def: updated to reflect gcc-4.7.1 and the new gm2/gm2-gcc structure.
|
||||
* gm2/gm2-compiler/M2LexBuf.mod: updated to reflect gcc-4.7.1 and the new gm2/gm2-gcc structure.
|
||||
* gm2/gm2-compiler/M2MetaError.mod: updated to reflect gcc-4.7.1 and the new gm2/gm2-gcc structure.
|
||||
* gm2/gm2-compiler/M2Options.def: updated to reflect gcc-4.7.1 and the new gm2/gm2-gcc structure.
|
||||
* gm2/gm2-compiler/M2Options.mod: updated to reflect gcc-4.7.1 and the new gm2/gm2-gcc structure.
|
||||
* gm2/gm2-compiler/M2Preprocess.mod: updated to reflect gcc-4.7.1 and the new gm2/gm2-gcc structure.
|
||||
* gm2/gm2-compiler/M2Printf.mod: updated to reflect gcc-4.7.1 and the new gm2/gm2-gcc structure.
|
||||
* gm2/gm2-compiler/M2Quads.def: updated to reflect gcc-4.7.1 and the new gm2/gm2-gcc structure.
|
||||
* gm2/gm2-compiler/M2Quads.mod: updated to reflect gcc-4.7.1 and the new gm2/gm2-gcc structure.
|
||||
* gm2/gm2-compiler/M2Range.def: updated to reflect gcc-4.7.1 and the new gm2/gm2-gcc structure.
|
||||
* gm2/gm2-compiler/M2Range.mod: updated to reflect gcc-4.7.1 and the new gm2/gm2-gcc structure.
|
||||
* gm2/gm2-compiler/M2Reserved.def: updated to reflect gcc-4.7.1 and the new gm2/gm2-gcc structure.
|
||||
* gm2/gm2-compiler/M2Reserved.mod: updated to reflect gcc-4.7.1 and the new gm2/gm2-gcc structure.
|
||||
* gm2/gm2-compiler/M2System.def: updated to reflect gcc-4.7.1 and the new gm2/gm2-gcc structure.
|
||||
* gm2/gm2-compiler/M2System.mod: updated to reflect gcc-4.7.1 and the new gm2/gm2-gcc structure.
|
||||
* gm2/gm2-compiler/P2SymBuild.def: updated to reflect gcc-4.7.1 and the new gm2/gm2-gcc structure.
|
||||
* gm2/gm2-compiler/P2SymBuild.mod: updated to reflect gcc-4.7.1 and the new gm2/gm2-gcc structure.
|
||||
* gm2/gm2-compiler/PCSymBuild.mod: updated to reflect gcc-4.7.1 and the new gm2/gm2-gcc structure.
|
||||
* gm2/gm2-compiler/Sets.mod: updated to reflect gcc-4.7.1 and the new gm2/gm2-gcc structure.
|
||||
* gm2/gm2-compiler/SymbolConversion.def: updated to reflect gcc-4.7.1 and the new gm2/gm2-gcc structure.
|
||||
* gm2/gm2-compiler/SymbolConversion.mod: updated to reflect gcc-4.7.1 and the new gm2/gm2-gcc structure.
|
||||
* gm2/gm2-compiler/SymbolKey.def: updated to reflect gcc-4.7.1 and the new gm2/gm2-gcc structure.
|
||||
* gm2/gm2-compiler/SymbolKey.mod: updated to reflect gcc-4.7.1 and the new gm2/gm2-gcc structure.
|
||||
* gm2/gm2-compiler/SymbolTable.def: updated to reflect gcc-4.7.1 and the new gm2/gm2-gcc structure.
|
||||
* gm2/gm2-compiler/SymbolTable.mod: updated to reflect gcc-4.7.1 and the new gm2/gm2-gcc structure.
|
||||
* gm2/gm2-compiler/gccgm2.def: updated to reflect gcc-4.7.1 and the new gm2/gm2-gcc structure.
|
||||
* gm2/gm2-compiler/gm2.mod: updated to reflect gcc-4.7.1 and the new gm2/gm2-gcc structure.
|
||||
* gm2/gm2-compiler/m2flex.def: updated to reflect gcc-4.7.1 and the new gm2/gm2-gcc structure.
|
||||
* gm2/gm2-compiler/ppg.mod: updated to reflect gcc-4.7.1 and the new gm2/gm2-gcc structure.
|
||||
* gm2/gm2-libs/Builtins.def: added alloca_trace for debugging.
|
||||
* gm2/gm2-libs/Builtins.mod: implemented alloca_trace for debugging.
|
||||
* gm2/gm2-libs/Indexing.mod: removed BITSET from imports.
|
||||
* gm2/gm2-libs/M2RTS.def: removed BITSET from imports.
|
||||
* gm2/gm2-libs/SYSTEM.def: removed BITSET from export list.
|
||||
* gm2/gm2-libs/config-host: rebuilt.
|
||||
* gm2/gm2-libs/config-host.in: updated version to 1.0.5.
|
||||
* gm2/gm2-libs/config-target: rebuilt.
|
||||
* gm2/gm2-libs/config-target.in: updated version to 1.0.5.
|
||||
* gm2/gm2-libs-boot/SYSTEM.def: removed BITSET from export list.
|
||||
* gm2/gm2-libs-coroutines/SYSTEM.def: removed BITSET from export list.
|
||||
* gm2/gm2-libs-iso/README.texi: updated the list of implemented ISO Modules and GNU Modules.
|
||||
* gm2/gm2-libs-iso/SYSTEM.def: export TBITSIZE.
|
||||
* gm2/gm2-libs-iso/ServerSocket.mod: added missing, RETURN TRUE.
|
||||
* gm2/gm2-libs-iso/StdChans.mod: changed to include 'raw' in the std file descriptors.
|
||||
* gm2/gm2-libs-min/SYSTEM.def: removed BITSET from export list.
|
||||
* gm2/gm2-libs-pim/BitBlockOps.mod: removed BITSET from import list.
|
||||
* gm2/gm2-libs-pim/BitByteOps.mod: removed BITSET from import list.
|
||||
* gm2/gm2-libs-pim/BitWordOps.mod: removed BITSET from import list.
|
||||
* gm2/gm2-libs-pim/Random.def: fixed RandomBytes definition.
|
||||
* gm2/gm2-libs-pim/Random.mod: fixed RandomBytes definition.
|
||||
* gm2/init/gm2linit: updated to reflect gcc-4.7.1 and the new gm2/gm2-gcc structure.
|
||||
* gm2/init/gm2minit: updated to reflect gcc-4.7.1 and the new gm2/gm2-gcc structure.
|
||||
* gm2/p2c/p2c.h: modified prototypes to use plain C.
|
||||
* gm2/p2c/p2c-src/src/citmods.c: use TOUPPER rather than toupper, use TOLOWER rather than tolower.
|
||||
* gm2/p2c/p2c-src/src/decl.c: test for WORD and use unsigned int.
|
||||
* gm2/p2c/p2c-src/src/expr.c: use TOLOWER, ISSPACE, ISDIGIT, ISALPHA rather than their lower case
|
||||
counterparts.
|
||||
* gm2/p2c/p2c-src/src/funcs.c: use TOUPPER rather than the lower case counterpart.
|
||||
* gm2/p2c/p2c-src/src/lex.c: register the uppercase functions: TOLOWER, TOUPPER, ISALPHA, ISDIGIT.
|
||||
* gm2/p2c/p2c-src/src/p2clib.c: use ISSPACE and TOUPPER rather than their lower case counterparts.
|
||||
* gm2/tools-src/def2texi.py: many changes to explicitly differentiate between the build and src directories.
|
||||
* gm2/tools-src/mklink.c: modified so that the default library is NULL and new --lib specifies the library.
|
||||
Also alter long options to use -- rather than -.
|
||||
* gm2/ulm-lib-gm2/std/Archive.def: remove BITSET from import.
|
||||
* gm2/ulm-lib-gm2/std/M2RTS.mod: remove BITSET from import.
|
||||
* gm2/ulm-lib-gm2/std/MathLib.mod: remove BITSET from import.
|
||||
* gm2/ulm-lib-gm2/std/Plot.mod: remove BITSET from import.
|
||||
* gm2/ulm-lib-gm2/sys/SYSTEM.def: remove BITSET from import.
|
||||
* gm2/ulm-lib-gm2/sys/SysIoctl.def: remove BITSET from import.
|
||||
* gm2/ulm-lib-gm2/sys/SysStat.def: remove BITSET from import.
|
||||
* gm2/ulm-lib-gm2/sys/SysStat.mod: remove BITSET from import.
|
||||
* gm2/www/tools/texi2tr/html/download.html: modified url to reference gm2-1.0.4.
|
||||
* gm2/www/tools/texi2tr/html/release.html: modified url to reference gm2-1.0.4.
|
||||
|
||||
2013-02-08 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/gm2-gcc/dynamicstrings.h: (New file).
|
||||
* gm2/gm2-gcc/init.c: (New file).
|
||||
* gm2/gm2-gcc/init.cpp: (New file).
|
||||
* gm2/gm2-gcc/init.def: (New file).
|
||||
* gm2/gm2-gcc/init.h: (New file).
|
||||
* gm2/gm2-gcc/m2assert.h: (New file).
|
||||
* gm2/gm2-gcc/m2block.c: (New file).
|
||||
* gm2/gm2-gcc/m2block.def: (New file).
|
||||
* gm2/gm2-gcc/m2block.h: (New file).
|
||||
* gm2/gm2-gcc/m2builtins.c: (New file).
|
||||
* gm2/gm2-gcc/m2builtins.def: (New file).
|
||||
* gm2/gm2-gcc/m2builtins.h: (New file).
|
||||
* gm2/gm2-gcc/m2convert.c: (New file).
|
||||
* gm2/gm2-gcc/m2convert.def: (New file).
|
||||
* gm2/gm2-gcc/m2convert.h: (New file).
|
||||
* gm2/gm2-gcc/m2decl.c: (New file).
|
||||
* gm2/gm2-gcc/m2decl.def: (New file).
|
||||
* gm2/gm2-gcc/m2decl.h: (New file).
|
||||
* gm2/gm2-gcc/m2except.c: (New file).
|
||||
* gm2/gm2-gcc/m2except.def: (New file).
|
||||
* gm2/gm2-gcc/m2except.h: (New file).
|
||||
* gm2/gm2-gcc/m2expr.c: (New file).
|
||||
* gm2/gm2-gcc/m2expr.def: (New file).
|
||||
* gm2/gm2-gcc/m2expr.h: (New file).
|
||||
* gm2/gm2-gcc/m2linemap.c: (New file).
|
||||
* gm2/gm2-gcc/m2linemap.def: (New file).
|
||||
* gm2/gm2-gcc/m2linemap.h: (New file).
|
||||
* gm2/gm2-gcc/m2misc.c: (New file).
|
||||
* gm2/gm2-gcc/m2misc.def: (New file).
|
||||
* gm2/gm2-gcc/m2misc.h: (New file).
|
||||
* gm2/gm2-gcc/m2options.h: (New file).
|
||||
* gm2/gm2-gcc/m2search.h: (New file).
|
||||
* gm2/gm2-gcc/m2statement.c: (New file).
|
||||
* gm2/gm2-gcc/m2statement.def: (New file).
|
||||
* gm2/gm2-gcc/m2statement.h: (New file).
|
||||
* gm2/gm2-gcc/m2top.c: (New file).
|
||||
* gm2/gm2-gcc/m2top.def: (New file).
|
||||
* gm2/gm2-gcc/m2top.h: (New file).
|
||||
* gm2/gm2-gcc/m2tree.c: (New file).
|
||||
* gm2/gm2-gcc/m2tree.def: (New file).
|
||||
* gm2/gm2-gcc/m2tree.h: (New file).
|
||||
* gm2/gm2-gcc/m2treelib.c: (New file).
|
||||
* gm2/gm2-gcc/m2treelib.def: (New file).
|
||||
* gm2/gm2-gcc/m2treelib.h: (New file).
|
||||
* gm2/gm2-gcc/m2type.c: (New file).
|
||||
* gm2/gm2-gcc/m2type.def: (New file).
|
||||
* gm2/gm2-gcc/m2type.h: (New file).
|
||||
* gm2/gm2-gcc/README: (New file).
|
||||
|
||||
2013-01-09 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/gm2.texi: updated the building process for OpenBSD
|
||||
and NetBSD.
|
||||
|
||||
2013-01-07 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/gm2-libs-iso/SShortWholeIO.def: (added file).
|
||||
* gm2/gm2-libs-iso/SShortWholeIO.mod: (added file).
|
||||
* gm2/gm2-libs-iso/SShortIO.def: (added file).
|
||||
* gm2/gm2-libs-iso/SShortIO.mod: (added file).
|
||||
* gm2/gm2-libs-iso/SLongWholeIO.def: (added file).
|
||||
* gm2/gm2-libs-iso/SLongWholeIO.mod: (added file).
|
||||
* gm2/gm2-libs-iso/ShortIO.def: (added file).
|
||||
* gm2/gm2-libs-iso/ShortIO.mod: (added file).
|
||||
* gm2/gm2-libs-iso/LongWholeIO.def: (added file).
|
||||
* gm2/gm2-libs-iso/LongWholeIO.mod: (added file).
|
||||
* gm2/gm2-libs-iso/ShortWholeIO.def: (added file).
|
||||
* gm2/gm2-libs-iso/ShortWholeIO.mod: (added file).
|
||||
* gm2/gm2/Make-lang.in: added the following modules
|
||||
to be built and installed as part of the ISO libraries:
|
||||
SShortIO.mod, SShortIO.def, SLongWholeIO.mod, SLongWholeIO.def,
|
||||
ShortWholeIO.def, ShortIO.def, LongWholeIO.def, SShortWholeIO.mod
|
||||
ShortWholeIO.mod, ShortIO.mod, LongWholeIO.mod
|
||||
* gm2/gm2-compiler/M2Base.mod: fixed bug, which omitted to declare
|
||||
MaxShortInt, MinShortInt, MaxShortCard, MinShortCard.
|
||||
* gm2/gm2-libs-iso/README.texi: updated list of ISO style modules
|
||||
and their respective copyrights. Minor documentation added.
|
||||
|
||||
936
gcc/m2/ChangeLog-2014
Normal file
936
gcc/m2/ChangeLog-2014
Normal file
@@ -0,0 +1,936 @@
|
||||
2014-12-24 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/examples/pge/pge.py: interim checkin.
|
||||
* gm2/gm2-compiler/SymbolTable.mod: corrected declaration of
|
||||
PutDeclaredModule as reported by Christoph Schlegel.
|
||||
* gm2/gm2-libs-ch/sckt.c: added conditional import of
|
||||
stdio.h as reported by Christoph Schlegel.
|
||||
|
||||
2014-12-22 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/examples/pge/run: changed name of python script.
|
||||
* gm2/examples/swig/strlen/MyStrLib.i: deleted.
|
||||
* gm2/tools-src/createUlmSys: added SYSTEM_UNIXFORK and
|
||||
SYSTEM_UNIXSIGNAL.
|
||||
|
||||
2014-12-09 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/config-lang.in: added new gm2/examples/shared,
|
||||
gm2/examples/full-strlib and gm2/examples/strio examples to the
|
||||
list of Makefiles to be generated via configure.
|
||||
* gm2/examples/swig/exceptions/Makefile.in: rewritten to use
|
||||
libtool.
|
||||
* gm2/examples/swig/exceptions/stresstiny.py: removed unnecessary
|
||||
qualification.
|
||||
* gm2/examples/swig/exceptions/testtiny.py: removed unnecessary
|
||||
qualification.
|
||||
* gm2/examples/swig/exceptions/tiny.def: renamed to libtiny.def.
|
||||
* gm2/examples/swig/exceptions/tiny.mod: renamed to libtiny.mod.
|
||||
* gm2/examples/swig/strio/Makefile: deleted.
|
||||
* gm2/examples/swig/strlib/Makefile.in: rewritten to use libtool.
|
||||
* gm2/examples/swig/strlib/MyStrLib.def: renamed as libStrLib.def.
|
||||
* gm2/examples/swig/strlib/MyStrLib.mod: renamed as libStrLib.mod.
|
||||
* gm2/gm2.texi: rewritten sections on building shared libraries
|
||||
and interface to python using swig given that gm2 now uses libtool.
|
||||
|
||||
2014-12-06 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/examples/swig/dual/Makefile.in: removed unnecessary $(RM).
|
||||
* gm2/examples/swig/tiny/Makefile.in: removed unnecessary $(RM).
|
||||
* gm2/lang-specs.h: changed invocation of -fswig, -fmakelist, -fmakeinit which
|
||||
can only be issued with -c and none of them will generate a .s (or .o) file.
|
||||
The compiler is disabled from producing an output file using %V.
|
||||
|
||||
2014-12-05 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/config-lang.in: added entry for new test example dual.
|
||||
* gm2/examples/hello/Makefile.in: fixed example to build, added
|
||||
reference to stdc++.
|
||||
* gm2/examples/pge/Makefile.in: changed name of pge.py to pgepygame.py.
|
||||
* gm2/examples/pge/pge.py: first cut of a python interface to pge.
|
||||
* gm2/examples/pge/twoDsim.def: moved whereHit back to the definition
|
||||
module.
|
||||
* gm2/examples/pge/twoDsim.mod: moved whereHit back to the definition
|
||||
module.
|
||||
* gm2/examples/swig/tiny/Makefile.in: rewrote build rules as shared libraries
|
||||
are now built using libtool.
|
||||
* gm2/examples/swig/tiny/libtiny.def: rename tiny.def as libtiny.def to comply
|
||||
with libtool.
|
||||
* gm2/examples/swig/tiny/libtiny.mod: rename tiny.def as libtiny.def to comply
|
||||
with libtool.
|
||||
* gm2/examples/swig/tiny/testtiny.py: import libtiny instead of tiny.
|
||||
* gm2/gm2-compiler/gm2lcc.mod: shared libraries are built using libtool changes
|
||||
to allow this tool to deal with .lo, la files. Separate -L from -l as ar
|
||||
does not understand -L. Long options now require --. (--main, --exec,
|
||||
--ignoremain, --startup).
|
||||
* gm2/gm2-compiler/gm2lgen.mod: Long options now require -- (--terminate,
|
||||
--initial, --exit, --main).
|
||||
* gm2/gm2-libs/FIO.mod: corrected dates.
|
||||
* gm2/gm2-libs/libc.def: corrected dates.
|
||||
* gm2/gm2spec.c: corrected formatting. gen_link_path (New function).
|
||||
Use gen_link_path rather than add_include.
|
||||
* gm2/lang-specs.h: changed all gm2lcc and gm2lgen long options to comply
|
||||
with the new -- delimiter.
|
||||
|
||||
2014-11-04 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/gm2-gcc/m2expr.c: (m2expr_BuildForeachWordInSetDoIfExpr) add additional
|
||||
parameter to m2expr_BuildForeachWordInSetDoIfExpr (is_lvalue).
|
||||
* gm2/gm2-gcc/m2treelib.c: (m2treelib_get_set_value) extra parameter,
|
||||
is_lvalue, which builds a component ref using an indirect value.
|
||||
* gm2/gm2-gcc/m2treelib.h: added new parameter to prototype.
|
||||
* gm2/m2pp.c: (m2pp_bit_ior_expr) New function.
|
||||
|
||||
2014-10-30 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/examples/pge/popWorld.def: tidied up comment.
|
||||
* gm2/examples/pge/popWorld.mod: tidied up comment.
|
||||
* gm2/examples/pge/twoDsim.def: tidied up comment and moved a type definition
|
||||
into the implementation module.
|
||||
* gm2/examples/pge/twoDsim.mod: added type definition.
|
||||
* gm2/gm2-compiler/M2GCCDeclare.mod: (AlignProcedureWithSource) removed procedure.
|
||||
(DeclareProcedureToGccWholeProgram), (DeclareProcedureToGccSeparateProgram)
|
||||
call GetProcedureBeginEnd to obtain the position of the BEGIN END tokens for
|
||||
accurate debugging info.
|
||||
* gm2/gm2-compiler/M2GenGCC.mod: (CodeNewLocalVar) and (CodeKillLocalVar)
|
||||
also obtain the position of the BEGIN END tokens for accurate debugging info.
|
||||
* gm2/gm2-compiler/M2Quads.mod: (BuildProcedureBegin) call PutProcedureBegin to
|
||||
save the BEGIN location. (BuildProcedureEnd) call PutProcedureEnd to
|
||||
save the END location.
|
||||
* gm2/gm2-compiler/SymbolTable.def: (PutProcedureBegin) define new procedure.
|
||||
(PutProcedureEnd) define new procedure.
|
||||
* gm2/gm2-compiler/SymbolTable.mod: (PutProcedureBegin) implement new procedure.
|
||||
(PutProcedureEnd) implement new procedure.
|
||||
* gm2/gm2-libs-iso/IOChan.mod: (Look) fix bug to ensure the result is set to the
|
||||
result of the look.
|
||||
* gm2/gm2-libs-iso/RTfio.def: changed specification of iseoln to avoid having to
|
||||
read ahead an extra character.
|
||||
* gm2/gm2-libs-iso/RTfio.mod: use FIO.WasEOLN rather than FIO.EOLN.
|
||||
(checkPostRead) corrected comment. (setReadResult) changed order of
|
||||
if statements (check worst condition first).
|
||||
* gm2/gm2-libs-iso/RTgen.mod: (doLook) restore old result, but return newer
|
||||
result in r.
|
||||
* gm2/gm2-libs/FIO.def: (WasEOLN) new procedure function.
|
||||
* gm2/gm2-libs/FIO.mod: (WasEOLN) new procedure function implemented. Introduced
|
||||
new state endofline which is set appropriately.
|
||||
|
||||
2014-10-23 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/gm2-compiler/M2GCCDeclare.mod: (BuildEndFunctionDeclaration) introduce
|
||||
begin, end locations. (finishFunctionDecl) add location parameter.
|
||||
* gm2/gm2-compiler/M2GenGCC.mod: (finishFunctionDecl) extra parameter.
|
||||
* gm2/gm2-compiler/M2Quads.mod: (BuildProcedureBegin) and (BuildProcedureEnd)
|
||||
record the tokenno of the BEGIN or END respectively.
|
||||
* gm2/gm2-gcc/m2block.c: (finishFunctionDecl) sets location in the bind_expr.
|
||||
* gm2/gm2-gcc/m2block.def: (finishFunctionDecl) additional parameter.
|
||||
* gm2/gm2-gcc/m2block.h: (finishFunctionDecl) additional parameter.
|
||||
* gm2/gm2-gcc/m2decl.c: (BuildEndFunctionDeclaration) begin and end
|
||||
location parameters.
|
||||
* gm2/gm2-gcc/m2decl.def: (BuildEndFunctionDeclaration) begin and end
|
||||
location parameters.
|
||||
* gm2/gm2-gcc/m2decl.h: (BuildEndFunctionDeclaration) begin and end
|
||||
location parameters.
|
||||
* gm2/gm2-gcc/m2except.c: pass additional parameter for builtin functions.
|
||||
* gm2/gm2-gcc/m2statement.c: (SetBeginLocation), (SetEndLocation) New procedures.
|
||||
* gm2/gm2-gcc/m2statement.def: (SetBeginLocation), (SetEndLocation) New procedures.
|
||||
* gm2/gm2-gcc/m2statement.h: (SetBeginLocation), (SetEndLocation) New procedures.
|
||||
* gm2/gm2-gcc/m2top.c: tidied up spacing.
|
||||
* gm2/gm2spec.c: remember_link_arg extra parameter.
|
||||
* gm2/m2pp.c: added debugging stub.
|
||||
|
||||
2014-10-14 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/gm2-libs-iso/RTgen.mod: (setReadResult) New procedure.
|
||||
Modified doLook to use setReadResult.
|
||||
* gm2/gm2spec.c: started refactoring. Introduced and used AS and GM2CC
|
||||
macros. Use cc1 or cc1plus rather than gm2cc. gm2cc is no longer needed.
|
||||
* gm2/Make-file.in: removed all references to gm2cc.
|
||||
|
||||
2014-10-10 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* testsuite/gm2/pim/pass/gm2.exp: added more paths.
|
||||
* testsuite/lib/gm2.exp: refactored gm2_init_pim and friends.
|
||||
|
||||
2014-10-09 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/gm2-compiler/M2ALU.mod: use GetDeclaredMod as a replacement for GetDeclared.
|
||||
* gm2/gm2-compiler/M2Base.mod: use GetDeclaredMod as a replacement for GetDeclared.
|
||||
* gm2/gm2-compiler/M2GCCDeclare.mod: use GetDeclaredMod as a replacement for GetDeclared.
|
||||
* gm2/gm2-compiler/M2GenGCC.mod: use GetDeclaredMod as a replacement for GetDeclared.
|
||||
* gm2/gm2-compiler/M2MetaError.def: provide %1M as a formatting specification.
|
||||
* gm2/gm2-compiler/M2MetaError.mod: implement %1M as a formatting specification.
|
||||
* gm2/gm2-compiler/M2Optimize.mod: use GetDeclaredMod as a replacement for GetDeclared.
|
||||
* gm2/gm2-compiler/M2Quads.mod: use GetDeclaredMod as a replacement for GetDeclared.
|
||||
Also use tokenno rather than line number in NewLocalVar and KillLocalVar.
|
||||
* gm2/gm2-compiler/M2Students.mod: use GetDeclaredMod as a replacement for GetDeclared.
|
||||
* gm2/gm2-compiler/P1SymBuild.mod: record location of implementation and definition module
|
||||
when declaring procedures.
|
||||
* gm2/gm2-compiler/P2SymBuild.mod: record location of implementation and definition module
|
||||
when declaring procedures.
|
||||
* gm2/gm2-compiler/PCSymBuild.mod: use GetDeclaredMod as a replacement for GetDeclared.
|
||||
* gm2/gm2-compiler/SymbolTable.def: export GetDeclaredMod and GetDeclaredDef.
|
||||
* gm2/gm2-compiler/SymbolTable.mod: implement GetDeclaredMod and GetDeclaredDef.
|
||||
(New procedure) GetDeclaredDefinition. (New procedure) GetDeclaredModule.
|
||||
* gm2/gm2-gcc/m2block.c: removed debugging traps.
|
||||
* gm2/gm2-gcc/m2expr.c: tidied formatting.
|
||||
* gm2/gm2-gcc/m2statement.c: removed unnecessary code.
|
||||
(add_stmt) changed to record location.
|
||||
* gm2/gm2-gcc/m2treelib.c: allow component refs to be deferenced by pointers.
|
||||
* gm2/gm2-libs-iso/RTgen.mod: skip a character without pushing it back twice in
|
||||
succession.
|
||||
* gm2/m2pp.c: introduce line file numbers into the source code dump.
|
||||
* testsuite/gm2/calling-c/datatypes/unbounded/run/pass/gm2.exp: many changes to
|
||||
simplify the setting up of the chosen dialect and libraries. All
|
||||
obvious invocations to gm2_init are replaced by gm2_init_pim, gm2_init_iso,
|
||||
gm2_init_ulm, gm2_init_log, gm2_init_cor.
|
||||
* testsuite/gm2/case/pass/gm2.exp: as above.
|
||||
* testsuite/gm2/complex/pass/gm2.exp: as above.
|
||||
* testsuite/gm2/complex/run/pass/gm2.exp: as above.
|
||||
* testsuite/gm2/coroutines/pim/run/pass/gm2.exp: as above.
|
||||
* testsuite/gm2/cpp/pass/gm2.exp: as above.
|
||||
* testsuite/gm2/cse/fail/gm2.exp: as above.
|
||||
* testsuite/gm2/cse/pass/gm2.exp: as above.
|
||||
* testsuite/gm2/dynamic/pass/gm2.exp: as above.
|
||||
* testsuite/gm2/embedded/pass/gm2.exp: as above.
|
||||
* testsuite/gm2/errors/fail/gm2.exp: as above.
|
||||
* testsuite/gm2/examples/callingC/pass/gm2.exp: as above.
|
||||
* testsuite/gm2/examples/callingC/run/pass/gm2.exp: as above.
|
||||
* testsuite/gm2/examples/cpp/pass/gm2.exp: as above.
|
||||
* testsuite/gm2/examples/cppDef/pass/gm2.exp: as above.
|
||||
* testsuite/gm2/examples/hello/pass/gm2.exp: as above.
|
||||
* testsuite/gm2/examples/map/pass/gm2.exp: as above.
|
||||
* testsuite/gm2/exceptions/run/pass/gm2.exp: as above.
|
||||
* testsuite/gm2/extensions/pass/gm2.exp: as above.
|
||||
* testsuite/gm2/extensions/run/fail/gm2.exp: as above.
|
||||
* testsuite/gm2/extensions/run/pass/gm2.exp: as above.
|
||||
* testsuite/gm2/imports/run/pass/gm2.exp:as above.
|
||||
* testsuite/gm2/iso/fail/gm2.exp: as above.
|
||||
* testsuite/gm2/iso/pass/gm2.exp: as above.
|
||||
* testsuite/gm2/iso/run/pass/gm2.exp: as above.
|
||||
* testsuite/gm2/isocoroutines/run/pass/gm2.exp: as above.
|
||||
* testsuite/gm2/isolib/run/pass/gm2.exp: as above.
|
||||
* testsuite/gm2/link/pim/fail/gm2.exp: as above.
|
||||
* testsuite/gm2/link/pim/fail/import.mod: as above.
|
||||
* testsuite/gm2/link/pim/pass/gm2.exp: as above.
|
||||
* testsuite/gm2/linking/libarchive/pass/gm2.exp: as above.
|
||||
* testsuite/gm2/pim/fail/gm2.exp: as above.
|
||||
* testsuite/gm2/pim/options/bounds/fail/gm2.as above.exp:
|
||||
* testsuite/gm2/pim/options/optimize/run/pass/gm2.expas above.:
|
||||
* testsuite/gm2/pim/pass/gm2.exp: as above.
|
||||
* testsuite/gm2/pim/run/fail/gm2.exp: as above.
|
||||
* testsuite/gm2/pim/run/pass/gm2.exp: as above.
|
||||
* testsuite/gm2/pimcoroutines/pass/gm2.exp: as above.
|
||||
* testsuite/gm2/pimlib/coroutines/pass/gm2.exp: as above.
|
||||
* testsuite/gm2/pimlib/logitech/pass/gm2.exp: as above.
|
||||
* testsuite/gm2/pimlib/logitech/run/pass/gm2.exp: as above.
|
||||
* testsuite/gm2/pimlib/pass/gm2.exp: as above.
|
||||
* testsuite/gm2/pimlib/run/pass/gm2.exp: as above.
|
||||
* testsuite/gm2/pimlib/ulm/run/pass/gm2.exp: as above.
|
||||
* testsuite/gm2/quads/run/pass/gm2.exp: as above.
|
||||
* testsuite/gm2/switches/check-all/run/fail/gm2.exas above.p:
|
||||
* testsuite/gm2/switches/check-all/run/pass/gm2.exp:as above.
|
||||
* testsuite/gm2/switches/extended-opaque/fail/gm2.exp: as above.
|
||||
* testsuite/gm2/switches/extended-opaque/pass/gm2.exp: as above.
|
||||
* testsuite/gm2/switches/iso/run/pass/gm2.exp: as above.
|
||||
* testsuite/gm2/switches/makeall/fail/gm2.exp: as above.
|
||||
* testsuite/gm2/switches/optimization/run/pass/gm2.exp: as above.
|
||||
* testsuite/gm2/switches/pedantic-params/fail/gm2.exp: as above.
|
||||
* testsuite/gm2/switches/pedantic-params/pass/gm2.exp: as above.
|
||||
* testsuite/gm2/switches/pic/run/pass/gm2.exp: as above.
|
||||
* testsuite/gm2/switches/pim2/run/pass/gm2.exp: as above.
|
||||
* testsuite/gm2/switches/pim3/run/pass/gm2.exp: as above.
|
||||
* testsuite/gm2/switches/pim4/run/pass/gm2.exp: as above.
|
||||
* testsuite/gm2/types/run/pass/gm2.exp: as above.
|
||||
* testsuite/gm2/ulmlib/pass/gm2.exp: as above.
|
||||
* testsuite/gm2/ulmlib/std/pass/gm2.exp: as above.
|
||||
* testsuite/gm2/ulmlib/sys/pass/gm2.exp: as above.
|
||||
|
||||
2014-10-03 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/gm2-libs/FpuIO.mod: ensure that the debugging preprocessing
|
||||
directives are only turned on by a specific flag.
|
||||
* gm2/gm2spec.c: remove GM2_ROOT environment variable and use
|
||||
GM2_PREFIX and GM2_LIBEXEC instead. These override the --prefix
|
||||
and --libexec strings used at compile time and allow users to move
|
||||
the complete tree of binaries to a different directory hierarchy.
|
||||
|
||||
2014-10-01 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/gm2-compiler/M2Code.mod: tidied up text in qprintf0
|
||||
* gm2/gm2-compiler/M2Comp.mod: tidied up text in qprintf0
|
||||
* gm2/gm2-gcc/m2top.def: removed non needed procedure.
|
||||
* gm2/gm2-gcc/m2top.h: removed non needed function.
|
||||
|
||||
2014-09-30 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/Make-lang.in: removed sckt.c from being built.
|
||||
* gm2/bnf/gm2l.bnf: corrected import of procedures from Lists.
|
||||
* gm2/bnf/gm2m.bnf: added import of DEALLOCATE.
|
||||
* gm2/gm2-compiler/M2Batch.def: added export of LookupModule, LookupOuterModule.
|
||||
* gm2/gm2-compiler/M2Batch.mod: added import of GetSym.
|
||||
* gm2/gm2-compiler/M2Comp.mod: added descriptions for each pass.
|
||||
* gm2/gm2-compiler/M2Error.def: (New procedure declarations) WarnFormat0, WarnFormat1.
|
||||
* gm2/gm2-compiler/M2Error.mod: (New procedures) WarnFormat0, WarnFormat1.
|
||||
* gm2/gm2-compiler/M2Pass.def: added IsPassC to export list.
|
||||
* gm2/gm2-compiler/M2Range.mod: import BuildGreaterThanOrEqual.
|
||||
* gm2/gm2-compiler/P1SymBuild.mod: added import of procedures from List.
|
||||
* gm2/gm2-libs-ch/dtoa.c: corrected dates and tidied up spacing.
|
||||
* gm2/gm2-libs-ch/wrapc.c: corrected dates and tidied up spacing.
|
||||
* m2/configure: regenerated.
|
||||
* m2/configure.ac: removed verbose messages.
|
||||
* make gm2.paranoid now works on Wheezy.
|
||||
|
||||
2014-09-28 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* libgm2/config.h.in: removed HAVE_GETTIMEOFDAY, added HAVE_STRUCT_TIMEVAL,
|
||||
removed TIME_WITH_SYS_TIME.
|
||||
* libgm2/configure: rebuilt.
|
||||
* libgm2/configure.ac: removed AC_HEADER_TIME. Check for struct timeval.
|
||||
Added GM2_UNDEF macro. GM2_CHECK_LIB rewritten.
|
||||
* libgm2/libpim/Selective.c: use HAVE_STRUCT_TIMEVAL rather than HAVE_SELECT.
|
||||
|
||||
2014-09-27 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/examples/pge/macroObjects.def: fixed parameter names so that
|
||||
implementation and definition modules match.
|
||||
* gm2/examples/pge/twoDsim.mod: commented out include.
|
||||
* gm2/gm2-compiler/M2Comp.mod: only attempt to parse an implementation
|
||||
if the filename is found. This avoids a bug when -fcpp -fm2-whole-program
|
||||
was used.
|
||||
* gm2/gm2-compiler/M2Preprocess.mod: corrected dates.
|
||||
* gm2/gm2-compiler/M2Preprocess.mod: tidied up formatting.
|
||||
* gm2/gm2-libs/DynamicStrings.mod: guard against the #defines from being
|
||||
invoked necessary as users may now use -fcpp and -fm2-whole-program and thus
|
||||
turn on internal debugging of gm2 libraries.
|
||||
* gm2/gm2-libs/FormatStrings.mod: as above.
|
||||
* gm2/gm2-libs/FpuIO.mod: as above.
|
||||
* gm2/gm2-libs/SArgs.mod: as above.
|
||||
* gm2/gm2-libs/SEnvironment.mod: as above.
|
||||
* gm2/gm2-libs/SFIO.mod: as above.
|
||||
* gm2/gm2-libs/StringConvert.mod: as above.
|
||||
* gm2/lang-specs.h: changed formatting.
|
||||
|
||||
2014-09-23 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/config-lang.in: added entry for gm2/examples/pge/Makefile.
|
||||
* gm2/gm2-compiler/M2Range.mod: rewritten CodeForLoopEnd.
|
||||
(SameTypesCodeForLoopEnd) New procedure.
|
||||
(DiffTypesSameForLoopEnd) New procedure.
|
||||
All regression tests pass under Debian Wheezy amd64.
|
||||
* gm2/examples/pge/Makefile.in: fixed post rules for world.
|
||||
* gm2/gm2-libs/config-host: rebuilt.
|
||||
* gm2/gm2-libs/config-host.in: 1.0.9.
|
||||
* gm2/gm2-libs/config-target: rebuilt.
|
||||
* gm2/gm2-libs/config-target.in: 1.0.9.
|
||||
* gm2/gm2.texi: updated release map.
|
||||
* gm2/gm2spec.c: removed C++ comment.
|
||||
* gm2/version.c: 1.0.9.
|
||||
* Released 1.0.9 Beta Release.
|
||||
|
||||
2014-09-17 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/gm2-compiler/M2Range.mod: minor fixes which solve
|
||||
testsuite/gm2/pim/run/pass/For5.mod.
|
||||
* gm2/gm2-libs-iso/RTgen.mod: include guards to ensure that
|
||||
the do procedure functions are only called if >0 bytes are
|
||||
to be read/written.
|
||||
|
||||
2014-09-16 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/gm2-compiler/M2Quads.mod: removed RangeCheck quadruples from
|
||||
changing the read/write lists. Also removed PutWriteQuad
|
||||
from being called inside MarkAsRead. More regression tests pass.
|
||||
(testsuite/gm2/errors/fail/testfio.mod)
|
||||
(testsuite/gm2/errors/fail/testinit.mod)
|
||||
* gm2/gm2.texi: changed the -fstatistics entry to -fm2-statistics.
|
||||
Added entry for -fm2-whole-program.
|
||||
* gm2/examples/pge/Makefile: corrected rules to whole and foo
|
||||
and introduced $(CHECK).
|
||||
* examples/pge/history.mod: hide debugging.
|
||||
* gm2/examples/pge/twoDsim.mod: hide debugging.
|
||||
* gm2/gm2-compiler/M2Range.mod: fixed bug in CodeEndForLoop.
|
||||
|
||||
2014-09-15 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/examples/pge/foo.mod: added comment.
|
||||
* gm2/gm2-compiler/M2Code.mod: removed references to StrIO and
|
||||
NumberIO and replaced them with printf0 and printf1.
|
||||
Re-introduced OptimizationAnalysis which also reports on
|
||||
total source lines compiled.
|
||||
* gcc/gm2/gm2-compiler/M2Options.def: SetStatistic (New procedure).
|
||||
* gcc/gm2/gm2-compiler/M2Options.def: SetStatistic (New procedure)
|
||||
implemented.
|
||||
* gm2/gm2-gcc/m2options.h: SetStatistic (New prototype).
|
||||
* gm2/gm2-lang.c: handle -fm2-statistics.
|
||||
* gm2/lang-options.h: enumerate -fm2-statistics.
|
||||
* gm2/lang.opt: enumerate -fm2-statistics.
|
||||
* gm2/m2.flex: include timevar.h. Call timevar_push, timevar_pop
|
||||
inside m2flex_GetToken.
|
||||
|
||||
2014-09-14 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/README: corrected language (gm2) and removed enable-__cxa_atexit.
|
||||
* gm2/README: fixed source to sources.
|
||||
* libgm2/libpim/Selective.c: use HAVE_SELECT rather than HAVE_TIMEVAL.
|
||||
|
||||
2014-09-13 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* the majority of these changes fix a bug reported by John O Goyo
|
||||
(see testsuite/gm2/imports/run/pass/innermods.mod in cc1gm2.
|
||||
* gm2/Make-lang.in: added P0SymBuild.mod into list of modules. Added
|
||||
build rule for m2-1.bnf and changed m2.bnf because of new file name.
|
||||
Changed calls to $(M2LINK) to include --name option.
|
||||
* gm2/gm2-compiler/M2Batch.def: (LookupModule) New procedure definition.
|
||||
(LookupOuterModule) New procedure definition.
|
||||
* gm2/gm2-compiler/M2Batch.mod: (LookupOuterModule) New procedure function.
|
||||
(LookupModule) New procedure function.
|
||||
* gm2/gm2-compiler/M2Comp.mod: introduced new Pass0.
|
||||
* gm2/gm2-compiler/M2GCCDeclare.mod: modified debugging.
|
||||
* gm2/gm2-compiler/M2Inline.def: Removed file.
|
||||
* gm2/gm2-compiler/M2Inline.mod: Removed file.
|
||||
* gm2/gm2-compiler/M2Pass.def: (IsPass0) New procedure function.
|
||||
* gm2/gm2-compiler/P0SymBuild.mod: New file, generate a scope tree.
|
||||
* gm2/gm2-compiler/P1SymBuild.mod: changed to follow the scope tree
|
||||
generated during pass0.
|
||||
* gm2/gm2-compiler/P1SyntaxCheck.def: removed file.
|
||||
* gm2/gm2-compiler/P2SymBuild.mod: use LookupModule instead
|
||||
of MakeDefinitionSource.
|
||||
* gm2/gm2-compiler/P3SymBuild.mod: use LookupModule instead
|
||||
of MakeDefinitionSource.
|
||||
* gm2/gm2-compiler/PCSymBuild.mod: use LookupModule instead
|
||||
of MakeDefinitionSource.
|
||||
* gm2/gm2-compiler/P0SymBuild.mod:
|
||||
* gm2/gm2-compiler/SymbolTable.def:
|
||||
(PutModuleContainsBuiltin) New procedure definition.
|
||||
(IsBuiltinInModule) New procedure function definition.
|
||||
(PutHiddenTypeDeclared) New procedure definition.
|
||||
(IsHiddenTypeDeclared) New procedure function definition.
|
||||
* gm2/gm2-compiler/SymbolTable.mod:
|
||||
(ContainsBuiltin) new field in DefImp.
|
||||
(PutModuleContainsBuiltin) New procedure.
|
||||
(IsBuiltinInModule) New procedure function.
|
||||
(PutExported) allow modules to be imported from.
|
||||
* gm2/gm2-compiler/m2flex.def: (GetTotalLines)
|
||||
New function definition.
|
||||
* gm2/init/gm2-gccinit: added P0SymBuild.
|
||||
* gm2/m2.flex: (m2flex_GetTotalLines) New function.
|
||||
* gm2/tools-src/mklink.c: honour CFLAGS and LDFLAGS
|
||||
(fixes a build problem on 64 bit Solaris, reported by
|
||||
John O Goyo).
|
||||
* testsuite/gm2/errors/fail/gm2.exp:
|
||||
* testsuite/gm2/errors/fail/testfio.mod:
|
||||
* testsuite/gm2/imports/run/pass/c.def:
|
||||
* testsuite/gm2/imports/run/pass/c.mod:
|
||||
* testsuite/gm2/imports/run/pass/gm2.exp:
|
||||
* testsuite/gm2/imports/run/pass/innermods3.mod:
|
||||
* m2/libmin/Makefile.am: build SYSTEM.def with -fno-exceptions
|
||||
* m2/libmin/Makefile.in: regenerated.
|
||||
* gm2/bnf/m2-1.bnf: new file (copied from m2.bnf with
|
||||
some name changes).
|
||||
* gm2/bng/m2.bnf: new contents (pass 0).
|
||||
* gm2/gm2-compiler/P0SymBuild.def: New file.
|
||||
* gm2/gm2-compiler/P0SymBuild.mod: New file.
|
||||
|
||||
2014-09-04 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/gm2-gcc/m2builtins.c: corrected spelling for huge_val, huge_valf,
|
||||
huge_vall.
|
||||
|
||||
2014-09-03 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* libgm2/config.h.in: rebuilt.
|
||||
* libgm2/configure: rebuilt.
|
||||
* libgm2/configure.ac: fixes to the GM2_CHECK_LIB macro to correctly
|
||||
test for the existence of library functions.
|
||||
* gm2/configure.in: added test for whether the pth library exists
|
||||
and issue a warning if it does not.
|
||||
* gm2/gm2-lang.c: new option -fno-pth. Do not link against -lpth.
|
||||
* gm2/gm2.texi: document new option.
|
||||
* gm2/gm2spec.c: implement the new option, by default -lpth is included
|
||||
into the link process. Add the library before -lstdc++.
|
||||
* gm2/lang-options.h: entry for new option.
|
||||
* gm2/lang.opt: entry for new option.
|
||||
|
||||
2014-09-02 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/Make-lang.in: removed unnecessary SO, SO_O2, O2 library build
|
||||
rules.
|
||||
* gm2/gm2-compiler/SymbolTable.mod: removed unnecessary Type, Size, Offset
|
||||
fields from Module, DefImp symbols. Also removed their initialisation.
|
||||
|
||||
2014-08-30 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/bnf/gm2m.bnf: fixed bug so that nested local modules
|
||||
propagate their imported modules outwards.
|
||||
(see testsuite/gm2/imports/run/pass/innermods3.mod).
|
||||
* gm2/bnf/m2.bnf: corrected dates.
|
||||
* gm2/bnf/gm2l.bnf: commented out printfs.
|
||||
* rebuild the all configure files changed by the gm2 front
|
||||
end.
|
||||
* rebuilt all patch files.
|
||||
(gm2/patches/gcc/4.7.3/01-patches, gm2/patches/gcc/4.7.3/02-patches,
|
||||
gm2/patches/gcc/4.7.3/03-patches, gm2/patches/gcc/4.7.3/04-patches,
|
||||
gm2/patches/gcc/4.7.3/05-patches, gm2/patches/gcc/4.7.3/12-patches)
|
||||
|
||||
2014-08-29 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/bnf/gm2m.bnf: fixed bug reported by John O Goyo
|
||||
(see testsuite/gm2/imports/run/pass/innermods.mod and
|
||||
testsuite/gm2/imports/run/pass/innermods2.mod).
|
||||
Maintain a block of nested modules and allow inner modules
|
||||
to import objects via FROM x statements. (BeginBlock)
|
||||
New procedure. (EndBlock) New procedure. (RegisterLocalModule)
|
||||
New procedure. (RegisterImport) New procedure. The ebnf
|
||||
rules were extended to nearly the complete language (with the exception
|
||||
of full parsing of definition modules). Similar to gm2l except
|
||||
the block retains the module level.
|
||||
|
||||
2014-08-28 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/bnf/gm2l.bnf: fixed bug reported by John O Goyo
|
||||
(see testsuite/gm2/imports/run/pass/innermods.mod).
|
||||
Maintain a block of nested modules and allow inner modules
|
||||
to import objects via FROM x statements. (BeginBlock)
|
||||
New procedure. (EndBlock) New procedure. (RegisterLocalModule)
|
||||
New procedure. (RegisterImport) New procedure. The ebnf
|
||||
rules were extended to nearly the complete language (with the exception
|
||||
of full parsing of definition modules).
|
||||
* gm2/examples/hello/Makefile.in: (pre-install-whole) New rule.
|
||||
* gm2/examples/map/Makefile.in: (pre-install-whole) New rule.
|
||||
* gm2/examples/pge/Makefile: (whole) New interim rule.
|
||||
* gm2/gm2-compiler/M2AsmUtil.mod: import IsDefinitionForC.
|
||||
|
||||
2014-08-17 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/examples/map/Makefile.in: (pre-install-whole) corrected rule.
|
||||
* gm2/examples/pge/Indexing.def: removed file.
|
||||
* gm2/examples/pge/Indexing.mod: removed file.
|
||||
* gm2/gm2-libs/FIO.mod: modified so that it can be compiled under -fiso.
|
||||
* gm2/gm2-libs/Indexing.mod: modified so that it can be compiled under -fiso.
|
||||
|
||||
2014-08-16 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/Make-lang.in: use new libgm2.a when building stage2.
|
||||
* gm2/examples/map/Makefile.in: (pre-install-whole) New rule.
|
||||
* gm2/gm2-compiler/M2AsmUtil.mod: (SymNeedsModulePrefix)
|
||||
New procedure function. (GetModulePrefix) use SymNeedsModulePrefix.
|
||||
* gm2/gm2-compiler/M2Batch.def: (ForeachSourceModuleDo) new procedure.
|
||||
(IsSourceSeen) new procedure function.
|
||||
* gm2/gm2-compiler/M2Batch.mod: implement ForeachSourceModuleDo
|
||||
and IsSourceSeen.
|
||||
* gm2/gm2-compiler/M2Code.mod: import WholeProgram and modify (Code)
|
||||
and dependent procedures to behave differently if WholeProgram is
|
||||
set.
|
||||
* gm2/gm2-compiler/M2Comp.mod: (NeedToParseImplementation) New procedure
|
||||
function.
|
||||
* gm2/gm2-compiler/M2GCCDeclare.mod: import WholeProgram and modify
|
||||
declaration of procedure/module/types/variables to behave differently
|
||||
if WholeProgram is set.
|
||||
* gm2/gm2-compiler/M2GenGCC.mod: (IsExportedGcc) New procedure function.
|
||||
CodeStartModFile pushes the module scope and the global scope.
|
||||
CodeStartDefFile removed unnecessary code. CodeEndFile call
|
||||
popGlobalScope. CodeProcedureScope use IsExportedGcc instead of IsExported.
|
||||
Change CompilingMainModule to CompilingMainModule OR WholeProgram.
|
||||
* gm2/gm2-compiler/M2Options.def: (DebugTraceQuad, DebugTraceAPI) New
|
||||
internal options. (SetDebugTraceQuad) New procedure definition.
|
||||
(SetDebugTraceAPI) New procedure definition.
|
||||
* gm2/gm2-compiler/M2Options.mod: (SetWholeProgram) remove return type.
|
||||
(SetDebugTraceQuad) implemented. (SetDebugTraceAPI) implemented.
|
||||
* gm2/gm2-compiler/M2Scope.def: (DisplayScope) New procedure.
|
||||
* gm2/gm2-gcc/m2options.h: (SetDebugTraceQuad) exported.
|
||||
(SetDebugTraceAPI) exported.
|
||||
* gm2/gm2-lang.c: added case for OPT_fdebug_trace_quad and
|
||||
OPT_fdebug_trace_api.
|
||||
* gm2/lang-options.h: added entry for -fm2-whole-program.
|
||||
* gm2/lang.opt: added entry for -fdebug-trace-quad, -fdebug-trace-api
|
||||
and -fm2-whole-program.
|
||||
* many testsuite scripts corrected to reflect the new library locations.
|
||||
|
||||
2014-07-30 Gaius Mulley <gaius@gnu.org>'
|
||||
|
||||
* gm2/gm2-compiler/M2Comp.mod: corrected logical expression in
|
||||
NeedToParseImplementation.
|
||||
|
||||
2014-07-29 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/README: updated preferred snapshot test release. Use git rather
|
||||
than CVS. Changed configuring advice as using 4.7.3 rather than 4.1.2.
|
||||
* gm2/gm2-compiler/M2Comp.mod: start of changes which allow -fwhole-program
|
||||
to be effective.
|
||||
* gm2/gm2-compiler/M2Options.def: (WholeProgram) new variable, define
|
||||
and export. (SetWholeProgram) New procedure.
|
||||
* gm2/gm2-compiler/M2Options.mod: (SetWholeProgram) New procedure implemented.
|
||||
WholeProgram default to FALSE.
|
||||
* gm2/gm2-compiler/M2System.mod: allow user to import SIZE from ISO SYSTEM.
|
||||
Not strictly ISO but it is more flexible with -fwhole-program which will
|
||||
want to compile everything in a single dialect.
|
||||
* gm2/gm2-gcc/m2options.h: (M2Options_SetWholeProgram) New declaration.
|
||||
* gm2/gm2-lang.c: process -fwhole-option by calling M2Options_SetWholeProgram.
|
||||
* gm2/gm2-libs-iso/SYSTEM.def: add SIZE to export qualified list.
|
||||
* gm2/lang.opt: add -fwhole-option to list of legal Modula-2 options.
|
||||
* testsuite/gm2/calling-c/datatypes/unbounded/run/pass/gm2.exp: correct
|
||||
path to retieve path and libraries from the build area and avoid
|
||||
the install area.
|
||||
* libgm2/config.h.in: rebuilt.
|
||||
* libgm2/configure: rebuilt.
|
||||
* libgm2/configure.ac: define GM2_CHECK_LIB macro and use it to
|
||||
safely detect the presence of all used libc and libm functions
|
||||
used by the Modula-2 libraries.
|
||||
|
||||
2014-07-23 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* fixes to the regression testsuite gm2.exp files to pick up the
|
||||
libraries from the new build locations.
|
||||
* libgm2/libiso/Makefile.am: build correct iso version of SYSTEM.
|
||||
* gm2/gm2.texi: updated the status of the gcc-4.7 branch of gm2.
|
||||
Also removed an unnecessary --enable-libgm2 option from the
|
||||
documentation.
|
||||
|
||||
2014-07-16 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/examples/pge/Makefile: remove hack rule.
|
||||
* libgm2/config.h.in: rebuilt.
|
||||
* libgm2/configure: rebuilt.
|
||||
* libgm2/configure.ac: test for libc functions.
|
||||
* libgm2/libpim/Selective.c: provide dummy KillSet procedure
|
||||
function.
|
||||
|
||||
2014-07-15 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/gm2-compiler/M2Range.mod: CodeWholeNonPos, CodeWholeZero
|
||||
assign location before it is used.
|
||||
|
||||
2014-07-14 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/Make-lang.in: overhauled to ensure that target and host are
|
||||
distinct.
|
||||
* gm2/gm2-compiler/M2GCCDeclare.mod: IsExternal (New procedure function).
|
||||
FindContext replaces FindTreeScope. IsGlobal (New procedure function).
|
||||
DeclareVariable uses IsGlobal, IsExternal and FindContext.
|
||||
* gm2/gm2-gcc/init.c: can now be compiled by a C or C++ compiler.
|
||||
* gm2/gm2-gcc/m2block.c: new fields to binding_level. is_global and
|
||||
context. The compiler now correctly uses a translation_unit tree
|
||||
node to contain the global variables. Bug fixes to correct the
|
||||
context of local variables. We also ensure that all locals
|
||||
are declared. Added more self checking debugging code.
|
||||
* gm2/gm2-gcc/m2block.def: includeDecl (New procedure function).
|
||||
GetGlobalContext (New procedure function).
|
||||
* gm2/gm2-gcc/m2block.h: allow m2block.[ch] to be compiled by
|
||||
a C or C++ compiler, export GetGlobalContext, finishGlobals,
|
||||
and includeDecl.
|
||||
* gm2/gm2-gcc/m2builtins.h: allow m2block.[ch] to be compiled by
|
||||
a C or C++ compiler.
|
||||
* gm2/gm2-gcc/m2convert.h: allow m2block.[ch] to be compiled by
|
||||
a C or C++ compiler.
|
||||
* gm2/gm2-gcc/m2decl.c: simplified and corrected declaration of a
|
||||
variable. BuildParameterDeclaration simplified as it only handles
|
||||
procedure/function parameters and not function/procedure types.
|
||||
* gm2/gm2-gcc/m2decl.h: allow m2decl.[ch] to be compiled by
|
||||
a C or C++ compiler.
|
||||
* gm2/gm2-gcc/m2except.h: allow m2except.[ch] to be compiled by
|
||||
a C or C++ compiler.
|
||||
* gm2/gm2-gcc/m2expr.h: allow m2expr.[ch] to be compiled by
|
||||
a C or C++ compiler.
|
||||
* gm2/gm2-gcc/m2linemap.h: allow m2linemap.[ch] to be compiled by
|
||||
a C or C++ compiler.
|
||||
* gm2/gm2-gcc/m2misc.h: allow m2misc.[ch] to be compiled by
|
||||
a C or C++ compiler.
|
||||
* gm2/gm2-gcc/m2options.h: allow m2options.[ch] to be compiled by
|
||||
a C or C++ compiler.
|
||||
* gm2/gm2-gcc/m2statement.h: allow m2statement.[ch] to be compiled by
|
||||
a C or C++ compiler.
|
||||
* gm2/gm2-gcc/m2statement.c: call cgraph_finalize_function whenever
|
||||
we finish a function. Unit at a time change.
|
||||
* gm2/gm2-gcc/m2top.h: allow m2top.[ch] to be compiled by
|
||||
a C or C++ compiler.
|
||||
* gm2/gm2-gcc/m2type.c: specifically declares procedure types
|
||||
and parameter types. Corrected a bug with procedure/function
|
||||
type declaration.
|
||||
* gm2/gm2-gcc/m2type.def: BuildProcTypeParameterDeclaration (New procedure
|
||||
function). BuildEndFunctionType additional parameter.
|
||||
* gm2/gm2-gcc/m2type.h: allow m2type.[ch] to be compiled by
|
||||
a C or C++ compiler.
|
||||
* gm2/gm2-lang.c: m2_write_global_declarations (New function).
|
||||
gm2_langhook_write_globals for each translation unit write out globals.
|
||||
* gm2/gm2-libs-pim/Break.c: corrected #include syntax. Reformatted to
|
||||
conform to GNU coding standards.
|
||||
* gm2/gm2-libs/config-host: rebuilt.
|
||||
* gm2/gm2-libs/config-target: rebuilt.
|
||||
* gm2/gm2-libs/config-target.in: use GCC_NO_EXECUTABLES.
|
||||
* gm2/gm2spec.c: removed style of libraries, added new location of
|
||||
libraries and new library names.
|
||||
* gm2/m2pp.c: pl (New function). m2pp_decl_list (New function).
|
||||
m2pp_decl_bool (New function). remember (New function).
|
||||
m2pp_translation (New function). m2pp_module_block (New function).
|
||||
m2pp_procedure_type modified to understand varargs.
|
||||
* gm2/tools-src/createUlmSys: fixed to test for presence of include
|
||||
files so that it can be run in a cross compiler for a minimal target.
|
||||
* gm2/examples/pge/Makefile: remove rule hack from objects.
|
||||
* gm2/gm2-compiler/M2GenGCC.mod: CodeDivTrunc, FoldDivTrunc,
|
||||
CodeDivFloor, FoldDivFloor check operand types and if REAL/COMPLEX
|
||||
family are used then call BuildRDiv instead. Fixes a compiler error
|
||||
exposed by gm2/examples/pge/roots.mod. BinaryOperandRealFamily
|
||||
(New procedure function).
|
||||
* gm2/gm2-gcc/m2expr.c: m2expr_BuildRDiv (New function).
|
||||
* gm2/gm2-gcc/m2expr.def: m2expr_BuildRDiv (New definition).
|
||||
* gm2/gm2-gcc/m2expr.h: m2expr_BuildRDiv (New prototype).
|
||||
|
||||
2014-04-20 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/gm2-compiler/M2GenGCC.mod: (CodeInitAddress) declare tokenno
|
||||
and location and set them correctly.
|
||||
* gm2/gm2spec.c: let the -B switch determine where the (preprocessor)
|
||||
cc1 is found.
|
||||
|
||||
2014-04-05 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/gm2-compiler/M2GenGCC.mod: (CodeInitAddress) New procedure.
|
||||
(CodeStatement) added case clause for InitAddressOp which calls
|
||||
CodeInitAddress.
|
||||
* gm2/gm2-compiler/M2Quads.def: added InitAddressOp.
|
||||
* gm2/gm2-compiler/M2Quads.mod: (CheckVariableAt) generate
|
||||
an InitAddressOp instead of CodeBecomesOp. (WriteQuad)
|
||||
new case clause for InitAddressOp. (WriteOperands) new case
|
||||
clause for InitAddressOp.
|
||||
* fixes variable at address bugs (see
|
||||
testsuite/gm2/embedded/pass/varataddress2.mod)
|
||||
|
||||
2014-03-19 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/gm2-gcc/m2except.c: (do_call3) corrected number of parameters.
|
||||
(build_exc_ptr) add assertion. (gm2_build_throw) add location.
|
||||
* gm2/tools-src/createUlmSys: improved error message.
|
||||
* libgm2/Makefile.in: build and install the Ulm libraries.
|
||||
Included $(GM2_OBJ)/gm2-libs/gm2-libs-target.h as a dependant
|
||||
to $(GM2_OBJ)/ulm-lib-gm2/sys/SYSTEM.c.
|
||||
|
||||
2014-03-18 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/gm2-gcc/m2except.c: do_call0 (New function).
|
||||
do_call1 (New function). do_call3 (New function).
|
||||
build_exc_ptr (rewritten to use do_call1).
|
||||
do_free_exception (rewritten to use do_call1).
|
||||
do_throw (rewritten to use do_call3).
|
||||
do_rethrow (rewritten to use do_call0).
|
||||
gm2_build_throw (removed unused local variables).
|
||||
do_begin_catch (rewritten to use do_call1).
|
||||
do_end_catch (rewritten to use do_call0).
|
||||
* gm2/gm2-lang.c: genericize_try_block (New function).
|
||||
genericize_catch_block (New function).
|
||||
gm2_langhook_gimplify_expr call genericize_try_block
|
||||
and genericize_catch_block.
|
||||
|
||||
2014-03-12 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* changed persmissions to most files to remove the execute
|
||||
bit.
|
||||
|
||||
2014-03-12 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/Make-lang.in: fixed verify flags for gm2.verifyparanoid
|
||||
and gm2.verifystage12.
|
||||
* gm2/gm2-libs-iso/M2RTS.mod: detect double HALT and exit with
|
||||
-1.
|
||||
* gm2/gm2-libs/M2RTS.mod: detect double HALT and exit with
|
||||
-1.
|
||||
* gm2/gm2-libs/Indexing.mod: use memmove rather than memcpy
|
||||
which fixes the regression testsuite/gm2/isolib/run/pass/termfile.mod.
|
||||
* gm2/gm2-libs/libc.def: provide definition for memmove.
|
||||
|
||||
2014-02-19 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/Make-lang.in: include the search path -I$(srcdir)/gm2/gm2-gcc
|
||||
when building stage2 from the compiler sources.
|
||||
* gm2/bnf/gm2l.bnf: import Dup from DynamicStrings.
|
||||
* gm2/gm2-compiler/M2ALU.mod: fixed many imports so that
|
||||
the module can be built during stage2, via xgm2.
|
||||
* gm2/gm2-compiler/M2Base.mod: fixed many imports so that
|
||||
the module can be built during stage2, via xgm2.
|
||||
* gm2/gm2-compiler/M2Preprocess.mod: corrected import of
|
||||
CppCommandLine from M2Options rather than M2DriverOptions.
|
||||
* gm2/gm2-compiler/M2Range.mod: fixed many imports so that
|
||||
the module can be built during stage2, via xgm2.
|
||||
* gm2/gm2-compiler/M2System.mod: fixed many imports so that
|
||||
the module can be built during stage2, via xgm2.
|
||||
* gm2/gm2-compiler/SymbolConversion.mod: fixed many imports so that
|
||||
the module can be built during stage2, via xgm2.
|
||||
* gm2/gm2-compiler/m2flex.def: fixed many imports so that
|
||||
the module can be built during stage2, via xgm2.
|
||||
* gm2/Make-lang.in: added attribs.o to link stage2/gm2/cc1gm2.
|
||||
Removed $(BACKENDLIBS) $(LIBSTDCXX) from the dependancies of
|
||||
stage2/gm2/cc1gm2. Added -I$(srcdir)/gm2/gm2-gcc to
|
||||
all gm2/gm2-compiler-paranoid rules.
|
||||
* gm2/gm2-compiler/M2Options.def: added many procedures to the
|
||||
list of export qualified identifiers.
|
||||
* gm2/gm2-compiler/SymbolTable.mod: changed needsUnsigned
|
||||
and needsLong to BOOLEAN.
|
||||
|
||||
2014-02-18 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/gm2-compiler/M2GenGCC.mod: fixed many imports so that
|
||||
the module can be built during stage2, via xgm2.
|
||||
* gm2/gm2-compiler/M2GCCDeclare.mod: fixed many imports so that
|
||||
the module can be built during stage2, via xgm2.
|
||||
* gm2/gm2-gcc/m2decl.def: use BOOLEAN parameters rather than
|
||||
INTEGERs.
|
||||
* gm2/p2c/p2c-src/src/decl.c: tidied up formatting.
|
||||
|
||||
2014-02-17 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/config-lang.in: added m2block.c, m2builtins.c and m2decl.c
|
||||
to the list of gtfiles.
|
||||
* gm2/gm2-gcc/m2block.c: changed layout of the GTY binding level
|
||||
structure and use ggc_alloc_binding_level rather than xmalloc.
|
||||
Include gt-gm2-m2block.h.
|
||||
* gm2/gm2-gcc/m2type.c: include gt-gm2-m2decl.h.
|
||||
* gm2/gm2-gcc/m2expr.c: use ggc_alloc_atomic rather than xmalloc.
|
||||
Include gt-gm2-m2expr.h.
|
||||
* gm2/gm2-gcc/m2statement.c: include gt-gm2-m2statement.h.
|
||||
* gm2/gm2-gcc/m2type.c: layout GTY structure correctly and
|
||||
use ggc_alloc_array_desc and ggc_alloc_struct_constructor
|
||||
instead of xmalloc. Include gt-gm2-m2type.h.
|
||||
|
||||
2014-02-10 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/Make-lang.in: added -I$(srcdir)/gm2/gm2-gcc to all
|
||||
the compiler build rules when building gm2/gm2-compiler via xgm2.
|
||||
* gm2/gm2-compiler/M2ALU.mod: fix imports so that this file can
|
||||
be built by xgm2.
|
||||
* gm2/gm2-compiler/M2GenGCC.mod: fixed many (but not all) of the
|
||||
imports so this file can be compiled by xgm2.
|
||||
* gm2/gm2-compiler/M2LexBuf.def: add TokenToLocation to export
|
||||
qualified list.
|
||||
* gm2/gm2-compiler/M2Options.def: remove IsAnOption,
|
||||
IsAndOptionAndArg and ParseOptions from the export list.
|
||||
(SetOptimizing) correct parameter to CARDINAL.
|
||||
* gm2/gm2-compiler/M2Options.mod: include Dup into export list.
|
||||
* gm2/gm2-gcc/m2decl.def: import ADDRESS from SYSTEM.
|
||||
* gm2/gm2-gcc/m2expr.def: import ADDRESS from SYSTEM.
|
||||
(BuildBinarySetDo) added missing ';'.
|
||||
* gm2/gm2-gcc/m2statement.def: import ADDRESS from SYSTEM.
|
||||
* gm2/gm2-gcc/m2top.def: (SetFlagUnitAtATime) alter parameter to
|
||||
BOOLEAN.
|
||||
|
||||
2014-02-02 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/bnf/m2-2.bnf: changed rule for ByteAlignment to use the ISO
|
||||
Modula-2 syntax <* *> extension.
|
||||
* gm2/bnf/m2-3.bnf: changed rule for ByteAlignment to use the ISO
|
||||
Modula-2 syntax <* *> extension.
|
||||
* gm2/bnf/m2-c.bnf: changed rule for ByteAlignment to use the ISO
|
||||
Modula-2 syntax <* *> extension.
|
||||
* gm2/bnf/m2-h.bnf: changed rule for ByteAlignment to use the ISO
|
||||
Modula-2 syntax <* *> extension.
|
||||
* gm2/bnf/m2.bnf: changed rule for ByteAlignment to use the ISO
|
||||
Modula-2 syntax <* *> extension.
|
||||
* gm2/gm2-compiler/M2GenGCC.mod: pass a location as the
|
||||
first parameter to BuildTryBegin, BuildCatchBegin,
|
||||
BuildCatchEnd.
|
||||
* gm2/gm2-compiler/M2Quads.def: changed comment to reflect
|
||||
new code (bytealignment) is used instead of (ALIGNED).
|
||||
* gm2/gm2-compiler/M2Quads.mod: change ALIGNED to bytealignment.
|
||||
BuildAlignment, changed error message to reflect bytealignment.
|
||||
* gm2/gm2-compiler/P2SymBuild.def: changed comment to reflect
|
||||
new code (bytealignment) is used instead of (ALIGNED).
|
||||
* gm2/gm2-compiler/P2SymBuild.mod: BuildAligned check for
|
||||
the alignment word (bytealignment). BuildVarAlignment
|
||||
* gm2/gm2-gcc/m2except.def: (InitExceptions) corrected to
|
||||
include a parameter, location. (BuildCatchBegin) corrected
|
||||
to include a parameter, location. (BuildCatchEnd) corrected
|
||||
to include a parameter, location.
|
||||
* gm2/gm2.texi: changed documentation to reflect new syntax
|
||||
of alignment used in variable and type declaration.
|
||||
* testsuite/gm2/extensions/pass/align.mod: changed test code
|
||||
to reflect new syntax.
|
||||
* testsuite/gm2/extensions/pass/align2.mod: changed test code
|
||||
to reflect new syntax.
|
||||
* testsuite/gm2/extensions/run/pass/align3.mod: changed test code
|
||||
to reflect new syntax.
|
||||
* testsuite/gm2/extensions/run/pass/align4.mod: changed test code
|
||||
to reflect new syntax.
|
||||
* testsuite/gm2/extensions/run/pass/align5.mod: changed test code
|
||||
to reflect new syntax.
|
||||
* testsuite/gm2/extensions/run/pass/align6.mod: changed test code
|
||||
to reflect new syntax.
|
||||
* testsuite/gm2/extensions/run/pass/align7.mod: changed test code
|
||||
to reflect new syntax.
|
||||
* testsuite/gm2/extensions/run/pass/card16p.mod: corrected test.
|
||||
* testsuite/gm2/extensions/run/pass/card32p.mod: corrected test.
|
||||
* testsuite/gm2/extensions/run/pass/card64p.mod: corrected test.
|
||||
* testsuite/gm2/extensions/run/pass/card8p.mod: corrected test.
|
||||
|
||||
2014-01-24 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/examples/pge/foo.mod: changed demo.
|
||||
* gm2/gm2-compiler/M2GenGCC.mod: no longer pass
|
||||
the fifth parameter to BuildArray.
|
||||
* gm2/gm2-gcc/m2expr.c: removed the fifth parameter to
|
||||
BuildArray. Pass NULL_TREE to build4 of a ARRAY_REF.
|
||||
* gm2/gm2-gcc/m2expr.def: removed the fifth parameter to
|
||||
the definition of BuildArray.
|
||||
* gm2/gm2-gcc/m2expr.h: removed the fifth parameter to
|
||||
the prototype of BuildArray.
|
||||
|
||||
2014-01-18 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/gm2-gcc/m2expr.c: CheckAddressToCardinal (New function).
|
||||
BuildAdd use CheckAddressToCardinal for both operands.
|
||||
BuildSub use CheckAddressToCardinal for both operands.
|
||||
BuildDivTrunc use CheckAddressToCardinal for both operands.
|
||||
BuildModTrunc use CheckAddressToCardinal for both operands.
|
||||
BuildDivFloor use CheckAddressToCardinal for both operands.
|
||||
BuildModFloor use CheckAddressToCardinal for both operands.
|
||||
BuildMult use CheckAddressToCardinal for both operands.
|
||||
* gm2/gm2-gcc/m2type.c: m2_cardinal_address_type_node new
|
||||
internal datatype. GetCardinalAddressType (New function).
|
||||
build_m2_cardinal_address_type_node (New function).
|
||||
* gm2/gm2-gcc/m2type.h: m2type_GetCardinalAddressType
|
||||
(New function prototype).
|
||||
|
||||
2014-01-15 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/Make-lang.in: use $(LINKER) rather than $(XGCC).
|
||||
use $(COMPILER) $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS)
|
||||
to aid building gm2 as a cross compiler.
|
||||
* gm2/gm2-gcc/m2expr.c: check operand types for ADDRESS
|
||||
in multiply, divide, modulus and issue appropriate errors.
|
||||
* gm2/gm2-gcc/m2type.c: (IsAddress) New function.
|
||||
* gm2/gm2-gcc/m2type.def: (IsAddress) New function.
|
||||
* gm2/gm2-gcc/m2type.h: (IsAddress) New function prototype.
|
||||
* gm2/gm2-lang.c: removed duplicate declaration of gm2_gc_root.
|
||||
Added compiler directives to unused parameters in
|
||||
gm2_langhook_gimplify_expr.
|
||||
|
||||
2014-01-14 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/Make-lang.in: substituted $(CC) for $(COMPILER) when
|
||||
building gm2/gm2-lang.o, gm2/stor-layout.o and gm2/m2pp.o.
|
||||
* gm2/gm2-gcc/m2builtins.c: added BT_FN_NONE to the
|
||||
builtin_prototype enum. Changed fclass to enum built_in_class.
|
||||
Modified compound constant constructor to contain correct types
|
||||
in the terminating array element.
|
||||
* gm2/gm2-gcc/m2convert.c: remove stop function.
|
||||
* gm2/gm2-gcc/m2decl.c: remove stop function.
|
||||
* gm2/gm2-gcc/m2expr.c: remove stop function. Comment out
|
||||
default_convert_binary_operands and build_nop. Comment out
|
||||
unused part of m2expr_BuildNegate.
|
||||
* gm2/gm2-gcc/m2misc.c: corrected formatting.
|
||||
* gm2/gm2-gcc/m2options.h: added const to the second parameter
|
||||
in M2Options_CppArg.
|
||||
* gm2/gm2-lang.c: added const to the declaration of opt.
|
||||
* gm2/gm2-lang.h: added list of includes, added extern prototype
|
||||
for gm2_langhook_init_options.
|
||||
* gm2/gm2spec.c: removed prototype for get_B_or_prefix. Added
|
||||
conditional compilation for printOption. Added const to
|
||||
declaration of B_path. (find_executable_path) corrected
|
||||
local variable declaration to include const.
|
||||
(add_B_prefix) added ATTRIBUTE_UNUSED to the first parameter.
|
||||
(get_B_or_prefix) removed. (add_exec_dir) corrected local
|
||||
variables to include const.
|
||||
* gm2/gm2version.h: added conditional compilation for the
|
||||
prototype for gm2version so that it can be accessed by C and C++.
|
||||
* gm2/m2pp.c: changed stack_t to m2stack_t to avoid type clash.
|
||||
(pet) New function prototype. (m2pp_integer) New function
|
||||
prototype. Build gm2 or C versions of m2pp_integer.
|
||||
Build gm2 or C versions of m2pp_complex.
|
||||
|
||||
600
gcc/m2/ChangeLog-2015
Normal file
600
gcc/m2/ChangeLog-2015
Normal file
@@ -0,0 +1,600 @@
|
||||
2015-11-30 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/examples/gravity/twoDsim.mod: fixed syntax error.
|
||||
* gm2/examples/pge/bounce3.mod: use groff device.
|
||||
* gm2/examples/pge/bounce4.mod: use groff device.
|
||||
* gm2/examples/pge/slope.mod: use groff device.
|
||||
* gm2/examples/pge/stairs.mod: use groff device and increase
|
||||
simulated time.
|
||||
* gm2/gm2-compiler/ppg.mod: removed white space and fixed
|
||||
bug with emitting source line preprocessor symbols.
|
||||
* gm2/m2.flex: fixed floating point constant bug reported
|
||||
by Michael Riedl (to allow 1.E10 etc).
|
||||
* testsuite/gm2/iso/constreal.mod: new file.
|
||||
* gm2/el/g-mode.el: fixed comment spacing at end of sentance
|
||||
in the automatically generated header and updated the dates.
|
||||
|
||||
2015-10-07 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/examples/pge/twoDsim.mod: tided up debugging.
|
||||
* gm2/examples/pge/elc2.mod: New file.
|
||||
* gm2/examples/pge/rboxes.mod: New file.
|
||||
|
||||
2015-10-06 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/examples/pge/Makefile.in: build rotating-circles.m.
|
||||
* gm2/examples/pge/mxmparser.py: formatting change.
|
||||
* gm2/examples/pge/mxmtree.py: add terms and call pent, hex,
|
||||
sept, oct for powers 5..8.
|
||||
* gm2/examples/pge/roots.def: findOctic new procedure function.
|
||||
* gm2/examples/pge/roots.mod: findOctic new procedure function
|
||||
wrapper implemented.
|
||||
* gm2/examples/pge/rotating-circles.mxm: corrected terms and
|
||||
renamed some of the variables.
|
||||
* gm2/examples/pge/rotating-line.mxm: tidied up comments.
|
||||
* gm2/examples/pge/twoDsim.mod: new procedure functions,
|
||||
pent, hex, sept, oct. New procedure getObjectOrbitingValues.
|
||||
New procedure maximaCircleCollisionOrbiting. New procedure
|
||||
function earlierCircleCollisionOrbiting. New procedure
|
||||
findCollisionCircleLineOrbiting. Removed
|
||||
findCollisionCircleRLine. findCollisionCirclePolygon call
|
||||
appropriate routine depending upon whether the polygon is
|
||||
orbiting. New procedure function, isOrbiting.
|
||||
findCollisionLineLine call appropriate routine depending
|
||||
upon whether polygon is orbiting. New procedure
|
||||
findCollisionLineLineOrbiting.
|
||||
|
||||
2015-10-05 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/examples/pge/Makefile.in: added new rule for elc2.mod
|
||||
* gm2/examples/pge/coord.mod: tidied up formatting.
|
||||
* gm2/examples/pge/twoDsim.mod: added Elasticity constant,
|
||||
angularMomentum for objects. New procedure function (reflect).
|
||||
collidePolygonAgainstMovingPolygon (rewritten).
|
||||
Interim checkin.
|
||||
|
||||
2015-09-28 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/examples/pge/Makefile.in: new example circle added.
|
||||
* gm2/examples/pge/coord.def: new procedure function
|
||||
perpendicular.
|
||||
* gm2/examples/pge/coord.mod: implemented new procedure
|
||||
function perpendicular.
|
||||
* gm2/examples/pge/polar.mod: cosmetic spaces added.
|
||||
* gm2/examples/pge/popWorld.mod: cosmetic spaces added.
|
||||
* gm2/examples/pge/twoDsim.mod: many cosmetic changes
|
||||
and also more explicit parameters which determine if
|
||||
edge or corner was in collision. First cut of the polygon
|
||||
collision reaction implemented.
|
||||
* gm2/gm2.texi: removed duplication switch.
|
||||
* gm2/gm2-gcc/m2linemap.c: use xstrdup to preserve filename
|
||||
from being garbage collected. This fixes a critical bug
|
||||
in the debugging output of large source files when -fcpp
|
||||
was used.
|
||||
|
||||
2015-09-14 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/examples/pge/Makefile.in: add boxes.raw and removed
|
||||
dependancy output.raw from playback.
|
||||
* gm2/examples/pge/bounce.mod: remove rotate.
|
||||
* gm2/examples/pge/boxes.mod: changed output device.
|
||||
* gm2/examples/pge/examples/exampleBoxes.py: changed sound
|
||||
file examples. Changed crate example.
|
||||
* gm2/examples/pge/pge.py: added poly3 method.
|
||||
* gm2/examples/pge/pgeif.mod: check_range attempts to prevent
|
||||
round off errors and changed to provide a better descriptive
|
||||
error message.
|
||||
* gm2/examples/pge/pgeplayback.py: changes to allow generation
|
||||
of a movie with appropriate sounds effects.
|
||||
* gm2/examples/pge/polar.def: new procedure function rotatePolar.
|
||||
* gm2/examples/pge/polar.mod: implement new procedure function
|
||||
rotatePolar.
|
||||
* gm2/examples/pge/twoDsim.def: define new procedure function
|
||||
rvel.
|
||||
* gm2/examples/pge/twoDsim.mod: major changes to the definition
|
||||
of the polygon data structures, now use a c of g and polar
|
||||
coordinates to describe polygon. Removed rpolygon.
|
||||
|
||||
2015-09-09 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/examples/pge/examples/exampleBoxes.py: interim checkin.
|
||||
* gm2/examples/pge/pge.py: get_xvel, get_yvel, get_xaccel,
|
||||
get_yaccel, process_event new methods.
|
||||
* gm2/examples/pge/pgeif.def: get_xvel, get_yvel, get_xaccel,
|
||||
get_yaccel (New procedure functions).
|
||||
* gm2/examples/pge/pgeif.i: get_xvel, get_yvel, get_xaccel,
|
||||
get_yaccel (New functions).
|
||||
* gm2/examples/pge/pgeif.mod: get_xvel, get_yvel, get_xaccel,
|
||||
get_yaccel (Implement new procedure functions).
|
||||
* gm2/examples/pge/pgeplayback.py: added -V option, added -o
|
||||
option. Added ability to create a movie with sound effects
|
||||
using sox and mencoder.
|
||||
* gm2/examples/pge/twoDsim.def: get_xvel, get_yvel, get_xaccel,
|
||||
get_yaccel (New procedure functions).
|
||||
* gm2/examples/pge/twoDsim.mod: get_xvel, get_yvel, get_xaccel,
|
||||
get_yaccel (Implement new procedure functions).
|
||||
|
||||
2015-09-04 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/examples/pge/Makefile.in: added -I to link rule.
|
||||
* gm2/examples/pge/mxmmaxima.py: corrected unary -, + handling.
|
||||
* gm2/examples/pge/mxmtree.py: corrected output and fixed bug
|
||||
with class field.
|
||||
* gm2/examples/pge/rotating-circles.mxm: removed quit command.
|
||||
* gm2/examples/pge/rotating-line.mxm: removed equality and quit
|
||||
command.
|
||||
* gm2/examples/pge/twoDsim.mod: introduced comment for
|
||||
getPolygonPoint.
|
||||
* gm2/www/tools/texi2tr/html/download.html: updated download version.
|
||||
* gm2/www/tools/texi2tr/html/release.html: updated stable release
|
||||
version.
|
||||
|
||||
2015-09-03 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/Make-lang.in: fixed dates and gcc version number (4.7.4).
|
||||
* gm2/Makefile.in: fixed dates.
|
||||
* gm2/c.flex: fixed dates.
|
||||
* gm2/configure.in; fixed dates and version number.
|
||||
* gm2/examples/pge/Makefile.in: fixed compile rule to include machine
|
||||
generated source.
|
||||
* gm2/examples/pge/circles.mxm: simplified equation.
|
||||
* gm2/examples/pge/mxmmaxima.py: many interim bug fixes.
|
||||
* gm2/examples/pge/mxmparser.py: many interim bug fixes.
|
||||
* gm2/examples/pge/mxmtree.py: many interim bug fixes.
|
||||
* gm2/examples/pge/twoDsim.mod: improved debugging asserts
|
||||
and include machine generated source, compare results of both.
|
||||
* gm2/gm2-lang.c: handle -I option inside cpp args.
|
||||
* gm2/m2.flex: corrected dates.
|
||||
* gm2/gm2-compiler/M2Preprocess.mod: removed unnecessary printf
|
||||
and corrected dates.
|
||||
* released GM2 1.1.5
|
||||
* gm2/gm2.texi: updated release map.
|
||||
* gm2/version.c: 1.1.5.
|
||||
* gm2/configure.in; 1.1.5.
|
||||
* gm2/gm2-libs/config-host.in: 1.1.5.
|
||||
* gm2/gm2-libs/config-target.in: 1.1.5.
|
||||
* gm2/gm2-libs/config-host: rebuilt.
|
||||
* gm2/gm2-libs/config-target: rebuilt.
|
||||
|
||||
2015-08-24 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/examples/pge/examples/exampleBoxes.py: much more debugging
|
||||
added.
|
||||
* gm2/examples/pge/pge.py: more debugging added. Also correct
|
||||
lack of initialiser bugs. Many diagnostics added.
|
||||
* gm2/examples/pge/pgeif.def: added ValueOutOfRange exception.
|
||||
* gm2/examples/pge/pgeif.i: added skip_until procedure.
|
||||
* gm2/examples/pge/pgeif.mod: (check_range) New function
|
||||
procedure. get_xpos, get_ypos, box, poly3, poly4, poly5
|
||||
and poly6 all use check_range to check parameter values.
|
||||
* gm2/examples/pge/twoDsim.mod: added more trace information
|
||||
and test for object deletion.
|
||||
* gm2/gm2-compiler/M2Base.mod: added two more metatypes, rec
|
||||
and array. Check for these meta types and add their
|
||||
characteristics into the assignment and expression matrices.
|
||||
This allows ARRAY and RECORD of the correct size to be compatible
|
||||
with WORD, BYTE, LOC etc.
|
||||
* gm2/gm2-compiler/M2GCCDeclare.mod: use BuiltinsLocation during
|
||||
the construction of the base types.
|
||||
* gm2/gm2-compiler/M2GenGCC.mod: added internal debugging.
|
||||
(CodeIndirectCall) skip type aliases for the return type.
|
||||
* gm2/gm2-compiler/M2Scope.mod: added internal debugging.
|
||||
* gm2/gm2-compiler/SymbolTable.mod: added missing initialisation
|
||||
for ScopeQuad. This allows cc1gm2 to be run without errors by
|
||||
valgrind.
|
||||
* gm2/gm2-gcc/m2convert.c: convert_char_to_array (New function).
|
||||
convert_string_to_array (New function). BuildConvert changed
|
||||
to detect whether a const lit char or string is required to be
|
||||
converted into a fixed string length. This fixes a bug reported.
|
||||
* gm2/gm2-gcc/m2statement.c: tidied up code and fixed bug in
|
||||
(BuildReturnValueCode). This fixes a bug exposed by
|
||||
testsuite/gm2/pim/pass/typeequiv.mod.
|
||||
* gm2/gm2-gcc/m2type.c: (BuildArrayStringConstructor) now adds
|
||||
multiple nuls to the end of a string if length exceeds string.
|
||||
* gm2/gm2-libs/MemUtils.def: tidied up formatting.
|
||||
* gm2/p2c/p2c-src/src/pexpr.c: fixed bug so that constant strings
|
||||
have a LOW indice of 0 not 1.
|
||||
* gm2/pim/pass/typeequiv.mod: corrected date.
|
||||
* gm2/pim/pass/typeequiv2.mod: corrected date.
|
||||
* gm2/pim/pass/typeequiv3.mod: corrected date.
|
||||
|
||||
2015-08-18 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/examples/pge/GC.mod: (gdbif) imported to aid debugging.
|
||||
Initialised callbacks to NIL (bugfix).
|
||||
* gm2/examples/pge/twoDsim.mod: removed debugging hook.
|
||||
* gm2/examples/shared/Makefile.in: corrected dates.
|
||||
* gm2/gm2-libs-iso/MemStream.mod: assign res to opened (bugfix).
|
||||
* gm2/gm2-libs/CmdArgs.def: corrected dates.
|
||||
* gm2/gm2-libs/CmdArgs.mod: corrected dates.
|
||||
* libgm2/libpim/Makefile.am: added SCmdArgs.def to be installed.
|
||||
* libgm2/libpim/Makefile.am: added SCmdArgs.mod to be built and
|
||||
installed.
|
||||
|
||||
2015-08-14 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/gm2-compiler/M2GenGCC.mod: modified debugging hooks.
|
||||
* gm2/gm2-compiler/M2Quads.mod: (BuildConvert) allow record types
|
||||
to be converted as they might fit into a generic type.
|
||||
* gm2/gm2-gcc/m2convert.c: (same_size_types) New function.
|
||||
(converting_ISO_generic) only convert using short hand generic
|
||||
types if they are the correct size. (const_to_ISO_aggregate_type)
|
||||
New function.
|
||||
* gm2/gm2-lang.c: (convert) simplified.
|
||||
|
||||
2015-08-11 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/README: corrected README to reflect prefered method of obtaining
|
||||
tar.gz file. Also improved the text. Removed the build instructions
|
||||
and replaced it with a reference to the documentation.
|
||||
* gm2/examples/pge/deviceIf.mod: added DebugTrace feature.
|
||||
* gm2/examples/pge/twoDsim.mod: added DebugTrace feature.
|
||||
* gm2/examples/pge/world.mod: useGroff by default.
|
||||
* gm2/gm2-compiler/M2Base.mod: fixed bug to allow BYTE to be parameter
|
||||
compatible with any BYTE sized type (including packed RECORD).
|
||||
|
||||
2015-08-05 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/examples/pge/Makefile.in: new rule for playback and output.raw.
|
||||
* the following changes fix bugs in packed enumeration types. Test code
|
||||
is given in the regression testsuite.
|
||||
* gm2/extensions/run/pass/packedrecord.mod: new file.
|
||||
* gm2/extensions/run/pass/packedrecord2.mod: new file.
|
||||
* gm2/gm2-compiler/M2GCCDeclare.mod: change call to BuildEndEnumeration
|
||||
to pass three parameters.
|
||||
* gm2/gm2-gcc/m2type.c: noBitsRequired bug fixed for the case where
|
||||
values is a power of two. gm2_finish_enum introduce extra parameter
|
||||
location so that we can generate a call to m2type_BuildSmallestTypeRange
|
||||
if the enumeration is packed. m2type_BuildEndEnumeration change call
|
||||
to gm2_finish_enum to include extra parameter.
|
||||
* gm2/gm2-gcc/m2type.def: change definition of BuildEndEnumeration.
|
||||
* gm2/gm2-gcc/m2type.h: change prototype of BuildEndEnumeration.
|
||||
|
||||
2015-07-01 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/gm2-gcc/m2convert.c: change all calls to BuildConvert,
|
||||
GetIntegerOne, GetIntegerZero, GetWordOne, GetWordZero, GetCardinalOne,
|
||||
GetCardinalZero to have an extra location parameter.
|
||||
converting_ISO_generic (New procedure function).
|
||||
const_to_ISO_type (New procedure function).
|
||||
ConvertConstantAndCheck call const_to_ISO_type.
|
||||
GenericToType (New procedure function).
|
||||
These changes allow for much improved location references inside
|
||||
type conversions and expressions. They also implement ISO WORD
|
||||
assignment from a constant integer or constant cardinal.
|
||||
* gm2/gm2-compiler/M2ALU.mod: change all calls to BuildConvert,
|
||||
GetIntegerOne, GetIntegerZero, GetWordOne, GetWordZero, GetCardinalOne,
|
||||
GetCardinalZero to have an extra location parameter.
|
||||
* gm2/gm2-compiler/M2GCCDeclare.mod: change all calls to BuildConvert,
|
||||
GetIntegerOne, GetIntegerZero, GetWordOne, GetWordZero, GetCardinalOne,
|
||||
GetCardinalZero to have an extra location parameter.
|
||||
* gm2/gm2-compiler/M2GenGCC.mod: change all calls to BuildConvert,
|
||||
GetIntegerOne, GetIntegerZero, GetWordOne, GetWordZero, GetCardinalOne,
|
||||
GetCardinalZero to have an extra location parameter.
|
||||
* gm2/gm2-compiler/M2Range.mod: change all calls to BuildConvert,
|
||||
GetIntegerOne, GetIntegerZero, GetWordOne, GetWordZero, GetCardinalOne,
|
||||
GetCardinalZero to have an extra location parameter.
|
||||
* gm2/gm2-gcc/m2convert.def: change all calls to BuildConvert,
|
||||
GetIntegerOne, GetIntegerZero, GetWordOne, GetWordZero, GetCardinalOne,
|
||||
GetCardinalZero to have an extra location parameter.
|
||||
* gm2/gm2-gcc/m2convert.h: change all calls to BuildConvert,
|
||||
GetIntegerOne, GetIntegerZero, GetWordOne, GetWordZero, GetCardinalOne,
|
||||
GetCardinalZero to have an extra location parameter.
|
||||
* gm2/gm2-gcc/m2decl.def: change all calls to BuildConvert,
|
||||
GetIntegerOne, GetIntegerZero, GetWordOne, GetWordZero, GetCardinalOne,
|
||||
GetCardinalZero to have an extra location parameter.
|
||||
* gm2/gm2-gcc/m2decl.h: change all calls to BuildConvert,
|
||||
GetIntegerOne, GetIntegerZero, GetWordOne, GetWordZero, GetCardinalOne,
|
||||
GetCardinalZero to have an extra location parameter.
|
||||
* gm2/gm2-gcc/m2except.c: change all calls to BuildConvert,
|
||||
GetIntegerOne, GetIntegerZero, GetWordOne, GetWordZero, GetCardinalOne,
|
||||
GetCardinalZero to have an extra location parameter.
|
||||
* gm2/gm2-gcc/m2expr.c: change all calls to BuildConvert,
|
||||
GetIntegerOne, GetIntegerZero, GetWordOne, GetWordZero, GetCardinalOne,
|
||||
GetCardinalZero to have an extra location parameter.
|
||||
* gm2/gm2-gcc/m2expr.def: change all calls to BuildConvert,
|
||||
GetIntegerOne, GetIntegerZero, GetWordOne, GetWordZero, GetCardinalOne,
|
||||
GetCardinalZero to have an extra location parameter.
|
||||
* gm2/gm2-gcc/m2expr.h: change all calls to BuildConvert,
|
||||
GetIntegerOne, GetIntegerZero, GetWordOne, GetWordZero, GetCardinalOne,
|
||||
GetCardinalZero to have an extra location parameter.
|
||||
* gm2/gm2-gcc/m2statement.c: change all calls to BuildConvert,
|
||||
GetIntegerOne, GetIntegerZero, GetWordOne, GetWordZero, GetCardinalOne,
|
||||
GetCardinalZero to have an extra location parameter.
|
||||
* gm2/gm2-gcc/m2treelib.c: change all calls to BuildConvert,
|
||||
GetIntegerOne, GetIntegerZero, GetWordOne, GetWordZero, GetCardinalOne,
|
||||
GetCardinalZero to have an extra location parameter.
|
||||
* gm2/gm2-gcc/m2type.c: change all calls to BuildConvert,
|
||||
GetIntegerOne, GetIntegerZero, GetWordOne, GetWordZero, GetCardinalOne,
|
||||
GetCardinalZero to have an extra location parameter.
|
||||
* gm2/gm2-gcc/m2type.def: change all calls to BuildConvert,
|
||||
GetIntegerOne, GetIntegerZero, GetWordOne, GetWordZero, GetCardinalOne,
|
||||
GetCardinalZero to have an extra location parameter.
|
||||
* gm2/gm2-gcc/m2type.h: change all calls to BuildConvert,
|
||||
GetIntegerOne, GetIntegerZero, GetWordOne, GetWordZero, GetCardinalOne,
|
||||
GetCardinalZero to have an extra location parameter.
|
||||
* gm2/gm2-lang.c: change all calls to BuildConvert,
|
||||
GetIntegerOne, GetIntegerZero, GetWordOne, GetWordZero, GetCardinalOne,
|
||||
GetCardinalZero to have an extra location parameter.
|
||||
|
||||
2015-06-26 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/gm2-compiler/M2GenGCC.mod: ConvertTo (New procedure function).
|
||||
ConvertRHS (New procedure function). IsWord (New procedure function).
|
||||
CodeConvert changed names of pararmeters and introduced call to
|
||||
ConvertRHS. CodeXIndr changed names of pararmeters and introduced
|
||||
call to ConvertRHS. This allows ISO WORD (an array of bytes) to
|
||||
be converted into CARDINAL.
|
||||
* gm2/gm2-gcc/m2block.c: allow multiple calls to pushGlobalScope
|
||||
and multiple calls to popGlobalScope.
|
||||
* gm2-gcc/m2convert.c: check for FUNCTION_DECL in value and if so
|
||||
use its address.
|
||||
* gm2/gm2.texi: updated web pages in light of the unordered list
|
||||
now implemented correctly in the python translation tool.
|
||||
Removed many old news entries.
|
||||
* gm2/www/tools/texi2tr/src/outputdev.py: implement unordered list.
|
||||
* gm2/www/tools/texi2tr/src/texi2tr.py: check for 'itemize' and
|
||||
'enumerate'
|
||||
* testsuite/lib/gm2.exp: corrected LD_LIBRARY_PATH calculation
|
||||
by testing each library in turn.
|
||||
* gm2/gm2-compiler/M2GenGCC.mod: corrected type for rhs.
|
||||
|
||||
2015-05-30 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/Make-lang.in: added rule to detect HAVE_STPCPY in configure output.
|
||||
* gm2/configure.in: check for function stpcpy.
|
||||
* gm2/gm2-libs/config-target: rebuilt.
|
||||
* gm2/gm2-libs/config-host: rebuilt.
|
||||
* gm2/gm2-libs/config-host.in: added check for stpcpy.
|
||||
* gm2/gm2config.h.in: added check for stpcpy.
|
||||
* testsuite/gm2/isolib/run/pass/testio2.mod: added debugging printf.
|
||||
* gm2/gm2-libs-iso/TextIO.mod: fixed bug in ReadToken so that the token
|
||||
terminates with a white space or null.
|
||||
* gm2/Make-lang.in: added dynamic test to check for HAVE_STPCPY.
|
||||
* gm2/gm2-libs/gm2-libs-host.h.in: added check for stpcpy.
|
||||
|
||||
2015-05-29 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* Solaris build fixes.
|
||||
* gm2/Make-lang.in: added place holder for the stpcpy rule.
|
||||
Added --lib $(STPCPY) to $(M2LINK) so that the Solaris 10 build
|
||||
succeeds.
|
||||
* gm2/gm2-libs-ch/wrapc.c: added #if defined()
|
||||
to check for the presence of SIGNBIT, SIGNBITL and SIGNBITF.
|
||||
* gm2/gm2-libs/config-host: rebuilt.
|
||||
* gm2/gm2-libs/config-host.in: added checks for SIGNBIT, SIGNBITL
|
||||
and SIGNBITF against libm.
|
||||
* gm2/gm2-libs/config-target: rebuilt.
|
||||
* gm2/gm2-libs/config-target.in: added checks for SIGNBIT, SIGNBITL
|
||||
and SIGNBITF against libm.
|
||||
* gm2/gm2spec.c: fixed many const char issues so that it can be built
|
||||
with g++.
|
||||
* gm2/config.h.in: added #undefs for SIGNBIT, SIGNBITL and SIGNBITF.
|
||||
* gm2/configure: rebuilt.
|
||||
* gm2/configure.ac: added checks for SIGNBIT, SIGNBITL
|
||||
and SIGNBITF against libm.
|
||||
* gm2/libpim/dtoa.c: added conditional compilation tests for
|
||||
HAVE_ERRNO_H.
|
||||
* gm2/libpim/ldtoa.c: added conditional compilation tests for
|
||||
HAVE_ERRNO_H.
|
||||
* gm2/libpim/wrapc.c: added conditional compilation tests for
|
||||
SIGNBIT, SIGNBITL and SIGNBITF.
|
||||
|
||||
2015-05-29 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* Linking fixes (-v).
|
||||
* This fixes a bug reported by Christoph Schlegel and many others.
|
||||
* Linking would fail when -v was present on the command line.
|
||||
* gm2/gm2-compiler/M2Options.def: new parameter to DisplayVersion
|
||||
(mustExit). Necessary to ensure the -v works in the linking phase.
|
||||
* gm2/gm2-compiler/M2Options.mod: implement the new parameter
|
||||
to DisplayVersion (mustExit).
|
||||
* gm2/gm2-gcc/m2options.h: update the prototype for DisplayVersion.
|
||||
This occurred because -v was rewritten to --version by gm2spec.c
|
||||
and --version called exit.
|
||||
* gm2/gm2-lang.c: call DisplayVersion but request it does not
|
||||
exit.
|
||||
* gm2/gm2spec.c: pass TRUE when handling -fgm2-version (to force
|
||||
an exit). Pass FALSE when handling --version to suppress the
|
||||
exit.
|
||||
* gm2/gm2version.h: updated the prototype for gm2_version.
|
||||
|
||||
2015-05-29 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/gm2-libs-iso/TextIO.mod: new procedure SkipSpaces.
|
||||
ReadToken calls SkipSpaces, this fixes a bug reported by:
|
||||
(D.E.Evans <sinuhe@gnu.org>).
|
||||
|
||||
* gm2/lang-specs.h: fixed dates and tidied up the spec code so
|
||||
that many rules are broken down into obvious stages with
|
||||
inputs and outputs.
|
||||
* gm2/tools-src/makeversion: changed to reflect the new gm2_version
|
||||
which has a parameter, mustExit.
|
||||
|
||||
2015-05-04 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/examples/pge: more interim checkins.
|
||||
* gm2/gm2-compiler/M2Batch.def: IsModuleSeen (New procedure
|
||||
function).
|
||||
* gm2/gm2-compiler/M2Batch.mod: IsModuleSeen (New procedure
|
||||
function) implemented.
|
||||
* gm2/gm2-compiler/M2GCCDeclare.mod: TryFindSymbol
|
||||
(New procedure function). Used to aid internal debugging.
|
||||
* gm2/gm2-libs-iso/IOLink.mod: fixed bug between dids and cid
|
||||
checking. Check did against dids and cid against did^.cids.
|
||||
* gm2/gm2-libs-iso/ProgramArgs.mod: fixed bug reported by
|
||||
(D.E.Evans <sinuhe@gnu.org>).
|
||||
|
||||
2015-04-27 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/gm2-libs-iso/MemStream.mod: removed debugging printf.
|
||||
* gm2/examples/pge: more changes.
|
||||
|
||||
2015-04-23 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/Make-lang.in: add $(TIMEVAR_H) to all m2.flex
|
||||
dependant rules.
|
||||
* gm2/examples/pge: more changes.
|
||||
|
||||
2015-04-21 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/examples/pge/examples: another interim checkin.
|
||||
(More debugging statements added and internal checking).
|
||||
* gm2/gm2-libs-iso/RawIO.mod: (Read) call FlushOutErr.
|
||||
* gm2/gm2-libs-iso/TextIO.mod: (Read) call FlushOutErr.
|
||||
* gm2/gm2-libs/FIO.def: export FlushOutErr.
|
||||
* This fixes a bug reported by Steve Giess, which allows
|
||||
iso and pim libraries to be mixed. It also fixes
|
||||
the interactive behaviour of the iso libraries so that
|
||||
output is flushed before data is read.
|
||||
|
||||
2015-04-15 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* released GM2 1.1.3
|
||||
* gm2/gm2-libs/config-host: rebuilt.
|
||||
* gm2/gm2-libs/config-host.in: 1.1.3.
|
||||
* gm2/gm2-libs/config-target: rebuilt.
|
||||
* gm2/gm2-libs/config-target.in: 1.1.3.
|
||||
* gm2/gm2.texi: updated release map.
|
||||
* gm2/version.c: 1.1.3.
|
||||
* gm2/examples/pge/examples: improved debugging log messages.
|
||||
|
||||
2015-04-09 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/Make-lang.in: changed path to gnu.eps to contain
|
||||
$(objdir).
|
||||
* gm2/examples/pge/examples/exampleBoxes.py: more intermin
|
||||
changes.
|
||||
* gm2/examples/pge/pge.py: more intermin changes.
|
||||
* gm2/examples/pge/pgeplayback.py: more intermin changes.
|
||||
* gm2/examples/pge/twoDsim.mod: more intermin changes.
|
||||
|
||||
2015-04-02 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/gm2-libs-iso/ConvStringLong.mod: check to see if the
|
||||
conversion generates a NAN and return accordingly.
|
||||
* gm2/gm2-libs-iso/ConvStringReal.mod: check to see if the
|
||||
conversion generates a NAN and return accordingly.
|
||||
This fixes a bug reported by: Michael Riedl.
|
||||
|
||||
2015-04-01 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/examples/pge: many bugfixes to the shared library example.
|
||||
* gm2/gm2-compiler/M2GenGCC.mod: FoldConvert use PopKindTree.
|
||||
PopKindTree new procedure function. This fixes a bug reported
|
||||
by: Michael Riedl. (see
|
||||
http://lists.nongnu.org/archive/html/gm2/2015-02/msg00006.html).
|
||||
|
||||
2015-03-28 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/examples/pge: many bugfixes to the shared library example.
|
||||
|
||||
2015-03-16 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/examples/pge: many more improvements to pgeplayback.py
|
||||
and twoDsim.mod.
|
||||
|
||||
2015-03-15 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/examples/pge: more changes to the shared library example.
|
||||
* gm2/gm2-libs/gdbif.mod: New file.
|
||||
* gm2/gm2-libs/gdbif.def: New file.
|
||||
|
||||
2015-02-25 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/examples/pge: huge amount of changes to expose the frame
|
||||
buffer to python/pygame.
|
||||
|
||||
2015-02-19 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* libgm2/libiso/Makefile.in: added MemStream.def and MemStream.mod
|
||||
in list of modules to be built and installed.
|
||||
* gm2/gm2-libs-iso/MemStream.def: New file.
|
||||
* gm2/gm2-libs-iso/MemStream.mod: New file.
|
||||
|
||||
2015-02-17 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/gm2-libs-iso/Storage.mod: fixed bug reported by
|
||||
reported by Michael Riedl <udo-michael.riedl@t-online.de>.
|
||||
DEALLOCATE should assign the pointer to NIL.
|
||||
|
||||
2015-02-11 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/examples/pge/pge.py: tidied up formatting.
|
||||
* gm2/gm2-compiler/M2GenGCC.mod: CanConvert (New procedure function).
|
||||
CodeCast checks to see if non same sized types can be converted
|
||||
and generates an error message if they cannot.
|
||||
* gm2/gm2.texi: corrected documentation to use libtool when building
|
||||
shared libraries. Updated references to jessie, rather than wheezy.
|
||||
Updated gcc graft to 4.7.4.
|
||||
* gm2/www/tools/texi2tr/html/download.html: update to stable release
|
||||
gm2-1.1.1.
|
||||
* gm2/www/tools/texi2tr/html/release.html: update to stable release
|
||||
gm2-1.1.1.
|
||||
* testsuite/gm2/iso/pass/realbitscast.mod: simplified test code.
|
||||
|
||||
2015-01-26 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/gm2-compiler/M2Quads.mod: MakeLengthConst new procedure
|
||||
function. BuildLengthFunction use MakeLengthConst.
|
||||
AssignHighField check for conststring and call MakeLengthConst.
|
||||
This fixes a bug reported below.
|
||||
* testsuite/gm2/pim/run/pass/bytearray.mod: new test code to
|
||||
detect bug reported by Michael Riedl <udo-michael.riedl@t-online.de>.
|
||||
* gm2/gm2-compiler/M2DriverOptions.mod: add char to the import
|
||||
list.
|
||||
* gm2/gm2-compiler/M2Options.mod: add string to the import list.
|
||||
|
||||
2015-01-13 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* Fixed bug reported by Peter Fletcher.
|
||||
* gm2/bnf/gm2l.bnf: handle '-v' options and remember cpp options.
|
||||
* gm2/gm2-compiler/M2DriverOptions.mod: remember cpp options.
|
||||
* gm2/gm2-compiler/M2Options.def: SetVerbose new procedure function.
|
||||
CppRemember new procedure.
|
||||
* gm2/gm2-compiler/M2Options.mod: implement SetVerbose
|
||||
procedure function and CppRemember.
|
||||
* gm2/www/tools/texi2tr/html/download.html: updated to include
|
||||
download reference to 4.7.x series of gcc.
|
||||
* gm2 now builds when grafted onto 4.7.4.
|
||||
|
||||
2015-01-04 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/examples/pge/Fractions.mod: removed unnecessary local
|
||||
variable.
|
||||
* gm2/examples/pge/Makefile.in: added extra sources and added
|
||||
libraries. Added local directory to the PYTHONPATH.
|
||||
* gm2/examples/pge/pge.py: many bugfixes and self checking code
|
||||
added.
|
||||
* gm2/examples/pge/pgeif.mod: initialise deviceIf.
|
||||
* gm2/gm2-libs-iso/LowLong.mod: correct prototype for huge_val.
|
||||
* gm2/gm2-libs-iso/LowReal.mod: correct prototype for huge_val.
|
||||
* gm2/gm2-libs-iso/LowShort.mod: correct prototype for huge_valf.
|
||||
* gm2/gm2-libs/Builtins.def: correct prototype for huge_val,
|
||||
huge_valf, huge_vall.
|
||||
|
||||
2015-01-03 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/bnf/gm2m.bnf: added debugging and verbose flag.
|
||||
Also fixed bug so that it understands the -fmake-I option.
|
||||
* gm2/examples/hello/Makefile.in: use $(EXE) rather than .out
|
||||
* gm2/examples/ncurses/Makefile.in: corrected arguments to
|
||||
gm2 -fmakeall.
|
||||
* gm2/examples/pge/Makefile.in: improved clean target.
|
||||
* gm2/gm2.texi: corrected typo.
|
||||
* gm2/lang-specs.h: ensure that gm2m is invoked with the -B
|
||||
and -fmake-I options present outside the -fgm2begin
|
||||
-fgm2end delimiters.
|
||||
|
||||
2015-01-02 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* released GM2 1.1.0
|
||||
* gm2/gm2-libs/config-host: rebuilt.
|
||||
* gm2/gm2-libs/config-host.in: 1.1.0.
|
||||
* gm2/gm2-libs/config-target: rebuilt.
|
||||
* gm2/gm2-libs/config-target.in: 1.1.0.
|
||||
* gm2/gm2.texi: updated release map.
|
||||
* gm2/gm2spec.c: removed C++ comment.
|
||||
* gm2/version.c: 1.1.0.
|
||||
* gm2/examples/pge/Makefile.in: interim checkin libpgeif uses
|
||||
libtool during construction. Temporary files removed from git.
|
||||
1351
gcc/m2/ChangeLog-2016
Normal file
1351
gcc/m2/ChangeLog-2016
Normal file
File diff suppressed because it is too large
Load Diff
1076
gcc/m2/ChangeLog-2017
Normal file
1076
gcc/m2/ChangeLog-2017
Normal file
File diff suppressed because it is too large
Load Diff
606
gcc/m2/ChangeLog-2018
Normal file
606
gcc/m2/ChangeLog-2018
Normal file
@@ -0,0 +1,606 @@
|
||||
2018-07-30 Gaius Mulley <gaius.mulley@southwales.ac.uk>
|
||||
|
||||
* gm2/gm2spec.c: (fe_generate_option) do not duplicate the old
|
||||
argument. free up a string after use. (build_include_path)
|
||||
start the new string with a strcpy not strcat!
|
||||
(insert_option) create a new vector with an extra entry.
|
||||
(no_link) return a string which can be free'd.
|
||||
(add_exec_name) return a string which can be free'd.
|
||||
|
||||
2018-07-18 Gaius Mulley <gaius.mulley@southwales.ac.uk>
|
||||
|
||||
* gm2/gm2spec.c: reformatted according to GNU coding standards.
|
||||
|
||||
2018-07-17 Gaius Mulley <gaius.mulley@southwales.ac.uk>
|
||||
|
||||
* gm2/gm2-compiler/ObjectFiles.mod: import ALLOCATE
|
||||
and DEALLOCATE from Storage. Collect return results
|
||||
from close and KillIndex.
|
||||
* gm2/gm2spec.c: reformatted and tidied up code.
|
||||
* gm2/gm2-libs/GetOpt.mod: remove declaration of PtrToInteger.
|
||||
* gm2/gm2-libs/GetOpt.mod: corrected record/pointer reference.
|
||||
|
||||
2018-07-16 Gaius Mulley <gaius.mulley@southwales.ac.uk>
|
||||
|
||||
* gm2/bnf/gm2l.bnf: reformatted to gnu standards.
|
||||
* gm2/el/gm2-mode.el: minor formatting change.
|
||||
* gm2/gm2-libs/DynamicStrings.mod: reformatted to gnu standards.
|
||||
* gm2/gm2-compiler/ObjectFiles.def: (New file).
|
||||
|
||||
2018-07-14 Gaius Mulley <gaius.mulley@southwales.ac.uk>
|
||||
|
||||
* gm2/Make-lang.in: remove the target configure scripts from
|
||||
gm2/gm2-libs.
|
||||
* gm2/configure: rebuilt.
|
||||
* gm2/examples/callingC/Makefile.in: use multiple -I flags.
|
||||
* gm2/examples/hello/Makefile.in: use multiple -I flags.
|
||||
* gm2/gm2-compiler/gm2lcc.mod: reformatted. Archive
|
||||
all object files, all Modula-2 objects and check for duplication.
|
||||
* gm2/gm2-libs-ch/wrapc.c: remove unconfigured test for fileinode.
|
||||
* gm2/gm2-libs/config-host: rebuilt.
|
||||
* gm2/gm2-libs/config-target: removed.
|
||||
* gm2/gm2-libs/gm2-libs-host.h.in: rebuilt.
|
||||
* gm2/gm2-libs/gm2-libs-target.h.in: removed.
|
||||
* gm2/gm2spec.c: reformatted. (add_env_option) New function.
|
||||
(lang_specific_driver) call add_env_option.
|
||||
* gm2/lang-specs.h: (lang_register_spec_functions) register
|
||||
no_objects.
|
||||
* gm2/patches/gcc/trunc/01-patches: rebuilt.
|
||||
* gm2/patches/gcc/trunc/02-patches: rebuilt.
|
||||
* gm2/patches/gcc/trunc/03-patches: rebuilt.
|
||||
* gm2/patches/gcc/trunc/04-patches: rebuilt.
|
||||
* gm2/patches/gcc/trunc/05-patches: rebuilt.
|
||||
* gm2/patches/gcc/trunc/06-patches: rebuilt.
|
||||
* gm2/patches/gcc/trunc/07-patches: rebuilt.
|
||||
* gm2/patches/gcc/trunc/08-patches: rebuilt.
|
||||
* gm2/patches/gcc/trunc/09-patches: rebuilt.
|
||||
* gm2/patches/gcc/trunc/10-patches: rebuilt.
|
||||
* testsuite/gm2/pim/run/pass/testaddr2.mod: reformatted.
|
||||
* gm2/gm2spec.c: removed unused variable and reformatted.
|
||||
* gm2/tools-src/makeversion: remove reference to config-target.in.
|
||||
|
||||
2018-07-10 Gaius Mulley <gaius.mulley@southwales.ac.uk>
|
||||
|
||||
* gm2/gm2-compiler/ObjectFiles.def: New file.
|
||||
* gm2/gm2-compiler/ObjectFiles.mod: New file.
|
||||
* gm2/Make-lang.in: added ObjectFiles to be built and linked
|
||||
into the compiler and tools.
|
||||
* gm2/gm2-compiler/gm2lcc.mod: use ObjectFiles to remember each
|
||||
object file so duplicates are not accidentally linked both in
|
||||
the Modula-2 link and command line list of objects. Much code
|
||||
was tidied up.
|
||||
* gm2/gm2-libs-ch/wrapc.c: (fileinode) New function.
|
||||
* gm2/gm2-libs/libc.def: corrected dates.
|
||||
* gm2/gm2-libs/wrapc.def: (fileinode) New procedure function.
|
||||
* libgm2/libpim/wrapc.c: (fileinode) New function. Tidied up
|
||||
formatting.
|
||||
|
||||
2018-07-07 Gaius Mulley <gaius.mulley@southwales.ac.uk>
|
||||
|
||||
* gm2/bnf/gm2l.bnf: import Verbose and use. (RegisterImport)
|
||||
reformatted. (ScanSources) display the module name if Verbose.
|
||||
(ScanArgs) handle long options and also concatenated arguments.
|
||||
(-I, --verbose, --M2RTS).
|
||||
* gm2/gm2-compiler/M2DriverOptions.mod: (CppArgument) New procedure
|
||||
function. (ScanCppArgs) reformatted and also call CppArgument.
|
||||
* gm2/gm2-compiler/M2Options.mod: updated dates.
|
||||
* gm2/gm2-compiler/M2Preprocess.mod: reformatted and changed some of the
|
||||
Verbose output.
|
||||
* gm2/gm2-libs-ch/getopt.c: implement long options.
|
||||
* gm2/gm2-libs/GetOpt.def: provide access to the long options in getopt.
|
||||
* gm2/gm2-libs/GetOpt.mod: implement long option procedures necessary for getopt.
|
||||
* gm2/gm2-libs/Storage.def: updated dates.
|
||||
* gm2/gm2-libs/getopt.def: provide access to the long options in getopt.
|
||||
* gm2/gm2.texi: corrected docuentation surrounding
|
||||
* gm2/gm2spec.c: removed GM2IPATH and GM2OPATH temporarily and changed
|
||||
all include and object paths to avoid using the ":" separator.
|
||||
(which does not exist for -I). In turn this forces a reimplementation
|
||||
of the GM2IPATH and GM2OPATH.
|
||||
* gm2/lang-specs.h: changed all references to gm2l to use the GM2L macro.
|
||||
Fixed many preprocessor invocation problems which occur when linking
|
||||
an application which uses the preprocessor.
|
||||
|
||||
2018-07-02 Gaius Mulley <gaius.mulley@southwales.ac.uk>
|
||||
|
||||
* gm2/Make-lang.in: changes to build stage2/gm2/gm2l
|
||||
* gm2/bnf/gm2l.bnf: remove FORWARD references.
|
||||
* gm2/gm2-compiler/M2GenGCC.mod: (GetAddressOfUnbounded)
|
||||
reformatted. (BuildHighFromStaticArray) bug fixes
|
||||
and reformatted.
|
||||
* gm2/gm2-libs/GetOpt.def: introduce long options.
|
||||
* gm2/iso/run/pass/constructor2.mod: reformatted.
|
||||
|
||||
2018-06-27 Gaius Mulley <gaius.mulley@southwales.ac.uk>
|
||||
|
||||
* gm2/gm2-compiler/M2GenGCC.mod: (GetHighFromUnbounded)
|
||||
check to see if the unbounded array has static array
|
||||
data type and follow the dimension into the static array
|
||||
to obtain the correct HIGH value.
|
||||
(BuildHighFromStaticArray) New procedure function.
|
||||
* gm2/gm2-compiler/M2Range.mod: add missing case clause.
|
||||
|
||||
2018-06-23 Gaius Mulley <gaius.mulley@southwales.ac.uk>
|
||||
|
||||
* gm2/el/g-mode.el: bug fixes to the m2-tag feature.
|
||||
* gm2/el/g-mode.el: allow . before a type, keyword,
|
||||
function and const.
|
||||
|
||||
2018-06-22 Gaius Mulley <gaius.mulley@southwales.ac.uk>
|
||||
|
||||
* gm2/el/g-mode.el: generate types and builtin functions
|
||||
dependant upon the dialect chosen.
|
||||
|
||||
2018-06-21 Gaius Mulley <gaius.mulley@southwales.ac.uk>
|
||||
|
||||
* gm2/el/g-mode.el: fixed m2-tag (find declaration
|
||||
understands the path and also works in algol keyword mode.
|
||||
* gm2/el/g-mode.el: fixed visual parenthesis balancing.
|
||||
* gm2/el/g-mode.el: removed some debugging statements.
|
||||
|
||||
2018-06-20 Gaius Mulley <gaius.mulley@southwales.ac.uk>
|
||||
|
||||
* gm2/el/g-mode.el: fixed traditional mode. Both algol
|
||||
mode and traditional are now usable and user selectable.
|
||||
|
||||
2018-06-13 Gaius Mulley <gaius.mulley@southwales.ac.uk>
|
||||
|
||||
* gm2/el/g-mode.el: added ability to turn on/off
|
||||
lowercase algol style keyword transformation.
|
||||
Fixed compile-command.
|
||||
* gm2/el/gm2-mode.el: renamed from g-mode.el.
|
||||
Changed internal variables from g-mode- to m2-auto-.
|
||||
|
||||
2018-06-11 Gaius Mulley <gaius.mulley@southwales.ac.uk>
|
||||
|
||||
* gm2/el/g-mode.el: added defcustom declarations
|
||||
and fixed some regexp bugs. Applied some defcustom
|
||||
implementation features.
|
||||
* gm2/el/g-mode.el: fixed electric END, ELSE and THEN.
|
||||
Added more defcustoms.
|
||||
* gm2/el/g-mode.el: added many more defcustoms. Also
|
||||
tidied up code and also tightened up types and introduced
|
||||
radio buttons for language choice. Use inbuilt booleans
|
||||
for binary choices. Fixed key binding for DEL and
|
||||
Backspace.
|
||||
|
||||
2018-06-08 Gaius Mulley <gaius.mulley@southwales.ac.uk>
|
||||
|
||||
* gm2/el/g-mode.el: interim checkin, keyword editing
|
||||
complete (minus delete key).
|
||||
|
||||
2018-06-07 Gaius Mulley <gaius.mulley@southwales.ac.uk>
|
||||
|
||||
* gm2/el/g-mode.el: interim checkin.
|
||||
* gm2/el/g-mode.el: another interim checkin in
|
||||
the development of lowercase keywords.
|
||||
|
||||
2018-05-24 Gaius Mulley <gaius.mulley@southwales.ac.uk>
|
||||
|
||||
* gm2/gm2-gcc/m2expr.c: (BuildNotEqualToZero)
|
||||
new function. (checkWholeNegateOverflow)
|
||||
re-implemented and in the process fixed bug
|
||||
and the test
|
||||
testsuite/gm2/switches/check-all/run/fail/intrange5.mod
|
||||
passes.
|
||||
(m2expr_Build4LogicalAnd) New function.
|
||||
* gm2/gm2-gcc/m2expr.c: renamed BuildLogicalAndIf
|
||||
to BuildTruthAndIf and renamed BuildLogicalOrIf
|
||||
to BuildTruthOrIf.
|
||||
|
||||
2018-05-23 Gaius Mulley <gaius.mulley@southwales.ac.uk>
|
||||
|
||||
* implement range checks on whole number multiply.
|
||||
* gm2/gm2-compiler/M2GenGCC.mod: import BuildMultCheck.
|
||||
Call CodeMultCheck in quadruple case statement.
|
||||
(CodeMultChecked) New procedure. (CodeMultCheck)
|
||||
New procedure.
|
||||
* gm2/gm2-gcc/m2expr.c: (checkWholeNegateOverflow)
|
||||
interm checkin. (checkWholeSubOverflow) corrected
|
||||
comment. (m2expr_Build3LogicalAnd) New function.
|
||||
(m2expr_Build4LogicalOr) New function.
|
||||
(checkWholeMultOverflow) New function.
|
||||
(checkWholeOverflow) New function.
|
||||
(m2expr_BuildMultCheck) New function.
|
||||
* gm2/gm2-gcc/m2expr.def: BuildMultCheck exported.
|
||||
* gm2/gm2-gcc/m2expr.h: BuildMultCheck defined.
|
||||
* gm2/gm2-gcc/m2expr.c: added missing semicolon.
|
||||
|
||||
2018-04-16 Gaius Mulley <gaius.mulley@southwales.ac.uk>
|
||||
|
||||
* gm2/Make-lang.in: changed the plugin directory to
|
||||
plugin rather than gm2/plugin. Corrected .so typeos.
|
||||
* gm2/gm2.texi: Semantic checking (New section).
|
||||
* testsuite/gm2/iso/analysis/fail/gm2.exp: New file.
|
||||
|
||||
2018-04-14 Gaius Mulley <gaius.mulley@southwales.ac.uk>
|
||||
|
||||
* gm2/Make-lang.in: build plugin/m2rte.so and create
|
||||
gm2/plugin directory.
|
||||
* gm2/gm2-compiler/CLexBuf.mod: removed FORWARD prototype
|
||||
definitions.
|
||||
* gm2/gm2-compiler/M2ALU.mod: removed FORWARD prototype
|
||||
definitions.
|
||||
* gm2/gm2-compiler/M2AsmUtil.mod: removed FORWARD prototype
|
||||
definitions.
|
||||
* gm2/gm2-compiler/M2BasicBlock.mod: removed FORWARD prototype
|
||||
definitions.
|
||||
* gm2/gm2-compiler/M2BasicBlock.mod: removed FORWARD prototype
|
||||
definitions.
|
||||
* gm2/gm2-compiler/M2Batch.mod: removed FORWARD prototype
|
||||
definitions.
|
||||
* gm2/gm2-compiler/M2Const.mod: removed FORWARD prototype
|
||||
definitions.
|
||||
* gm2/gm2-compiler/M2Const.mod: removed FORWARD prototype
|
||||
definitions.
|
||||
* gm2/gm2-compiler/M2Depth.mod: removed FORWARD prototype
|
||||
definitions.
|
||||
* gm2/gm2-compiler/M2Lex.mod: removed FORWARD prototype
|
||||
definitions.
|
||||
* gm2/gm2-compiler/M2LexBuf.mod: removed FORWARD prototype
|
||||
definitions.
|
||||
* gm2/gm2-compiler/M2LexBuf.mod: removed FORWARD prototype
|
||||
definitions.
|
||||
* gm2/gm2-compiler/M2MetaError.mod: removed FORWARD prototype
|
||||
definitions.
|
||||
* gm2/gm2-compiler/M2MetaError.mod: removed FORWARD prototype
|
||||
definitions.
|
||||
* gm2/gm2-compiler/M2Optimize.mod: removed FORWARD prototype
|
||||
definitions.
|
||||
* gm2/gm2-compiler/M2Swig.mod: removed FORWARD prototype
|
||||
definitions.
|
||||
* gm2/gm2-compiler/NameKey.mod: removed FORWARD prototype
|
||||
definitions.
|
||||
* gm2/gm2-compiler/PCSymBuild.mod: removed FORWARD prototype
|
||||
definitions.
|
||||
* gm2/gm2-compiler/SymbolKey.mod: removed FORWARD prototype
|
||||
definitions.
|
||||
* gm2/gm2-compiler/SymbolTable.mod: removed FORWARD prototype
|
||||
definitions.
|
||||
* gm2/gm2-compiler/gm2lcc.mod: removed FORWARD prototype
|
||||
definitions.
|
||||
* gm2/gm2-compiler/gm2lgen.mod: removed FORWARD prototype
|
||||
definitions.
|
||||
* gm2/gm2-libs-ch/libc.c: removed FORWARD prototype
|
||||
definitions.
|
||||
* gm2/gm2-libs-coroutines/Debug.mod: removed FORWARD prototype
|
||||
definitions.
|
||||
* gm2/gm2-libs-coroutines/Debug.mod: removed FORWARD prototype
|
||||
definitions.
|
||||
* gm2/gm2-libs-min/libc.c: removed FORWARD prototype
|
||||
definitions.
|
||||
* gm2/gm2-libs/Args.mod: removed FORWARD prototype
|
||||
definitions.
|
||||
* gm2/gm2-libs/Args.mod: removed FORWARD prototype
|
||||
definitions.
|
||||
* gm2/gm2-libs/CmdArgs.mod: removed FORWARD prototype
|
||||
definitions.
|
||||
* gm2/gm2-libs/Debug.mod: removed FORWARD prototype
|
||||
definitions.
|
||||
* gm2/gm2-libs/DynamicStrings.mod: removed FORWARD prototype
|
||||
definitions.
|
||||
* gm2/gm2-libs/DynamicStrings.mod: removed FORWARD prototype
|
||||
definitions.
|
||||
* gm2/gm2-libs/FIO.mod: removed FORWARD prototype
|
||||
definitions.
|
||||
* gm2/gm2-libs/NumberIO.mod: removed FORWARD prototype
|
||||
definitions.
|
||||
* gm2/gm2-libs/PushBackInput.mod: removed FORWARD prototype
|
||||
definitions.
|
||||
* gm2/gm2-libs/RTExceptions.mod: removed FORWARD prototype
|
||||
definitions.
|
||||
* gm2/gm2-libs/Scan.mod: removed FORWARD prototype
|
||||
definitions.
|
||||
* gm2/gm2-libs/StrIO.mod: removed FORWARD prototype
|
||||
definitions.
|
||||
* gm2/gm2-libs/StrLib.mod: removed FORWARD prototype
|
||||
definitions.
|
||||
* gm2/gm2-libs/StringConvert.mod: removed FORWARD prototype
|
||||
definitions.
|
||||
* gm2/plugins/m2rte.c: renamed to gm2/plugin/m2rte.c.
|
||||
* gm2/ulm-lib-gm2/std/RTExceptions.mod: removed FORWARD prototype
|
||||
definitions.
|
||||
|
||||
2018-04-10 Gaius Mulley <gaius.mulley@southwales.ac.uk>
|
||||
|
||||
* gm2/Make-lang.in: build m2rte plugin, install m2rte plugin.
|
||||
* gm2/gm2-compiler/M2Base.def: define new exception ExceptionReturn.
|
||||
* gm2/gm2-compiler/M2Base.mod: implement new exception ExceptionReturn.
|
||||
* gm2/gm2-compiler/M2Quads.mod: new call to InitReturnRangeCheck.
|
||||
* gm2/gm2-compiler/M2Range.def: define InitReturnRangeCheck.
|
||||
* gm2/gm2-compiler/M2Range.mod: (InitReturnRangeCheck),
|
||||
(FoldReturn), (CodeReturn) New procedures.
|
||||
* gm2/gm2-lang.c: detect -fno-m2-plugin option.
|
||||
* gm2/gm2-libs-iso/M2RTS.def: ReturnException defined.
|
||||
* gm2/gm2-libs-iso/M2RTS.mod: ReturnException implemented.
|
||||
* gm2/gm2-libs/M2RTS.def: ReturnException defined.
|
||||
* gm2/gm2-libs/M2RTS.mod: ReturnException implemented.
|
||||
* gm2/gm2spec.c: detect -fno-m2-plugin and unset boolean if
|
||||
present. Later insert the -fplugin=m2rte switch if plugins are true.
|
||||
* gm2/lang-options.h: allow -fm2-plugin and -fno-m2-plugin.
|
||||
* gm2/lang-specs.h: update dates.
|
||||
* gm2/lang.opt: define -fm2-plugin and -fno-m2-plugin.
|
||||
* gm2/m2pp.c: update dates.
|
||||
* gm2/tools-src/makeSystem: use -fno-m2-plugin when creating system.
|
||||
* gm2/ulm-lib-gm2/std/M2RTS.mod: ReturnException implemented.
|
||||
* plugins/m2rte.c: New file.
|
||||
|
||||
2018-03-28 Gaius Mulley <gaius.mulley@southwales.ac.uk>
|
||||
|
||||
* gm2/bnf/m2-2.bnf: updated dates and trimmed end of
|
||||
line spaces.
|
||||
* gm2/bnf/m2-c.bnf: updated dates and trimmed end of
|
||||
line spaces.
|
||||
* gm2/gm2-compiler/M2Comp.mod: removed p2c forward
|
||||
declarations.
|
||||
* gm2/gm2-compiler/M2Quads.mod: (BuildRealFuncProcCall)
|
||||
corrected comment title. Call SkipConst to skip over
|
||||
a constant assigned to a procedure. Fixes a bug reported
|
||||
by Michael Riedl <udo-michael.riedl@t-online.de>.
|
||||
* gm2/gm2-compiler/P2SymBuild.mod: remove p2c
|
||||
forward declarations.
|
||||
* testsuite/gm2/iso/run/pass/constprocedure.mod:
|
||||
New regression test to stress the bug reported (above).
|
||||
* testsuite/gm2/iso/fail/constprocedure.mod: New
|
||||
regression test to test standard functions are not
|
||||
allowed to be referenced in a const expression.
|
||||
(But they can be called).
|
||||
|
||||
2018-03-27 Gaius Mulley <gaius.mulley@southwales.ac.uk>
|
||||
|
||||
* gm2/el/g-mode.el: corrected dates and changed name
|
||||
to help debugging.
|
||||
* gm2/gm2-compiler/Indexing.mod: removed p2c related
|
||||
comment.
|
||||
* gm2/gm2-compiler/M2Error.mod: removed intemediate
|
||||
record type as we are no longer bootstrapping using
|
||||
p2c.
|
||||
* gm2/gm2-compiler/M2GCCDeclare.mod: removed intemediate
|
||||
record types as we are no longer bootstrapping using
|
||||
p2c.
|
||||
* gm2/gm2-compiler/M2Range.mod: removed intemediate
|
||||
record type as we are no longer bootstrapping using
|
||||
p2c.
|
||||
* gm2/gm2-compiler/ppg.mod: removed intemediate
|
||||
record types as we are no longer bootstrapping using
|
||||
p2c.
|
||||
|
||||
2018-03-26 Gaius Mulley <gaius.mulley@southwales.ac.uk>
|
||||
|
||||
* gm2/gm2-lang.c: (gm2_langhook_type_for_mode) rewritten
|
||||
(borrowed code from go-lang.c).
|
||||
* gm2/gm2-compiler/M2Quads.mod: (BuildAdrFunction)
|
||||
handle address of unbounded array and check the dimension
|
||||
access.
|
||||
|
||||
2018-03-14 Gaius Mulley <gaius.mulley@southwales.ac.uk>
|
||||
|
||||
* gm2/gm2-compiler/SymbolTable.mod: (PutUnbounded)
|
||||
ensure that all dimensions prior to the requested dimension
|
||||
has an entry in the array. (NulSym is added).
|
||||
* gm2/gm2-compiler/M2GCCDeclare.mod: (WalkFamilyOfUnbounded)
|
||||
check that unbounded is not NulSym before calling unboundedp.
|
||||
|
||||
* gm2/gm2-compiler/M2Quads.mod: (UnboundedVarLinkToArray)
|
||||
and (UnboundedNonVarLinkToArray) ensure that all
|
||||
parameters to BuildAdrFunction propagate the array
|
||||
and dimension operand stack.
|
||||
Fixes bugs exposed in
|
||||
testsuite/gm2/iso/run/pass/adrunbounded3.mod
|
||||
|
||||
2018-02-19 Gaius Mulley <gaius.mulley@southwales.ac.uk>
|
||||
|
||||
* gm2/gm2-compiler/M2Quads.mod: (AssignHighField)
|
||||
check for ArraySym and use if actual parameter
|
||||
has different number of dimensions to formal
|
||||
parameter array.
|
||||
* gm2/gm2-compiler/M2Quads.mod: (BuildConstHighFromSym)
|
||||
only access the single dimension when building high
|
||||
as the array will be referencing the desired dimension.
|
||||
A temporary type will have been created.
|
||||
|
||||
2018-02-15 Gaius Mulley <gaius.mulley@southwales.ac.uk>
|
||||
|
||||
* gm2/gm2-compiler/M2GenGCC.mod: check and use lvalue op3
|
||||
which points to the data for the unbounded quadruple.
|
||||
|
||||
2018-02-08 Gaius Mulley <gaius.mulley@southwales.ac.uk>
|
||||
|
||||
* gm2/gm2-compiler/M2Quads.mod: check open array actual
|
||||
parameter which is indexed and check the dimension against
|
||||
formal parameters.
|
||||
|
||||
2018-02-07 Gaius Mulley <gaius.mulley@southwales.ac.uk>
|
||||
|
||||
* gm2/Make-lang.in: added LDFLAGS to the link of mc.
|
||||
|
||||
2018-01-28 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/bnf/mc-5.bnf: regenerated.
|
||||
* gm2/mc-boot/GCmdArgs.c: regenerated.
|
||||
* gm2/mc-boot/GFIO.c: regenerated.
|
||||
* gm2/mc-boot/GStrIO.c: regenerated.
|
||||
* gm2/mc-boot/GStringConvert.c: regenerated.
|
||||
* gm2/mc-boot/Gdecl.c: regenerated.
|
||||
* gm2/mc-boot/Gdecl.h: regenerated.
|
||||
* gm2/mc-boot/GmcComp.c: regenerated.
|
||||
* gm2/mc-boot/GmcLexBuf.c: regenerated.
|
||||
* gm2/mc-boot/Gmcp1.c: regenerated.
|
||||
* gm2/mc-boot/Gmcp2.c: regenerated.
|
||||
* gm2/mc-boot/Gmcp3.c: regenerated.
|
||||
* gm2/mc-boot/Gmcp4.c: regenerated.
|
||||
* gm2/mc-boot/Gmcp5.c: regenerated.
|
||||
* gm2/mc/decl.def: (addElseComments), (addIfEndComments),
|
||||
(addWhileDoComment), (addWhileEndComment), (addRepeatComment),
|
||||
(addUntilComment) defined and exported.
|
||||
* gm2/mc/decl.mod: (commentPair) New record.
|
||||
Used in funccallT, returnT, whileT, repeatT, ifT, elsifT,
|
||||
assignmentT. (doAfterCommentC) New procedure.
|
||||
(doReturnC) Use (doAfterCommentC).
|
||||
(doAssignmentC) use (doAfterCommentC). (doIfC)
|
||||
use (doAfterCommentC). (doRepeatC) use (doAfterCommentC).
|
||||
(doWhileC) use (doAfterCommentC). (doFuncCallC) use
|
||||
(doAfterCommentC). (addGenericBody) rewritten.
|
||||
(addIfComments) rewritten. (addElseComments) New
|
||||
procedure. (addIfEndComments) New procedure.
|
||||
(addWhileDoComment) New procedure. (addWhileEndComment)
|
||||
New procedure. (initPair) New procedure.
|
||||
(addRepeatComment) New procedure.
|
||||
(addUntilComment) New procedure.
|
||||
* gm2/mc/mcLexBuf.mod: fixed an infinite loop bug hunting
|
||||
for the next token on a buffer boundary case.
|
||||
|
||||
2018-01-26 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/Make-lang.in: added extra commented definition for
|
||||
bootstrapping under trunc.
|
||||
* gm2/bnf/mc-1.bnf: changed comment interface.
|
||||
* gm2/bnf/mc-2.bnf: removed unnecessary import.
|
||||
* gm2/bnf/mc-5.bnf: rewritten the comment interface for
|
||||
after and body comments.
|
||||
* gm2/mc-boot/GCmdArgs.c: rebuilt.
|
||||
* gm2/mc-boot/GDebug.c: rebuilt.
|
||||
* gm2/mc-boot/GDynamicStrings.c: rebuilt.
|
||||
* gm2/mc-boot/GFIO.c: rebuilt.
|
||||
* gm2/mc-boot/GFormatStrings.c: rebuilt.
|
||||
* gm2/mc-boot/GFpuIO.c: rebuilt.
|
||||
* gm2/mc-boot/GIO.c: rebuilt.
|
||||
* gm2/mc-boot/GIndexing.c: rebuilt.
|
||||
* gm2/mc-boot/GM2EXCEPTION.c: rebuilt.
|
||||
* gm2/mc-boot/GM2RTS.c: rebuilt.
|
||||
* gm2/mc-boot/GM2RTS.h: rebuilt.
|
||||
* gm2/mc-boot/GNumberIO.c: rebuilt.
|
||||
* gm2/mc-boot/GRTExceptions.c: rebuilt.
|
||||
* gm2/mc-boot/GRTint.c: rebuilt.
|
||||
* gm2/mc-boot/GSFIO.c: rebuilt.
|
||||
* gm2/mc-boot/GStorage.c: rebuilt.
|
||||
* gm2/mc-boot/GStrIO.c: rebuilt.
|
||||
* gm2/mc-boot/GStrLib.c: rebuilt.
|
||||
* gm2/mc-boot/GStringConvert.c: rebuilt.
|
||||
* gm2/mc-boot/GSysStorage.c: rebuilt.
|
||||
* gm2/mc-boot/Gdecl.c: rebuilt.
|
||||
* gm2/mc-boot/Gdecl.h: rebuilt.
|
||||
* gm2/mc-boot/Gkeyc.c: rebuilt.
|
||||
* gm2/mc-boot/Glibc.h: rebuilt.
|
||||
* gm2/mc-boot/GmcComment.c: rebuilt.
|
||||
* gm2/mc-boot/GmcComment.h: rebuilt.
|
||||
* gm2/mc-boot/GmcComp.c: rebuilt.
|
||||
* gm2/mc-boot/GmcComp.h: rebuilt.
|
||||
* gm2/mc-boot/GmcError.c: rebuilt.
|
||||
* gm2/mc-boot/GmcLexBuf.c: rebuilt.
|
||||
* gm2/mc-boot/GmcLexBuf.h: rebuilt.
|
||||
* gm2/mc-boot/GmcMetaError.c: rebuilt.
|
||||
* gm2/mc-boot/GmcOptions.c: rebuilt.
|
||||
* gm2/mc-boot/GmcPretty.c: rebuilt.
|
||||
* gm2/mc-boot/GmcPrintf.c: rebuilt.
|
||||
* gm2/mc-boot/GmcQuiet.c: rebuilt.
|
||||
* gm2/mc-boot/GmcSearch.c: rebuilt.
|
||||
* gm2/mc-boot/Gmcp1.c: rebuilt.
|
||||
* gm2/mc-boot/Gmcp2.c: rebuilt.
|
||||
* gm2/mc-boot/Gmcp3.c: rebuilt.
|
||||
* gm2/mc-boot/Gmcp4.c: rebuilt.
|
||||
* gm2/mc-boot/Gmcp5.c: rebuilt.
|
||||
* gm2/mc-boot/GnameKey.c: rebuilt.
|
||||
* gm2/mc-boot/GsymbolKey.c: rebuilt.
|
||||
* gm2/mc-boot/Gvarargs.c: rebuilt.
|
||||
* gm2/mc-boot/Gwrapc.h: rebuilt.
|
||||
* gm2/mc/decl.def: (addCommentBody) New procedure.
|
||||
(addCommentAfter) New procedure. (addIfComments)
|
||||
New procedure. (makeCommentS) New procedure.
|
||||
(getCommentCharStar) New procedure function.
|
||||
(getContent) New procedure function.
|
||||
(setProcedureComment) New procedure function.
|
||||
(getProcedureComment) New procedure function.
|
||||
(getAfterStatementComment) New procedure function.
|
||||
(getInbodyStatementComment) New procedure function.
|
||||
(isProcedureComment) New procedure function.
|
||||
(isBodyComment) New procedure function.
|
||||
(isAfterComment) New procedure function.
|
||||
* gm2/mc/decl.mod: many alterations to allow per node
|
||||
after and body comments.
|
||||
* gm2/mc/keyc.mod: add free and malloc to the list of
|
||||
names to avoid.
|
||||
* gm2/mc/mc.flex: many alterations to allow per node
|
||||
after and body comments.
|
||||
* gm2/mc/mcComment.def: (commentDesc) New datatype.
|
||||
(initComment) New procedure function. (addText)
|
||||
New procedure. (getContent) New procedure function.
|
||||
* gm2/mc/mcComment.h: updated with new interface.
|
||||
* gm2/mc/mcComment.mod: (commentDesc) New datatype
|
||||
implemented.
|
||||
(initComment) New procedure function. (addText)
|
||||
New procedure. (getContent) New procedure function.
|
||||
* gm2/mc/mcComp.def: export getPassNo.
|
||||
* gm2/mc/mcComp.mod: (getPassNo) New procedure function.
|
||||
* gm2/mc/mcLexBuf.def: (getProcedureComment) New procedure
|
||||
function. (getBodyComment) New procedure function.
|
||||
(getAfterComment) New procedure function.
|
||||
* gm2/mc/mcLexBuf.h: replicate .def functionality.
|
||||
* gm2/mc/mcLexBuf.mod: (getProcedureComment) Implement new
|
||||
procedure function. (getBodyComment) Implement new
|
||||
procedure function.
|
||||
|
||||
2018-01-03 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/gm2-compiler/M2GenGCC.mod: (BuildUnaryCheckProcedure)
|
||||
imported. (BuildNegateCheck) imported. (CodeStatement)
|
||||
use BuildNegateCheck. (CodeUnaryCheck) New procedure.
|
||||
(CodeNegateChecked) New procedure.
|
||||
* gm2/gm2-gcc/m2expr.c: (checkUnaryWholeOverflow) New
|
||||
function. (m2expr_build_unary_op_check) New function.
|
||||
(BuildEqualToZero) New function.
|
||||
(checkWholeNegateOverflow) New function.
|
||||
(BuildNegateCheck) New function. (BuildNegate)
|
||||
reimplemented.
|
||||
* gm2/gm2-gcc/m2expr.def: (BuildUnaryCheckProcedure)
|
||||
Defined. (BuildNegateCheck) defined.
|
||||
* gm2/gm2-gcc/m2expr.h: (BuildNegateCheck) added prototype.
|
||||
|
||||
2018-01-02 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/gm2-compiler/M2GenGCC.mod: (CodeStatement) call
|
||||
CodeAddChecked and call CodeSubChecked.
|
||||
(CodeAddChecked) New procedure. (CodeSubChecked)
|
||||
New procedure.
|
||||
* gm2/gm2-compiler/M2Quads.mod: (BuildEndFor) suppress
|
||||
overflow checking in the addition
|
||||
of the loop variable. The explicit for loop check will
|
||||
catch an overflow and this addition can overflow for
|
||||
unsigned types counting down.
|
||||
* gm2/gm2-gcc/m2expr.c: (BuildAddCheck) corrected
|
||||
comments and strip results. (BuildSubCheck) corrected
|
||||
comments and strip results.
|
||||
* gm2/gm2-gcc/m2range.h: (New file).
|
||||
* gm2/patches/gcc/trunc: (Regenerated).
|
||||
|
||||
2018-01-01 Gaius Mulley <gaius@gnu.org>
|
||||
|
||||
* gm2/gm2-compiler/M2GenGCC.mod: (CodeAddCheck) New procedure.
|
||||
(CodeSubCheck) New procedure. (CodeBinaryCheck) New procedure.
|
||||
Use CodeAddCheck and CodeSubCheck.
|
||||
* gm2/gm2-compiler/M2Range.def: (GetMinMax) exported.
|
||||
* gm2/gm2-gcc/m2expr.c: (BuildAddCheck) New function.
|
||||
(BuildSubCheck) New function. (checkWholeAddOverflow)
|
||||
parameters changed. (checkWholeSubOverflow) New function.
|
||||
(checkWholeOverflow) updated parameters to include subrange min
|
||||
and max. (build_binary_op_check) New function. (build_binary_op)
|
||||
call build_binary_op_check.
|
||||
* gm2/gm2-gcc/m2expr.def: (BuildBinCheckProcedure) New
|
||||
definition. (BuildSubCheck) New procedure function.
|
||||
(BuildAddCheck) New procedure function.
|
||||
* gm2/gm2-gcc/m2expr.h: (BuildAddCheck) New prototype.
|
||||
(BuildSubCheck) New prototype.
|
||||
* gm2/gm2-compiler/M2GenGCC.mod: pass lowest into binop.
|
||||
* gm2/gm2-gcc/m2expr.c: (BuildAddCheck) extra parameter lowest.
|
||||
(BuildSubCheck) extra parameter lowest. Call build_binary_op
|
||||
with extra parameter lowest. (BuildLessThanZero) New function.
|
||||
(BuildGreaterThanZero) New function. (checkWholeAddOverflow)
|
||||
extra parameter and use BuildLessThanZero and
|
||||
BuildGreaterThanZero. (checkWholeSubOverflow)
|
||||
extra parameter and use BuildLessThanZero and
|
||||
BuildGreaterThanZero. (checkWholeOverflow) call
|
||||
checkWholeAddOverflow and checkWholeSubOverflow with an extra
|
||||
parameter.
|
||||
* gm2/gm2-gcc/m2expr.def: (BuildBinCheckProcedure) extra
|
||||
parameter. (BuildSubCheck) extra parameter lowest.
|
||||
(BuildAddCheck) extra parameter lowest.
|
||||
* gm2/gm2-gcc/m2expr.h: corrected prototype.
|
||||
4637
gcc/m2/ChangeLog-2019
Normal file
4637
gcc/m2/ChangeLog-2019
Normal file
File diff suppressed because it is too large
Load Diff
1707
gcc/m2/ChangeLog-2020
Normal file
1707
gcc/m2/ChangeLog-2020
Normal file
File diff suppressed because it is too large
Load Diff
3238
gcc/m2/ChangeLog-2021
Normal file
3238
gcc/m2/ChangeLog-2021
Normal file
File diff suppressed because it is too large
Load Diff
945
gcc/m2/ChangeLog-2022
Normal file
945
gcc/m2/ChangeLog-2022
Normal file
@@ -0,0 +1,945 @@
|
||||
2022-05-30 Gaius Mulley <gaius.mulley@southwales.ac.uk>
|
||||
|
||||
* gm2-compiler/M2Options.def (cflag): New boolean.
|
||||
(Setc) New procedure. (Getc) New procedure function.
|
||||
* gm2-compiler/M2Options.mod (Setc): New procedure.
|
||||
(Getc) New procedure function. Initialize cflag to
|
||||
FALSE.
|
||||
* gm2-gcc/m2options.h (Setc): New external function.
|
||||
(Getc) New external function.
|
||||
* gm2-lang.cc: Handle OPT_c and call M2Options_Setc.
|
||||
* lang-specs.h: Remove all link rules for m2.
|
||||
* lang.opt: Allow m2 to process the -c option.
|
||||
* All m2 linking is disabled.
|
||||
|
||||
2022-05-20 Gaius Mulley <gaius.mulley@southwales.ac.uk>
|
||||
|
||||
* m2pp.cc: (Renamed from m2pp.c). Comments tidied up.
|
||||
* Make-lang.in: m2pp.c changed to m2pp.cc.
|
||||
(m2rte.so) Added insn-flags.h as a dependent
|
||||
|
||||
2022-05-19 Gaius Mulley <gaius.mulley@southwales.ac.uk>
|
||||
|
||||
* gm2-gcc/m2builtins.cc: Corrected comments (specifically
|
||||
those referring to .c files).
|
||||
* gm2-gcc/m2convert.cc: Corrected comments (specifically
|
||||
those referring to .c files).
|
||||
* gm2-gcc/m2expr.cc: Corrected comments (specifically
|
||||
those referring to .c files).
|
||||
* gm2-gcc/m2statement.cc: Corrected comments (specifically
|
||||
those referring to .c files).
|
||||
* gm2-gcc/m2treelib.cc: Corrected comments (specifically
|
||||
those referring to .c files).
|
||||
* gm2-gcc/m2type.cc: Corrected comments (specifically
|
||||
those referring to .c files).
|
||||
* gm2-gcc/rtegraph.cc: Corrected comments (specifically
|
||||
those referring to .c files).
|
||||
* gm2-lang.cc: Corrected comments (specifically
|
||||
those referring to .c files).
|
||||
* plugin/m2rte.cc: Reformatted comments.
|
||||
* lang-options.h: (Removed).
|
||||
* plugin/m2rte.cc: Further reformatting of comments.
|
||||
* gm2-gcc/m2statement.cc: Corrected comment formatting and
|
||||
removed usused debugging code.
|
||||
* gm2-gcc/m2assert.cc: Corrected comment formatting.
|
||||
* gm2-gcc/m2block.cc: Corrected comment formatting.
|
||||
* gm2-gcc/m2builtins.cc: Corrected comment formatting.
|
||||
* gm2-gcc/m2convert.cc: Corrected comment formatting.
|
||||
* gm2-gcc/m2decl.cc: Corrected comment formatting.
|
||||
* gm2-gcc/m2except.cc: Corrected comment formatting.
|
||||
* gm2-gcc/m2expr.cc: Corrected comment formatting.
|
||||
* gm2-gcc/m2linemap.cc: Corrected comment formatting.
|
||||
* gm2-gcc/m2statement.cc: Corrected comment formatting.
|
||||
* gm2-gcc/m2treelib.cc: Corrected comment formatting.
|
||||
* gm2-gcc/m2type.cc: Corrected comment formatting.
|
||||
* gm2-gcc/rtegraph.cc: Corrected comment formatting.
|
||||
* gm2-gcc/m2color.h: Corrected comment formatting.
|
||||
* gm2-gcc/gcc-consolidation.h: Corrected comment formatting.
|
||||
|
||||
2022-05-16 Gaius Mulley <gaius.mulley@southwales.ac.uk>
|
||||
|
||||
* plugin/m2rte.cc (alias.h, predict.h, tm.h)
|
||||
(stringpool.h, toplev.h, basic-block.h, hash-table.h)
|
||||
(vec.h, ggc.h, basic-block.h, tree-ssa-alias.h)
|
||||
(internal-fn.h, gimple-fold.h, tree-eh.h, gimple-expr.h)
|
||||
(is-a.h): Header file includes removed.
|
||||
(plugin/m2rte$(exeext).so) Make dependent upon
|
||||
$(GCC_HEADER_DEPENDENCIES_FOR_M2) and insn-addr-common.h.
|
||||
|
||||
2022-05-15 Gaius Mulley <gaius.mulley@southwales.ac.uk>
|
||||
|
||||
* m2/Make-lang.in (GCC_HEADER_DEPENDENCIES_FOR_M2): New define.
|
||||
m2/gm2-gcc/%.o: Add GCC_HEADER_DEPENDENCIES_FOR_M2 as a dependent.
|
||||
m2/gm2-lang.o: Add GCC_HEADER_DEPENDENCIES_FOR_M2 as a dependent.
|
||||
m2/stor-layout.o: Add GCC_HEADER_DEPENDENCIES_FOR_M2 as a
|
||||
dependent.
|
||||
m2/m2pp.o: Add GCC_HEADER_DEPENDENCIES_FOR_M2 as a
|
||||
dependent.
|
||||
m2/gm2-gcc/rtegraph.o: Add GCC_HEADER_DEPENDENCIES_FOR_M2 as a
|
||||
dependent.
|
||||
c-family/m2pp.o: Add GCC_HEADER_DEPENDENCIES_FOR_M2 as a
|
||||
dependent. Added new comments.
|
||||
* m2/tools-src/calcpath: Remove -e option to realpath
|
||||
to help the build on FreeBSD.
|
||||
|
||||
2022-05-13 Gaius Mulley <gaius.mulley@southwales.ac.uk>
|
||||
|
||||
* gm2-compiler/ppg.mod: Reduced the line wrap marker
|
||||
to ensure texi pretty print rules do not cause overful box errors
|
||||
in gm2 pdf documentation.
|
||||
* gm2-libs-iso/SYSTEM.def: Shorten the comment lines
|
||||
and parameter lists per line to avoid overful box errors.
|
||||
* gm2-libs/Assertion.def: Shorten the comment lines
|
||||
and parameter lists per line to avoid overful box errors.
|
||||
* gm2-libs/Builtins.def: Shorten the comment lines
|
||||
and parameter lists per line to avoid overful box errors.
|
||||
* gm2-libs/Builtins.mod: Name change n to nbytes for memcpy,
|
||||
memset and memmove.
|
||||
* gm2-libs/DynamicStrings.def: Shorten the comment lines
|
||||
and parameter lists per line to avoid overful box errors.
|
||||
* gm2-libs/Environment.def: Shorten the comment lines
|
||||
and parameter lists per line to avoid overful box errors.
|
||||
* gm2-libs/FIO.def: Shorten the comment lines
|
||||
and parameter lists per line to avoid overful box errors.
|
||||
* gm2-libs/FIO.mod: Shorten the comment lines
|
||||
and parameter lists per line to avoid overful box errors.
|
||||
* gm2-libs/FormatStrings.def: Shorten the comment lines
|
||||
and parameter lists per line to avoid overful box errors.
|
||||
* gm2-libs/FpuIO.def: Shorten the comment lines
|
||||
and parameter lists per line to avoid overful box errors.
|
||||
* gm2-libs/GetOpt.def: Shorten the comment lines
|
||||
and parameter lists per line to avoid overful box errors.
|
||||
* gm2-libs/SYSTEM.def: Shorten the comment lines
|
||||
and parameter lists per line to avoid overful box errors.
|
||||
|
||||
2022-05-05 Gaius Mulley <gaius.mulley@southwales.ac.uk>
|
||||
|
||||
* m2-link-support.h (GM2CC): Add CC1_SPEC to the cc1/cc1plus
|
||||
invocation.
|
||||
|
||||
2022-05-04 Gaius Mulley <gaius.mulley@southwales.ac.uk>
|
||||
|
||||
* m2/m2-link-support.h (RM_IF_NOSAVETEMP) New macro.
|
||||
(GM2CC) Use RM_IF_NOSAVETEMP on the assembler intermediate file.
|
||||
(GM2LCC) Use RM_IF_NOSAVETEMP when creating an archive of the
|
||||
application. (GEN_SCAFFOLD_SRC) Use RM_IF_NOSAVETEMP when
|
||||
creating the scaffold source program. (M2LINK) Use
|
||||
RM_IF_NOSAVETEMP when creating the assembler source name and use
|
||||
RM_IF_NOSAVETEMP when creating the main program object.
|
||||
|
||||
2022-05-03 Gaius Mulley <gaius.mulley@southwales.ac.uk>
|
||||
|
||||
* Make-lang.in: Replaced sh with $(SHELL).
|
||||
* gm2-lang.cc (gm2_langhook_post_options): Assign
|
||||
main_input_filename. (gm2_parse_input_files) Assign
|
||||
main_input_filename before every source filename is compiled.
|
||||
|
||||
2022-04-29 Gaius Mulley <gaius.mulley@southwales.ac.uk>
|
||||
* m2/gm2-libs-ch/SysExceptions.c: Replace sigfpe with sigfpe_ to
|
||||
avoid name clash with C signal infastructure.
|
||||
* m2/mc-boot-ch/GSysExceptions.c: Replace sigfpe with sigfpe_ to
|
||||
avoid name clash with C signal infastructure.
|
||||
|
||||
2022-04-28 Gaius Mulley <gaius.mulley@southwales.ac.uk>
|
||||
|
||||
* Make-lang.in: Added $(INCLUDES) to all %.o rules requiring gmp.h.
|
||||
* mc-boot/Gkeyc.c: Rebuilt.
|
||||
* mc/keyc.mod (initMacros): Add sigfpe to the list of names to be
|
||||
avoided.
|
||||
* m2/mc-boot/GEnvironment.c: Rebuilt.
|
||||
* mc-boot/GEnvironment.h: Rebuilt.
|
||||
* mc-boot/Gdecl.c: Rebuilt.
|
||||
* mc-boot/Gkeyc.c: Rebuilt.
|
||||
* mc-boot/Glibc.h: Rebuilt.
|
||||
* mc/keyc.mod (initMacros): Add trunc to the list of functions to
|
||||
be avoided.
|
||||
|
||||
2022-04-20 Gaius Mulley <gaius.mulley@southwales.ac.uk>
|
||||
|
||||
* tools-src/mklink.c (FindObject): Replace calls to sprintf
|
||||
with calls to snprintf.
|
||||
|
||||
2022-03-02 Gaius Mulley <gaius.mulley@southwales.ac.uk>
|
||||
|
||||
* ChangeLog: Correct month for last commit.
|
||||
|
||||
2022-03-02 Gaius Mulley <gaius.mulley@southwales.ac.uk>
|
||||
|
||||
* ChangeLog-2021: (New file).
|
||||
|
||||
2022-03-02 Gaius Mulley <gaius.mulley@southwales.ac.uk>
|
||||
|
||||
* gm2-libs/Args.def (GetArg): Corrected formatting.
|
||||
* gm2-libs/Environment.def (GetEnvironment): Renamed parameter
|
||||
a to dest. (PutEnvironment) New procedure function.
|
||||
* gm2-libs/Environment.mod (GetEnvironment): Renamed parameter
|
||||
a to dest. (PutEnvironment) New procedure function.
|
||||
* gm2-libs/SEnvironment.def (GetEnvironment): Renamed parameter
|
||||
a to dest. (PutEnvironment) New procedure function.
|
||||
* gm2-libs/SEnvironment.mod (GetEnvironment): Renamed parameter
|
||||
a to dest. (PutEnvironment) New procedure function.
|
||||
* gm2-libs/libc.def: Export list introduced identifiers putenv, execv.
|
||||
* m2/m2-link-support.h: Ensure that the scaffold program
|
||||
is not deleted if the user specified -fmakeinit.
|
||||
* mc-boot-ch/Glibc.c (libc_putenv): New function.
|
||||
* ChangeLog-2021: (New file).
|
||||
* m2/m2-link-support.h (GEN_SCAFFOLD_SRC): New definition.
|
||||
(M2LINK) use GEN_SCAFFOLD_SRC to generate the scaffold name.
|
||||
* m2/configure.ac: Added rule to test for Python3. Added rule to
|
||||
detect realpath.
|
||||
|
||||
2022-01-25 Gaius Mulley <gaius.mulley@southwales.ac.uk>
|
||||
|
||||
* gm2spec.cc: Replaced save_switch by fe_save_switch.
|
||||
Replaced xputenv by fe_putenv. Replaced xgetenv by fe_getenv.
|
||||
|
||||
2022-01-23 Gaius Mulley <gaius.mulley@southwales.ac.uk>
|
||||
|
||||
* mc/decl.mod: (isZtypeEquivalent) New procedure function.
|
||||
(isEquivalentType) New procedure function. (doExprCastC)
|
||||
Added header comment and check for type equivalence.
|
||||
(needsCast) Added header comment and skip types for
|
||||
the formal and actual parameters before comparison.
|
||||
Add check for actual = nil parameter. (checkSystemCast)
|
||||
check for actual = nil being passed to a pointer parameter.
|
||||
* mc-boot/GArgs.c: Rebuilt.
|
||||
* mc-boot/GCmdArgs.c: Rebuilt.
|
||||
* mc-boot/GDebug.c: Rebuilt.
|
||||
* mc-boot/GDynamicStrings.c: Rebuilt.
|
||||
* mc-boot/GEnvironment.c: Rebuilt.
|
||||
* mc-boot/GFIO.c: Rebuilt.
|
||||
* mc-boot/GFormatStrings.c: Rebuilt.
|
||||
* mc-boot/GIO.c: Rebuilt.
|
||||
* mc-boot/GIndexing.c: Rebuilt.
|
||||
* mc-boot/GM2RTS.c: Rebuilt.
|
||||
* mc-boot/GNumberIO.c: Rebuilt.
|
||||
* mc-boot/GPushBackInput.c: Rebuilt.
|
||||
* mc-boot/GRTExceptions.c: Rebuilt.
|
||||
* mc-boot/GRTint.c: Rebuilt.
|
||||
* mc-boot/GStdIO.c: Rebuilt.
|
||||
* mc-boot/GStrCase.c: Rebuilt.
|
||||
* mc-boot/GStrIO.c: Rebuilt.
|
||||
* mc-boot/GStrLib.c: Rebuilt.
|
||||
* mc-boot/GStringConvert.c: Rebuilt.
|
||||
* mc-boot/GSysStorage.c: Rebuilt.
|
||||
* mc-boot/GTimeString.c: Rebuilt.
|
||||
* mc-boot/Galists.c: Rebuilt.
|
||||
* mc-boot/Gdecl.c: Rebuilt.
|
||||
* mc-boot/Gkeyc.c: Rebuilt.
|
||||
* mc-boot/Glists.c: Rebuilt.
|
||||
* mc-boot/GmcComment.c: Rebuilt.
|
||||
* mc-boot/GmcError.c: Rebuilt.
|
||||
* mc-boot/GmcLexBuf.c: Rebuilt.
|
||||
* mc-boot/GmcMetaError.c: Rebuilt.
|
||||
* mc-boot/GmcOptions.c: Rebuilt.
|
||||
* mc-boot/GmcPretty.c: Rebuilt.
|
||||
* mc-boot/GmcPrintf.c: Rebuilt.
|
||||
* mc-boot/GmcSearch.c: Rebuilt.
|
||||
* mc-boot/GmcStack.c: Rebuilt.
|
||||
* mc-boot/Gmcp1.c: Rebuilt.
|
||||
* mc-boot/Gmcp2.c: Rebuilt.
|
||||
* mc-boot/Gmcp3.c: Rebuilt.
|
||||
* mc-boot/Gmcp4.c: Rebuilt.
|
||||
* mc-boot/Gmcp5.c: Rebuilt.
|
||||
* mc-boot/GnameKey.c: Rebuilt.
|
||||
* mc-boot/GsymbolKey.c: Rebuilt.
|
||||
* mc-boot/Gvarargs.c: Rebuilt.
|
||||
* mc-boot/Gwlists.c: Rebuilt.
|
||||
|
||||
2022-01-22 Gaius Mulley <gaius.mulley@southwales.ac.uk>
|
||||
|
||||
* mc/decl.mod: (doReturnC) Use getExprType rather than getType.
|
||||
(getExprType) Added header comment.
|
||||
* mc-boot/GCmdArgs.c: Rebuilt.
|
||||
* mc-boot/GDynamicStrings.c: Rebuilt.
|
||||
* mc-boot/GFIO.c: Rebuilt.
|
||||
* mc-boot/GFormatStrings.c: Rebuilt.
|
||||
* mc-boot/GFpuIO.c: Rebuilt.
|
||||
* mc-boot/GIO.c: Rebuilt.
|
||||
* mc-boot/GIndexing.c: Rebuilt.
|
||||
* mc-boot/GM2EXCEPTION.c: Rebuilt.
|
||||
* mc-boot/GM2RTS.c: Rebuilt.
|
||||
* mc-boot/GNumberIO.c: Rebuilt.
|
||||
* mc-boot/GPushBackInput.c: Rebuilt.
|
||||
* mc-boot/GRTExceptions.c: Rebuilt.
|
||||
* mc-boot/GRTint.c: Rebuilt.
|
||||
* mc-boot/GSArgs.c: Rebuilt.
|
||||
* mc-boot/GSFIO.c: Rebuilt.
|
||||
* mc-boot/GStorage.c: Rebuilt.
|
||||
* mc-boot/GStrCase.c: Rebuilt.
|
||||
* mc-boot/GStrIO.c: Rebuilt.
|
||||
* mc-boot/GStrLib.c: Rebuilt.
|
||||
* mc-boot/GStringConvert.c: Rebuilt.
|
||||
* mc-boot/GSysStorage.c: Rebuilt.
|
||||
* mc-boot/Galists.c: Rebuilt.
|
||||
* mc-boot/Gdecl.c: Rebuilt.
|
||||
* mc-boot/Gkeyc.c: Rebuilt.
|
||||
* mc-boot/Glists.c: Rebuilt.
|
||||
* mc-boot/GmcComment.c: Rebuilt.
|
||||
* mc-boot/GmcComp.c: Rebuilt.
|
||||
* mc-boot/GmcError.c: Rebuilt.
|
||||
* mc-boot/GmcFileName.c: Rebuilt.
|
||||
* mc-boot/GmcLexBuf.c: Rebuilt.
|
||||
* mc-boot/GmcMetaError.c: Rebuilt.
|
||||
* mc-boot/GmcOptions.c: Rebuilt.
|
||||
* mc-boot/GmcPreprocess.c: Rebuilt.
|
||||
* mc-boot/GmcPretty.c: Rebuilt.
|
||||
* mc-boot/GmcPrintf.c: Rebuilt.
|
||||
* mc-boot/GmcSearch.c: Rebuilt.
|
||||
* mc-boot/GmcStack.c: Rebuilt.
|
||||
* mc-boot/GmcStream.c: Rebuilt.
|
||||
* mc-boot/Gmcp1.c: Rebuilt.
|
||||
* mc-boot/Gmcp2.c: Rebuilt.
|
||||
* mc-boot/Gmcp3.c: Rebuilt.
|
||||
* mc-boot/Gmcp4.c: Rebuilt.
|
||||
* mc-boot/Gmcp5.c: Rebuilt.
|
||||
* mc-boot/GnameKey.c: Rebuilt.
|
||||
* mc-boot/GsymbolKey.c: Rebuilt.
|
||||
* mc-boot/Gvarargs.c: Rebuilt.
|
||||
* mc-boot/Gwlists.c: Rebuilt.
|
||||
|
||||
2022-01-22 Gaius Mulley <gaius.mulley@southwales.ac.uk>
|
||||
|
||||
* mc-boot-ch/Gabort.c: (New file).
|
||||
* Make-lang.in: Use $(CXX) rather than $(CC). Use $(CC) rather
|
||||
than $(HOSTCC) when compiling mcflex.c. Invoke $(M2LINK) with
|
||||
--langc++ rather than --g++. (MCC_ARGS) changed to use
|
||||
--olang=c++. (m2/ppg$(exeext)) link with Gabort.o and make
|
||||
dependant upon Gabort.o. (m2/pg$(exeext)) link with Gabort.o
|
||||
and make dependant upon Gabort.o. (m2/pge$(exeext)) link with
|
||||
Gabort.o and make dependant upon Gabort.o. (gm2-check-examples)
|
||||
Removed.
|
||||
* gm2-ici/m2linemap.c: Introduce extern C for complete source
|
||||
file.
|
||||
* gm2-libs-ch/README: Reformatted.
|
||||
* gm2-libs-ch/RTcodummy.c: Introduce extern C for complete source
|
||||
file.
|
||||
* gm2-libs-ch/RTintdummy.c: Introduce extern C for complete source
|
||||
file.
|
||||
* gm2-libs-ch/Selective.c: Introduce extern C for complete source
|
||||
file.
|
||||
* gm2-libs-ch/SysExceptions.c: Introduce extern C for complete
|
||||
source file.
|
||||
* gm2-libs-ch/UnixArgs.c: Introduce extern C for complete source
|
||||
file.
|
||||
* gm2-libs-ch/UnixArgs.c: Introduce extern C for complete source
|
||||
file.
|
||||
* gm2-libs-ch/cgetopt.c: Introduce extern C for complete source
|
||||
file.
|
||||
* gm2-libs-ch/choosetemp.c: Introduce extern C for complete source
|
||||
file.
|
||||
* gm2-libs-ch/dtoa.c: Introduce extern C for complete source
|
||||
file.
|
||||
* gm2-libs-ch/errno.c: Introduce extern C for complete source
|
||||
file.
|
||||
* gm2-libs-ch/host.c: Introduce extern C for complete source
|
||||
file.
|
||||
* gm2-libs-ch/ldtoa.c: Introduce extern C for complete source
|
||||
file.
|
||||
* gm2-libs-ch/termios.c: Introduce extern C for complete source
|
||||
file.
|
||||
* gm2-libs-ch/tools.c: Reformatted source.
|
||||
* gm2-libs-ch/wrapc.c: Introduce extern C for complete source
|
||||
file.
|
||||
* gm2-libs-ch/xlibc.c: Introduce extern C for complete source
|
||||
file.
|
||||
* mc-boot-ch/GBuiltins.c: Introduce extern C for complete source
|
||||
file.
|
||||
* mc-boot-ch/GRTco.c: Introduce extern C for complete source
|
||||
file.
|
||||
* mc-boot-ch/GSYSTEM.c: Introduce extern C for complete source
|
||||
file.
|
||||
* mc-boot-ch/GSelective.c: Introduce extern C for complete source
|
||||
file.
|
||||
* mc-boot-ch/GSysExceptions.c: Introduce extern C for complete
|
||||
source file.
|
||||
* mc-boot-ch/GUnixArgs.c: Introduce extern C for complete source
|
||||
file.
|
||||
* mc-boot-ch/Gdtoa.c: Introduce extern C for complete source
|
||||
file.
|
||||
* mc-boot-ch/Gerrno.c: Introduce extern C for complete source
|
||||
file.
|
||||
* mc-boot-ch/Gldtoa.c: Introduce extern C for complete source
|
||||
file.
|
||||
* mc-boot-ch/Glibc.c: Introduce extern C for complete source
|
||||
file.
|
||||
* mc-boot-ch/Gmcrts.c: Removed fancy_abort. Introduce extern C for
|
||||
complete source file.
|
||||
* mc-boot-ch/Gtermios.c: Introduce extern C for complete source
|
||||
file.
|
||||
* mc-boot-ch/Gwrapc.c: Introduce extern C for complete source
|
||||
file.
|
||||
* mc-boot/GASCII.c: Rebuilt.
|
||||
* mc-boot/GASCII.h: Rebuilt.
|
||||
* mc-boot/GArgs.c: Rebuilt.
|
||||
* mc-boot/GArgs.h: Rebuilt.
|
||||
* mc-boot/GAssertion.c: Rebuilt.
|
||||
* mc-boot/GAssertion.h: Rebuilt.
|
||||
* mc-boot/GBreak.c: Rebuilt.
|
||||
* mc-boot/GBreak.h: Rebuilt.
|
||||
* mc-boot/GCOROUTINES.h: Rebuilt.
|
||||
* mc-boot/GCmdArgs.c: Rebuilt.
|
||||
* mc-boot/GCmdArgs.h: Rebuilt.
|
||||
* mc-boot/GDebug.c: Rebuilt.
|
||||
* mc-boot/GDebug.h: Rebuilt.
|
||||
* mc-boot/GDynamicStrings.c: Rebuilt.
|
||||
* mc-boot/GDynamicStrings.h: Rebuilt.
|
||||
* mc-boot/GEnvironment.c: Rebuilt.
|
||||
* mc-boot/GEnvironment.h: Rebuilt.
|
||||
* mc-boot/GFIO.c: Rebuilt.
|
||||
* mc-boot/GFIO.h: Rebuilt.
|
||||
* mc-boot/GFormatStrings.c Rebuilt.:
|
||||
* mc-boot/GFormatStrings.h: Rebuilt.
|
||||
* mc-boot/GFpuIO.c: Rebuilt.
|
||||
* mc-boot/GFpuIO.h: Rebuilt.
|
||||
* mc-boot/GIO.c: Rebuilt.
|
||||
* mc-boot/GIO.h: Rebuilt.
|
||||
* mc-boot/GIndexing.c: Rebuilt.
|
||||
* mc-boot/GIndexing.h: Rebuilt.
|
||||
* mc-boot/GM2EXCEPTION.c: Rebuilt.
|
||||
* mc-boot/GM2EXCEPTION.h: Rebuilt.
|
||||
* mc-boot/GM2RTS.c: Rebuilt.
|
||||
* mc-boot/GM2RTS.h: Rebuilt.
|
||||
* mc-boot/GMemUtils.c: Rebuilt.
|
||||
* mc-boot/GMemUtils.h: Rebuilt.
|
||||
* mc-boot/GNumberIO.c: Rebuilt.
|
||||
* mc-boot/GNumberIO.h: Rebuilt.
|
||||
* mc-boot/GPushBackInput.c: Rebuilt.
|
||||
* mc-boot/GPushBackInput.h: Rebuilt.
|
||||
* mc-boot/GRTExceptions.c: Rebuilt.
|
||||
* mc-boot/GRTExceptions.h: Rebuilt.
|
||||
* mc-boot/GRTco.h: Rebuilt.
|
||||
* mc-boot/GRTint.c: Rebuilt.
|
||||
* mc-boot/GRTint.h: Rebuilt.
|
||||
* mc-boot/GSArgs.c: Rebuilt.
|
||||
* mc-boot/GSArgs.h: Rebuilt.
|
||||
* mc-boot/GSFIO.c: Rebuilt.
|
||||
* mc-boot/GSFIO.h: Rebuilt.
|
||||
* mc-boot/GSYSTEM.h: Rebuilt.
|
||||
* mc-boot/GSelective.h: Rebuilt.
|
||||
* mc-boot/GStdIO.c: Rebuilt.
|
||||
* mc-boot/GStdIO.h: Rebuilt.
|
||||
* mc-boot/GStorage.c: Rebuilt.
|
||||
* mc-boot/GStorage.h: Rebuilt.
|
||||
* mc-boot/GStrCase.c: Rebuilt.
|
||||
* mc-boot/GStrCase.h: Rebuilt.
|
||||
* mc-boot/GStrIO.c: Rebuilt.
|
||||
* mc-boot/GStrIO.h: Rebuilt.
|
||||
* mc-boot/GStrLib.c: Rebuilt.
|
||||
* mc-boot/GStrLib.h: Rebuilt.
|
||||
* mc-boot/GStringConvert.c: Rebuilt.
|
||||
* mc-boot/GStringConvert.h: Rebuilt.
|
||||
* mc-boot/GSysExceptions.h: Rebuilt.
|
||||
* mc-boot/GSysStorage.c: Rebuilt.
|
||||
* mc-boot/GSysStorage.h: Rebuilt.
|
||||
* mc-boot/GTimeString.c: Rebuilt.
|
||||
* mc-boot/GTimeString.h: Rebuilt.
|
||||
* mc-boot/GUnixArgs.h: Rebuilt.
|
||||
* mc-boot/Galists.c: Rebuilt.
|
||||
* mc-boot/Galists.h: Rebuilt.
|
||||
* mc-boot/Gdecl.c: Rebuilt.
|
||||
* mc-boot/Gdecl.h: Rebuilt.
|
||||
* mc-boot/Gdtoa.h: Rebuilt.
|
||||
* mc-boot/Gerrno.h: Rebuilt.
|
||||
* mc-boot/Gkeyc.c: Rebuilt.
|
||||
* mc-boot/Gkeyc.h: Rebuilt.
|
||||
* mc-boot/Gldtoa.h: Rebuilt.
|
||||
* mc-boot/Glibc.h: Rebuilt.
|
||||
* mc-boot/Glibm.h: Rebuilt.
|
||||
* mc-boot/Glists.c: Rebuilt.
|
||||
* mc-boot/Glists.h: Rebuilt.
|
||||
* mc-boot/GmcComment.c: Rebuilt.
|
||||
* mc-boot/GmcComment.h: Rebuilt.
|
||||
* mc-boot/GmcComp.c: Rebuilt.
|
||||
* mc-boot/GmcComp.h: Rebuilt.
|
||||
* mc-boot/GmcDebug.c: Rebuilt.
|
||||
* mc-boot/GmcDebug.h: Rebuilt.
|
||||
* mc-boot/GmcError.c: Rebuilt.
|
||||
* mc-boot/GmcError.h: Rebuilt.
|
||||
* mc-boot/GmcFileName.c: Rebuilt.
|
||||
* mc-boot/GmcFileName.h: Rebuilt.
|
||||
* mc-boot/GmcLexBuf.c: Rebuilt.
|
||||
* mc-boot/GmcLexBuf.h: Rebuilt.
|
||||
* mc-boot/GmcMetaError.c: Rebuilt.
|
||||
* mc-boot/GmcMetaError.h: Rebuilt.
|
||||
* mc-boot/GmcOptions.c: Rebuilt.
|
||||
* mc-boot/GmcOptions.h: Rebuilt.
|
||||
* mc-boot/GmcPreprocess.c: Rebuilt.
|
||||
* mc-boot/GmcPreprocess.h: Rebuilt.
|
||||
* mc-boot/GmcPretty.c: Rebuilt.
|
||||
* mc-boot/GmcPretty.h: Rebuilt.
|
||||
* mc-boot/GmcPrintf.c: Rebuilt.
|
||||
* mc-boot/GmcPrintf.h: Rebuilt.
|
||||
* mc-boot/GmcQuiet.c: Rebuilt.
|
||||
* mc-boot/GmcQuiet.h: Rebuilt.
|
||||
* mc-boot/GmcReserved.c: Rebuilt.
|
||||
* mc-boot/GmcReserved.h: Rebuilt.
|
||||
* mc-boot/GmcSearch.c: Rebuilt.
|
||||
* mc-boot/GmcSearch.h: Rebuilt.
|
||||
* mc-boot/GmcStack.c: Rebuilt.
|
||||
* mc-boot/GmcStack.h: Rebuilt.
|
||||
* mc-boot/GmcStream.c: Rebuilt.
|
||||
* mc-boot/GmcStream.h: Rebuilt.
|
||||
* mc-boot/Gmcflex.h: Rebuilt.
|
||||
* mc-boot/Gmcp1.c: Rebuilt.
|
||||
* mc-boot/Gmcp1.h: Rebuilt.
|
||||
* mc-boot/Gmcp2.c: Rebuilt.
|
||||
* mc-boot/Gmcp2.h: Rebuilt.
|
||||
* mc-boot/Gmcp3.c: Rebuilt.
|
||||
* mc-boot/Gmcp3.h: Rebuilt.
|
||||
* mc-boot/Gmcp4.c: Rebuilt.
|
||||
* mc-boot/Gmcp4.h: Rebuilt.
|
||||
* mc-boot/Gmcp5.c: Rebuilt.
|
||||
* mc-boot/Gmcp5.h: Rebuilt.
|
||||
* mc-boot/GnameKey.c: Rebuilt.
|
||||
* mc-boot/GnameKey.h: Rebuilt.
|
||||
* mc-boot/GsymbolKey.c: Rebuilt.
|
||||
* mc-boot/GsymbolKey.h: Rebuilt.
|
||||
* mc-boot/Gtermios.h: Rebuilt.
|
||||
* mc-boot/Gtop.c: Rebuilt.
|
||||
* mc-boot/Gvarargs.c: Rebuilt.
|
||||
* mc-boot/Gvarargs.h: Rebuilt.
|
||||
* mc-boot/Gwlists.c: Rebuilt.
|
||||
* mc-boot/Gwlists.h: Rebuilt.
|
||||
* mc-boot/Gwrapc.h: Rebuilt.
|
||||
* mc/decl.mod: (returnT) scope field added. (makeReturn)
|
||||
initialize scope field. (doReturnC) check scope field and
|
||||
generate error if expression exists and no return type specified.
|
||||
Call doExprCastC to cast the return expression.
|
||||
(outDefC) Call keyc.genConfigSystem before entering extern C
|
||||
block. (outImpC) Call keyc.genConfigSystem prior to keyc.genDefs.
|
||||
(outModuleC) Call keyc.genConfigSystem prior to keyc.genDefs.
|
||||
* mc/keyc.def: (genConfigSystem) exported.
|
||||
* mc/varargs.mod: (copy) Rewritten pointer arithmetic to allow for
|
||||
Modula-2 and translated C++ versions to compile cleanly.
|
||||
* tools-src/mklink.c: Replace option --gcc with --langc. Replace
|
||||
option --g++ with --langc++.
|
||||
|
||||
2022-01-18 Gaius Mulley <gaius.mulley@southwales.ac.uk>
|
||||
|
||||
* Make-lang.in: (gm2spec.o) Use gm2spec.cc source
|
||||
file.
|
||||
(plugin/m2rte$(exeext).so) Use m2/plugin/m2rte.cc
|
||||
source file.
|
||||
(m2/gm2-gcc/%.o) Use .cc rather than .c source files.
|
||||
(m2/stor-layout.o) Build from stor-layout.cc rather than
|
||||
stor-layout.c.
|
||||
* config-lang.in: Renamed all .c files to .cc files.
|
||||
* gm2-gcc/init.cc: Remamed from m2/gm2-gcc/init.c.
|
||||
* gm2-gcc/init.h: Summary name change.
|
||||
* gm2-gcc/m2assert.cc: Remamed from
|
||||
m2/gm2-gcc/m2assert.c.
|
||||
* gm2-gcc/m2assert.h: Summary name change.
|
||||
* gm2-gcc/m2block.cc: Renamed from
|
||||
m2/gm2-gcc/m2block.c.
|
||||
* gm2-gcc/m2block.def: Summary name change.
|
||||
* gcc/m2/gm2-gcc/m2block.h: Summary name change.
|
||||
* gm2-gcc/m2builtins.cc: Renamed from
|
||||
m2/gm2-gcc/m2builtins.c.
|
||||
* gm2-gcc/m2builtins.def: Summary name change.
|
||||
* gm2-gcc/m2builtins.h: Summary name change.
|
||||
* gm2-gcc/m2color.cc: Renamed from
|
||||
m2/gm2-gcc/m2color.c.
|
||||
* gm2-gcc/m2convert.cc: Renamed from
|
||||
m2/gm2-gcc/m2convert.c.
|
||||
* gm2-gcc/m2convert.def: Summary name change.
|
||||
* gm2-gcc/m2convert.h: Summary name change.
|
||||
* gm2-gcc/m2decl.cc: Renamed from m2/gm2-gcc/m2decl.c.
|
||||
* gm2-gcc/m2decl.def: Summary name change.
|
||||
* gm2-gcc/m2decl.h: Summary name change.
|
||||
* gm2-gcc/m2except.cc: Renamed from
|
||||
m2/gm2-gcc/m2except.c.
|
||||
* gm2-gcc/m2except.h: Summary name change.
|
||||
* gm2-gcc/m2expr.cc: Renamed from m2/gm2-gcc/m2expr.c.
|
||||
* gm2-gcc/m2expr.def: Summary name change.
|
||||
* gm2-gcc/m2expr.h: Summary name change.
|
||||
* gm2-gcc/m2linemap.cc: Renamed from
|
||||
m2/gm2-gcc/m2linemap.c.
|
||||
* gm2-gcc/m2linemap.h: Summary name change.
|
||||
* gm2-gcc/m2misc.cc: Renamed from m2/gm2-gcc/m2misc.c.
|
||||
* gm2-gcc/m2misc.def: Summary name change.
|
||||
* gm2-gcc/m2misc.h: Summary name change.
|
||||
* gm2-gcc/m2statement.cc: Renamed from
|
||||
m2/gm2-gcc/m2statement.c.
|
||||
* gm2-gcc/m2statement.def: Summary name change.
|
||||
* gm2-gcc/m2statement.h: Summary name change.
|
||||
* gm2-gcc/m2top.cc: Renamed from m2/gm2-gcc/m2top.c.
|
||||
* gm2-gcc/m2top.def: Summary name change.
|
||||
* gm2-gcc/m2top.h: Summary name change.
|
||||
* gm2-gcc/m2tree.cc: Renamed from m2/gm2-gcc/m2tree.c.
|
||||
* gm2-gcc/m2tree.def: Summary name change.
|
||||
* gm2-gcc/m2tree.h: Summary name change.
|
||||
* gm2-gcc/m2treelib.cc: Renamed from
|
||||
m2/gm2-gcc/m2treelib.c.
|
||||
* gm2-gcc/m2treelib.def: Summary name change.
|
||||
* gm2-gcc/m2treelib.h: Summary name change.
|
||||
* gm2-gcc/m2type.cc: Renamed from m2/gm2-gcc/m2type.c.
|
||||
* gm2-gcc/m2type.def: Summary name change.
|
||||
* gm2-gcc/m2type.h: Summary name change.
|
||||
* gm2-gcc/rtegraph.cc: Renamed from
|
||||
m2/gm2-gcc/rtegraph.c.
|
||||
* gm2-lang.cc: Renamed from m2/gm2-lang.c.
|
||||
* gm2spec.cc: Renamed from m2/gm2spec.c.
|
||||
* plugin/m2rte.cc: Renamed from m2/plugin/m2rte.c.
|
||||
|
||||
2022-01-18 Gaius Mulley <gaius.mulley@southwales.ac.uk>
|
||||
|
||||
* COPYING.FDL: Update copyright notice dates.
|
||||
* COPYING.RUNTIME: Update copyright notice dates.
|
||||
* Make-lang.in: Update copyright notice dates.
|
||||
* bnf/gm2l.bnf: Update copyright notice dates.
|
||||
* bnf/gm2m.bnf: Update copyright notice dates.
|
||||
* bnf/m2-1.bnf: Update copyright notice dates.
|
||||
* bnf/m2-2.bnf: Update copyright notice dates.
|
||||
* bnf/m2-3.bnf: Update copyright notice dates.
|
||||
* bnf/m2-c.bnf: Update copyright notice dates.
|
||||
* bnf/m2-h.bnf: Update copyright notice dates.
|
||||
* bnf/m2.bnf: Update copyright notice dates.
|
||||
* bnf/mc-1.bnf: Update copyright notice dates.
|
||||
* bnf/mc-2.bnf: Update copyright notice dates.
|
||||
* bnf/mc-3.bnf: Update copyright notice dates.
|
||||
* bnf/mc-4.bnf: Update copyright notice dates.
|
||||
* bnf/mc-5.bnf: Update copyright notice dates.
|
||||
* config-lang.in: Update copyright notice dates.
|
||||
* configure.ac: Update copyright notice dates.
|
||||
* gm2-compiler/CLexBuf.def: Update copyright notice dates.
|
||||
* gm2-compiler/CLexBuf.mod: Update copyright notice dates.
|
||||
* gm2-compiler/FifoQueue.def: Update copyright notice dates.
|
||||
* gm2-compiler/FifoQueue.mod: Update copyright notice dates.
|
||||
* gm2-compiler/Lists.def: Update copyright notice dates.
|
||||
* gm2-compiler/Lists.mod: Update copyright notice dates.
|
||||
* gm2-compiler/M2ALU.def: Update copyright notice dates.
|
||||
* gm2-compiler/M2ALU.mod: Update copyright notice dates.
|
||||
* gm2-compiler/M2AsmUtil.def: Update copyright notice dates.
|
||||
* gm2-compiler/M2AsmUtil.mod: Update copyright notice dates.
|
||||
* gm2-compiler/M2Base.def: Update copyright notice dates.
|
||||
* gm2-compiler/M2Base.mod: Update copyright notice dates.
|
||||
* gm2-compiler/M2BasicBlock.def: Update copyright notice dates.
|
||||
* gm2-compiler/M2BasicBlock.mod: Update copyright notice dates.
|
||||
* gm2-compiler/M2Batch.def: Update copyright notice dates.
|
||||
* gm2-compiler/M2Batch.mod: Update copyright notice dates.
|
||||
* gm2-compiler/M2Bitset.def: Update copyright notice dates.
|
||||
* gm2-compiler/M2Bitset.mod: Update copyright notice dates.
|
||||
* gm2-compiler/M2CaseList.def: Update copyright notice dates.
|
||||
* gm2-compiler/M2CaseList.mod: Update copyright notice dates.
|
||||
* gm2-compiler/M2Check.def: Update copyright notice dates.
|
||||
* gm2-compiler/M2Check.mod: Update copyright notice dates.
|
||||
* gm2-compiler/M2Code.def: Update copyright notice dates.
|
||||
* gm2-compiler/M2Code.mod: Update copyright notice dates.
|
||||
* gm2-compiler/M2ColorString.def: Update copyright notice dates.
|
||||
* gm2-compiler/M2ColorString.mod: Update copyright notice dates.
|
||||
* gm2-compiler/M2Comp.def: Update copyright notice dates.
|
||||
* gm2-compiler/M2Comp.mod: Update copyright notice dates.
|
||||
* gm2-compiler/M2Configure.def: Update copyright notice dates.
|
||||
* gm2-compiler/M2Configure.mod: Update copyright notice dates.
|
||||
* gm2-compiler/M2Const.def: Update copyright notice dates.
|
||||
* gm2-compiler/M2Const.mod: Update copyright notice dates.
|
||||
* gm2-compiler/M2Debug.def: Update copyright notice dates.
|
||||
* gm2-compiler/M2Debug.mod: Update copyright notice dates.
|
||||
* gm2-compiler/M2DebugStack.def: Update copyright notice dates.
|
||||
* gm2-compiler/M2DebugStack.mod: Update copyright notice dates.
|
||||
* gm2-compiler/M2Defaults.def: Update copyright notice dates.
|
||||
* gm2-compiler/M2Defaults.mod: Update copyright notice dates.
|
||||
* gm2-compiler/M2Depth.def: Update copyright notice dates.
|
||||
* gm2-compiler/M2Depth.mod: Update copyright notice dates.
|
||||
* gm2-compiler/M2DriverOptions.def: Update copyright notice dates.
|
||||
* gm2-compiler/M2DriverOptions.mod: Update copyright notice dates.
|
||||
* gm2-compiler/M2Emit.def: Update copyright notice dates.
|
||||
* gm2-compiler/M2Emit.mod: Update copyright notice dates.
|
||||
* gm2-compiler/M2Error.def: Update copyright notice dates.
|
||||
* gm2-compiler/M2Error.mod: Update copyright notice dates.
|
||||
* gm2-compiler/M2EvalSym.def: Update copyright notice dates.
|
||||
* gm2-compiler/M2FileName.def: Update copyright notice dates.
|
||||
* gm2-compiler/M2FileName.mod: Update copyright notice dates.
|
||||
* gm2-compiler/M2GCCDeclare.def: Update copyright notice dates.
|
||||
* gm2-compiler/M2GCCDeclare.mod: Update copyright notice dates.
|
||||
* gm2-compiler/M2GenGCC.def: Update copyright notice dates.
|
||||
* gm2-compiler/M2GenGCC.mod: Update copyright notice dates.
|
||||
* gm2-compiler/M2Lex.def: Update copyright notice dates.
|
||||
* gm2-compiler/M2Lex.mod: Update copyright notice dates.
|
||||
* gm2-compiler/M2LexBuf.def: Update copyright notice dates.
|
||||
* gm2-compiler/M2LexBuf.mod: Update copyright notice dates.
|
||||
* gm2-compiler/M2MetaError.def: Update copyright notice dates.
|
||||
* gm2-compiler/M2MetaError.mod: Update copyright notice dates.
|
||||
* gm2-compiler/M2Optimize.def: Update copyright notice dates.
|
||||
* gm2-compiler/M2Optimize.mod: Update copyright notice dates.
|
||||
* gm2-compiler/M2Options.def: Update copyright notice dates.
|
||||
* gm2-compiler/M2Options.mod: Update copyright notice dates.
|
||||
* gm2-compiler/M2Pass.def: Update copyright notice dates.
|
||||
* gm2-compiler/M2Pass.mod: Update copyright notice dates.
|
||||
* gm2-compiler/M2Preprocess.def: Update copyright notice dates.
|
||||
* gm2-compiler/M2Preprocess.mod: Update copyright notice dates.
|
||||
* gm2-compiler/M2Printf.def: Update copyright notice dates.
|
||||
* gm2-compiler/M2Printf.mod: Update copyright notice dates.
|
||||
* gm2-compiler/M2Quads.def: Update copyright notice dates.
|
||||
* gm2-compiler/M2Quads.mod: Update copyright notice dates.
|
||||
* gm2-compiler/M2Quiet.def: Update copyright notice dates.
|
||||
* gm2-compiler/M2Quiet.mod: Update copyright notice dates.
|
||||
* gm2-compiler/M2Range.def: Update copyright notice dates.
|
||||
* gm2-compiler/M2Range.mod: Update copyright notice dates.
|
||||
* gm2-compiler/M2Reserved.def: Update copyright notice dates.
|
||||
* gm2-compiler/M2Reserved.mod: Update copyright notice dates.
|
||||
* gm2-compiler/M2SSA.mod: Update copyright notice dates.
|
||||
* gm2-compiler/M2Scope.def: Update copyright notice dates.
|
||||
* gm2-compiler/M2Scope.mod: Update copyright notice dates.
|
||||
* gm2-compiler/M2Search.def: Update copyright notice dates.
|
||||
* gm2-compiler/M2Search.mod: Update copyright notice dates.
|
||||
* gm2-compiler/M2Size.def: Update copyright notice dates.
|
||||
* gm2-compiler/M2Size.mod: Update copyright notice dates.
|
||||
* gm2-compiler/M2StackAddress.def: Update copyright notice dates.
|
||||
* gm2-compiler/M2StackAddress.mod: Update copyright notice dates.
|
||||
* gm2-compiler/M2StackWord.def: Update copyright notice dates.
|
||||
* gm2-compiler/M2StackWord.mod: Update copyright notice dates.
|
||||
* gm2-compiler/M2Students.def: Update copyright notice dates.
|
||||
* gm2-compiler/M2Students.mod: Update copyright notice dates.
|
||||
* gm2-compiler/M2Swig.def: Update copyright notice dates.
|
||||
* gm2-compiler/M2Swig.mod: Update copyright notice dates.
|
||||
* gm2-compiler/M2System.def: Update copyright notice dates.
|
||||
* gm2-compiler/M2System.mod: Update copyright notice dates.
|
||||
* gm2-compiler/M2Version.def: Update copyright notice dates.
|
||||
* gm2-compiler/NameKey.def: Update copyright notice dates.
|
||||
* gm2-compiler/NameKey.mod: Update copyright notice dates.
|
||||
* gm2-compiler/ObjectFiles.def: Update copyright notice dates.
|
||||
* gm2-compiler/ObjectFiles.mod: Update copyright notice dates.
|
||||
* gm2-compiler/Output.def: Update copyright notice dates.
|
||||
* gm2-compiler/Output.mod: Update copyright notice dates.
|
||||
* gm2-compiler/P0SymBuild.def: Update copyright notice dates.
|
||||
* gm2-compiler/P0SymBuild.mod: Update copyright notice dates.
|
||||
* gm2-compiler/P0SyntaxCheck.def: Update copyright notice dates.
|
||||
* gm2-compiler/P1Build.def: Update copyright notice dates.
|
||||
* gm2-compiler/P1SymBuild.def: Update copyright notice dates.
|
||||
* gm2-compiler/P1SymBuild.mod: Update copyright notice dates.
|
||||
* gm2-compiler/P2Build.def: Update copyright notice dates.
|
||||
* gm2-compiler/P2SymBuild.def: Update copyright notice dates.
|
||||
* gm2-compiler/P2SymBuild.mod: Update copyright notice dates.
|
||||
* gm2-compiler/P3Build.def: Update copyright notice dates.
|
||||
* gm2-compiler/P3SymBuild.def: Update copyright notice dates.
|
||||
* gm2-compiler/P3SymBuild.mod: Update copyright notice dates.
|
||||
* gm2-compiler/PCBuild.def: Update copyright notice dates.
|
||||
* gm2-compiler/PCSymBuild.def: Update copyright notice dates.
|
||||
* gm2-compiler/PCSymBuild.mod: Update copyright notice dates.
|
||||
* gm2-compiler/PHBuild.def: Update copyright notice dates.
|
||||
* gm2-compiler/Sets.def: Update copyright notice dates.
|
||||
* gm2-compiler/Sets.mod: Update copyright notice dates.
|
||||
* gm2-compiler/SymbolConversion.def: Update copyright notice dates.
|
||||
* gm2-compiler/SymbolConversion.mod: Update copyright notice dates.
|
||||
* gm2-compiler/SymbolKey.def: Update copyright notice dates.
|
||||
* gm2-compiler/SymbolKey.mod: Update copyright notice dates.
|
||||
* gm2-compiler/SymbolTable.def: Update copyright notice dates.
|
||||
* gm2-compiler/SymbolTable.mod: Update copyright notice dates.
|
||||
* gm2-compiler/bnflex.def: Update copyright notice dates.
|
||||
* gm2-compiler/bnflex.mod: Update copyright notice dates.
|
||||
* gm2-compiler/cflex.def: Update copyright notice dates.
|
||||
* gm2-compiler/gm2.mod: Update copyright notice dates.
|
||||
* gm2-compiler/gm2lcc.mod: Update copyright notice dates.
|
||||
* gm2-compiler/gm2lgen.mod: Update copyright notice dates.
|
||||
* gm2-compiler/gm2lorder.mod: Update copyright notice dates.
|
||||
* gm2-compiler/m2flex.def: Update copyright notice dates.
|
||||
* gm2-compiler/ppg.mod: Update copyright notice dates.
|
||||
* gm2-gcc/dynamicstrings.h: Update copyright notice dates.
|
||||
* gm2-gcc/gcc-consolidation.h: Update copyright notice dates.
|
||||
* gm2-gcc/init.c: Update copyright notice dates.
|
||||
* gm2-gcc/init.def: Update copyright notice dates.
|
||||
* gm2-gcc/init.h: Update copyright notice dates.
|
||||
* gm2-gcc/m2assert.c: Update copyright notice dates.
|
||||
* gm2-gcc/m2assert.h: Update copyright notice dates.
|
||||
* gm2-gcc/m2block.c: Update copyright notice dates.
|
||||
* gm2-gcc/m2block.def: Update copyright notice dates.
|
||||
* gm2-gcc/m2block.h: Update copyright notice dates.
|
||||
* gm2-gcc/m2builtins.c: Update copyright notice dates.
|
||||
* gm2-gcc/m2builtins.def: Update copyright notice dates.
|
||||
* gm2-gcc/m2builtins.h: Update copyright notice dates.
|
||||
* gm2-gcc/m2color.c: Update copyright notice dates.
|
||||
* gm2-gcc/m2color.def: Update copyright notice dates.
|
||||
* gm2-gcc/m2color.h: Update copyright notice dates.
|
||||
* gm2-gcc/m2convert.c: Update copyright notice dates.
|
||||
* gm2-gcc/m2convert.def: Update copyright notice dates.
|
||||
* gm2-gcc/m2convert.h: Update copyright notice dates.
|
||||
* gm2-gcc/m2decl.c: Update copyright notice dates.
|
||||
* gm2-gcc/m2decl.def: Update copyright notice dates.
|
||||
* gm2-gcc/m2decl.h: Update copyright notice dates.
|
||||
* gm2-gcc/m2except.c: Update copyright notice dates.
|
||||
* gm2-gcc/m2except.def: Update copyright notice dates.
|
||||
* gm2-gcc/m2except.h: Update copyright notice dates.
|
||||
* gm2-gcc/m2expr.c: Update copyright notice dates.
|
||||
* gm2-gcc/m2expr.def: Update copyright notice dates.
|
||||
* gm2-gcc/m2expr.h: Update copyright notice dates.
|
||||
* gm2-gcc/m2linemap.c: Update copyright notice dates.
|
||||
* gm2-gcc/m2linemap.def: Update copyright notice dates.
|
||||
* gm2-gcc/m2linemap.h: Update copyright notice dates.
|
||||
* gm2-gcc/m2misc.c: Update copyright notice dates.
|
||||
* gm2-gcc/m2misc.def: Update copyright notice dates.
|
||||
* gm2-gcc/m2misc.h: Update copyright notice dates.
|
||||
* gm2-gcc/m2options.h: Update copyright notice dates.
|
||||
* gm2-gcc/m2range.h: Update copyright notice dates.
|
||||
* gm2-gcc/m2search.h: Update copyright notice dates.
|
||||
* gm2-gcc/m2statement.c: Update copyright notice dates.
|
||||
* gm2-gcc/m2statement.def: Update copyright notice dates.
|
||||
* gm2-gcc/m2statement.h: Update copyright notice dates.
|
||||
* gm2-gcc/m2top.c: Update copyright notice dates.
|
||||
* gm2-gcc/m2top.def: Update copyright notice dates.
|
||||
* gm2-gcc/m2top.h: Update copyright notice dates.
|
||||
* gm2-gcc/m2tree.c: Update copyright notice dates.
|
||||
* gm2-gcc/m2tree.def: Update copyright notice dates.
|
||||
* gm2-gcc/m2tree.h: Update copyright notice dates.
|
||||
* gm2-gcc/m2treelib.c: Update copyright notice dates.
|
||||
* gm2-gcc/m2treelib.def: Update copyright notice dates.
|
||||
* gm2-gcc/m2treelib.h: Update copyright notice dates.
|
||||
* gm2-gcc/m2type.c: Update copyright notice dates.
|
||||
* gm2-gcc/m2type.def: Update copyright notice dates.
|
||||
* gm2-gcc/m2type.h: Update copyright notice dates.
|
||||
* gm2-gcc/rtegraph.c: Update copyright notice dates.
|
||||
* gm2-gcc/rtegraph.h: Update copyright notice dates.
|
||||
* gm2-internals.texi: Update copyright notice dates.
|
||||
* gm2-lang.c: Update copyright notice dates.
|
||||
* gm2-lang.h: Update copyright notice dates.
|
||||
* gm2-libs-ch/RTcodummy.c: Update copyright notice dates.
|
||||
* gm2-libs-ch/RTintdummy.c: Update copyright notice dates.
|
||||
* gm2-libs-ch/Selective.c: Update copyright notice dates.
|
||||
* gm2-libs-ch/SysExceptions.c: Update copyright notice dates.
|
||||
* gm2-libs-ch/UnixArgs.c: Update copyright notice dates.
|
||||
* gm2-libs-ch/cgetopt.c: Update copyright notice dates.
|
||||
* gm2-libs-ch/choosetemp.c: Update copyright notice dates.
|
||||
* gm2-libs-ch/dtoa.c: Update copyright notice dates.
|
||||
* gm2-libs-ch/errno.c: Update copyright notice dates.
|
||||
* gm2-libs-ch/host.c: Update copyright notice dates.
|
||||
* gm2-libs-ch/ldtoa.c: Update copyright notice dates.
|
||||
* gm2-libs-ch/pthdummy.c: Update copyright notice dates.
|
||||
* gm2-libs-ch/termios.c: Update copyright notice dates.
|
||||
* gm2-libs-ch/tools.c: Update copyright notice dates.
|
||||
* gm2-libs-ch/wrapc.c: Update copyright notice dates.
|
||||
* gm2-libs-ch/xlibc.c: Update copyright notice dates.
|
||||
* gm2-libs-coroutines/Debug.def: Update copyright notice dates.
|
||||
* gm2-libs-coroutines/Debug.mod: Update copyright notice dates.
|
||||
* gm2-libs-coroutines/Executive.def: Update copyright notice dates.
|
||||
* gm2-libs-coroutines/Executive.mod: Update copyright notice dates.
|
||||
* gm2-libs-coroutines/KeyBoardLEDs.def: Update copyright notice dates.
|
||||
* gm2-libs-coroutines/README.texi: Update copyright notice dates.
|
||||
* gm2-libs-coroutines/SYSTEM.def: Update copyright notice dates.
|
||||
* gm2-libs-coroutines/SYSTEM.mod: Update copyright notice dates.
|
||||
* gm2-libs-coroutines/TimerHandler.def: Update copyright notice dates.
|
||||
* gm2-libs-coroutines/TimerHandler.mod: Update copyright notice dates.
|
||||
* gm2config.h.in: Update copyright notice dates.
|
||||
* gm2spec.c: Update copyright notice dates.
|
||||
* gm2version.h: Update copyright notice dates.
|
||||
* lang-options.h: Update copyright notice dates.
|
||||
* lang-specs.h: Update copyright notice dates.
|
||||
* lang.opt: Update copyright notice dates.
|
||||
* m2-link-support.h: Update copyright notice dates.
|
||||
* m2-tree.def: Update copyright notice dates.
|
||||
* m2-tree.h: Update copyright notice dates.
|
||||
* m2.flex: Update copyright notice dates.
|
||||
* m2pp.c: Update copyright notice dates.
|
||||
* m2pp.h: Update copyright notice dates.
|
||||
* mc-boot-ch/GBuiltins.c: Update copyright notice dates.
|
||||
* mc-boot-ch/GRTco.c: Update copyright notice dates.
|
||||
* mc-boot-ch/GSYSTEM.c: Update copyright notice dates.
|
||||
* mc-boot-ch/GSelective.c: Update copyright notice dates.
|
||||
* mc-boot-ch/GSysExceptions.c: Update copyright notice dates.
|
||||
* mc-boot-ch/GUnixArgs.c: Update copyright notice dates.
|
||||
* mc-boot-ch/Gcbuiltin.c: Update copyright notice dates.
|
||||
* mc-boot-ch/Gdtoa.c: Update copyright notice dates.
|
||||
* mc-boot-ch/Gerrno.c: Update copyright notice dates.
|
||||
* mc-boot-ch/Gldtoa.c: Update copyright notice dates.
|
||||
* mc-boot-ch/Glibc.c: Update copyright notice dates.
|
||||
* mc-boot-ch/Glibm.c: Update copyright notice dates.
|
||||
* mc-boot-ch/Gmcrts.c: Update copyright notice dates.
|
||||
* mc-boot-ch/Gmcrts.h: Update copyright notice dates.
|
||||
* mc-boot-ch/Gnetwork.h: Update copyright notice dates.
|
||||
* mc-boot-ch/Gpth.c: Update copyright notice dates.
|
||||
* mc-boot-ch/Gtermios.c: Update copyright notice dates.
|
||||
* mc-boot-ch/Gwrapc.c: Update copyright notice dates.
|
||||
* mc-boot-ch/network.c: Update copyright notice dates.
|
||||
* mc/Indexing.def: Update copyright notice dates.
|
||||
* mc/Indexing.mod: Update copyright notice dates.
|
||||
* mc/alists.def: Update copyright notice dates.
|
||||
* mc/alists.mod: Update copyright notice dates.
|
||||
* mc/decl.def: Update copyright notice dates.
|
||||
* mc/decl.mod: Update copyright notice dates.
|
||||
* mc/keyc.def: Update copyright notice dates.
|
||||
* mc/keyc.mod: Update copyright notice dates.
|
||||
* mc/lists.def: Update copyright notice dates.
|
||||
* mc/lists.mod: Update copyright notice dates.
|
||||
* mc/m2flex.def: Update copyright notice dates.
|
||||
* mc/mc.flex: Update copyright notice dates.
|
||||
* mc/mcComment.def: Update copyright notice dates.
|
||||
* mc/mcComment.h: Update copyright notice dates.
|
||||
* mc/mcComment.mod: Update copyright notice dates.
|
||||
* mc/mcComp.def: Update copyright notice dates.
|
||||
* mc/mcComp.mod: Update copyright notice dates.
|
||||
* mc/mcDebug.def: Update copyright notice dates.
|
||||
* mc/mcDebug.mod: Update copyright notice dates.
|
||||
* mc/mcError.def: Update copyright notice dates.
|
||||
* mc/mcError.mod: Update copyright notice dates.
|
||||
* mc/mcFileName.def: Update copyright notice dates.
|
||||
* mc/mcFileName.mod: Update copyright notice dates.
|
||||
* mc/mcLexBuf.def: Update copyright notice dates.
|
||||
* mc/mcLexBuf.h: Update copyright notice dates.
|
||||
* mc/mcLexBuf.mod: Update copyright notice dates.
|
||||
* mc/mcMetaError.def: Update copyright notice dates.
|
||||
* mc/mcMetaError.mod: Update copyright notice dates.
|
||||
* mc/mcOptions.def: Update copyright notice dates.
|
||||
* mc/mcOptions.mod: Update copyright notice dates.
|
||||
* mc/mcPreprocess.def: Update copyright notice dates.
|
||||
* mc/mcPreprocess.mod: Update copyright notice dates.
|
||||
* mc/mcPretty.def: Update copyright notice dates.
|
||||
* mc/mcPretty.mod: Update copyright notice dates.
|
||||
* mc/mcPrintf.def: Update copyright notice dates.
|
||||
* mc/mcPrintf.mod: Update copyright notice dates.
|
||||
* mc/mcQuiet.def: Update copyright notice dates.
|
||||
* mc/mcQuiet.mod: Update copyright notice dates.
|
||||
* mc/mcReserved.def: Update copyright notice dates.
|
||||
* mc/mcReserved.h: Update copyright notice dates.
|
||||
* mc/mcReserved.mod: Update copyright notice dates.
|
||||
* mc/mcSearch.def: Update copyright notice dates.
|
||||
* mc/mcSearch.mod: Update copyright notice dates.
|
||||
* mc/mcStack.def: Update copyright notice dates.
|
||||
* mc/mcStack.mod: Update copyright notice dates.
|
||||
* mc/mcStream.def: Update copyright notice dates.
|
||||
* mc/mcStream.mod: Update copyright notice dates.
|
||||
* mc/mcflex.def: Update copyright notice dates.
|
||||
* mc/mcp1.def: Update copyright notice dates.
|
||||
* mc/mcp2.def: Update copyright notice dates.
|
||||
* mc/mcp3.def: Update copyright notice dates.
|
||||
* mc/mcp4.def: Update copyright notice dates.
|
||||
* mc/mcp5.def: Update copyright notice dates.
|
||||
* mc/nameKey.def: Update copyright notice dates.
|
||||
* mc/nameKey.mod: Update copyright notice dates.
|
||||
* mc/symbolKey.def: Update copyright notice dates.
|
||||
* mc/symbolKey.mod: Update copyright notice dates.
|
||||
* mc/top.mod: Update copyright notice dates.
|
||||
* mc/varargs.def: Update copyright notice dates.
|
||||
* mc/varargs.mod: Update copyright notice dates.
|
||||
* mc/wlists.def: Update copyright notice dates.
|
||||
* mc/wlists.mod: Update copyright notice dates.
|
||||
* tools-src/array2index.py: Update copyright notice dates.
|
||||
* tools-src/boilerplate.py: Update copyright notice dates.
|
||||
* tools-src/buildpg: Update copyright notice dates.
|
||||
* tools-src/buildsyntax: Update copyright notice dates.
|
||||
* tools-src/calcpath: Update copyright notice dates.
|
||||
* tools-src/createUlmSys: Update copyright notice dates.
|
||||
* tools-src/def2texi.py: Update copyright notice dates.
|
||||
* tools-src/gensum.py: Update copyright notice dates.
|
||||
* tools-src/incfile: Update copyright notice dates.
|
||||
* tools-src/makeSystem: Update copyright notice dates.
|
||||
* tools-src/makeconfigure: Update copyright notice dates.
|
||||
* tools-src/makeversion: Update copyright notice dates.
|
||||
* tools-src/mklink.c: Update copyright notice dates.
|
||||
* tools-src/tidydates.py: Update copyright notice dates.
|
||||
|
||||
2022-01-11 Gaius Mulley <gaiusmod2@gmail.com>
|
||||
|
||||
* Make-lang.in (m2/gm2spec.o): Added $(LIBS) to the dependants.
|
||||
(stage1/m2/gm2l): Added $(LIBS) to the dependants.
|
||||
(stage1/m2/gm2lcc): Added $(LIBS) to the dependants.
|
||||
(stage1/m2/gm2lgen): Added $(LIBS) to the dependants.
|
||||
(stage1/m2/gm2lorder): Added $(LIBS) to the dependants.
|
||||
(stage1/m2/gm2m): Added $(LIBS) to the dependants.
|
||||
|
||||
2022-01-04 Gaius Mulley <gaius.mulley@southwales.ac.uk>
|
||||
|
||||
* mc/decl.mod: Added missing comments to many procedures.
|
||||
(getStringContents) Completed missing code removing a --fixme--.
|
||||
(getLiteralStringContents) New procedure function.
|
||||
(doMakeEnumField) Return f even if an error should occur.
|
||||
* mc-boot/Gdecl.c: Rebuilt.
|
||||
1653
gcc/m2/Make-lang.in
Normal file
1653
gcc/m2/Make-lang.in
Normal file
File diff suppressed because it is too large
Load Diff
856
gcc/m2/Make-maintainer.in
Normal file
856
gcc/m2/Make-maintainer.in
Normal file
@@ -0,0 +1,856 @@
|
||||
# Make-maintainer.in build support tools for GNU M2.
|
||||
|
||||
# Copyright (C) 2022 Free Software Foundation, Inc.
|
||||
|
||||
#This file is part of GCC.
|
||||
|
||||
#GCC is free software; you can redistribute it and/or modify
|
||||
#it under the terms of the GNU General Public License as published by
|
||||
#the Free Software Foundation; either version 3, or (at your option)
|
||||
#any later version.
|
||||
|
||||
#GCC is distributed in the hope that it will be useful,
|
||||
#but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
#GNU General Public License for more details.
|
||||
|
||||
#You should have received a copy of the GNU General Public License
|
||||
#along with GCC; see the file COPYING3. If not see
|
||||
#<http://www.gnu.org/licenses/>.
|
||||
|
||||
# QUIAT=@
|
||||
XGCC = ./xgcc -B./
|
||||
GM2_2 = ./gm2 -B./stage2/m2 -g -fm2-g
|
||||
|
||||
# m2/ppg$(exeext) is the recursive descent parser generator.
|
||||
|
||||
PPG-INTERFACE-C = libc.c mcrts.c Selective.c termios.c \
|
||||
SysExceptions.c wrapc.c \
|
||||
SYSTEM.c errno.c
|
||||
|
||||
PPG-INTERFACE-CC = UnixArgs.cc ldtoa.cc dtoa.cc
|
||||
|
||||
# Implementation modules found in the gm2-compiler directory.
|
||||
|
||||
PPG-MODS = SymbolKey.mod NameKey.mod Lists.mod bnflex.mod Output.mod
|
||||
|
||||
# Core library definition modules used by ppg found in the gm2-libs directory.
|
||||
|
||||
PPG-LIB-DEFS = Args.def Assertion.def ASCII.def Debug.def \
|
||||
DynamicStrings.def FIO.def Indexing.def IO.def \
|
||||
NumberIO.def PushBackInput.def \
|
||||
M2Dependent.def \
|
||||
M2EXCEPTION.def M2LINK.def M2RTS.def \
|
||||
RTExceptions.def \
|
||||
StdIO.def SFIO.def StrIO.def StrLib.def \
|
||||
Storage.def StrCase.def SysStorage.def
|
||||
|
||||
# Core library implementation modules used by ppg found in the gm2-libs directory.
|
||||
|
||||
PPG-LIB-MODS = ASCII.mod \
|
||||
Args.mod \
|
||||
Assertion.mod \
|
||||
Debug.mod \
|
||||
DynamicStrings.mod \
|
||||
FIO.mod \
|
||||
IO.mod \
|
||||
Indexing.mod \
|
||||
M2Dependent.mod \
|
||||
M2EXCEPTION.mod \
|
||||
M2RTS.mod \
|
||||
NumberIO.mod \
|
||||
PushBackInput.mod \
|
||||
RTExceptions.mod \
|
||||
SFIO.mod \
|
||||
StdIO.mod \
|
||||
Storage.mod \
|
||||
StrCase.mod \
|
||||
StrIO.mod \
|
||||
StrLib.mod \
|
||||
SysStorage.mod
|
||||
|
||||
# Program module ppg.mod from which pge.mod is created. ppg.mod is
|
||||
# where changes should be made and then you should run pge-maintainer
|
||||
# to recreate the C++ version of pge.
|
||||
|
||||
PPG-SRC = ppg.mod
|
||||
|
||||
BUILD-PPG-O = $(PPG-INTERFACE-C:%.c=m2/gm2-ppg-boot/$(SRC_PREFIX)%.o) \
|
||||
$(PPG-INTERFACE-CC:%.cc=m2/gm2-ppg-boot/$(SRC_PREFIX)%.o) \
|
||||
$(PPG-MODS:%.mod=m2/gm2-ppg-boot/$(SRC_PREFIX)%.o) \
|
||||
$(PPG-LIB-MODS:%.mod=m2/gm2-ppg-boot/$(SRC_PREFIX)%.o) \
|
||||
$(PPG-SRC:%.mod=m2/gm2-ppg-boot/$(SRC_PREFIX)%.o)
|
||||
|
||||
MCC_ARGS= --olang=c++ \
|
||||
--quiet \
|
||||
--h-file-prefix=$(SRC_PREFIX) \
|
||||
-I$(srcdir)/m2/gm2-libs \
|
||||
-I$(srcdir)/m2/gm2-compiler \
|
||||
-I$(srcdir)/m2/gm2-libiberty \
|
||||
-I$(srcdir)/m2/gm2-gcc
|
||||
|
||||
MCC=m2/boot-bin/mc$(exeext) $(MCC_ARGS)
|
||||
|
||||
BUILD-PPG-LIBS-H = $(PPG-LIB-DEFS:%.def=m2/gm2-ppg-boot/$(SRC_PREFIX)%.h)
|
||||
|
||||
BUILD-PPG-H = m2/boot-bin/mc$(exeext) $(BUILD-PPG-LIBS-H)
|
||||
|
||||
m2/gm2-ppg-boot/$(SRC_PREFIX)%.h: $(srcdir)/m2/gm2-libs/%.def $(MCDEPS)
|
||||
$(MCC) -o=$@ $(srcdir)/m2/gm2-libs/$*.def
|
||||
|
||||
m2/gm2-ppg-boot/$(SRC_PREFIX)%.o: m2/mc-boot-ch/$(SRC_PREFIX)%.c m2/gm2-libs/gm2-libs-host.h
|
||||
$(CXX) -I. -I$(srcdir)/../include -I$(srcdir) -I$(srcdir)/m2/mc-boot-ch -Im2/gm2-libs $(INCLUDES) -g -c $< -o $@
|
||||
|
||||
m2/gm2-ppg-boot/$(SRC_PREFIX)%.o: m2/mc-boot-ch/$(SRC_PREFIX)%.cc m2/gm2-libs/gm2-libs-host.h
|
||||
$(CXX) -I. -I$(srcdir)/../include -I$(srcdir) -I$(srcdir)/m2/mc-boot-ch -Im2/gm2-libs $(INCLUDES) -g -c $< -o $@
|
||||
|
||||
m2/gm2-ppg-boot/$(SRC_PREFIX)%.o: $(srcdir)/m2/gm2-libs/%.mod $(MCDEPS) $(BUILD-BOOT-H)
|
||||
$(MCC) -o=m2/gm2-ppg-boot/$(SRC_PREFIX)$*.c $(srcdir)/m2/gm2-libs/$*.mod
|
||||
$(CXX) -I. -I$(srcdir)/../include -I$(srcdir) \
|
||||
-Im2/gm2-ppg-boot -I$(srcdir)/m2/mc-boot -Im2/gm2-libs-boot \
|
||||
-I$(srcdir)/m2/mc-boot-ch $(INCLUDES) -g -c m2/gm2-ppg-boot/$(SRC_PREFIX)$*.c -o $@
|
||||
|
||||
m2/gm2-ppg-boot/$(SRC_PREFIX)%.o: $(srcdir)/m2/gm2-compiler/%.mod $(MCDEPS) $(BUILD-BOOT-H)
|
||||
$(MCC) -o=m2/gm2-ppg-boot/$(SRC_PREFIX)$*.c $(srcdir)/m2/gm2-compiler/$*.mod
|
||||
$(CXX) -I. -I$(srcdir)/../include -I$(srcdir) \
|
||||
-Im2/mc-boot -Im2/gm2-compiler-boot -Im2/gm2-libs-boot \
|
||||
-I$(srcdir)/m2/mc-boot-ch $(INCLUDES) -g -c m2/gm2-ppg-boot/$(SRC_PREFIX)$*.c -o $@
|
||||
|
||||
m2/ppg$(exeext): m2/boot-bin/mc $(BUILD-PPG-O) $(BUILD-MC-INTERFACE-O) m2/gm2-ppg-boot/main.o \
|
||||
m2/gm2-libs-boot/RTcodummy.o m2/mc-boot-ch/$(SRC_PREFIX)abort.o \
|
||||
m2/gm2-libs-boot/M2LINK.o
|
||||
+$(LINKER) $(ALL_LINKERFLAGS) $(LDFLAGS) -o $@ $(BUILD-PPG-O) m2/gm2-ppg-boot/main.o \
|
||||
m2/gm2-libs-boot/RTcodummy.o m2/mc-boot-ch/$(SRC_PREFIX)abort.o \
|
||||
m2/gm2-libs-boot/M2LINK.o -lm
|
||||
|
||||
m2/gm2-ppg-boot/main.o: $(M2LINK) $(srcdir)/m2/init/mcinit
|
||||
unset CC ; $(M2LINK) -s --langc++ --exit --name mainppginit.c $(srcdir)/m2/init/ppginit
|
||||
mv mainppginit.c m2/gm2-ppg-boot/main.c
|
||||
$(CXX) $(INCLUDES) -g -c -o $@ m2/gm2-ppg-boot/main.c
|
||||
|
||||
m2/gm2-auto:
|
||||
test -d $@ || mkdir -p $@
|
||||
|
||||
# m2/pg$(exext) is the 2nd generation parser generator built from ebnf
|
||||
# without error recovery
|
||||
|
||||
PG-SRC = pg.mod
|
||||
|
||||
BUILD-PG-O = $(PPG-INTERFACE-C:%.c=m2/gm2-pg-boot/$(SRC_PREFIX)%.o) \
|
||||
$(PPG-INTERFACE-CC:%.cc=m2/gm2-pg-boot/$(SRC_PREFIX)%.o) \
|
||||
$(PPG-MODS:%.mod=m2/gm2-pg-boot/$(SRC_PREFIX)%.o) \
|
||||
$(PPG-LIB-MODS:%.mod=m2/gm2-pg-boot/$(SRC_PREFIX)%.o) \
|
||||
$(PG-SRC:%.mod=m2/gm2-pg-boot/$(SRC_PREFIX)%.o)
|
||||
|
||||
m2/gm2-pg-boot/$(SRC_PREFIX)%.h: $(srcdir)/m2/gm2-libs/%.def $(MCDEPS)
|
||||
$(MCC) -o=$@ $(srcdir)/m2/gm2-libs/$*.def
|
||||
|
||||
m2/gm2-pg-boot/$(SRC_PREFIX)%.o: m2/mc-boot-ch/$(SRC_PREFIX)%.c m2/gm2-libs/gm2-libs-host.h
|
||||
$(CXX) -I. -I$(srcdir)/../include -I$(srcdir) -I$(srcdir)/m2/mc-boot-ch -Im2/gm2-libs $(INCLUDES) -g -c $< -o $@
|
||||
|
||||
m2/gm2-pg-boot/$(SRC_PREFIX)%.o: m2/mc-boot-ch/$(SRC_PREFIX)%.cc m2/gm2-libs/gm2-libs-host.h
|
||||
$(CXX) -I. -I$(srcdir)/../include -I$(srcdir) -I$(srcdir)/m2/mc-boot-ch -Im2/gm2-libs $(INCLUDES) -g -c $< -o $@
|
||||
|
||||
m2/gm2-pg-boot/$(SRC_PREFIX)%.o: $(srcdir)/m2/gm2-libs/%.mod $(MCDEPS) $(BUILD-BOOT-H)
|
||||
$(MCC) -o=m2/gm2-pg-boot/$(SRC_PREFIX)$*.c $(srcdir)/m2/gm2-libs/$*.mod
|
||||
$(CXX) -I. -I$(srcdir)/../include -I$(srcdir) -Im2/gm2-pg-boot -I$(srcdir)/m2/mc-boot \
|
||||
-I$(srcdir)/m2/mc-boot-ch \
|
||||
-Im2/gm2-libs-boot $(INCLUDES) \
|
||||
-g -c m2/gm2-pg-boot/$(SRC_PREFIX)$*.c -o $@
|
||||
|
||||
m2/gm2-pg-boot/$(SRC_PREFIX)%.o: $(srcdir)/m2/gm2-compiler/%.mod $(MCDEPS) $(BUILD-BOOT-H)
|
||||
$(MCC) -o=m2/gm2-pg-boot/$(SRC_PREFIX)$*.c $(srcdir)/m2/gm2-compiler/$*.mod
|
||||
$(CXX) -I. -I$(srcdir)/../include -I$(srcdir) -Im2/mc-boot -Im2/gm2-compiler-boot -Im2/gm2-libs-boot \
|
||||
-I$(srcdir)/m2/mc-boot-ch $(INCLUDES) -g -c m2/gm2-pg-boot/$(SRC_PREFIX)$*.c -o $@
|
||||
|
||||
m2/gm2-pg-boot/$(SRC_PREFIX)pg.o: m2/gm2-auto/pg.mod $(MCDEPS) $(BUILD-BOOT-H)
|
||||
$(MCC) -o=m2/gm2-pg-boot/$(SRC_PREFIX)pg.c m2/gm2-auto/pg.mod
|
||||
$(CXX) -I. -I$(srcdir)/../include -I$(srcdir) -Im2/mc-boot -Im2/gm2-compiler-boot -Im2/gm2-libs-boot \
|
||||
-I$(srcdir)/m2/mc-boot-ch $(INCLUDES) -g -c m2/gm2-pg-boot/$(SRC_PREFIX)pg.c -o $@
|
||||
|
||||
m2/pg$(exeext): m2/boot-bin/mc \
|
||||
$(BUILD-PG-O) $(GM2-PPG-MODS:%.mod=m2/gm2-pg-boot/%.o) \
|
||||
$(BUILD-MC-INTERFACE-O) m2/gm2-pg-boot/main.o m2/gm2-libs-boot/RTcodummy.o \
|
||||
m2/mc-boot-ch/$(SRC_PREFIX)abort.o m2/gm2-libs-boot/M2LINK.o
|
||||
+$(LINKER) $(ALL_LINKERFLAGS) $(LDFLAGS) -o $@ $(BUILD-PG-O) \
|
||||
m2/gm2-pg-boot/main.o m2/gm2-libs-boot/RTcodummy.o \
|
||||
m2/gm2-libs-boot/M2LINK.o \
|
||||
m2/mc-boot-ch/$(SRC_PREFIX)abort.o -lm
|
||||
|
||||
m2/gm2-auto/pginit:
|
||||
sed -e 's/ppg/pg/' < $(srcdir)/m2/init/ppginit > $@
|
||||
|
||||
m2/gm2-pg-boot/main.o: m2/gm2-auto/pginit $(M2LINK)
|
||||
unset CC ; $(M2LINK) -s --langc++ --exit --name mainpginit.c m2/gm2-auto/pginit
|
||||
mv mainpginit.c m2/gm2-pg-boot/main.c
|
||||
$(CXX) $(INCLUDES) -g -c -o $@ m2/gm2-pg-boot/main.c
|
||||
|
||||
m2/pg-e$(exeext): m2/pg$(exeext)
|
||||
$(CP) m2/pg$(exeext) m2/pg-e$(exeext)
|
||||
$(SHELL) $(srcdir)/m2/tools-src/buildpg $(srcdir)/m2/gm2-compiler/ppg.mod pg -e > m2/gm2-auto/t.bnf
|
||||
./m2/pg-e$(exeext) -e -l m2/gm2-auto/t.bnf | sed -e 's/t\.bnf/pg\.bnf/' > m2/gm2-auto/t.mod
|
||||
$(QUIAT)if ! diff m2/gm2-auto/t.mod m2/gm2-auto/pg.mod > /dev/null ; then \
|
||||
echo "pg failed during self build" ; \
|
||||
exit 1 ; \
|
||||
fi
|
||||
$(RM) m2/gm2-auto/t.bnf m2/gm2-auto/t.mod
|
||||
|
||||
m2/gm2-auto/pg.mod: m2/ppg$(exeext)
|
||||
$(SHELL) $(srcdir)/m2/tools-src/buildpg $(srcdir)/m2/gm2-compiler/ppg.mod pg -e > m2/gm2-auto/pg.bnf
|
||||
./m2/ppg$(exeext) -e -l m2/gm2-auto/pg.bnf > m2/gm2-auto/pg.mod
|
||||
|
||||
# pge is the recursive descent parser with first/followset error recovery.
|
||||
|
||||
PGE-SRC = pge.mod
|
||||
|
||||
BUILD-PGE-O = $(PPG-INTERFACE-C:%.c=m2/gm2-pge-boot/$(SRC_PREFIX)%.o) \
|
||||
$(PPG-INTERFACE-CC:%.cc=m2/gm2-pge-boot/$(SRC_PREFIX)%.o) \
|
||||
$(PPG-MODS:%.mod=m2/gm2-pge-boot/$(SRC_PREFIX)%.o) \
|
||||
$(PPG-LIB-MODS:%.mod=m2/gm2-pge-boot/$(SRC_PREFIX)%.o) \
|
||||
$(PGE-SRC:%.mod=m2/gm2-pge-boot/$(SRC_PREFIX)%.o)
|
||||
|
||||
m2/gm2-auto/pge.mod: m2/pg$(exeext)
|
||||
$(SHELL) $(srcdir)/m2/tools-src/buildpg $(srcdir)/m2/gm2-compiler/ppg.mod pge > m2/gm2-auto/pge.bnf
|
||||
./m2/pg$(exeext) -l m2/gm2-auto/pge.bnf -o m2/gm2-auto/pge.mod
|
||||
|
||||
m2/gm2-pge-boot/$(SRC_PREFIX)%.h: $(srcdir)/m2/gm2-libs/%.def $(MCDEPS)
|
||||
$(MCC) -o=$@ $(srcdir)/m2/gm2-libs/$*.def
|
||||
|
||||
m2/gm2-pge-boot/$(SRC_PREFIX)libc.o: $(srcdir)/m2/mc-boot-ch/Glibc.c m2/gm2-libs/gm2-libs-host.h
|
||||
$(CXX) -I. -I$(srcdir)/../include -I$(srcdir) $(INCLUDES) -I$(srcdir)/m2/mc-boot-ch -Im2/gm2-libs -g -c $< -o $@
|
||||
|
||||
m2/gm2-pge-boot/$(SRC_PREFIX)mcrts.o: $(srcdir)/m2/mc-boot-ch/Gmcrts.c m2/gm2-libs/gm2-libs-host.h
|
||||
$(CXX) -I. -I$(srcdir)/../include -I$(srcdir) $(INCLUDES) -I$(srcdir)/m2/mc-boot-ch -Im2/gm2-libs -g -c $< -o $@
|
||||
|
||||
m2/gm2-pge-boot/$(SRC_PREFIX)UnixArgs.o: $(srcdir)/m2/mc-boot-ch/GUnixArgs.cc
|
||||
$(CXX) -I. -I$(srcdir)/../include -I$(srcdir) -I$(srcdir)/m2/mc-boot-ch $(INCLUDES) -g -c $< -o $@
|
||||
|
||||
m2/gm2-pge-boot/$(SRC_PREFIX)Selective.o: $(srcdir)/m2/mc-boot-ch/GSelective.c m2/gm2-libs/gm2-libs-host.h
|
||||
$(CXX) -I. -I$(srcdir)/../include -I$(srcdir) -I$(srcdir)/m2/mc-boot-ch $(INCLUDES) -Im2/gm2-libs -g -c $< -o $@
|
||||
|
||||
m2/gm2-pge-boot/$(SRC_PREFIX)termios.o: $(srcdir)/m2/mc-boot-ch/Gtermios.cc m2/gm2-libs/gm2-libs-host.h
|
||||
$(CXX) -I. -I$(srcdir)/../include -I$(srcdir) -I$(srcdir)/m2/mc-boot-ch -Im2/gm2-libs $(INCLUDES) -g -c $< -o $@
|
||||
|
||||
m2/gm2-pge-boot/$(SRC_PREFIX)SysExceptions.o: $(srcdir)/m2/mc-boot-ch/GSysExceptions.c m2/gm2-libs/gm2-libs-host.h
|
||||
$(CXX) -I. -I$(srcdir)/../include -I$(srcdir) -I$(srcdir)/m2/mc-boot-ch -Im2/gm2-libs $(INCLUDES) -g -c $< -o $@
|
||||
|
||||
m2/gm2-pge-boot/$(SRC_PREFIX)ldtoa.o: $(srcdir)/m2/mc-boot-ch/Gldtoa.c m2/gm2-libs/gm2-libs-host.h
|
||||
$(CXX) -I. -I$(srcdir)/../include -I$(srcdir) -I$(srcdir)/m2/mc-boot-ch -Im2/gm2-libs $(INCLUDES) -g -c $< -o $@
|
||||
|
||||
m2/gm2-pge-boot/$(SRC_PREFIX)dtoa.o: $(srcdir)/m2/mc-boot-ch/Gdtoa.c m2/gm2-libs/gm2-libs-host.h
|
||||
$(CXX) -I. -I$(srcdir)/../include -I$(srcdir) -I$(srcdir)/m2/mc-boot-ch -Im2/gm2-libs $(INCLUDES) -g -c $< -o $@
|
||||
|
||||
m2/gm2-pge-boot/$(SRC_PREFIX)wrapc.o: $(srcdir)/m2/mc-boot-ch/Gwrapc.c m2/gm2-libs/gm2-libs-host.h
|
||||
$(CXX) -I. -I$(srcdir)/../include -I$(srcdir) -I$(srcdir)/m2/mc-boot-ch -Im2/gm2-libs $(INCLUDES) -g -c $< -o $@
|
||||
|
||||
m2/gm2-pge-boot/$(SRC_PREFIX)SYSTEM.o: $(srcdir)/m2/mc-boot-ch/GSYSTEM.c
|
||||
$(CXX) -I. -I$(srcdir)/../include -I$(srcdir) -I$(srcdir)/m2/mc-boot-ch $(INCLUDES) -g -c $< -o $@
|
||||
|
||||
m2/gm2-pge-boot/$(SRC_PREFIX)errno.o: $(srcdir)/m2/mc-boot-ch/Gerrno.c
|
||||
$(CXX) -I. -I$(srcdir)/../include -I$(srcdir) -I$(srcdir)/m2/mc-boot-ch $(INCLUDES) -g -c $< -o $@
|
||||
|
||||
m2/gm2-pge-boot/$(SRC_PREFIX)%.o: $(srcdir)/m2/gm2-libs/%.mod $(MCDEPS) $(BUILD-BOOT-H)
|
||||
$(MCC) -o=m2/gm2-pge-boot/$(SRC_PREFIX)$*.c $(srcdir)/m2/gm2-libs/$*.mod
|
||||
$(CXX) -I. -I$(srcdir)/../include -I$(srcdir) -Im2/gm2-pge-boot -I$(srcdir)/m2/mc-boot \
|
||||
-I$(srcdir)/m2/mc-boot-ch -Im2/gm2-libs-boot \
|
||||
$(INCLUDES) -g -c m2/gm2-pge-boot/$(SRC_PREFIX)$*.c -o $@
|
||||
|
||||
m2/gm2-pge-boot/$(SRC_PREFIX)%.o: $(srcdir)/m2/gm2-compiler/%.mod $(MCDEPS) $(BUILD-BOOT-H)
|
||||
$(MCC) -o=m2/gm2-pge-boot/$(SRC_PREFIX)$*.c $(srcdir)/m2/gm2-compiler/$*.mod
|
||||
$(CXX) -I. -I$(srcdir)/../include -I$(srcdir) -Im2/mc-boot -Im2/gm2-compiler-boot \
|
||||
-Im2/gm2-libs-boot \
|
||||
-I$(srcdir)/m2/mc-boot-ch $(INCLUDES) -g -c m2/gm2-pge-boot/$(SRC_PREFIX)$*.c -o $@
|
||||
|
||||
m2/gm2-pge-boot/$(SRC_PREFIX)pge.o: m2/gm2-auto/pge.mod $(MCDEPS) $(BUILD-BOOT-H)
|
||||
$(MCC) -o=m2/gm2-pge-boot/$(SRC_PREFIX)pge.c m2/gm2-auto/pge.mod
|
||||
$(CXX) -I. -I$(srcdir)/../include -I$(srcdir) \
|
||||
-Im2/mc-boot -Im2/gm2-compiler-boot -Im2/gm2-libs-boot \
|
||||
-I$(srcdir)/m2/mc-boot-ch $(INCLUDES) -g -c m2/gm2-pge-boot/$(SRC_PREFIX)pge.c -o $@
|
||||
|
||||
m2/pge$(exeext): m2/boot-bin/mc \
|
||||
$(BUILD-PGE-O) $(GM2-PPG-MODS:%.mod=m2/gm2-pge-boot/%.o) \
|
||||
$(BUILD-MC-INTERFACE-O) m2/gm2-pge-boot/main.o m2/gm2-libs-boot/RTcodummy.o \
|
||||
m2/mc-boot-ch/$(SRC_PREFIX)abort.o m2/gm2-libs-boot/M2LINK.o
|
||||
+$(LINKER) $(ALL_LINKERFLAGS) $(LDFLAGS) -o $@ $(BUILD-PGE-O) \
|
||||
m2/gm2-pge-boot/main.o m2/gm2-libs-boot/RTcodummy.o \
|
||||
m2/mc-boot-ch/$(SRC_PREFIX)abort.o m2/gm2-libs-boot/M2LINK.o -lm
|
||||
$(SHELL) $(srcdir)/m2/tools-src/buildpg $(srcdir)/m2/gm2-compiler/ppg.mod t > m2/gm2-auto/t.bnf
|
||||
./m2/pge$(exeext) m2/gm2-auto/t.bnf -o m2/gm2-auto/t1.mod
|
||||
./m2/pg$(exeext) m2/gm2-auto/t.bnf -o m2/gm2-auto/t2.mod
|
||||
$(QUIAT)if ! diff m2/gm2-auto/t1.mod m2/gm2-auto/t2.mod > /dev/null ; then \
|
||||
echo "failure: pg (with error recovery) failed" ; \
|
||||
$(RM) m2/pge$(exeext) ; \
|
||||
exit 1 ; \
|
||||
fi
|
||||
$(RM) m2/gm2-auto/t.mod m2/gm2-auto/t1.mod m2/gm2-auto/t2.mod
|
||||
|
||||
m2/gm2-auto/pgeinit:
|
||||
sed -e 's/ppg/pge/' < $(srcdir)/m2/init/ppginit > $@
|
||||
|
||||
m2/gm2-pge-boot/main.o: m2/gm2-auto/pgeinit $(M2LINK)
|
||||
unset CC ; $(M2LINK) -s --langc++ --exit --name mainpgeinit.c m2/gm2-auto/pgeinit
|
||||
mv mainpgeinit.c m2/gm2-pge-boot/main.c
|
||||
$(CXX) $(INCLUDES) -g -c -o $@ m2/gm2-pge-boot/main.c
|
||||
|
||||
$(objdir)/m2/gm2-ppg-boot:
|
||||
test -d $@ || mkdir $@
|
||||
|
||||
$(objdir)/m2/gm2-pg-boot:
|
||||
test -d $@ || mkdir $@
|
||||
|
||||
$(objdir)/m2/gm2-pge-boot:
|
||||
test -d $@ || mkdir $@
|
||||
|
||||
m2/gm2-auto/pg.o: m2/gm2-auto/pg.mod $(MCDEPS)
|
||||
$(MC) --quiet -o=m2/gm2-auto/pg.c m2/gm2-auto/pg.mod
|
||||
$(COMPILER) -c $(CFLAGS) -I. -I$(srcdir)/../include -I$(srcdir) -I$(srcdir)/m2 -Im2/gm2-libs-boot -Im2/gm2-compiler-boot -I$(srcdir)/m2/mc-boot-ch $(INCLUDES) m2/gm2-auto/pg.c -o $@
|
||||
|
||||
m2/gm2-auto/pge.o: m2/gm2-auto/pge.mod $(MCDEPS)
|
||||
$(MC) --quiet -o=m2/gm2-auto/pge.c m2/gm2-auto/pge.mod
|
||||
$(COMPILER) -c $(CFLAGS) -I. -I$(srcdir)/../include -I$(srcdir) -I$(srcdir)/m2 -Im2/gm2-libs-boot -Im2/gm2-compiler-boot -I$(srcdir)/m2/mc-boot-ch $(INCLUDES) m2/gm2-auto/pge.c -o $@
|
||||
|
||||
pge-help: force
|
||||
@echo "The pge maintainer commands are:"
|
||||
@echo " "
|
||||
@echo " make pge-maintainer"
|
||||
@echo " make pge-verify"
|
||||
@echo " make pge-push # copy pge C++ sources (app and libs) into srcdir/m2/pge-boot"
|
||||
@echo " make pge-libs-push # copy C++ libraries which pge uses into srcdir/m2/pge-boot"
|
||||
@echo " make pge-app-push # copy pge C++ application modules into srcdir/m2/pge-boot"
|
||||
@echo " make pge-clean"
|
||||
|
||||
pge-maintainer: $(PGE)
|
||||
|
||||
# Copy the C++ sources for ppe.mod into $(srcdir)/pge-boot.
|
||||
|
||||
pge-push: pge-libs-push pge-app-push
|
||||
|
||||
pge-libs-push: force
|
||||
for i in $(cat $(srcdir)/m2/init/ppginit) ; do \
|
||||
if [ -f $(srcdir)/m2/gm2-libs-ch/${i}.h ] ; then \
|
||||
cp $(srcdir)/m2/gm2-libs-ch/${i}.h $(srcdir) ; \
|
||||
else \
|
||||
echo "not found ${i}" ; \
|
||||
fi ; \
|
||||
if [ -f $(srcdir)/m2/gm2-libs-ch/${i}.c* ] ; then \
|
||||
cp $(srcdir)/m2/gm2-libs-ch/${i}.c* $(srcdir) ; \
|
||||
elif [ -f $(srcdir)/m2/gm2-pge-libs/${i}.c* ] ; then \
|
||||
cp $(srcdir)/m2/gm2-pge-libs/${i}.c* $(srcdir) ; \
|
||||
else \
|
||||
echo "not found ${i}" ; \
|
||||
fi ; \
|
||||
done
|
||||
|
||||
pge-app-push: force
|
||||
cp m2/gm2-pge-boot/*.c $(srcdir)/m2/pge-boot
|
||||
|
||||
# Perform sanity checks.
|
||||
|
||||
pge-verify: force
|
||||
|
||||
# Remove pge build files.
|
||||
|
||||
pge-clean: force
|
||||
$(RM) -f m2/gm2-pg-boot/* m2/gm2-ppg-boot/* m2/gm2-pge-boot/*
|
||||
|
||||
|
||||
# The rest of the Make-lang.in handles the bootstrap tool (maintained
|
||||
# mode) and also provides testing between the bootstrapped and the
|
||||
# non-bootstrapped compilers.
|
||||
|
||||
# Rules for mc
|
||||
|
||||
# The default rule used generate mc, eventually it will be replaced by mc-bootstrap.
|
||||
|
||||
BOOTGM2=gm2
|
||||
|
||||
MCOPTIONS=-g -c -fsources -fsoft-check-all -fm2-g # -fauto-init
|
||||
MCLINK=-g # use -g -fmodules -c if you are debugging and wish to see missing modules.
|
||||
|
||||
# This is only needed in maintainer mode by 'make mc-maintainer' when regenerating the C
|
||||
# version of mc. We need a working Modula-2 compiler to run mc-maintainer.
|
||||
|
||||
GM2SYS=${HOME}/opt/lib/gcc/x86_64-pc-linux-gnu/12.0.0/m2/m2pim
|
||||
GM2PATH=$(srcdir)/m2/mc:$(GM2SYS):$(srcdir)/m2:m2/gm2-auto:$(srcdir)/m2/gm2-libs:$(srcdir)/m2/gm2-libs-iso
|
||||
|
||||
mc: mc-clean mc-devel
|
||||
|
||||
mc-push: force
|
||||
cp -p m2/mc-boot-gen/*.c $(srcdir)/m2/mc-boot/
|
||||
cp -p m2/mc-boot-gen/*.h $(srcdir)/m2/mc-boot/
|
||||
|
||||
mc-clean: force m2/mc-obj
|
||||
$(RM) m2/mc-boot-gen/*.[ch] m2/boot-bin/* m2/mc-boot/* m2/mc-boot-ch/*
|
||||
|
||||
mc-maintainer: mc-clean mc-autogen mc-push mc-clean mc-bootstrap
|
||||
|
||||
mc-clean-libs: force
|
||||
$(RM) m2/gm2-libs-boot/*
|
||||
|
||||
mc-continue: mc-clean mc-bootstrap mc-clean-libs mc-fresh $(BUILD-MC-INTERFACE-O) $(BUILD-LIBS-BOOT) $(BUILD-COMPILER-BOOT)
|
||||
|
||||
mc-fresh: force
|
||||
$(RM) m2/gm2-auto/* m2/gm2-compiler-boot/* m2/gm2-libs-boot/*
|
||||
|
||||
mc-help: force
|
||||
@echo "mc-maintainer produces a new mc C version in the source tree (takes longer)"
|
||||
@echo "mc-continue builds the mc from the C version and attempts to build gm2 libraries and gm2 compiler"
|
||||
@echo "mc-verify builds mc from Modula-2 sources and mc from C sources and run both on all sources diffing the output"
|
||||
@echo "mc builds mc from Modula-2 sources, quickly"
|
||||
@echo "m2/pge build the parser generator (needed by mc-maintainer)"
|
||||
|
||||
m2/mc-obj:
|
||||
mkdir $@
|
||||
|
||||
mc-verify: mc-clean mc-bootstrap mc
|
||||
mv mc m2/boot-bin/mc.m2
|
||||
@echo "verifying the two generations of mc"
|
||||
for i in $(GM2-VERIFY-MODS) ; do \
|
||||
echo -n "$$i " ; \
|
||||
m2/boot-bin/mc $(MC_ARGS) -o=mcout.c $(srcdir)/m2/gm2-compiler/$$i > /dev/null ; \
|
||||
echo -n "[1]" ; \
|
||||
m2/boot-bin/mc.m2 $(MC_ARGS) -o=mcout.m2 $(srcdir)/m2/gm2-compiler/$$i > /dev/null ; \
|
||||
echo -n "[2]" ; \
|
||||
$(RM) $$i.mc-diff ; \
|
||||
if [ -f mcout.c -a -f mcout.m2 ] ; then \
|
||||
if diff mcout.c mcout.m2 > /dev/null ; then \
|
||||
echo "[passed]" ; \
|
||||
else \
|
||||
echo "[*** failed ***]" ; \
|
||||
diff mcout.c mcout.m2 > $$i.mc-diff ; \
|
||||
fi \
|
||||
fi ; \
|
||||
$(RM) mcout.c mcout.m2 ; \
|
||||
done
|
||||
|
||||
mc-stage2: force
|
||||
m2/boot-bin/mc$(exeext) -I$(srcdir)/m2/mc:$(srcdir)/m2/gm2-libs:$(srcdir)/m2/gm2-libs-iso $(EXTENDED_OPAQUE) --h-file-prefix=$(SRC_PREFIX) -o=m2/mc-boot-gen/GmcStream.c $(srcdir)/m2/mc/mcStream.mod
|
||||
m2/boot-bin/mc$(exeext) -I$(srcdir)/m2/mc:$(srcdir)/m2/gm2-libs:$(srcdir)/m2/gm2-libs-iso $(EXTENDED_OPAQUE) --h-file-prefix=$(SRC_PREFIX) -o=m2/mc-boot-gen/Gdecl.c $(srcdir)/m2/mc/decl.mod
|
||||
if diff m2/mc-boot-gen/Gdecl.c $(srcdir)/m2/mc-boot/Gdecl.c ; then echo "passed" ; else echo "failed" ; fi
|
||||
|
||||
|
||||
|
||||
# mc-devel - compiles mc using gm2
|
||||
|
||||
mc-devel: m2/boot-bin/mc-devel$(exeext)
|
||||
|
||||
m2/boot-bin/mc-devel$(exeext): m2/mc-obj/mcp1.mod \
|
||||
m2/mc-obj/mcp2.mod \
|
||||
m2/mc-obj/mcp3.mod \
|
||||
m2/mc-obj/mcp4.mod \
|
||||
m2/mc-obj/mcp5.mod \
|
||||
mcflex.c \
|
||||
m2/mc-boot-ch/Gabort.o
|
||||
$(RM) -rf mc-obj
|
||||
mkdir mc-obj
|
||||
$(CC) -I$(srcdir)/m2/mc -c -g mcflex.c -o mc-obj/mcflex.o
|
||||
$(BOOTGM2) $(MCOPTIONS) -I$(GM2PATH) $(srcdir)/m2/mc/decl.mod -o mc-obj/decl.o
|
||||
$(BOOTGM2) $(MCOPTIONS) -I$(GM2PATH) $(srcdir)/m2/mc/mcStream.mod -o mc-obj/mcStream.o
|
||||
$(BOOTGM2) $(MCOPTIONS) -I$(GM2PATH) $(srcdir)/m2/mc/mcPretty.mod -o mc-obj/mcPretty.o
|
||||
$(BOOTGM2) $(MCOPTIONS) -I$(GM2PATH) $(srcdir)/m2/mc/mcStack.mod -o mc-obj/mcStack.o
|
||||
$(BOOTGM2) $(MCOPTIONS) -I$(GM2PATH) $(srcdir)/m2/mc/varargs.mod -o mc-obj/varargs.o
|
||||
$(BOOTGM2) $(MCOPTIONS) -I$(GM2PATH) $(srcdir)/m2/mc/mcMetaError.mod -o mc-obj/mcMetaError.o
|
||||
$(BOOTGM2) $(MCOPTIONS) -I$(GM2PATH) $(srcdir)/m2/mc/mcOptions.mod -o mc-obj/mcOptions.o
|
||||
$(BOOTGM2) $(MCOPTIONS) -I$(GM2PATH) $(srcdir)/m2/mc/mcComp.mod -o mc-obj/mcComp.o
|
||||
$(BOOTGM2) $(MCOPTIONS) -I$(GM2PATH) m2/mc-obj/mcp1.mod -o mc-obj/mcp1.o
|
||||
$(BOOTGM2) $(MCOPTIONS) -I$(GM2PATH) m2/mc-obj/mcp2.mod -o mc-obj/mcp2.o
|
||||
$(BOOTGM2) $(MCOPTIONS) -I$(GM2PATH) m2/mc-obj/mcp3.mod -o mc-obj/mcp3.o
|
||||
$(BOOTGM2) $(MCOPTIONS) -I$(GM2PATH) m2/mc-obj/mcp4.mod -o mc-obj/mcp4.o
|
||||
$(BOOTGM2) $(MCOPTIONS) -I$(GM2PATH) m2/mc-obj/mcp5.mod -o mc-obj/mcp5.o
|
||||
$(BOOTGM2) $(MCOPTIONS) -I$(GM2PATH) $(srcdir)/m2/mc/wlists.mod -o mc-obj/wlists.o
|
||||
$(BOOTGM2) $(MCOPTIONS) -I$(GM2PATH) $(srcdir)/m2/mc/alists.mod -o mc-obj/alists.o
|
||||
$(BOOTGM2) $(MCOPTIONS) -I$(GM2PATH) $(srcdir)/m2/mc/symbolKey.mod -o mc-obj/symbolKey.o
|
||||
$(BOOTGM2) $(MCOPTIONS) -I$(GM2PATH) $(srcdir)/m2/mc/mcReserved.mod -o mc-obj/mcReserved.o
|
||||
$(BOOTGM2) $(MCOPTIONS) -I$(GM2PATH) $(srcdir)/m2/mc/nameKey.mod -o mc-obj/nameKey.o
|
||||
$(BOOTGM2) $(MCOPTIONS) -I$(GM2PATH) $(srcdir)/m2/mc/mcSearch.mod -o mc-obj/mcSearch.o
|
||||
$(BOOTGM2) $(MCOPTIONS) -I$(GM2PATH) $(srcdir)/m2/mc/mcFileName.mod -o mc-obj/mcFileName.o
|
||||
$(BOOTGM2) $(MCOPTIONS) -I$(GM2PATH) $(srcdir)/m2/mc/mcLexBuf.mod -o mc-obj/mcLexBuf.o
|
||||
$(BOOTGM2) $(MCOPTIONS) -I$(GM2PATH) $(srcdir)/m2/mc/mcQuiet.mod -o mc-obj/mcQuiet.o
|
||||
$(BOOTGM2) $(MCOPTIONS) -I$(GM2PATH) $(srcdir)/m2/mc/mcError.mod -o mc-obj/mcError.o
|
||||
$(BOOTGM2) $(MCOPTIONS) -I$(GM2PATH) $(srcdir)/m2/mc/mcDebug.mod -o mc-obj/mcDebug.o
|
||||
$(BOOTGM2) $(MCOPTIONS) -I$(GM2PATH) $(srcdir)/m2/mc/mcPrintf.mod -o mc-obj/mcPrintf.o
|
||||
$(BOOTGM2) $(MCOPTIONS) -I$(GM2PATH) $(srcdir)/m2/mc/Indexing.mod -o mc-obj/Indexing.o
|
||||
$(BOOTGM2) $(MCOPTIONS) -I$(GM2PATH) $(srcdir)/m2/mc/mcPreprocess.mod -o mc-obj/mcPreprocess.o
|
||||
$(BOOTGM2) $(MCOPTIONS) -I$(GM2PATH) $(srcdir)/m2/mc/keyc.mod -o mc-obj/keyc.o
|
||||
$(BOOTGM2) $(MCOPTIONS) -I$(GM2PATH) $(srcdir)/m2/mc/mcComment.mod -o mc-obj/mcComment.o
|
||||
$(BOOTGM2) $(MCLINK) -I. -fscaffold-main -I$(GM2PATH) \
|
||||
-fuse-list=$(srcdir)/m2/init/mcinit $(srcdir)/m2/mc/top.mod -o mc \
|
||||
m2/gm2-libs-boot/RTcodummy.o \
|
||||
m2/gm2-libs-boot/dtoa.o m2/gm2-libs-boot/ldtoa.o mc-obj/*o m2/mc-boot-ch/Gabort.o
|
||||
|
||||
m2/boot-bin/mc-opt$(exeext): m2/mc-obj/mcp1.mod \
|
||||
m2/mc-obj/mcp2.mod \
|
||||
m2/mc-obj/mcp3.mod \
|
||||
m2/mc-obj/mcp4.mod \
|
||||
m2/mc-obj/mcp5.mod \
|
||||
mcflex.c
|
||||
g++ -I$(srcdir)/m2/mc -c -g mcflex.c
|
||||
$(BOOTGM2) -fsources -fm2-whole-program -g -I$(srcdir)/m2/mc:$(objdir)/m2/mc-obj:$(srcdir)/m2/gm2-libs:$(srcdir)/m2/mc $(srcdir)/m2/mc/top.mod
|
||||
|
||||
m2/mc/decl.o: $(srcdir)/m2/mc/decl.mod
|
||||
$(BOOTGM2) $(MCOPTIONS) -I$(GM2PATH) -o $@ $(srcdir)/m2/mc/decl.mod
|
||||
|
||||
m2/mc-obj/%.mod: $(srcdir)/m2/mc/%.bnf $(PGE)
|
||||
$(PGE) -l $< -o $@
|
||||
|
||||
gm2-bootstrap: mc-devel
|
||||
for i in $(srcdir)/m2/gm2-libs/*.def ; do echo $$i ; ./mc --gcc-config-system -I$(srcdir)/m2/gm2-libs $$i ; done
|
||||
for i in $(srcdir)/m2/gm2-compiler/*.def ; do echo $$i ; ./mc --gcc-config-system -I$(srcdir)/m2/gm2-libs:$(srcdir)/m2/gm2-compiler:$(srcdir)/m2/gm2-gcc $$i ; done
|
||||
for i in $(srcdir)/m2/gm2-libs/*.mod ; do echo $$i ; ./mc --gcc-config-system -I$(srcdir)/m2/gm2-libs:$(srcdir)/m2/gm2-compiler:$(srcdir)/m2/gm2-gcc $$i ; done
|
||||
|
||||
|
||||
$(objdir)/plugin:
|
||||
test -d $@ || mkdir -p $@
|
||||
|
||||
$(objdir)/m2/mc-boot:
|
||||
test -d $@ || mkdir -p $@
|
||||
|
||||
$(objdir)/m2/mc-boot-ch:
|
||||
test -d $@ || mkdir -p $@
|
||||
|
||||
$(objdir)/m2/mc-boot-gen:
|
||||
test -d $@ || mkdir -p $@
|
||||
|
||||
mc-autogen: mc-clean mc-devel \
|
||||
$(BUILD-MC-BOOT-H) $(BUILD-MC-BOOT-C) \
|
||||
$(BUILD-MC-BOOT-AUTO-C)
|
||||
for i in m2/mc-boot-gen/*.c ; do \
|
||||
echo $(CXX) -g -c -I. -I$(srcdir)/../include -I$(srcdir) -I$(srcdir)/m2/mc-boot-ch -Im2/mc-boot-gen/ $$i -o m2/mc-boot-gen/`basename $$i .c`.o ; \
|
||||
$(CXX) -g -c -I. -I$(srcdir)/../include -I$(srcdir) -I$(srcdir)/m2/mc-boot-ch -Im2/mc-boot-gen/ $$i -o m2/mc-boot-gen/`basename $$i .c`.o ; done
|
||||
@echo -n "built "
|
||||
@cd m2/mc-boot-gen ; ls *.o | wc -l
|
||||
@echo -n "out of "
|
||||
@cd m2/mc-boot-gen ; ls *.c | wc -l
|
||||
@echo "modules"
|
||||
|
||||
# EXTENDED_OPAQUE = --extended-opaque
|
||||
EXTENDED_OPAQUE =
|
||||
MC_OPTIONS = $(MC_COPYRIGHT) --gcc-config-system --olang=c++
|
||||
|
||||
m2/mc-boot-gen/$(SRC_PREFIX)%.h: $(srcdir)/m2/mc/%.def
|
||||
./mc $(MC_OPTIONS) -I$(srcdir)/m2/mc:$(srcdir)/m2/gm2-libs:$(srcdir)/m2/gm2-libs-iso $(EXTENDED_OPAQUE) --h-file-prefix=$(SRC_PREFIX) -o=$@ $<
|
||||
|
||||
m2/mc-boot-gen/$(SRC_PREFIX)%.h: $(srcdir)/m2/gm2-libs/%.def
|
||||
./mc $(MC_OPTIONS) -I$(srcdir)/m2/mc:$(srcdir)/m2/gm2-libs:$(srcdir)/m2/gm2-libs-iso $(EXTENDED_OPAQUE) --h-file-prefix=$(SRC_PREFIX) -o=$@ $<
|
||||
|
||||
m2/mc-boot-gen/$(SRC_PREFIX)decl.c: $(srcdir)/m2/mc/decl.mod
|
||||
./mc $(MC_OPTIONS) --extended-opaque -I$(srcdir)/m2/mc:$(srcdir)/m2/gm2-libs:$(srcdir)/m2/gm2-libs-iso --h-file-prefix=$(SRC_PREFIX) -o=$@ $<
|
||||
|
||||
m2/mc-boot-gen/$(SRC_PREFIX)%.c: $(srcdir)/m2/mc/%.mod
|
||||
./mc $(MC_OPTIONS) -I$(srcdir)/m2/mc:$(srcdir)/m2/gm2-libs:$(srcdir)/m2/gm2-libs-iso $(EXTENDED_OPAQUE) --h-file-prefix=$(SRC_PREFIX) -o=$@ $<
|
||||
|
||||
m2/mc-boot-gen/$(SRC_PREFIX)%.c: $(srcdir)/m2/gm2-libs/%.mod
|
||||
./mc $(MC_OPTIONS) -I$(srcdir)/m2/mc:$(srcdir)/m2/gm2-libs:$(srcdir)/m2/gm2-libs-iso $(EXTENDED_OPAQUE) --h-file-prefix=$(SRC_PREFIX) -o=$@ $<
|
||||
|
||||
m2/mc-boot-gen/$(SRC_PREFIX)%.h: $(srcdir)/m2/gm2-libs-iso/%.def
|
||||
./mc $(MC_OPTIONS) -I$(srcdir)/m2/mc:$(srcdir)/m2/gm2-libs:$(srcdir)/m2/gm2-libs-iso $(EXTENDED_OPAQUE) --h-file-prefix=$(SRC_PREFIX) -o=$@ $<
|
||||
|
||||
m2/mc-boot-gen/$(SRC_PREFIX)%.c: m2/mc-obj/%.mod
|
||||
./mc $(MC_OPTIONS) -I$(srcdir)/m2/mc:$(srcdir)/m2/gm2-libs:$(srcdir)/m2/gm2-libs-iso $(EXTENDED_OPAQUE) --h-file-prefix=$(SRC_PREFIX) -o=$@ $<
|
||||
|
||||
# mc-bootstrap compiles mc using the C version previously generated by mc-autogen.
|
||||
# These autogenerated files will be checked into git by the maintainer.
|
||||
|
||||
mc-bootstrap: mc-clean m2/boot-bin/mc$(exeext)
|
||||
|
||||
gm2.maintainer-reconfigure: force
|
||||
autoconf $(srcdir)/m2/gm2-libs/config-host.in > $(srcdir)/m2/gm2-libs/config-host
|
||||
( cd $(srcdir)/m2/gm2-libs ; autoheader config-host.in )
|
||||
( cd $(srcdir)/m2 ; autoconf configure.in > configure )
|
||||
|
||||
gm2.maintainer-clean: force
|
||||
-rm -f $(srcdir)/m2/gm2-auto/*
|
||||
-rm -f $(srcdir)/m2/gm2-libs.texi
|
||||
-rm -f $(srcdir)/m2/gm2-ebnf.texi
|
||||
-rm -f $(srcdir)/m2/images/gnu.eps
|
||||
|
||||
gm2.maintainer-help: force
|
||||
@echo "make knows about:"
|
||||
@echo " "
|
||||
@echo "make gm2.maintainer-help this command"
|
||||
@echo "make gm2.maintainer-reconfigure rebuild the configure scripts"
|
||||
@echo "make gm2.maintainer-clean clean pre-built images and texi files"
|
||||
|
||||
|
||||
#
|
||||
# verify the compiler can be built across three generations of cc1gm2 diffing assembly output.
|
||||
# stage1/m2/cc1gm2 built by translating M2 into C++.
|
||||
# stage2/m2/cc1gm2 built from stage1/m2/cc1gm2.
|
||||
# stage3/m2/cc1gm2 built from stage2/m2/cc1gm2.
|
||||
#
|
||||
|
||||
# GM2-VERIFY-MODS is a list of modules which have no __DATE__ stamp inside them
|
||||
# and thus they can be built by the different versions of gm2.
|
||||
# This list is used for testing only.
|
||||
|
||||
GM2-VERIFY-MODS = FifoQueue.mod M2AsmUtil.mod M2Optimize.mod \
|
||||
M2StackWord.mod M2Pass.mod M2Batch.mod \
|
||||
M2Quads.mod M2Comp.mod M2Reserved.mod \
|
||||
M2Debug.mod M2Defaults.mod NameKey.mod \
|
||||
M2FileName.mod P0SymBuild.mod P1SymBuild.mod P2SymBuild.mod \
|
||||
P3SymBuild.mod \
|
||||
SymbolKey.mod SymbolTable.mod M2Error.mod \
|
||||
M2StackAddress.mod \
|
||||
M2Students.mod \
|
||||
M2BasicBlock.mod M2Code.mod M2GenGCC.mod M2GCCDeclare.mod\
|
||||
M2ALU.mod M2System.mod M2Base.mod Lists.mod \
|
||||
M2Search.mod bnflex.mod ppg.mod Output.mod \
|
||||
SymbolConversion.mod \
|
||||
M2Preprocess.mod M2Printf.mod M2LexBuf.mod M2Quiet.mod \
|
||||
M2Bitset.mod M2Size.mod CLexBuf.mod M2Scope.mod \
|
||||
M2Range.mod M2Swig.mod M2MetaError.mod Sets.mod \
|
||||
M2CaseList.mod PCSymBuild.mod M2Const.mod \
|
||||
M2DebugStack.mod ObjectFiles.mod M2ColorString.mod M2Emit.mod
|
||||
|
||||
GM2-VERIFY-AUTO = P1Build.mod P2Build.mod PCBuild.mod P3Build.mod \
|
||||
PHBuild.mod pg.mod P0SyntaxCheck.mod
|
||||
|
||||
GM2_LIBS_PARANOID = m2/gm2-compiler-paranoid/gm2.a \
|
||||
m2/gm2-libs-paranoid/libgm2.a # build it again using GM2_LIBS
|
||||
|
||||
gm2.paranoid: stage3/m2/cc1gm2$(exeext) gm2.verifyparanoid
|
||||
|
||||
stage3/m2/cc1gm2$(exeext): stage2/m2/cc1gm2$(exeext) m2/gm2-compiler-paranoid/m2flex.o \
|
||||
$(P) $(GM2_C_OBJS) $(BACKEND) $(LIBDEPS) $(GM2_LIBS_PARANOID) \
|
||||
m2/gm2-gcc/rtegraph.o plugin/m2rte$(exeext).so m2/gm2-libs-boot/M2LINK.o
|
||||
@$(call LINK_PROGRESS,$(INDEX.m2),start)
|
||||
+$(LLINKER) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(GM2_C_OBJS) m2/gm2-compiler-paranoid/m2flex.o \
|
||||
attribs.o \
|
||||
$(GM2_LIBS_PARANOID) \
|
||||
$(BACKEND) $(LIBS) m2/gm2-gcc/rtegraph.o m2/gm2-libs-boot/M2LINK.o \
|
||||
$(BACKENDLIBS) $(LIBSTDCXX) -lm
|
||||
@$(call LINK_PROGRESS,$(INDEX.m2),end)
|
||||
|
||||
|
||||
# gm2.verifyparanoid diffs the output of all three compilers with the compiler source code
|
||||
|
||||
gm2.verifyparanoid: stage1/m2/cc1gm2$(exeext) stage2/m2/cc1gm2$(exeext) stage3/m2/cc1gm2$(exeext) force
|
||||
@echo "verifying the three generations of GNU Modula-2 compilers - it may take some time.."
|
||||
$(QUIAT)for i in $(GM2-VERIFY-MODS) ; do \
|
||||
echo -n "$$i " ; \
|
||||
./gm2 -S $(GM2_FLAGS) -c -B./stage1/m2 -I$(srcdir)/m2/gm2-compiler:$(srcdir)/m2/gm2-libs:$(srcdir)/m2/gm2-gcc:$(srcdir)/m2/gm2-libiberty $(srcdir)/m2/gm2-compiler/$$i -o m2/gm2-compiler-verify/1.s ; \
|
||||
echo -n "[1]" ; \
|
||||
./gm2 -S $(GM2_FLAGS) -c -B./stage2/m2 -I$(srcdir)/m2/gm2-compiler:$(srcdir)/m2/gm2-libs:$(srcdir)/m2/gm2-gcc:$(srcdir)/m2/gm2-libiberty $(srcdir)/m2/gm2-compiler/$$i -o m2/gm2-compiler-verify/2.s ; \
|
||||
echo -n "[2]" ; \
|
||||
./gm2 -S $(GM2_FLAGS) -c -B./stage3/m2 -I$(srcdir)/m2/gm2-compiler:$(srcdir)/m2/gm2-libs:$(srcdir)/m2/gm2-gcc:$(srcdir)/m2/gm2-libiberty $(srcdir)/m2/gm2-compiler/$$i -o m2/gm2-compiler-verify/3.s ; \
|
||||
echo -n "[3]" ; \
|
||||
if ! diff m2/gm2-compiler-verify/1.s m2/gm2-compiler-verify/2.s > m2/gm2-compiler-verify/1_2.diff 2>&1 ; then \
|
||||
echo -n " [stage 1 and stage 2 differ]" ; \
|
||||
cp m2/gm2-compiler-verify/1.s m2/gm2-compiler-verify/t.s | as -ahl m2/gm2-compiler-verify/t.s > m2/gm2-compiler-verify/$$i.1.lst ; \
|
||||
cp m2/gm2-compiler-verify/2.s m2/gm2-compiler-verify/t.s | as -ahl m2/gm2-compiler-verify/t.s > m2/gm2-compiler-verify/$$i.2.lst ; \
|
||||
echo " " ; \
|
||||
exit 1 ; \
|
||||
fi ; \
|
||||
if ! diff m2/gm2-compiler-verify/2.s m2/gm2-compiler-verify/3.s > m2/gm2-compiler-verify/2_3.diff 2>&1 ; then \
|
||||
echo -n " [stage 2 and stage 3 differ]" ; \
|
||||
cp m2/gm2-compiler-verify/2.s m2/gm2-compiler-verify/t.s | as -ahl m2/gm2-compiler-verify/t.s > m2/gm2-compiler-verify/$$i.2.lst ; \
|
||||
cp m2/gm2-compiler-verify/3.s m2/gm2-compiler-verify/t.s | as -ahl m2/gm2-compiler-verify/t.s > m2/gm2-compiler-verify/$$i.3.lst ; \
|
||||
fi ; \
|
||||
echo " " ; \
|
||||
done
|
||||
$(QUIAT)echo "now verifying automatically built modules"
|
||||
$(QUIAT)for i in x $(GM2-VERIFY-AUTO) ; do \
|
||||
if [ -f m2/gm2-auto/$$i ] ; then \
|
||||
echo -n "$$i " ; \
|
||||
./gm2 -S $(GM2_FLAGS) -c -B./stage1/m2 -I$(srcdir)/m2/gm2-compiler:$(srcdir)/m2/gm2-libs:$(srcdir)/m2/gm2-gcc:$(srcdir)/m2/gm2-libiberty m2/gm2-auto/$$i -o m2/gm2-compiler-verify/1.s ; \
|
||||
echo -n "[1]" ; \
|
||||
./gm2 -S $(GM2_FLAGS) -c -B./stage2/m2 -I$(srcdir)/m2/gm2-compiler:$(srcdir)/m2/gm2-libs:$(srcdir)/m2/gm2-gcc:$(srcdir)/m2/gm2-libiberty m2/gm2-auto/$$i -o m2/gm2-compiler-verify/2.s ; \
|
||||
echo -n "[2]" ; \
|
||||
./gm2 -S $(GM2_FLAGS) -c -B./stage3/m2 -I$(srcdir)/m2/gm2-compiler:$(srcdir)/m2/gm2-libs:$(srcdir)/m2/gm2-gcc:$(srcdir)/m2/gm2-libiberty m2/gm2-auto/$$i -o m2/gm2-compiler-verify/3.s ; \
|
||||
echo -n "[3]" ; \
|
||||
if ! diff m2/gm2-compiler-verify/1.s m2/gm2-compiler-verify/2.s > m2/gm2-compiler-verify/1_2.diff 2>&1 ; then \
|
||||
echo -n " [stage 1 and stage 2 differ]" ; \
|
||||
cp m2/gm2-compiler-verify/1.s m2/gm2-compiler-verify/t.s | as -ahl m2/gm2-compiler-verify/t.s > m2/gm2-compiler-verify/$$i.1.lst ; \
|
||||
cp m2/gm2-compiler-verify/2.s m2/gm2-compiler-verify/t.s | as -ahl m2/gm2-compiler-verify/t.s > m2/gm2-compiler-verify/$$i.2.lst ; \
|
||||
echo " " ; \
|
||||
exit 1 ; \
|
||||
fi ; \
|
||||
if ! diff m2/gm2-compiler-verify/2.s m2/gm2-compiler-verify/3.s > m2/gm2-compiler-verify/2_3.diff 2>&1 ; then \
|
||||
echo -n " [stage 2 and stage 3 differ]" ; \
|
||||
cp m2/gm2-compiler-verify/2.s m2/gm2-compiler-verify/t.s | as -ahl m2/gm2-compiler-verify/t.s > m2/gm2-compiler-verify/$$i.2.lst ; \
|
||||
cp m2/gm2-compiler-verify/3.s m2/gm2-compiler-verify/t.s | as -ahl m2/gm2-compiler-verify/t.s > m2/gm2-compiler-verify/$$i.3.lst ; \
|
||||
fi ; \
|
||||
echo " " ; \
|
||||
fi ; \
|
||||
done ; \
|
||||
$(RM) -f m2/gm2-compiler-verify/1.s m2/gm2-compiler-verify/2.s m2/gm2-compiler-verify/3.s m2/gm2-compiler-verify/2_3.diff m2/gm2-compiler-verify/1_2.diff
|
||||
|
||||
|
||||
# gm2.verifystage12 diffs the output of the stage1 and stage2 compilers with the compiler source code
|
||||
|
||||
gm2.verifystage12: force stage1/m2/cc1gm2$(exeext) stage2/m2/cc1gm2$(exeext)
|
||||
@echo "verifying stage1 and stage2 generations of GNU Modula-2 compilers - it may take some time.."
|
||||
$(QUIAT)for i in $(GM2-VERIFY-MODS) ; do \
|
||||
echo -n "$$i " ; \
|
||||
./gm2 -S $(GM2_FLAGS) -c -B./stage1/m2 -I$(srcdir)/m2/gm2-compiler:$(srcdir)/m2/gm2-libs:$(srcdir)/m2/gm2-gcc:$(srcdir)/m2/gm2-libiberty $(srcdir)/m2/gm2-compiler/$$i -o m2/gm2-compiler-verify/1.s ; \
|
||||
echo -n "[1]" ; \
|
||||
./gm2 -S $(GM2_FLAGS) -c -B./stage2/m2 -I$(srcdir)/m2/gm2-compiler:$(srcdir)/m2/gm2-libs:$(srcdir)/m2/gm2-gcc:$(srcdir)/m2/gm2-libiberty $(srcdir)/m2/gm2-compiler/$$i -o m2/gm2-compiler-verify/2.s ; \
|
||||
echo -n "[2]" ; \
|
||||
if ! diff m2/gm2-compiler-verify/1.s m2/gm2-compiler-verify/2.s > m2/gm2-compiler-verify/1_2.diff 2>&1 ; then \
|
||||
echo -n " [stage 1 and stage 2 differ]" ; \
|
||||
cp m2/gm2-compiler-verify/1.s m2/gm2-compiler-verify/t.s | as -ahl m2/gm2-compiler-verify/t.s > m2/gm2-compiler-verify/$$i.1.lst ; \
|
||||
cp m2/gm2-compiler-verify/2.s m2/gm2-compiler-verify/t.s | as -ahl m2/gm2-compiler-verify/t.s > m2/gm2-compiler-verify/$$i.2.lst ; \
|
||||
echo " " ; \
|
||||
fi ; \
|
||||
echo " " ; \
|
||||
done
|
||||
$(QUIAT)echo "now verifying automatically built modules"
|
||||
$(QUIAT)for i in x $(GM2-VERIFY-AUTO) ; do \
|
||||
if [ -f m2/gm2-auto/$$i ] ; then \
|
||||
echo -n "$$i " ; \
|
||||
./gm2 -S $(GM2_FLAGS) -c -B./stage1/m2 -I$(srcdir)/m2/gm2-compiler:$(srcdir)/m2/gm2-libs:$(srcdir)/m2/gm2-gcc:$(srcdir)/m2/gm2-libiberty m2/gm2-auto/$$i -o m2/gm2-compiler-verify/1.s ; \
|
||||
echo -n "[1]" ; \
|
||||
./gm2 -S $(GM2_FLAGS) -c -B./stage2/m2 -I$(srcdir)/m2/gm2-compiler:$(srcdir)/m2/gm2-libs:$(srcdir)/m2/gm2-gcc:$(srcdir)/m2/gm2-libiberty m2/gm2-auto/$$i -o m2/gm2-compiler-verify/2.s ; \
|
||||
echo -n "[2]" ; \
|
||||
if ! diff m2/gm2-compiler-verify/1.s m2/gm2-compiler-verify/2.s > m2/gm2-compiler-verify/1_2.diff 2>&1 ; then \
|
||||
echo -n " [stage 1 and stage 2 differ]" ; \
|
||||
cp m2/gm2-compiler-verify/1.s m2/gm2-compiler-verify/t.s | as -ahl m2/gm2-compiler-verify/t.s > m2/gm2-compiler-verify/$$i.1.lst ; \
|
||||
cp m2/gm2-compiler-verify/2.s m2/gm2-compiler-verify/t.s | as -ahl m2/gm2-compiler-verify/t.s > m2/gm2-compiler-verify/$$i.2.lst ; \
|
||||
echo " " ; \
|
||||
fi ; \
|
||||
echo " " ; \
|
||||
fi ; \
|
||||
done ; \
|
||||
$(RM) -f m2/gm2-compiler-verify/1.s m2/gm2-compiler-verify/2.s m2/gm2-compiler-verify/3.s m2/gm2-compiler-verify/2_3.diff m2/gm2-compiler-verify/1_2.diff
|
||||
|
||||
|
||||
# The rules which build objects in the gm2-compiler-paranoid gm2-libs-paranoid directories.
|
||||
|
||||
m2/gm2-libs-paranoid/%.o: m2/gm2-libs-ch/%.c
|
||||
$(XGCC) -c -g $(GM2_O_S3) $(GM2_O) -I./ -Im2/gm2-libs -Wall $(INCLUDES) $< -o $@
|
||||
|
||||
m2/gm2-libs-paranoid/%.o: $(srcdir)/m2/gm2-libs/%.mod
|
||||
$(GM2_2) $(GM2_O_S3) $(GM2_FLAGS) -c -I$(srcdir)/m2/gm2-compiler -I$(srcdir)/m2/gm2-libs -I$(srcdir)/m2/gm2-libs-iso -I$(srcdir)/m2/gm2-libiberty $< -o $@
|
||||
|
||||
m2/gm2-compiler-paranoid/%.o: $(srcdir)/m2/gm2-compiler/%.mod
|
||||
$(GM2_2) $(GM2_O_S3) $(GM2_FLAGS) -c -I$(srcdir)/m2/gm2-compiler -I$(srcdir)/m2/gm2-libs -I$(srcdir)/m2/gm2-gcc -I$(srcdir)/m2/gm2-libiberty $< -o $@
|
||||
|
||||
m2/gm2-compiler-paranoid/%.o: m2/gm2-compiler-paranoid/%.mod
|
||||
$(GM2_2) $(GM2_O_S3) $(GM2_FLAGS) -c -I$(srcdir)/m2/gm2-compiler -I$(srcdir)/m2/gm2-libs -I$(srcdir)/m2/gm2-gcc -I$(srcdir)/m2/gm2-libiberty $< -o $@
|
||||
|
||||
m2/gm2-compiler-paranoid/P0SyntaxCheck.o: m2/gm2-compiler-paranoid/P0SyntaxCheck.mod
|
||||
$(GM2_2) $(GM2_O_S3) $(GM2_FLAGS) -c -I$(srcdir)/m2/gm2-compiler -I$(srcdir)/m2/gm2-libs -I$(srcdir)/m2/gm2-gcc -I$(srcdir)/m2/gm2-libiberty $< -o $@
|
||||
|
||||
m2/gm2-compiler-paranoid/P1Build.o: m2/gm2-compiler-paranoid/P1Build.mod
|
||||
$(GM2_2) $(GM2_O_S3) $(GM2_FLAGS) -c -I$(srcdir)/m2/gm2-compiler -I$(srcdir)/m2/gm2-libs -I$(srcdir)/m2/gm2-gcc -I$(srcdir)/m2/gm2-libiberty $< -o $@
|
||||
|
||||
m2/gm2-compiler-paranoid/P2Build.o: m2/gm2-compiler-paranoid/P2Build.mod
|
||||
$(GM2_2) $(GM2_O_S3) $(GM2_FLAGS) -c -I$(srcdir)/m2/gm2-compiler -I$(srcdir)/m2/gm2-libs -I$(srcdir)/m2/gm2-gcc -I$(srcdir)/m2/gm2-libiberty $< -o $@
|
||||
|
||||
m2/gm2-compiler-paranoid/P3Build.o: m2/gm2-compiler-paranoid/P3Build.mod
|
||||
$(GM2_2) $(GM2_O_S3) $(GM2_FLAGS) -c -I$(srcdir)/m2/gm2-compiler -I$(srcdir)/m2/gm2-libs -I$(srcdir)/m2/gm2-gcc -I$(srcdir)/m2/gm2-libiberty $< -o $@
|
||||
|
||||
m2/gm2-compiler-paranoid/PHBuild.o: m2/gm2-compiler-paranoid/PHBuild.mod
|
||||
$(GM2_2) $(GM2_O_S3) $(GM2_FLAGS) -c -I$(srcdir)/m2/gm2-compiler -I$(srcdir)/m2/gm2-libs -I$(srcdir)/m2/gm2-gcc -I$(srcdir)/m2/gm2-libiberty $< -o $@
|
||||
|
||||
m2/gm2-compiler-paranoid/PCBuild.o: m2/gm2-compiler-paranoid/PCBuild.mod
|
||||
$(GM2_2) $(GM2_O_S3) $(GM2_FLAGS) -c -I$(srcdir)/m2/gm2-compiler -I$(srcdir)/m2/gm2-libs -I$(srcdir)/m2/gm2-gcc -I$(srcdir)/m2/gm2-libiberty $< -o $@
|
||||
|
||||
m2/gm2-libs-paranoid/host.o: $(srcdir)/m2/gm2-libs-ch/host.c m2/gm2-libs/gm2-libs-host.h
|
||||
$(CXX) -c $(GM2_O_S3) $(CFLAGS) -Im2/gm2-libs -I$(srcdir)/m2 -Im2 -I. -Im2/gm2-libs-boot $(INCLUDES) $< -o $@
|
||||
|
||||
m2/gm2-libs-paranoid/wrapc.o: $(srcdir)/m2/gm2-libs-ch/wrapc.c m2/gm2-libs-boot/$(SRC_PREFIX)wrapc.h m2/gm2-libs/gm2-libs-host.h
|
||||
$(CXX) -c -DIN_GCC $(GM2_O_S3) $(CFLAGS) -Im2/gm2-libs -I$(srcdir)/m2 -Im2 -I. -Im2/gm2-libs-boot $(INCLUDES) $< -o $@
|
||||
|
||||
m2/gm2-libs-paranoid/UnixArgs.o: $(srcdir)/m2/gm2-libs-ch/UnixArgs.cc \
|
||||
m2/gm2-libs-boot/$(SRC_PREFIX)UnixArgs.h
|
||||
$(CXX) -c -DIN_GCC $(GM2_O_S3) $(CFLAGS) -Im2/gm2-libs -I$(srcdir)/m2 -Im2 -I. -Im2/gm2-libs-boot $(INCLUDES) $< -o $@
|
||||
|
||||
m2/gm2-libs-paranoid/errno.o: $(srcdir)/m2/gm2-libs-ch/errno.c \
|
||||
m2/gm2-libs-boot/$(SRC_PREFIX)errno.h
|
||||
$(CXX) -c -DIN_GCC $(GM2_O_S3) $(CFLAGS) -Im2/gm2-libs -I$(srcdir)/m2 -Im2 -I. -Im2/gm2-libs-boot $(INCLUDES) $< -o $@
|
||||
|
||||
m2/gm2-libs-paranoid/Selective.o: $(srcdir)/m2/gm2-libs-ch/Selective.c \
|
||||
m2/gm2-libs-boot/$(SRC_PREFIX)Selective.h
|
||||
$(COMPILER) -c -DIN_GCC $(GM2_O_S3) $(CFLAGS) -Im2/gm2-libs -I$(srcdir)/m2 -Im2 -I. -Im2/gm2-libs-boot $(INCLUDES) $< -o $@
|
||||
|
||||
m2/gm2-libs-paranoid/choosetemp.o: $(srcdir)/m2/gm2-libs-ch/choosetemp.c \
|
||||
m2/gm2-libiberty/$(SRC_PREFIX)choosetemp.h
|
||||
$(CXX) -c -DIN_GCC $(GM2_O_S3) $(CFLAGS) -Im2/gm2-libs -I$(srcdir)/m2 -Im2 -I. -Im2/gm2-libs-boot -Im2/gm2-libiberty $(INCLUDES) $< -o $@
|
||||
|
||||
m2/gm2-libs-paranoid/SysExceptions.o: $(srcdir)/m2/gm2-libs-ch/SysExceptions.c \
|
||||
m2/gm2-libs-boot/$(SRC_PREFIX)SysExceptions.h
|
||||
$(CXX) -c -DIN_GCC $(GM2_O_S3) $(CFLAGS) -Im2/gm2-libs -I$(srcdir)/m2 -Im2 -I. -Im2/gm2-libs-boot $(INCLUDES) $< -o $@
|
||||
|
||||
m2/gm2-compiler-paranoid/m2flex.o: m2/gm2-compiler/m2flex.c $(TIMEVAR_H)
|
||||
$(COMPILER) -c $(GM2_O_S3) -g $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
|
||||
$(GM2GCC) -Im2/gm2-compiler-boot -Im2/gm2-libs-boot $< -o $@
|
||||
|
||||
m2/gm2-libs-paranoid/dtoa.o: $(srcdir)/m2/gm2-libs-ch/dtoa.cc \
|
||||
m2/gm2-libs-boot/$(SRC_PREFIX)dtoa.h \
|
||||
m2/gm2-libs/gm2-libs-host.h
|
||||
$(CXX) -c $(GM2_O_S3) $(CFLAGS) -I$(srcdir)/m2 -Im2/gm2-libs-boot -Im2/gm2-libs $(INCLUDES) $< -o $@
|
||||
|
||||
m2/gm2-libs-paranoid/ldtoa.o: $(srcdir)/m2/gm2-libs-ch/ldtoa.cc \
|
||||
m2/gm2-libs-boot/$(SRC_PREFIX)ldtoa.h \
|
||||
m2/gm2-libs/gm2-libs-host.h
|
||||
$(CXX) -c $(GM2_O_S3) $(CFLAGS) -I$(srcdir)/m2 -Im2/gm2-libs-boot -Im2/gm2-libs $(INCLUDES) $< -o $@
|
||||
|
||||
m2/gm2-libs-paranoid/termios.o: $(srcdir)/m2/gm2-libs-ch/termios.c \
|
||||
m2/gm2-libs-boot/$(SRC_PREFIX)termios.h \
|
||||
m2/gm2-libs/gm2-libs-host.h
|
||||
$(CXX) -c $(GM2_O_S3) $(CFLAGS) -I$(srcdir)/m2 -Im2/gm2-libs-boot -Im2/gm2-libs $(INCLUDES) $< -o $@
|
||||
|
||||
|
||||
# The rules which build the paranoid version of gm2.
|
||||
|
||||
BUILD-LIBS-PARANOID-H = $(GM2-LIBS-BOOT-DEFS:%.def=m2/gm2-libs-boot/$(SRC_PREFIX)%.h)
|
||||
|
||||
BUILD-LIBS-PARANOID = $(BUILD-LIBS-PARANOID-H) \
|
||||
$(GM2-LIBS-MODS:%.mod=m2/gm2-libs-paranoid/%.o) \
|
||||
$(GM2-LIBS-CC:%.cc=m2/gm2-libs-paranoid/%.o) \
|
||||
$(GM2-LIBS-C:%.c=m2/gm2-libs-paranoid/%.o)
|
||||
|
||||
m2/gm2-libs-paranoid/libgm2.a: m2/boot-bin/mc$(exeext) $(BUILD-LIBS-PARANOID)
|
||||
$(AR) cr $@ $(GM2-LIBS-MODS:%.mod=m2/gm2-libs-paranoid/%.o) \
|
||||
$(GM2-LIBS-CC:%.cc=m2/gm2-libs-paranoid/%.o) \
|
||||
$(GM2-LIBS-C:%.c=m2/gm2-libs-paranoid/%.o)
|
||||
$(RANLIB) $@
|
||||
|
||||
m2/gm2-compiler-paranoid/gm2.a: \
|
||||
$(GM2-COMP-MODS:%.mod=m2/gm2-compiler-paranoid/%.o) \
|
||||
$(GM2-AUTO-MODS:%.mod=m2/gm2-compiler-paranoid/%.o) \
|
||||
m2/gm2-compiler-paranoid/M2Version.o \
|
||||
m2/gm2-compiler-paranoid/m2flex.o
|
||||
$(AR) cr $@ $(GM2-COMP-MODS:%.mod=m2/gm2-compiler-paranoid/%.o) \
|
||||
$(GM2-AUTO-MODS:%.mod=m2/gm2-compiler-paranoid/%.o) \
|
||||
m2/gm2-compiler-paranoid/M2Version.o
|
||||
$(RANLIB) $@
|
||||
|
||||
m2/gm2-compiler-paranoid/M2Version.mod:
|
||||
$(SHELL) $(srcdir)/m2/tools-src/makeversion -m $(srcdir) m2/gm2-compiler-paranoid
|
||||
|
||||
m2/gm2-compiler-paranoid/M2Version.o: m2/gm2-compiler-paranoid/M2Version.mod
|
||||
$(GM2_2) $(GM2_FLAGS) -c -I$(srcdir)/m2/gm2-compiler -I$(srcdir)/m2/gm2-libs -I$(srcdir)/m2/gm2-gcc $< -o $@
|
||||
|
||||
m2/gm2-compiler-paranoid/%.mod: $(srcdir)/m2/gm2-compiler/%.bnf $(PGE)
|
||||
$(PGE) -k -l $< -o $@
|
||||
|
||||
# Recreate the target independent copies of the documentation which is
|
||||
# used during the build if Python3 is unavailable.
|
||||
|
||||
# m2-target-independent-doc-rst should be enabled once
|
||||
# tools-src/def2doc.py is completed (module hyperlinks need rst
|
||||
# treatment).
|
||||
|
||||
m2-target-independent-doc: m2-target-independent-doc-texi # m2-target-independent-doc-rst
|
||||
|
||||
m2-target-independent-doc-texi: force
|
||||
ifeq ($(HAVE_PYTHON),yes)
|
||||
python3 $(srcdir)/m2/tools-src/def2doc.py -t -b$(srcdir)/m2 -f$(srcdir)/m2/gm2-libs-iso/SYSTEM.def -o $(srcdir)/m2/target-independent/SYSTEM-iso.texi
|
||||
python3 $(srcdir)/m2/tools-src/def2doc.py -t -b$(srcdir)/m2 -f$(srcdir)/m2/gm2-libs/SYSTEM.def -o $(srcdir)/m2/target-independent/SYSTEM-pim.texi
|
||||
python3 $(srcdir)/m2/tools-src/def2doc.py -t -b$(srcdir)/m2 -f$(srcdir)/m2/gm2-libs/Builtins.def -o $(srcdir)/m2/target-independent/Builtins.texi
|
||||
python3 $(srcdir)/m2/tools-src/def2doc.py -t -uLibraries -s$(srcdir)/m2 -b$(srcdir)/m2 -o $(srcdir)/m2/target-independent/gm2-libs.texi
|
||||
else
|
||||
echo "m2-target-independent-doc-texi will only work if Python3 was detected during configure"
|
||||
endif
|
||||
|
||||
m2-target-independent-doc-rst: force
|
||||
ifeq ($(HAVE_PYTHON),yes)
|
||||
python3 $(srcdir)/m2/tools-src/def2doc.py -x -b$(srcdir)/m2 -f$(srcdir)/m2/gm2-libs-iso/SYSTEM.def -o $(srcdir)/m2/target-independent/SYSTEM-iso.rst
|
||||
python3 $(srcdir)/m2/tools-src/def2doc.py -x -b$(srcdir)/m2 -f$(srcdir)/m2/gm2-libs/SYSTEM.def -o $(srcdir)/m2/target-independent/SYSTEM-pim.rst
|
||||
python3 $(srcdir)/m2/tools-src/def2doc.py -x -b$(srcdir)/m2 -f$(srcdir)/m2/gm2-libs/Builtins.def -o $(srcdir)/m2/target-independent/Builtins.rst
|
||||
python3 $(srcdir)/m2/tools-src/def2doc.py -x -uLibraries -s$(srcdir)/m2 -b$(srcdir)/m2 -o $(srcdir)/m2/target-independent/gm2-libs.rst
|
||||
else
|
||||
echo "m2-target-independent-doc-rst will only work if Python3 was detected during configure"
|
||||
endif
|
||||
231
gcc/m2/NEWS
Normal file
231
gcc/m2/NEWS
Normal file
@@ -0,0 +1,231 @@
|
||||
This file describes recent user-visible changes in gm2. Bug fixes are
|
||||
not described. There are more details in the man and info pages.
|
||||
|
||||
gm2 is now in the GCC tree and therefore these version numbers are
|
||||
historical.
|
||||
|
||||
VERSION 1.9.5
|
||||
=============
|
||||
|
||||
* More subexpressions tokens are created and accuracy of error positions
|
||||
within subexpressions has been improved.
|
||||
* the GCC switch -fanalyzer can be used with Modula-2.
|
||||
|
||||
VERSION 1.9.4
|
||||
=============
|
||||
|
||||
* More GCC error routines utilized for error messages, erroneous
|
||||
subexpressions are more accurately reported.
|
||||
* Complete type checking now performed.
|
||||
|
||||
VERSION 1.9.3
|
||||
=============
|
||||
|
||||
* GCC error routines utilized for error messages.
|
||||
* complete whole number runtime range error detection finished.
|
||||
* improved m2-plugin which analyzes the call graph and will issue
|
||||
warnings if the compiler detects a exported procedure will cause
|
||||
a range error. The plugin will issue an error if the range error
|
||||
will be called from the module constructor/deconstructor.
|
||||
|
||||
VERSION 1.2.0
|
||||
=============
|
||||
|
||||
* New improved more accurate source/line correlation in debugging output.
|
||||
* -fm2-g generates nops to further improve debugging single stepping.
|
||||
* -fm2-whole-program whole program optimization available.
|
||||
* works with gcc-5.2.0 under x86_64, x86_32, arm 64 bit and arm 32 bit.
|
||||
|
||||
VERSION 1.0.4
|
||||
=============
|
||||
|
||||
* Bug fixes to release 1.0
|
||||
|
||||
VERSION 1.0
|
||||
===========
|
||||
|
||||
* All ISO libraries are complete.
|
||||
* All ISO language implemented.
|
||||
* All regression tests pass on both x86_64 and x86_32 Debian GNU/Linux
|
||||
platforms.
|
||||
|
||||
VERSION 0.68
|
||||
============
|
||||
|
||||
* more ISO library modules are implemented.
|
||||
* many errors are much more informative and indicate what the
|
||||
compiler has seen and what it expects.
|
||||
|
||||
VERSION 0.63
|
||||
============
|
||||
|
||||
* many ISO library modules are implemented.
|
||||
* Exception handling is complete and it can coexist with swig.
|
||||
* all errors now include column information. Also added -fxcode
|
||||
option which issues errors in Apple Xcode format.
|
||||
* shared libraries are now implemented, to link against the shared
|
||||
libraries use the new option -fshared. Likewise to generate a
|
||||
shared library use the -fshared option.
|
||||
* the keyword FINALLY is now implemented and both the initialization
|
||||
and finalization blocks map onto GNU/Linux shared library
|
||||
constructor and deconstructors.
|
||||
* the PIM libraries are built with -O0, -O2, -O2 -fshared, -fshared.
|
||||
* a new option -fswig automatically generates a swig interface file
|
||||
corresponding to the definition module being compiled.
|
||||
This allows Python and other scripting languages to call Modula-2
|
||||
modules.
|
||||
* new options, -fobject-path, allows users to specify the path for
|
||||
all objects whereas -I specifies the path for the library sources.
|
||||
* -fmakeinit option introduced which will generate a file
|
||||
_m2_modulename.c in the current directory.
|
||||
* introduced fixed sized types in the SYSTEM module.
|
||||
|
||||
VERSION 0.62
|
||||
============
|
||||
|
||||
* all language options changed to -f. Warning options are
|
||||
still -W. Introduced memmove to Builtins.def.
|
||||
* Introduced gm2/gm2-libs-pim/BlockOps.{def,mod}
|
||||
* gm2/gm2-libs-pim/BitByteOps.{def,mod}: added.
|
||||
* -O now works on compiler and passes make gm2.paranoid.
|
||||
|
||||
VERSION 0.61
|
||||
============
|
||||
|
||||
* builds when grafted onto gcc-4.1.2
|
||||
|
||||
VERSION 0.52
|
||||
============
|
||||
|
||||
* tagged ready for branch for gcc-3.3.6 so that the head
|
||||
can be developed with gcc-4.1.0
|
||||
|
||||
VERSION 0.51
|
||||
============
|
||||
|
||||
* all regression tests pass on LP64 and i386 GNU/Linux
|
||||
|
||||
* declaration of variables at particular addresses is now implemented.
|
||||
Now gm2 is a full PIM Modula-2 compiler and hence the formal release.
|
||||
|
||||
VERSION 0.50
|
||||
============
|
||||
|
||||
* all regression tests pass on LP64 and i386 GNU/Linux, i386, Mac OS X.3 G5
|
||||
|
||||
* gm2-harness 0.7 will download, patch and build gcc, gdb, gm2 with the
|
||||
SET and TYPE enhancements below. gm2-harness-0.7 also honours the
|
||||
--prefix= option.
|
||||
|
||||
* Much better dwarf-2 debugging support and when used with
|
||||
a patched gdb-6.3 the programmer can display RECORDs,
|
||||
ARRAYs, SETs, subranges and constant char literals in
|
||||
Modula-2 syntax.
|
||||
|
||||
* it currently complies with Programming in Modula-2 Edition 2, 3 and 4.
|
||||
Users can switch on specific mutually exclusive features by using
|
||||
-Wpim or -Wpim2.
|
||||
|
||||
* gm2 supports full PIM Modula-2 (except variables located at
|
||||
particular addresses).
|
||||
|
||||
* profiling (-p) option is now available.
|
||||
|
||||
* module priorities now implemented.
|
||||
|
||||
* Logitech compatible libraries: Break.def, CardinalIO.def,
|
||||
Conversions.def, DebugPMD.def, DebugTrace.def, Delay.def, Display.def,
|
||||
ErrorCode.def, FloatingUtilities.def, InOut.def, Keyboard.def,
|
||||
LongIO.def, Random.def, RealConversions.def, RealInOut.def,
|
||||
Strings.def, Termbase.def, Terminal.def, TimeDate.def have been implemented.
|
||||
|
||||
* all Ulm libraries are available.
|
||||
|
||||
VERSION 0.49
|
||||
============
|
||||
|
||||
* supports sets of any ordinal size (memory permitting).
|
||||
|
||||
* implements ISO Modula-2 SYSTEM which can be switched on via: -Wiso.
|
||||
|
||||
* easy interface to C, and varargs can be passed to C routines.
|
||||
|
||||
* University of Ulm libraries are installed together with the compiler
|
||||
and can be accessed via: -Wlibs=ulm
|
||||
|
||||
* some Logitech libraries have been implemented and can be accessed via:
|
||||
-Wlibs=logitech
|
||||
|
||||
* coroutines have been implemented in the PIM style and these are accessible
|
||||
from SYSTEM. A number of supporting libraries (executive and file descriptor
|
||||
mapping to interrupt vector libraries are available through the
|
||||
-Wlibs=pim-coroutines switch).
|
||||
|
||||
|
||||
VERSION 0.42
|
||||
============
|
||||
|
||||
* MinGW cross compilation port released.
|
||||
Please see http://floppsie.comp.glam.ac.uk/Glamorgan/gaius/web/gm2-mingw.html
|
||||
for building details.
|
||||
|
||||
VERSION 0.41
|
||||
============
|
||||
|
||||
* native sparc port passes make gm2.paranoid and make check-gm2
|
||||
|
||||
* native i386 port passes make gm2.paranoid and make check-gm2
|
||||
|
||||
* passes all 1350 regression tests
|
||||
|
||||
* builds with gcc-3.3.2
|
||||
|
||||
VERSION 0.40
|
||||
============
|
||||
|
||||
* brought GM2 up to date with gcc-3.3.1
|
||||
|
||||
* many, many bug fixes and no patch is now required in the garbage collection
|
||||
of gcc-3.3.1
|
||||
|
||||
* builds under Redhat 9.0 and Suse 9.0
|
||||
|
||||
* added the LONGCARD data type.
|
||||
|
||||
* LENGTH is now mapped onto M2RTS.Length if the parameter is not a constant
|
||||
at compile time.
|
||||
|
||||
* standard procedures can be called inside constant expressions.
|
||||
|
||||
* introduced examples/pthread
|
||||
|
||||
* introduced a tool, h2def, to aid production of DEFINITION MODULE FOR "C" modules
|
||||
from C header files.
|
||||
|
||||
* added MathLib0 module, added svga example.
|
||||
|
||||
* added access to thirty one gcc built-in functions.
|
||||
|
||||
|
||||
VERSION 0.33
|
||||
============
|
||||
|
||||
* implemented large sets.
|
||||
|
||||
* implemented ISO compliant sets.
|
||||
|
||||
* when gm2 is invoked with -gstabs a patched gdb will
|
||||
display set contents. This also works well with SET OF CHAR.
|
||||
|
||||
* definition modules no longer have to explicitly export
|
||||
identifiers.
|
||||
|
||||
VERSION 0.32
|
||||
============
|
||||
|
||||
* gm2 can be built as a native or as a strongarm cross compiler.
|
||||
|
||||
* the C preprocessor can be invoked and it processes both definition and
|
||||
implementation modules.
|
||||
|
||||
* error reporting understands preprocessed Modula-2 source.
|
||||
35
gcc/m2/README
Normal file
35
gcc/m2/README
Normal file
@@ -0,0 +1,35 @@
|
||||
|
||||
Building GNU Modula-2
|
||||
=====================
|
||||
|
||||
Please see the GCC documentation (gcc.texi) and section
|
||||
(Installing GCC).
|
||||
|
||||
Regression testing GM2
|
||||
======================
|
||||
|
||||
cd host-build ; make check-m2
|
||||
|
||||
runs all regression tests.
|
||||
|
||||
Stress testing GM2
|
||||
==================
|
||||
|
||||
cd host-build/gcc ; make gm2.paranoid
|
||||
|
||||
builds gm2 using itself and then compiles each module with both
|
||||
versions of gm2 comparing the emitted assembler code.
|
||||
|
||||
Contributing to GNU Modula-2
|
||||
============================
|
||||
|
||||
Please do. But also please read the GNU Emacs info under
|
||||
|
||||
* Standards: (standards). GNU coding standards.
|
||||
* Intellectual Property:: Keeping Free Software Free
|
||||
* Reading Non-Free Code:: Referring to Proprietary Programs
|
||||
* Contributions:: Accepting Contributions
|
||||
|
||||
you might consider joining the GM2 Mailing list: see URL:
|
||||
http://lists.nongnu.org/mailman/listinfo/gm2 before you start coding.
|
||||
Many thanks and enjoy your programming!
|
||||
12
gcc/m2/aclocal.m4
vendored
Normal file
12
gcc/m2/aclocal.m4
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
#
|
||||
# set up the '--enable-ulmlib' command line option
|
||||
#
|
||||
# this does not work with the gcc frontent (yet)
|
||||
|
||||
# AC_DEFUN([GM2_ULMLIB_OPTION],
|
||||
# [AC_ARG_ENABLE([ulmlib],
|
||||
# AS_HELP_STRING([--enable-ulmlib],
|
||||
# [build and install the University of Ulm libraries]),
|
||||
# [ulmlib="$withval"],
|
||||
# [ulmlib="yes"])])
|
||||
# AC_SUBST([ulmlib])
|
||||
83
gcc/m2/config-lang.in
Normal file
83
gcc/m2/config-lang.in
Normal file
@@ -0,0 +1,83 @@
|
||||
# Top level configure fragment for GNU Modula-2.
|
||||
# Copyright (C) 2000-2022 Free Software Foundation, Inc.
|
||||
|
||||
# This file is part of GCC.
|
||||
|
||||
# GCC is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 3, or (at your option)
|
||||
# any later version.
|
||||
|
||||
# GCC is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with GCC; see the file COPYING3. If not see
|
||||
# <http://www.gnu.org/licenses/>.
|
||||
|
||||
# Configure looks for the existence of this file to auto-config each language.
|
||||
# We define several parameters used by configure:
|
||||
#
|
||||
# language - name of language as it would appear in $(LANGUAGES)
|
||||
# compilers - value to add to $(COMPILERS)
|
||||
# stagestuff - files to add to $(STAGESTUFF)
|
||||
|
||||
language="m2"
|
||||
|
||||
compilers="cc1gm2\$(exeext)"
|
||||
|
||||
stagestuff="gm2\$(exeext) cc1gm2\$(exeext) cc1gm2-cross\$(exeext)"
|
||||
|
||||
target_libs="target-libstdc++-v3 target-libgm2"
|
||||
|
||||
# The Modula-2 frontend needs C++ compiler during stage 1.
|
||||
lang_requires_boot_languages=c++
|
||||
|
||||
# Do not build by default.
|
||||
build_by_default="no"
|
||||
|
||||
gtfiles="\$(srcdir)/m2/gm2-lang.cc \
|
||||
\$(srcdir)/m2/gm2-lang.h \
|
||||
\$(srcdir)/m2/gm2-gcc/rtegraph.cc \
|
||||
\$(srcdir)/m2/gm2-gcc/m2block.cc \
|
||||
\$(srcdir)/m2/gm2-gcc/m2builtins.cc \
|
||||
\$(srcdir)/m2/gm2-gcc/m2decl.cc \
|
||||
\$(srcdir)/m2/gm2-gcc/m2except.cc \
|
||||
\$(srcdir)/m2/gm2-gcc/m2expr.cc \
|
||||
\$(srcdir)/m2/gm2-gcc/m2statement.cc \
|
||||
\$(srcdir)/m2/gm2-gcc/m2type.cc"
|
||||
|
||||
outputs="m2/config-make \
|
||||
m2/Make-maintainer \
|
||||
"
|
||||
|
||||
mkdir -p m2/gm2-compiler-boot
|
||||
mkdir -p m2/gm2-libs-boot
|
||||
mkdir -p m2/gm2-ici-boot
|
||||
mkdir -p m2/gm2-libiberty
|
||||
mkdir -p m2/gm2-gcc
|
||||
mkdir -p m2/gm2-compiler
|
||||
mkdir -p m2/gm2-libs
|
||||
mkdir -p m2/gm2-libs-iso
|
||||
mkdir -p m2/gm2-compiler-paranoid
|
||||
mkdir -p m2/gm2-libs-paranoid
|
||||
mkdir -p m2/gm2-compiler-verify
|
||||
mkdir -p m2/boot-bin
|
||||
mkdir -p m2/gm2-libs-pim
|
||||
mkdir -p m2/gm2-libs-coroutines
|
||||
mkdir -p m2/gm2-libs-min
|
||||
mkdir -p m2/pge-boot
|
||||
mkdir -p plugin
|
||||
mkdir -p stage1/m2 stage2/m2 stage3/m2 stage4/m2
|
||||
|
||||
# directories used by Make-maintainer
|
||||
|
||||
mkdir -p m2/gm2-auto
|
||||
mkdir -p m2/gm2-pg-boot
|
||||
mkdir -p m2/gm2-pge-boot
|
||||
mkdir -p m2/gm2-ppg-boot
|
||||
mkdir -p m2/mc-boot
|
||||
mkdir -p m2/mc-boot-ch
|
||||
mkdir -p m2/mc-boot-gen
|
||||
6
gcc/m2/config-make.in
Normal file
6
gcc/m2/config-make.in
Normal file
@@ -0,0 +1,6 @@
|
||||
# Target libraries are put under this directory:
|
||||
TARGET_SUBDIR = @target_subdir@
|
||||
# Python3 executable name if it exists
|
||||
PYTHON = @PYTHON@
|
||||
# Does Python3 exist? (yes/no).
|
||||
HAVE_PYTHON = @HAVE_PYTHON@
|
||||
4718
gcc/m2/configure
vendored
Executable file
4718
gcc/m2/configure
vendored
Executable file
File diff suppressed because it is too large
Load Diff
38
gcc/m2/configure.ac
Normal file
38
gcc/m2/configure.ac
Normal file
@@ -0,0 +1,38 @@
|
||||
# configure.ac provides gm2spec.c with access to config values.
|
||||
|
||||
# Copyright (C) 2001-2022 Free Software Foundation, Inc.
|
||||
# Contributed by Gaius Mulley <gaius.mulley@southwales.ac.uk>.
|
||||
|
||||
# GCC is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 3, or (at your option)
|
||||
# any later version.
|
||||
|
||||
# GCC is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with GCC; see the file COPYING3. If not see
|
||||
# <http://www.gnu.org/licenses/>.
|
||||
|
||||
AC_INIT(m2, [ ])
|
||||
|
||||
# Determine the host, build, and target systems
|
||||
AC_CANONICAL_BUILD
|
||||
AC_CANONICAL_HOST
|
||||
AC_CANONICAL_TARGET
|
||||
|
||||
AC_CHECK_PROGS(regex_realpath, realpath)
|
||||
if test x$regex_realpath = "x" ; then
|
||||
AC_MSG_ERROR([realpath is required to build GNU Modula-2 (hint install coreutils).])
|
||||
fi
|
||||
|
||||
AC_CHECK_FUNCS([stpcpy])
|
||||
|
||||
AC_CHECK_HEADERS(sys/types.h)
|
||||
AC_HEADER_DIRENT
|
||||
AC_CHECK_LIB([c],[opendir],[AC_DEFINE([HAVE_OPENDIR],[1],[found opendir])])
|
||||
AC_CONFIG_HEADERS(gm2config.h, [echo timestamp > stamp-h])
|
||||
AC_OUTPUT
|
||||
264
gcc/m2/gm2-compiler/CLexBuf.def
Normal file
264
gcc/m2/gm2-compiler/CLexBuf.def
Normal file
@@ -0,0 +1,264 @@
|
||||
(* CLexBuf.def provides a lexical buffer for clex.
|
||||
|
||||
Copyright (C) 2003-2022 Free Software Foundation, Inc.
|
||||
Contributed by Gaius Mulley <gaius.mulley@southwales.ac.uk>.
|
||||
|
||||
This file is part of GNU Modula-2.
|
||||
|
||||
GNU Modula-2 is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3, or (at your option)
|
||||
any later version.
|
||||
|
||||
GNU Modula-2 is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU Modula-2; see the file COPYING3. If not see
|
||||
<http://www.gnu.org/licenses/>. *)
|
||||
|
||||
DEFINITION MODULE CLexBuf ;
|
||||
|
||||
(*
|
||||
Title : CLexBuf
|
||||
Author : Gaius Mulley
|
||||
System : GNU Modula-2
|
||||
Date : Thu Jan 23 12:32:36 2003
|
||||
Revision : $Version$
|
||||
Description: provides a lexical buffer for clex.
|
||||
*)
|
||||
|
||||
FROM SYSTEM IMPORT ADDRESS ;
|
||||
FROM DynamicStrings IMPORT String ;
|
||||
FROM NameKey IMPORT Name ;
|
||||
EXPORT QUALIFIED toktype,
|
||||
IsMacroDefined, NoArgs, DefineMacro, UnDefineMacro,
|
||||
OpenSource, CloseSource, ReInitialize, GetToken, InsertToken,
|
||||
InsertTokenAndRewind, GetLineNo,
|
||||
GetTokenNo, TokenToLineNo, FindFileNameFromToken, GetFileName,
|
||||
ResetForNewPass,
|
||||
currenttoken, currentstring, currentinteger,
|
||||
EnableMacroSubstitutions,
|
||||
AddTok, AddTokCharStar, AddTokInteger,
|
||||
SetFile, PushFile, PopFile, FlushTokens ;
|
||||
|
||||
TYPE
|
||||
toktype = (eoftok, startok, arrowtok, structtok, lsbratok, rsbratok,
|
||||
lcbratok, rcbratok, lparatok, rparatok, semicolontok,
|
||||
longtok, inttok, chartok, enumtok, typedeftok,
|
||||
floattok, doubletok, unsignedtok, consttok,
|
||||
periodperiodperiodtok,
|
||||
integertok, hexintegertok, octintegertok,
|
||||
identtok, realtok, conststringtok, constchartok, codetok,
|
||||
starthashtok, endhashtok, definetok, undeftok, iftok, elsetok,
|
||||
endiftok, ifdeftok, ifndeftok, includetok,
|
||||
nottok, commatok,
|
||||
periodtok,
|
||||
gretok, lesstok, ortok, andtok, bartok, ambersandtok,
|
||||
shiftlefttok, shiftrighttok, divtok, modtok,
|
||||
sizeoftok, definedtok, hattok, equaltok, notequaltok,
|
||||
greequaltok, lessequaltok, plustok, minustok, tildetok,
|
||||
externtok, statictok, autotok, registertok,
|
||||
voidtok, shorttok, signedtok, uniontok, colontok, becomestok,
|
||||
volatiletok, typetok) ;
|
||||
|
||||
VAR
|
||||
currenttoken : toktype ;
|
||||
currentstring : ADDRESS ;
|
||||
currentinteger: INTEGER ;
|
||||
|
||||
|
||||
(*
|
||||
EnableMacroSubstitutions -
|
||||
*)
|
||||
|
||||
PROCEDURE EnableMacroSubstitutions (b: BOOLEAN) ;
|
||||
|
||||
|
||||
(*
|
||||
IsMacroDefined - returns TRUE if macro, n, was defined.
|
||||
*)
|
||||
|
||||
PROCEDURE IsMacroDefined (n: Name) : BOOLEAN ;
|
||||
|
||||
|
||||
(*
|
||||
NoArgs - returns the number of arguments for macro, n.
|
||||
-1 if the macro does not exist
|
||||
*)
|
||||
|
||||
PROCEDURE NoArgs (n: Name) : INTEGER ;
|
||||
|
||||
|
||||
(*
|
||||
DefineMacro - defines macro, n, as defined to start at token, t.
|
||||
*)
|
||||
|
||||
PROCEDURE DefineMacro (n: Name; t: CARDINAL) ;
|
||||
|
||||
|
||||
(*
|
||||
UnDefineMacro -
|
||||
*)
|
||||
|
||||
PROCEDURE UnDefineMacro (n: Name) ;
|
||||
|
||||
|
||||
(*
|
||||
OpenSource - Attempts to open the source file, s.
|
||||
The success of the operation is returned.
|
||||
*)
|
||||
|
||||
PROCEDURE OpenSource (s: String) : BOOLEAN ;
|
||||
|
||||
|
||||
(*
|
||||
CloseSource - closes the current open file.
|
||||
*)
|
||||
|
||||
PROCEDURE CloseSource ;
|
||||
|
||||
|
||||
(*
|
||||
ReInitialize - re-initialize the all the data structures.
|
||||
*)
|
||||
|
||||
PROCEDURE ReInitialize ;
|
||||
|
||||
|
||||
(*
|
||||
ResetForNewPass - reset the buffer pointers to the beginning ready for
|
||||
a new pass
|
||||
*)
|
||||
|
||||
PROCEDURE ResetForNewPass ;
|
||||
|
||||
|
||||
(*
|
||||
GetToken - gets the next token into currenttoken.
|
||||
*)
|
||||
|
||||
PROCEDURE GetToken ;
|
||||
|
||||
|
||||
(*
|
||||
InsertToken - inserts a symbol, token, infront of the current token
|
||||
ready for the next pass.
|
||||
*)
|
||||
|
||||
PROCEDURE InsertToken (token: toktype) ;
|
||||
|
||||
|
||||
(*
|
||||
InsertTokenAndRewind - inserts a symbol, token, infront of the current token
|
||||
and then moves the token stream back onto the inserted token.
|
||||
*)
|
||||
|
||||
PROCEDURE InsertTokenAndRewind (token: toktype) ;
|
||||
|
||||
|
||||
(*
|
||||
GetLineNo - returns the current line number where the symbol occurs in
|
||||
the source file.
|
||||
*)
|
||||
|
||||
PROCEDURE GetLineNo () : CARDINAL ;
|
||||
|
||||
|
||||
(*
|
||||
GetTokenNo - returns the number of tokens read from
|
||||
the source file by the lexical analaysis.
|
||||
*)
|
||||
|
||||
PROCEDURE GetTokenNo () : CARDINAL ;
|
||||
|
||||
|
||||
(*
|
||||
TokenToLineNo - returns the line number of the current file for the
|
||||
TokenNo. The depth refers to the include depth.
|
||||
A depth of 0 is the current file, depth of 1 is the file
|
||||
which included the current file. Zero is returned if the
|
||||
depth exceeds the file nesting level.
|
||||
*)
|
||||
|
||||
PROCEDURE TokenToLineNo (TokenNo: CARDINAL; depth: CARDINAL) : CARDINAL ;
|
||||
|
||||
|
||||
(*
|
||||
FindFileNameFromToken - returns the complete FileName for the appropriate
|
||||
source file yields the token number, TokenNo.
|
||||
The, Depth, indicates the include level: 0..n
|
||||
Level 0 is the current. NIL is returned if n+1
|
||||
is requested.
|
||||
*)
|
||||
|
||||
PROCEDURE FindFileNameFromToken (TokenNo: CARDINAL; depth: CARDINAL) : String ;
|
||||
|
||||
|
||||
(*
|
||||
GetFileName - assigns, a, to the current file name.
|
||||
*)
|
||||
|
||||
PROCEDURE GetFileName () : String ;
|
||||
|
||||
|
||||
(* ***********************************************************************
|
||||
*
|
||||
* These functions allow c.lex to deliver tokens into the buffer
|
||||
*
|
||||
************************************************************************* *)
|
||||
|
||||
(*
|
||||
AddTok - adds a token to the buffer.
|
||||
*)
|
||||
|
||||
PROCEDURE AddTok (t: toktype) ;
|
||||
|
||||
|
||||
(*
|
||||
AddTokCharStar - adds a token to the buffer and an additional string, s.
|
||||
A copy of string, s, is made.
|
||||
*)
|
||||
|
||||
PROCEDURE AddTokCharStar (t: toktype; s: ADDRESS) ;
|
||||
|
||||
|
||||
(*
|
||||
AddTokInteger - adds a token and an integer to the buffer.
|
||||
*)
|
||||
|
||||
PROCEDURE AddTokInteger (t: toktype; i: INTEGER) ;
|
||||
|
||||
|
||||
(*
|
||||
SetFile - sets the current filename to, filename.
|
||||
*)
|
||||
|
||||
PROCEDURE SetFile (filename: ADDRESS) ;
|
||||
|
||||
|
||||
(*
|
||||
PushFile - indicates that, filename, has just been included.
|
||||
*)
|
||||
|
||||
PROCEDURE PushFile (filename: ADDRESS) ;
|
||||
|
||||
|
||||
(*
|
||||
PopFile - indicates that we are returning to, filename, having finished
|
||||
an include.
|
||||
*)
|
||||
|
||||
PROCEDURE PopFile (filename: ADDRESS) ;
|
||||
|
||||
|
||||
(*
|
||||
FlushTokens - removes the last token.
|
||||
*)
|
||||
|
||||
PROCEDURE FlushTokens ;
|
||||
|
||||
|
||||
END CLexBuf.
|
||||
1029
gcc/m2/gm2-compiler/CLexBuf.mod
Normal file
1029
gcc/m2/gm2-compiler/CLexBuf.mod
Normal file
File diff suppressed because it is too large
Load Diff
103
gcc/m2/gm2-compiler/FifoQueue.def
Normal file
103
gcc/m2/gm2-compiler/FifoQueue.def
Normal file
@@ -0,0 +1,103 @@
|
||||
(* FifoQueue.def provides a simple fifo queue.
|
||||
|
||||
Copyright (C) 2001-2022 Free Software Foundation, Inc.
|
||||
Contributed by Gaius Mulley <gaius.mulley@southwales.ac.uk>.
|
||||
|
||||
This file is part of GNU Modula-2.
|
||||
|
||||
GNU Modula-2 is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3, or (at your option)
|
||||
any later version.
|
||||
|
||||
GNU Modula-2 is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU Modula-2; see the file COPYING3. If not see
|
||||
<http://www.gnu.org/licenses/>. *)
|
||||
|
||||
DEFINITION MODULE FifoQueue ;
|
||||
|
||||
(*
|
||||
Author : Gaius Mulley
|
||||
Title : FifoQueue
|
||||
Date : Tue Dec 12 16:23:22 GMT 1989
|
||||
Description: FifoQueue provides a mechanism to and from which CARDINAL
|
||||
numbers can be stored and retrieved from a FIFO queue.
|
||||
Last update: Tue Dec 12 16:24:24 GMT 1989
|
||||
*)
|
||||
|
||||
EXPORT QUALIFIED PutEnumerationIntoFifoQueue, GetEnumerationFromFifoQueue,
|
||||
PutSubrangeIntoFifoQueue, GetSubrangeFromFifoQueue,
|
||||
PutConstIntoFifoQueue, GetConstFromFifoQueue,
|
||||
PutConstructorIntoFifoQueue, GetConstructorFromFifoQueue ;
|
||||
|
||||
|
||||
(*
|
||||
PutEnumerationIntoFifoQueue - places an enumeration symbol, c,
|
||||
into a fifo queue.
|
||||
*)
|
||||
|
||||
PROCEDURE PutEnumerationIntoFifoQueue (c: CARDINAL) ;
|
||||
|
||||
|
||||
(*
|
||||
GetEnumerationFromFifoQueue - retrieves an enumeration symbol,
|
||||
c, from a fifo queue.
|
||||
*)
|
||||
|
||||
PROCEDURE GetEnumerationFromFifoQueue (VAR c: CARDINAL) ;
|
||||
|
||||
|
||||
(*
|
||||
PutSubrangeIntoFifoQueue - places a subrange symbol into a fifo
|
||||
queue.
|
||||
*)
|
||||
|
||||
PROCEDURE PutSubrangeIntoFifoQueue (c: CARDINAL) ;
|
||||
|
||||
|
||||
(*
|
||||
GetSubrangeFromFifoQueue - retrieves a subrange symbol from a
|
||||
fifo queue.
|
||||
*)
|
||||
|
||||
PROCEDURE GetSubrangeFromFifoQueue (VAR c: CARDINAL) ;
|
||||
|
||||
|
||||
(*
|
||||
PutConstIntoFifoQueue - places a constant symbol
|
||||
into a fifo queue.
|
||||
*)
|
||||
|
||||
PROCEDURE PutConstIntoFifoQueue (c: CARDINAL) ;
|
||||
|
||||
|
||||
(*
|
||||
GetConstFromFifoQueue - retrieves a const symbol
|
||||
from a fifo queue.
|
||||
*)
|
||||
|
||||
PROCEDURE GetConstFromFifoQueue (VAR c: CARDINAL) ;
|
||||
|
||||
|
||||
(*
|
||||
PutConstructorIntoFifoQueue - places a constructor symbol
|
||||
into a fifo queue.
|
||||
*)
|
||||
|
||||
PROCEDURE PutConstructorIntoFifoQueue (c: CARDINAL) ;
|
||||
|
||||
|
||||
(*
|
||||
GetConstructorFromFifoQueue - retrieves a constructor symbol
|
||||
from a fifo queue.
|
||||
*)
|
||||
|
||||
PROCEDURE GetConstructorFromFifoQueue (VAR c: CARDINAL) ;
|
||||
|
||||
|
||||
END FifoQueue.
|
||||
170
gcc/m2/gm2-compiler/FifoQueue.mod
Normal file
170
gcc/m2/gm2-compiler/FifoQueue.mod
Normal file
@@ -0,0 +1,170 @@
|
||||
(* FifoQueue.mod provides a simple fifo queue.
|
||||
|
||||
Copyright (C) 2001-2022 Free Software Foundation, Inc.
|
||||
Contributed by Gaius Mulley <gaius.mulley@southwales.ac.uk>.
|
||||
|
||||
This file is part of GNU Modula-2.
|
||||
|
||||
GNU Modula-2 is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3, or (at your option)
|
||||
any later version.
|
||||
|
||||
GNU Modula-2 is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU Modula-2; see the file COPYING3. If not see
|
||||
<http://www.gnu.org/licenses/>. *)
|
||||
|
||||
IMPLEMENTATION MODULE FifoQueue ;
|
||||
|
||||
FROM Lists IMPORT List, InitList, PutItemIntoList, GetItemFromList ;
|
||||
|
||||
TYPE
|
||||
Fifo = RECORD
|
||||
Queue: List ;
|
||||
Out : CARDINAL ;
|
||||
END ;
|
||||
|
||||
VAR
|
||||
const,
|
||||
subrange,
|
||||
enumeration,
|
||||
constructor: Fifo ;
|
||||
|
||||
|
||||
(*
|
||||
PutInto - places a CARDINAL number, c, into a fifo queue.
|
||||
*)
|
||||
|
||||
PROCEDURE PutInto (VAR f: Fifo; c: CARDINAL) ;
|
||||
BEGIN
|
||||
WITH f DO
|
||||
PutItemIntoList(Queue, c)
|
||||
END
|
||||
END PutInto ;
|
||||
|
||||
|
||||
(*
|
||||
GetFrom - retrieves a CARDINAL number, c, from a fifo queue.
|
||||
*)
|
||||
|
||||
PROCEDURE GetFrom (VAR f: Fifo; VAR c: CARDINAL) ;
|
||||
BEGIN
|
||||
WITH f DO
|
||||
INC(Out) ;
|
||||
c := GetItemFromList(Queue, Out)
|
||||
END
|
||||
END GetFrom ;
|
||||
|
||||
|
||||
(*
|
||||
PutEnumerationIntoFifoQueue - places an enumeration symbol, c,
|
||||
into a fifo queue.
|
||||
*)
|
||||
|
||||
PROCEDURE PutEnumerationIntoFifoQueue (c: CARDINAL) ;
|
||||
BEGIN
|
||||
PutInto(enumeration, c)
|
||||
END PutEnumerationIntoFifoQueue ;
|
||||
|
||||
|
||||
(*
|
||||
GetEnumerationFromFifoQueue - retrieves an enumeration symbol,
|
||||
c, from a fifo queue.
|
||||
*)
|
||||
|
||||
PROCEDURE GetEnumerationFromFifoQueue (VAR c: CARDINAL) ;
|
||||
BEGIN
|
||||
GetFrom(enumeration, c)
|
||||
END GetEnumerationFromFifoQueue ;
|
||||
|
||||
|
||||
(*
|
||||
PutSubrangeIntoFifoQueue - places a subrange symbol into a fifo
|
||||
queue.
|
||||
*)
|
||||
|
||||
PROCEDURE PutSubrangeIntoFifoQueue (c: CARDINAL) ;
|
||||
BEGIN
|
||||
PutInto(subrange, c)
|
||||
END PutSubrangeIntoFifoQueue ;
|
||||
|
||||
|
||||
(*
|
||||
GetSubrangeFromFifoQueue - retrieves a subrange symbol from a
|
||||
fifo queue.
|
||||
*)
|
||||
|
||||
PROCEDURE GetSubrangeFromFifoQueue (VAR c: CARDINAL) ;
|
||||
BEGIN
|
||||
GetFrom(subrange, c)
|
||||
END GetSubrangeFromFifoQueue ;
|
||||
|
||||
|
||||
(*
|
||||
PutConstructorIntoFifoQueue - places a constructor symbol
|
||||
into a fifo queue.
|
||||
*)
|
||||
|
||||
PROCEDURE PutConstructorIntoFifoQueue (c: CARDINAL) ;
|
||||
BEGIN
|
||||
PutInto(constructor, c)
|
||||
END PutConstructorIntoFifoQueue ;
|
||||
|
||||
|
||||
(*
|
||||
GetConstructorFromFifoQueue - retrieves a constructor symbol
|
||||
from a fifo queue.
|
||||
*)
|
||||
|
||||
PROCEDURE GetConstructorFromFifoQueue (VAR c: CARDINAL) ;
|
||||
BEGIN
|
||||
GetFrom(constructor, c)
|
||||
END GetConstructorFromFifoQueue ;
|
||||
|
||||
|
||||
(*
|
||||
PutConstIntoFifoQueue - places a constant symbol
|
||||
into a fifo queue.
|
||||
*)
|
||||
|
||||
PROCEDURE PutConstIntoFifoQueue (c: CARDINAL) ;
|
||||
BEGIN
|
||||
PutInto(const, c)
|
||||
END PutConstIntoFifoQueue ;
|
||||
|
||||
|
||||
(*
|
||||
GetConstFromFifoQueue - retrieves a const symbol
|
||||
from a fifo queue.
|
||||
*)
|
||||
|
||||
PROCEDURE GetConstFromFifoQueue (VAR c: CARDINAL) ;
|
||||
BEGIN
|
||||
GetFrom(const, c)
|
||||
END GetConstFromFifoQueue ;
|
||||
|
||||
|
||||
(*
|
||||
Init - initialize the fifo queue.
|
||||
*)
|
||||
|
||||
PROCEDURE Init (VAR f: Fifo) ;
|
||||
BEGIN
|
||||
WITH f DO
|
||||
InitList(Queue) ;
|
||||
Out := 0
|
||||
END
|
||||
END Init ;
|
||||
|
||||
|
||||
BEGIN
|
||||
Init(const) ;
|
||||
Init(enumeration) ;
|
||||
Init(subrange) ;
|
||||
Init(constructor)
|
||||
END FifoQueue.
|
||||
128
gcc/m2/gm2-compiler/Lists.def
Normal file
128
gcc/m2/gm2-compiler/Lists.def
Normal file
@@ -0,0 +1,128 @@
|
||||
(* Lists.def provides an unordered list manipulation package.
|
||||
|
||||
Copyright (C) 2001-2022 Free Software Foundation, Inc.
|
||||
Contributed by Gaius Mulley <gaius.mulley@southwales.ac.uk>.
|
||||
|
||||
This file is part of GNU Modula-2.
|
||||
|
||||
GNU Modula-2 is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3, or (at your option)
|
||||
any later version.
|
||||
|
||||
GNU Modula-2 is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU Modula-2; see the file COPYING3. If not see
|
||||
<http://www.gnu.org/licenses/>. *)
|
||||
|
||||
DEFINITION MODULE Lists ;
|
||||
|
||||
(*
|
||||
Author : Gaius Mulley
|
||||
Title : Lists
|
||||
Date : Tue Dec 12 20:53:36 EST 1989
|
||||
SYSTEM : UNIX (GNU Modula-2)
|
||||
Description: Provides an unordered list manipulation package.
|
||||
Last update: $Date: 2010/10/03 19:01:05 $
|
||||
Version : $Revision: 1.9 $
|
||||
*)
|
||||
|
||||
FROM SYSTEM IMPORT WORD ;
|
||||
FROM SymbolKey IMPORT PerformOperation ;
|
||||
|
||||
EXPORT QUALIFIED List,
|
||||
InitList, KillList, PutItemIntoList, GetItemFromList,
|
||||
GetIndexOfList,
|
||||
NoOfItemsInList, IsItemInList, IncludeItemIntoList,
|
||||
RemoveItemFromList, ForeachItemInListDo, DuplicateList ;
|
||||
|
||||
TYPE
|
||||
List ;
|
||||
|
||||
|
||||
(*
|
||||
InitList - creates a new list, l.
|
||||
*)
|
||||
|
||||
PROCEDURE InitList (VAR l: List) ;
|
||||
|
||||
|
||||
(*
|
||||
KillList - deletes the complete list, l.
|
||||
*)
|
||||
|
||||
PROCEDURE KillList (VAR l: List) ;
|
||||
|
||||
|
||||
(*
|
||||
PutItemIntoList - places a CARDINAL, c, into list, l.
|
||||
*)
|
||||
|
||||
PROCEDURE PutItemIntoList (l: List; c: WORD) ;
|
||||
|
||||
|
||||
(*
|
||||
GetItemFromList - retrieves the nth WORD from list, l.
|
||||
*)
|
||||
|
||||
PROCEDURE GetItemFromList (l: List; n: CARDINAL) : WORD ;
|
||||
|
||||
|
||||
(*
|
||||
GetIndexOfList - returns the index for WORD, c, in list, l.
|
||||
If more than one CARDINAL, c, exists the index
|
||||
for the first is returned.
|
||||
*)
|
||||
|
||||
PROCEDURE GetIndexOfList (l: List; c: WORD) : CARDINAL ;
|
||||
|
||||
|
||||
(*
|
||||
NoOfItemsInList - returns the number of items in list, l.
|
||||
*)
|
||||
|
||||
PROCEDURE NoOfItemsInList (l: List) : CARDINAL ;
|
||||
|
||||
|
||||
(*
|
||||
IncludeItemIntoList - adds a WORD, c, into a list providing
|
||||
the value does not already exist.
|
||||
*)
|
||||
|
||||
PROCEDURE IncludeItemIntoList (l: List; c: WORD) ;
|
||||
|
||||
|
||||
(*
|
||||
RemoveItemFromList - removes a WORD, c, from a list.
|
||||
It assumes that this value only appears once.
|
||||
*)
|
||||
|
||||
PROCEDURE RemoveItemFromList (l: List; c: WORD) ;
|
||||
|
||||
|
||||
(*
|
||||
IsItemInList - returns true if a WORD, c, was found in list, l.
|
||||
*)
|
||||
|
||||
PROCEDURE IsItemInList (l: List; c: WORD) : BOOLEAN ;
|
||||
|
||||
|
||||
(*
|
||||
ForeachItemInListDo - calls procedure, P, foreach item in list, l.
|
||||
*)
|
||||
|
||||
PROCEDURE ForeachItemInListDo (l: List; P: PerformOperation) ;
|
||||
|
||||
|
||||
(*
|
||||
DuplicateList - returns a duplicate list derived from, l.
|
||||
*)
|
||||
|
||||
PROCEDURE DuplicateList (l: List) : List ;
|
||||
|
||||
|
||||
END Lists.
|
||||
341
gcc/m2/gm2-compiler/Lists.mod
Normal file
341
gcc/m2/gm2-compiler/Lists.mod
Normal file
@@ -0,0 +1,341 @@
|
||||
(* Lists.mod provides an unordered list manipulation package.
|
||||
|
||||
Copyright (C) 2001-2022 Free Software Foundation, Inc.
|
||||
Contributed by Gaius Mulley <gaius.mulley@southwales.ac.uk>.
|
||||
|
||||
This file is part of GNU Modula-2.
|
||||
|
||||
GNU Modula-2 is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3, or (at your option)
|
||||
any later version.
|
||||
|
||||
GNU Modula-2 is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU Modula-2; see the file COPYING3. If not see
|
||||
<http://www.gnu.org/licenses/>. *)
|
||||
|
||||
IMPLEMENTATION MODULE Lists ;
|
||||
|
||||
|
||||
FROM Storage IMPORT ALLOCATE, DEALLOCATE ;
|
||||
|
||||
CONST
|
||||
MaxNoOfElements = 5 ;
|
||||
|
||||
TYPE
|
||||
List = POINTER TO list ;
|
||||
list = RECORD
|
||||
NoOfElements: CARDINAL ;
|
||||
Elements : ARRAY [1..MaxNoOfElements] OF WORD ;
|
||||
Next : List ;
|
||||
END ;
|
||||
|
||||
(*
|
||||
InitList - creates a new list, l.
|
||||
*)
|
||||
|
||||
PROCEDURE InitList (VAR l: List) ;
|
||||
BEGIN
|
||||
NEW (l) ;
|
||||
WITH l^ DO
|
||||
NoOfElements := 0 ;
|
||||
Next := NIL
|
||||
END
|
||||
END InitList ;
|
||||
|
||||
|
||||
(*
|
||||
KillList - deletes the complete list, l.
|
||||
*)
|
||||
|
||||
PROCEDURE KillList (VAR l: List) ;
|
||||
BEGIN
|
||||
IF l#NIL
|
||||
THEN
|
||||
IF l^.Next#NIL
|
||||
THEN
|
||||
KillList(l^.Next)
|
||||
END ;
|
||||
DISPOSE(l)
|
||||
END
|
||||
END KillList ;
|
||||
|
||||
|
||||
(*
|
||||
PutItemIntoList - places a WORD, c, into list, l.
|
||||
*)
|
||||
|
||||
PROCEDURE PutItemIntoList (l: List; c: WORD) ;
|
||||
BEGIN
|
||||
WITH l^ DO
|
||||
IF NoOfElements<MaxNoOfElements
|
||||
THEN
|
||||
INC(NoOfElements) ;
|
||||
Elements[NoOfElements] := c
|
||||
ELSIF Next#NIL
|
||||
THEN
|
||||
PutItemIntoList(Next, c)
|
||||
ELSE
|
||||
InitList(Next) ;
|
||||
PutItemIntoList(Next, c)
|
||||
END
|
||||
END
|
||||
END PutItemIntoList ;
|
||||
|
||||
|
||||
(*
|
||||
GetItemFromList - retrieves the nth WORD from list, l.
|
||||
(recursive solution).
|
||||
*)
|
||||
(*
|
||||
PROCEDURE GetItemFromList (l: List; n: CARDINAL) : WORD ;
|
||||
BEGIN
|
||||
IF n>NoOfItemsInList(l)
|
||||
THEN
|
||||
RETURN( 0 )
|
||||
ELSE
|
||||
WITH l^ DO
|
||||
IF n<=NoOfElements
|
||||
THEN
|
||||
RETURN( Elements[n] )
|
||||
ELSE
|
||||
RETURN( GetItemFromList( Next, n-NoOfElements ) )
|
||||
END
|
||||
END
|
||||
END
|
||||
END GetItemFromList ;
|
||||
*)
|
||||
|
||||
(* iterative solution *)
|
||||
PROCEDURE GetItemFromList (l: List; n: CARDINAL) : WORD ;
|
||||
BEGIN
|
||||
WHILE l#NIL DO
|
||||
WITH l^ DO
|
||||
IF n<=NoOfElements
|
||||
THEN
|
||||
RETURN( Elements[n] )
|
||||
ELSE
|
||||
DEC(n, NoOfElements)
|
||||
END
|
||||
END ;
|
||||
l := l^.Next
|
||||
END ;
|
||||
RETURN( 0 )
|
||||
END GetItemFromList ;
|
||||
|
||||
|
||||
(*
|
||||
GetIndexOfList - returns the index for WORD, c, in list, l.
|
||||
If more than one WORD, c, exists the index
|
||||
for the first is returned.
|
||||
*)
|
||||
|
||||
PROCEDURE GetIndexOfList (l: List; c: WORD) : CARDINAL ;
|
||||
VAR
|
||||
i: CARDINAL ;
|
||||
BEGIN
|
||||
IF l=NIL
|
||||
THEN
|
||||
RETURN( 0 )
|
||||
ELSE
|
||||
WITH l^ DO
|
||||
i := 1 ;
|
||||
WHILE i<=NoOfElements DO
|
||||
IF Elements[i]=c
|
||||
THEN
|
||||
RETURN( i )
|
||||
ELSE
|
||||
INC(i)
|
||||
END
|
||||
END ;
|
||||
RETURN( NoOfElements+GetIndexOfList(Next, c) )
|
||||
END
|
||||
END
|
||||
END GetIndexOfList ;
|
||||
|
||||
|
||||
(*
|
||||
NoOfItemsInList - returns the number of items in list, l.
|
||||
*)
|
||||
(*
|
||||
PROCEDURE NoOfItemsInList (l: List) : CARDINAL ;
|
||||
BEGIN
|
||||
IF l=NIL
|
||||
THEN
|
||||
RETURN( 0 )
|
||||
ELSE
|
||||
WITH l^ DO
|
||||
RETURN( NoOfElements+NoOfItemsInList(Next) )
|
||||
END
|
||||
END
|
||||
END NoOfItemsInList ;
|
||||
*)
|
||||
|
||||
|
||||
(*
|
||||
NoOfItemsInList - returns the number of items in list, l.
|
||||
(iterative algorithm of the above).
|
||||
*)
|
||||
|
||||
PROCEDURE NoOfItemsInList (l: List) : CARDINAL ;
|
||||
VAR
|
||||
t: CARDINAL ;
|
||||
BEGIN
|
||||
IF l=NIL
|
||||
THEN
|
||||
RETURN( 0 )
|
||||
ELSE
|
||||
t := 0 ;
|
||||
REPEAT
|
||||
WITH l^ DO
|
||||
INC(t, NoOfElements)
|
||||
END ;
|
||||
l := l^.Next
|
||||
UNTIL l=NIL;
|
||||
RETURN( t )
|
||||
END
|
||||
END NoOfItemsInList ;
|
||||
|
||||
|
||||
(*
|
||||
IncludeItemIntoList - adds a WORD, c, into a list providing
|
||||
the value does not already exist.
|
||||
*)
|
||||
|
||||
PROCEDURE IncludeItemIntoList (l: List; c: WORD) ;
|
||||
BEGIN
|
||||
IF NOT IsItemInList(l, c)
|
||||
THEN
|
||||
PutItemIntoList(l, c)
|
||||
END
|
||||
END IncludeItemIntoList ;
|
||||
|
||||
|
||||
(*
|
||||
RemoveItem - remove an element at index, i, from the list data type.
|
||||
*)
|
||||
|
||||
PROCEDURE RemoveItem (p, l: List; i: CARDINAL) ;
|
||||
BEGIN
|
||||
WITH l^ DO
|
||||
DEC(NoOfElements) ;
|
||||
WHILE i<=NoOfElements DO
|
||||
Elements[i] := Elements[i+1] ;
|
||||
INC(i)
|
||||
END ;
|
||||
IF (NoOfElements=0) AND (p#NIL)
|
||||
THEN
|
||||
p^.Next := l^.Next ;
|
||||
DISPOSE(l)
|
||||
END
|
||||
END
|
||||
END RemoveItem ;
|
||||
|
||||
|
||||
(*
|
||||
RemoveItemFromList - removes a WORD, c, from a list.
|
||||
It assumes that this value only appears once.
|
||||
*)
|
||||
|
||||
PROCEDURE RemoveItemFromList (l: List; c: WORD) ;
|
||||
VAR
|
||||
p : List ;
|
||||
i : CARDINAL ;
|
||||
Found: BOOLEAN ;
|
||||
BEGIN
|
||||
IF l#NIL
|
||||
THEN
|
||||
Found := FALSE ;
|
||||
p := NIL ;
|
||||
REPEAT
|
||||
WITH l^ DO
|
||||
i := 1 ;
|
||||
WHILE (i<=NoOfElements) AND (Elements[i]#c) DO
|
||||
INC(i)
|
||||
END ;
|
||||
END ;
|
||||
IF (i<=l^.NoOfElements) AND (l^.Elements[i]=c)
|
||||
THEN
|
||||
Found := TRUE
|
||||
ELSE
|
||||
p := l ;
|
||||
l := l^.Next
|
||||
END
|
||||
UNTIL (l=NIL) OR Found ;
|
||||
IF Found
|
||||
THEN
|
||||
RemoveItem(p, l, i)
|
||||
END
|
||||
END
|
||||
END RemoveItemFromList ;
|
||||
|
||||
|
||||
(*
|
||||
IsItemInList - returns true if a WORD, c, was found in list, l.
|
||||
*)
|
||||
|
||||
PROCEDURE IsItemInList (l: List; c: WORD) : BOOLEAN ;
|
||||
VAR
|
||||
i: CARDINAL ;
|
||||
BEGIN
|
||||
REPEAT
|
||||
WITH l^ DO
|
||||
i := 1 ;
|
||||
WHILE (i<=NoOfElements) DO
|
||||
IF Elements[i]=c
|
||||
THEN
|
||||
RETURN( TRUE )
|
||||
ELSE
|
||||
INC(i)
|
||||
END
|
||||
END
|
||||
END ;
|
||||
l := l^.Next
|
||||
UNTIL l=NIL ;
|
||||
RETURN( FALSE )
|
||||
END IsItemInList ;
|
||||
|
||||
|
||||
(*
|
||||
ForeachItemInListDo - calls procedure, P, foreach item in list, l.
|
||||
*)
|
||||
|
||||
PROCEDURE ForeachItemInListDo (l: List; P: PerformOperation) ;
|
||||
VAR
|
||||
i, n: CARDINAL ;
|
||||
BEGIN
|
||||
n := NoOfItemsInList(l) ;
|
||||
i := 1 ;
|
||||
WHILE i<=n DO
|
||||
P(GetItemFromList(l, i)) ;
|
||||
INC(i)
|
||||
END
|
||||
END ForeachItemInListDo ;
|
||||
|
||||
|
||||
(*
|
||||
DuplicateList - returns a duplicate list derived from, l.
|
||||
*)
|
||||
|
||||
PROCEDURE DuplicateList (l: List) : List ;
|
||||
VAR
|
||||
m : List ;
|
||||
n, i: CARDINAL ;
|
||||
BEGIN
|
||||
InitList(m) ;
|
||||
n := NoOfItemsInList(l) ;
|
||||
i := 1 ;
|
||||
WHILE i<=n DO
|
||||
PutItemIntoList(m, GetItemFromList(l, i)) ;
|
||||
INC(i)
|
||||
END ;
|
||||
RETURN( m )
|
||||
END DuplicateList ;
|
||||
|
||||
|
||||
END Lists.
|
||||
989
gcc/m2/gm2-compiler/M2ALU.def
Normal file
989
gcc/m2/gm2-compiler/M2ALU.def
Normal file
@@ -0,0 +1,989 @@
|
||||
(* M2ALU.def gcc implementation of the M2ALU module.
|
||||
|
||||
Copyright (C) 2001-2022 Free Software Foundation, Inc.
|
||||
Contributed by Gaius Mulley <gaius.mulley@southwales.ac.uk>.
|
||||
|
||||
This file is part of GNU Modula-2.
|
||||
|
||||
GNU Modula-2 is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3, or (at your option)
|
||||
any later version.
|
||||
|
||||
GNU Modula-2 is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU Modula-2; see the file COPYING3. If not see
|
||||
<http://www.gnu.org/licenses/>. *)
|
||||
|
||||
DEFINITION MODULE M2ALU ;
|
||||
|
||||
(*
|
||||
Title : M2ALU.def
|
||||
Author : Gaius Mulley
|
||||
System : UNIX (gm2)
|
||||
Date : Tue Jul 11 09:14:28 2000
|
||||
Description: Handles all values in the Modula-2 compiler and all
|
||||
manipulations of values. All values are mapped onto
|
||||
gcc trees.
|
||||
*)
|
||||
|
||||
FROM NameKey IMPORT Name ;
|
||||
FROM m2tree IMPORT Tree ;
|
||||
FROM M2GCCDeclare IMPORT WalkAction, IsAction ;
|
||||
|
||||
EXPORT QUALIFIED PtrToValue,
|
||||
InitValue,
|
||||
IsValueTypeNone,
|
||||
IsValueTypeInteger,
|
||||
IsValueTypeReal,
|
||||
IsValueTypeComplex,
|
||||
IsValueTypeSet,
|
||||
IsValueTypeConstructor,
|
||||
IsValueTypeArray,
|
||||
IsValueTypeRecord,
|
||||
PopInto, PushFrom,
|
||||
PushIntegerTree, PopIntegerTree,
|
||||
PushSetTree, PopSetTree,
|
||||
PushRealTree, PopRealTree,
|
||||
PushComplexTree, PopComplexTree,
|
||||
PopConstructorTree,
|
||||
PushCard,
|
||||
PushInt,
|
||||
PushChar,
|
||||
PushString,
|
||||
PushTypeOfTree,
|
||||
CoerseLongRealToCard,
|
||||
ConvertRealToInt,
|
||||
ConvertToInt,
|
||||
ConvertToType,
|
||||
GetSetValueType,
|
||||
IsSolved, IsValueConst,
|
||||
PutConstructorSolved, EvaluateValue, TryEvaluateValue,
|
||||
|
||||
IsNulSet, IsGenericNulSet, PushNulSet, AddBitRange, AddBit, SubBit,
|
||||
SetOr, SetAnd, SetIn,
|
||||
SetDifference, SetSymmetricDifference,
|
||||
SetNegate, SetShift, SetRotate,
|
||||
|
||||
Addn, Multn, Sub,
|
||||
DivFloor, ModFloor, DivTrunc, ModTrunc,
|
||||
Equ, NotEqu, Less, Gre, LessEqu, GreEqu,
|
||||
GetValue, GetRange, ConstructSetConstant, BuildRange,
|
||||
IsConstructorDependants, WalkConstructorDependants,
|
||||
AddField, AddElements,
|
||||
|
||||
PushEmptyConstructor, PushEmptyArray, PushEmptyRecord,
|
||||
ChangeToConstructor,
|
||||
|
||||
IsValueAndTreeKnown, CheckOrResetOverflow ;
|
||||
|
||||
TYPE
|
||||
PtrToValue ;
|
||||
|
||||
|
||||
(*
|
||||
InitValue - initializes and returns a value container.
|
||||
*)
|
||||
|
||||
PROCEDURE InitValue () : PtrToValue ;
|
||||
|
||||
|
||||
(*
|
||||
IsValueTypeNone - returns TRUE if the value on the top stack has no value.
|
||||
*)
|
||||
|
||||
PROCEDURE IsValueTypeNone () : BOOLEAN ;
|
||||
|
||||
|
||||
(*
|
||||
IsValueTypeInteger - returns TRUE if the value on the top stack is an integer.
|
||||
*)
|
||||
|
||||
PROCEDURE IsValueTypeInteger () : BOOLEAN ;
|
||||
|
||||
|
||||
(*
|
||||
IsValueTypeReal - returns TRUE if the value on the top stack is a real.
|
||||
*)
|
||||
|
||||
PROCEDURE IsValueTypeReal () : BOOLEAN ;
|
||||
|
||||
|
||||
(*
|
||||
IsValueTypeComplex - returns TRUE if the value on the top stack is a complex.
|
||||
*)
|
||||
|
||||
PROCEDURE IsValueTypeComplex () : BOOLEAN ;
|
||||
|
||||
|
||||
(*
|
||||
IsValueTypeSet - returns TRUE if the value on the top stack is a set.
|
||||
*)
|
||||
|
||||
PROCEDURE IsValueTypeSet () : BOOLEAN ;
|
||||
|
||||
|
||||
(*
|
||||
IsValueTypeConstructor - returns TRUE if the value on the top
|
||||
stack is a constructor.
|
||||
*)
|
||||
|
||||
PROCEDURE IsValueTypeConstructor () : BOOLEAN ;
|
||||
|
||||
|
||||
(*
|
||||
IsValueTypeArray - returns TRUE if the value on the top
|
||||
stack is an array.
|
||||
*)
|
||||
|
||||
PROCEDURE IsValueTypeArray () : BOOLEAN ;
|
||||
|
||||
|
||||
(*
|
||||
IsValueTypeRecord - returns TRUE if the value on the top
|
||||
stack is a record.
|
||||
*)
|
||||
|
||||
PROCEDURE IsValueTypeRecord () : BOOLEAN ;
|
||||
|
||||
|
||||
(*
|
||||
GetSetValueType - returns the set type on top of the ALU stack.
|
||||
*)
|
||||
|
||||
PROCEDURE GetSetValueType () : CARDINAL ;
|
||||
|
||||
|
||||
(*
|
||||
PushIntegerTree - pushes a gcc tree value onto the ALU stack.
|
||||
*)
|
||||
|
||||
PROCEDURE PushIntegerTree (t: Tree) ;
|
||||
|
||||
|
||||
(*
|
||||
PopIntegerTree - pops a gcc tree value from the ALU stack.
|
||||
*)
|
||||
|
||||
PROCEDURE PopIntegerTree () : Tree ;
|
||||
|
||||
|
||||
(*
|
||||
PushRealTree - pushes a gcc tree value onto the ALU stack.
|
||||
*)
|
||||
|
||||
PROCEDURE PushRealTree (t: Tree) ;
|
||||
|
||||
|
||||
(*
|
||||
PopRealTree - pops a gcc tree value from the ALU stack.
|
||||
*)
|
||||
|
||||
PROCEDURE PopRealTree () : Tree ;
|
||||
|
||||
|
||||
(*
|
||||
PushComplexTree - pushes a gcc tree value onto the ALU stack.
|
||||
*)
|
||||
|
||||
PROCEDURE PushComplexTree (t: Tree) ;
|
||||
|
||||
|
||||
(*
|
||||
PopComplexTree - pops a gcc tree value from the ALU stack.
|
||||
*)
|
||||
|
||||
PROCEDURE PopComplexTree () : Tree ;
|
||||
|
||||
|
||||
(*
|
||||
PushSetTree - pushes a gcc tree onto the ALU stack.
|
||||
The tree, t, is expected to contain a
|
||||
word value. It is converted into a set
|
||||
type (sym). Bit 0 maps onto MIN(sym).
|
||||
*)
|
||||
|
||||
PROCEDURE PushSetTree (tokenno: CARDINAL;
|
||||
t: Tree; sym: CARDINAL) ;
|
||||
|
||||
|
||||
(*
|
||||
PopSetTree - pops a gcc tree from the ALU stack.
|
||||
*)
|
||||
|
||||
PROCEDURE PopSetTree (tokenno: CARDINAL) : Tree ;
|
||||
|
||||
|
||||
(*
|
||||
PopConstructorTree - returns a tree containing the compound literal.
|
||||
*)
|
||||
|
||||
PROCEDURE PopConstructorTree (tokenno: CARDINAL) : Tree ;
|
||||
|
||||
|
||||
(*
|
||||
PushFrom - pushes a copy of the contents of, v, onto stack.
|
||||
*)
|
||||
|
||||
PROCEDURE PushFrom (v: PtrToValue) ;
|
||||
|
||||
|
||||
(*
|
||||
PopInto - pops the top element from the stack and places it into, v.
|
||||
*)
|
||||
|
||||
PROCEDURE PopInto (v: PtrToValue) ;
|
||||
|
||||
|
||||
(*
|
||||
PushCard - pushes a cardinal onto the stack.
|
||||
*)
|
||||
|
||||
PROCEDURE PushCard (c: CARDINAL) ;
|
||||
|
||||
|
||||
(*
|
||||
PushInt - pushes an integer onto the stack.
|
||||
*)
|
||||
|
||||
PROCEDURE PushInt (i: INTEGER) ;
|
||||
|
||||
|
||||
(*
|
||||
PushChar - pushes a char onto the stack.
|
||||
*)
|
||||
|
||||
PROCEDURE PushChar (c: CHAR) ;
|
||||
|
||||
|
||||
(*
|
||||
PushString - pushes the numerical value of the string onto the stack.
|
||||
*)
|
||||
|
||||
PROCEDURE PushString (tokenno: CARDINAL; s: Name) ;
|
||||
|
||||
|
||||
(*
|
||||
CoerseLongRealToCard - performs a coersion between a REAL to a CARDINAL
|
||||
*)
|
||||
|
||||
PROCEDURE CoerseLongRealToCard ;
|
||||
|
||||
|
||||
(*
|
||||
ConvertRealToInt - converts a REAL into an INTEGER
|
||||
*)
|
||||
|
||||
PROCEDURE ConvertRealToInt ;
|
||||
|
||||
|
||||
(*
|
||||
ConvertToInt - converts the value into an INTEGER. This should be used
|
||||
if we are computing the number of elements in a char set to
|
||||
avoid an overflow.
|
||||
*)
|
||||
|
||||
PROCEDURE ConvertToInt ;
|
||||
|
||||
|
||||
(*
|
||||
ConvertToType - converts the top of stack to type, t.
|
||||
*)
|
||||
|
||||
PROCEDURE ConvertToType (t: CARDINAL) ;
|
||||
|
||||
|
||||
(*
|
||||
IsSolved - returns true if the memory cell indicated by v
|
||||
has a known value.
|
||||
*)
|
||||
|
||||
PROCEDURE IsSolved (v: PtrToValue) : BOOLEAN ;
|
||||
|
||||
|
||||
(*
|
||||
PutConstructorSolved - records that this constructor is solved.
|
||||
*)
|
||||
|
||||
PROCEDURE PutConstructorSolved (sym: CARDINAL) ;
|
||||
|
||||
|
||||
(*
|
||||
EvaluateValue - attempts to evaluate the symbol, sym, value.
|
||||
*)
|
||||
|
||||
PROCEDURE EvaluateValue (sym: CARDINAL) ;
|
||||
|
||||
|
||||
(*
|
||||
TryEvaluateValue - attempts to evaluate the symbol, sym, value.
|
||||
*)
|
||||
|
||||
PROCEDURE TryEvaluateValue (sym: CARDINAL) ;
|
||||
|
||||
|
||||
(*
|
||||
Add - adds the top two elements on the stack.
|
||||
|
||||
The Stack:
|
||||
|
||||
Entry Exit
|
||||
|
||||
Ptr ->
|
||||
+------------+
|
||||
| Op1 | <- Ptr
|
||||
|------------| +------------+
|
||||
| Op2 | | Op2 + Op1 |
|
||||
|------------| |------------|
|
||||
*)
|
||||
|
||||
PROCEDURE Addn ;
|
||||
|
||||
|
||||
(*
|
||||
Sub - subtracts the top two elements on the stack.
|
||||
|
||||
The Stack:
|
||||
|
||||
Entry Exit
|
||||
|
||||
Ptr ->
|
||||
+------------+
|
||||
| Op1 | <- Ptr
|
||||
|------------| +------------+
|
||||
| Op2 | | Op2 - Op1 |
|
||||
|------------| |------------|
|
||||
*)
|
||||
|
||||
PROCEDURE Sub ;
|
||||
|
||||
|
||||
(*
|
||||
Mult - multiplies the top two elements on the stack.
|
||||
|
||||
The Stack:
|
||||
|
||||
Entry Exit
|
||||
|
||||
Ptr ->
|
||||
+------------+
|
||||
| Op1 | <- Ptr
|
||||
|------------| +------------+
|
||||
| Op2 | | Op2 * Op1 |
|
||||
|------------| |------------|
|
||||
*)
|
||||
|
||||
PROCEDURE Multn ;
|
||||
|
||||
|
||||
(*
|
||||
DivFloor - divides the top two elements on the stack.
|
||||
|
||||
The Stack:
|
||||
|
||||
Entry Exit
|
||||
|
||||
Ptr ->
|
||||
+------------+
|
||||
| Op1 | <- Ptr
|
||||
|------------| +--------------+
|
||||
| Op2 | | Op2 DIV Op1 |
|
||||
|------------| |--------------|
|
||||
*)
|
||||
|
||||
PROCEDURE DivFloor ;
|
||||
|
||||
|
||||
(*
|
||||
ModFloor - modulus of the top two elements on the stack.
|
||||
|
||||
The Stack:
|
||||
|
||||
Entry Exit
|
||||
|
||||
Ptr ->
|
||||
+------------+
|
||||
| Op1 | <- Ptr
|
||||
|------------| +--------------+
|
||||
| Op2 | | Op2 MOD Op1 |
|
||||
|------------| |--------------|
|
||||
*)
|
||||
|
||||
PROCEDURE ModFloor ;
|
||||
|
||||
|
||||
(*
|
||||
DivTrunc - divides the top two elements on the stack.
|
||||
|
||||
The Stack:
|
||||
|
||||
Entry Exit
|
||||
|
||||
Ptr ->
|
||||
+------------+
|
||||
| Op1 | <- Ptr
|
||||
|------------| +--------------+
|
||||
| Op2 | | Op2 DIV Op1 |
|
||||
|------------| |--------------|
|
||||
*)
|
||||
|
||||
PROCEDURE DivTrunc ;
|
||||
|
||||
|
||||
(*
|
||||
ModTrunc - modulus of the top two elements on the stack.
|
||||
|
||||
The Stack:
|
||||
|
||||
Entry Exit
|
||||
|
||||
Ptr ->
|
||||
+------------+
|
||||
| Op1 | <- Ptr
|
||||
|------------| +--------------+
|
||||
| Op2 | | Op2 MOD Op1 |
|
||||
|------------| |--------------|
|
||||
*)
|
||||
|
||||
PROCEDURE ModTrunc ;
|
||||
|
||||
|
||||
(*
|
||||
Equ - returns true if the top two elements on the stack
|
||||
are identical.
|
||||
|
||||
The Stack:
|
||||
|
||||
Entry Exit
|
||||
|
||||
Ptr ->
|
||||
+------------+
|
||||
| Op1 |
|
||||
|------------|
|
||||
| Op2 |
|
||||
|------------| Empty
|
||||
|
||||
RETURN( Op2 = Op1 )
|
||||
*)
|
||||
|
||||
PROCEDURE Equ (tokenno: CARDINAL) : BOOLEAN ;
|
||||
|
||||
|
||||
(*
|
||||
NotEqu - returns true if the top two elements on the stack
|
||||
are not identical.
|
||||
|
||||
The Stack:
|
||||
|
||||
Entry Exit
|
||||
|
||||
Ptr ->
|
||||
+------------+
|
||||
| Op1 |
|
||||
|------------|
|
||||
| Op2 |
|
||||
|------------| Empty
|
||||
|
||||
RETURN( Op2 # Op1 )
|
||||
*)
|
||||
|
||||
PROCEDURE NotEqu (tokenno: CARDINAL) : BOOLEAN ;
|
||||
|
||||
|
||||
(*
|
||||
Less - returns true if Op2 < Op1.
|
||||
|
||||
The Stack:
|
||||
|
||||
Entry Exit
|
||||
|
||||
Ptr ->
|
||||
+------------+
|
||||
| Op1 |
|
||||
|------------|
|
||||
| Op2 |
|
||||
|------------| Empty
|
||||
|
||||
RETURN( Op2 < Op1 )
|
||||
*)
|
||||
|
||||
PROCEDURE Less (tokenno: CARDINAL) : BOOLEAN ;
|
||||
|
||||
|
||||
(*
|
||||
Gre - returns true if Op2 > Op1
|
||||
|
||||
The Stack:
|
||||
|
||||
Entry Exit
|
||||
|
||||
Ptr ->
|
||||
+------------+
|
||||
| Op1 |
|
||||
|------------|
|
||||
| Op2 |
|
||||
|------------| Empty
|
||||
|
||||
RETURN( Op2 > Op1 )
|
||||
*)
|
||||
|
||||
PROCEDURE Gre (tokenno: CARDINAL) : BOOLEAN ;
|
||||
|
||||
|
||||
(*
|
||||
LessEqu - returns true if Op2 <= Op1
|
||||
|
||||
The Stack:
|
||||
|
||||
Entry Exit
|
||||
|
||||
Ptr ->
|
||||
+------------+
|
||||
| Op1 |
|
||||
|------------|
|
||||
| Op2 |
|
||||
|------------| Empty
|
||||
|
||||
RETURN( Op2 <= Op1 )
|
||||
*)
|
||||
|
||||
PROCEDURE LessEqu (tokenno: CARDINAL) : BOOLEAN ;
|
||||
|
||||
|
||||
(*
|
||||
GreEqu - returns true if Op2 >= Op1
|
||||
are not identical.
|
||||
|
||||
The Stack:
|
||||
|
||||
Entry Exit
|
||||
|
||||
Ptr ->
|
||||
+------------+
|
||||
| Op1 |
|
||||
|------------|
|
||||
| Op2 |
|
||||
|------------| Empty
|
||||
|
||||
RETURN( Op2 >= Op1 )
|
||||
*)
|
||||
|
||||
PROCEDURE GreEqu (tokenno: CARDINAL) : BOOLEAN ;
|
||||
|
||||
|
||||
(*
|
||||
IsNulSet - returns TRUE if the top element is the nul set constant, {}.
|
||||
*)
|
||||
|
||||
PROCEDURE IsNulSet () : BOOLEAN ;
|
||||
|
||||
|
||||
(*
|
||||
IsGenericNulSet - returns TRUE if the top element is the generic nul set constant, {}.
|
||||
*)
|
||||
|
||||
PROCEDURE IsGenericNulSet () : BOOLEAN ;
|
||||
|
||||
|
||||
(*
|
||||
PushNulSet - pushes an empty set {} onto the ALU stack. The subrange type used
|
||||
to construct the set is defined by, type. If this is NulSym then
|
||||
the set is generic and compatible with all sets.
|
||||
|
||||
The Stack:
|
||||
|
||||
Entry Exit
|
||||
|
||||
<- Ptr
|
||||
+------------+
|
||||
| {} |
|
||||
Ptr -> |------------|
|
||||
|
||||
*)
|
||||
|
||||
PROCEDURE PushNulSet (settype: CARDINAL) ;
|
||||
|
||||
|
||||
(*
|
||||
AddBitRange - adds the range op1..op2 to the underlying set.
|
||||
|
||||
Ptr ->
|
||||
<- Ptr
|
||||
+------------+ +------------+
|
||||
| Set | | Set |
|
||||
|------------| |------------|
|
||||
*)
|
||||
|
||||
PROCEDURE AddBitRange (tokenno: CARDINAL; op1, op2: CARDINAL) ;
|
||||
|
||||
|
||||
(*
|
||||
AddBit - adds the bit op1 to the underlying set. INCL(Set, op1)
|
||||
|
||||
Ptr ->
|
||||
<- Ptr
|
||||
+------------+ +------------+
|
||||
| Set | | Set |
|
||||
|------------| |------------|
|
||||
*)
|
||||
|
||||
PROCEDURE AddBit (tokenno: CARDINAL; op1: CARDINAL) ;
|
||||
|
||||
|
||||
(*
|
||||
SubBit - removes a bit op1 from the underlying set. EXCL(Set, Op1)
|
||||
|
||||
Ptr ->
|
||||
+------------+
|
||||
| Op1 | <- Ptr
|
||||
|------------| +------------+
|
||||
| Set | | Set |
|
||||
|------------| |------------|
|
||||
*)
|
||||
|
||||
PROCEDURE SubBit (tokenno: CARDINAL; op1: CARDINAL) ;
|
||||
|
||||
|
||||
(*
|
||||
SetIn - returns true if the Op1 IN Set
|
||||
|
||||
The Stack:
|
||||
|
||||
Entry Exit
|
||||
|
||||
Ptr ->
|
||||
+------------+
|
||||
| Set |
|
||||
|------------|
|
||||
| Op1 |
|
||||
|------------| Empty
|
||||
|
||||
RETURN( Op1 IN Set )
|
||||
*)
|
||||
|
||||
PROCEDURE SetIn (tokenno: CARDINAL; Op1: CARDINAL) : BOOLEAN ;
|
||||
|
||||
|
||||
(*
|
||||
SetOr - performs an inclusive OR of the top two sets on the stack.
|
||||
|
||||
The Stack:
|
||||
|
||||
Entry Exit
|
||||
|
||||
Ptr ->
|
||||
+------------+
|
||||
| Op1 | <- Ptr
|
||||
|------------| +------------+
|
||||
| Op2 | | Op2 + Op1 |
|
||||
|------------| |------------|
|
||||
|
||||
*)
|
||||
|
||||
PROCEDURE SetOr (tokenno: CARDINAL) ;
|
||||
|
||||
|
||||
(*
|
||||
SetAnd - performs a set AND the top two sets on the stack.
|
||||
|
||||
The Stack:
|
||||
|
||||
Entry Exit
|
||||
|
||||
Ptr ->
|
||||
+------------+
|
||||
| Op1 | <- Ptr
|
||||
|------------| +------------+
|
||||
| Op2 | | Op2 * Op1 |
|
||||
|------------| |------------|
|
||||
*)
|
||||
|
||||
PROCEDURE SetAnd (tokenno: CARDINAL) ;
|
||||
|
||||
|
||||
(*
|
||||
SetDifference - performs a set difference of the top two elements on the stack.
|
||||
For each member in the set
|
||||
if member in Op2 and not member in Op1
|
||||
|
||||
The Stack:
|
||||
|
||||
Entry Exit
|
||||
|
||||
Ptr ->
|
||||
+------------+
|
||||
| Op1 | <- Ptr
|
||||
|------------| +-------------------+
|
||||
| Op2 | | Op2 and (not Op1) |
|
||||
|------------| |-------------------|
|
||||
*)
|
||||
|
||||
PROCEDURE SetDifference (tokenno: CARDINAL) ;
|
||||
|
||||
|
||||
(*
|
||||
SetSymmetricDifference - performs a set difference of the top two sets on the stack.
|
||||
|
||||
The Stack:
|
||||
|
||||
Entry Exit
|
||||
|
||||
Ptr ->
|
||||
+------------+
|
||||
| Op1 | <- Ptr
|
||||
|------------| +------------+
|
||||
| Op2 | | Op2 - Op1 |
|
||||
|------------| |------------|
|
||||
*)
|
||||
|
||||
PROCEDURE SetSymmetricDifference (tokenno: CARDINAL) ;
|
||||
|
||||
|
||||
(*
|
||||
SetNegate - negates the top set on the stack.
|
||||
|
||||
Ptr -> <- Ptr
|
||||
+-----------+ +------------+
|
||||
| Set | | Set |
|
||||
|-----------| |------------|
|
||||
*)
|
||||
|
||||
PROCEDURE SetNegate (tokenno: CARDINAL) ;
|
||||
|
||||
|
||||
(*
|
||||
SetShift - if op1 is positive
|
||||
then
|
||||
result := op2 << op1
|
||||
else
|
||||
result := op2 >> op1
|
||||
fi
|
||||
|
||||
|
||||
The Stack:
|
||||
|
||||
Entry Exit
|
||||
|
||||
Ptr ->
|
||||
+------------+
|
||||
| Op1 | <- Ptr
|
||||
|------------| +------------+
|
||||
| Op2 | | result |
|
||||
|------------| |------------|
|
||||
|
||||
*)
|
||||
|
||||
PROCEDURE SetShift (tokenno: CARDINAL) ;
|
||||
|
||||
|
||||
(*
|
||||
SetRotate - if op1 is positive
|
||||
then
|
||||
result := ROTATERIGHT(op2, op1)
|
||||
else
|
||||
result := ROTATELEFT(op2, op1)
|
||||
fi
|
||||
|
||||
|
||||
The Stack:
|
||||
|
||||
Entry Exit
|
||||
|
||||
Ptr ->
|
||||
+------------+
|
||||
| Op1 | <- Ptr
|
||||
|------------| +------------+
|
||||
| Op2 | | result |
|
||||
|------------| |------------|
|
||||
*)
|
||||
|
||||
PROCEDURE SetRotate (tokenno: CARDINAL) ;
|
||||
|
||||
|
||||
(*
|
||||
GetValue - returns and pops the value from the top of stack.
|
||||
*)
|
||||
|
||||
PROCEDURE GetValue (tokenno: CARDINAL) : PtrToValue ;
|
||||
|
||||
|
||||
(*
|
||||
GetRange - returns TRUE if range number, n, exists in the value, v.
|
||||
A non empty set is defined by having 1..N ranges
|
||||
*)
|
||||
|
||||
PROCEDURE GetRange (v: PtrToValue; n: CARDINAL; VAR low, high: CARDINAL) : BOOLEAN ;
|
||||
|
||||
|
||||
(*
|
||||
ConstructSetConstant - builds a struct of integers which represents the
|
||||
set const, sym.
|
||||
*)
|
||||
|
||||
PROCEDURE ConstructSetConstant (tokenno: CARDINAL; v: PtrToValue) : Tree ;
|
||||
|
||||
|
||||
(*
|
||||
BuildRange - returns a integer sized constant which represents the
|
||||
value {e1..e2}.
|
||||
*)
|
||||
|
||||
PROCEDURE BuildRange (tokenno: CARDINAL; e1, e2: Tree) : Tree ;
|
||||
|
||||
|
||||
(*
|
||||
IsConstructorDependants - return TRUE if returned if all
|
||||
q(dependants) of, sym, return TRUE.
|
||||
*)
|
||||
|
||||
PROCEDURE IsConstructorDependants (sym: CARDINAL; q: IsAction) : BOOLEAN ;
|
||||
|
||||
|
||||
(*
|
||||
WalkConstructorDependants - walk the constructor, sym, calling
|
||||
p for each dependant.
|
||||
*)
|
||||
|
||||
PROCEDURE WalkConstructorDependants (sym: CARDINAL; p: WalkAction) ;
|
||||
|
||||
|
||||
(*
|
||||
IsValueAndTreeKnown - returns TRUE if the value is known and the gcc tree
|
||||
is defined.
|
||||
|
||||
The Stack:
|
||||
|
||||
Entry Exit
|
||||
|
||||
Ptr ->
|
||||
+------------+
|
||||
| Op1 | <- Ptr
|
||||
|------------| +------------+
|
||||
*)
|
||||
|
||||
PROCEDURE IsValueAndTreeKnown () : BOOLEAN ;
|
||||
|
||||
|
||||
(*
|
||||
CheckOrResetOverflow - tests to see whether the tree, t, has caused
|
||||
an overflow error and if so it generates an
|
||||
error message.
|
||||
*)
|
||||
|
||||
PROCEDURE CheckOrResetOverflow (tokenno: CARDINAL; t: Tree; check: BOOLEAN) ;
|
||||
|
||||
|
||||
(*
|
||||
AddElements - adds the elements, el BY, n, to the array constant.
|
||||
|
||||
Ptr ->
|
||||
<- Ptr
|
||||
+------------+ +------------+
|
||||
| Array | | Array |
|
||||
|------------| |------------|
|
||||
|
||||
*)
|
||||
|
||||
PROCEDURE AddElements (tokenno: CARDINAL; el, n: CARDINAL) ;
|
||||
|
||||
|
||||
(*
|
||||
AddField - adds the field op1 to the underlying constructor.
|
||||
|
||||
Ptr ->
|
||||
<- Ptr
|
||||
+------------+ +------------+
|
||||
| const | | const |
|
||||
|------------| |------------|
|
||||
|
||||
*)
|
||||
|
||||
PROCEDURE AddField (tokenno: CARDINAL; op1: CARDINAL) ;
|
||||
|
||||
|
||||
(*
|
||||
PushEmptyConstructor - pushes an empty constructor {} onto the ALU stack.
|
||||
This is expected to be filled in by subsequent
|
||||
calls to AddElements, AddRange or AddField.
|
||||
|
||||
The Stack:
|
||||
|
||||
Entry Exit
|
||||
|
||||
<- Ptr
|
||||
+------------+
|
||||
| {} |
|
||||
Ptr -> |------------|
|
||||
|
||||
*)
|
||||
|
||||
PROCEDURE PushEmptyConstructor (constype: CARDINAL) ;
|
||||
|
||||
|
||||
(*
|
||||
PushEmptyArray - pushes an empty array {} onto the ALU stack.
|
||||
This is expected to be filled in by subsequent
|
||||
calls to AddElements.
|
||||
|
||||
The Stack:
|
||||
|
||||
Entry Exit
|
||||
|
||||
<- Ptr
|
||||
+------------+
|
||||
| {} |
|
||||
Ptr -> |------------|
|
||||
|
||||
*)
|
||||
|
||||
PROCEDURE PushEmptyArray (arraytype: CARDINAL) ;
|
||||
|
||||
|
||||
(*
|
||||
PushEmptyRecord - pushes an empty record {} onto the ALU stack.
|
||||
This is expected to be filled in by subsequent
|
||||
calls to AddField.
|
||||
|
||||
The Stack:
|
||||
|
||||
Entry Exit
|
||||
|
||||
<- Ptr
|
||||
+------------+
|
||||
| {} |
|
||||
Ptr -> |------------|
|
||||
|
||||
*)
|
||||
|
||||
PROCEDURE PushEmptyRecord (recordtype: CARDINAL) ;
|
||||
|
||||
|
||||
(*
|
||||
ChangeToConstructor - change the top of stack value to a constructor, type.
|
||||
*)
|
||||
|
||||
PROCEDURE ChangeToConstructor (tokenno: CARDINAL; constype: CARDINAL) ;
|
||||
|
||||
|
||||
(*
|
||||
IsValueConst - returns true if the memory cell indicated by v
|
||||
is only defined by constants. For example
|
||||
no variables are used in the constructor.
|
||||
*)
|
||||
|
||||
PROCEDURE IsValueConst (v: PtrToValue) : BOOLEAN ;
|
||||
|
||||
|
||||
(*
|
||||
PushTypeOfTree - pushes tree, gcc, to the stack and records the
|
||||
front end type.
|
||||
*)
|
||||
|
||||
PROCEDURE PushTypeOfTree (sym: CARDINAL; gcc: Tree) ;
|
||||
|
||||
|
||||
END M2ALU.
|
||||
5282
gcc/m2/gm2-compiler/M2ALU.mod
Normal file
5282
gcc/m2/gm2-compiler/M2ALU.mod
Normal file
File diff suppressed because it is too large
Load Diff
55
gcc/m2/gm2-compiler/M2AsmUtil.def
Normal file
55
gcc/m2/gm2-compiler/M2AsmUtil.def
Normal file
@@ -0,0 +1,55 @@
|
||||
(* M2AsmUtil.def provides asm symbol name conversion.
|
||||
|
||||
Copyright (C) 2001-2022 Free Software Foundation, Inc.
|
||||
Contributed by Gaius Mulley <gaius.mulley@southwales.ac.uk>.
|
||||
|
||||
This file is part of GNU Modula-2.
|
||||
|
||||
GNU Modula-2 is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3, or (at your option)
|
||||
any later version.
|
||||
|
||||
GNU Modula-2 is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU Modula-2; see the file COPYING3. If not see
|
||||
<http://www.gnu.org/licenses/>. *)
|
||||
|
||||
DEFINITION MODULE M2AsmUtil ;
|
||||
|
||||
(*
|
||||
Author : Gaius Mulley
|
||||
Title : M2AsmUtil
|
||||
Date : Thu Feb 1 15:34:08 GMT 1990
|
||||
Description: Provides utilities relating symbols in the SymbolTable
|
||||
to their equivalent representation in ASM format.
|
||||
*)
|
||||
|
||||
FROM DynamicStrings IMPORT String ;
|
||||
FROM NameKey IMPORT Name ;
|
||||
EXPORT QUALIFIED GetFullSymName, GetFullScopeAsmName ;
|
||||
|
||||
|
||||
(*
|
||||
GetFullSymName - returns the NameKey for the symbol name (which also
|
||||
may contain the module name). This is the same as
|
||||
GetAsmName except that it does not have the leading _
|
||||
*)
|
||||
|
||||
PROCEDURE GetFullSymName (sym: CARDINAL) : Name ;
|
||||
|
||||
|
||||
(*
|
||||
GetFullScopeAsmName - returns the fully qualified name for the symbol.
|
||||
This will take the format
|
||||
[DefImpModule|Module]_{InnerModule}_{Procedure}_SymbolName
|
||||
*)
|
||||
|
||||
PROCEDURE GetFullScopeAsmName (sym: CARDINAL) : Name ;
|
||||
|
||||
|
||||
END M2AsmUtil.
|
||||
189
gcc/m2/gm2-compiler/M2AsmUtil.mod
Normal file
189
gcc/m2/gm2-compiler/M2AsmUtil.mod
Normal file
@@ -0,0 +1,189 @@
|
||||
(* M2AsmUtil.mod provides utilities relating symbols in the SymbolTable.
|
||||
|
||||
Copyright (C) 2001-2022 Free Software Foundation, Inc.
|
||||
Contributed by Gaius Mulley <gaius.mulley@southwales.ac.uk>.
|
||||
|
||||
This file is part of GNU Modula-2.
|
||||
|
||||
GNU Modula-2 is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3, or (at your option)
|
||||
any later version.
|
||||
|
||||
GNU Modula-2 is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU Modula-2; see the file COPYING3. If not see
|
||||
<http://www.gnu.org/licenses/>. *)
|
||||
|
||||
IMPLEMENTATION MODULE M2AsmUtil ;
|
||||
|
||||
|
||||
FROM SFIO IMPORT WriteS ;
|
||||
FROM FIO IMPORT StdOut ;
|
||||
FROM DynamicStrings IMPORT String, string, ConCat, KillString, InitString, Mark, InitStringCharStar, ConCatChar ;
|
||||
FROM StdIO IMPORT Write ;
|
||||
FROM StrIO IMPORT WriteString ;
|
||||
FROM NameKey IMPORT WriteKey, GetKey, MakeKey, makekey, KeyToCharStar ;
|
||||
FROM M2Options IMPORT WholeProgram ;
|
||||
|
||||
FROM SymbolTable IMPORT NulSym,
|
||||
GetSymName,
|
||||
GetScope,
|
||||
GetBaseModule,
|
||||
IsInnerModule,
|
||||
IsVar,
|
||||
IsProcedure,
|
||||
IsModule,
|
||||
IsDefImp,
|
||||
IsExportQualified,
|
||||
IsExported, IsPublic, IsExtern, IsMonoName,
|
||||
IsDefinitionForC ;
|
||||
|
||||
FROM M2Error IMPORT InternalError ;
|
||||
FROM m2configure IMPORT UseUnderscoreForC ;
|
||||
|
||||
|
||||
(*
|
||||
StringToKey - returns a Name, from a string and destroys the string.
|
||||
*)
|
||||
|
||||
PROCEDURE StringToKey (s: String) : Name ;
|
||||
VAR
|
||||
k: Name ;
|
||||
BEGIN
|
||||
k := makekey (string (s)) ;
|
||||
s := KillString (s) ;
|
||||
RETURN k
|
||||
END StringToKey ;
|
||||
|
||||
|
||||
(*
|
||||
GetFullScopeAsmName - returns the fully qualified name for the symbol.
|
||||
This will take the format
|
||||
[DefImpModule|Module]_{InnerModule}_{Procedure}_SymbolName
|
||||
*)
|
||||
|
||||
PROCEDURE GetFullScopeAsmName (sym: CARDINAL) : Name ;
|
||||
VAR
|
||||
leader: String ;
|
||||
scope : CARDINAL ;
|
||||
BEGIN
|
||||
scope := GetScope (sym) ;
|
||||
IF UseUnderscoreForC
|
||||
THEN
|
||||
leader := InitString ('_')
|
||||
ELSE
|
||||
leader := InitString ('')
|
||||
END ;
|
||||
IF IsProcedure (sym) AND IsMonoName (sym)
|
||||
THEN
|
||||
RETURN StringToKey (ConCat (leader, InitStringCharStar (KeyToCharStar (GetSymName (sym)))))
|
||||
|
||||
ELSE
|
||||
RETURN StringToKey (ConCat (GetFullScopePrefix (leader, scope, sym),
|
||||
InitStringCharStar (KeyToCharStar (GetSymName (sym)))))
|
||||
END
|
||||
END GetFullScopeAsmName ;
|
||||
|
||||
|
||||
(*
|
||||
GetFullSymName - returns the NameKey for the symbol name (which also
|
||||
may contain the module name).
|
||||
*)
|
||||
|
||||
PROCEDURE GetFullSymName (sym: CARDINAL) : Name ;
|
||||
VAR
|
||||
module: String ;
|
||||
scope : CARDINAL ;
|
||||
BEGIN
|
||||
IF IsProcedure (sym) AND IsMonoName (sym)
|
||||
THEN
|
||||
RETURN GetSymName (sym)
|
||||
ELSE
|
||||
scope := GetScope (sym) ;
|
||||
module := GetModulePrefix (InitString (''), sym, scope) ;
|
||||
RETURN StringToKey (ConCat (module, InitStringCharStar (KeyToCharStar (GetSymName (sym)))))
|
||||
END
|
||||
END GetFullSymName ;
|
||||
|
||||
|
||||
(*
|
||||
SymNeedsModulePrefix -
|
||||
*)
|
||||
|
||||
PROCEDURE SymNeedsModulePrefix (sym, mod: CARDINAL) : BOOLEAN ;
|
||||
BEGIN
|
||||
IF IsDefImp(mod)
|
||||
THEN
|
||||
IF WholeProgram
|
||||
THEN
|
||||
IF NOT IsDefinitionForC(mod)
|
||||
THEN
|
||||
RETURN( TRUE )
|
||||
END
|
||||
ELSIF IsExportQualified(sym)
|
||||
THEN
|
||||
RETURN( TRUE )
|
||||
END
|
||||
ELSIF IsModule(mod)
|
||||
THEN
|
||||
RETURN( WholeProgram )
|
||||
END ;
|
||||
RETURN( FALSE )
|
||||
END SymNeedsModulePrefix ;
|
||||
|
||||
|
||||
(*
|
||||
GetModulePrefix - returns a String containing the module prefix
|
||||
for module, ModSym, providing symbol, Sym, is exported.
|
||||
Name is marked if it is appended onto the new string.
|
||||
*)
|
||||
|
||||
PROCEDURE GetModulePrefix (Name: String; Sym, ModSym: CARDINAL) : String ;
|
||||
BEGIN
|
||||
IF (ModSym#NulSym) AND (ModSym#GetBaseModule())
|
||||
THEN
|
||||
IF IsInnerModule(Sym) OR IsInnerModule(ModSym)
|
||||
THEN
|
||||
RETURN( ConCat(ConCatChar(InitStringCharStar(KeyToCharStar(GetSymName(ModSym))), '_'),
|
||||
GetModulePrefix(Name, ModSym, GetScope(ModSym))) )
|
||||
ELSIF SymNeedsModulePrefix(Sym, ModSym)
|
||||
THEN
|
||||
RETURN( ConCatChar(ConCat(InitStringCharStar(KeyToCharStar(GetSymName(ModSym))), Mark(Name)), '_') )
|
||||
END
|
||||
END ;
|
||||
RETURN( Name )
|
||||
END GetModulePrefix ;
|
||||
|
||||
|
||||
(*
|
||||
GetFullScopePrefix - returns a String containing the full scope prefix
|
||||
for symbol, Sym. It honours IsExportQualified.
|
||||
Name is marked if it is appended onto the new string.
|
||||
*)
|
||||
|
||||
PROCEDURE GetFullScopePrefix (Name: String; Scope, Sym: CARDINAL) : String ;
|
||||
BEGIN
|
||||
IF Sym#NulSym
|
||||
THEN
|
||||
IF IsInnerModule(Scope)
|
||||
THEN
|
||||
RETURN( ConCat(ConCatChar(InitStringCharStar(KeyToCharStar(GetSymName(Scope))), '_'),
|
||||
GetFullScopePrefix(Name, GetScope(Scope), Sym)) )
|
||||
ELSIF IsDefImp(Scope) AND IsExportQualified(Sym)
|
||||
THEN
|
||||
RETURN( ConCatChar(ConCat(InitStringCharStar(KeyToCharStar(GetSymName(Scope))), Mark(Name)), '_') )
|
||||
ELSIF IsProcedure(Scope)
|
||||
THEN
|
||||
RETURN( ConCatChar(ConCat(InitStringCharStar(KeyToCharStar(GetSymName(Scope))), Mark(Name)), '_') )
|
||||
END
|
||||
END ;
|
||||
RETURN( Name )
|
||||
END GetFullScopePrefix ;
|
||||
|
||||
|
||||
END M2AsmUtil.
|
||||
415
gcc/m2/gm2-compiler/M2Base.def
Normal file
415
gcc/m2/gm2-compiler/M2Base.def
Normal file
@@ -0,0 +1,415 @@
|
||||
(* M2Base.def provides a mechanism to check fundamental types.
|
||||
|
||||
Copyright (C) 2001-2022 Free Software Foundation, Inc.
|
||||
Contributed by Gaius Mulley <gaius.mulley@southwales.ac.uk>.
|
||||
|
||||
This file is part of GNU Modula-2.
|
||||
|
||||
GNU Modula-2 is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3, or (at your option)
|
||||
any later version.
|
||||
|
||||
GNU Modula-2 is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU Modula-2; see the file COPYING3. If not see
|
||||
<http://www.gnu.org/licenses/>. *)
|
||||
|
||||
DEFINITION MODULE M2Base ;
|
||||
|
||||
(*
|
||||
Author : Gaius Mulley
|
||||
Title : M2Base
|
||||
Date : 22/5/87
|
||||
Description: Implements the default Base Types and Base
|
||||
procedures in the Modula-2 compiler.
|
||||
*)
|
||||
|
||||
FROM NameKey IMPORT Name ;
|
||||
FROM m2linemap IMPORT location_t ;
|
||||
|
||||
EXPORT QUALIFIED Nil, (* Base constants *)
|
||||
Cardinal, (* Base types *)
|
||||
Integer,
|
||||
Boolean,
|
||||
True, False,
|
||||
Char,
|
||||
Proc,
|
||||
LongInt, LongCard,
|
||||
ShortInt, ShortCard,
|
||||
ZType, RType, CType,
|
||||
Real,
|
||||
LongReal, ShortReal,
|
||||
Complex,
|
||||
LongComplex,
|
||||
ShortComplex,
|
||||
High, IsOrd, (* Base functions *)
|
||||
LengthS,
|
||||
Convert,
|
||||
Re, Im, Cmplx,
|
||||
Cap, Abs, Odd,
|
||||
Chr, Val,
|
||||
IsTrunc, IsFloat,
|
||||
IsInt,
|
||||
Min, Max,
|
||||
New, Dispose, (* Base procedures *)
|
||||
Inc, Dec,
|
||||
Incl, Excl,
|
||||
IsPseudoBaseFunction, (* Manipulation procedures *)
|
||||
IsPseudoBaseProcedure, (* Manipulation procedures *)
|
||||
IsBaseType,
|
||||
GetBaseTypeMinMax,
|
||||
InitBase,
|
||||
CannotCheckTypeInPass3,
|
||||
CheckExpressionCompatible,
|
||||
CheckAssignmentCompatible,
|
||||
CheckParameterCompatible,
|
||||
IsAssignmentCompatible,
|
||||
IsExpressionCompatible,
|
||||
IsParameterCompatible,
|
||||
IsComparisonCompatible,
|
||||
IsValidParameter,
|
||||
AssignmentRequiresWarning,
|
||||
IsMathType,
|
||||
IsRealType,
|
||||
IsOrdinalType,
|
||||
IsComplexType,
|
||||
GetCmplxReturnType,
|
||||
ComplexToScalar,
|
||||
ScalarToComplex,
|
||||
MixTypes, NegateType,
|
||||
TemplateProcedure,
|
||||
ActivationPointer,
|
||||
IsNeededAtRunTime,
|
||||
ExceptionAssign,
|
||||
ExceptionReturn,
|
||||
ExceptionInc,
|
||||
ExceptionDec,
|
||||
ExceptionIncl,
|
||||
ExceptionExcl,
|
||||
ExceptionShift,
|
||||
ExceptionRotate,
|
||||
ExceptionStaticArray,
|
||||
ExceptionDynamicArray,
|
||||
ExceptionForLoopBegin,
|
||||
ExceptionForLoopTo,
|
||||
ExceptionForLoopEnd,
|
||||
ExceptionPointerNil,
|
||||
ExceptionNoReturn,
|
||||
ExceptionCase,
|
||||
ExceptionNonPosDiv,
|
||||
ExceptionNonPosMod,
|
||||
ExceptionZeroDiv,
|
||||
ExceptionZeroRem,
|
||||
ExceptionWholeValue,
|
||||
ExceptionRealValue,
|
||||
ExceptionParameterBounds,
|
||||
ExceptionNo ;
|
||||
|
||||
|
||||
VAR
|
||||
TemplateProcedure,
|
||||
ActivationPointer,
|
||||
|
||||
Nil,
|
||||
Cardinal, Integer,
|
||||
Boolean, True, False,
|
||||
Char, Proc,
|
||||
LongInt, LongCard,
|
||||
ShortInt, ShortCard,
|
||||
ZType, RType, CType,
|
||||
Real,
|
||||
LongReal, ShortReal,
|
||||
Complex, LongComplex,
|
||||
ShortComplex,
|
||||
Unbounded,
|
||||
High, LengthS,
|
||||
Cap, Abs, Odd,
|
||||
Convert, Val,
|
||||
Chr,
|
||||
Re, Im, Cmplx,
|
||||
Min, Max,
|
||||
New, Dispose,
|
||||
Inc, Dec,
|
||||
Incl, Excl,
|
||||
ExceptionAssign,
|
||||
ExceptionReturn,
|
||||
ExceptionInc,
|
||||
ExceptionDec,
|
||||
ExceptionIncl,
|
||||
ExceptionExcl,
|
||||
ExceptionShift,
|
||||
ExceptionRotate,
|
||||
ExceptionStaticArray,
|
||||
ExceptionDynamicArray,
|
||||
ExceptionForLoopBegin,
|
||||
ExceptionForLoopTo,
|
||||
ExceptionForLoopEnd,
|
||||
ExceptionPointerNil,
|
||||
ExceptionNoReturn,
|
||||
ExceptionCase,
|
||||
ExceptionNonPosDiv,
|
||||
ExceptionNonPosMod,
|
||||
ExceptionZeroDiv,
|
||||
ExceptionZeroRem,
|
||||
ExceptionWholeValue,
|
||||
ExceptionRealValue,
|
||||
ExceptionParameterBounds,
|
||||
ExceptionNo : CARDINAL ;
|
||||
|
||||
|
||||
(*
|
||||
InitBase - initializes the base types and functions
|
||||
used in the Modula-2 compiler.
|
||||
*)
|
||||
|
||||
PROCEDURE InitBase (location: location_t; VAR sym: CARDINAL) ;
|
||||
|
||||
|
||||
(*
|
||||
GetBaseTypeMinMax - returns the minimum and maximum values for a
|
||||
given base type. This procedure should only
|
||||
be called if the type is NOT a subrange.
|
||||
*)
|
||||
|
||||
PROCEDURE GetBaseTypeMinMax (type: CARDINAL; VAR min, max: CARDINAL) ;
|
||||
|
||||
|
||||
(*
|
||||
IsPseudoBaseFunction - returns true if Sym is a Base function.
|
||||
*)
|
||||
|
||||
PROCEDURE IsPseudoBaseFunction (Sym: CARDINAL) : BOOLEAN ;
|
||||
|
||||
|
||||
(*
|
||||
IsPseudoBaseProcedure - returns true if Sym is a Base procedure.
|
||||
*)
|
||||
|
||||
PROCEDURE IsPseudoBaseProcedure (Sym: CARDINAL) : BOOLEAN ;
|
||||
|
||||
|
||||
(*
|
||||
IsNeededAtRunTime - returns TRUE if procedure, sym, is a
|
||||
runtime procedure. Ie a procedure which is
|
||||
not a pseudo procedure and which is implemented
|
||||
in M2RTS or SYSTEM and also exported.
|
||||
*)
|
||||
|
||||
PROCEDURE IsNeededAtRunTime (tok: CARDINAL; sym: CARDINAL) : BOOLEAN ;
|
||||
|
||||
|
||||
(*
|
||||
IsBaseType - returns TRUE if Sym is a Base type.
|
||||
*)
|
||||
|
||||
PROCEDURE IsBaseType (Sym: CARDINAL) : BOOLEAN ;
|
||||
|
||||
|
||||
(*
|
||||
IsOrdinalType - returns TRUE if, sym, is an ordinal type.
|
||||
An ordinal type is defined as:
|
||||
a base type which contains whole numbers or
|
||||
a subrange type or an enumeration type.
|
||||
*)
|
||||
|
||||
PROCEDURE IsOrdinalType (Sym: CARDINAL) : BOOLEAN ;
|
||||
|
||||
|
||||
(*
|
||||
IsOrd - returns TRUE if, sym, is ORD or its typed counterparts
|
||||
ORDL, ORDS.
|
||||
*)
|
||||
|
||||
PROCEDURE IsOrd (sym: CARDINAL) : BOOLEAN ;
|
||||
|
||||
|
||||
(*
|
||||
IsTrunc - returns TRUE if, sym, is TRUNC or its typed counterparts
|
||||
TRUNCL, TRUNCS.
|
||||
*)
|
||||
|
||||
PROCEDURE IsTrunc (sym: CARDINAL) : BOOLEAN ;
|
||||
|
||||
|
||||
(*
|
||||
IsFloat - returns TRUE if, sym, is FLOAT or its typed counterparts
|
||||
FLOATL, FLOATS.
|
||||
*)
|
||||
|
||||
PROCEDURE IsFloat (sym: CARDINAL) : BOOLEAN ;
|
||||
|
||||
|
||||
(*
|
||||
IsInt - returns TRUE if, sym, is INT or its typed counterparts
|
||||
INTL, INTS.
|
||||
*)
|
||||
|
||||
PROCEDURE IsInt (sym: CARDINAL) : BOOLEAN ;
|
||||
|
||||
|
||||
(*
|
||||
AssignmentRequiresWarning - returns TRUE if t1 and t2 can be used during
|
||||
an assignment, but should generate a warning.
|
||||
For example in PIM we can assign ADDRESS
|
||||
and WORD providing they are both the
|
||||
same size.
|
||||
*)
|
||||
|
||||
PROCEDURE AssignmentRequiresWarning (t1, t2: CARDINAL) : BOOLEAN ;
|
||||
|
||||
|
||||
(*
|
||||
IsAssignmentCompatible - returns TRUE if t1 and t2 are assignment
|
||||
compatible.
|
||||
*)
|
||||
|
||||
PROCEDURE IsAssignmentCompatible (t1, t2: CARDINAL) : BOOLEAN ;
|
||||
|
||||
|
||||
(*
|
||||
IsExpressionCompatible - returns TRUE if t1 and t2 are expression
|
||||
compatible.
|
||||
*)
|
||||
|
||||
PROCEDURE IsExpressionCompatible (t1, t2: CARDINAL) : BOOLEAN ;
|
||||
|
||||
|
||||
(*
|
||||
IsParameterCompatible - returns TRUE if types t1 and t2 are parameter
|
||||
compatible.
|
||||
*)
|
||||
|
||||
PROCEDURE IsParameterCompatible (t1, t2: CARDINAL) : BOOLEAN ;
|
||||
|
||||
|
||||
(*
|
||||
IsComparisonCompatible - returns TRUE if t1 and t2 are comparison
|
||||
compatible. PIM allows INTEGER and ADDRESS within
|
||||
expressions but we warn against their comparison.
|
||||
*)
|
||||
|
||||
PROCEDURE IsComparisonCompatible (t1, t2: CARDINAL) : BOOLEAN ;
|
||||
|
||||
|
||||
(*
|
||||
IsValidParameter - returns TRUE if an, actual, parameter can be passed
|
||||
to the, formal, parameter. This differs from
|
||||
IsParameterCompatible as this procedure includes checks
|
||||
for unbounded formal parameters, var parameters and
|
||||
constant actual parameters.
|
||||
*)
|
||||
|
||||
PROCEDURE IsValidParameter (formal, actual: CARDINAL) : BOOLEAN ;
|
||||
|
||||
|
||||
(*
|
||||
CheckExpressionCompatible - returns if t1 and t2 are compatible types for
|
||||
+, -, *, DIV, >, <, =, etc.
|
||||
If t1 and t2 are not compatible then an error
|
||||
message is displayed.
|
||||
*)
|
||||
|
||||
PROCEDURE CheckExpressionCompatible (tok: CARDINAL;
|
||||
left, right: CARDINAL) ;
|
||||
|
||||
|
||||
(*
|
||||
CheckAssignmentCompatible - returns if t1 and t2 are compatible types for
|
||||
:=, =, #.
|
||||
If t1 and t2 are not compatible then an error
|
||||
message is displayed.
|
||||
*)
|
||||
|
||||
PROCEDURE CheckAssignmentCompatible (tok: CARDINAL;
|
||||
left, right: CARDINAL) ;
|
||||
|
||||
|
||||
(*
|
||||
CheckParameterCompatible - checks to see if types, t1, and, t2, are
|
||||
compatible for parameter passing.
|
||||
*)
|
||||
|
||||
PROCEDURE CheckParameterCompatible (tok: CARDINAL;
|
||||
t1, t2: CARDINAL) ;
|
||||
|
||||
|
||||
(*
|
||||
CannotCheckTypeInPass3 - returns TRUE if we are unable to check the
|
||||
type of, e, in pass 3.
|
||||
*)
|
||||
|
||||
PROCEDURE CannotCheckTypeInPass3 (e: CARDINAL) : BOOLEAN ;
|
||||
|
||||
|
||||
(*
|
||||
MixTypes - returns the type symbol that corresponds to the types t1 and t2.
|
||||
NearTok is used to identify the source position if a type
|
||||
incompatability occurs.
|
||||
*)
|
||||
|
||||
PROCEDURE MixTypes (t1, t2: CARDINAL; NearTok: CARDINAL) : CARDINAL ;
|
||||
|
||||
|
||||
(*
|
||||
NegateType - if the type is unsigned then returns the
|
||||
signed equivalent.
|
||||
*)
|
||||
|
||||
PROCEDURE NegateType (type: CARDINAL (* ; sympos: CARDINAL *) ) : CARDINAL ;
|
||||
|
||||
|
||||
(*
|
||||
IsMathType - returns TRUE if the type is a mathematical type.
|
||||
A mathematical type has a range larger than INTEGER.
|
||||
(Typically REAL/LONGREAL/LONGINT)
|
||||
*)
|
||||
|
||||
PROCEDURE IsMathType (type: CARDINAL) : BOOLEAN ;
|
||||
|
||||
|
||||
(*
|
||||
IsRealType - returns TRUE if, t, is a real type.
|
||||
*)
|
||||
|
||||
PROCEDURE IsRealType (t: CARDINAL) : BOOLEAN ;
|
||||
|
||||
|
||||
(*
|
||||
IsComplexType - returns TRUE if, sym, is COMPLEX,
|
||||
LONGCOMPLEX or SHORTCOMPLEX.
|
||||
*)
|
||||
|
||||
PROCEDURE IsComplexType (sym: CARDINAL) : BOOLEAN ;
|
||||
|
||||
|
||||
(*
|
||||
ComplexToScalar - returns the scalar (or base type) of the complex type, sym.
|
||||
*)
|
||||
|
||||
PROCEDURE ComplexToScalar (sym: CARDINAL) : CARDINAL ;
|
||||
|
||||
|
||||
(*
|
||||
ScalarToComplex - given a real type, t, return the equivalent complex type.
|
||||
*)
|
||||
|
||||
PROCEDURE ScalarToComplex (sym: CARDINAL) : CARDINAL ;
|
||||
|
||||
|
||||
(*
|
||||
GetCmplxReturnType - this code implements the table given in the
|
||||
ISO standard Page 293 with an addition for
|
||||
SHORTCOMPLEX and the fixed sized COMPLEX
|
||||
types found in the GNU Modula-2 SYSTEM
|
||||
Module.
|
||||
*)
|
||||
|
||||
PROCEDURE GetCmplxReturnType (t1, t2: CARDINAL) : CARDINAL ;
|
||||
|
||||
|
||||
END M2Base.
|
||||
2761
gcc/m2/gm2-compiler/M2Base.mod
Normal file
2761
gcc/m2/gm2-compiler/M2Base.mod
Normal file
File diff suppressed because it is too large
Load Diff
87
gcc/m2/gm2-compiler/M2BasicBlock.def
Normal file
87
gcc/m2/gm2-compiler/M2BasicBlock.def
Normal file
@@ -0,0 +1,87 @@
|
||||
(* M2BasicBlock.def converts a scope block into a list of basic blocks.
|
||||
|
||||
Copyright (C) 2001-2022 Free Software Foundation, Inc.
|
||||
Contributed by Gaius Mulley <gaius.mulley@southwales.ac.uk>.
|
||||
|
||||
This file is part of GNU Modula-2.
|
||||
|
||||
GNU Modula-2 is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3, or (at your option)
|
||||
any later version.
|
||||
|
||||
GNU Modula-2 is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU Modula-2; see the file COPYING3. If not see
|
||||
<http://www.gnu.org/licenses/>. *)
|
||||
|
||||
DEFINITION MODULE M2BasicBlock ;
|
||||
|
||||
(*
|
||||
Title : M2BasicBlock
|
||||
Author : Gaius Mulley
|
||||
Date : 20/8/2003
|
||||
System : GNU Modula-2
|
||||
Description: Converts a scope block into a list of basic blocks.
|
||||
The basic blocks are either converted back into quadruples
|
||||
or alternatively translated into GCC trees.
|
||||
*)
|
||||
|
||||
FROM M2Scope IMPORT ScopeBlock ;
|
||||
EXPORT QUALIFIED BasicBlock, BasicBlockProc,
|
||||
InitBasicBlocks, InitBasicBlocksFromRange,
|
||||
KillBasicBlocks, FreeBasicBlocks,
|
||||
ForeachBasicBlockDo ;
|
||||
|
||||
|
||||
TYPE
|
||||
BasicBlock ;
|
||||
BasicBlockProc = PROCEDURE (CARDINAL, CARDINAL) ;
|
||||
|
||||
|
||||
(*
|
||||
InitBasicBlocks - converts a list of quadruples as defined by
|
||||
scope blocks into a set of basic blocks.
|
||||
All quadruples within this list which are not
|
||||
reachable are removed.
|
||||
*)
|
||||
|
||||
PROCEDURE InitBasicBlocks (sb: ScopeBlock) : BasicBlock ;
|
||||
|
||||
|
||||
(*
|
||||
InitBasicBlocksFromRange - converts a list of quadruples as defined by
|
||||
start..end.
|
||||
All quadruples within this list which are not
|
||||
reachable are removed.
|
||||
*)
|
||||
|
||||
PROCEDURE InitBasicBlocksFromRange (start, end: CARDINAL) : BasicBlock ;
|
||||
|
||||
|
||||
(*
|
||||
KillBasicBlocks - destroys the list of Basic Blocks and assigns bb to NIL.
|
||||
*)
|
||||
|
||||
PROCEDURE KillBasicBlocks (VAR bb: BasicBlock) ;
|
||||
|
||||
|
||||
(*
|
||||
FreeBasicBlocks - destroys the list of Basic Blocks.
|
||||
*)
|
||||
|
||||
PROCEDURE FreeBasicBlocks (bb: BasicBlock) ;
|
||||
|
||||
|
||||
(*
|
||||
ForeachBasicBlockDo - for each basic block call procedure, p.
|
||||
*)
|
||||
|
||||
PROCEDURE ForeachBasicBlockDo (bb: BasicBlock; p: BasicBlockProc) ;
|
||||
|
||||
|
||||
END M2BasicBlock.
|
||||
355
gcc/m2/gm2-compiler/M2BasicBlock.mod
Normal file
355
gcc/m2/gm2-compiler/M2BasicBlock.mod
Normal file
@@ -0,0 +1,355 @@
|
||||
(* M2BasicBlock.mod converts a scope block into a list of basic blocks.
|
||||
|
||||
Copyright (C) 2001-2022 Free Software Foundation, Inc.
|
||||
Contributed by Gaius Mulley <gaius.mulley@southwales.ac.uk>.
|
||||
|
||||
This file is part of GNU Modula-2.
|
||||
|
||||
GNU Modula-2 is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3, or (at your option)
|
||||
any later version.
|
||||
|
||||
GNU Modula-2 is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU Modula-2; see the file COPYING3. If not see
|
||||
<http://www.gnu.org/licenses/>. *)
|
||||
|
||||
IMPLEMENTATION MODULE M2BasicBlock ;
|
||||
|
||||
|
||||
FROM Storage IMPORT ALLOCATE, DEALLOCATE ;
|
||||
FROM StrIO IMPORT WriteString, WriteLn ;
|
||||
FROM NumberIO IMPORT WriteCard ;
|
||||
FROM M2Debug IMPORT Assert ;
|
||||
FROM M2Options IMPORT OptimizeBasicBlock ;
|
||||
|
||||
FROM M2Quads IMPORT IsReferenced, IsConditional, IsUnConditional, IsCall,
|
||||
IsReturn, IsNewLocalVar, IsKillLocalVar,
|
||||
IsCatchBegin, IsCatchEnd,
|
||||
IsInitStart, IsInitEnd, IsFinallyStart, IsFinallyEnd,
|
||||
IsInitialisingConst,
|
||||
IsPseudoQuad, IsDefOrModFile,
|
||||
GetNextQuad, GetQuad, QuadOperator,
|
||||
SubQuad ;
|
||||
|
||||
FROM M2Scope IMPORT ScopeBlock, ForeachScopeBlockDo ;
|
||||
FROM M2GenGCC IMPORT ConvertQuadsToTree ;
|
||||
|
||||
|
||||
TYPE
|
||||
BasicBlock = POINTER TO RECORD
|
||||
StartQuad : CARDINAL ; (* First Quad in Basic Block *)
|
||||
EndQuad : CARDINAL ; (* End Quad in Basic Block *)
|
||||
Right : BasicBlock ;
|
||||
(* Last Basic Block in list *)
|
||||
Left : BasicBlock ;
|
||||
END ;
|
||||
|
||||
VAR
|
||||
FreeList : BasicBlock ; (* Free list of Basic Blocks *)
|
||||
HeadOfBasicBlock: BasicBlock ;
|
||||
|
||||
|
||||
(*
|
||||
InitBasicBlocks - converts a list of quadruples as defined by
|
||||
scope blocks into a set of basic blocks.
|
||||
All quadruples within this list which are not
|
||||
reachable are removed.
|
||||
*)
|
||||
|
||||
PROCEDURE InitBasicBlocks (sb: ScopeBlock) : BasicBlock ;
|
||||
BEGIN
|
||||
HeadOfBasicBlock := NIL ;
|
||||
ForeachScopeBlockDo (sb, ConvertQuads2BasicBlock) ;
|
||||
RETURN HeadOfBasicBlock
|
||||
END InitBasicBlocks ;
|
||||
|
||||
|
||||
(*
|
||||
InitBasicBlocksFromRange - converts a list of quadruples as defined by
|
||||
start..end.
|
||||
All quadruples within this list which are not
|
||||
reachable are removed.
|
||||
*)
|
||||
|
||||
PROCEDURE InitBasicBlocksFromRange (start, end: CARDINAL) : BasicBlock ;
|
||||
BEGIN
|
||||
HeadOfBasicBlock := NIL ;
|
||||
ConvertQuads2BasicBlock(start, end) ;
|
||||
RETURN( HeadOfBasicBlock )
|
||||
END InitBasicBlocksFromRange ;
|
||||
|
||||
|
||||
(*
|
||||
KillBasicBlocks - destroys the list of Basic Blocks.
|
||||
*)
|
||||
|
||||
PROCEDURE KillBasicBlocks (VAR bb: BasicBlock) ;
|
||||
BEGIN
|
||||
FreeBasicBlocks (bb) ;
|
||||
bb := NIL
|
||||
END KillBasicBlocks ;
|
||||
|
||||
|
||||
(*
|
||||
FreeBasicBlocks - destroys the list of Basic Blocks.
|
||||
*)
|
||||
|
||||
PROCEDURE FreeBasicBlocks (bb: BasicBlock) ;
|
||||
VAR
|
||||
b, c: BasicBlock ;
|
||||
BEGIN
|
||||
IF bb#NIL
|
||||
THEN
|
||||
b := bb ;
|
||||
REPEAT
|
||||
c := bb^.Right ;
|
||||
bb^.Right := FreeList ;
|
||||
FreeList := bb ;
|
||||
bb := c
|
||||
UNTIL bb=b
|
||||
END
|
||||
END FreeBasicBlocks ;
|
||||
|
||||
|
||||
(*
|
||||
New - returns a basic block.
|
||||
*)
|
||||
|
||||
PROCEDURE New () : BasicBlock ;
|
||||
VAR
|
||||
b: BasicBlock ;
|
||||
BEGIN
|
||||
IF FreeList=NIL
|
||||
THEN
|
||||
NEW(b)
|
||||
ELSE
|
||||
b := FreeList ;
|
||||
FreeList := FreeList^.Right
|
||||
END ;
|
||||
Assert(b#NIL) ;
|
||||
RETURN( b )
|
||||
END New ;
|
||||
|
||||
|
||||
(*
|
||||
ConvertQuads2BasicBlock - converts a list of quadruples to a list of
|
||||
Basic Blocks.
|
||||
A Basic Block is defined as a list of quadruples
|
||||
which has only has one entry and exit point.
|
||||
*)
|
||||
|
||||
PROCEDURE ConvertQuads2BasicBlock (Start, End: CARDINAL) ;
|
||||
VAR
|
||||
LastQuadDefMod,
|
||||
LastQuadConditional,
|
||||
LastQuadCall,
|
||||
LastQuadReturn : BOOLEAN ;
|
||||
Quad : CARDINAL ;
|
||||
CurrentBB : BasicBlock ;
|
||||
LastBB : BasicBlock ;
|
||||
BEGIN
|
||||
(*
|
||||
Algorithm to perform Basic Block:
|
||||
|
||||
For every quadruple establish a set of leaders.
|
||||
A Leader is defined as a quadruple which is
|
||||
either:
|
||||
|
||||
(i) The first quadruple.
|
||||
(ii) Any quadruple which is the target of a jump or unconditional jump.
|
||||
(iii) Any statement which follows a conditional jump
|
||||
|
||||
For each leader construct a basic block.
|
||||
A Basic Block starts with a leader quadruple and ends with either:
|
||||
|
||||
(i) Another Leader
|
||||
(ii) An unconditional Jump.
|
||||
|
||||
Any quadruples that do not fall into a Basic Block can be thrown away
|
||||
since they will never be executed.
|
||||
*)
|
||||
LastBB := NIL ;
|
||||
CurrentBB := NIL ;
|
||||
Quad := Start ;
|
||||
LastQuadConditional := TRUE ; (* Force Rule (i) *)
|
||||
LastQuadCall := FALSE ;
|
||||
LastQuadReturn := FALSE ;
|
||||
LastQuadDefMod := FALSE ;
|
||||
(* Scan all quadruples *)
|
||||
WHILE (Quad<=End) AND (Quad#0) DO
|
||||
IF LastQuadConditional OR LastQuadCall OR LastQuadReturn OR
|
||||
LastQuadDefMod OR IsReferenced(Quad)
|
||||
THEN
|
||||
(* Rule (ii) *)
|
||||
CurrentBB := New() ; (* Get a new Basic Block *)
|
||||
(* At least one quad in this Basic Block *)
|
||||
StartBB(CurrentBB, Quad) ;
|
||||
EndBB(CurrentBB, Quad)
|
||||
ELSIF CurrentBB#NIL
|
||||
THEN
|
||||
(* We have a Basic Block - therefore add quad to this Block *)
|
||||
EndBB(CurrentBB, Quad)
|
||||
ELSIF IsPseudoQuad(Quad)
|
||||
THEN
|
||||
(* Add Quad to the Last BB since Pseudo Quads - compiler directives *)
|
||||
(* must not be thrown away. *)
|
||||
EndBB(LastBB, Quad)
|
||||
ELSIF IsReturn(Quad) OR IsKillLocalVar(Quad) OR
|
||||
IsCatchEnd(Quad) OR IsCatchBegin(Quad) OR
|
||||
IsInitStart(Quad) OR IsInitEnd(Quad) OR
|
||||
IsFinallyStart(Quad) OR IsFinallyEnd(Quad)
|
||||
THEN
|
||||
(* we must leave these quads alone *)
|
||||
EndBB(LastBB, Quad)
|
||||
ELSIF IsInitialisingConst(Quad)
|
||||
THEN
|
||||
(* we must leave these quads alone *)
|
||||
EndBB(LastBB, Quad)
|
||||
ELSE
|
||||
(* remove this Quad since it will never be reached *)
|
||||
SubQuad(Quad)
|
||||
END ;
|
||||
LastQuadConditional := IsConditional(Quad) ;
|
||||
LastQuadCall := IsCall(Quad) ;
|
||||
LastQuadReturn := IsReturn(Quad) ;
|
||||
LastQuadDefMod := IsDefOrModFile(Quad) ;
|
||||
IF IsUnConditional(Quad)
|
||||
THEN
|
||||
LastBB := CurrentBB ;
|
||||
CurrentBB := NIL
|
||||
END ;
|
||||
Quad := GetNextQuad(Quad)
|
||||
END
|
||||
END ConvertQuads2BasicBlock ;
|
||||
|
||||
|
||||
(*
|
||||
ForeachBasicBlockDo - for each basic block call procedure, p.
|
||||
*)
|
||||
|
||||
PROCEDURE ForeachBasicBlockDo (bb: BasicBlock; p: BasicBlockProc) ;
|
||||
VAR
|
||||
b: BasicBlock ;
|
||||
BEGIN
|
||||
IF bb#NIL
|
||||
THEN
|
||||
b := bb ;
|
||||
REPEAT
|
||||
WITH b^ DO
|
||||
p(StartQuad, EndQuad)
|
||||
END ;
|
||||
b := b^.Right
|
||||
UNTIL b=bb
|
||||
END
|
||||
END ForeachBasicBlockDo ;
|
||||
|
||||
|
||||
(*
|
||||
StartBB - Initially fills a Basic Block, b, with a start quad Quad.
|
||||
The Basic Block is then added to the end of Basic Block list.
|
||||
*)
|
||||
|
||||
PROCEDURE StartBB (b: BasicBlock; Quad: CARDINAL) ;
|
||||
BEGIN
|
||||
WITH b^ DO
|
||||
StartQuad := Quad ;
|
||||
EndQuad := Quad
|
||||
END ;
|
||||
Add(HeadOfBasicBlock, b) (* Add b to the end of the Basic Block list *)
|
||||
END StartBB ;
|
||||
|
||||
|
||||
(*
|
||||
EndBB - Fills a Basic Block, b, with an end quad Quad.
|
||||
*)
|
||||
|
||||
PROCEDURE EndBB (b: BasicBlock; Quad: CARDINAL) ;
|
||||
BEGIN
|
||||
b^.EndQuad := Quad
|
||||
END EndBB ;
|
||||
|
||||
|
||||
(*
|
||||
Add adds a specified element to the end of a queue.
|
||||
*)
|
||||
|
||||
PROCEDURE Add (VAR Head: BasicBlock;
|
||||
b : BasicBlock) ;
|
||||
BEGIN
|
||||
IF Head=NIL
|
||||
THEN
|
||||
Head := b ;
|
||||
b^.Left := b ;
|
||||
b^.Right := b
|
||||
ELSE
|
||||
b^.Right := Head ;
|
||||
b^.Left := Head^.Left ;
|
||||
Head^.Left^.Right := b ;
|
||||
Head^.Left := b
|
||||
END
|
||||
END Add ;
|
||||
|
||||
|
||||
(*
|
||||
Sub deletes an element from the specified queue.
|
||||
*)
|
||||
|
||||
(*
|
||||
PROCEDURE Sub (VAR Head: BasicBlock;
|
||||
b: BasicBlock) ;
|
||||
BEGIN
|
||||
IF (b^.Right=Head) AND (b=Head)
|
||||
THEN
|
||||
Head := NIL
|
||||
ELSE
|
||||
IF Head=b
|
||||
THEN
|
||||
Head := Head^.Right
|
||||
END ;
|
||||
b^.Left^.Right := b^.Right ;
|
||||
b^.Right^.Left := b^.Left
|
||||
END
|
||||
END Sub ;
|
||||
*)
|
||||
|
||||
|
||||
(*
|
||||
DisplayBasicBlocks - displays the basic block data structure.
|
||||
*)
|
||||
|
||||
(*
|
||||
PROCEDURE DisplayBasicBlocks (bb: BasicBlock) ;
|
||||
VAR
|
||||
b: BasicBlock ;
|
||||
BEGIN
|
||||
b := bb ;
|
||||
WriteString('quadruples') ; WriteLn ;
|
||||
IF b#NIL
|
||||
THEN
|
||||
REPEAT
|
||||
DisplayBlock(b) ;
|
||||
b := b^.Right
|
||||
UNTIL b=bb
|
||||
END
|
||||
END DisplayBasicBlocks ;
|
||||
|
||||
|
||||
PROCEDURE DisplayBlock (b: BasicBlock) ;
|
||||
BEGIN
|
||||
WITH b^ DO
|
||||
WriteString(' start ') ; WriteCard(StartQuad, 6) ;
|
||||
WriteString(' end ') ; WriteCard(EndQuad, 6) ;
|
||||
END
|
||||
END DisplayBlock ;
|
||||
*)
|
||||
|
||||
|
||||
BEGIN
|
||||
FreeList := NIL
|
||||
END M2BasicBlock.
|
||||
194
gcc/m2/gm2-compiler/M2Batch.def
Normal file
194
gcc/m2/gm2-compiler/M2Batch.def
Normal file
@@ -0,0 +1,194 @@
|
||||
(* M2Batch.def implements a queue for modules pending compilation.
|
||||
|
||||
Copyright (C) 2001-2022 Free Software Foundation, Inc.
|
||||
Contributed by Gaius Mulley <gaius.mulley@southwales.ac.uk>.
|
||||
|
||||
This file is part of GNU Modula-2.
|
||||
|
||||
GNU Modula-2 is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3, or (at your option)
|
||||
any later version.
|
||||
|
||||
GNU Modula-2 is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU Modula-2; see the file COPYING3. If not see
|
||||
<http://www.gnu.org/licenses/>. *)
|
||||
|
||||
DEFINITION MODULE M2Batch ;
|
||||
|
||||
(*
|
||||
Author : Gaius Mulley
|
||||
Title : M2Batch
|
||||
Date : 29/5/87
|
||||
Description: Implements a queue modules pending compilation.
|
||||
MakeSource enters modules for later compilation.
|
||||
GetSource collects the next module to be compiled.
|
||||
*)
|
||||
|
||||
FROM DynamicStrings IMPORT String ;
|
||||
FROM NameKey IMPORT Name ;
|
||||
EXPORT QUALIFIED MakeDefinitionSource,
|
||||
MakeImplementationSource,
|
||||
MakeProgramSource,
|
||||
GetSource, GetModuleNo, IsModuleKnown,
|
||||
AssociateDefinition, GetDefinitionModuleFile,
|
||||
AssociateModule, GetModuleFile, Get,
|
||||
ForeachSourceModuleDo, IsSourceSeen, IsModuleSeen,
|
||||
LookupModule, LookupOuterModule, DisplayModules ;
|
||||
|
||||
TYPE
|
||||
DoProcedure = PROCEDURE (CARDINAL) ;
|
||||
|
||||
|
||||
(*
|
||||
MakeDefinitionSource - is given a Name, n, which is used to create a Definition
|
||||
module.
|
||||
The Definition Module will be placed onto the
|
||||
compilation pending queue if it has not yet been
|
||||
compiled.
|
||||
If the module has been compiled then no action is
|
||||
taken. The Module Sym is returned.
|
||||
*)
|
||||
|
||||
PROCEDURE MakeDefinitionSource (tok: CARDINAL; n: Name) : CARDINAL ;
|
||||
|
||||
|
||||
(*
|
||||
MakeImplementationSource - is given a Name, n, which is used to create an
|
||||
implementation module.
|
||||
The implementation Module will be placed onto
|
||||
the compilation pending
|
||||
queue if it has not yet been compiled.
|
||||
If the module has been compiled then no
|
||||
action is taken. The Module Sym is returned.
|
||||
*)
|
||||
|
||||
PROCEDURE MakeImplementationSource (tok: CARDINAL; n: Name) : CARDINAL ;
|
||||
|
||||
|
||||
(*
|
||||
MakeProgramSource - is given a Name, n, which is used to create a program module.
|
||||
The program module will be placed onto the compilation
|
||||
pending queue if it has not yet been compiled.
|
||||
If the module has been compiled then no action is taken.
|
||||
The Module Sym is returned.
|
||||
*)
|
||||
|
||||
PROCEDURE MakeProgramSource (tok: CARDINAL; n: Name) : CARDINAL ;
|
||||
|
||||
|
||||
(*
|
||||
GetSource - returns with the symbol Sym of the next module to be compiled.
|
||||
If Sym returns with value NulSym then no module should be
|
||||
compiled.
|
||||
*)
|
||||
|
||||
PROCEDURE GetSource () : CARDINAL ;
|
||||
|
||||
|
||||
(*
|
||||
GetModuleNo - returns with symbol number of the module which was
|
||||
the nth module to be read in Pass 1.
|
||||
The modules are numbered from 1..n
|
||||
*)
|
||||
|
||||
PROCEDURE GetModuleNo (nth: CARDINAL) : CARDINAL ;
|
||||
|
||||
|
||||
(*
|
||||
IsModuleKnown - returns TRUE if the Name, n, matches a module.
|
||||
*)
|
||||
|
||||
PROCEDURE IsModuleKnown (n: Name) : BOOLEAN ;
|
||||
|
||||
|
||||
(*
|
||||
AssociateDefinition - associate the source file, filename, with the definition module,
|
||||
Sym.
|
||||
*)
|
||||
|
||||
PROCEDURE AssociateDefinition (filename: String; Sym: CARDINAL) : String ;
|
||||
|
||||
|
||||
(*
|
||||
GetDefinitionModuleFile - returns the filename associated with the definition module, Sym.
|
||||
It may return a temporary preprocessed file.
|
||||
*)
|
||||
|
||||
PROCEDURE GetDefinitionModuleFile (Sym: CARDINAL) : String ;
|
||||
|
||||
|
||||
(*
|
||||
AssociateModule - associate the source file, filename, with the implementation/program
|
||||
module, Sym.
|
||||
*)
|
||||
|
||||
PROCEDURE AssociateModule (filename: String; Sym: CARDINAL) : String ;
|
||||
|
||||
|
||||
(*
|
||||
GetModuleFile - returns the filename associated with the implementation/program module, Sym.
|
||||
It may return a temporary preprocessed file.
|
||||
*)
|
||||
|
||||
PROCEDURE GetModuleFile (Sym: CARDINAL) : String ;
|
||||
|
||||
|
||||
(*
|
||||
ForeachSourceModuleDo - call each procedure, p, for which there is a known
|
||||
source file.
|
||||
*)
|
||||
|
||||
PROCEDURE ForeachSourceModuleDo (p: DoProcedure) ;
|
||||
|
||||
|
||||
(*
|
||||
IsSourceSeen - returns TRUE if the source for module, sym, has been seen.
|
||||
*)
|
||||
|
||||
PROCEDURE IsSourceSeen (sym: CARDINAL) : BOOLEAN ;
|
||||
|
||||
|
||||
(*
|
||||
IsModuleSeen - returns TRUE if the source for module, name, has been seen.
|
||||
*)
|
||||
|
||||
PROCEDURE IsModuleSeen (n: Name) : BOOLEAN ;
|
||||
|
||||
|
||||
(*
|
||||
LookupModule - looks up a module in the current scope, if a module does not exist
|
||||
then it creates a DefImp module.
|
||||
*)
|
||||
|
||||
PROCEDURE LookupModule (tok: CARDINAL; n: Name) : CARDINAL ;
|
||||
|
||||
|
||||
(*
|
||||
LookupOuterModule - looks up a module in the order of: current scope, then outer scope, finally if a
|
||||
module does not exist then it creates a DefImp module.
|
||||
*)
|
||||
|
||||
PROCEDURE LookupOuterModule (tok: CARDINAL; n: Name) : CARDINAL ;
|
||||
|
||||
|
||||
(*
|
||||
Get - returns the module symbol matching name, n.
|
||||
*)
|
||||
|
||||
PROCEDURE Get (n: Name) : CARDINAL ;
|
||||
|
||||
|
||||
(*
|
||||
DisplayModules - a debugging routine to textually emit the names of modules in the DoneQ.
|
||||
*)
|
||||
|
||||
PROCEDURE DisplayModules ;
|
||||
|
||||
|
||||
END M2Batch.
|
||||
470
gcc/m2/gm2-compiler/M2Batch.mod
Normal file
470
gcc/m2/gm2-compiler/M2Batch.mod
Normal file
@@ -0,0 +1,470 @@
|
||||
(* M2Batch.mod implements a queue for modules pending compilation.
|
||||
|
||||
Copyright (C) 2001-2022 Free Software Foundation, Inc.
|
||||
Contributed by Gaius Mulley <gaius.mulley@southwales.ac.uk>.
|
||||
|
||||
This file is part of GNU Modula-2.
|
||||
|
||||
GNU Modula-2 is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3, or (at your option)
|
||||
any later version.
|
||||
|
||||
GNU Modula-2 is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU Modula-2; see the file COPYING3. If not see
|
||||
<http://www.gnu.org/licenses/>. *)
|
||||
|
||||
IMPLEMENTATION MODULE M2Batch ;
|
||||
|
||||
|
||||
FROM M2Debug IMPORT Assert ;
|
||||
FROM SymbolTable IMPORT MakeModule, MakeDefImp, IsModule, IsDefImp, GetScope, GetLocalSym, GetCurrentScope, GetSym, NulSym ;
|
||||
FROM NameKey IMPORT GetKey, WriteKey ;
|
||||
FROM M2Printf IMPORT printf2 ;
|
||||
FROM M2Error IMPORT InternalError ;
|
||||
FROM M2MetaError IMPORT MetaError1 ;
|
||||
FROM Indexing IMPORT Index, InitIndex, GetIndice, HighIndice, RemoveIndiceFromIndex, IncludeIndiceIntoIndex, InBounds ;
|
||||
FROM Lists IMPORT List, InitList, IncludeItemIntoList, RemoveItemFromList,
|
||||
GetItemFromList, NoOfItemsInList ;
|
||||
FROM Storage IMPORT ALLOCATE ;
|
||||
FROM DynamicStrings IMPORT String ;
|
||||
FROM M2Pass IMPORT IsPass1, IsPass2, IsPass3, IsPassC ;
|
||||
|
||||
|
||||
TYPE
|
||||
Module = POINTER TO RECORD
|
||||
SymNo : CARDINAL ;
|
||||
Key : Name ;
|
||||
DefFile,
|
||||
ModFile: String ;
|
||||
END ;
|
||||
|
||||
VAR
|
||||
SeenList : Index ;
|
||||
PendingQueue: List ;
|
||||
|
||||
|
||||
(*
|
||||
MakeProgramSource - is given a Name, n, which is used to create a program module.
|
||||
The program module will be placed onto the compilation
|
||||
pending queue if it has not yet been compiled.
|
||||
If the module has been compiled then no action is taken.
|
||||
The Module Sym is returned.
|
||||
*)
|
||||
|
||||
PROCEDURE MakeProgramSource (tok: CARDINAL; n: Name) : CARDINAL ;
|
||||
VAR
|
||||
Sym: CARDINAL ;
|
||||
BEGIN
|
||||
Sym := Get (n) ;
|
||||
IF Sym = NulSym
|
||||
THEN
|
||||
Assert ((NOT IsPass1 ()) AND (NOT IsPass2 ()) AND (NOT IsPass3 ()) AND (NOT IsPassC ())) ;
|
||||
(* Neither been compiled or on the Pending Queue *)
|
||||
Sym := MakeModule (tok, n) ;
|
||||
Put (Sym, n) ;
|
||||
Push (Sym)
|
||||
END ;
|
||||
RETURN Sym
|
||||
END MakeProgramSource ;
|
||||
|
||||
|
||||
(*
|
||||
MakeDefinitionSource - is given a Name, n, which is used to create a Definition
|
||||
module.
|
||||
The Definition Module will be placed onto the
|
||||
compilation pending queue if it has not yet been
|
||||
compiled.
|
||||
If the module has been compiled then no action is
|
||||
taken. The Module Sym is returned.
|
||||
*)
|
||||
|
||||
PROCEDURE MakeDefinitionSource (tok: CARDINAL; n: Name) : CARDINAL ;
|
||||
VAR
|
||||
Sym: CARDINAL ;
|
||||
BEGIN
|
||||
Sym := Get (n) ;
|
||||
IF Sym = NulSym
|
||||
THEN
|
||||
Assert ((NOT IsPass1 ()) AND (NOT IsPass2 ()) AND (NOT IsPass3 ()) AND (NOT IsPassC ())) ;
|
||||
(* Neither been compiled or on the Pending Queue *)
|
||||
Sym := MakeDefImp (tok, n) ;
|
||||
Put (Sym, n) ;
|
||||
Push (Sym)
|
||||
END ;
|
||||
RETURN Sym
|
||||
END MakeDefinitionSource ;
|
||||
|
||||
|
||||
(*
|
||||
MakeImplementationSource - is given a Name, n, which is used to create an
|
||||
implementation module.
|
||||
The implementation Module will be placed onto
|
||||
the compilation pending
|
||||
queue if it has not yet been compiled.
|
||||
If the module has been compiled then no
|
||||
action is taken. The Module Sym is returned.
|
||||
*)
|
||||
|
||||
PROCEDURE MakeImplementationSource (tok: CARDINAL; n: Name) : CARDINAL ;
|
||||
VAR
|
||||
Sym: CARDINAL ;
|
||||
BEGIN
|
||||
Sym := Get (n) ;
|
||||
IF Sym = NulSym
|
||||
THEN
|
||||
Assert ((NOT IsPass1 ()) AND (NOT IsPass2 ()) AND (NOT IsPass3 ()) AND (NOT IsPassC ())) ;
|
||||
(* Neither been compiled or on the Pending Queue *)
|
||||
Sym := MakeDefImp (tok, n) ;
|
||||
Put (Sym, n) ;
|
||||
Push (Sym)
|
||||
END ;
|
||||
RETURN Sym
|
||||
END MakeImplementationSource ;
|
||||
|
||||
|
||||
(*
|
||||
GetSource - returns with the symbol Sym of the next module to be compiled.
|
||||
If Sym returns with value 0 then no module should be compiled.
|
||||
*)
|
||||
|
||||
PROCEDURE GetSource () : CARDINAL ;
|
||||
BEGIN
|
||||
RETURN Pop ()
|
||||
END GetSource ;
|
||||
|
||||
|
||||
(*
|
||||
GetModuleNo - returns with symbol number of the nth module read during Pass 1.
|
||||
*)
|
||||
|
||||
PROCEDURE GetModuleNo (nth: CARDINAL) : CARDINAL ;
|
||||
VAR
|
||||
m: Module ;
|
||||
BEGIN
|
||||
Assert (nth#0) ;
|
||||
IF InBounds (SeenList, nth)
|
||||
THEN
|
||||
m := GetIndice (SeenList, nth) ;
|
||||
RETURN m^.SymNo
|
||||
ELSE
|
||||
RETURN NulSym
|
||||
END
|
||||
END GetModuleNo ;
|
||||
|
||||
|
||||
(*
|
||||
IsModuleKnown - returns TRUE if the Name n matches a module.
|
||||
*)
|
||||
|
||||
PROCEDURE IsModuleKnown (n: Name) : BOOLEAN ;
|
||||
BEGIN
|
||||
RETURN Get (n) # NulSym
|
||||
END IsModuleKnown ;
|
||||
|
||||
|
||||
(*
|
||||
Get - returns the module symbol matching name n.
|
||||
*)
|
||||
|
||||
PROCEDURE Get (n: Name) : CARDINAL ;
|
||||
VAR
|
||||
i, no: CARDINAL ;
|
||||
m : Module ;
|
||||
BEGIN
|
||||
i := 1 ;
|
||||
no := HighIndice (SeenList) ;
|
||||
WHILE i <= no DO
|
||||
m := GetIndice (SeenList, i) ;
|
||||
WITH m^ DO
|
||||
IF Key = n
|
||||
THEN
|
||||
RETURN SymNo
|
||||
ELSE
|
||||
INC (i)
|
||||
END
|
||||
END
|
||||
END ;
|
||||
RETURN NulSym
|
||||
END Get ;
|
||||
|
||||
|
||||
PROCEDURE Put (Sym: CARDINAL; n: Name) ;
|
||||
VAR
|
||||
m: Module ;
|
||||
BEGIN
|
||||
NEW (m) ;
|
||||
IncludeIndiceIntoIndex (SeenList, m) ;
|
||||
WITH m^ DO
|
||||
SymNo := Sym ;
|
||||
Key := n ;
|
||||
DefFile := NIL ;
|
||||
ModFile := NIL
|
||||
END
|
||||
END Put ;
|
||||
|
||||
|
||||
PROCEDURE Push (Sym: CARDINAL) ;
|
||||
BEGIN
|
||||
IncludeItemIntoList (PendingQueue, Sym)
|
||||
END Push ;
|
||||
|
||||
|
||||
PROCEDURE Pop () : CARDINAL ;
|
||||
VAR
|
||||
n : CARDINAL ;
|
||||
Sym: CARDINAL ;
|
||||
BEGIN
|
||||
n := NoOfItemsInList (PendingQueue) ;
|
||||
IF n = 0
|
||||
THEN
|
||||
RETURN NulSym
|
||||
ELSE
|
||||
Sym := GetItemFromList (PendingQueue, n) ;
|
||||
RemoveItemFromList (PendingQueue, Sym) ;
|
||||
RETURN Sym
|
||||
END
|
||||
END Pop ;
|
||||
|
||||
|
||||
(*
|
||||
DisplayModules - a debugging routine to textually emit the names of modules in the SeenList.
|
||||
*)
|
||||
|
||||
PROCEDURE DisplayModules ;
|
||||
VAR
|
||||
m : Module ;
|
||||
n, i: CARDINAL ;
|
||||
BEGIN
|
||||
i := 1 ;
|
||||
n := HighIndice (SeenList) ;
|
||||
WHILE i<=n DO
|
||||
m := GetIndice (SeenList, i) ;
|
||||
WITH m^ DO
|
||||
printf2 ('Module %a %d\n', Key, i)
|
||||
END ;
|
||||
INC (i)
|
||||
END
|
||||
END DisplayModules ;
|
||||
|
||||
|
||||
(*
|
||||
AssociateDefinition - associate the source file, filename, with the definition module,
|
||||
Sym.
|
||||
*)
|
||||
|
||||
PROCEDURE AssociateDefinition (filename: String; Sym: CARDINAL) : String ;
|
||||
VAR
|
||||
no, i: CARDINAL ;
|
||||
m : Module ;
|
||||
BEGIN
|
||||
i := 1 ;
|
||||
no := HighIndice (SeenList) ;
|
||||
WHILE i <= no DO
|
||||
m := GetIndice (SeenList, i) ;
|
||||
WITH m^ DO
|
||||
IF SymNo = Sym
|
||||
THEN
|
||||
DefFile := filename ;
|
||||
RETURN filename
|
||||
ELSE
|
||||
INC (i)
|
||||
END
|
||||
END
|
||||
END ;
|
||||
InternalError ('failed to find module sym')
|
||||
END AssociateDefinition ;
|
||||
|
||||
|
||||
(*
|
||||
GetDefinitionModuleFile - returns the filename associated with the definition module, Sym.
|
||||
It may return a temporary preprocessed file.
|
||||
*)
|
||||
|
||||
PROCEDURE GetDefinitionModuleFile (Sym: CARDINAL) : String ;
|
||||
VAR
|
||||
no, i: CARDINAL ;
|
||||
m : Module ;
|
||||
BEGIN
|
||||
i := 1 ;
|
||||
no := HighIndice (SeenList) ;
|
||||
WHILE i <= no DO
|
||||
m := GetIndice (SeenList, i) ;
|
||||
WITH m^ DO
|
||||
IF SymNo = Sym
|
||||
THEN
|
||||
RETURN DefFile
|
||||
ELSE
|
||||
INC (i)
|
||||
END
|
||||
END
|
||||
END ;
|
||||
RETURN NIL
|
||||
END GetDefinitionModuleFile ;
|
||||
|
||||
|
||||
(*
|
||||
AssociateModule - associate the source file, filename, with the implementation/program
|
||||
module, Sym.
|
||||
*)
|
||||
|
||||
PROCEDURE AssociateModule (filename: String; Sym: CARDINAL) : String ;
|
||||
VAR
|
||||
no, i: CARDINAL ;
|
||||
m : Module ;
|
||||
BEGIN
|
||||
i := 1 ;
|
||||
no := HighIndice (SeenList) ;
|
||||
WHILE i<=no DO
|
||||
m := GetIndice (SeenList, i) ;
|
||||
WITH m^ DO
|
||||
IF SymNo = Sym
|
||||
THEN
|
||||
ModFile := filename ;
|
||||
RETURN filename
|
||||
ELSE
|
||||
INC (i)
|
||||
END
|
||||
END
|
||||
END ;
|
||||
InternalError ('failed to find module sym')
|
||||
END AssociateModule ;
|
||||
|
||||
|
||||
(*
|
||||
GetModuleFile - returns the filename associated with the implementation/program module, Sym.
|
||||
It may return a temporary preprocessed file.
|
||||
*)
|
||||
|
||||
PROCEDURE GetModuleFile (Sym: CARDINAL) : String ;
|
||||
VAR
|
||||
no, i: CARDINAL ;
|
||||
m : Module ;
|
||||
BEGIN
|
||||
i := 1 ;
|
||||
no := HighIndice (SeenList) ;
|
||||
WHILE i <= no DO
|
||||
m := GetIndice (SeenList, i) ;
|
||||
WITH m^ DO
|
||||
IF SymNo = Sym
|
||||
THEN
|
||||
RETURN ModFile
|
||||
ELSE
|
||||
INC (i)
|
||||
END
|
||||
END
|
||||
END ;
|
||||
RETURN NIL
|
||||
END GetModuleFile ;
|
||||
|
||||
|
||||
(*
|
||||
ForeachSourceModuleDo - for each source file call procedure, p.
|
||||
*)
|
||||
|
||||
PROCEDURE ForeachSourceModuleDo (p: DoProcedure) ;
|
||||
VAR
|
||||
i, no: CARDINAL ;
|
||||
m : Module ;
|
||||
BEGIN
|
||||
i := 1 ;
|
||||
no := HighIndice (SeenList) ;
|
||||
WHILE i<=no DO
|
||||
m := GetIndice (SeenList, i) ;
|
||||
WITH m^ DO
|
||||
IF ModFile # NIL
|
||||
THEN
|
||||
p (SymNo)
|
||||
END
|
||||
END ;
|
||||
INC (i)
|
||||
END
|
||||
END ForeachSourceModuleDo ;
|
||||
|
||||
|
||||
(*
|
||||
IsSourceSeen - returns TRUE if the source for the program module or
|
||||
implementation module has been seen.
|
||||
*)
|
||||
|
||||
PROCEDURE IsSourceSeen (sym: CARDINAL) : BOOLEAN ;
|
||||
BEGIN
|
||||
Assert (IsModule (sym) OR IsDefImp (sym)) ;
|
||||
RETURN GetModuleFile (sym) # NIL
|
||||
END IsSourceSeen ;
|
||||
|
||||
|
||||
(*
|
||||
IsModuleSeen - returns TRUE if the source for module, name, has been seen.
|
||||
*)
|
||||
|
||||
PROCEDURE IsModuleSeen (n: Name) : BOOLEAN ;
|
||||
BEGIN
|
||||
RETURN Get (n) # NulSym
|
||||
END IsModuleSeen ;
|
||||
|
||||
|
||||
(*
|
||||
LookupModule - looks up a module in the current scope, if a module does not exist
|
||||
then it creates a DefImp module.
|
||||
*)
|
||||
|
||||
PROCEDURE LookupModule (tok: CARDINAL; n: Name) : CARDINAL ;
|
||||
VAR
|
||||
sym: CARDINAL ;
|
||||
BEGIN
|
||||
sym := GetSym (n) ;
|
||||
IF sym = NulSym
|
||||
THEN
|
||||
RETURN MakeDefinitionSource (tok, n)
|
||||
ELSIF IsModule (sym) OR IsDefImp (sym)
|
||||
THEN
|
||||
RETURN sym
|
||||
ELSE
|
||||
RETURN MakeDefinitionSource (tok, n)
|
||||
END
|
||||
END LookupModule ;
|
||||
|
||||
|
||||
(*
|
||||
LookupOuterModule - looks up a module in the order of: current scope, then outer scope, finally if a
|
||||
module does not exist then it creates a DefImp module.
|
||||
*)
|
||||
|
||||
PROCEDURE LookupOuterModule (tok: CARDINAL; n: Name) : CARDINAL ;
|
||||
VAR
|
||||
outer: CARDINAL ;
|
||||
sym : CARDINAL ;
|
||||
BEGIN
|
||||
sym := GetSym (n) ;
|
||||
IF sym = NulSym
|
||||
THEN
|
||||
outer := GetScope (GetCurrentScope ()) ;
|
||||
IF outer # NulSym
|
||||
THEN
|
||||
sym := GetLocalSym (outer, n)
|
||||
END ;
|
||||
IF sym = NulSym
|
||||
THEN
|
||||
(* not a local module, so it must be refering to a definition module. *)
|
||||
sym := MakeDefinitionSource (tok, n)
|
||||
END
|
||||
END ;
|
||||
IF IsModule (sym) OR IsDefImp (sym)
|
||||
THEN
|
||||
RETURN sym
|
||||
ELSE
|
||||
RETURN MakeDefinitionSource (tok, n)
|
||||
END
|
||||
END LookupOuterModule ;
|
||||
|
||||
|
||||
BEGIN
|
||||
InitList (PendingQueue) ;
|
||||
SeenList := InitIndex (1)
|
||||
END M2Batch.
|
||||
54
gcc/m2/gm2-compiler/M2Bitset.def
Normal file
54
gcc/m2/gm2-compiler/M2Bitset.def
Normal file
@@ -0,0 +1,54 @@
|
||||
(* M2Bitset.def provides the BITSET type.
|
||||
|
||||
Copyright (C) 2003-2022 Free Software Foundation, Inc.
|
||||
Contributed by Gaius Mulley <gaius.mulley@southwales.ac.uk>.
|
||||
|
||||
This file is part of GNU Modula-2.
|
||||
|
||||
GNU Modula-2 is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3, or (at your option)
|
||||
any later version.
|
||||
|
||||
GNU Modula-2 is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU Modula-2; see the file COPYING3. If not see
|
||||
<http://www.gnu.org/licenses/>. *)
|
||||
|
||||
DEFINITION MODULE M2Bitset ;
|
||||
|
||||
(*
|
||||
Title : M2Bitset
|
||||
Author : Gaius Mulley
|
||||
System : GNU Modula-2
|
||||
Date : Wed May 7 21:21:31 2003
|
||||
Revision : $Version$
|
||||
Description: provides the BITSET type.
|
||||
*)
|
||||
|
||||
EXPORT QUALIFIED MakeBitset, GetBitsetMinMax, Bitset, Bitnum ;
|
||||
|
||||
|
||||
VAR
|
||||
Bitset, Bitnum: CARDINAL ;
|
||||
|
||||
|
||||
(*
|
||||
MakeBitset - creates and declares the type BITSET.
|
||||
*)
|
||||
|
||||
PROCEDURE MakeBitset ;
|
||||
|
||||
|
||||
(*
|
||||
GetBitsetMinMax - assigns min and max to the minimum and maximum values of BITSET.
|
||||
*)
|
||||
|
||||
PROCEDURE GetBitsetMinMax (VAR min, max: CARDINAL) ;
|
||||
|
||||
|
||||
END M2Bitset.
|
||||
89
gcc/m2/gm2-compiler/M2Bitset.mod
Normal file
89
gcc/m2/gm2-compiler/M2Bitset.mod
Normal file
@@ -0,0 +1,89 @@
|
||||
(* M2Bitset.mod provides the BITSET type.
|
||||
|
||||
Copyright (C) 2003-2022 Free Software Foundation, Inc.
|
||||
Contributed by Gaius Mulley <gaius.mulley@southwales.ac.uk>.
|
||||
|
||||
This file is part of GNU Modula-2.
|
||||
|
||||
GNU Modula-2 is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3, or (at your option)
|
||||
any later version.
|
||||
|
||||
GNU Modula-2 is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU Modula-2; see the file COPYING3. If not see
|
||||
<http://www.gnu.org/licenses/>. *)
|
||||
|
||||
IMPLEMENTATION MODULE M2Bitset ;
|
||||
|
||||
|
||||
FROM M2Debug IMPORT Assert ;
|
||||
FROM m2tree IMPORT Tree ;
|
||||
FROM m2linemap IMPORT BuiltinsLocation ;
|
||||
FROM m2type IMPORT GetWordType ;
|
||||
FROM m2decl IMPORT GetBitsPerBitset ;
|
||||
FROM m2expr IMPORT GetSizeOf ;
|
||||
FROM M2ALU IMPORT PushCard, PushIntegerTree ;
|
||||
FROM NameKey IMPORT MakeKey ;
|
||||
FROM M2System IMPORT Word ;
|
||||
FROM M2Base IMPORT Cardinal ;
|
||||
FROM M2LexBuf IMPORT BuiltinTokenNo ;
|
||||
|
||||
FROM SymbolTable IMPORT NulSym,
|
||||
MakeConstLit,
|
||||
MakeConstVar,
|
||||
MakeSet,
|
||||
MakeSubrange,
|
||||
PutSet,
|
||||
PutSubrange,
|
||||
PopValue,
|
||||
PopSize ;
|
||||
|
||||
|
||||
VAR
|
||||
MinBitset, MaxBitset : CARDINAL ;
|
||||
|
||||
|
||||
(*
|
||||
MakeBitset - creates and declares the type BITSET.
|
||||
*)
|
||||
|
||||
PROCEDURE MakeBitset ;
|
||||
BEGIN
|
||||
Bitset := MakeSet (BuiltinTokenNo, MakeKey('BITSET')) ; (* Base Type *)
|
||||
|
||||
(* MinBitset *)
|
||||
MinBitset := MakeConstLit (BuiltinTokenNo, MakeKey('0'), Cardinal) ;
|
||||
|
||||
(* MaxBitset *)
|
||||
MaxBitset := MakeConstVar (BuiltinTokenNo, MakeKey('MaxBitset')) ;
|
||||
PushCard (GetBitsPerBitset()-1) ;
|
||||
PopValue (MaxBitset) ;
|
||||
|
||||
Assert (Word#NulSym) ;
|
||||
Bitnum := MakeSubrange (BuiltinTokenNo, MakeKey('BITNUM')) ;
|
||||
PutSubrange (Bitnum, MinBitset, MaxBitset, Cardinal) ;
|
||||
PutSet (Bitset, Bitnum, FALSE) ;
|
||||
|
||||
PushIntegerTree (GetSizeOf(BuiltinsLocation(), GetWordType())) ;
|
||||
PopSize (Bitset)
|
||||
END MakeBitset ;
|
||||
|
||||
|
||||
(*
|
||||
GetBitsetMinMax - assigns min and max to the minimum and maximum values of BITSET.
|
||||
*)
|
||||
|
||||
PROCEDURE GetBitsetMinMax (VAR min, max: CARDINAL) ;
|
||||
BEGIN
|
||||
min := MinBitset ;
|
||||
max := MaxBitset
|
||||
END GetBitsetMinMax ;
|
||||
|
||||
|
||||
END M2Bitset.
|
||||
123
gcc/m2/gm2-compiler/M2CaseList.def
Normal file
123
gcc/m2/gm2-compiler/M2CaseList.def
Normal file
@@ -0,0 +1,123 @@
|
||||
(* M2CaseList.def implement ISO case label lists.
|
||||
|
||||
Copyright (C) 2009-2022 Free Software Foundation, Inc.
|
||||
Contributed by Gaius Mulley <gaius.mulley@southwales.ac.uk>.
|
||||
|
||||
This file is part of GNU Modula-2.
|
||||
|
||||
GNU Modula-2 is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3, or (at your option)
|
||||
any later version.
|
||||
|
||||
GNU Modula-2 is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU Modula-2; see the file COPYING3. If not see
|
||||
<http://www.gnu.org/licenses/>. *)
|
||||
|
||||
DEFINITION MODULE M2CaseList ;
|
||||
|
||||
(*
|
||||
Title : M2CaseList
|
||||
Author : Gaius Mulley
|
||||
System : GNU Modula-2
|
||||
Date : Fri Jul 24 09:53:48 2009
|
||||
Revision : $Version$
|
||||
Description:
|
||||
*)
|
||||
|
||||
FROM DynamicStrings IMPORT String ;
|
||||
FROM Lists IMPORT List ;
|
||||
|
||||
|
||||
(*
|
||||
PushCase - create a case entity and push it to an internal stack.
|
||||
Return the case id.
|
||||
*)
|
||||
|
||||
PROCEDURE PushCase (r: CARDINAL; v: CARDINAL) : CARDINAL ;
|
||||
|
||||
|
||||
(*
|
||||
PopCase - pop the top element of the case entity from the internal
|
||||
stack.
|
||||
*)
|
||||
|
||||
PROCEDURE PopCase ;
|
||||
|
||||
|
||||
(*
|
||||
ElseCase - indicates that this case varient does have an else clause.
|
||||
*)
|
||||
|
||||
PROCEDURE ElseCase (f: CARDINAL) ;
|
||||
|
||||
|
||||
(*
|
||||
BeginCaseList - create a new label list.
|
||||
*)
|
||||
|
||||
PROCEDURE BeginCaseList (v: CARDINAL) ;
|
||||
|
||||
|
||||
(*
|
||||
EndCaseList - terminate the current label list.
|
||||
*)
|
||||
|
||||
PROCEDURE EndCaseList ;
|
||||
|
||||
|
||||
(*
|
||||
AddRange - add a range to the current label list.
|
||||
*)
|
||||
|
||||
PROCEDURE AddRange (r1, r2: CARDINAL; tok: CARDINAL) ;
|
||||
|
||||
|
||||
(*
|
||||
CaseBoundsResolved - returns TRUE if all constants in the case list, c,
|
||||
are known to GCC.
|
||||
*)
|
||||
|
||||
PROCEDURE CaseBoundsResolved (tokenno: CARDINAL; c: CARDINAL) : BOOLEAN ;
|
||||
|
||||
|
||||
(*
|
||||
TypeCaseBounds - returns TRUE if all bounds in case list, c, are
|
||||
compatible with the tagged type.
|
||||
*)
|
||||
|
||||
PROCEDURE TypeCaseBounds (c: CARDINAL) : BOOLEAN ;
|
||||
|
||||
|
||||
(*
|
||||
OverlappingCaseBounds - returns TRUE if there were any overlapping bounds
|
||||
in the case list, c. It will generate an error
|
||||
messages for each overlapping bound found.
|
||||
*)
|
||||
|
||||
PROCEDURE OverlappingCaseBounds (c: CARDINAL) : BOOLEAN ;
|
||||
|
||||
|
||||
(*
|
||||
MissingCaseBounds - returns TRUE if there were any missing bounds
|
||||
in the varient record case list, c. It will
|
||||
generate an error message for each missing
|
||||
bounds found.
|
||||
*)
|
||||
|
||||
PROCEDURE MissingCaseBounds (tokenno: CARDINAL; c: CARDINAL) : BOOLEAN ;
|
||||
|
||||
|
||||
(*
|
||||
WriteCase - displays the case list.
|
||||
*)
|
||||
|
||||
PROCEDURE WriteCase (c: CARDINAL) ;
|
||||
|
||||
|
||||
END M2CaseList.
|
||||
933
gcc/m2/gm2-compiler/M2CaseList.mod
Normal file
933
gcc/m2/gm2-compiler/M2CaseList.mod
Normal file
@@ -0,0 +1,933 @@
|
||||
(* M2CaseList.mod implement ISO case label lists.
|
||||
|
||||
Copyright (C) 2009-2022 Free Software Foundation, Inc.
|
||||
Contributed by Gaius Mulley <gaius.mulley@southwales.ac.uk>.
|
||||
|
||||
This file is part of GNU Modula-2.
|
||||
|
||||
GNU Modula-2 is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3, or (at your option)
|
||||
any later version.
|
||||
|
||||
GNU Modula-2 is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU Modula-2; see the file COPYING3. If not see
|
||||
<http://www.gnu.org/licenses/>. *)
|
||||
|
||||
IMPLEMENTATION MODULE M2CaseList ;
|
||||
|
||||
|
||||
FROM M2Debug IMPORT Assert ;
|
||||
FROM M2GCCDeclare IMPORT TryDeclareConstant, GetTypeMin, GetTypeMax ;
|
||||
FROM M2MetaError IMPORT MetaError1, MetaError2, MetaErrorT0, MetaErrorT1, MetaErrorT2, MetaErrorT3, MetaErrorT4, MetaErrorString1 ;
|
||||
FROM M2Error IMPORT InternalError ;
|
||||
FROM M2Range IMPORT OverlapsRange, IsEqual, IsGreater ;
|
||||
FROM M2ALU IMPORT PushIntegerTree, PopIntegerTree, Addn, Sub, PushInt ;
|
||||
FROM Indexing IMPORT Index, InitIndex, PutIndice, GetIndice, ForeachIndiceInIndexDo, HighIndice ;
|
||||
FROM Lists IMPORT InitList, IncludeItemIntoList ;
|
||||
FROM NameKey IMPORT KeyToCharStar ;
|
||||
FROM SymbolConversion IMPORT GccKnowsAbout, Mod2Gcc, AddModGcc ;
|
||||
FROM DynamicStrings IMPORT InitString, InitStringCharStar, ConCat, Mark, KillString ;
|
||||
FROM m2tree IMPORT Tree ;
|
||||
FROM m2block IMPORT RememberType ;
|
||||
FROM m2type IMPORT GetMinFrom ;
|
||||
FROM Storage IMPORT ALLOCATE ;
|
||||
FROM M2Base IMPORT IsExpressionCompatible ;
|
||||
FROM M2Printf IMPORT printf1 ;
|
||||
|
||||
FROM SymbolTable IMPORT NulSym, IsConst, IsFieldVarient, IsRecord, IsRecordField, GetVarientTag, GetType,
|
||||
ForeachLocalSymDo, GetSymName, IsEnumeration, SkipType ;
|
||||
|
||||
TYPE
|
||||
RangePair = POINTER TO RECORD
|
||||
low, high: CARDINAL ;
|
||||
tokenno : CARDINAL ;
|
||||
END ;
|
||||
|
||||
ConflictingPair = POINTER TO RECORD
|
||||
a, b: RangePair ;
|
||||
END ;
|
||||
|
||||
CaseList = POINTER TO RECORD
|
||||
maxRangeId : CARDINAL ;
|
||||
rangeArray : Index ;
|
||||
currentRange: RangePair ;
|
||||
varientField: CARDINAL ;
|
||||
END ;
|
||||
|
||||
CaseDescriptor = POINTER TO RECORD
|
||||
elseClause : BOOLEAN ;
|
||||
elseField : CARDINAL ;
|
||||
record : CARDINAL ;
|
||||
varient : CARDINAL ;
|
||||
maxCaseId : CARDINAL ;
|
||||
caseListArray: Index ;
|
||||
currentCase : CaseList ;
|
||||
next : CaseDescriptor ;
|
||||
END ;
|
||||
|
||||
SetRange = POINTER TO RECORD
|
||||
low, high: Tree ;
|
||||
next : SetRange ;
|
||||
END ;
|
||||
|
||||
VAR
|
||||
caseStack : CaseDescriptor ;
|
||||
caseId : CARDINAL ;
|
||||
caseArray : Index ;
|
||||
conflictArray: Index ;
|
||||
FreeRangeList: SetRange ;
|
||||
|
||||
|
||||
|
||||
(*
|
||||
PushCase - create a case entity and push it to an internal stack.
|
||||
r, is NulSym if this is a CASE statement.
|
||||
If, r, is a record then it indicates it includes one
|
||||
or more varients reside in the record. The particular
|
||||
varient is, v.
|
||||
Return the case id.
|
||||
*)
|
||||
|
||||
PROCEDURE PushCase (r: CARDINAL; v: CARDINAL) : CARDINAL ;
|
||||
VAR
|
||||
c: CaseDescriptor ;
|
||||
BEGIN
|
||||
INC(caseId) ;
|
||||
NEW(c) ;
|
||||
IF c=NIL
|
||||
THEN
|
||||
InternalError ('out of memory error')
|
||||
ELSE
|
||||
WITH c^ DO
|
||||
elseClause := FALSE ;
|
||||
elseField := NulSym ;
|
||||
record := r ;
|
||||
varient := v ;
|
||||
maxCaseId := 0 ;
|
||||
caseListArray := InitIndex(1) ;
|
||||
next := caseStack ;
|
||||
currentCase := NIL
|
||||
END ;
|
||||
caseStack := c ;
|
||||
PutIndice(caseArray, caseId, c)
|
||||
END ;
|
||||
RETURN( caseId )
|
||||
END PushCase ;
|
||||
|
||||
|
||||
(*
|
||||
PopCase - pop the top element of the case entity from the internal
|
||||
stack.
|
||||
*)
|
||||
|
||||
PROCEDURE PopCase ;
|
||||
BEGIN
|
||||
IF caseStack=NIL
|
||||
THEN
|
||||
InternalError ('case stack is empty')
|
||||
END ;
|
||||
caseStack := caseStack^.next
|
||||
END PopCase ;
|
||||
|
||||
|
||||
(*
|
||||
ElseCase - indicates that this case varient does have an else clause.
|
||||
*)
|
||||
|
||||
PROCEDURE ElseCase (f: CARDINAL) ;
|
||||
BEGIN
|
||||
WITH caseStack^ DO
|
||||
elseClause := TRUE ;
|
||||
elseField := f
|
||||
END
|
||||
END ElseCase ;
|
||||
|
||||
|
||||
(*
|
||||
BeginCaseList - create a new label list.
|
||||
*)
|
||||
|
||||
PROCEDURE BeginCaseList (v: CARDINAL) ;
|
||||
VAR
|
||||
l: CaseList ;
|
||||
BEGIN
|
||||
NEW(l) ;
|
||||
IF l=NIL
|
||||
THEN
|
||||
InternalError ('out of memory error')
|
||||
END ;
|
||||
WITH l^ DO
|
||||
maxRangeId := 0 ;
|
||||
rangeArray := InitIndex(1) ;
|
||||
currentRange := NIL ;
|
||||
varientField := v
|
||||
END ;
|
||||
WITH caseStack^ DO
|
||||
INC(maxCaseId) ;
|
||||
PutIndice(caseListArray, maxCaseId, l) ;
|
||||
currentCase := l
|
||||
END
|
||||
END BeginCaseList ;
|
||||
|
||||
|
||||
(*
|
||||
EndCaseList - terminate the current label list.
|
||||
*)
|
||||
|
||||
PROCEDURE EndCaseList ;
|
||||
BEGIN
|
||||
caseStack^.currentCase := NIL
|
||||
END EndCaseList ;
|
||||
|
||||
|
||||
(*
|
||||
AddRange - add a range to the current label list.
|
||||
*)
|
||||
|
||||
PROCEDURE AddRange (r1, r2: CARDINAL; tok: CARDINAL) ;
|
||||
VAR
|
||||
r: RangePair ;
|
||||
BEGIN
|
||||
NEW(r) ;
|
||||
IF r=NIL
|
||||
THEN
|
||||
InternalError ('out of memory error')
|
||||
ELSE
|
||||
WITH r^ DO
|
||||
low := r1 ;
|
||||
high := r2 ;
|
||||
tokenno := tok
|
||||
END ;
|
||||
WITH caseStack^.currentCase^ DO
|
||||
INC(maxRangeId) ;
|
||||
PutIndice(rangeArray, maxRangeId, r) ;
|
||||
currentRange := r
|
||||
END
|
||||
END
|
||||
END AddRange ;
|
||||
|
||||
|
||||
(*
|
||||
GetVariantTagType - returns the type associated with, variant.
|
||||
*)
|
||||
|
||||
PROCEDURE GetVariantTagType (variant: CARDINAL) : CARDINAL ;
|
||||
VAR
|
||||
tag: CARDINAL ;
|
||||
BEGIN
|
||||
tag := GetVarientTag(variant) ;
|
||||
IF IsFieldVarient(tag) OR IsRecordField(tag)
|
||||
THEN
|
||||
RETURN( GetType(tag) )
|
||||
ELSE
|
||||
RETURN( tag )
|
||||
END
|
||||
END GetVariantTagType ;
|
||||
|
||||
|
||||
(*
|
||||
CaseBoundsResolved - returns TRUE if all constants in the case list, c,
|
||||
are known to GCC.
|
||||
*)
|
||||
|
||||
PROCEDURE CaseBoundsResolved (tokenno: CARDINAL; c: CARDINAL) : BOOLEAN ;
|
||||
VAR
|
||||
resolved: BOOLEAN ;
|
||||
p : CaseDescriptor ;
|
||||
q : CaseList ;
|
||||
r : RangePair ;
|
||||
min,
|
||||
max,
|
||||
type,
|
||||
i, j : CARDINAL ;
|
||||
BEGIN
|
||||
p := GetIndice(caseArray, c) ;
|
||||
WITH p^ DO
|
||||
IF varient#NulSym
|
||||
THEN
|
||||
(* not a CASE statement, but a varient record containing without an ELSE clause *)
|
||||
type := GetVariantTagType(varient) ;
|
||||
resolved := TRUE ;
|
||||
IF NOT GccKnowsAbout(type)
|
||||
THEN
|
||||
(* do we need to add, type, to the list of types required to be resolved? *)
|
||||
resolved := FALSE
|
||||
END ;
|
||||
min := GetTypeMin(type) ;
|
||||
IF NOT GccKnowsAbout(min)
|
||||
THEN
|
||||
TryDeclareConstant(tokenno, min) ;
|
||||
resolved := FALSE
|
||||
END ;
|
||||
max := GetTypeMax(type) ;
|
||||
IF NOT GccKnowsAbout(max)
|
||||
THEN
|
||||
TryDeclareConstant(tokenno, max) ;
|
||||
resolved := FALSE
|
||||
END ;
|
||||
IF NOT resolved
|
||||
THEN
|
||||
RETURN( FALSE )
|
||||
END
|
||||
END ;
|
||||
i := 1 ;
|
||||
WHILE i<=maxCaseId DO
|
||||
q := GetIndice(caseListArray, i) ;
|
||||
j := 1 ;
|
||||
WHILE j<=q^.maxRangeId DO
|
||||
r := GetIndice(q^.rangeArray, j) ;
|
||||
IF r^.low#NulSym
|
||||
THEN
|
||||
IF IsConst(r^.low)
|
||||
THEN
|
||||
TryDeclareConstant(tokenno, r^.low) ;
|
||||
IF NOT GccKnowsAbout(r^.low)
|
||||
THEN
|
||||
RETURN( FALSE )
|
||||
END
|
||||
ELSE
|
||||
IF r^.high=NulSym
|
||||
THEN
|
||||
MetaError1('the CASE statement variant must be defined by a constant {%1Da:is a {%1d}}', r^.low)
|
||||
ELSE
|
||||
MetaError1('the CASE statement variant low value in a range must be defined by a constant {%1Da:is a {%1d}}',
|
||||
r^.low)
|
||||
END
|
||||
END
|
||||
END ;
|
||||
IF r^.high#NulSym
|
||||
THEN
|
||||
IF IsConst(r^.high)
|
||||
THEN
|
||||
TryDeclareConstant(tokenno, r^.high) ;
|
||||
IF NOT GccKnowsAbout(r^.high)
|
||||
THEN
|
||||
RETURN( FALSE )
|
||||
END
|
||||
ELSE
|
||||
MetaError1('the CASE statement variant high value in a range must be defined by a constant {%1Da:is a {%1d}}',
|
||||
r^.high)
|
||||
END
|
||||
END ;
|
||||
INC(j)
|
||||
END ;
|
||||
INC(i)
|
||||
END
|
||||
END ;
|
||||
RETURN( TRUE )
|
||||
END CaseBoundsResolved ;
|
||||
|
||||
|
||||
(*
|
||||
IsSame - return TRUE if r, s, are in, e.
|
||||
*)
|
||||
|
||||
PROCEDURE IsSame (e: ConflictingPair; r, s: RangePair) : BOOLEAN ;
|
||||
BEGIN
|
||||
WITH e^ DO
|
||||
RETURN( ((a=r) AND (b=s)) OR ((a=s) AND (b=r)) )
|
||||
END
|
||||
END IsSame ;
|
||||
|
||||
|
||||
(*
|
||||
SeenBefore -
|
||||
*)
|
||||
|
||||
PROCEDURE SeenBefore (r, s: RangePair) : BOOLEAN ;
|
||||
VAR
|
||||
i, h: CARDINAL ;
|
||||
e : ConflictingPair ;
|
||||
BEGIN
|
||||
h := HighIndice(conflictArray) ;
|
||||
i := 1 ;
|
||||
WHILE i<=h DO
|
||||
e := GetIndice(conflictArray, i) ;
|
||||
IF IsSame(e, r, s)
|
||||
THEN
|
||||
RETURN( TRUE )
|
||||
END ;
|
||||
INC(i)
|
||||
END ;
|
||||
NEW(e) ;
|
||||
WITH e^ DO
|
||||
a := r ;
|
||||
b := s
|
||||
END ;
|
||||
PutIndice(conflictArray, h+1, e) ;
|
||||
RETURN( FALSE )
|
||||
END SeenBefore ;
|
||||
|
||||
|
||||
(*
|
||||
Overlaps -
|
||||
*)
|
||||
|
||||
PROCEDURE Overlaps (r, s: RangePair) : BOOLEAN ;
|
||||
VAR
|
||||
a, b, c, d: CARDINAL ;
|
||||
BEGIN
|
||||
a := r^.low ;
|
||||
c := s^.low ;
|
||||
IF r^.high=NulSym
|
||||
THEN
|
||||
b := a ;
|
||||
IF s^.high=NulSym
|
||||
THEN
|
||||
d := c ;
|
||||
IF OverlapsRange(Mod2Gcc(a), Mod2Gcc(b), Mod2Gcc(c), Mod2Gcc(d))
|
||||
THEN
|
||||
IF NOT SeenBefore(r, s)
|
||||
THEN
|
||||
MetaErrorT2 (r^.tokenno, 'case label {%1ad} is a duplicate with {%2ad}', a, c) ;
|
||||
MetaErrorT2 (s^.tokenno, 'case label {%1ad} is a duplicate with {%2ad}', c, a)
|
||||
END ;
|
||||
RETURN( TRUE )
|
||||
END
|
||||
ELSE
|
||||
d := s^.high ;
|
||||
IF OverlapsRange(Mod2Gcc(a), Mod2Gcc(b), Mod2Gcc(c), Mod2Gcc(d))
|
||||
THEN
|
||||
IF NOT SeenBefore (r, s)
|
||||
THEN
|
||||
MetaErrorT3 (r^.tokenno, 'case label {%1ad} is a duplicate in the range {%2ad}..{%3ad}', a, c, d) ;
|
||||
MetaErrorT3 (s^.tokenno, 'case range {%2ad}..{%3ad} is a duplicate of case label {%1ad}', c, d, a)
|
||||
END ;
|
||||
RETURN( TRUE )
|
||||
END
|
||||
END
|
||||
ELSE
|
||||
b := r^.high ;
|
||||
IF s^.high=NulSym
|
||||
THEN
|
||||
d := c ;
|
||||
IF OverlapsRange (Mod2Gcc(a), Mod2Gcc(b), Mod2Gcc(c), Mod2Gcc(d))
|
||||
THEN
|
||||
IF NOT SeenBefore(r, s)
|
||||
THEN
|
||||
MetaErrorT3 (r^.tokenno, 'case range {%1ad}..{%2ad} is a duplicate with case label {%3ad}', a, b, c) ;
|
||||
MetaErrorT3 (s^.tokenno, 'case label {%1ad} is a duplicate with case range %{2ad}..{%3ad}', c, a, b)
|
||||
END ;
|
||||
RETURN( TRUE )
|
||||
END
|
||||
ELSE
|
||||
d := s^.high ;
|
||||
IF OverlapsRange(Mod2Gcc(a), Mod2Gcc(b), Mod2Gcc(c), Mod2Gcc(d))
|
||||
THEN
|
||||
IF NOT SeenBefore(r, s)
|
||||
THEN
|
||||
MetaErrorT4 (r^.tokenno, 'case range {%1ad}..{%2ad} overlaps case range {%3ad}..{%4ad}', a, b, c, d) ;
|
||||
MetaErrorT4 (s^.tokenno, 'case range {%1ad}..{%2ad} overlaps case range {%3ad}..{%4ad}', c, d, a, b)
|
||||
END ;
|
||||
RETURN( TRUE )
|
||||
END
|
||||
END
|
||||
END ;
|
||||
RETURN( FALSE )
|
||||
END Overlaps ;
|
||||
|
||||
|
||||
(*
|
||||
OverlappingCaseBound - returns TRUE if, r, overlaps any case bound in the
|
||||
case statement, c.
|
||||
*)
|
||||
|
||||
PROCEDURE OverlappingCaseBound (r: RangePair; c: CARDINAL) : BOOLEAN ;
|
||||
VAR
|
||||
p : CaseDescriptor ;
|
||||
q : CaseList ;
|
||||
s : RangePair ;
|
||||
i, j : CARDINAL ;
|
||||
overlap: BOOLEAN ;
|
||||
BEGIN
|
||||
p := GetIndice (caseArray, c) ;
|
||||
overlap := FALSE ;
|
||||
WITH p^ DO
|
||||
i := 1 ;
|
||||
WHILE i<=maxCaseId DO
|
||||
q := GetIndice (caseListArray, i) ;
|
||||
j := 1 ;
|
||||
WHILE j<=q^.maxRangeId DO
|
||||
s := GetIndice (q^.rangeArray, j) ;
|
||||
IF (s#r) AND Overlaps (r, s)
|
||||
THEN
|
||||
overlap := TRUE
|
||||
END ;
|
||||
INC (j)
|
||||
END ;
|
||||
INC (i)
|
||||
END
|
||||
END ;
|
||||
RETURN( overlap )
|
||||
END OverlappingCaseBound ;
|
||||
|
||||
|
||||
(*
|
||||
OverlappingCaseBounds - returns TRUE if there were any overlapping bounds
|
||||
in the case list, c. It will generate an error
|
||||
messages for each overlapping bound found.
|
||||
*)
|
||||
|
||||
PROCEDURE OverlappingCaseBounds (c: CARDINAL) : BOOLEAN ;
|
||||
VAR
|
||||
p : CaseDescriptor ;
|
||||
q : CaseList ;
|
||||
r : RangePair ;
|
||||
i, j : CARDINAL ;
|
||||
overlap: BOOLEAN ;
|
||||
BEGIN
|
||||
p := GetIndice(caseArray, c) ;
|
||||
overlap := FALSE ;
|
||||
WITH p^ DO
|
||||
i := 1 ;
|
||||
WHILE i<=maxCaseId DO
|
||||
q := GetIndice(caseListArray, i) ;
|
||||
j := 1 ;
|
||||
WHILE j<=q^.maxRangeId DO
|
||||
r := GetIndice(q^.rangeArray, j) ;
|
||||
IF OverlappingCaseBound (r, c)
|
||||
THEN
|
||||
overlap := TRUE
|
||||
END ;
|
||||
INC(j)
|
||||
END ;
|
||||
INC(i)
|
||||
END
|
||||
END ;
|
||||
RETURN( overlap )
|
||||
END OverlappingCaseBounds ;
|
||||
|
||||
|
||||
(*
|
||||
NewRanges -
|
||||
*)
|
||||
|
||||
PROCEDURE NewRanges () : SetRange ;
|
||||
VAR
|
||||
s: SetRange ;
|
||||
BEGIN
|
||||
IF FreeRangeList=NIL
|
||||
THEN
|
||||
NEW(s)
|
||||
ELSE
|
||||
s := FreeRangeList ;
|
||||
FreeRangeList := FreeRangeList^.next
|
||||
END ;
|
||||
s^.next := NIL ;
|
||||
RETURN( s )
|
||||
END NewRanges ;
|
||||
|
||||
|
||||
(*
|
||||
NewSet -
|
||||
*)
|
||||
|
||||
PROCEDURE NewSet (type: CARDINAL) : SetRange ;
|
||||
VAR
|
||||
s: SetRange ;
|
||||
BEGIN
|
||||
s := NewRanges() ;
|
||||
WITH s^ DO
|
||||
low := Mod2Gcc(GetTypeMin(type)) ;
|
||||
high := Mod2Gcc(GetTypeMax(type)) ;
|
||||
next := NIL
|
||||
END ;
|
||||
RETURN( s )
|
||||
END NewSet ;
|
||||
|
||||
|
||||
(*
|
||||
DisposeRanges -
|
||||
*)
|
||||
|
||||
PROCEDURE DisposeRanges (set: SetRange) : SetRange ;
|
||||
VAR
|
||||
t: SetRange ;
|
||||
BEGIN
|
||||
IF set#NIL
|
||||
THEN
|
||||
IF FreeRangeList=NIL
|
||||
THEN
|
||||
FreeRangeList := set
|
||||
ELSE
|
||||
t := set ;
|
||||
WHILE t^.next#NIL DO
|
||||
t := t^.next
|
||||
END ;
|
||||
t^.next := FreeRangeList ;
|
||||
FreeRangeList := set
|
||||
END
|
||||
END ;
|
||||
RETURN( NIL )
|
||||
END DisposeRanges ;
|
||||
|
||||
|
||||
(*
|
||||
SubBitRange - subtracts bits, lo..hi, from, set.
|
||||
*)
|
||||
|
||||
PROCEDURE SubBitRange (set: SetRange; lo, hi: Tree; tokenno: CARDINAL) : SetRange ;
|
||||
VAR
|
||||
h, i : SetRange ;
|
||||
BEGIN
|
||||
h := set ;
|
||||
WHILE h#NIL DO
|
||||
IF (h^.high=NIL) OR IsEqual(h^.high, h^.low)
|
||||
THEN
|
||||
IF IsEqual(h^.low, lo) OR OverlapsRange(lo, hi, h^.low, h^.low)
|
||||
THEN
|
||||
IF h=set
|
||||
THEN
|
||||
set := set^.next ;
|
||||
h^.next := NIL ;
|
||||
h := DisposeRanges(h) ;
|
||||
h := set
|
||||
ELSE
|
||||
i := set ;
|
||||
WHILE i^.next#h DO
|
||||
i := i^.next
|
||||
END ;
|
||||
i^.next := h^.next ;
|
||||
i := h ;
|
||||
h := h^.next ;
|
||||
i^.next := NIL ;
|
||||
i := DisposeRanges(i)
|
||||
END
|
||||
ELSE
|
||||
h := h^.next
|
||||
END
|
||||
ELSE
|
||||
IF OverlapsRange(lo, hi, h^.low, h^.high)
|
||||
THEN
|
||||
IF IsGreater(h^.low, lo) OR IsGreater(hi, h^.high)
|
||||
THEN
|
||||
MetaErrorT0 (tokenno, 'variant case range lies outside tag value')
|
||||
ELSE
|
||||
IF IsEqual(h^.low, lo)
|
||||
THEN
|
||||
PushIntegerTree(hi) ;
|
||||
PushInt(1) ;
|
||||
Addn ;
|
||||
h^.low := PopIntegerTree()
|
||||
ELSIF IsEqual(h^.high, hi)
|
||||
THEN
|
||||
PushIntegerTree(lo) ;
|
||||
PushInt(1) ;
|
||||
Sub ;
|
||||
h^.high := PopIntegerTree()
|
||||
ELSE
|
||||
(* lo..hi exist inside range h^.low..h^.high *)
|
||||
i := NewRanges() ;
|
||||
i^.next := h^.next ;
|
||||
h^.next := i ;
|
||||
i^.high := h^.high ;
|
||||
PushIntegerTree(lo) ;
|
||||
PushInt(1) ;
|
||||
Sub ;
|
||||
h^.high := PopIntegerTree() ;
|
||||
PushIntegerTree(hi) ;
|
||||
PushInt(1) ;
|
||||
Addn ;
|
||||
i^.low := PopIntegerTree()
|
||||
END
|
||||
END
|
||||
ELSE
|
||||
h := h^.next
|
||||
END
|
||||
END
|
||||
END ;
|
||||
RETURN( set )
|
||||
END SubBitRange ;
|
||||
|
||||
|
||||
(*
|
||||
ExcludeCaseRanges - excludes all case ranges found in, p, from, set
|
||||
*)
|
||||
|
||||
PROCEDURE ExcludeCaseRanges (set: SetRange; p: CaseDescriptor) : SetRange ;
|
||||
VAR
|
||||
i, j: CARDINAL ;
|
||||
q : CaseList ;
|
||||
r : RangePair ;
|
||||
BEGIN
|
||||
WITH p^ DO
|
||||
i := 1 ;
|
||||
WHILE i<=maxCaseId DO
|
||||
q := GetIndice(caseListArray, i) ;
|
||||
j := 1 ;
|
||||
WHILE j<=q^.maxRangeId DO
|
||||
r := GetIndice(q^.rangeArray, j) ;
|
||||
IF r^.high=NulSym
|
||||
THEN
|
||||
set := SubBitRange(set, Mod2Gcc(r^.low), Mod2Gcc(r^.low), r^.tokenno)
|
||||
ELSE
|
||||
set := SubBitRange(set, Mod2Gcc(r^.low), Mod2Gcc(r^.high), r^.tokenno)
|
||||
END ;
|
||||
INC(j)
|
||||
END ;
|
||||
INC(i)
|
||||
END
|
||||
END ;
|
||||
RETURN( set )
|
||||
END ExcludeCaseRanges ;
|
||||
|
||||
|
||||
VAR
|
||||
High, Low : Tree ;
|
||||
errorString: String ;
|
||||
|
||||
|
||||
(*
|
||||
DoEnumValues -
|
||||
*)
|
||||
|
||||
PROCEDURE DoEnumValues (sym: CARDINAL) ;
|
||||
BEGIN
|
||||
IF (Low#NIL) AND IsEqual(Mod2Gcc(sym), Low)
|
||||
THEN
|
||||
errorString := ConCat(errorString, InitStringCharStar(KeyToCharStar(GetSymName(sym)))) ;
|
||||
Low := NIL
|
||||
END ;
|
||||
IF (High#NIL) AND IsEqual(Mod2Gcc(sym), High)
|
||||
THEN
|
||||
errorString := ConCat(errorString, Mark(InitString('..'))) ;
|
||||
errorString := ConCat(errorString, Mark(InitStringCharStar(KeyToCharStar(GetSymName(sym))))) ;
|
||||
High := NIL
|
||||
END
|
||||
END DoEnumValues ;
|
||||
|
||||
|
||||
(*
|
||||
ErrorRange -
|
||||
*)
|
||||
|
||||
PROCEDURE ErrorRange (p: CaseDescriptor; type: CARDINAL; set: SetRange) ;
|
||||
BEGIN
|
||||
type := SkipType(type) ;
|
||||
IF IsEnumeration(type)
|
||||
THEN
|
||||
Low := set^.low ;
|
||||
High := set^.high ;
|
||||
IF IsEqual(Low, High)
|
||||
THEN
|
||||
High := NIL ;
|
||||
errorString := InitString('enumeration value ') ;
|
||||
ForeachLocalSymDo(type, DoEnumValues) ;
|
||||
errorString := ConCat(errorString, InitString(' is ignored by the CASE variant record {%1D}'))
|
||||
ELSE
|
||||
errorString := InitString('enumeration values ') ;
|
||||
ForeachLocalSymDo(type, DoEnumValues) ;
|
||||
errorString := ConCat(errorString, InitString(' are ignored by the CASE variant record {%1D}'))
|
||||
END ;
|
||||
MetaErrorString1(errorString, p^.varient)
|
||||
END
|
||||
END ErrorRange ;
|
||||
|
||||
|
||||
(*
|
||||
ErrorRanges -
|
||||
*)
|
||||
|
||||
PROCEDURE ErrorRanges (p: CaseDescriptor; type: CARDINAL; set: SetRange) ;
|
||||
BEGIN
|
||||
WHILE set#NIL DO
|
||||
ErrorRange(p, type, set) ;
|
||||
set := set^.next
|
||||
END
|
||||
END ErrorRanges ;
|
||||
|
||||
|
||||
(*
|
||||
MissingCaseBounds - returns TRUE if there were any missing bounds
|
||||
in the varient record case list, c. It will
|
||||
generate an error message for each missing
|
||||
bounds found.
|
||||
*)
|
||||
|
||||
PROCEDURE MissingCaseBounds (tokenno: CARDINAL; c: CARDINAL) : BOOLEAN ;
|
||||
VAR
|
||||
p : CaseDescriptor ;
|
||||
type : CARDINAL ;
|
||||
missing: BOOLEAN ;
|
||||
set : SetRange ;
|
||||
BEGIN
|
||||
p := GetIndice(caseArray, c) ;
|
||||
missing := FALSE ;
|
||||
WITH p^ DO
|
||||
IF (record#NulSym) AND (varient#NulSym) AND (NOT elseClause)
|
||||
THEN
|
||||
(* not a CASE statement, but a varient record containing without an ELSE clause *)
|
||||
type := GetVariantTagType(varient) ;
|
||||
set := NewSet(type) ;
|
||||
set := ExcludeCaseRanges(set, p) ;
|
||||
IF set#NIL
|
||||
THEN
|
||||
missing := TRUE ;
|
||||
MetaErrorT2 (tokenno,
|
||||
'not all variant record alternatives in the {%kCASE} clause are specified, hint you either need to specify each value of {%2ad} or use an {%kELSE} clause',
|
||||
varient, type) ;
|
||||
ErrorRanges(p, type, set)
|
||||
END ;
|
||||
set := DisposeRanges(set)
|
||||
END
|
||||
END ;
|
||||
RETURN( missing )
|
||||
END MissingCaseBounds ;
|
||||
|
||||
|
||||
(*
|
||||
InRangeList - returns TRUE if the value, tag, is defined in the case list.
|
||||
|
||||
PROCEDURE InRangeList (cl: CaseList; tag: CARDINAL) : BOOLEAN ;
|
||||
VAR
|
||||
i, h: CARDINAL ;
|
||||
r : RangePair ;
|
||||
a : Tree ;
|
||||
BEGIN
|
||||
WITH cl^ DO
|
||||
i := 1 ;
|
||||
h := HighIndice(rangeArray) ;
|
||||
WHILE i<=h DO
|
||||
r := GetIndice(rangeArray, i) ;
|
||||
WITH r^ DO
|
||||
IF high=NulSym
|
||||
THEN
|
||||
a := Mod2Gcc(low)
|
||||
ELSE
|
||||
a := Mod2Gcc(high)
|
||||
END ;
|
||||
IF OverlapsRange(Mod2Gcc(low), a, Mod2Gcc(tag), Mod2Gcc(tag))
|
||||
THEN
|
||||
RETURN( TRUE )
|
||||
END
|
||||
END ;
|
||||
INC(i)
|
||||
END
|
||||
END ;
|
||||
RETURN( FALSE )
|
||||
END InRangeList ;
|
||||
*)
|
||||
|
||||
|
||||
(*
|
||||
WriteCase - dump out the case list (internal debugging).
|
||||
*)
|
||||
|
||||
PROCEDURE WriteCase (c: CARDINAL) ;
|
||||
BEGIN
|
||||
(* this debugging procedure should be finished. *)
|
||||
printf1 ("%d", c)
|
||||
END WriteCase ;
|
||||
|
||||
|
||||
(*
|
||||
checkTypes - checks to see that, constant, and, type, are compatible.
|
||||
*)
|
||||
|
||||
PROCEDURE checkTypes (constant, type: CARDINAL) : BOOLEAN ;
|
||||
VAR
|
||||
consttype: CARDINAL ;
|
||||
BEGIN
|
||||
IF (constant#NulSym) AND IsConst(constant)
|
||||
THEN
|
||||
consttype := GetType(constant) ;
|
||||
IF NOT IsExpressionCompatible(consttype, type)
|
||||
THEN
|
||||
MetaError2('the CASE statement variant tag {%1ad} must be type compatible with the constant {%2Da:is a {%2d}}',
|
||||
type, constant) ;
|
||||
RETURN( FALSE )
|
||||
END
|
||||
END ;
|
||||
RETURN( TRUE )
|
||||
END checkTypes ;
|
||||
|
||||
|
||||
(*
|
||||
inRange - returns TRUE if, min <= i <= max.
|
||||
*)
|
||||
|
||||
PROCEDURE inRange (i, min, max: CARDINAL) : BOOLEAN ;
|
||||
BEGIN
|
||||
RETURN( OverlapsRange(Mod2Gcc(i), Mod2Gcc(i), Mod2Gcc(min), Mod2Gcc(max)) )
|
||||
END inRange ;
|
||||
|
||||
|
||||
(*
|
||||
TypeCaseBounds - returns TRUE if all bounds in case list, c, are
|
||||
compatible with the tagged type.
|
||||
*)
|
||||
|
||||
PROCEDURE TypeCaseBounds (c: CARDINAL) : BOOLEAN ;
|
||||
VAR
|
||||
p : CaseDescriptor ;
|
||||
q : CaseList ;
|
||||
r : RangePair ;
|
||||
min, max,
|
||||
type,
|
||||
i, j : CARDINAL ;
|
||||
compatible: BOOLEAN ;
|
||||
BEGIN
|
||||
p := GetIndice(caseArray, c) ;
|
||||
type := NulSym ;
|
||||
WITH p^ DO
|
||||
type := NulSym ;
|
||||
IF varient#NulSym
|
||||
THEN
|
||||
(* not a CASE statement, but a varient record containing without an ELSE clause *)
|
||||
type := GetVariantTagType(varient) ;
|
||||
min := GetTypeMin(type) ;
|
||||
max := GetTypeMax(type)
|
||||
END ;
|
||||
IF type=NulSym
|
||||
THEN
|
||||
RETURN( TRUE )
|
||||
END ;
|
||||
compatible := TRUE ;
|
||||
i := 1 ;
|
||||
WHILE i<=maxCaseId DO
|
||||
q := GetIndice(caseListArray, i) ;
|
||||
j := 1 ;
|
||||
WHILE j<=q^.maxRangeId DO
|
||||
r := GetIndice(q^.rangeArray, j) ;
|
||||
IF (r^.low#NulSym) AND (NOT inRange(r^.low, min, max))
|
||||
THEN
|
||||
MetaError2('the CASE statement variant range {%1ad} exceeds that of the tag type {%2ad}',
|
||||
r^.low, type) ;
|
||||
compatible := FALSE
|
||||
END ;
|
||||
IF NOT checkTypes(r^.low, type)
|
||||
THEN
|
||||
compatible := FALSE
|
||||
END ;
|
||||
IF (r^.high#NulSym) AND (NOT inRange(r^.high, min, max))
|
||||
THEN
|
||||
MetaError2('the CASE statement variant range {%1ad} exceeds that of the tag type {%2ad}',
|
||||
r^.high, type) ;
|
||||
compatible := FALSE
|
||||
END ;
|
||||
IF NOT checkTypes(r^.high, type)
|
||||
THEN
|
||||
compatible := FALSE
|
||||
END ;
|
||||
INC(j)
|
||||
END ;
|
||||
INC(i)
|
||||
END ;
|
||||
RETURN( compatible )
|
||||
END
|
||||
END TypeCaseBounds ;
|
||||
|
||||
|
||||
BEGIN
|
||||
caseStack := NIL ;
|
||||
caseId := 0 ;
|
||||
caseArray := InitIndex(1) ;
|
||||
conflictArray := InitIndex(1) ;
|
||||
FreeRangeList := NIL
|
||||
END M2CaseList.
|
||||
67
gcc/m2/gm2-compiler/M2Check.def
Normal file
67
gcc/m2/gm2-compiler/M2Check.def
Normal file
@@ -0,0 +1,67 @@
|
||||
(* M2Check.def perform rigerous type checking for fully declared symbols.
|
||||
|
||||
Copyright (C) 2020-2022 Free Software Foundation, Inc.
|
||||
Contributed by Gaius Mulley <gaius.mulley@southwales.ac.uk>.
|
||||
|
||||
This file is part of GNU Modula-2.
|
||||
|
||||
GNU Modula-2 is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3, or (at your option)
|
||||
any later version.
|
||||
|
||||
GNU Modula-2 is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU Modula-2; see the file COPYING3. If not see
|
||||
<http://www.gnu.org/licenses/>. *)
|
||||
|
||||
DEFINITION MODULE M2Check ;
|
||||
|
||||
(*
|
||||
Title : M2Check
|
||||
Author : Gaius Mulley
|
||||
System : GNU Modula-2
|
||||
Date : Fri Mar 6 15:32:10 2020
|
||||
Revision : $Version$
|
||||
Description: provides a module to check the symbol type compatibility.
|
||||
It assumes that the declaration of all dependants
|
||||
is complete.
|
||||
*)
|
||||
|
||||
|
||||
(*
|
||||
ParameterTypeCompatible - returns TRUE if the nth procedure parameter formal
|
||||
is compatible with actual. If the string is empty then
|
||||
no error is issued.
|
||||
*)
|
||||
|
||||
PROCEDURE ParameterTypeCompatible (token: CARDINAL; format: ARRAY OF CHAR;
|
||||
procedure, formal, actual, nth: CARDINAL;
|
||||
isvar: BOOLEAN) : BOOLEAN ;
|
||||
|
||||
|
||||
(*
|
||||
AssignmentTypeCompatible - returns TRUE if the des and the expr are assignment compatible.
|
||||
If the string is empty then no error is issued.
|
||||
*)
|
||||
|
||||
PROCEDURE AssignmentTypeCompatible (token: CARDINAL; format: ARRAY OF CHAR;
|
||||
des, expr: CARDINAL) : BOOLEAN ;
|
||||
|
||||
|
||||
(*
|
||||
ExpressionTypeCompatible - returns TRUE if the expressions, left and right,
|
||||
are expression compatible.
|
||||
If the string is empty then no error is issued.
|
||||
*)
|
||||
|
||||
PROCEDURE ExpressionTypeCompatible (token: CARDINAL; format: ARRAY OF CHAR;
|
||||
left, right: CARDINAL;
|
||||
strict, isin: BOOLEAN) : BOOLEAN ;
|
||||
|
||||
|
||||
END M2Check.
|
||||
1549
gcc/m2/gm2-compiler/M2Check.mod
Normal file
1549
gcc/m2/gm2-compiler/M2Check.mod
Normal file
File diff suppressed because it is too large
Load Diff
54
gcc/m2/gm2-compiler/M2Code.def
Normal file
54
gcc/m2/gm2-compiler/M2Code.def
Normal file
@@ -0,0 +1,54 @@
|
||||
(* M2Code.def coordinate the activity of the front end.
|
||||
|
||||
Copyright (C) 2001-2022 Free Software Foundation, Inc.
|
||||
Contributed by Gaius Mulley <gaius.mulley@southwales.ac.uk>.
|
||||
|
||||
This file is part of GNU Modula-2.
|
||||
|
||||
GNU Modula-2 is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3, or (at your option)
|
||||
any later version.
|
||||
|
||||
GNU Modula-2 is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU Modula-2; see the file COPYING3. If not see
|
||||
<http://www.gnu.org/licenses/>. *)
|
||||
|
||||
DEFINITION MODULE M2Code ;
|
||||
|
||||
(*
|
||||
Title : M2Code
|
||||
Author : Gaius Mulley
|
||||
Date : 6/8/87
|
||||
System : UNIX (GNU Modula-2)
|
||||
Description: M2Code provides a module which coordinates the activity of the front
|
||||
end optimization routines and the gcc tree generation.
|
||||
*)
|
||||
|
||||
FROM SYSTEM IMPORT WORD ;
|
||||
EXPORT QUALIFIED Code, CodeBlock ;
|
||||
|
||||
|
||||
(*
|
||||
Code - calls procedures to generates trees from the quadruples.
|
||||
All front end quadruple optimization is performed via this call.
|
||||
*)
|
||||
|
||||
PROCEDURE Code ;
|
||||
|
||||
|
||||
(*
|
||||
CodeBlock - generates all code for this block and also declares all types
|
||||
and procedures for this block. It will also optimize quadruples
|
||||
within this scope.
|
||||
*)
|
||||
|
||||
PROCEDURE CodeBlock (scope: WORD) ;
|
||||
|
||||
|
||||
END M2Code.
|
||||
528
gcc/m2/gm2-compiler/M2Code.mod
Normal file
528
gcc/m2/gm2-compiler/M2Code.mod
Normal file
@@ -0,0 +1,528 @@
|
||||
(* M2Code.mod coordinate the activity of the front end.
|
||||
|
||||
Copyright (C) 2001-2022 Free Software Foundation, Inc.
|
||||
Contributed by Gaius Mulley <gaius.mulley@southwales.ac.uk>.
|
||||
|
||||
This file is part of GNU Modula-2.
|
||||
|
||||
GNU Modula-2 is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3, or (at your option)
|
||||
any later version.
|
||||
|
||||
GNU Modula-2 is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU Modula-2; see the file COPYING3. If not see
|
||||
<http://www.gnu.org/licenses/>. *)
|
||||
|
||||
IMPLEMENTATION MODULE M2Code ;
|
||||
|
||||
|
||||
FROM SYSTEM IMPORT WORD ;
|
||||
FROM M2Options IMPORT Statistics, DisplayQuadruples, OptimizeUncalledProcedures,
|
||||
(* OptimizeDynamic, *) OptimizeCommonSubExpressions,
|
||||
StyleChecking, Optimizing, WholeProgram ;
|
||||
|
||||
FROM M2Error IMPORT InternalError ;
|
||||
FROM M2Students IMPORT StudentVariableCheck ;
|
||||
|
||||
FROM SymbolTable IMPORT GetMainModule, IsProcedure,
|
||||
IsModuleWithinProcedure,
|
||||
CheckHiddenTypeAreAddress, IsModule, IsDefImp,
|
||||
DebugLineNumbers,
|
||||
ForeachProcedureDo,
|
||||
ForeachInnerModuleDo, GetSymName ;
|
||||
|
||||
FROM M2Printf IMPORT printf2, printf1, printf0 ;
|
||||
FROM NameKey IMPORT Name ;
|
||||
FROM M2Batch IMPORT ForeachSourceModuleDo ;
|
||||
|
||||
FROM M2Quads IMPORT CountQuads, GetFirstQuad, DisplayQuadList, DisplayQuadRange,
|
||||
BackPatchSubrangesAndOptParam, VariableAnalysis,
|
||||
LoopAnalysis, ForLoopAnalysis, GetQuad, QuadOperator ;
|
||||
|
||||
FROM M2Pass IMPORT SetPassToNoPass, SetPassToCodeGeneration ;
|
||||
|
||||
FROM M2BasicBlock IMPORT BasicBlock,
|
||||
InitBasicBlocks, InitBasicBlocksFromRange,
|
||||
KillBasicBlocks, FreeBasicBlocks,
|
||||
ForeachBasicBlockDo ;
|
||||
|
||||
FROM M2Optimize IMPORT FoldBranches, RemoveProcedures ;
|
||||
FROM M2GenGCC IMPORT ConvertQuadsToTree ;
|
||||
|
||||
FROM M2GCCDeclare IMPORT FoldConstants, StartDeclareScope,
|
||||
DeclareProcedure, InitDeclarations,
|
||||
DeclareModuleVariables, MarkExported ;
|
||||
|
||||
FROM M2Scope IMPORT ScopeBlock, InitScopeBlock, KillScopeBlock, ForeachScopeBlockDo ;
|
||||
FROM m2top IMPORT StartGlobalContext, EndGlobalContext, SetFlagUnitAtATime ;
|
||||
FROM M2Error IMPORT FlushErrors, FlushWarnings ;
|
||||
FROM M2Swig IMPORT GenerateSwigFile ;
|
||||
FROM m2flex IMPORT GetTotalLines ;
|
||||
FROM FIO IMPORT FlushBuffer, StdOut ;
|
||||
FROM M2Quiet IMPORT qprintf0 ;
|
||||
FROM M2SSA IMPORT DiscoverSSA ;
|
||||
|
||||
|
||||
CONST
|
||||
MaxOptimTimes = 10 ; (* upper limit of no of times we run through all optimization *)
|
||||
Debugging = TRUE ;
|
||||
|
||||
|
||||
VAR
|
||||
Total,
|
||||
Count,
|
||||
OptimTimes,
|
||||
DeltaProc,
|
||||
Proc,
|
||||
DeltaConst,
|
||||
Const,
|
||||
DeltaJump,
|
||||
Jump,
|
||||
DeltaBasicB,
|
||||
BasicB : CARDINAL ;
|
||||
|
||||
|
||||
(*
|
||||
Percent - calculates the percentage from numerator and divisor
|
||||
*)
|
||||
|
||||
PROCEDURE Percent (numerator, divisor: CARDINAL) ;
|
||||
VAR
|
||||
value: CARDINAL ;
|
||||
BEGIN
|
||||
printf0 (' (') ;
|
||||
IF divisor=0
|
||||
THEN
|
||||
printf0 ('overflow error')
|
||||
ELSE
|
||||
value := numerator*100 DIV divisor ;
|
||||
printf1 ('%3d', value)
|
||||
END ;
|
||||
printf0 ('\%)')
|
||||
END Percent ;
|
||||
|
||||
|
||||
(*
|
||||
OptimizationAnalysis - displays some simple front end optimization statistics.
|
||||
*)
|
||||
|
||||
PROCEDURE OptimizationAnalysis ;
|
||||
VAR
|
||||
value: CARDINAL ;
|
||||
BEGIN
|
||||
IF Statistics
|
||||
THEN
|
||||
Count := CountQuads() ;
|
||||
|
||||
printf1 ('M2 initial number of quadruples: %6d', Total) ;
|
||||
Percent (Total, Total) ; printf0 ('\n');
|
||||
printf1 ('M2 constant folding achieved : %6d', Const) ;
|
||||
Percent (Const, Total) ; printf0 ('\n');
|
||||
printf1 ('M2 branch folding achieved : %6d', Jump) ;
|
||||
Percent (Jump, Total) ; printf0 ('\n');
|
||||
value := Const+Jump+Proc ;
|
||||
printf1 ('Front end optimization removed : %6d', value) ;
|
||||
Percent (value, Total) ; printf0 ('\n') ;
|
||||
printf1 ('Front end final : %6d', Count) ;
|
||||
Percent (Count, Total) ; printf0 ('\n') ;
|
||||
Count := GetTotalLines () ;
|
||||
printf1 ('Total source lines compiled : %6d\n', Count) ;
|
||||
FlushBuffer (StdOut)
|
||||
END ;
|
||||
IF DisplayQuadruples
|
||||
THEN
|
||||
printf0 ('after all front end optimization\n') ;
|
||||
DisplayQuadList
|
||||
END
|
||||
END OptimizationAnalysis ;
|
||||
|
||||
|
||||
(*
|
||||
RemoveUnreachableCode -
|
||||
*)
|
||||
|
||||
PROCEDURE RemoveUnreachableCode ;
|
||||
BEGIN
|
||||
IF WholeProgram
|
||||
THEN
|
||||
ForeachSourceModuleDo(RemoveProcedures)
|
||||
ELSE
|
||||
RemoveProcedures(GetMainModule())
|
||||
END
|
||||
END RemoveUnreachableCode ;
|
||||
|
||||
|
||||
(*
|
||||
DoModuleDeclare - declare all constants, types, variables, procedures for the
|
||||
main module or all modules.
|
||||
*)
|
||||
|
||||
PROCEDURE DoModuleDeclare ;
|
||||
BEGIN
|
||||
IF WholeProgram
|
||||
THEN
|
||||
ForeachSourceModuleDo (StartDeclareScope)
|
||||
ELSE
|
||||
StartDeclareScope (GetMainModule ())
|
||||
END
|
||||
END DoModuleDeclare ;
|
||||
|
||||
|
||||
(*
|
||||
PrintModule -
|
||||
*)
|
||||
|
||||
(*
|
||||
PROCEDURE PrintModule (sym: CARDINAL) ;
|
||||
VAR
|
||||
n: Name ;
|
||||
BEGIN
|
||||
n := GetSymName (sym) ;
|
||||
printf1 ('module %a\n', n)
|
||||
END PrintModule ;
|
||||
*)
|
||||
|
||||
|
||||
(*
|
||||
DoCodeBlock - generate code for the main module or all modules.
|
||||
*)
|
||||
|
||||
PROCEDURE DoCodeBlock ;
|
||||
BEGIN
|
||||
IF WholeProgram
|
||||
THEN
|
||||
(* ForeachSourceModuleDo(PrintModule) ; *)
|
||||
CodeBlock (GetMainModule ())
|
||||
ELSE
|
||||
CodeBlock (GetMainModule ())
|
||||
END
|
||||
END DoCodeBlock ;
|
||||
|
||||
|
||||
(*
|
||||
DetermineSubExpTemporaries -
|
||||
*)
|
||||
|
||||
PROCEDURE DetermineSubExpTemporaries ;
|
||||
BEGIN
|
||||
IF WholeProgram
|
||||
THEN
|
||||
ForeachSourceModuleDo (DiscoverSSA)
|
||||
ELSE
|
||||
DiscoverSSA (GetMainModule ())
|
||||
END
|
||||
END DetermineSubExpTemporaries ;
|
||||
|
||||
|
||||
(*
|
||||
Code - calls procedures to generates trees from the quadruples.
|
||||
All front end quadruple optimization is performed via this call.
|
||||
*)
|
||||
|
||||
PROCEDURE Code ;
|
||||
BEGIN
|
||||
CheckHiddenTypeAreAddress ;
|
||||
SetPassToNoPass ;
|
||||
BackPatchSubrangesAndOptParam ;
|
||||
Total := CountQuads () ;
|
||||
|
||||
ForLoopAnalysis ; (* must be done before any optimization as the index variable increment quad might change *)
|
||||
|
||||
IF DisplayQuadruples
|
||||
THEN
|
||||
printf0 ('before any optimization\n') ;
|
||||
DisplayQuadList
|
||||
END ;
|
||||
|
||||
(* now is a suitable time to check for student errors as *)
|
||||
(* we know all the front end symbols must be resolved. *)
|
||||
|
||||
IF StyleChecking
|
||||
THEN
|
||||
StudentVariableCheck
|
||||
END ;
|
||||
|
||||
SetPassToCodeGeneration ;
|
||||
SetFlagUnitAtATime (Optimizing) ;
|
||||
StartGlobalContext ;
|
||||
InitDeclarations ; (* default and fixed sized types are all declared from now on. *)
|
||||
|
||||
RemoveUnreachableCode ;
|
||||
|
||||
IF DisplayQuadruples
|
||||
THEN
|
||||
printf0 ('after dead procedure elimination\n') ;
|
||||
DisplayQuadList
|
||||
END ;
|
||||
|
||||
DetermineSubExpTemporaries ;
|
||||
|
||||
IF DisplayQuadruples
|
||||
THEN
|
||||
printf0 ('after identifying simple subexpression temporaries\n') ;
|
||||
DisplayQuadList
|
||||
END ;
|
||||
|
||||
qprintf0 (' symbols to gcc trees\n') ;
|
||||
DoModuleDeclare ;
|
||||
|
||||
FlushWarnings ;
|
||||
FlushErrors ;
|
||||
qprintf0 (' statements to gcc trees\n') ;
|
||||
DoCodeBlock ;
|
||||
|
||||
MarkExported (GetMainModule ()) ;
|
||||
GenerateSwigFile (GetMainModule ()) ;
|
||||
DebugLineNumbers (GetMainModule ()) ;
|
||||
qprintf0 (' gcc trees given to the gcc backend\n') ;
|
||||
EndGlobalContext ;
|
||||
|
||||
OptimizationAnalysis
|
||||
END Code ;
|
||||
|
||||
|
||||
(*
|
||||
InitialDeclareAndCodeBlock - declares all objects within scope,
|
||||
*)
|
||||
|
||||
PROCEDURE InitialDeclareAndOptimize (start, end: CARDINAL) ;
|
||||
BEGIN
|
||||
Count := CountQuads() ;
|
||||
FreeBasicBlocks(InitBasicBlocksFromRange(start, end)) ;
|
||||
BasicB := Count - CountQuads() ;
|
||||
Count := CountQuads() ;
|
||||
|
||||
FoldBranches(start, end) ;
|
||||
Jump := Count - CountQuads() ;
|
||||
Count := CountQuads()
|
||||
END InitialDeclareAndOptimize ;
|
||||
|
||||
|
||||
(*
|
||||
DeclareAndCodeBlock - declares all objects within scope,
|
||||
*)
|
||||
|
||||
PROCEDURE SecondDeclareAndOptimize (start, end: CARDINAL) ;
|
||||
BEGIN
|
||||
REPEAT
|
||||
FoldConstants(start, end) ;
|
||||
DeltaConst := Count - CountQuads () ;
|
||||
Count := CountQuads () ;
|
||||
|
||||
FreeBasicBlocks(InitBasicBlocksFromRange (start, end)) ;
|
||||
|
||||
DeltaBasicB := Count - CountQuads () ;
|
||||
Count := CountQuads () ;
|
||||
|
||||
FreeBasicBlocks (InitBasicBlocksFromRange (start, end)) ;
|
||||
FoldBranches(start, end) ;
|
||||
DeltaJump := Count - CountQuads () ;
|
||||
Count := CountQuads () ;
|
||||
|
||||
FreeBasicBlocks(InitBasicBlocksFromRange (start, end)) ;
|
||||
INC (DeltaBasicB, Count - CountQuads ()) ;
|
||||
Count := CountQuads () ;
|
||||
|
||||
(* now total the optimization components *)
|
||||
INC (Proc, DeltaProc) ;
|
||||
INC (Const, DeltaConst) ;
|
||||
INC (Jump, DeltaJump) ;
|
||||
INC (BasicB, DeltaBasicB)
|
||||
UNTIL (OptimTimes>=MaxOptimTimes) OR
|
||||
((DeltaProc=0) AND (DeltaConst=0) AND (DeltaJump=0) AND (DeltaBasicB=0)) ;
|
||||
|
||||
IF (DeltaProc#0) OR (DeltaConst#0) OR (DeltaJump#0) OR (DeltaBasicB#0)
|
||||
THEN
|
||||
printf0 ('optimization finished although more reduction may be possible (increase MaxOptimTimes)\n')
|
||||
END
|
||||
END SecondDeclareAndOptimize ;
|
||||
|
||||
|
||||
(*
|
||||
InitOptimizeVariables -
|
||||
*)
|
||||
|
||||
PROCEDURE InitOptimizeVariables ;
|
||||
BEGIN
|
||||
Count := CountQuads () ;
|
||||
OptimTimes := 0 ;
|
||||
DeltaProc := 0 ;
|
||||
DeltaConst := 0 ;
|
||||
DeltaJump := 0 ;
|
||||
DeltaBasicB := 0
|
||||
END InitOptimizeVariables ;
|
||||
|
||||
|
||||
(*
|
||||
Init -
|
||||
*)
|
||||
|
||||
PROCEDURE Init ;
|
||||
BEGIN
|
||||
Proc := 0 ;
|
||||
Const := 0 ;
|
||||
Jump := 0 ;
|
||||
BasicB := 0
|
||||
END Init ;
|
||||
|
||||
|
||||
(*
|
||||
BasicBlockVariableAnalysis -
|
||||
*)
|
||||
|
||||
PROCEDURE BasicBlockVariableAnalysis (start, end: CARDINAL) ;
|
||||
VAR
|
||||
bb: BasicBlock ;
|
||||
BEGIN
|
||||
bb := InitBasicBlocksFromRange(start, end) ;
|
||||
ForeachBasicBlockDo (bb, VariableAnalysis) ;
|
||||
KillBasicBlocks (bb)
|
||||
END BasicBlockVariableAnalysis ;
|
||||
|
||||
|
||||
(*
|
||||
DisplayQuadsInScope -
|
||||
*)
|
||||
|
||||
(*
|
||||
PROCEDURE DisplayQuadsInScope (sb: ScopeBlock) ;
|
||||
BEGIN
|
||||
printf0 ('Quads in scope\n') ;
|
||||
ForeachScopeBlockDo (sb, DisplayQuadRange) ;
|
||||
printf0 ('===============\n')
|
||||
END DisplayQuadsInScope ;
|
||||
*)
|
||||
|
||||
|
||||
(*
|
||||
OptimizeScopeBlock -
|
||||
*)
|
||||
|
||||
PROCEDURE OptimizeScopeBlock (sb: ScopeBlock) ;
|
||||
VAR
|
||||
OptimTimes,
|
||||
Previous,
|
||||
Current : CARDINAL ;
|
||||
BEGIN
|
||||
InitOptimizeVariables ;
|
||||
OptimTimes := 1 ;
|
||||
Current := CountQuads () ;
|
||||
ForeachScopeBlockDo (sb, InitialDeclareAndOptimize) ;
|
||||
ForeachScopeBlockDo (sb, BasicBlockVariableAnalysis) ;
|
||||
REPEAT
|
||||
ForeachScopeBlockDo (sb, SecondDeclareAndOptimize) ;
|
||||
Previous := Current ;
|
||||
Current := CountQuads () ;
|
||||
INC (OptimTimes)
|
||||
UNTIL (OptimTimes=MaxOptimTimes) OR (Current=Previous) ;
|
||||
ForeachScopeBlockDo (sb, LoopAnalysis)
|
||||
END OptimizeScopeBlock ;
|
||||
|
||||
|
||||
(*
|
||||
DisplayQuadNumbers - the range, start..end.
|
||||
*)
|
||||
|
||||
(*
|
||||
PROCEDURE DisplayQuadNumbers (start, end: CARDINAL) ;
|
||||
BEGIN
|
||||
IF DisplayQuadruples
|
||||
THEN
|
||||
printf2 ('Coding [%d..%d]\n', start, end)
|
||||
END
|
||||
END DisplayQuadNumbers ;
|
||||
*)
|
||||
|
||||
|
||||
(*
|
||||
CodeProceduresWithinBlock - codes the procedures within the module scope.
|
||||
*)
|
||||
|
||||
PROCEDURE CodeProceduresWithinBlock (scope: CARDINAL) ;
|
||||
BEGIN
|
||||
ForeachProcedureDo (scope, CodeBlock)
|
||||
END CodeProceduresWithinBlock ;
|
||||
|
||||
|
||||
(*
|
||||
CodeProcedures -
|
||||
*)
|
||||
|
||||
PROCEDURE CodeProcedures (scope: CARDINAL) ;
|
||||
BEGIN
|
||||
IF IsDefImp (scope) OR IsModule (scope)
|
||||
THEN
|
||||
ForeachProcedureDo (scope, CodeBlock)
|
||||
END
|
||||
END CodeProcedures ;
|
||||
|
||||
|
||||
(*
|
||||
CodeBlock - generates all code for this block and also declares
|
||||
all types and procedures for this block. It will
|
||||
also optimize quadruples within this scope.
|
||||
*)
|
||||
|
||||
PROCEDURE CodeBlock (scope: WORD) ;
|
||||
VAR
|
||||
sb: ScopeBlock ;
|
||||
n : Name ;
|
||||
BEGIN
|
||||
IF DisplayQuadruples
|
||||
THEN
|
||||
n := GetSymName (scope) ;
|
||||
printf1 ('before coding block %a\n', n)
|
||||
END ;
|
||||
sb := InitScopeBlock (scope) ;
|
||||
OptimizeScopeBlock (sb) ;
|
||||
IF IsProcedure (scope)
|
||||
THEN
|
||||
IF DisplayQuadruples
|
||||
THEN
|
||||
n := GetSymName(scope) ;
|
||||
printf1('before coding procedure %a\n', n) ;
|
||||
ForeachScopeBlockDo(sb, DisplayQuadRange) ;
|
||||
printf0('===============\n')
|
||||
END ;
|
||||
ForeachScopeBlockDo(sb, ConvertQuadsToTree)
|
||||
ELSIF IsModuleWithinProcedure(scope)
|
||||
THEN
|
||||
IF DisplayQuadruples
|
||||
THEN
|
||||
n := GetSymName(scope) ;
|
||||
printf1('before coding module %a within procedure\n', n) ;
|
||||
ForeachScopeBlockDo(sb, DisplayQuadRange) ;
|
||||
printf0('===============\n')
|
||||
END ;
|
||||
ForeachScopeBlockDo(sb, ConvertQuadsToTree) ;
|
||||
ForeachProcedureDo(scope, CodeBlock)
|
||||
ELSE
|
||||
IF DisplayQuadruples
|
||||
THEN
|
||||
n := GetSymName(scope) ;
|
||||
printf1('before coding module %a\n', n) ;
|
||||
ForeachScopeBlockDo(sb, DisplayQuadRange) ;
|
||||
printf0('===============\n')
|
||||
END ;
|
||||
ForeachScopeBlockDo(sb, ConvertQuadsToTree) ;
|
||||
IF WholeProgram
|
||||
THEN
|
||||
ForeachSourceModuleDo(CodeProcedures)
|
||||
ELSE
|
||||
ForeachProcedureDo(scope, CodeBlock)
|
||||
END ;
|
||||
ForeachInnerModuleDo(scope, CodeProceduresWithinBlock)
|
||||
END ;
|
||||
KillScopeBlock(sb)
|
||||
END CodeBlock ;
|
||||
|
||||
|
||||
BEGIN
|
||||
Init
|
||||
END M2Code.
|
||||
142
gcc/m2/gm2-compiler/M2ColorString.def
Normal file
142
gcc/m2/gm2-compiler/M2ColorString.def
Normal file
@@ -0,0 +1,142 @@
|
||||
(* M2ColorString.def provides procedures for obtaining GCC color strings.
|
||||
|
||||
Copyright (C) 2019-2022 Free Software Foundation, Inc.
|
||||
Contributed by Gaius Mulley <gaius@glam.ac.uk>.
|
||||
|
||||
This file is part of GNU Modula-2.
|
||||
|
||||
GNU Modula-2 is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3, or (at your option)
|
||||
any later version.
|
||||
|
||||
GNU Modula-2 is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU Modula-2; see the file COPYING3. If not see
|
||||
<http://www.gnu.org/licenses/>. *)
|
||||
|
||||
DEFINITION MODULE M2ColorString ; (*!m2pim+gm2*)
|
||||
|
||||
(*
|
||||
Title : M2ColorString
|
||||
Author : Gaius Mulley
|
||||
System : GNU Modula-2
|
||||
Date : Sat Apr 13 19:21:03 2019
|
||||
Revision : $Version$
|
||||
Description: provides procedures for obtaining GCC color strings.
|
||||
*)
|
||||
|
||||
FROM DynamicStrings IMPORT String ;
|
||||
|
||||
|
||||
(*
|
||||
SetEnableColor - sets the global variable to, b, and returns
|
||||
the previous value.
|
||||
*)
|
||||
|
||||
PROCEDURE SetEnableColor (b: BOOLEAN) : BOOLEAN ;
|
||||
|
||||
|
||||
(*
|
||||
quoteOpen - adds an open quote to string, s.
|
||||
*)
|
||||
|
||||
PROCEDURE quoteOpen (s: String) : String ;
|
||||
|
||||
|
||||
(*
|
||||
quoteClose - adds a close quote to string, s.
|
||||
*)
|
||||
|
||||
PROCEDURE quoteClose (s: String) : String ;
|
||||
|
||||
|
||||
(*
|
||||
endColor - stops using color.
|
||||
*)
|
||||
|
||||
PROCEDURE endColor (s: String) : String ;
|
||||
|
||||
|
||||
(*
|
||||
quoteColor - adds quote color to string, s.
|
||||
*)
|
||||
|
||||
PROCEDURE quoteColor (s: String) : String ;
|
||||
|
||||
|
||||
(*
|
||||
errorColor - adds error color to string, s.
|
||||
*)
|
||||
|
||||
PROCEDURE errorColor (s: String) : String ;
|
||||
|
||||
|
||||
(*
|
||||
warningColor - adds warning color to string, s.
|
||||
*)
|
||||
|
||||
PROCEDURE warningColor (s: String) : String ;
|
||||
|
||||
|
||||
(*
|
||||
noteColor - adds note color to string, s.
|
||||
*)
|
||||
|
||||
PROCEDURE noteColor (s: String) : String ;
|
||||
|
||||
|
||||
(*
|
||||
locusColor - adds locus color to string, s.
|
||||
*)
|
||||
|
||||
PROCEDURE locusColor (s: String) : String ;
|
||||
|
||||
|
||||
(*
|
||||
insertColor - adds fixit-insert color to string, s.
|
||||
*)
|
||||
|
||||
PROCEDURE insertColor (s: String) : String ;
|
||||
|
||||
|
||||
(*
|
||||
deleteColor - adds fixit-insert color to string, s.
|
||||
*)
|
||||
|
||||
PROCEDURE deleteColor (s: String) : String ;
|
||||
|
||||
|
||||
(*
|
||||
filenameColor - adds filename color to string, s.
|
||||
*)
|
||||
|
||||
PROCEDURE filenameColor (s: String) : String ;
|
||||
|
||||
|
||||
(*
|
||||
typeColor - adds type color to string, s.
|
||||
*)
|
||||
|
||||
PROCEDURE typeColor (s: String) : String ;
|
||||
|
||||
|
||||
(*
|
||||
range1Color - adds type color to string, s.
|
||||
*)
|
||||
|
||||
PROCEDURE range1Color (s: String) : String ;
|
||||
|
||||
|
||||
(*
|
||||
range2Color - adds type color to string, s.
|
||||
*)
|
||||
|
||||
PROCEDURE range2Color (s: String) : String ;
|
||||
|
||||
|
||||
END M2ColorString.
|
||||
218
gcc/m2/gm2-compiler/M2ColorString.mod
Normal file
218
gcc/m2/gm2-compiler/M2ColorString.mod
Normal file
@@ -0,0 +1,218 @@
|
||||
(* M2ColorString.mod provides procedures for obtaining GCC color strings.
|
||||
|
||||
Copyright (C) 2019-2022 Free Software Foundation, Inc.
|
||||
Contributed by Gaius Mulley <gaius@glam.ac.uk>.
|
||||
|
||||
This file is part of GNU Modula-2.
|
||||
|
||||
GNU Modula-2 is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3, or (at your option)
|
||||
any later version.
|
||||
|
||||
GNU Modula-2 is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU Modula-2; see the file COPYING3. If not see
|
||||
<http://www.gnu.org/licenses/>. *)
|
||||
|
||||
IMPLEMENTATION MODULE M2ColorString ;
|
||||
|
||||
FROM m2color IMPORT colorize_start, colorize_stop, open_quote, close_quote ;
|
||||
FROM DynamicStrings IMPORT InitString, InitStringCharStar,
|
||||
ConCat, ConCatChar, Mark, string, KillString,
|
||||
Dup, char, Length, Mult ;
|
||||
FROM StrLib IMPORT StrLen ;
|
||||
FROM libc IMPORT printf ;
|
||||
|
||||
|
||||
VAR
|
||||
EnableColor: BOOLEAN ;
|
||||
|
||||
|
||||
(*
|
||||
SetEnableColor - sets the global variable to, b, and returns
|
||||
the previous value.
|
||||
*)
|
||||
|
||||
PROCEDURE SetEnableColor (b: BOOLEAN) : BOOLEAN ;
|
||||
VAR
|
||||
previous: BOOLEAN ;
|
||||
BEGIN
|
||||
previous := EnableColor ;
|
||||
EnableColor := b ;
|
||||
RETURN previous
|
||||
END SetEnableColor ;
|
||||
|
||||
|
||||
(*
|
||||
append - appends color string, name, to the end of string, s,
|
||||
and returns, s.
|
||||
*)
|
||||
|
||||
PROCEDURE append (s: String; name: ARRAY OF CHAR) : String ;
|
||||
VAR
|
||||
c: String ;
|
||||
BEGIN
|
||||
c := InitStringCharStar (colorize_start (EnableColor, name, StrLen (name))) ;
|
||||
s := ConCat (s, c) ;
|
||||
c := KillString (c) ;
|
||||
RETURN s
|
||||
END append ;
|
||||
|
||||
|
||||
(*
|
||||
quoteOpen - adds an open quote to string, s.
|
||||
*)
|
||||
|
||||
PROCEDURE quoteOpen (s: String) : String ;
|
||||
BEGIN
|
||||
RETURN ConCat (append (s, "quote"), Mark (InitStringCharStar (open_quote ())))
|
||||
END quoteOpen ;
|
||||
|
||||
|
||||
(*
|
||||
quoteClose - adds a close quote to string, s.
|
||||
*)
|
||||
|
||||
PROCEDURE quoteClose (s: String) : String ;
|
||||
BEGIN
|
||||
s := endColor (s) ;
|
||||
s := append (s, "quote") ;
|
||||
s := ConCat (s, Mark (InitStringCharStar (close_quote ()))) ;
|
||||
s := endColor (s) ;
|
||||
RETURN s
|
||||
END quoteClose ;
|
||||
|
||||
|
||||
(*
|
||||
endColor - stops using color.
|
||||
*)
|
||||
|
||||
PROCEDURE endColor (s: String) : String ;
|
||||
VAR
|
||||
c: String ;
|
||||
BEGIN
|
||||
c := InitStringCharStar (colorize_stop (EnableColor)) ;
|
||||
s := ConCat (s, c) ;
|
||||
c := KillString (c) ;
|
||||
RETURN s
|
||||
END endColor ;
|
||||
|
||||
|
||||
(*
|
||||
quoteColor - adds quote color to string, s.
|
||||
*)
|
||||
|
||||
PROCEDURE quoteColor (s: String) : String ;
|
||||
BEGIN
|
||||
RETURN append (s, "quote")
|
||||
END quoteColor ;
|
||||
|
||||
|
||||
(*
|
||||
errorColor - adds error color to string, s.
|
||||
*)
|
||||
|
||||
PROCEDURE errorColor (s: String) : String ;
|
||||
BEGIN
|
||||
RETURN append (s, "error")
|
||||
END errorColor ;
|
||||
|
||||
|
||||
(*
|
||||
warningColor - adds warning color to string, s.
|
||||
*)
|
||||
|
||||
PROCEDURE warningColor (s: String) : String ;
|
||||
BEGIN
|
||||
RETURN append (s, "warning")
|
||||
END warningColor ;
|
||||
|
||||
|
||||
(*
|
||||
noteColor - adds note color to string, s.
|
||||
*)
|
||||
|
||||
PROCEDURE noteColor (s: String) : String ;
|
||||
BEGIN
|
||||
RETURN append (s, "note")
|
||||
END noteColor ;
|
||||
|
||||
|
||||
(*
|
||||
locusColor - adds locus color to string, s.
|
||||
*)
|
||||
|
||||
PROCEDURE locusColor (s: String) : String ;
|
||||
BEGIN
|
||||
RETURN append (s, "locus")
|
||||
END locusColor ;
|
||||
|
||||
|
||||
(*
|
||||
insertColor - adds fixit-insert color to string, s.
|
||||
*)
|
||||
|
||||
PROCEDURE insertColor (s: String) : String ;
|
||||
BEGIN
|
||||
RETURN append (s, "fixit-insert")
|
||||
END insertColor ;
|
||||
|
||||
|
||||
(*
|
||||
deleteColor - adds fixit-insert color to string, s.
|
||||
*)
|
||||
|
||||
PROCEDURE deleteColor (s: String) : String ;
|
||||
BEGIN
|
||||
RETURN append (s, "fixit-delete")
|
||||
END deleteColor ;
|
||||
|
||||
|
||||
(*
|
||||
filenameColor - adds filename color to string, s.
|
||||
*)
|
||||
|
||||
PROCEDURE filenameColor (s: String) : String ;
|
||||
BEGIN
|
||||
RETURN append (s, "diff-filename")
|
||||
END filenameColor ;
|
||||
|
||||
|
||||
(*
|
||||
typeColor - adds type color to string, s.
|
||||
*)
|
||||
|
||||
PROCEDURE typeColor (s: String) : String ;
|
||||
BEGIN
|
||||
RETURN append (s, "type")
|
||||
END typeColor ;
|
||||
|
||||
|
||||
(*
|
||||
range1Color - adds type color to string, s.
|
||||
*)
|
||||
|
||||
PROCEDURE range1Color (s: String) : String ;
|
||||
BEGIN
|
||||
RETURN append (s, "range1")
|
||||
END range1Color ;
|
||||
|
||||
|
||||
(*
|
||||
range2Color - adds type color to string, s.
|
||||
*)
|
||||
|
||||
PROCEDURE range2Color (s: String) : String ;
|
||||
BEGIN
|
||||
RETURN append (s, "range2")
|
||||
END range2Color ;
|
||||
|
||||
|
||||
BEGIN
|
||||
EnableColor := TRUE
|
||||
END M2ColorString.
|
||||
70
gcc/m2/gm2-compiler/M2Comp.def
Normal file
70
gcc/m2/gm2-compiler/M2Comp.def
Normal file
@@ -0,0 +1,70 @@
|
||||
(* M2Comp.def continually calls the compiler for every source file.
|
||||
|
||||
Copyright (C) 2001-2022 Free Software Foundation, Inc.
|
||||
Contributed by Gaius Mulley <gaius.mulley@southwales.ac.uk>.
|
||||
|
||||
This file is part of GNU Modula-2.
|
||||
|
||||
GNU Modula-2 is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3, or (at your option)
|
||||
any later version.
|
||||
|
||||
GNU Modula-2 is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU Modula-2; see the file COPYING3. If not see
|
||||
<http://www.gnu.org/licenses/>. *)
|
||||
|
||||
DEFINITION MODULE M2Comp ;
|
||||
|
||||
(*
|
||||
Author : Gaius Mulley
|
||||
Title : M2Comp
|
||||
Date : 29/5/87
|
||||
Description: Continually calls the compiler for every source file
|
||||
referenced in the Modula-2 compiler.
|
||||
*)
|
||||
|
||||
FROM SYSTEM IMPORT ADDRESS ;
|
||||
EXPORT QUALIFIED CompilingDefinitionModule,
|
||||
CompilingImplementationModule,
|
||||
CompilingProgramModule,
|
||||
compile ;
|
||||
|
||||
|
||||
(*
|
||||
compile - compile the filename.
|
||||
*)
|
||||
|
||||
PROCEDURE compile (filename: ADDRESS) ;
|
||||
|
||||
|
||||
(*
|
||||
CompilingDefinitionModule - returns true if the current module being
|
||||
compiled is a definition module.
|
||||
*)
|
||||
|
||||
PROCEDURE CompilingDefinitionModule () : BOOLEAN ;
|
||||
|
||||
|
||||
(*
|
||||
CompilingImplementationModule - returns true if the current module being
|
||||
compiled is an implementation module.
|
||||
*)
|
||||
|
||||
PROCEDURE CompilingImplementationModule () : BOOLEAN ;
|
||||
|
||||
|
||||
(*
|
||||
CompilingProgramModule - returns true if the current module being
|
||||
compiled is a program module.
|
||||
*)
|
||||
|
||||
PROCEDURE CompilingProgramModule () : BOOLEAN ;
|
||||
|
||||
|
||||
END M2Comp.
|
||||
652
gcc/m2/gm2-compiler/M2Comp.mod
Normal file
652
gcc/m2/gm2-compiler/M2Comp.mod
Normal file
@@ -0,0 +1,652 @@
|
||||
(* M2Comp.mod continually calls the compiler for every source file.
|
||||
|
||||
Copyright (C) 2001-2022 Free Software Foundation, Inc.
|
||||
Contributed by Gaius Mulley <gaius.mulley@southwales.ac.uk>.
|
||||
|
||||
This file is part of GNU Modula-2.
|
||||
|
||||
GNU Modula-2 is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3, or (at your option)
|
||||
any later version.
|
||||
|
||||
GNU Modula-2 is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU Modula-2; see the file COPYING3. If not see
|
||||
<http://www.gnu.org/licenses/>. *)
|
||||
|
||||
IMPLEMENTATION MODULE M2Comp ;
|
||||
|
||||
|
||||
FROM M2Options IMPORT Statistics, Quiet, WholeProgram, ExtendedOpaque, GenModuleList ;
|
||||
|
||||
FROM M2Pass IMPORT SetPassToPass0, SetPassToPass1, SetPassToPass2, SetPassToPassC, SetPassToPass3,
|
||||
SetPassToNoPass, SetPassToPassHidden ;
|
||||
|
||||
FROM M2Reserved IMPORT toktype ;
|
||||
FROM M2Search IMPORT FindSourceDefFile, FindSourceModFile ;
|
||||
FROM M2Code IMPORT Code ;
|
||||
FROM M2LexBuf IMPORT OpenSource, CloseSource, ResetForNewPass, currenttoken, GetToken, ReInitialize, currentstring, GetTokenNo ;
|
||||
FROM M2FileName IMPORT CalculateFileName ;
|
||||
FROM M2Preprocess IMPORT PreprocessModule ;
|
||||
FROM libc IMPORT exit ;
|
||||
|
||||
FROM M2Error IMPORT ErrorStringAt, ErrorStringAt2, ErrorStringsAt2,
|
||||
WriteFormat0, FlushErrors, FlushWarnings, ResetErrorScope ;
|
||||
|
||||
FROM M2MetaError IMPORT MetaErrorString1, MetaError0, MetaError1 ;
|
||||
FROM FormatStrings IMPORT Sprintf1 ;
|
||||
FROM P0SymBuild IMPORT P0Init, P1Init ;
|
||||
|
||||
IMPORT m2flex ;
|
||||
IMPORT P0SyntaxCheck ;
|
||||
IMPORT P1Build ;
|
||||
IMPORT P2Build ;
|
||||
IMPORT PCBuild ;
|
||||
IMPORT P3Build ;
|
||||
IMPORT PHBuild ;
|
||||
IMPORT PCSymBuild ;
|
||||
|
||||
FROM M2Batch IMPORT GetSource, GetModuleNo, GetDefinitionModuleFile, GetModuleFile,
|
||||
AssociateModule, AssociateDefinition, MakeImplementationSource,
|
||||
MakeProgramSource ;
|
||||
|
||||
FROM SymbolTable IMPORT GetSymName, IsDefImp, NulSym,
|
||||
IsHiddenTypeDeclared, GetFirstUsed, GetMainModule, SetMainModule,
|
||||
ResolveConstructorTypes, SanityCheckConstants, IsDefinitionForC,
|
||||
IsBuiltinInModule, PutModLink, IsDefLink, IsModLink ;
|
||||
|
||||
FROM FIO IMPORT StdErr ;
|
||||
FROM NameKey IMPORT Name, GetKey, KeyToCharStar, makekey ;
|
||||
FROM M2Printf IMPORT fprintf1 ;
|
||||
FROM M2Quiet IMPORT qprintf0, qprintf1, qprintf2 ;
|
||||
FROM DynamicStrings IMPORT String, InitString, KillString, InitStringCharStar, Dup, Mark, string ;
|
||||
|
||||
CONST
|
||||
Debugging = FALSE ;
|
||||
|
||||
VAR
|
||||
ModuleType : (None, Definition, Implementation, Program) ;
|
||||
|
||||
|
||||
(*
|
||||
CompilingDefinitionModule - returns true if the current module being
|
||||
compiled is a definition module.
|
||||
*)
|
||||
|
||||
PROCEDURE CompilingDefinitionModule() : BOOLEAN ;
|
||||
BEGIN
|
||||
RETURN( ModuleType=Definition )
|
||||
END CompilingDefinitionModule ;
|
||||
|
||||
|
||||
(*
|
||||
CompilingImplementationModule - returns true if the current module being
|
||||
compiled is an implementation module.
|
||||
*)
|
||||
|
||||
PROCEDURE CompilingImplementationModule() : BOOLEAN ;
|
||||
BEGIN
|
||||
RETURN( ModuleType=Implementation )
|
||||
END CompilingImplementationModule ;
|
||||
|
||||
|
||||
(*
|
||||
CompilingProgramModule - returns true if the current module being
|
||||
compiled is a program module.
|
||||
*)
|
||||
|
||||
PROCEDURE CompilingProgramModule() : BOOLEAN ;
|
||||
BEGIN
|
||||
RETURN( ModuleType=Program )
|
||||
END CompilingProgramModule ;
|
||||
|
||||
|
||||
(*
|
||||
NeedToParseImplementation -
|
||||
*)
|
||||
|
||||
PROCEDURE NeedToParseImplementation (sym: CARDINAL) : BOOLEAN ;
|
||||
BEGIN
|
||||
RETURN (IsDefImp(sym) AND IsHiddenTypeDeclared(sym) AND ExtendedOpaque) OR
|
||||
(IsDefImp(sym) AND IsBuiltinInModule(sym)) OR
|
||||
(WholeProgram AND (NOT IsDefinitionForC(sym)))
|
||||
END NeedToParseImplementation ;
|
||||
|
||||
|
||||
(*
|
||||
Compile - compile file, s, using a 5 pass technique.
|
||||
*)
|
||||
|
||||
PROCEDURE Compile (s: String) ;
|
||||
BEGIN
|
||||
DoPass0(s) ;
|
||||
FlushWarnings ; FlushErrors ;
|
||||
ResetForNewPass ; ResetErrorScope ;
|
||||
qprintf0('Pass 1: scopes, enumerated types, imports and exports\n') ;
|
||||
DoPass1 ;
|
||||
FlushWarnings ; FlushErrors ;
|
||||
qprintf0('Pass 2: constants and types\n') ;
|
||||
ResetForNewPass ; ResetErrorScope ;
|
||||
DoPass2 ;
|
||||
FlushWarnings ; FlushErrors ;
|
||||
qprintf0('Pass C: aggregate constants\n') ;
|
||||
ResetForNewPass ; ResetErrorScope ;
|
||||
DoPassC ;
|
||||
FlushWarnings ; FlushErrors ;
|
||||
qprintf0('Pass 3: quadruple generation\n') ;
|
||||
ResetForNewPass ; ResetErrorScope ;
|
||||
DoPass3 ;
|
||||
FlushWarnings ; FlushErrors ;
|
||||
qprintf0('Pass 4: gcc tree generation\n') ;
|
||||
Code ;
|
||||
FlushWarnings ; FlushErrors
|
||||
END Compile ;
|
||||
|
||||
|
||||
(*
|
||||
compile - compile the filename.
|
||||
*)
|
||||
|
||||
PROCEDURE compile (filename: ADDRESS) ;
|
||||
VAR
|
||||
f: String ;
|
||||
BEGIN
|
||||
f := InitStringCharStar(filename) ;
|
||||
Compile(f) ;
|
||||
f := KillString(f) ;
|
||||
END compile ;
|
||||
|
||||
|
||||
(*
|
||||
ExamineCompilationUnit - opens the source file to obtain the module name and kind of module.
|
||||
*)
|
||||
|
||||
PROCEDURE ExamineCompilationUnit (VAR name: ADDRESS; VAR isdefimp: BOOLEAN) ;
|
||||
BEGIN
|
||||
isdefimp := FALSE ; (* default to program module *)
|
||||
(* stop if we see eof, ';' or '[' *)
|
||||
WHILE (currenttoken#eoftok) AND (currenttoken#semicolontok) AND (currenttoken#lsbratok) DO
|
||||
IF (currenttoken=implementationtok) OR (currenttoken=definitiontok)
|
||||
THEN
|
||||
isdefimp := TRUE ;
|
||||
GetToken
|
||||
END ;
|
||||
IF currenttoken=identtok
|
||||
THEN
|
||||
name := currentstring ;
|
||||
RETURN
|
||||
END ;
|
||||
GetToken
|
||||
END ;
|
||||
m2flex.M2Error(string(InitString('failed to find module name'))) ;
|
||||
exit(1)
|
||||
END ExamineCompilationUnit ;
|
||||
|
||||
|
||||
(*
|
||||
PeepInto - peeps into source, s, and initializes a definition/implementation or
|
||||
program module accordingly.
|
||||
*)
|
||||
|
||||
PROCEDURE PeepInto (s: String) ;
|
||||
VAR
|
||||
name : ADDRESS ;
|
||||
isdefimp: BOOLEAN ;
|
||||
BEGIN
|
||||
IF OpenSource(PreprocessModule(s))
|
||||
THEN
|
||||
ExamineCompilationUnit(name, isdefimp) ;
|
||||
IF isdefimp
|
||||
THEN
|
||||
SetMainModule(MakeImplementationSource(GetTokenNo(), makekey(name)))
|
||||
ELSE
|
||||
SetMainModule(MakeProgramSource(GetTokenNo(), makekey(name)))
|
||||
END ;
|
||||
CloseSource ;
|
||||
ReInitialize
|
||||
ELSE
|
||||
fprintf1(StdErr, 'failed to open %s\n', s) ;
|
||||
exit(1)
|
||||
END
|
||||
END PeepInto ;
|
||||
|
||||
|
||||
(*
|
||||
DoPass0 -
|
||||
*)
|
||||
|
||||
PROCEDURE DoPass0 (s: String) ;
|
||||
VAR
|
||||
Main,
|
||||
Sym : CARDINAL ;
|
||||
i : CARDINAL ;
|
||||
SymName,
|
||||
FileName: String ;
|
||||
BEGIN
|
||||
P0Init ;
|
||||
SetPassToPass0 ;
|
||||
PeepInto(s) ;
|
||||
Main := GetMainModule() ;
|
||||
i := 1 ;
|
||||
Sym := GetModuleNo(i) ;
|
||||
qprintf1('Compiling: %s\n', s) ;
|
||||
qprintf0('Pass 0: lexical analysis, parsing, modules and associated filenames\n') ;
|
||||
WHILE Sym#NulSym DO
|
||||
SymName := InitStringCharStar(KeyToCharStar(GetSymName(Sym))) ;
|
||||
IF IsDefImp(Sym)
|
||||
THEN
|
||||
IF FindSourceDefFile(SymName, FileName)
|
||||
THEN
|
||||
ModuleType := Definition ;
|
||||
IF OpenSource(AssociateDefinition(PreprocessModule(FileName), Sym))
|
||||
THEN
|
||||
IF NOT P0SyntaxCheck.CompilationUnit()
|
||||
THEN
|
||||
WriteFormat0('compilation failed') ;
|
||||
CloseSource ;
|
||||
RETURN
|
||||
END ;
|
||||
qprintf2 (' Module %-20s : %s', SymName, FileName) ;
|
||||
IF IsDefinitionForC (Sym)
|
||||
THEN
|
||||
qprintf0 (' (for C)')
|
||||
END ;
|
||||
IF IsDefLink (Sym)
|
||||
THEN
|
||||
qprintf0 (' (linking)')
|
||||
END ;
|
||||
qprintf0 ('\n') ;
|
||||
CloseSource
|
||||
ELSE
|
||||
(* Unrecoverable error. *)
|
||||
MetaErrorString1 (Sprintf1 (InitString ('file {%%1EUAF%s} containing module {%%1a} cannot be found'),
|
||||
FileName), Sym)
|
||||
END
|
||||
ELSE
|
||||
(* Unrecoverable error. *)
|
||||
MetaError1 ('the file containing the definition module {%1EMAa} cannot be found', Sym)
|
||||
END ;
|
||||
ModuleType := Implementation
|
||||
ELSE
|
||||
ModuleType := Program
|
||||
END ;
|
||||
IF (Main=Sym) OR NeedToParseImplementation(Sym)
|
||||
THEN
|
||||
(* only need to read implementation module if hidden types are declared or it is the main module *)
|
||||
IF Main=Sym
|
||||
THEN
|
||||
FileName := Dup(s)
|
||||
ELSE
|
||||
IF FindSourceModFile (SymName, FileName)
|
||||
THEN
|
||||
END
|
||||
END ;
|
||||
IF FileName#NIL
|
||||
THEN
|
||||
IF OpenSource (AssociateModule (PreprocessModule (FileName), Sym))
|
||||
THEN
|
||||
IF NOT P0SyntaxCheck.CompilationUnit()
|
||||
THEN
|
||||
WriteFormat0 ('compilation failed') ;
|
||||
CloseSource ;
|
||||
RETURN
|
||||
END ;
|
||||
qprintf2 (' Module %-20s : %s', SymName, FileName) ;
|
||||
IF IsModLink (Sym)
|
||||
THEN
|
||||
qprintf0 (' (linking)')
|
||||
END ;
|
||||
qprintf0 ('\n') ;
|
||||
CloseSource
|
||||
ELSE
|
||||
(* It is quite legitimate to implement a module in C (and pretend it was a M2
|
||||
implementation) providing that it is not the main program module and the
|
||||
definition module do not declare a hidden type when -fextended-opaque
|
||||
is used. *)
|
||||
IF (NOT WholeProgram) OR (Sym=Main) OR IsHiddenTypeDeclared(Sym)
|
||||
THEN
|
||||
(* Unrecoverable error. *)
|
||||
MetaErrorString1 (Sprintf1 (InitString ('file {%%1EUAF%s} containing module {%%1a} cannot be found'),
|
||||
FileName), Sym) ;
|
||||
END
|
||||
END
|
||||
END
|
||||
ELSIF GenModuleList
|
||||
THEN
|
||||
IF NOT IsDefinitionForC (Sym)
|
||||
THEN
|
||||
(* The implementation is only useful if -fgen-module-list= is
|
||||
used and we do not insist upon it. *)
|
||||
IF FindSourceModFile (SymName, FileName)
|
||||
THEN
|
||||
qprintf2 (' Module %-20s : %s (linking)\n', SymName, FileName) ;
|
||||
IF OpenSource (AssociateModule (PreprocessModule (FileName), Sym))
|
||||
THEN
|
||||
PutModLink (Sym, TRUE) ; (* This source is only used to determine link time info. *)
|
||||
IF NOT P0SyntaxCheck.CompilationUnit ()
|
||||
THEN
|
||||
WriteFormat0 ('compilation failed') ;
|
||||
CloseSource ;
|
||||
RETURN
|
||||
END ;
|
||||
CloseSource
|
||||
END
|
||||
END
|
||||
END
|
||||
END ;
|
||||
SymName := KillString (SymName) ;
|
||||
FileName := KillString (FileName) ;
|
||||
INC (i) ;
|
||||
Sym := GetModuleNo (i)
|
||||
END ;
|
||||
SetPassToNoPass
|
||||
END DoPass0 ;
|
||||
|
||||
|
||||
(*
|
||||
DoPass1 - parses the sources of all modules necessary to compile
|
||||
the required module, Main.
|
||||
*)
|
||||
|
||||
PROCEDURE DoPass1 ;
|
||||
VAR
|
||||
name : Name ;
|
||||
Sym : CARDINAL ;
|
||||
i : CARDINAL ;
|
||||
FileName: String ;
|
||||
BEGIN
|
||||
P1Init ;
|
||||
SetPassToPass1 ;
|
||||
i := 1 ;
|
||||
Sym := GetModuleNo(i) ;
|
||||
WHILE Sym#NulSym DO
|
||||
FileName := GetDefinitionModuleFile(Sym) ;
|
||||
IF FileName#NIL
|
||||
THEN
|
||||
IF Debugging
|
||||
THEN
|
||||
name := GetSymName(Sym) ;
|
||||
qprintf1(' Module %a\n', name)
|
||||
END ;
|
||||
IF OpenSource(FileName)
|
||||
THEN
|
||||
ModuleType := Definition ;
|
||||
IF NOT P1Build.CompilationUnit()
|
||||
THEN
|
||||
MetaError0('compilation failed') ;
|
||||
CloseSource ;
|
||||
RETURN
|
||||
END ;
|
||||
CloseSource
|
||||
ELSE
|
||||
fprintf1(StdErr, 'failed to open %s\n', FileName) ;
|
||||
exit(1)
|
||||
END ;
|
||||
ModuleType := Implementation
|
||||
ELSE
|
||||
ModuleType := Program
|
||||
END ;
|
||||
FileName := GetModuleFile(Sym) ;
|
||||
IF FileName#NIL
|
||||
THEN
|
||||
IF Debugging
|
||||
THEN
|
||||
name := GetSymName(Sym) ;
|
||||
qprintf1(' Module %a\n', name)
|
||||
END ;
|
||||
IF OpenSource(FileName)
|
||||
THEN
|
||||
IF NOT P1Build.CompilationUnit()
|
||||
THEN
|
||||
MetaError0('compilation failed') ;
|
||||
CloseSource ;
|
||||
RETURN
|
||||
END ;
|
||||
CloseSource
|
||||
ELSE
|
||||
fprintf1(StdErr, 'failed to open %s\n', FileName) ;
|
||||
exit(1)
|
||||
END
|
||||
END ;
|
||||
INC(i) ;
|
||||
Sym := GetModuleNo(i)
|
||||
END ;
|
||||
SetPassToNoPass
|
||||
END DoPass1 ;
|
||||
|
||||
|
||||
(*
|
||||
DoPass2 - parses the sources of all modules necessary to compile
|
||||
the required module, Main.
|
||||
*)
|
||||
|
||||
PROCEDURE DoPass2 ;
|
||||
VAR
|
||||
name : Name ;
|
||||
Sym : CARDINAL ;
|
||||
i : CARDINAL ;
|
||||
FileName: String ;
|
||||
BEGIN
|
||||
SetPassToPass2 ;
|
||||
i := 1 ;
|
||||
Sym := GetModuleNo(i) ;
|
||||
WHILE Sym#NulSym DO
|
||||
FileName := GetDefinitionModuleFile(Sym) ;
|
||||
IF FileName#NIL
|
||||
THEN
|
||||
IF Debugging
|
||||
THEN
|
||||
name := GetSymName(Sym) ;
|
||||
qprintf1(' Module %a\n', name)
|
||||
END ;
|
||||
IF OpenSource(FileName)
|
||||
THEN
|
||||
ModuleType := Definition ;
|
||||
IF NOT P2Build.CompilationUnit()
|
||||
THEN
|
||||
MetaError0('compilation failed') ;
|
||||
CloseSource ;
|
||||
RETURN
|
||||
END ;
|
||||
CloseSource
|
||||
ELSE
|
||||
fprintf1(StdErr, 'failed to open %s\n', FileName) ;
|
||||
exit(1)
|
||||
END ;
|
||||
ModuleType := Implementation
|
||||
ELSE
|
||||
ModuleType := Program
|
||||
END ;
|
||||
FileName := GetModuleFile(Sym) ;
|
||||
IF FileName#NIL
|
||||
THEN
|
||||
IF Debugging
|
||||
THEN
|
||||
name := GetSymName(Sym) ;
|
||||
qprintf1(' Module %a\n', name)
|
||||
END ;
|
||||
IF OpenSource(FileName)
|
||||
THEN
|
||||
IF NOT P2Build.CompilationUnit()
|
||||
THEN
|
||||
MetaError0('compilation failed') ;
|
||||
CloseSource ;
|
||||
RETURN
|
||||
END ;
|
||||
CloseSource
|
||||
ELSE
|
||||
fprintf1(StdErr, 'failed to open %s\n', FileName) ;
|
||||
exit(1)
|
||||
END
|
||||
END ;
|
||||
INC(i) ;
|
||||
Sym := GetModuleNo(i)
|
||||
END ;
|
||||
SetPassToNoPass
|
||||
END DoPass2 ;
|
||||
|
||||
|
||||
(*
|
||||
DoPassC - parses the sources of all modules necessary to compile
|
||||
the required module, Main.
|
||||
*)
|
||||
|
||||
PROCEDURE DoPassC ;
|
||||
VAR
|
||||
name : Name ;
|
||||
Sym : CARDINAL ;
|
||||
i : CARDINAL ;
|
||||
FileName: String ;
|
||||
BEGIN
|
||||
SetPassToPassC ;
|
||||
i := 1 ;
|
||||
Sym := GetModuleNo(i) ;
|
||||
WHILE Sym#NulSym DO
|
||||
FileName := GetDefinitionModuleFile(Sym) ;
|
||||
IF FileName#NIL
|
||||
THEN
|
||||
IF Debugging
|
||||
THEN
|
||||
name := GetSymName(Sym) ;
|
||||
qprintf1(' Module %a\n', name)
|
||||
END ;
|
||||
IF OpenSource(FileName)
|
||||
THEN
|
||||
ModuleType := Definition ;
|
||||
IF NOT PCBuild.CompilationUnit()
|
||||
THEN
|
||||
MetaError0('compilation failed') ;
|
||||
CloseSource ;
|
||||
RETURN
|
||||
END ;
|
||||
CloseSource
|
||||
ELSE
|
||||
fprintf1(StdErr, 'failed to open %s\n', FileName) ;
|
||||
exit(1)
|
||||
END ;
|
||||
ModuleType := Implementation
|
||||
ELSE
|
||||
ModuleType := Program
|
||||
END ;
|
||||
FileName := GetModuleFile(Sym) ;
|
||||
IF FileName#NIL
|
||||
THEN
|
||||
IF Debugging
|
||||
THEN
|
||||
name := GetSymName(Sym) ;
|
||||
qprintf1(' Module %a\n', name)
|
||||
END ;
|
||||
IF OpenSource(FileName)
|
||||
THEN
|
||||
IF NOT PCBuild.CompilationUnit()
|
||||
THEN
|
||||
MetaError0('compilation failed') ;
|
||||
CloseSource ;
|
||||
RETURN
|
||||
END ;
|
||||
CloseSource
|
||||
ELSE
|
||||
fprintf1(StdErr, 'failed to open %s\n', FileName) ;
|
||||
exit(1)
|
||||
END
|
||||
END ;
|
||||
INC(i) ;
|
||||
Sym := GetModuleNo(i)
|
||||
END ;
|
||||
PCSymBuild.ResolveConstTypes ;
|
||||
ResolveConstructorTypes ;
|
||||
SanityCheckConstants ;
|
||||
SetPassToNoPass
|
||||
END DoPassC ;
|
||||
|
||||
|
||||
(*
|
||||
DoPass3 - parses the sources of all modules necessary to compile
|
||||
the required module, Main.
|
||||
*)
|
||||
|
||||
PROCEDURE DoPass3 ;
|
||||
VAR
|
||||
Main,
|
||||
Sym : CARDINAL ;
|
||||
i : CARDINAL ;
|
||||
FileName: String ;
|
||||
BEGIN
|
||||
SetPassToPass3 ;
|
||||
Main := GetMainModule() ;
|
||||
i := 1 ;
|
||||
Sym := GetModuleNo(i) ;
|
||||
WHILE Sym#NulSym DO
|
||||
FileName := GetDefinitionModuleFile(Sym) ;
|
||||
IF FileName#NIL
|
||||
THEN
|
||||
IF OpenSource(FileName)
|
||||
THEN
|
||||
ModuleType := Definition ;
|
||||
IF NOT P3Build.CompilationUnit()
|
||||
THEN
|
||||
MetaError0('compilation failed') ;
|
||||
CloseSource ;
|
||||
RETURN
|
||||
END ;
|
||||
CloseSource
|
||||
ELSE
|
||||
fprintf1(StdErr, 'failed to open %s\n', FileName) ;
|
||||
exit(1)
|
||||
END ;
|
||||
ModuleType := Implementation
|
||||
ELSE
|
||||
ModuleType := Program
|
||||
END ;
|
||||
FileName := GetModuleFile(Sym) ;
|
||||
IF FileName#NIL
|
||||
THEN
|
||||
IF OpenSource(FileName)
|
||||
THEN
|
||||
IF (Main=Sym) OR WholeProgram
|
||||
THEN
|
||||
IF NOT P3Build.CompilationUnit()
|
||||
THEN
|
||||
MetaError0('compilation failed') ;
|
||||
CloseSource ;
|
||||
RETURN
|
||||
END
|
||||
ELSE
|
||||
(*
|
||||
not the main module .mod therefore must be implementing
|
||||
a hidden type - we dont want to generate any
|
||||
StatementSequence quadrupes but we do want to build TYPEs
|
||||
and ConstExpressions.
|
||||
*)
|
||||
SetPassToNoPass ;
|
||||
SetPassToPassHidden ;
|
||||
IF NOT PHBuild.CompilationUnit()
|
||||
THEN
|
||||
MetaError0('compilation failed') ;
|
||||
CloseSource ;
|
||||
RETURN
|
||||
END ;
|
||||
SetPassToNoPass ;
|
||||
SetPassToPass3
|
||||
END ;
|
||||
CloseSource
|
||||
ELSE
|
||||
fprintf1(StdErr, 'failed to open %s\n', FileName) ;
|
||||
exit(1)
|
||||
END
|
||||
END ;
|
||||
INC(i) ;
|
||||
Sym := GetModuleNo(i)
|
||||
END ;
|
||||
SetPassToNoPass
|
||||
END DoPass3 ;
|
||||
|
||||
|
||||
BEGIN
|
||||
ModuleType := None
|
||||
END M2Comp.
|
||||
39
gcc/m2/gm2-compiler/M2Const.def
Normal file
39
gcc/m2/gm2-compiler/M2Const.def
Normal file
@@ -0,0 +1,39 @@
|
||||
(* M2Const.def maintain and resolve the types of constants.
|
||||
|
||||
Copyright (C) 2010-2022 Free Software Foundation, Inc.
|
||||
Contributed by Gaius Mulley <gaius.mulley@southwales.ac.uk>.
|
||||
|
||||
This file is part of GNU Modula-2.
|
||||
|
||||
GNU Modula-2 is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3, or (at your option)
|
||||
any later version.
|
||||
|
||||
GNU Modula-2 is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU Modula-2; see the file COPYING3. If not see
|
||||
<http://www.gnu.org/licenses/>. *)
|
||||
|
||||
DEFINITION MODULE M2Const ;
|
||||
|
||||
(*
|
||||
Title : M2Const
|
||||
Author : Gaius Mulley
|
||||
System : GNU Modula-2
|
||||
Date : Thu Dec 23 15:02:59 2010
|
||||
Revision : $Version$
|
||||
Description: provides a module which maintains and resolves the types of constants.
|
||||
*)
|
||||
|
||||
EXPORT QUALIFIED constType ;
|
||||
|
||||
TYPE
|
||||
constType = (unknown, set, str, constructor, array, cast, boolean, ztype, rtype, ctype, procedure, char) ;
|
||||
|
||||
|
||||
END M2Const.
|
||||
501
gcc/m2/gm2-compiler/M2Const.mod
Normal file
501
gcc/m2/gm2-compiler/M2Const.mod
Normal file
@@ -0,0 +1,501 @@
|
||||
(* M2Const.mod maintain and resolve the types of constants.
|
||||
|
||||
Copyright (C) 2010-2022 Free Software Foundation, Inc.
|
||||
Contributed by Gaius Mulley <gaius.mulley@southwales.ac.uk>.
|
||||
|
||||
This file is part of GNU Modula-2.
|
||||
|
||||
GNU Modula-2 is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3, or (at your option)
|
||||
any later version.
|
||||
|
||||
GNU Modula-2 is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU Modula-2; see the file COPYING3. If not see
|
||||
<http://www.gnu.org/licenses/>. *)
|
||||
|
||||
IMPLEMENTATION MODULE M2Const ;
|
||||
|
||||
(*
|
||||
CONST
|
||||
Debugging = FALSE ;
|
||||
DebugConsts = FALSE ;
|
||||
|
||||
TYPE
|
||||
constList = POINTER TO cList ;
|
||||
cList = RECORD
|
||||
constsym : CARDINAL ;
|
||||
constmeta: constType ;
|
||||
expr : CARDINAL ;
|
||||
type : CARDINAL ;
|
||||
next : constList ;
|
||||
END ;
|
||||
|
||||
|
||||
VAR
|
||||
headOfConsts: constList ;
|
||||
|
||||
|
||||
PROCEDURE stop ; BEGIN END stop ;
|
||||
|
||||
|
||||
(*
|
||||
addToConstList - add a constant, sym, to the head of the constants list.
|
||||
*)
|
||||
|
||||
PROCEDURE addToConstList (sym: CARDINAL) ;
|
||||
VAR
|
||||
h: constList ;
|
||||
BEGIN
|
||||
h := headOfConsts ;
|
||||
WHILE h#NIL DO
|
||||
IF h^.constsym=sym
|
||||
THEN
|
||||
InternalError ('should never see the same symbol id declared twice')
|
||||
END ;
|
||||
h := h^.next
|
||||
END ;
|
||||
NEW(h) ;
|
||||
WITH h^ DO
|
||||
constsym := sym ;
|
||||
constmeta := unknown ;
|
||||
expr := NulSym ;
|
||||
type := NulSym ;
|
||||
next := headOfConsts
|
||||
END ;
|
||||
headOfConsts := h
|
||||
END addToConstList ;
|
||||
|
||||
|
||||
(*
|
||||
FixupConstAsString - fixes up a constant, sym, which will have the string type.
|
||||
*)
|
||||
|
||||
PROCEDURE FixupConstAsString (sym: CARDINAL) ;
|
||||
BEGIN
|
||||
fixupConstMeta(sym, str)
|
||||
END FixupConstAsString ;
|
||||
|
||||
|
||||
(*
|
||||
FixupConstType - fixes up a constant, sym, which will have the type, consttype.
|
||||
*)
|
||||
|
||||
PROCEDURE FixupConstType (sym: CARDINAL; consttype: CARDINAL) ;
|
||||
VAR
|
||||
h: constList ;
|
||||
BEGIN
|
||||
h := headOfConsts ;
|
||||
WHILE h#NIL DO
|
||||
WITH h^ DO
|
||||
IF constsym=sym
|
||||
THEN
|
||||
IF constmeta=str
|
||||
THEN
|
||||
InternalError ('cannot fix up a constant to have a type if it is already known as a string')
|
||||
END ;
|
||||
type := consttype ;
|
||||
PutConst(sym, consttype) ;
|
||||
RETURN
|
||||
END
|
||||
END ;
|
||||
h := h^.next
|
||||
END
|
||||
END FixupConstType ;
|
||||
|
||||
|
||||
(*
|
||||
FixupProcedureType - creates a proctype from a procedure.
|
||||
*)
|
||||
|
||||
PROCEDURE FixupProcedureType (p: CARDINAL) : CARDINAL ;
|
||||
VAR
|
||||
par,
|
||||
t : CARDINAL ;
|
||||
n, i: CARDINAL ;
|
||||
BEGIN
|
||||
IF IsProcedure(p)
|
||||
THEN
|
||||
t := MakeProcType(CheckAnonymous(NulName)) ;
|
||||
i := 1 ;
|
||||
n := NoOfParam(p) ;
|
||||
WHILE i<=n DO
|
||||
par := GetParam(p, i) ;
|
||||
IF IsParameterVar(par)
|
||||
THEN
|
||||
PutProcTypeVarParam(t, GetType(par), IsParameterUnbounded(par))
|
||||
ELSE
|
||||
PutProcTypeParam(t, GetType(par), IsParameterUnbounded(par))
|
||||
END ;
|
||||
INC(i)
|
||||
END ;
|
||||
IF GetType(p)#NulSym
|
||||
THEN
|
||||
PutFunction(t, GetType(p))
|
||||
END ;
|
||||
RETURN( t )
|
||||
ELSE
|
||||
InternalError ('expecting a procedure')
|
||||
END ;
|
||||
RETURN( NulSym )
|
||||
END FixupProcedureType ;
|
||||
|
||||
|
||||
(*
|
||||
FixupConstProcedure - fixes up a constant, sym, which will be equivalent to e.
|
||||
*)
|
||||
|
||||
PROCEDURE FixupConstProcedure (sym: CARDINAL; e: CARDINAL) ;
|
||||
VAR
|
||||
h: constList ;
|
||||
BEGIN
|
||||
h := headOfConsts ;
|
||||
WHILE h#NIL DO
|
||||
WITH h^ DO
|
||||
IF constsym=sym
|
||||
THEN
|
||||
expr := e ;
|
||||
type := FixupProcedureType(e) ;
|
||||
PutConst(sym, type) ;
|
||||
RETURN
|
||||
END
|
||||
END ;
|
||||
h := h^.next
|
||||
END
|
||||
END FixupConstProcedure ;
|
||||
|
||||
|
||||
(*
|
||||
FixupConstExpr - fixes up a constant, sym, which will be equivalent to e.
|
||||
*)
|
||||
|
||||
PROCEDURE FixupConstExpr (sym: CARDINAL; e: CARDINAL) ;
|
||||
VAR
|
||||
h: constList ;
|
||||
BEGIN
|
||||
h := headOfConsts ;
|
||||
WHILE h#NIL DO
|
||||
WITH h^ DO
|
||||
IF constsym=sym
|
||||
THEN
|
||||
expr := e ;
|
||||
RETURN
|
||||
END
|
||||
END ;
|
||||
h := h^.next
|
||||
END
|
||||
END FixupConstExpr ;
|
||||
|
||||
|
||||
(*
|
||||
fixupConstMeta - fixes up symbol, sym, to have the, meta, constType.
|
||||
*)
|
||||
|
||||
PROCEDURE FixupConstMeta (sym: CARDINAL; meta: constType) ;
|
||||
VAR
|
||||
h: constList ;
|
||||
BEGIN
|
||||
h := headOfConsts ;
|
||||
WHILE h#NIL DO
|
||||
WITH h^ DO
|
||||
IF constsym=sym
|
||||
THEN
|
||||
constmeta := meta ;
|
||||
RETURN
|
||||
END
|
||||
END ;
|
||||
h := h^.next
|
||||
END
|
||||
END FixupConstMeta ;
|
||||
|
||||
|
||||
(*
|
||||
fixupConstCast -
|
||||
*)
|
||||
|
||||
PROCEDURE fixupConstCast (sym: CARDINAL; castType: CARDINAL) ;
|
||||
VAR
|
||||
h: constList ;
|
||||
BEGIN
|
||||
h := headOfConsts ;
|
||||
WHILE h#NIL DO
|
||||
WITH h^ DO
|
||||
IF constsym=sym
|
||||
THEN
|
||||
type := castType ;
|
||||
RETURN
|
||||
END
|
||||
END ;
|
||||
h := h^.next
|
||||
END
|
||||
END fixupConstCast ;
|
||||
|
||||
|
||||
(*
|
||||
findConstType -
|
||||
*)
|
||||
|
||||
PROCEDURE findConstType (sym: CARDINAL) : CARDINAL ;
|
||||
VAR
|
||||
h: constList ;
|
||||
t: CARDINAL ;
|
||||
BEGIN
|
||||
h := headOfConsts ;
|
||||
WHILE h#NIL DO
|
||||
WITH h^ DO
|
||||
IF constsym=sym
|
||||
THEN
|
||||
t := GetType(sym) ;
|
||||
IF t=NulSym
|
||||
THEN
|
||||
RETURN( NulSym )
|
||||
ELSE
|
||||
RETURN( t )
|
||||
END
|
||||
END
|
||||
END ;
|
||||
h := h^.next
|
||||
END ;
|
||||
RETURN( NulSym )
|
||||
END findConstType ;
|
||||
|
||||
|
||||
(*
|
||||
findConstMeta -
|
||||
*)
|
||||
|
||||
PROCEDURE findConstMeta (sym: CARDINAL) : constType ;
|
||||
VAR
|
||||
h: constList ;
|
||||
BEGIN
|
||||
h := headOfConsts ;
|
||||
WHILE h#NIL DO
|
||||
WITH h^ DO
|
||||
IF constsym=sym
|
||||
THEN
|
||||
RETURN( constmeta )
|
||||
END
|
||||
END ;
|
||||
h := h^.next
|
||||
END ;
|
||||
RETURN( unknown )
|
||||
END findConstMeta ;
|
||||
|
||||
|
||||
(*
|
||||
ReportUnresolvedConstTypes - emits an error message for any unresolved constant type.
|
||||
*)
|
||||
|
||||
PROCEDURE ReportUnresolvedConstTypes ;
|
||||
VAR
|
||||
h: constList ;
|
||||
BEGIN
|
||||
h := headOfConsts ;
|
||||
WHILE h#NIL DO
|
||||
WITH h^ DO
|
||||
IF (constmeta#unknown) AND (constmeta#str) AND (type=NulSym)
|
||||
THEN
|
||||
MetaError1('unable to resolve the type of the constant {%1Dad}', h^.constsym)
|
||||
END
|
||||
END ;
|
||||
h := h^.next
|
||||
END
|
||||
END ReportUnresolvedConstTypes ;
|
||||
|
||||
|
||||
(*
|
||||
DebugMeta -
|
||||
*)
|
||||
|
||||
PROCEDURE DebugMeta (h: constList) ;
|
||||
VAR
|
||||
n: Name ;
|
||||
BEGIN
|
||||
IF DebugConsts
|
||||
THEN
|
||||
WITH h^ DO
|
||||
n := GetSymName(constsym) ;
|
||||
printf1('constant %a ', n) ;
|
||||
IF type=NulSym
|
||||
THEN
|
||||
printf0('type is unknown\n')
|
||||
ELSE
|
||||
printf0('type is known\n')
|
||||
END
|
||||
END
|
||||
END
|
||||
END DebugMeta ;
|
||||
|
||||
|
||||
(*
|
||||
constTypeResolved -
|
||||
*)
|
||||
|
||||
PROCEDURE constTypeResolved (h: constList) : BOOLEAN ;
|
||||
BEGIN
|
||||
RETURN( h^.type#NulSym )
|
||||
END constTypeResolved ;
|
||||
|
||||
|
||||
(*
|
||||
constExprResolved -
|
||||
*)
|
||||
|
||||
PROCEDURE constExprResolved (h: constList) : BOOLEAN ;
|
||||
BEGIN
|
||||
RETURN( h^.expr#NulSym )
|
||||
END constExprResolved ;
|
||||
|
||||
|
||||
(*
|
||||
findConstMetaExpr -
|
||||
*)
|
||||
|
||||
PROCEDURE findConstMetaExpr (h: constList) : constType ;
|
||||
BEGIN
|
||||
RETURN( h^.constmeta )
|
||||
END findConstMetaExpr ;
|
||||
|
||||
|
||||
(*
|
||||
constResolveViaMeta -
|
||||
*)
|
||||
|
||||
PROCEDURE constResolveViaMeta (h: constList) : BOOLEAN ;
|
||||
VAR
|
||||
n: Name ;
|
||||
BEGIN
|
||||
WITH h^ DO
|
||||
IF findConstMetaExpr(h)=str
|
||||
THEN
|
||||
PutConstString(constsym, MakeKey('')) ;
|
||||
IF DebugConsts
|
||||
THEN
|
||||
n := GetSymName(constsym) ;
|
||||
printf1('resolved constant %a as a string\n', n)
|
||||
END ;
|
||||
RETURN( TRUE )
|
||||
END
|
||||
END ;
|
||||
RETURN( FALSE )
|
||||
END constResolveViaMeta ;
|
||||
|
||||
|
||||
(*
|
||||
constResolvedViaType -
|
||||
*)
|
||||
|
||||
PROCEDURE constResolvedViaType (h: constList) : BOOLEAN ;
|
||||
VAR
|
||||
n: Name ;
|
||||
BEGIN
|
||||
WITH h^ DO
|
||||
type := findConstType(expr) ;
|
||||
IF type#NulSym
|
||||
THEN
|
||||
PutConst(constsym, type) ;
|
||||
IF DebugConsts
|
||||
THEN
|
||||
n := GetSymName(constsym) ;
|
||||
printf1('resolved type of constant %a\n', n)
|
||||
END ;
|
||||
RETURN( TRUE )
|
||||
END
|
||||
END ;
|
||||
RETURN( FALSE )
|
||||
END constResolvedViaType ;
|
||||
|
||||
|
||||
(*
|
||||
resolveConstType -
|
||||
*)
|
||||
|
||||
PROCEDURE resolveConstType (h: constList) : BOOLEAN ;
|
||||
BEGIN
|
||||
WITH h^ DO
|
||||
IF (constmeta=unknown) OR (constmeta=str)
|
||||
THEN
|
||||
(* do nothing *)
|
||||
ELSE
|
||||
DebugMeta(h) ;
|
||||
IF constTypeResolved(h)
|
||||
THEN
|
||||
(* nothing to do *)
|
||||
ELSE
|
||||
IF constExprResolved(h)
|
||||
THEN
|
||||
IF constResolveViaMeta(h)
|
||||
THEN
|
||||
RETURN( TRUE )
|
||||
ELSIF constResolvedViaType(h)
|
||||
THEN
|
||||
RETURN( TRUE )
|
||||
END
|
||||
END
|
||||
END
|
||||
END
|
||||
END ;
|
||||
RETURN( FALSE )
|
||||
END resolveConstType ;
|
||||
|
||||
|
||||
(*
|
||||
ResolveConstTypes - resolves the types of all aggegrate constants.
|
||||
*)
|
||||
|
||||
PROCEDURE ResolveConstTypes ;
|
||||
VAR
|
||||
h : constList ;
|
||||
changed: BOOLEAN ;
|
||||
BEGIN
|
||||
REPEAT
|
||||
changed := FALSE ;
|
||||
h := headOfConsts ;
|
||||
WHILE h#NIL DO
|
||||
changed := resolveConstType(h) ;
|
||||
h := h^.next
|
||||
END
|
||||
UNTIL NOT changed ;
|
||||
ReportUnresolvedConstTypes
|
||||
END ResolveConstTypes ;
|
||||
|
||||
|
||||
(*
|
||||
SkipConst - returns the symbol which is a pseudonum of, sym.
|
||||
*)
|
||||
|
||||
PROCEDURE SkipConst (sym: CARDINAL) : CARDINAL ;
|
||||
VAR
|
||||
init: CARDINAL ;
|
||||
h : constList ;
|
||||
BEGIN
|
||||
init := sym ;
|
||||
h := headOfConsts ;
|
||||
WHILE h#NIL DO
|
||||
IF (h^.constsym=sym) AND (h^.expr#NulSym)
|
||||
THEN
|
||||
sym := h^.expr ;
|
||||
IF sym=init
|
||||
THEN
|
||||
(* circular definition found *)
|
||||
RETURN( sym )
|
||||
END ;
|
||||
h := headOfConsts
|
||||
ELSE
|
||||
h := h^.next
|
||||
END
|
||||
END ;
|
||||
RETURN( sym )
|
||||
END SkipConst ;
|
||||
|
||||
|
||||
BEGIN
|
||||
headOfConsts := NIL
|
||||
*)
|
||||
BEGIN
|
||||
END M2Const.
|
||||
49
gcc/m2/gm2-compiler/M2Debug.def
Normal file
49
gcc/m2/gm2-compiler/M2Debug.def
Normal file
@@ -0,0 +1,49 @@
|
||||
(* M2Debug.def simple debugging facilities in the Modula-2 compiler.
|
||||
|
||||
Copyright (C) 2001-2022 Free Software Foundation, Inc.
|
||||
Contributed by Gaius Mulley <gaius.mulley@southwales.ac.uk>.
|
||||
|
||||
This file is part of GNU Modula-2.
|
||||
|
||||
GNU Modula-2 is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3, or (at your option)
|
||||
any later version.
|
||||
|
||||
GNU Modula-2 is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU Modula-2; see the file COPYING3. If not see
|
||||
<http://www.gnu.org/licenses/>. *)
|
||||
DEFINITION MODULE M2Debug ;
|
||||
|
||||
(*
|
||||
Author : Gaius Mulley
|
||||
Title : M2Debug
|
||||
Date : 30/5/87
|
||||
Description: Implements the Debugging facilities in the Modula-2 compiler.
|
||||
Last update: 30/5/87
|
||||
*)
|
||||
|
||||
EXPORT QUALIFIED Assert, WriteDebug ;
|
||||
|
||||
|
||||
(*
|
||||
Assert - tests the boolean, q. If false then an error is reported
|
||||
and the execution is HALTed.
|
||||
*)
|
||||
|
||||
PROCEDURE Assert (q: BOOLEAN) ;
|
||||
|
||||
|
||||
(*
|
||||
WriteDebug - only writes a string if the debugging mode is on.
|
||||
*)
|
||||
|
||||
PROCEDURE WriteDebug (a: ARRAY OF CHAR) ;
|
||||
|
||||
|
||||
END M2Debug.
|
||||
57
gcc/m2/gm2-compiler/M2Debug.mod
Normal file
57
gcc/m2/gm2-compiler/M2Debug.mod
Normal file
@@ -0,0 +1,57 @@
|
||||
(* M2Debug.mod simple debugging facilities in the Modula-2 compiler.
|
||||
|
||||
Copyright (C) 2001-2022 Free Software Foundation, Inc.
|
||||
Contributed by Gaius Mulley <gaius.mulley@southwales.ac.uk>.
|
||||
|
||||
This file is part of GNU Modula-2.
|
||||
|
||||
GNU Modula-2 is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3, or (at your option)
|
||||
any later version.
|
||||
|
||||
GNU Modula-2 is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU Modula-2; see the file COPYING3. If not see
|
||||
<http://www.gnu.org/licenses/>. *)
|
||||
|
||||
IMPLEMENTATION MODULE M2Debug ;
|
||||
|
||||
|
||||
FROM StrIO IMPORT WriteString, WriteLn ;
|
||||
FROM M2Error IMPORT InternalError ;
|
||||
FROM M2Options IMPORT CompilerDebugging ;
|
||||
|
||||
|
||||
(*
|
||||
Assert - tests the boolean, q. If false then an error is reported
|
||||
and the execution is HALTed.
|
||||
*)
|
||||
|
||||
PROCEDURE Assert (q: BOOLEAN) ;
|
||||
BEGIN
|
||||
IF NOT q
|
||||
THEN
|
||||
InternalError ('assert failed')
|
||||
END
|
||||
END Assert ;
|
||||
|
||||
|
||||
(*
|
||||
WriteDebug - only writes a string if the debugging mode is on.
|
||||
*)
|
||||
|
||||
PROCEDURE WriteDebug (a: ARRAY OF CHAR) ;
|
||||
BEGIN
|
||||
IF CompilerDebugging
|
||||
THEN
|
||||
WriteString(a) ; WriteLn
|
||||
END
|
||||
END WriteDebug ;
|
||||
|
||||
|
||||
END M2Debug.
|
||||
51
gcc/m2/gm2-compiler/M2DebugStack.def
Normal file
51
gcc/m2/gm2-compiler/M2DebugStack.def
Normal file
@@ -0,0 +1,51 @@
|
||||
(* M2DebugStack.def display parameter stack.
|
||||
|
||||
Copyright (C) 2011-2022 Free Software Foundation, Inc.
|
||||
Contributed by Gaius Mulley <gaius.mulley@southwales.ac.uk>.
|
||||
|
||||
This file is part of GNU Modula-2.
|
||||
|
||||
GNU Modula-2 is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3, or (at your option)
|
||||
any later version.
|
||||
|
||||
GNU Modula-2 is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU Modula-2; see the file COPYING3. If not see
|
||||
<http://www.gnu.org/licenses/>. *)
|
||||
|
||||
DEFINITION MODULE M2DebugStack ;
|
||||
|
||||
(*
|
||||
Title : M2DebugStack
|
||||
Author : Gaius Mulley
|
||||
System : GNU Modula-2
|
||||
Date : Mon Dec 5 16:19:43 2011
|
||||
Revision : $Version$
|
||||
Description: provides a procedure which displays the
|
||||
compile time stack neatly and with annotation.
|
||||
*)
|
||||
|
||||
FROM SYSTEM IMPORT WORD ;
|
||||
FROM DynamicStrings IMPORT String ;
|
||||
|
||||
TYPE
|
||||
ProcedureWord = PROCEDURE (CARDINAL) : WORD ;
|
||||
ProcedureString = PROCEDURE (CARDINAL) : String ;
|
||||
|
||||
|
||||
(*
|
||||
DebugStack - displays the stack.
|
||||
*)
|
||||
|
||||
PROCEDURE DebugStack (amount: CARDINAL;
|
||||
opt, opf, opa, opd, oprw, optk: ProcedureWord;
|
||||
opanno: ProcedureString) ;
|
||||
|
||||
|
||||
END M2DebugStack.
|
||||
884
gcc/m2/gm2-compiler/M2DebugStack.mod
Normal file
884
gcc/m2/gm2-compiler/M2DebugStack.mod
Normal file
@@ -0,0 +1,884 @@
|
||||
(* M2DebugStack.mod display parameter stack.
|
||||
|
||||
Copyright (C) 2011-2022 Free Software Foundation, Inc.
|
||||
Contributed by Gaius Mulley <gaius.mulley@southwales.ac.uk>.
|
||||
|
||||
This file is part of GNU Modula-2.
|
||||
|
||||
GNU Modula-2 is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3, or (at your option)
|
||||
any later version.
|
||||
|
||||
GNU Modula-2 is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU Modula-2; see the file COPYING3. If not see
|
||||
<http://www.gnu.org/licenses/>. *)
|
||||
|
||||
IMPLEMENTATION MODULE M2DebugStack ;
|
||||
|
||||
FROM DynamicStrings IMPORT InitString, KillString, Dup, Index, Slice, char,
|
||||
ConCat, ConCatChar, InitStringCharStar, Length, Mark ;
|
||||
|
||||
FROM SymbolTable IMPORT IsConstLit, IsConstSet, IsConstructor, IsConst,
|
||||
IsArray, IsVar, IsEnumeration, IsFieldEnumeration,
|
||||
IsUnbounded, IsProcType, IsProcedure, IsPointer, IsParameter,
|
||||
IsParameterVar, IsType, IsRecord, IsRecordField, IsVarient,
|
||||
IsModule, IsDefImp, IsSet, IsSubrange, GetSymName, NulSym ;
|
||||
|
||||
FROM StringConvert IMPORT CardinalToString ;
|
||||
FROM NameKey IMPORT Name, KeyToCharStar ;
|
||||
FROM FIO IMPORT File, StdOut ;
|
||||
FROM SFIO IMPORT WriteS ;
|
||||
FROM M2Error IMPORT InternalError ;
|
||||
FROM M2Printf IMPORT printf0, printf1, printf2, printf3, printf4 ;
|
||||
|
||||
CONST
|
||||
Debugging = FALSE ;
|
||||
|
||||
VAR
|
||||
OperandTok,
|
||||
OperandT,
|
||||
OperandF,
|
||||
OperandA,
|
||||
OperandD,
|
||||
OperandRW : ProcedureWord ;
|
||||
OperandAnno: ProcedureString ;
|
||||
|
||||
|
||||
(*
|
||||
x - checks to see that a=b.
|
||||
*)
|
||||
|
||||
PROCEDURE x (a, b: String) : String ;
|
||||
BEGIN
|
||||
IF a#b
|
||||
THEN
|
||||
InternalError ('different string returned')
|
||||
END ;
|
||||
RETURN( a )
|
||||
END x ;
|
||||
|
||||
|
||||
(*
|
||||
IsWhite - returns TRUE if, ch, is a space.
|
||||
*)
|
||||
|
||||
PROCEDURE IsWhite (ch: CHAR) : BOOLEAN ;
|
||||
BEGIN
|
||||
RETURN( ch=' ' )
|
||||
END IsWhite ;
|
||||
|
||||
|
||||
(*
|
||||
ConCatWord - joins sentances, a, b, together.
|
||||
*)
|
||||
|
||||
PROCEDURE ConCatWord (a, b: String) : String ;
|
||||
BEGIN
|
||||
IF (Length(a)=1) AND (char(a, 0)='a')
|
||||
THEN
|
||||
a := x(a, ConCatChar(a, 'n'))
|
||||
ELSIF (Length(a)>1) AND (char(a, -1)='a') AND IsWhite(char(a, -2))
|
||||
THEN
|
||||
a := x(a, ConCatChar(a, 'n'))
|
||||
END ;
|
||||
IF (Length(a)>0) AND (NOT IsWhite(char(a, -1)))
|
||||
THEN
|
||||
a := x(a, ConCatChar(a, ' '))
|
||||
END ;
|
||||
RETURN( x(a, ConCat(a, b)) )
|
||||
END ConCatWord ;
|
||||
|
||||
|
||||
(*
|
||||
symDesc -
|
||||
*)
|
||||
|
||||
PROCEDURE symDesc (sym: CARDINAL; o: String) : String ;
|
||||
BEGIN
|
||||
IF sym = NulSym
|
||||
THEN
|
||||
RETURN( ConCatWord(o, Mark(InitString('NulSym'))) )
|
||||
ELSIF IsConstLit(sym)
|
||||
THEN
|
||||
RETURN( ConCatWord(o, Mark(InitString('constant literal'))) )
|
||||
ELSIF IsConstSet(sym)
|
||||
THEN
|
||||
RETURN( ConCatWord(o, Mark(InitString('constant set'))) )
|
||||
ELSIF IsConstructor(sym)
|
||||
THEN
|
||||
RETURN( ConCatWord(o, Mark(InitString('constructor'))) )
|
||||
ELSIF IsConst(sym)
|
||||
THEN
|
||||
RETURN( ConCatWord(o, Mark(InitString('constant'))) )
|
||||
ELSIF IsArray(sym)
|
||||
THEN
|
||||
RETURN( ConCatWord(o, Mark(InitString('array'))) )
|
||||
ELSIF IsVar(sym)
|
||||
THEN
|
||||
RETURN( ConCatWord(o, Mark(InitString('variable'))) )
|
||||
ELSIF IsEnumeration(sym)
|
||||
THEN
|
||||
RETURN( ConCatWord(o, Mark(InitString('enumeration type'))) )
|
||||
ELSIF IsFieldEnumeration(sym)
|
||||
THEN
|
||||
RETURN( ConCatWord(o, Mark(InitString('enumeration field'))) )
|
||||
ELSIF IsUnbounded(sym)
|
||||
THEN
|
||||
RETURN( ConCatWord(o, Mark(InitString('unbounded parameter'))) )
|
||||
ELSIF IsProcType(sym)
|
||||
THEN
|
||||
RETURN( ConCatWord(o, Mark(InitString('procedure type'))) )
|
||||
ELSIF IsProcedure(sym)
|
||||
THEN
|
||||
RETURN( ConCatWord(o, Mark(InitString('procedure'))) )
|
||||
ELSIF IsPointer(sym)
|
||||
THEN
|
||||
RETURN( ConCatWord(o, Mark(InitString('pointer'))) )
|
||||
ELSIF IsParameter(sym)
|
||||
THEN
|
||||
IF IsParameterVar(sym)
|
||||
THEN
|
||||
RETURN( ConCatWord(o, Mark(InitString('var parameter'))) )
|
||||
ELSE
|
||||
RETURN( ConCatWord(o, Mark(InitString('parameter'))) )
|
||||
END
|
||||
ELSIF IsType(sym)
|
||||
THEN
|
||||
RETURN( ConCatWord(o, Mark(InitString('type'))) )
|
||||
ELSIF IsRecord(sym)
|
||||
THEN
|
||||
RETURN( ConCatWord(o, Mark(InitString('record'))) )
|
||||
ELSIF IsRecordField(sym)
|
||||
THEN
|
||||
RETURN( ConCatWord(o, Mark(InitString('record field'))) )
|
||||
ELSIF IsVarient(sym)
|
||||
THEN
|
||||
RETURN( ConCatWord(o, Mark(InitString('varient record'))) )
|
||||
ELSIF IsModule(sym)
|
||||
THEN
|
||||
RETURN( ConCatWord(o, Mark(InitString('module'))) )
|
||||
ELSIF IsDefImp(sym)
|
||||
THEN
|
||||
RETURN( ConCatWord(o, Mark(InitString('definition or implementation module'))) )
|
||||
ELSIF IsSet(sym)
|
||||
THEN
|
||||
RETURN( ConCatWord(o, Mark(InitString('set'))) )
|
||||
ELSIF IsSubrange(sym)
|
||||
THEN
|
||||
RETURN( ConCatWord(o, Mark(InitString('subrange'))) )
|
||||
ELSE
|
||||
RETURN( o )
|
||||
END
|
||||
END symDesc ;
|
||||
|
||||
|
||||
(*
|
||||
Output - output string, s, to Stdout. It also disposes of the string, s.
|
||||
*)
|
||||
|
||||
PROCEDURE Output (s: String) ;
|
||||
BEGIN
|
||||
s := WriteS(StdOut, s) ;
|
||||
s := KillString(s)
|
||||
END Output ;
|
||||
|
||||
|
||||
(*
|
||||
GetComment -
|
||||
*)
|
||||
|
||||
PROCEDURE GetComment (s: String) : INTEGER ;
|
||||
VAR
|
||||
c: INTEGER ;
|
||||
BEGIN
|
||||
c := Index(s, '|', 0) ;
|
||||
WHILE c>=0 DO
|
||||
INC(c) ;
|
||||
IF c>=VAL(INTEGER, Length(s))
|
||||
THEN
|
||||
RETURN -1
|
||||
ELSIF char(s, c)='|'
|
||||
THEN
|
||||
RETURN c+1
|
||||
END ;
|
||||
c := Index(s, '|', c)
|
||||
END ;
|
||||
RETURN -1
|
||||
END GetComment ;
|
||||
|
||||
|
||||
(*
|
||||
doName - concatenate namekey, o, to, p.
|
||||
*)
|
||||
|
||||
PROCEDURE doName (p: String; o: WORD) : String ;
|
||||
BEGIN
|
||||
RETURN ConCat(p, InitStringCharStar(KeyToCharStar(o))) ;
|
||||
END doName ;
|
||||
|
||||
|
||||
(*
|
||||
doSymName - concatenate symbol, o, name to, p.
|
||||
*)
|
||||
|
||||
PROCEDURE doSymName (p: String; o: WORD) : String ;
|
||||
BEGIN
|
||||
RETURN ConCat(p, InitStringCharStar(KeyToCharStar(GetSymName(o)))) ;
|
||||
END doSymName ;
|
||||
|
||||
|
||||
(*
|
||||
doNumber - convert, o, to a cardinal and increment the length, l,
|
||||
by the number of characters required to represent, o.
|
||||
*)
|
||||
|
||||
PROCEDURE doNumber (p: String; o: WORD) : String ;
|
||||
BEGIN
|
||||
RETURN ConCat(p, CardinalToString(VAL(CARDINAL, o), 0, ' ', 10, TRUE))
|
||||
END doNumber ;
|
||||
|
||||
|
||||
(*
|
||||
doSymbol - handles a symbol indicated by, o.
|
||||
*)
|
||||
|
||||
PROCEDURE doSymbol (p: String; o: WORD) : String ;
|
||||
BEGIN
|
||||
RETURN symDesc(o, p)
|
||||
END doSymbol ;
|
||||
|
||||
|
||||
(*
|
||||
doOperand -
|
||||
*)
|
||||
|
||||
PROCEDURE doOperand (p, s: String; VAR i: INTEGER; e: INTEGER; o: WORD) : String ;
|
||||
BEGIN
|
||||
INC(i) ;
|
||||
IF i<e
|
||||
THEN
|
||||
CASE char(s, i) OF
|
||||
|
||||
's': (* symbol number *)
|
||||
INC(i) ;
|
||||
RETURN doSymbol(p, o) |
|
||||
'd': (* decimal number *)
|
||||
INC(i) ;
|
||||
RETURN doNumber(p, o) |
|
||||
'a': (* symbol name key *)
|
||||
INC(i) ;
|
||||
RETURN doSymName(p, o) |
|
||||
'n': (* ascii name key *)
|
||||
INC(i) ;
|
||||
RETURN doName(p, o)
|
||||
|
||||
ELSE
|
||||
InternalError ("incorrect format specifier expecting one of 's', 'd' or 'a'")
|
||||
END
|
||||
END ;
|
||||
RETURN p
|
||||
END doOperand ;
|
||||
|
||||
|
||||
(*
|
||||
doPercent -
|
||||
*)
|
||||
|
||||
PROCEDURE doPercent (o, s: String;
|
||||
VAR i: INTEGER; e: INTEGER; n: CARDINAL) : String ;
|
||||
BEGIN
|
||||
INC(i) ;
|
||||
IF i<e
|
||||
THEN
|
||||
CASE char(s, i) OF
|
||||
|
||||
'1': RETURN doOperand(o, s, i, e, OperandT(n)) |
|
||||
'2': RETURN doOperand(o, s, i, e, OperandF(n)) |
|
||||
'3': RETURN doOperand(o, s, i, e, OperandTok(n))
|
||||
|
||||
ELSE
|
||||
InternalError ('unrecognised format specifier - expecting 1, 2 or 3 after the %')
|
||||
END
|
||||
END ;
|
||||
InternalError ('end of field found before format specifier - expecting 1, 2 or 3 after the %')
|
||||
END doPercent ;
|
||||
|
||||
|
||||
(*
|
||||
doNameLength - increment, l, by the ascii length of string determined by, o.
|
||||
*)
|
||||
|
||||
PROCEDURE doNameLength (VAR l: CARDINAL; o: WORD) ;
|
||||
VAR
|
||||
s: String ;
|
||||
BEGIN
|
||||
s := InitStringCharStar(KeyToCharStar(o)) ;
|
||||
INC(l, Length(s)) ;
|
||||
s := KillString(s)
|
||||
END doNameLength ;
|
||||
|
||||
|
||||
(*
|
||||
doSymNameLength - increment, l, by the ascii length of symbol, o.
|
||||
*)
|
||||
|
||||
PROCEDURE doSymNameLength (VAR l: CARDINAL; o: WORD) ;
|
||||
VAR
|
||||
s: String ;
|
||||
BEGIN
|
||||
s := InitStringCharStar(KeyToCharStar(GetSymName(o))) ;
|
||||
INC(l, Length(s)) ;
|
||||
s := KillString(s)
|
||||
END doSymNameLength ;
|
||||
|
||||
|
||||
(*
|
||||
doNumberLength - convert, o, to a cardinal and increment the length, l,
|
||||
by the number of characters required to represent, o.
|
||||
*)
|
||||
|
||||
PROCEDURE doNumberLength (VAR l: CARDINAL; o: WORD) ;
|
||||
VAR
|
||||
s: String ;
|
||||
BEGIN
|
||||
s := CardinalToString(VAL(CARDINAL, o), 0, ' ', 10, TRUE) ;
|
||||
INC(l, Length(s)) ;
|
||||
s := KillString(s)
|
||||
END doNumberLength ;
|
||||
|
||||
|
||||
(*
|
||||
doSymbolLength - handles a symbol indicated by, o.
|
||||
*)
|
||||
|
||||
PROCEDURE doSymbolLength (VAR l: CARDINAL; o: WORD) ;
|
||||
VAR
|
||||
s: String ;
|
||||
BEGIN
|
||||
s := symDesc(o, InitString('')) ;
|
||||
INC(l, Length(s)) ;
|
||||
s := KillString(s)
|
||||
END doSymbolLength ;
|
||||
|
||||
|
||||
(*
|
||||
doOperandLength -
|
||||
*)
|
||||
|
||||
PROCEDURE doOperandLength (s: String; VAR i: INTEGER; e: INTEGER; VAR l: CARDINAL; o: WORD) ;
|
||||
BEGIN
|
||||
INC(i) ;
|
||||
IF i<e
|
||||
THEN
|
||||
CASE char(s, i) OF
|
||||
|
||||
's': (* symbol number *)
|
||||
INC(i) ;
|
||||
doSymbolLength(l, o) |
|
||||
'd': (* decimal number *)
|
||||
INC(i) ;
|
||||
doNumberLength(l, o) |
|
||||
'a': (* ascii name key *)
|
||||
INC(i) ;
|
||||
doSymNameLength(l, o) |
|
||||
'n': (* ascii name key *)
|
||||
INC(i) ;
|
||||
doNameLength(l, o)
|
||||
|
||||
ELSE
|
||||
InternalError ("incorrect format specifier expecting one of 's', 'd' or 'a'")
|
||||
END
|
||||
END
|
||||
END doOperandLength ;
|
||||
|
||||
|
||||
(*
|
||||
doPercentLength -
|
||||
*)
|
||||
|
||||
PROCEDURE doPercentLength (s: String; VAR i: INTEGER; e: INTEGER;
|
||||
VAR l: CARDINAL; n: CARDINAL) ;
|
||||
BEGIN
|
||||
INC(i) ;
|
||||
IF i<e
|
||||
THEN
|
||||
CASE char(s, i) OF
|
||||
|
||||
'1': doOperandLength(s, i, e, l, OperandT(n)) |
|
||||
'2': doOperandLength(s, i, e, l, OperandF(n)) |
|
||||
'3': doOperandLength(s, i, e, l, OperandTok(n)) |
|
||||
|
||||
ELSE
|
||||
InternalError ('unrecognised format specifier - expecting 1, 2 or 3 after the %')
|
||||
END
|
||||
END
|
||||
END doPercentLength ;
|
||||
|
||||
|
||||
(*
|
||||
doFieldLength - compute the string length given in annotation
|
||||
at position, n, on the stack between characters
|
||||
b and e.
|
||||
|
||||
The string description between: b..e can contain any
|
||||
of these patterns:
|
||||
|
||||
%a ascii name key.
|
||||
%s symbol number.
|
||||
%d decimal cardinal number.
|
||||
| indicates the next field.
|
||||
*)
|
||||
|
||||
PROCEDURE doFieldLength (b, e: INTEGER; n: CARDINAL) : CARDINAL ;
|
||||
VAR
|
||||
l: CARDINAL ;
|
||||
i: INTEGER ;
|
||||
s: String ;
|
||||
BEGIN
|
||||
IF b=-1
|
||||
THEN
|
||||
RETURN( 0 )
|
||||
END ;
|
||||
s := OperandAnno(n) ;
|
||||
IF e=-1
|
||||
THEN
|
||||
e := Length(s)
|
||||
END ;
|
||||
l := 0 ;
|
||||
i := b ;
|
||||
WHILE i<e DO
|
||||
CASE char(s, i) OF
|
||||
|
||||
'|': RETURN l |
|
||||
'%': doPercentLength(s, i, e, l, n) ;
|
||||
|
||||
ELSE
|
||||
INC(l)
|
||||
END ;
|
||||
INC(i)
|
||||
END ;
|
||||
RETURN l
|
||||
END doFieldLength ;
|
||||
|
||||
|
||||
(*
|
||||
stop -
|
||||
*)
|
||||
|
||||
PROCEDURE stop ;
|
||||
BEGIN
|
||||
END stop ;
|
||||
|
||||
|
||||
(*
|
||||
doMaxCard - returns the maximum of two CARDINALs.
|
||||
*)
|
||||
|
||||
PROCEDURE doMaxCard (a, b: CARDINAL) : CARDINAL ;
|
||||
BEGIN
|
||||
IF (a>100) OR (b>100)
|
||||
THEN
|
||||
stop
|
||||
END ;
|
||||
IF a>b
|
||||
THEN
|
||||
RETURN a
|
||||
ELSE
|
||||
RETURN b
|
||||
END
|
||||
END doMaxCard ;
|
||||
|
||||
|
||||
(*
|
||||
GetAnnotationFieldLength -
|
||||
*)
|
||||
|
||||
PROCEDURE GetAnnotationFieldLength (n: CARDINAL; f: CARDINAL) : CARDINAL ;
|
||||
VAR
|
||||
c, e: INTEGER ;
|
||||
BEGIN
|
||||
c := GetComment(OperandAnno(n)) ;
|
||||
IF c>0
|
||||
THEN
|
||||
IF Debugging
|
||||
THEN
|
||||
printf0('full anno is: ') ; Output(Dup(OperandAnno(n))) ; printf0('\n') ;
|
||||
printf0('comment field is: ') ; Output(Slice(OperandAnno(n), c, 0)) ; printf0('\n')
|
||||
END ;
|
||||
e := Index(OperandAnno(n), '|', c) ;
|
||||
IF f=0
|
||||
THEN
|
||||
RETURN doFieldLength(c, e, n)
|
||||
ELSE
|
||||
IF e>=0
|
||||
THEN
|
||||
INC(e)
|
||||
END ;
|
||||
RETURN doFieldLength(e, -1, n)
|
||||
END
|
||||
ELSE
|
||||
RETURN 0
|
||||
END
|
||||
END GetAnnotationFieldLength ;
|
||||
|
||||
|
||||
(*
|
||||
GetAnnotationLength -
|
||||
*)
|
||||
|
||||
PROCEDURE GetAnnotationLength (n: CARDINAL; f: CARDINAL) : CARDINAL ;
|
||||
VAR
|
||||
l: CARDINAL ;
|
||||
BEGIN
|
||||
IF OperandAnno(n)=NIL
|
||||
THEN
|
||||
l := 0 ;
|
||||
IF f=0
|
||||
THEN
|
||||
doNumberLength(l, OperandT(n))
|
||||
ELSE
|
||||
doNumberLength(l, OperandF(n))
|
||||
END ;
|
||||
RETURN l
|
||||
ELSE
|
||||
RETURN GetAnnotationFieldLength(n, f)
|
||||
END
|
||||
END GetAnnotationLength ;
|
||||
|
||||
|
||||
(*
|
||||
GetFieldLength - returns the number of characters used in field, f,
|
||||
at position, n, on the stack.
|
||||
*)
|
||||
|
||||
PROCEDURE GetFieldLength (n: CARDINAL; f: CARDINAL) : CARDINAL ;
|
||||
VAR
|
||||
c, b, e: INTEGER ;
|
||||
BEGIN
|
||||
c := GetComment(OperandAnno(n)) ;
|
||||
IF c>1
|
||||
THEN
|
||||
e := c-2
|
||||
ELSE
|
||||
e := Length(OperandAnno(n))
|
||||
END ;
|
||||
IF f=0
|
||||
THEN
|
||||
b := 0
|
||||
ELSE
|
||||
b := Index(OperandAnno(n), '|', 0) ;
|
||||
IF b=-1
|
||||
THEN
|
||||
RETURN 0
|
||||
ELSE
|
||||
INC(b)
|
||||
END
|
||||
END ;
|
||||
RETURN doFieldLength(b, e, n)
|
||||
END GetFieldLength ;
|
||||
|
||||
|
||||
(*
|
||||
GetMaxFieldAnno - returns the maximum number of characters required
|
||||
by either the annotation or field, f, at position, n,
|
||||
on the stack.
|
||||
*)
|
||||
|
||||
PROCEDURE GetMaxFieldAnno (n: CARDINAL; f: CARDINAL) : CARDINAL ;
|
||||
BEGIN
|
||||
RETURN doMaxCard(GetAnnotationLength(n, f), GetFieldLength(n, f))
|
||||
END GetMaxFieldAnno ;
|
||||
|
||||
|
||||
(*
|
||||
GetStackFieldLengths - assigns, tn, and, fn, with the
|
||||
maximum field width values.
|
||||
*)
|
||||
|
||||
PROCEDURE GetStackFieldLengths (VAR tn, fn, tk: CARDINAL; amount: CARDINAL) ;
|
||||
VAR
|
||||
i: CARDINAL ;
|
||||
BEGIN
|
||||
i := 1 ;
|
||||
tn := 0 ;
|
||||
fn := 0 ;
|
||||
tk := 0 ;
|
||||
WHILE i<=amount DO
|
||||
tn := doMaxCard(tn, GetMaxFieldAnno(i, 0)) ;
|
||||
fn := doMaxCard(fn, GetMaxFieldAnno(i, 1)) ;
|
||||
tk := doMaxCard(tk, GetMaxFieldAnno(i, 2)) ;
|
||||
INC(i)
|
||||
END
|
||||
END GetStackFieldLengths ;
|
||||
|
||||
|
||||
(*
|
||||
DisplayRow -
|
||||
*)
|
||||
|
||||
PROCEDURE DisplayRow (tn, fn, tk: CARDINAL; initOrFinal: BOOLEAN) ;
|
||||
VAR
|
||||
i: CARDINAL ;
|
||||
BEGIN
|
||||
printf0('+-') ;
|
||||
FOR i := 1 TO tn DO
|
||||
printf0('-')
|
||||
END ;
|
||||
IF (fn=0) AND (tk=0)
|
||||
THEN
|
||||
IF initOrFinal
|
||||
THEN
|
||||
printf0('-+-')
|
||||
ELSE
|
||||
printf0('-|-')
|
||||
END
|
||||
ELSE
|
||||
IF initOrFinal
|
||||
THEN
|
||||
printf0('-+-')
|
||||
ELSE
|
||||
printf0('-|-')
|
||||
END ;
|
||||
IF fn#0
|
||||
THEN
|
||||
FOR i := 1 TO fn DO
|
||||
printf0('-')
|
||||
END
|
||||
END ;
|
||||
IF initOrFinal
|
||||
THEN
|
||||
printf0('-+-')
|
||||
ELSE
|
||||
printf0('-|-')
|
||||
END ;
|
||||
IF tk#0
|
||||
THEN
|
||||
FOR i := 1 TO tk DO
|
||||
printf0('-')
|
||||
END ;
|
||||
printf0('-+\n')
|
||||
END
|
||||
END
|
||||
END DisplayRow ;
|
||||
|
||||
|
||||
(*
|
||||
SkipToField -
|
||||
*)
|
||||
|
||||
PROCEDURE SkipToField (s: String; n: CARDINAL) : INTEGER ;
|
||||
VAR
|
||||
i, h: INTEGER ;
|
||||
BEGIN
|
||||
i := 0 ;
|
||||
h := Length(s) ;
|
||||
WHILE (n>0) AND (i<h) DO
|
||||
IF Index(s, '|', i)>0
|
||||
THEN
|
||||
DEC(n) ;
|
||||
IF (i<h) AND (char(s, i+1)='|')
|
||||
THEN
|
||||
(* comment seen, no field available *)
|
||||
RETURN -1
|
||||
END ;
|
||||
i := Index(s, '|', i)
|
||||
ELSE
|
||||
RETURN -1
|
||||
END ;
|
||||
INC(i)
|
||||
END ;
|
||||
IF i=h
|
||||
THEN
|
||||
i := -1
|
||||
END ;
|
||||
RETURN i
|
||||
END SkipToField ;
|
||||
|
||||
|
||||
(*
|
||||
Pad - padds out string, s, to paddedLength characters.
|
||||
*)
|
||||
|
||||
PROCEDURE Pad (o: String; paddedLength: CARDINAL) : String ;
|
||||
VAR
|
||||
i: CARDINAL ;
|
||||
BEGIN
|
||||
i := Length(o) ;
|
||||
IF i<paddedLength
|
||||
THEN
|
||||
REPEAT
|
||||
o := ConCatChar(o, ' ') ;
|
||||
INC(i)
|
||||
UNTIL i=paddedLength
|
||||
END ;
|
||||
RETURN o
|
||||
END Pad ;
|
||||
|
||||
|
||||
(*
|
||||
doField - compute the string length given in annotation
|
||||
at position, n, on the stack between characters
|
||||
b and e.
|
||||
|
||||
The string description between: b..e can contain any
|
||||
of these patterns:
|
||||
|
||||
%a ascii name key.
|
||||
%s symbol number.
|
||||
%d decimal cardinal number.
|
||||
| indicates the next field.
|
||||
*)
|
||||
|
||||
PROCEDURE doField (s: String; n: CARDINAL; f: CARDINAL; l: CARDINAL) : String ;
|
||||
VAR
|
||||
h, i, j: INTEGER ;
|
||||
o : String ;
|
||||
BEGIN
|
||||
h := Length(s) ;
|
||||
i := SkipToField(s, f) ;
|
||||
o := InitString('') ;
|
||||
IF i>=0
|
||||
THEN
|
||||
j := SkipToField(s, f+1) ;
|
||||
IF j=-1
|
||||
THEN
|
||||
j := h
|
||||
END ;
|
||||
WHILE i<h DO
|
||||
CASE char(s, i) OF
|
||||
|
||||
'|': i := h |
|
||||
'%': o := doPercent(o, s, i, h, n)
|
||||
|
||||
ELSE
|
||||
o := ConCatChar(o, char(s, i)) ;
|
||||
INC(i)
|
||||
END
|
||||
END
|
||||
END ;
|
||||
o := Pad(o, l) ;
|
||||
RETURN o
|
||||
END doField ;
|
||||
|
||||
|
||||
(*
|
||||
doAnnotation -
|
||||
*)
|
||||
|
||||
PROCEDURE doAnnotation (s: String; n: CARDINAL;
|
||||
field: CARDINAL; width: CARDINAL) : String ;
|
||||
VAR
|
||||
c : INTEGER ;
|
||||
cf, o: String ;
|
||||
BEGIN
|
||||
c := GetComment(s) ;
|
||||
IF c>=0
|
||||
THEN
|
||||
cf := Slice(s, c, 0) ;
|
||||
o := doField(cf, n, field, width) ;
|
||||
cf := KillString(cf) ;
|
||||
RETURN o
|
||||
ELSE
|
||||
RETURN InitString('')
|
||||
END
|
||||
END doAnnotation ;
|
||||
|
||||
|
||||
(*
|
||||
DisplayFields -
|
||||
*)
|
||||
|
||||
PROCEDURE DisplayFields (n: CARDINAL; tn, fn, tk: CARDINAL) ;
|
||||
VAR
|
||||
s : String ;
|
||||
t, f, k: CARDINAL ;
|
||||
BEGIN
|
||||
s := OperandAnno(n) ;
|
||||
IF s=NIL
|
||||
THEN
|
||||
t := OperandT(n) ;
|
||||
f := OperandF(n) ;
|
||||
k := OperandTok(n) ;
|
||||
printf0('| ') ;
|
||||
Output(Pad(CardinalToString(VAL(CARDINAL, t), 0, ' ', 10, TRUE), tn)) ;
|
||||
printf0(' | ') ;
|
||||
Output(Pad(CardinalToString(VAL(CARDINAL, f), 0, ' ', 10, TRUE), fn)) ;
|
||||
printf0(' | ') ;
|
||||
Output(Pad(CardinalToString(VAL(CARDINAL, k), 0, ' ', 10, TRUE), tk)) ;
|
||||
printf0(' |\n')
|
||||
ELSE
|
||||
IF tn>0
|
||||
THEN
|
||||
printf0('| ') ;
|
||||
Output(doField(s, n, 0, tn))
|
||||
END ;
|
||||
IF fn>0
|
||||
THEN
|
||||
printf0(' | ') ;
|
||||
Output(doField(s, n, 1, fn))
|
||||
END ;
|
||||
IF tk>0
|
||||
THEN
|
||||
printf0(' | ') ;
|
||||
Output(doField(s, n, 2, tk))
|
||||
END ;
|
||||
printf0(' |\n') ;
|
||||
IF tn>0
|
||||
THEN
|
||||
printf0('| ') ;
|
||||
Output(doAnnotation(s, n, 0, tn))
|
||||
END ;
|
||||
IF fn>0
|
||||
THEN
|
||||
printf0(' | ') ;
|
||||
Output(doAnnotation(s, n, 1, fn))
|
||||
END ;
|
||||
IF tk>0
|
||||
THEN
|
||||
printf0(' | ') ;
|
||||
Output(doAnnotation(s, n, 2, tk))
|
||||
END ;
|
||||
printf0(' |\n')
|
||||
END
|
||||
END DisplayFields ;
|
||||
|
||||
|
||||
(*
|
||||
DebugStack - displays the stack.
|
||||
*)
|
||||
|
||||
PROCEDURE DebugStack (amount: CARDINAL;
|
||||
opt, opf, opa, opd, oprw, optk: ProcedureWord;
|
||||
opanno: ProcedureString) ;
|
||||
VAR
|
||||
i : CARDINAL ;
|
||||
tn, fn, tk: CARDINAL ;
|
||||
BEGIN
|
||||
OperandT := opt ;
|
||||
OperandF := opf ;
|
||||
OperandA := opa ;
|
||||
OperandD := opd ;
|
||||
OperandRW := oprw ;
|
||||
OperandAnno := opanno ;
|
||||
OperandTok := optk ;
|
||||
GetStackFieldLengths(tn, fn, tk, amount) ;
|
||||
i := 1 ;
|
||||
WHILE i<=amount DO
|
||||
IF i=1
|
||||
THEN
|
||||
DisplayRow(tn, fn, tk, TRUE)
|
||||
END ;
|
||||
DisplayFields(i, tn, fn, tk) ;
|
||||
DisplayRow(tn, fn, tk, i=amount) ;
|
||||
INC(i)
|
||||
END
|
||||
END DebugStack ;
|
||||
|
||||
|
||||
END M2DebugStack.
|
||||
54
gcc/m2/gm2-compiler/M2Defaults.def
Normal file
54
gcc/m2/gm2-compiler/M2Defaults.def
Normal file
@@ -0,0 +1,54 @@
|
||||
(* M2Defaults.def provides path and argument defaults.
|
||||
|
||||
Copyright (C) 2001-2022 Free Software Foundation, Inc.
|
||||
Contributed by Gaius Mulley <gaius.mulley@southwales.ac.uk>.
|
||||
|
||||
This file is part of GNU Modula-2.
|
||||
|
||||
GNU Modula-2 is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3, or (at your option)
|
||||
any later version.
|
||||
|
||||
GNU Modula-2 is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU Modula-2; see the file COPYING3. If not see
|
||||
<http://www.gnu.org/licenses/>. *)
|
||||
|
||||
DEFINITION MODULE M2Defaults;
|
||||
|
||||
(*
|
||||
Title : M2Defaults
|
||||
Author : Gaius Mulley
|
||||
System : UNIX (gm2)
|
||||
Date : Fri Dec 13 13:04:51 1991
|
||||
Last edit : Fri Dec 13 13:04:51 1991
|
||||
Description: Provides mechanisms to collect the default
|
||||
search path and command line options.
|
||||
*)
|
||||
|
||||
FROM DynamicStrings IMPORT String ;
|
||||
EXPORT QUALIFIED GetSearchPath, GetOptions ;
|
||||
|
||||
|
||||
(*
|
||||
GetSearchPath - returns a string, which is a copy of the environment variable
|
||||
M2PATH.
|
||||
*)
|
||||
|
||||
PROCEDURE GetSearchPath () : String ;
|
||||
|
||||
|
||||
(*
|
||||
GetOptions - returns a string, which is a copy of the environment variable
|
||||
M2OPTIONS
|
||||
*)
|
||||
|
||||
PROCEDURE GetOptions () : String ;
|
||||
|
||||
|
||||
END M2Defaults.
|
||||
64
gcc/m2/gm2-compiler/M2Defaults.mod
Normal file
64
gcc/m2/gm2-compiler/M2Defaults.mod
Normal file
@@ -0,0 +1,64 @@
|
||||
(* M2Defaults.mod provides path and argument defaults.
|
||||
|
||||
Copyright (C) 2001-2022 Free Software Foundation, Inc.
|
||||
Contributed by Gaius Mulley <gaius.mulley@southwales.ac.uk>.
|
||||
|
||||
This file is part of GNU Modula-2.
|
||||
|
||||
GNU Modula-2 is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3, or (at your option)
|
||||
any later version.
|
||||
|
||||
GNU Modula-2 is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU Modula-2; see the file COPYING3. If not see
|
||||
<http://www.gnu.org/licenses/>. *)
|
||||
|
||||
IMPLEMENTATION MODULE M2Defaults;
|
||||
|
||||
FROM DynamicStrings IMPORT InitString, KillString ;
|
||||
FROM SEnvironment IMPORT GetEnvironment ;
|
||||
|
||||
|
||||
(*
|
||||
GetSearchPath - sets string, a, to the environment variable
|
||||
M2PATH.
|
||||
*)
|
||||
|
||||
PROCEDURE GetSearchPath () : String ;
|
||||
VAR
|
||||
s, p: String ;
|
||||
BEGIN
|
||||
s := InitString('M2PATH') ;
|
||||
IF GetEnvironment(s, p)
|
||||
THEN
|
||||
END ;
|
||||
s := KillString(s) ;
|
||||
RETURN( p )
|
||||
END GetSearchPath ;
|
||||
|
||||
|
||||
(*
|
||||
GetOptions - returns a string, which is a copy of the environment variable
|
||||
M2OPTIONS
|
||||
*)
|
||||
|
||||
PROCEDURE GetOptions () : String ;
|
||||
VAR
|
||||
s, p: String ;
|
||||
BEGIN
|
||||
s := InitString('M2OPTIONS') ;
|
||||
IF GetEnvironment(s, p)
|
||||
THEN
|
||||
END ;
|
||||
s := KillString(s) ;
|
||||
RETURN( p )
|
||||
END GetOptions ;
|
||||
|
||||
|
||||
END M2Defaults.
|
||||
43
gcc/m2/gm2-compiler/M2DriverOptions.def
Normal file
43
gcc/m2/gm2-compiler/M2DriverOptions.def
Normal file
@@ -0,0 +1,43 @@
|
||||
(* M2DriverOptions.def provides procedures to handle driver options.
|
||||
|
||||
Copyright (C) 2011-2022 Free Software Foundation, Inc.
|
||||
Contributed by Gaius Mulley <gaius.mulley@southwales.ac.uk>.
|
||||
|
||||
This file is part of GNU Modula-2.
|
||||
|
||||
GNU Modula-2 is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3, or (at your option)
|
||||
any later version.
|
||||
|
||||
GNU Modula-2 is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU Modula-2; see the file COPYING3. If not see
|
||||
<http://www.gnu.org/licenses/>. *)
|
||||
|
||||
DEFINITION MODULE M2DriverOptions ;
|
||||
|
||||
(*
|
||||
Title : M2DriverOptions
|
||||
Author : Gaius Mulley
|
||||
System : GNU Modula-2
|
||||
Date : Tue Dec 18 13:52:08 2012
|
||||
Revision : $Version$
|
||||
Description: provides procedures to handle driver options.
|
||||
*)
|
||||
|
||||
FROM DynamicStrings IMPORT String ;
|
||||
|
||||
|
||||
(*
|
||||
ScanCppArgs - scans the cpp arguments and builds up the cpp command line.
|
||||
*)
|
||||
|
||||
PROCEDURE ScanCppArgs (i: CARDINAL) : CARDINAL ;
|
||||
|
||||
|
||||
END M2DriverOptions.
|
||||
95
gcc/m2/gm2-compiler/M2DriverOptions.mod
Normal file
95
gcc/m2/gm2-compiler/M2DriverOptions.mod
Normal file
@@ -0,0 +1,95 @@
|
||||
(* M2DriverOptions.mod provides procedures to handle driver options.
|
||||
|
||||
Copyright (C) 2011-2022 Free Software Foundation, Inc.
|
||||
Contributed by Gaius Mulley <gaius.mulley@southwales.ac.uk>.
|
||||
|
||||
This file is part of GNU Modula-2.
|
||||
|
||||
GNU Modula-2 is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3, or (at your option)
|
||||
any later version.
|
||||
|
||||
GNU Modula-2 is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU Modula-2; see the file COPYING3. If not see
|
||||
<http://www.gnu.org/licenses/>. *)
|
||||
|
||||
IMPLEMENTATION MODULE M2DriverOptions ;
|
||||
|
||||
FROM DynamicStrings IMPORT String, Length, InitString, Mark, Slice, EqualArray,
|
||||
InitStringCharStar, ConCatChar, ConCat, KillString,
|
||||
PushAllocation, PopAllocationExemption, char ;
|
||||
|
||||
FROM SArgs IMPORT GetArg, Narg ;
|
||||
FROM M2Options IMPORT CppRemember ;
|
||||
|
||||
|
||||
(*
|
||||
CppArgument - some options might have arguments, remember these as well.
|
||||
*)
|
||||
|
||||
PROCEDURE CppArgument (i: CARDINAL; option: String) : CARDINAL ;
|
||||
VAR
|
||||
arg: String ;
|
||||
BEGIN
|
||||
IF GetArg (arg, i+1) AND (char (arg, 0) # '-')
|
||||
THEN
|
||||
(* arg exists and is not an option and might be an argument to a specific option. *)
|
||||
IF EqualArray (option, '-I')
|
||||
THEN
|
||||
INC (i) ;
|
||||
CppRemember (arg) (* arg will be a path for -I. *)
|
||||
ELSIF EqualArray (option, '-D')
|
||||
THEN
|
||||
INC (i) ;
|
||||
CppRemember (arg) (* arg will be define for -D. *)
|
||||
ELSIF EqualArray (option, '-isystem')
|
||||
THEN
|
||||
INC (i) ;
|
||||
CppRemember (arg) (* arg will be a path for -isystem. *)
|
||||
ELSIF EqualArray (option, '-imultiarch')
|
||||
THEN
|
||||
INC (i) ;
|
||||
CppRemember (arg) (* arg will be a definition for -imultiarch. *)
|
||||
END
|
||||
END ;
|
||||
RETURN i
|
||||
END CppArgument ;
|
||||
|
||||
|
||||
(*
|
||||
ScanCppArgs - scans the cpp arguments and builds up the cpp command line.
|
||||
*)
|
||||
|
||||
PROCEDURE ScanCppArgs (i: CARDINAL) : CARDINAL ;
|
||||
VAR
|
||||
option: String ;
|
||||
BEGIN
|
||||
IF GetArg (option, i) AND EqualArray (option, '-fcpp-begin')
|
||||
THEN
|
||||
INC (i) ;
|
||||
WHILE GetArg (option, i) DO
|
||||
IF EqualArray (option, '-fcpp-end')
|
||||
THEN
|
||||
RETURN i
|
||||
ELSE
|
||||
(* do not remember the filename. *)
|
||||
IF char (option, 0)='-'
|
||||
THEN
|
||||
CppRemember (option) ;
|
||||
i := CppArgument (i, option)
|
||||
END
|
||||
END ;
|
||||
INC (i)
|
||||
END
|
||||
END ;
|
||||
RETURN i
|
||||
END ScanCppArgs ;
|
||||
|
||||
|
||||
END M2DriverOptions.
|
||||
59
gcc/m2/gm2-compiler/M2Emit.def
Normal file
59
gcc/m2/gm2-compiler/M2Emit.def
Normal file
@@ -0,0 +1,59 @@
|
||||
(* M2Emit.def connects Modula-2 error reporting to GCC.
|
||||
|
||||
Copyright (C) 2001-2022 Free Software Foundation, Inc.
|
||||
Contributed by Gaius Mulley <gaius.mulley@southwales.ac.uk>.
|
||||
|
||||
This file is part of GNU Modula-2.
|
||||
|
||||
GNU Modula-2 is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3, or (at your option)
|
||||
any later version.
|
||||
|
||||
GNU Modula-2 is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU Modula-2; see the file COPYING3. If not see
|
||||
<http://www.gnu.org/licenses/>. *)
|
||||
|
||||
DEFINITION MODULE M2Emit ;
|
||||
|
||||
|
||||
FROM DynamicStrings IMPORT String ;
|
||||
FROM m2linemap IMPORT location_t ;
|
||||
|
||||
|
||||
(*
|
||||
EmitError - pass the error to GCC or the gm2 tools output routines.
|
||||
*)
|
||||
|
||||
PROCEDURE EmitError (error, note: BOOLEAN; token: CARDINAL; message: String) ;
|
||||
|
||||
|
||||
(*
|
||||
InternalError - issue an internal error, message.
|
||||
*)
|
||||
|
||||
PROCEDURE InternalError (message: ARRAY OF CHAR) ;
|
||||
|
||||
|
||||
(*
|
||||
UnknownLocation - return the unknown location (using GCC linemap for cc1gm2)
|
||||
and constants for gm2l and gm2m.
|
||||
*)
|
||||
|
||||
PROCEDURE UnknownLocation () : location_t ;
|
||||
|
||||
|
||||
(*
|
||||
BuiltinsLocation - return the builtins location (using GCC linemap for cc1gm2)
|
||||
and constants for gm2l and gm2m.
|
||||
*)
|
||||
|
||||
PROCEDURE BuiltinsLocation () : location_t ;
|
||||
|
||||
|
||||
END M2Emit.
|
||||
82
gcc/m2/gm2-compiler/M2Emit.mod
Normal file
82
gcc/m2/gm2-compiler/M2Emit.mod
Normal file
@@ -0,0 +1,82 @@
|
||||
(* M2Emit.mod issue errors to the GCC error reporting substructure.
|
||||
|
||||
Copyright (C) 2019-2022 Free Software Foundation, Inc.
|
||||
Contributed by Gaius Mulley <gaius.mulley@southwales.ac.uk>.
|
||||
|
||||
This file is part of GNU Modula-2.
|
||||
|
||||
GNU Modula-2 is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3, or (at your option)
|
||||
any later version.
|
||||
|
||||
GNU Modula-2 is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU Modula-2; see the file COPYING3. If not see
|
||||
<http://www.gnu.org/licenses/>. *)
|
||||
|
||||
IMPLEMENTATION MODULE M2Emit ;
|
||||
|
||||
IMPORT m2linemap ;
|
||||
|
||||
FROM M2LexBuf IMPORT TokenToLocation ;
|
||||
FROM m2linemap IMPORT ErrorAtf, WarningAtf, NoteAtf, internal_error ;
|
||||
FROM DynamicStrings IMPORT string ;
|
||||
FROM SYSTEM IMPORT ADR ;
|
||||
|
||||
|
||||
(*
|
||||
EmitError - pass the error to GCC.
|
||||
*)
|
||||
|
||||
PROCEDURE EmitError (error, note: BOOLEAN; token: CARDINAL; message: String) ;
|
||||
BEGIN
|
||||
IF error
|
||||
THEN
|
||||
ErrorAtf (TokenToLocation (token), string (message))
|
||||
ELSIF note
|
||||
THEN
|
||||
NoteAtf (TokenToLocation (token), string (message))
|
||||
ELSE
|
||||
WarningAtf (TokenToLocation (token), string (message))
|
||||
END
|
||||
END EmitError ;
|
||||
|
||||
|
||||
(*
|
||||
InternalError - issue an internal error, message.
|
||||
*)
|
||||
|
||||
PROCEDURE InternalError (message: ARRAY OF CHAR) ;
|
||||
BEGIN
|
||||
internal_error (ADR (message))
|
||||
END InternalError ;
|
||||
|
||||
|
||||
(*
|
||||
UnknownLocation - return the unknown location (using GCC linemap for cc1gm2)
|
||||
and constants for gm2l and gm2m.
|
||||
*)
|
||||
|
||||
PROCEDURE UnknownLocation () : location_t ;
|
||||
BEGIN
|
||||
RETURN m2linemap.UnknownLocation ()
|
||||
END UnknownLocation ;
|
||||
|
||||
|
||||
(*
|
||||
BuiltinsLocation - return the builtins location (using GCC linemap for cc1gm2)
|
||||
and constants for gm2l and gm2m.
|
||||
*)
|
||||
|
||||
PROCEDURE BuiltinsLocation () : location_t ;
|
||||
BEGIN
|
||||
RETURN m2linemap.BuiltinsLocation ()
|
||||
END BuiltinsLocation ;
|
||||
|
||||
|
||||
END M2Emit.
|
||||
364
gcc/m2/gm2-compiler/M2Error.def
Normal file
364
gcc/m2/gm2-compiler/M2Error.def
Normal file
@@ -0,0 +1,364 @@
|
||||
(* M2Error.def error reporting interface.
|
||||
|
||||
Copyright (C) 2001-2022 Free Software Foundation, Inc.
|
||||
Contributed by Gaius Mulley <gaius.mulley@southwales.ac.uk>.
|
||||
|
||||
This file is part of GNU Modula-2.
|
||||
|
||||
GNU Modula-2 is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3, or (at your option)
|
||||
any later version.
|
||||
|
||||
GNU Modula-2 is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU Modula-2; see the file COPYING3. If not see
|
||||
<http://www.gnu.org/licenses/>. *)
|
||||
|
||||
DEFINITION MODULE M2Error ;
|
||||
|
||||
(*
|
||||
Title : M2Error
|
||||
Author : Gaius Mulley
|
||||
System : UNIX (gm2)
|
||||
Description: provides an interface between the string handling modules
|
||||
and the compiler.
|
||||
*)
|
||||
|
||||
FROM SYSTEM IMPORT BYTE ;
|
||||
FROM DynamicStrings IMPORT String ;
|
||||
FROM NameKey IMPORT Name ;
|
||||
|
||||
EXPORT QUALIFIED Error, ErrorScope,
|
||||
InternalError,
|
||||
WriteFormat0, WriteFormat1, WriteFormat2, WriteFormat3,
|
||||
NewError, ErrorFormat0, ErrorFormat1, ErrorFormat2, ErrorFormat3,
|
||||
ErrorString,
|
||||
NewWarning, NewNote, SetColor,
|
||||
FlushErrors, FlushWarnings, ChainError,
|
||||
ErrorStringAt, ErrorStringAt2, ErrorStringsAt2,
|
||||
WarnStringAt, WarnStringAt2, WarnStringsAt2,
|
||||
ErrorAbort0,
|
||||
WarnFormat0, WarnFormat1, MoveError,
|
||||
AnnounceScope, EnterImplementationScope,
|
||||
EnterModuleScope, EnterDefinitionScope, EnterProgramScope,
|
||||
EnterProcedureScope, DepthScope, GetAnnounceScope,
|
||||
DefaultProgramModule, DefaultImplementationModule,
|
||||
DefaultDefinitionModule, DefaultInnerModule, DefaultProcedure,
|
||||
EnterErrorScope, GetCurrentErrorScope, ResetErrorScope,
|
||||
LeaveErrorScope ;
|
||||
|
||||
|
||||
TYPE
|
||||
Error ;
|
||||
ErrorScope ;
|
||||
|
||||
|
||||
(*
|
||||
InternalError - displays an internal error message together with the compiler source
|
||||
file and line number.
|
||||
This function is not buffered and is used when the compiler is about
|
||||
to give up.
|
||||
*)
|
||||
|
||||
PROCEDURE InternalError (message: ARRAY OF CHAR) <* noreturn *> ;
|
||||
|
||||
|
||||
|
||||
(* ***************************************************************************
|
||||
The following routines are used for normal syntax and semantic error reporting
|
||||
*************************************************************************** *)
|
||||
|
||||
|
||||
(*
|
||||
WriteFormat0 - displays the source module and line together
|
||||
with the encapsulated format string.
|
||||
Used for simple error messages tied to the current token.
|
||||
*)
|
||||
|
||||
PROCEDURE WriteFormat0 (a: ARRAY OF CHAR) ;
|
||||
|
||||
|
||||
(*
|
||||
WriteFormat1 - displays the source module and line together
|
||||
with the encapsulated format string.
|
||||
Used for simple error messages tied to the current token.
|
||||
*)
|
||||
|
||||
PROCEDURE WriteFormat1 (a: ARRAY OF CHAR; w: ARRAY OF BYTE) ;
|
||||
|
||||
|
||||
(*
|
||||
WriteFormat2 - displays the module and line together with the encapsulated
|
||||
format strings.
|
||||
Used for simple error messages tied to the current token.
|
||||
*)
|
||||
|
||||
PROCEDURE WriteFormat2 (a: ARRAY OF CHAR; w1, w2: ARRAY OF BYTE) ;
|
||||
|
||||
|
||||
(*
|
||||
WriteFormat3 - displays the module and line together with the encapsulated
|
||||
format strings.
|
||||
Used for simple error messages tied to the current token.
|
||||
*)
|
||||
|
||||
PROCEDURE WriteFormat3 (a: ARRAY OF CHAR; w1, w2, w3: ARRAY OF BYTE) ;
|
||||
|
||||
|
||||
(*
|
||||
NewError - creates and returns a new error handle.
|
||||
*)
|
||||
|
||||
PROCEDURE NewError (AtTokenNo: CARDINAL) : Error ;
|
||||
|
||||
|
||||
(*
|
||||
NewWarning - creates and returns a new error handle suitable for a warning.
|
||||
A warning will not stop compilation.
|
||||
*)
|
||||
|
||||
PROCEDURE NewWarning (AtTokenNo: CARDINAL) : Error ;
|
||||
|
||||
|
||||
(*
|
||||
NewNote - creates and returns a new error handle suitable for a note.
|
||||
A note will not stop compilation.
|
||||
*)
|
||||
|
||||
PROCEDURE NewNote (AtTokenNo: CARDINAL) : Error ;
|
||||
|
||||
|
||||
(*
|
||||
ChainError - creates and returns a new error handle, this new error
|
||||
is associated with, e, and is chained onto the end of, e.
|
||||
*)
|
||||
|
||||
PROCEDURE ChainError (AtTokenNo: CARDINAL; e: Error) : Error ;
|
||||
|
||||
|
||||
(*
|
||||
MoveError - repositions an error, e, to token, AtTokenNo, and returns, e.
|
||||
*)
|
||||
|
||||
PROCEDURE MoveError (e: Error; AtTokenNo: CARDINAL) : Error ;
|
||||
|
||||
|
||||
(*
|
||||
SetColor - informs the error module that this error will have had colors
|
||||
assigned to it. If an error is issued without colors assigned
|
||||
then the default colors will be assigned to the legacy error
|
||||
messages.
|
||||
*)
|
||||
|
||||
PROCEDURE SetColor (e: Error) : Error ;
|
||||
|
||||
|
||||
(*
|
||||
ErrorFormat routines provide a printf capability for the error handle.
|
||||
*)
|
||||
|
||||
PROCEDURE ErrorFormat0 (e: Error; a: ARRAY OF CHAR) ;
|
||||
PROCEDURE ErrorFormat1 (e: Error; a: ARRAY OF CHAR; w: ARRAY OF BYTE) ;
|
||||
PROCEDURE ErrorFormat2 (e: Error; a: ARRAY OF CHAR; w1, w2: ARRAY OF BYTE) ;
|
||||
PROCEDURE ErrorFormat3 (e: Error; a: ARRAY OF CHAR; w1, w2, w3: ARRAY OF BYTE) ;
|
||||
PROCEDURE ErrorString (e: Error; str: String) ;
|
||||
|
||||
|
||||
(* ***************************************************************************
|
||||
The following routines are useful for positioning and warnings and errors
|
||||
at tokens. The strings are emitted later, so the caller must not destroy
|
||||
the strings.
|
||||
*************************************************************************** *)
|
||||
|
||||
PROCEDURE ErrorStringAt (s: String; tok: CARDINAL) ;
|
||||
PROCEDURE ErrorStringAt2 (s: String; tok1, tok2: CARDINAL) ;
|
||||
PROCEDURE ErrorStringsAt2 (s1, s2: String; tok1, tok2: CARDINAL) ;
|
||||
PROCEDURE WarnStringAt (s: String; tok: CARDINAL) ;
|
||||
PROCEDURE WarnStringAt2 (s: String; tok1, tok2: CARDINAL) ;
|
||||
PROCEDURE WarnStringsAt2 (s1, s2: String; tok1, tok2: CARDINAL) ;
|
||||
|
||||
|
||||
(*
|
||||
WarnFormat0 - displays the source module and line together
|
||||
with the encapsulated format string.
|
||||
Used for simple warning messages tied to the current token.
|
||||
*)
|
||||
|
||||
PROCEDURE WarnFormat0 (a: ARRAY OF CHAR) ;
|
||||
|
||||
|
||||
(*
|
||||
WarnFormat1 - displays the source module and line together
|
||||
with the encapsulated format string.
|
||||
Used for simple warning messages tied to the current token.
|
||||
*)
|
||||
|
||||
PROCEDURE WarnFormat1 (a: ARRAY OF CHAR; w: ARRAY OF BYTE) ;
|
||||
|
||||
|
||||
(*
|
||||
FlushErrors - switches the output channel to the error channel
|
||||
and then writes out all errors.
|
||||
If an error is present the compilation is terminated.
|
||||
All warnings are ignored.
|
||||
*)
|
||||
|
||||
PROCEDURE FlushErrors ;
|
||||
|
||||
|
||||
(*
|
||||
FlushWarnings - switches the output channel to the error channel
|
||||
and then writes out all warnings.
|
||||
If an error is present the compilation is terminated,
|
||||
if warnings only were emitted then compilation will
|
||||
continue.
|
||||
*)
|
||||
|
||||
PROCEDURE FlushWarnings ;
|
||||
|
||||
|
||||
(*
|
||||
ErrorAbort0 - aborts compiling, it flushes all warnings and errors before aborting.
|
||||
*)
|
||||
|
||||
PROCEDURE ErrorAbort0 (a: ARRAY OF CHAR) ;
|
||||
|
||||
|
||||
(*
|
||||
AnnounceScope - return the error string message with a scope description prepended
|
||||
assuming that scope has changed.
|
||||
*)
|
||||
|
||||
PROCEDURE AnnounceScope (e: Error; message: String) : String ;
|
||||
|
||||
|
||||
(*
|
||||
EnterImplementationScope - signifies to the error routines that the front end
|
||||
has started to compile implementation module scopeName.
|
||||
*)
|
||||
|
||||
PROCEDURE EnterImplementationScope (scopename: Name) ;
|
||||
|
||||
|
||||
(*
|
||||
EnterProgramScope - signifies to the error routines that the front end
|
||||
has started to compile program module scopeName.
|
||||
*)
|
||||
|
||||
PROCEDURE EnterProgramScope (scopename: Name) ;
|
||||
|
||||
|
||||
(*
|
||||
EnterModuleScope - signifies to the error routines that the front end
|
||||
has started to compile an inner module scopeName.
|
||||
*)
|
||||
|
||||
PROCEDURE EnterModuleScope (scopename: Name) ;
|
||||
|
||||
|
||||
(*
|
||||
EnterDefinitionScope - signifies to the error routines that the front end
|
||||
has started to compile definition module scopeName.
|
||||
*)
|
||||
|
||||
PROCEDURE EnterDefinitionScope (scopename: Name) ;
|
||||
|
||||
|
||||
(*
|
||||
EnterProcedureScope - signifies to the error routines that the front end
|
||||
has started to compile definition module scopeName.
|
||||
*)
|
||||
|
||||
PROCEDURE EnterProcedureScope (scopename: Name) ;
|
||||
|
||||
|
||||
(*
|
||||
DepthScope - returns the depth of the scope stack.
|
||||
*)
|
||||
|
||||
PROCEDURE DepthScope () : CARDINAL ;
|
||||
|
||||
|
||||
(*
|
||||
GetAnnounceScope - return message with the error scope attached to message.
|
||||
filename and message are treated as read only by this
|
||||
procedure function.
|
||||
*)
|
||||
|
||||
PROCEDURE GetAnnounceScope (filename, message: String) : String ;
|
||||
|
||||
|
||||
(*
|
||||
DefaultProgramModule - sets up an unnamed program scope before the Ident is seen.
|
||||
*)
|
||||
|
||||
PROCEDURE DefaultProgramModule ;
|
||||
|
||||
|
||||
(*
|
||||
DefaultImplementationModule - sets up an unnamed implementation
|
||||
scope before the Ident is seen.
|
||||
*)
|
||||
|
||||
PROCEDURE DefaultImplementationModule ;
|
||||
|
||||
|
||||
(*
|
||||
DefaultDefinitionModule - sets up an unnamed definition
|
||||
scope before the Ident is seen.
|
||||
*)
|
||||
|
||||
PROCEDURE DefaultDefinitionModule ;
|
||||
|
||||
|
||||
(*
|
||||
DefaultInnerModule - sets up an unnamed inner
|
||||
scope before the Ident is seen.
|
||||
*)
|
||||
|
||||
PROCEDURE DefaultInnerModule ;
|
||||
|
||||
|
||||
(*
|
||||
DefaultProcedure - sets up an unnamed procedure
|
||||
scope before the Ident is seen.
|
||||
*)
|
||||
|
||||
PROCEDURE DefaultProcedure ;
|
||||
|
||||
|
||||
(*
|
||||
EnterErrorScope - pushes the currentScope and sets currentScope to scope.
|
||||
*)
|
||||
|
||||
PROCEDURE EnterErrorScope (scope: ErrorScope) ;
|
||||
|
||||
|
||||
(*
|
||||
LeaveErrorScope - leave the current scope and pop into the previous one.
|
||||
*)
|
||||
|
||||
PROCEDURE LeaveErrorScope ;
|
||||
|
||||
|
||||
(*
|
||||
GetCurrentErrorScope - returns currentScope.
|
||||
*)
|
||||
|
||||
PROCEDURE GetCurrentErrorScope () : ErrorScope ;
|
||||
|
||||
|
||||
(*
|
||||
ResetErrorScope - should be called at the start of each pass to
|
||||
reset the error scope index.
|
||||
*)
|
||||
|
||||
PROCEDURE ResetErrorScope ;
|
||||
|
||||
|
||||
END M2Error.
|
||||
1181
gcc/m2/gm2-compiler/M2Error.mod
Normal file
1181
gcc/m2/gm2-compiler/M2Error.mod
Normal file
File diff suppressed because it is too large
Load Diff
42
gcc/m2/gm2-compiler/M2EvalSym.def
Normal file
42
gcc/m2/gm2-compiler/M2EvalSym.def
Normal file
@@ -0,0 +1,42 @@
|
||||
(* M2EvalSym.def Evaluates all the symbol values within the symbol table.
|
||||
|
||||
Copyright (C) 2001-2022 Free Software Foundation, Inc.
|
||||
Contributed by Gaius Mulley <gaius.mulley@southwales.ac.uk>.
|
||||
|
||||
This file is part of GNU Modula-2.
|
||||
|
||||
GNU Modula-2 is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3, or (at your option)
|
||||
any later version.
|
||||
|
||||
GNU Modula-2 is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU Modula-2; see the file COPYING3. If not see
|
||||
<http://www.gnu.org/licenses/>. *)
|
||||
DEFINITION MODULE M2EvalSym ;
|
||||
|
||||
(*
|
||||
Title : M2EvalSym
|
||||
Author : Gaius Mulley
|
||||
Date : 7/8/87
|
||||
LastEdit : 7/8/87
|
||||
System : UNIX (GNU Modula-2)
|
||||
Description: Evaluates all the symbol values within the symbol table.
|
||||
*)
|
||||
|
||||
EXPORT QUALIFIED Evaluate ;
|
||||
|
||||
|
||||
(*
|
||||
Evaluate - evaluate all the symbols in the symbol table.
|
||||
*)
|
||||
|
||||
PROCEDURE Evaluate ;
|
||||
|
||||
|
||||
END M2EvalSym.
|
||||
74
gcc/m2/gm2-compiler/M2FileName.def
Normal file
74
gcc/m2/gm2-compiler/M2FileName.def
Normal file
@@ -0,0 +1,74 @@
|
||||
(* M2FileName.def construct file names.
|
||||
|
||||
Copyright (C) 2001-2022 Free Software Foundation, Inc.
|
||||
Contributed by Gaius Mulley <gaius.mulley@southwales.ac.uk>.
|
||||
|
||||
This file is part of GNU Modula-2.
|
||||
|
||||
GNU Modula-2 is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3, or (at your option)
|
||||
any later version.
|
||||
|
||||
GNU Modula-2 is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU Modula-2; see the file COPYING3. If not see
|
||||
<http://www.gnu.org/licenses/>. *)
|
||||
|
||||
DEFINITION MODULE M2FileName ;
|
||||
|
||||
(*
|
||||
Author : Gaius Mulley
|
||||
Title : M2FileName
|
||||
Date : 3/4/86 [$Date: 2013/07/08 10:27:56 $]
|
||||
SYSTEM : UNIX (GNU Modula-2)
|
||||
Description: construct file names.
|
||||
Version : $Revision: 1.11 $
|
||||
*)
|
||||
|
||||
FROM DynamicStrings IMPORT String ;
|
||||
EXPORT QUALIFIED CalculateFileName, CalculateStemName, ExtractExtension ;
|
||||
|
||||
|
||||
(*
|
||||
CalculateFileName - calculates and returns a new string filename
|
||||
given a module and an extension. This file name
|
||||
length will be operating system specific.
|
||||
String, Extension, is concatenated onto
|
||||
Module and thus it is safe to `Mark' the extension
|
||||
for garbage collection.
|
||||
*)
|
||||
|
||||
PROCEDURE CalculateFileName (Module, Extension: String) : String ;
|
||||
|
||||
|
||||
(*
|
||||
CalculateStemName - calculates the stem name for given a module.
|
||||
This name length will be operating system and
|
||||
compiler specific.
|
||||
*)
|
||||
|
||||
PROCEDURE CalculateStemName (Module: String) : String ;
|
||||
|
||||
|
||||
(*
|
||||
ExtractExtension - given a, filename, return the filename without
|
||||
the extension, Ext.
|
||||
*)
|
||||
|
||||
PROCEDURE ExtractExtension (filename, ext: String) : String ;
|
||||
|
||||
|
||||
(*
|
||||
ExtractModule - given a, filename, return the module name including any
|
||||
extension. A new string is returned.
|
||||
*)
|
||||
|
||||
PROCEDURE ExtractModule (filename: String) : String ;
|
||||
|
||||
|
||||
END M2FileName.
|
||||
106
gcc/m2/gm2-compiler/M2FileName.mod
Normal file
106
gcc/m2/gm2-compiler/M2FileName.mod
Normal file
@@ -0,0 +1,106 @@
|
||||
(* M2FileName.mod construct file names.
|
||||
|
||||
Copyright (C) 2001-2022 Free Software Foundation, Inc.
|
||||
Contributed by Gaius Mulley <gaius.mulley@southwales.ac.uk>.
|
||||
|
||||
This file is part of GNU Modula-2.
|
||||
|
||||
GNU Modula-2 is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3, or (at your option)
|
||||
any later version.
|
||||
|
||||
GNU Modula-2 is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU Modula-2; see the file COPYING3. If not see
|
||||
<http://www.gnu.org/licenses/>. *)
|
||||
|
||||
IMPLEMENTATION MODULE M2FileName ;
|
||||
|
||||
|
||||
FROM ASCII IMPORT nul ;
|
||||
FROM DynamicStrings IMPORT InitString, Mark, Slice, Dup, ConCatChar, ConCat, Length, Equal, Index ;
|
||||
|
||||
|
||||
CONST
|
||||
MaxFileName = 0 ; (* zero means no limits *)
|
||||
MaxStemName = 0 ;
|
||||
Directory = '/' ;
|
||||
|
||||
|
||||
(*
|
||||
currently there are no limits on filename length, this may
|
||||
be incorrect on some systems.
|
||||
*)
|
||||
|
||||
|
||||
(*
|
||||
CalculateFileName - calculates and returns a new string filename given a module
|
||||
and an extension. String, Extension, is concatenated onto
|
||||
Module and thus it is safe to `Mark' the extension for garbage
|
||||
collection.
|
||||
*)
|
||||
|
||||
PROCEDURE CalculateFileName (Module, Extension: String) : String ;
|
||||
BEGIN
|
||||
IF MaxFileName=0
|
||||
THEN
|
||||
RETURN( ConCat(ConCatChar(Slice(Module, 0, MaxFileName), '.'), Extension) )
|
||||
ELSE
|
||||
RETURN( ConCat(ConCatChar(Slice(Module, 0, MaxFileName-Length(Extension)-1), '.'), Extension) )
|
||||
END
|
||||
END CalculateFileName ;
|
||||
|
||||
|
||||
(*
|
||||
CalculateStemName - calculates the stem name for given a module.
|
||||
This name length will be operating system and
|
||||
compiler specific.
|
||||
*)
|
||||
|
||||
PROCEDURE CalculateStemName (Module: String) : String ;
|
||||
BEGIN
|
||||
RETURN( Slice(Module, 0, MaxStemName) )
|
||||
END CalculateStemName ;
|
||||
|
||||
|
||||
(*
|
||||
ExtractExtension - given a, filename, return the filename without
|
||||
the extension, Ext.
|
||||
*)
|
||||
|
||||
PROCEDURE ExtractExtension (filename, ext: String) : String ;
|
||||
BEGIN
|
||||
IF Equal(ext, Mark(Slice(filename, -Length(ext), 0)))
|
||||
THEN
|
||||
RETURN( Slice(filename, 0, -Length(ext)) )
|
||||
ELSE
|
||||
RETURN( filename )
|
||||
END
|
||||
END ExtractExtension ;
|
||||
|
||||
|
||||
(*
|
||||
ExtractModule - given a, filename, return the module name including any
|
||||
extension. A new string is returned.
|
||||
*)
|
||||
|
||||
PROCEDURE ExtractModule (filename: String) : String ;
|
||||
VAR
|
||||
i: INTEGER ;
|
||||
BEGIN
|
||||
i := Index(filename, Directory, 0) ;
|
||||
IF i=-1
|
||||
THEN
|
||||
RETURN( Dup(filename) )
|
||||
ELSE
|
||||
RETURN( Slice(filename, i+1, 0) )
|
||||
END
|
||||
END ExtractModule ;
|
||||
|
||||
|
||||
END M2FileName.
|
||||
245
gcc/m2/gm2-compiler/M2GCCDeclare.def
Normal file
245
gcc/m2/gm2-compiler/M2GCCDeclare.def
Normal file
@@ -0,0 +1,245 @@
|
||||
(* M2GCCDeclare.def declares Modula-2 types to GCC.
|
||||
|
||||
Copyright (C) 2001-2022 Free Software Foundation, Inc.
|
||||
Contributed by Gaius Mulley <gaius.mulley@southwales.ac.uk>.
|
||||
|
||||
This file is part of GNU Modula-2.
|
||||
|
||||
GNU Modula-2 is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3, or (at your option)
|
||||
any later version.
|
||||
|
||||
GNU Modula-2 is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU Modula-2; see the file COPYING3. If not see
|
||||
<http://www.gnu.org/licenses/>. *)
|
||||
|
||||
DEFINITION MODULE M2GCCDeclare ;
|
||||
|
||||
(*
|
||||
Title : M2GCCDeclare
|
||||
Author : Gaius Mulley
|
||||
System : UNIX (gm2)
|
||||
Date : Sat Jul 17 10:28:43 1999
|
||||
Last edit : Sat Jul 17 10:28:43 1999
|
||||
Description: declares Modula-2 types to GCC,
|
||||
only declares a type once all subcomponents are known.
|
||||
*)
|
||||
|
||||
FROM SYSTEM IMPORT WORD ;
|
||||
FROM m2tree IMPORT Tree ;
|
||||
EXPORT QUALIFIED FoldConstants,
|
||||
DeclareConstant, TryDeclareConstant,
|
||||
DeclareConstructor, TryDeclareConstructor,
|
||||
DeclareLocalVariables, PromoteToString, DeclareLocalVariable,
|
||||
InitDeclarations, StartDeclareScope, EndDeclareScope,
|
||||
DeclareModuleVariables, IsProcedureGccNested,
|
||||
DeclareProcedure, PoisonSymbols, DeclareParameters,
|
||||
DeclareM2linkGlobals,
|
||||
CompletelyResolved, MarkExported, PrintSym,
|
||||
ConstantKnownAndUsed,
|
||||
PutToBeSolvedByQuads,
|
||||
GetTypeMin, GetTypeMax,
|
||||
WalkAction, IsAction ;
|
||||
|
||||
TYPE
|
||||
WalkAction = PROCEDURE (WORD) ;
|
||||
IsAction = PROCEDURE (WORD) : BOOLEAN ;
|
||||
|
||||
|
||||
(*
|
||||
FoldConstants - a wrapper for ResolveConstantExpressions.
|
||||
*)
|
||||
|
||||
PROCEDURE FoldConstants (start, end: CARDINAL) ;
|
||||
|
||||
|
||||
(*
|
||||
StartDeclareScope - declares types, variables associated with this scope.
|
||||
*)
|
||||
|
||||
PROCEDURE StartDeclareScope (scope: CARDINAL) ;
|
||||
|
||||
|
||||
(*
|
||||
EndDeclareScope -
|
||||
*)
|
||||
|
||||
PROCEDURE EndDeclareScope ;
|
||||
|
||||
|
||||
(*
|
||||
DeclareParameters -
|
||||
*)
|
||||
|
||||
PROCEDURE DeclareParameters (sym: CARDINAL) ;
|
||||
|
||||
|
||||
(*
|
||||
DeclareConstant - if, sym, is a constant then declare it.
|
||||
The constant must be solvable at this point.
|
||||
*)
|
||||
|
||||
PROCEDURE DeclareConstant (tokenno: CARDINAL; sym: CARDINAL) ;
|
||||
|
||||
|
||||
(*
|
||||
DeclareConstructor - if, sym, is a constructor then declare it.
|
||||
The constructor must be solvable at this point.
|
||||
*)
|
||||
|
||||
PROCEDURE DeclareConstructor (tokenno: CARDINAL; quad: CARDINAL; sym: CARDINAL) ;
|
||||
|
||||
|
||||
(*
|
||||
TryDeclareConstant - try and declare a constant. If, sym, is a
|
||||
constant try and declare it, if we cannot
|
||||
then enter it into the to do list.
|
||||
*)
|
||||
|
||||
PROCEDURE TryDeclareConstant (tokenno: CARDINAL; sym: CARDINAL) ;
|
||||
|
||||
|
||||
(*
|
||||
TryDeclareConstructor - try and declare a constructor. If, sym, is a
|
||||
constructor try and declare it, if we cannot
|
||||
then enter it into the to do list.
|
||||
*)
|
||||
|
||||
PROCEDURE TryDeclareConstructor (tokenno: CARDINAL; sym: CARDINAL) ;
|
||||
|
||||
|
||||
(*
|
||||
DeclareLocalVariables - lists the Local variables for procedure
|
||||
together with their offset.
|
||||
*)
|
||||
|
||||
PROCEDURE DeclareLocalVariables (procedure: CARDINAL) ;
|
||||
|
||||
|
||||
(*
|
||||
DeclareLocalVariable - declare a local variable var.
|
||||
*)
|
||||
|
||||
PROCEDURE DeclareLocalVariable (var: CARDINAL) ;
|
||||
|
||||
|
||||
(*
|
||||
DeclareProcedure - declares procedure, sym, or all procedures inside
|
||||
module sym.
|
||||
*)
|
||||
|
||||
PROCEDURE DeclareProcedure (sym: WORD) ;
|
||||
|
||||
|
||||
(*
|
||||
DeclareModuleVariables - declares Module variables for a module
|
||||
which inside a procedure.
|
||||
*)
|
||||
|
||||
PROCEDURE DeclareModuleVariables (sym: CARDINAL) ;
|
||||
|
||||
|
||||
(*
|
||||
DeclareM2linkGlobals - will create M2LINK.StaticInitialization
|
||||
and M2LINK.ForcedModuleInitOrder providing
|
||||
they have not already been created.
|
||||
*)
|
||||
|
||||
PROCEDURE DeclareM2linkGlobals (tokenno: CARDINAL) ;
|
||||
|
||||
|
||||
(*
|
||||
IsProcedureGccNested - returns TRUE if procedure, sym, will be considered
|
||||
as nested by GCC.
|
||||
This will occur if either its outer defining scope
|
||||
is a procedure or is a module which is inside a
|
||||
procedure.
|
||||
*)
|
||||
|
||||
PROCEDURE IsProcedureGccNested (sym: CARDINAL) : BOOLEAN ;
|
||||
|
||||
|
||||
(*
|
||||
PoisonSymbols - poisons all gcc symbols from procedure, sym.
|
||||
A debugging aid.
|
||||
*)
|
||||
|
||||
PROCEDURE PoisonSymbols (sym: CARDINAL) ;
|
||||
|
||||
|
||||
(*
|
||||
PromoteToString - declare, sym, and then promote it to a string.
|
||||
Note that if sym is a single character we do
|
||||
*not* record it as a string
|
||||
but as a char however we always
|
||||
return a string constant.
|
||||
*)
|
||||
|
||||
PROCEDURE PromoteToString (tokenno: CARDINAL; sym: CARDINAL) : Tree ;
|
||||
|
||||
|
||||
(*
|
||||
CompletelyResolved - returns TRUE if a symbol has been completely resolved
|
||||
and is not partially declared (such as a record,
|
||||
array or procedure type).
|
||||
*)
|
||||
|
||||
PROCEDURE CompletelyResolved (sym: CARDINAL) : BOOLEAN ;
|
||||
|
||||
|
||||
(*
|
||||
ConstantKnownAndUsed -
|
||||
*)
|
||||
|
||||
PROCEDURE ConstantKnownAndUsed (sym: CARDINAL; t: Tree) ;
|
||||
|
||||
|
||||
(*
|
||||
PutToBeSolvedByQuads - places, sym, in this list.
|
||||
*)
|
||||
|
||||
PROCEDURE PutToBeSolvedByQuads (sym: CARDINAL) ;
|
||||
|
||||
|
||||
(*
|
||||
MarkExported - tell GCC to mark all exported procedures in module sym.
|
||||
*)
|
||||
|
||||
PROCEDURE MarkExported (sym: CARDINAL) ;
|
||||
|
||||
|
||||
(*
|
||||
GetTypeMin - returns a symbol corresponding to MIN(type)
|
||||
*)
|
||||
|
||||
PROCEDURE GetTypeMin (type: CARDINAL) : CARDINAL ;
|
||||
|
||||
|
||||
(*
|
||||
GetTypeMax - returns a symbol corresponding to MAX(type)
|
||||
*)
|
||||
|
||||
PROCEDURE GetTypeMax (type: CARDINAL) : CARDINAL ;
|
||||
|
||||
|
||||
(*
|
||||
PrintSym - prints limited information about a symbol.
|
||||
*)
|
||||
|
||||
PROCEDURE PrintSym (sym: CARDINAL) ;
|
||||
|
||||
|
||||
(*
|
||||
InitDeclarations - initializes default types and the source filename.
|
||||
*)
|
||||
|
||||
PROCEDURE InitDeclarations ;
|
||||
|
||||
|
||||
END M2GCCDeclare.
|
||||
6326
gcc/m2/gm2-compiler/M2GCCDeclare.mod
Normal file
6326
gcc/m2/gm2-compiler/M2GCCDeclare.mod
Normal file
File diff suppressed because it is too large
Load Diff
103
gcc/m2/gm2-compiler/M2GenGCC.def
Normal file
103
gcc/m2/gm2-compiler/M2GenGCC.def
Normal file
@@ -0,0 +1,103 @@
|
||||
(* M2GenGCC.def convert the quadruples into GCC trees.
|
||||
|
||||
Copyright (C) 2001-2022 Free Software Foundation, Inc.
|
||||
Contributed by Gaius Mulley <gaius.mulley@southwales.ac.uk>.
|
||||
|
||||
This file is part of GNU Modula-2.
|
||||
|
||||
GNU Modula-2 is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3, or (at your option)
|
||||
any later version.
|
||||
|
||||
GNU Modula-2 is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU Modula-2; see the file COPYING3. If not see
|
||||
<http://www.gnu.org/licenses/>. *)
|
||||
|
||||
DEFINITION MODULE M2GenGCC ;
|
||||
|
||||
(*
|
||||
Title : M2GenGCC
|
||||
Author : Gaius Mulley
|
||||
System : UNIX (gm2)
|
||||
Date : Fri Jul 9 13:05:13 1999
|
||||
Last edit : Fri Jul 9 13:05:13 1999
|
||||
Description: provides an interface to GCC, essentially convert the
|
||||
internal quadruples of m2f into a GCC tree structure.
|
||||
*)
|
||||
|
||||
FROM M2GCCDeclare IMPORT WalkAction ;
|
||||
FROM m2tree IMPORT Tree ;
|
||||
FROM m2linemap IMPORT location_t ;
|
||||
EXPORT QUALIFIED ConvertQuadsToTree, ResolveConstantExpressions,
|
||||
GetHighFromUnbounded, StringToChar,
|
||||
LValueToGenericPtr, ZConstToTypedConst,
|
||||
DoCopyString ;
|
||||
|
||||
|
||||
(*
|
||||
ConvertQuadsToTree - runs through the quadruple list, Start..End, and converts it into
|
||||
the GCC tree structure.
|
||||
*)
|
||||
|
||||
PROCEDURE ConvertQuadsToTree (Start, End: CARDINAL) ;
|
||||
|
||||
|
||||
(*
|
||||
ResolveConstantExpressions - resolves constant expressions from the quadruple list.
|
||||
It returns TRUE if one or more constants were folded.
|
||||
When a constant symbol value is solved, the call back
|
||||
p(sym) is invoked.
|
||||
*)
|
||||
|
||||
PROCEDURE ResolveConstantExpressions (p: WalkAction; start, end: CARDINAL) : BOOLEAN ;
|
||||
|
||||
|
||||
(*
|
||||
GetHighFromUnbounded - returns a Tree containing the value of
|
||||
param.HIGH.
|
||||
*)
|
||||
|
||||
PROCEDURE GetHighFromUnbounded (location: location_t; dim, param: CARDINAL) : Tree ;
|
||||
|
||||
|
||||
(*
|
||||
StringToChar - if type=Char and str is a string (of size <= 1)
|
||||
then convert the string into a character constant.
|
||||
*)
|
||||
|
||||
PROCEDURE StringToChar (t: Tree; type, str: CARDINAL) : Tree ;
|
||||
|
||||
|
||||
(*
|
||||
LValueToGenericPtr - returns a Tree representing symbol, sym.
|
||||
It coerces a lvalue into an internal pointer type
|
||||
*)
|
||||
|
||||
PROCEDURE LValueToGenericPtr (location: location_t; sym: CARDINAL) : Tree ;
|
||||
|
||||
|
||||
(*
|
||||
ZConstToTypedConst - checks whether op1 and op2 are constants and
|
||||
coerces, t, appropriately.
|
||||
*)
|
||||
|
||||
PROCEDURE ZConstToTypedConst (t: Tree; op1, op2: CARDINAL) : Tree ;
|
||||
|
||||
|
||||
(*
|
||||
DoCopyString - returns trees:
|
||||
t number of bytes to be copied (including the nul)
|
||||
op3t the string with the extra nul character
|
||||
providing it fits.
|
||||
*)
|
||||
|
||||
PROCEDURE DoCopyString (tokenno: CARDINAL; VAR length, op3t: Tree; op1t, op3: CARDINAL) ;
|
||||
|
||||
|
||||
END M2GenGCC.
|
||||
7193
gcc/m2/gm2-compiler/M2GenGCC.mod
Normal file
7193
gcc/m2/gm2-compiler/M2GenGCC.mod
Normal file
File diff suppressed because it is too large
Load Diff
58
gcc/m2/gm2-compiler/M2Graph.def
Normal file
58
gcc/m2/gm2-compiler/M2Graph.def
Normal file
@@ -0,0 +1,58 @@
|
||||
(* M2Graph.def maintains the dependancy graph depth.
|
||||
|
||||
Copyright (C) 2022 Free Software Foundation, Inc.
|
||||
Contributed by Gaius Mulley <gaius.mulley@southwales.ac.uk>.
|
||||
|
||||
This file is part of GNU Modula-2.
|
||||
|
||||
GNU Modula-2 is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3, or (at your option)
|
||||
any later version.
|
||||
|
||||
GNU Modula-2 is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU Modula-2; see the file COPYING3. If not see
|
||||
<http://www.gnu.org/licenses/>. *)
|
||||
|
||||
DEFINITION MODULE M2Graph ;
|
||||
|
||||
FROM Lists IMPORT List ;
|
||||
|
||||
TYPE
|
||||
Graph ;
|
||||
|
||||
|
||||
(*
|
||||
InitGraph - creates and returns an empty graph.
|
||||
*)
|
||||
|
||||
PROCEDURE InitGraph () : Graph ;
|
||||
|
||||
|
||||
(*
|
||||
KillGraph - deletes graph and all nodes.
|
||||
*)
|
||||
|
||||
PROCEDURE KillGraph (VAR g: Graph) ;
|
||||
|
||||
|
||||
(*
|
||||
AddDependent - adds moduleSym <- dependSym into the graph.
|
||||
*)
|
||||
|
||||
PROCEDURE AddDependent (graph: Graph; moduleSym, dependSym: CARDINAL) ;
|
||||
|
||||
|
||||
(*
|
||||
SortGraph - returns a List containing the sorted graph.
|
||||
*)
|
||||
|
||||
PROCEDURE SortGraph (g: Graph; topModule: CARDINAL) : List ;
|
||||
|
||||
|
||||
END M2Graph.
|
||||
234
gcc/m2/gm2-compiler/M2Graph.mod
Normal file
234
gcc/m2/gm2-compiler/M2Graph.mod
Normal file
@@ -0,0 +1,234 @@
|
||||
(* M2Graph.mod maintains the dependancy graph depth.
|
||||
|
||||
Copyright (C) 2022 Free Software Foundation, Inc.
|
||||
Contributed by Gaius Mulley <gaius.mulley@southwales.ac.uk>.
|
||||
|
||||
This file is part of GNU Modula-2.
|
||||
|
||||
GNU Modula-2 is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3, or (at your option)
|
||||
any later version.
|
||||
|
||||
GNU Modula-2 is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU Modula-2; see the file COPYING3. If not see
|
||||
<http://www.gnu.org/licenses/>. *)
|
||||
|
||||
IMPLEMENTATION MODULE M2Graph ;
|
||||
|
||||
|
||||
FROM Storage IMPORT ALLOCATE ;
|
||||
FROM StrLib IMPORT StrEqual, StrCopy ;
|
||||
FROM NumberIO IMPORT WriteCard ;
|
||||
FROM StrIO IMPORT WriteString, WriteLn ;
|
||||
FROM NameKey IMPORT Name, WriteKey ;
|
||||
FROM Lists IMPORT InitList, KillList, IncludeItemIntoList, RemoveItemFromList ;
|
||||
FROM Indexing IMPORT Index, HighIndice, IncludeIndiceIntoIndex, InitIndex, KillIndex, GetIndice ;
|
||||
FROM M2Printf IMPORT printf0, printf1, printf2 ;
|
||||
FROM SymbolTable IMPORT GetSymName, IsDefinitionForC, IsModule ;
|
||||
|
||||
|
||||
CONST
|
||||
Debugging = FALSE ;
|
||||
|
||||
TYPE
|
||||
state = (initial, started, ordered) ;
|
||||
|
||||
node = POINTER TO RECORD
|
||||
moduleSym: CARDINAL ; (* SymbolTable entry for module. *)
|
||||
deps : Index ;
|
||||
nstate : state ;
|
||||
END ;
|
||||
|
||||
Graph = POINTER TO RECORD
|
||||
nodes: Index ;
|
||||
END ;
|
||||
|
||||
|
||||
(*
|
||||
InitGraph - creates and returns an empty graph.
|
||||
*)
|
||||
|
||||
PROCEDURE InitGraph () : Graph ;
|
||||
VAR
|
||||
g: Graph ;
|
||||
BEGIN
|
||||
NEW (g) ;
|
||||
g^.nodes := InitIndex (1) ;
|
||||
RETURN g
|
||||
END InitGraph ;
|
||||
|
||||
|
||||
(*
|
||||
KillNode - deletes the dynamic storage associated with nptr.
|
||||
*)
|
||||
|
||||
PROCEDURE KillNode (nptr: node) ;
|
||||
BEGIN
|
||||
nptr^.deps := KillIndex (nptr^.deps)
|
||||
END KillNode ;
|
||||
|
||||
|
||||
(*
|
||||
KillGraph - deletes graph and all nodes.
|
||||
*)
|
||||
|
||||
PROCEDURE KillGraph (VAR g: Graph) ;
|
||||
VAR
|
||||
i, n: CARDINAL ;
|
||||
nptr: node ;
|
||||
BEGIN
|
||||
n := HighIndice (g^.nodes) ;
|
||||
i := 1 ;
|
||||
WHILE i <= n DO
|
||||
nptr := GetIndice (g^.nodes, i) ;
|
||||
KillNode (nptr) ;
|
||||
INC (i)
|
||||
END ;
|
||||
g := NIL
|
||||
END KillGraph ;
|
||||
|
||||
|
||||
(*
|
||||
initNode - create a new node in graph and return the node.
|
||||
*)
|
||||
|
||||
PROCEDURE initNode (graph: Graph; moduleSym: CARDINAL) : node ;
|
||||
VAR
|
||||
nptr: node ;
|
||||
BEGIN
|
||||
NEW (nptr) ;
|
||||
nptr^.moduleSym := moduleSym ;
|
||||
nptr^.deps := InitIndex (1) ;
|
||||
nptr^.nstate := initial ;
|
||||
IncludeIndiceIntoIndex (graph^.nodes, nptr) ;
|
||||
RETURN nptr
|
||||
END initNode ;
|
||||
|
||||
|
||||
(*
|
||||
getNode - returns a node from graph representing moduleSym.
|
||||
If the node does not exist it is created.
|
||||
*)
|
||||
|
||||
PROCEDURE getNode (graph: Graph; moduleSym: CARDINAL) : node ;
|
||||
VAR
|
||||
i, n: CARDINAL ;
|
||||
nptr: node ;
|
||||
BEGIN
|
||||
i := 1 ;
|
||||
n := HighIndice (graph^.nodes) ;
|
||||
WHILE i <= n DO
|
||||
nptr := GetIndice (graph^.nodes, i) ;
|
||||
IF nptr^.moduleSym = moduleSym
|
||||
THEN
|
||||
RETURN nptr
|
||||
END ;
|
||||
INC (i)
|
||||
END ;
|
||||
RETURN initNode (graph, moduleSym)
|
||||
END getNode ;
|
||||
|
||||
|
||||
(*
|
||||
createDependent - mptr imports from dptr.
|
||||
*)
|
||||
|
||||
PROCEDURE createDependent (mptr, dptr: node) ;
|
||||
BEGIN
|
||||
IncludeIndiceIntoIndex (mptr^.deps, dptr)
|
||||
END createDependent ;
|
||||
|
||||
|
||||
(*
|
||||
AddDependent - adds moduleSym <- dependSym into the graph.
|
||||
*)
|
||||
|
||||
PROCEDURE AddDependent (graph: Graph; moduleSym, dependSym: CARDINAL) ;
|
||||
VAR
|
||||
mptr, dptr: node ;
|
||||
BEGIN
|
||||
IF (IsModule (moduleSym) OR (NOT IsDefinitionForC (moduleSym))) AND
|
||||
(IsModule (dependSym) OR (NOT IsDefinitionForC (dependSym)))
|
||||
THEN
|
||||
mptr := getNode (graph, moduleSym) ;
|
||||
dptr := getNode (graph, dependSym) ;
|
||||
createDependent (mptr, dptr)
|
||||
END
|
||||
END AddDependent ;
|
||||
|
||||
|
||||
(*
|
||||
SortGraph - returns a List containing the sorted graph.
|
||||
*)
|
||||
|
||||
PROCEDURE SortGraph (g: Graph; topModule: CARDINAL) : List ;
|
||||
VAR
|
||||
sorted: List ;
|
||||
nptr : node ;
|
||||
BEGIN
|
||||
InitList (sorted) ;
|
||||
setNodesInitial (g) ;
|
||||
nptr := getNode (g, topModule) ;
|
||||
resolveImports (sorted, nptr) ;
|
||||
RemoveItemFromList (sorted, topModule) ;
|
||||
IncludeItemIntoList (sorted, topModule) ; (* Ensure topModule is last. *)
|
||||
RETURN sorted
|
||||
END SortGraph ;
|
||||
|
||||
|
||||
(*
|
||||
resolveImports - recursively resolve imports using ISO Modula-2
|
||||
rules for the order of module initialization.
|
||||
*)
|
||||
|
||||
PROCEDURE resolveImports (sorted: List; nptr: node) ;
|
||||
VAR
|
||||
i, n: CARDINAL ;
|
||||
name: Name ;
|
||||
BEGIN
|
||||
IF nptr^.nstate = initial
|
||||
THEN
|
||||
nptr^.nstate := started ;
|
||||
name := GetSymName (nptr^.moduleSym) ;
|
||||
i := 1 ;
|
||||
n := HighIndice (nptr^.deps) ;
|
||||
IF Debugging
|
||||
THEN
|
||||
printf2 ("resolving %a %d dependents\n", name, n)
|
||||
END ;
|
||||
WHILE i <= n DO
|
||||
resolveImports (sorted, GetIndice (nptr^.deps, i)) ;
|
||||
INC (i)
|
||||
END ;
|
||||
nptr^.nstate := ordered ;
|
||||
IncludeItemIntoList (sorted, nptr^.moduleSym)
|
||||
END
|
||||
END resolveImports ;
|
||||
|
||||
|
||||
(*
|
||||
setNodesInitial - changes the state of all nodes in graph to initial.
|
||||
*)
|
||||
|
||||
PROCEDURE setNodesInitial (g: Graph) ;
|
||||
VAR
|
||||
i, n: CARDINAL ;
|
||||
nptr: node ;
|
||||
BEGIN
|
||||
i := 1 ;
|
||||
n := HighIndice (g^.nodes) ;
|
||||
WHILE i <= n DO
|
||||
nptr := GetIndice (g^.nodes, i) ;
|
||||
nptr^.nstate := initial ;
|
||||
INC (i)
|
||||
END
|
||||
END setNodesInitial ;
|
||||
|
||||
|
||||
END M2Graph.
|
||||
106
gcc/m2/gm2-compiler/M2Lex.def
Normal file
106
gcc/m2/gm2-compiler/M2Lex.def
Normal file
@@ -0,0 +1,106 @@
|
||||
(* M2Lex.def provides a non tokenised lexical analyser.
|
||||
|
||||
Copyright (C) 2001-2022 Free Software Foundation, Inc.
|
||||
Contributed by Gaius Mulley <gaius.mulley@southwales.ac.uk>.
|
||||
|
||||
This file is part of GNU Modula-2.
|
||||
|
||||
GNU Modula-2 is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3, or (at your option)
|
||||
any later version.
|
||||
|
||||
GNU Modula-2 is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU Modula-2; see the file COPYING3. If not see
|
||||
<http://www.gnu.org/licenses/>. *)
|
||||
DEFINITION MODULE M2Lex ;
|
||||
|
||||
(*
|
||||
Title : M2Lex
|
||||
Author : Gaius Mulley
|
||||
Date : Date: Sat 16-09-1989 Time: 17:54:22.58
|
||||
LastEdit : Date: Sat 16-09-1989 Time: 17:54:22.58
|
||||
System : UNIX (GNU Modula-2)
|
||||
Description: Provides a non tokenised version of M2Lexical.
|
||||
Symbols are distinct MODULA-2 symbols.
|
||||
*)
|
||||
|
||||
EXPORT QUALIFIED MaxLine,
|
||||
GetSymbol,
|
||||
PutSymbol,
|
||||
CurrentSymbol,
|
||||
LastSymbol,
|
||||
OpenSource,
|
||||
CloseSource,
|
||||
SymIs,
|
||||
IsSym,
|
||||
WriteError ;
|
||||
|
||||
CONST
|
||||
MaxLine = 1024 ;
|
||||
|
||||
VAR
|
||||
LastSymbol,
|
||||
CurrentSymbol : ARRAY [0..MaxLine] OF CHAR ;
|
||||
|
||||
|
||||
(*
|
||||
OpenSource - Attempts to open the source file, a.
|
||||
The success of the operation is returned.
|
||||
*)
|
||||
|
||||
PROCEDURE OpenSource (a: ARRAY OF CHAR) : BOOLEAN ;
|
||||
|
||||
|
||||
(*
|
||||
CloseSource - Closes the current open file.
|
||||
*)
|
||||
|
||||
PROCEDURE CloseSource ;
|
||||
|
||||
|
||||
(*
|
||||
SymIs - if Name is equal to the CurrentSymbol the next Symbol is read
|
||||
and true is returned, otherwise false is returned.
|
||||
*)
|
||||
|
||||
PROCEDURE SymIs (Name: ARRAY OF CHAR) : BOOLEAN ;
|
||||
|
||||
|
||||
(*
|
||||
IsSym - returns the result of the comparison between CurrentSymbol
|
||||
and Name.
|
||||
*)
|
||||
|
||||
PROCEDURE IsSym (Name: ARRAY OF CHAR) : BOOLEAN ;
|
||||
|
||||
|
||||
(*
|
||||
GetSymbol - gets the next Symbol into CurrentSymbol.
|
||||
*)
|
||||
|
||||
PROCEDURE GetSymbol ;
|
||||
|
||||
|
||||
(*
|
||||
PutSymbol - pushes a symbol, Name, back onto the input.
|
||||
GetSymbol will set CurrentSymbol to, Name.
|
||||
*)
|
||||
|
||||
PROCEDURE PutSymbol (Name: ARRAY OF CHAR) ;
|
||||
|
||||
|
||||
(*
|
||||
WriteError - displays the source line and points to the symbol in error.
|
||||
The message, a, is displayed.
|
||||
*)
|
||||
|
||||
PROCEDURE WriteError (a: ARRAY OF CHAR) ;
|
||||
|
||||
|
||||
END M2Lex.
|
||||
418
gcc/m2/gm2-compiler/M2Lex.mod
Normal file
418
gcc/m2/gm2-compiler/M2Lex.mod
Normal file
@@ -0,0 +1,418 @@
|
||||
(* M2Lex.mod provides a non tokenised lexical analyser.
|
||||
|
||||
Copyright (C) 2001-2022 Free Software Foundation, Inc.
|
||||
Contributed by Gaius Mulley <gaius.mulley@southwales.ac.uk>.
|
||||
|
||||
This file is part of GNU Modula-2.
|
||||
|
||||
GNU Modula-2 is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3, or (at your option)
|
||||
any later version.
|
||||
|
||||
GNU Modula-2 is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with GNU Modula-2; see the file COPYING3. If not see
|
||||
<http://www.gnu.org/licenses/>. *)
|
||||
|
||||
IMPLEMENTATION MODULE M2Lex ;
|
||||
|
||||
|
||||
FROM FIO IMPORT File, OpenToRead, ReadChar, Close, IsNoError ;
|
||||
FROM StrIO IMPORT ReadString, WriteString, WriteLn ;
|
||||
FROM StdIO IMPORT Write ;
|
||||
FROM NumberIO IMPORT WriteCard ;
|
||||
FROM ASCII IMPORT nul, lf, cr, EOL ;
|
||||
FROM StrLib IMPORT StrCopy, StrEqual, StrLen ;
|
||||
|
||||
|
||||
CONST
|
||||
LineBuf = 1 ;
|
||||
Wrap = LineBuf+1 ;
|
||||
eof = 032C ;
|
||||
MaxStack= 10 ;
|
||||
|
||||
VAR
|
||||
f: File ;
|
||||
Opened : BOOLEAN ;
|
||||
CurrentChar : CHAR ;
|
||||
NextChar : CHAR ;
|
||||
FileName : ARRAY [0..MaxLine] OF CHAR ;
|
||||
Lines : ARRAY [0..LineBuf] OF ARRAY [0..255] OF CHAR ;
|
||||
(* Need two lines since the delimiter of the CurrentSymbol *)
|
||||
(* maybe on the next line. *)
|
||||
HighNext : CARDINAL ; (* Length of the NextChar line. *)
|
||||
CurLine : CARDINAL ; (* Line number of the Current Char Line. *)
|
||||
NextLine : CARDINAL ; (* Line number of the Next Char Line. *)
|
||||
IndexCur : CARDINAL ; (* Index to the Lines array for Current Ln *)
|
||||
IndexNext : CARDINAL ; (* Index to the Lines array for NextChar Ln *)
|
||||
CurSym : CARDINAL ; (* Character start of the CurrentSymbol *)
|
||||
CurSymLine : CARDINAL ; (* Line number of the CurrentSymbol *)
|
||||
CurCharIndex : CARDINAL ; (* Character number of CurChar. *)
|
||||
NextCharIndex : CARDINAL ; (* Character number of NextChar. *)
|
||||
Eof : BOOLEAN ; (* End of source file. *)
|
||||
InQuotes : BOOLEAN ; (* If we are in quotes. *)
|
||||
QuoteChar : CHAR ; (* Quote character expected. *)
|
||||
Stack : ARRAY [0..MaxStack] OF ARRAY [0..255] OF CHAR ;
|
||||
StackPtr : CARDINAL ;
|
||||
|
||||
|
||||
(*
|
||||
IsSym - returns the result of the comparison between CurrentSymbol
|
||||
and Name.
|
||||
*)
|
||||
|
||||
PROCEDURE IsSym (Name: ARRAY OF CHAR) : BOOLEAN ;
|
||||
BEGIN
|
||||
RETURN( StrEqual(CurrentSymbol, Name) )
|
||||
END IsSym ;
|
||||
|
||||
|
||||
(*
|
||||
SymIs - if Name is equal to the CurrentSymbol the next Symbol is read
|
||||
and true is returned, otherwise false is returned.
|
||||
*)
|
||||
|
||||
PROCEDURE SymIs (Name: ARRAY OF CHAR) : BOOLEAN ;
|
||||
BEGIN
|
||||
IF StrEqual(CurrentSymbol, Name)
|
||||
THEN
|
||||
GetSymbol ;
|
||||
RETURN( TRUE )
|
||||
ELSE
|
||||
RETURN( FALSE )
|
||||
END
|
||||
END SymIs ;
|
||||
|
||||
|
||||
(*
|
||||
WriteError - displays the source line and points to the symbol in error.
|
||||
The message, a, is displayed.
|
||||
*)
|
||||
|
||||
PROCEDURE WriteError (a: ARRAY OF CHAR) ;
|
||||
VAR
|
||||
i: CARDINAL ;
|
||||
BEGIN
|
||||
WriteString(FileName) ; Write(':') ; WriteCard(CurSymLine, 0) ; Write(':') ; WriteString(a) ;
|
||||
WriteLn ;
|
||||
WriteString( Lines[IndexCur] ) ; WriteLn ;
|
||||
i := CurSym ;
|
||||
WHILE i>0 DO
|
||||
Write(' ') ;
|
||||
DEC(i)
|
||||
END ;
|
||||
i := StrLen(CurrentSymbol) ;
|
||||
WHILE i>0 DO
|
||||
Write('^') ;
|
||||
DEC(i)
|
||||
END ;
|
||||
WriteLn ;
|
||||
WriteString(a) ; WriteLn ;
|
||||
END WriteError ;
|
||||
|
||||
|
||||
(*
|
||||
OpenSource - Attempts to open the source file, a.
|
||||
The success of the operation is returned.
|
||||
*)
|
||||
|
||||
PROCEDURE OpenSource (a: ARRAY OF CHAR) : BOOLEAN ;
|
||||
BEGIN
|
||||
f := OpenToRead(a) ;
|
||||
IF IsNoError(f)
|
||||
THEN
|
||||
StrCopy(a, FileName) ;
|
||||
Opened := TRUE ;
|
||||
Init ;
|
||||
RETURN( TRUE )
|
||||
ELSE
|
||||
Opened := FALSE ;
|
||||
Eof := TRUE ;
|
||||
RETURN( FALSE )
|
||||
END
|
||||
END OpenSource ;
|
||||
|
||||
|
||||
(*
|
||||
CloseSource - Closes the current open file.
|
||||
*)
|
||||
|
||||
PROCEDURE CloseSource ;
|
||||
BEGIN
|
||||
IF Opened=TRUE
|
||||
THEN
|
||||
Opened := FALSE ;
|
||||
Close( f )
|
||||
END
|
||||
END CloseSource ;
|
||||
|
||||
|
||||
(*
|
||||
GetSymbol - gets the next Symbol into CurrentSymbol.
|
||||
*)
|
||||
|
||||
PROCEDURE GetSymbol ;
|
||||
BEGIN
|
||||
StrCopy( CurrentSymbol, LastSymbol ) ;
|
||||
IF StackPtr>0
|
||||
THEN
|
||||
DEC(StackPtr) ;
|
||||
StrCopy( Stack[StackPtr], CurrentSymbol )
|
||||
ELSE
|
||||
ReadSymbol( CurrentSymbol )
|
||||
END
|
||||
END GetSymbol ;
|
||||
|
||||
|
||||
(*
|
||||
PutSymbol - pushes a symbol, Name, back onto the input.
|
||||
GetSymbol will set CurrentSymbol to, Name.
|
||||
*)
|
||||
|
||||
PROCEDURE PutSymbol (Name: ARRAY OF CHAR) ;
|
||||
BEGIN
|
||||
IF StackPtr=MaxStack
|
||||
THEN
|
||||
WriteError('Maximum push back symbol exceeded - Increase CONST MaxStack')
|
||||
ELSE
|
||||
StrCopy(Name, Stack[StackPtr]) ;
|
||||
INC(StackPtr)
|
||||
END
|
||||
END PutSymbol ;
|
||||
|
||||
|
||||
PROCEDURE ReadSymbol (VAR a: ARRAY OF CHAR) ;
|
||||
VAR
|
||||
high,
|
||||
i : CARDINAL ;
|
||||
ok : BOOLEAN ;
|
||||
BEGIN
|
||||
high := HIGH(a) ;
|
||||
IF NOT Eof
|
||||
THEN
|
||||
IF InQuotes
|
||||
THEN
|
||||
i := 0 ;
|
||||
IF CurrentChar=QuoteChar
|
||||
THEN
|
||||
InQuotes := FALSE ;
|
||||
a[i] := QuoteChar ;
|
||||
INC(i) ;
|
||||
AdvanceChar
|
||||
ELSE
|
||||
(* Fill in string or character *)
|
||||
i := 0 ;
|
||||
REPEAT
|
||||
a[i] := CurrentChar ;
|
||||
INC(i) ;
|
||||
AdvanceChar
|
||||
UNTIL (CurrentChar=QuoteChar) OR Eof OR (i>high) ;
|
||||
END
|
||||
ELSE
|
||||
(* Get rid of all excess spaces *)
|
||||
|
||||
REPEAT
|
||||
IF CurrentChar=' '
|
||||
THEN
|
||||
WHILE (CurrentChar=' ') AND (NOT Eof) DO
|
||||
AdvanceChar
|
||||
END ;
|
||||
ok := FALSE
|
||||
ELSIF (CurrentChar='(') AND (NextChar='*')
|
||||
THEN
|
||||
ConsumeComments ;
|
||||
ok := FALSE
|
||||
ELSE
|
||||
ok := TRUE
|
||||
END
|
||||
UNTIL ok ;
|
||||
i := 0 ;
|
||||
CurSym := CurCharIndex ;
|
||||
CurSymLine := CurLine ;
|
||||
IF (CurrentChar='"') OR (CurrentChar="'")
|
||||
THEN
|
||||
InQuotes := TRUE ;
|
||||
QuoteChar := CurrentChar ;
|
||||
a[i] := CurrentChar ;
|
||||
AdvanceChar ;
|
||||
INC(i)
|
||||
ELSIF DoubleDelimiter()
|
||||
THEN
|
||||
a[i] := CurrentChar ;
|
||||
AdvanceChar ;
|
||||
INC(i) ;
|
||||
a[i] := CurrentChar ;
|
||||
AdvanceChar ;
|
||||
INC(i)
|
||||
ELSIF Delimiter()
|
||||
THEN
|
||||
a[i] := CurrentChar ;
|
||||
AdvanceChar ;
|
||||
INC(i)
|
||||
ELSE
|
||||
REPEAT
|
||||
a[i] := CurrentChar ;
|
||||
AdvanceChar ;
|
||||
INC(i)
|
||||
UNTIL Delimiter() OR (i>high) OR (CurrentChar=' ') OR Eof
|
||||
END
|
||||
END
|
||||
ELSE
|
||||
(* eof *)
|
||||
i := 0 ;
|
||||
a[i] := eof ;
|
||||
INC(i)
|
||||
END ;
|
||||
IF i<=HIGH(a)
|
||||
THEN
|
||||
a[i] := nul
|
||||
END
|
||||
END ReadSymbol ;
|
||||
|
||||
|
||||
(*
|
||||
ConsumeComments - consumes Modula-2 comments.
|
||||
*)
|
||||
|
||||
PROCEDURE ConsumeComments ;
|
||||
VAR
|
||||
Level: CARDINAL ;
|
||||
BEGIN
|
||||
Level := 0 ;
|
||||
REPEAT
|
||||
IF (CurrentChar='(') AND (NextChar='*')
|
||||
THEN
|
||||
INC(Level)
|
||||
ELSIF (CurrentChar='*') AND (NextChar=')')
|
||||
THEN
|
||||
DEC(Level)
|
||||
END ;
|
||||
AdvanceChar ;
|
||||
UNTIL (Level=0) OR Eof ;
|
||||
AdvanceChar
|
||||
END ConsumeComments;
|
||||
|
||||
|
||||
(* Delimiter returns true if and only if CurrentChar is a delimiter *)
|
||||
|
||||
PROCEDURE Delimiter() : BOOLEAN ;
|
||||
BEGIN
|
||||
IF (CurrentChar='-') OR
|
||||
(CurrentChar='+') OR (CurrentChar='*') OR (CurrentChar='\') OR
|
||||
(CurrentChar='|') OR (CurrentChar='(') OR (CurrentChar=')') OR
|
||||
(CurrentChar='"') OR (CurrentChar="'") OR (CurrentChar='{')
|
||||
THEN
|
||||
RETURN( TRUE )
|
||||
ELSIF
|
||||
(CurrentChar='}') OR (CurrentChar='[') OR (CurrentChar=']') OR
|
||||
(CurrentChar='#') OR (CurrentChar='=') OR (CurrentChar='<')
|
||||
THEN
|
||||
RETURN( TRUE )
|
||||
ELSIF
|
||||
(CurrentChar='>') OR (CurrentChar='.') OR (CurrentChar=';') OR
|
||||
(CurrentChar=':') OR (CurrentChar='^') OR (CurrentChar=',')
|
||||
THEN
|
||||
RETURN( TRUE )
|
||||
ELSE
|
||||
RETURN( FALSE )
|
||||
END
|
||||
END Delimiter ;
|
||||
|
||||
|
||||
PROCEDURE DoubleDelimiter () : BOOLEAN ;
|
||||
BEGIN
|
||||
RETURN (
|
||||
((CurrentChar='>') AND (NextChar='=')) OR
|
||||
((CurrentChar='<') AND (NextChar='=')) OR
|
||||
((CurrentChar='<') AND (NextChar='>')) OR
|
||||
((CurrentChar=':') AND (NextChar='=')) OR
|
||||
((CurrentChar='.') AND (NextChar='.'))
|
||||
)
|
||||
END DoubleDelimiter ;
|
||||
|
||||
|
||||
PROCEDURE AdvanceChar ;
|
||||
BEGIN
|
||||
IF NOT Eof
|
||||
THEN
|
||||
CurrentChar := NextChar ;
|
||||
CurCharIndex := NextCharIndex ;
|
||||
IndexCur := IndexNext ;
|
||||
CurLine := NextLine ;
|
||||
IF CurrentChar=eof
|
||||
THEN
|
||||
Eof := TRUE
|
||||
ELSIF NextCharIndex=HighNext
|
||||
THEN
|
||||
IndexNext := (IndexCur+1) MOD Wrap ;
|
||||
HighNext := 0 ;
|
||||
REPEAT
|
||||
NextChar := ReadChar(f) ;
|
||||
IF NOT IsNoError(f)
|
||||
THEN
|
||||
NextChar := eof ;
|
||||
Lines[IndexNext][HighNext] := NextChar ;
|
||||
INC( HighNext )
|
||||
END ;
|
||||
WHILE (NextChar#eof) AND (NextChar#lf) AND (NextChar#cr) AND (HighNext<MaxLine) DO
|
||||
Lines[IndexNext][HighNext] := NextChar ;
|
||||
INC( HighNext ) ;
|
||||
NextChar := ReadChar(f) ;
|
||||
IF NOT IsNoError(f)
|
||||
THEN
|
||||
NextChar := eof
|
||||
END
|
||||
END ;
|
||||
IF (NextChar=eof) OR (NextChar=lf) OR (NextChar=cr)
|
||||
THEN
|
||||
IF InQuotes
|
||||
THEN
|
||||
Lines[IndexNext][HighNext] := ' ' ; (* Space for delimiter *)
|
||||
Lines[IndexNext][HighNext+1] := nul ;
|
||||
WriteError('missing end of quote on this source line') ; HALT
|
||||
END ;
|
||||
INC( NextLine )
|
||||
END
|
||||
UNTIL HighNext>0 ;
|
||||
IF HighNext>=MaxLine THEN WriteError('Line too long') ; HALT END ;
|
||||
Lines[IndexNext][HighNext] := ' ' ; (* Space for delimiter *)
|
||||
Lines[IndexNext][HighNext+1] := nul ;
|
||||
NextCharIndex := 0 ;
|
||||
NextChar := Lines[IndexNext][NextCharIndex]
|
||||
ELSE
|
||||
INC(NextCharIndex) ;
|
||||
NextChar := Lines[IndexNext][NextCharIndex]
|
||||
END
|
||||
END
|
||||
END AdvanceChar ;
|
||||
|
||||
|
||||
PROCEDURE Init ;
|
||||
BEGIN
|
||||
StackPtr := 0 ;
|
||||
InQuotes := FALSE ;
|
||||
Eof := FALSE ;
|
||||
IndexCur := 1 ;
|
||||
IndexNext := 0 ;
|
||||
CurCharIndex := 0 ;
|
||||
Lines[IndexCur][0] := nul ;
|
||||
HighNext := 0 ;
|
||||
NextCharIndex := 0 ;
|
||||
CurLine := 1 ;
|
||||
NextLine := 1 ;
|
||||
CurrentChar := ' ' ;
|
||||
NextChar := ' ' ;
|
||||
StrCopy("", CurrentSymbol) ;
|
||||
StrCopy("", LastSymbol) ;
|
||||
IndexCur := IndexNext
|
||||
END Init ;
|
||||
|
||||
|
||||
BEGIN
|
||||
Init
|
||||
END M2Lex.
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user