MAINTAINERS: Remove chill maintainers.

* MAINTAINERS: Remove chill maintainers.
	* Makefile.in (CHILLFLAGS): Remove.
	(CHILL_LIB): Remove.
	(TARGET_CONFIGDIRS): Remove libchill.
	(CHILL_FOR_TARGET): Remove.
	(BASE_FLAGS_TO_PASS): Don't pass CHILLFLAGS, CHILL_FOR_TARGET, or
	CHILL_LIB.
	(CONFIGURE_TARGET_MODULES): Remove configure-target-libchill.
	(CHECK_TARGET_MODULES): Likewise.
	(INSTALL_TARGET_MODULES): Likewise.
	(CLEAN_TARGET_MODULES): Likewise.
	(configure-target-libchill): Remove.
	(all-target-libchill): Remove.
	* configure.in (target_libs): Remove target-libchill.
	Do not compute CHILL_FOR_TARGET.
	* libchill: Remove directory.

	Remove Chill front end.
	* gcc.c (default_compilers): Remove Chill entries.
	* ch: Remove directory.
	* doc/frontends.texi: Remove information about Chill.
	* doc/sourcebuild.texi: Likewise.
	* doc/standards.texi: Likewise.

	* testsuite/lib/chill.exp: Remove.

	* g77.texi: Remove Chill reference.

	* gcc_release (build_tarfiles): Do not build Chill tarfiles.
	(CHILL_DIRS): Remove.

From-SVN: r52325
This commit is contained in:
Mark Mitchell 2002-04-15 19:00:10 +00:00 committed by Mark Mitchell
parent d5c66eccdf
commit 1629730106
138 changed files with 48 additions and 70851 deletions

View File

@ -1,3 +1,22 @@
2002-04-15 Mark Mitchell <mark@codesourcery.com>
* MAINTAINERS: Remove chill maintainers.
* Makefile.in (CHILLFLAGS): Remove.
(CHILL_LIB): Remove.
(TARGET_CONFIGDIRS): Remove libchill.
(CHILL_FOR_TARGET): Remove.
(BASE_FLAGS_TO_PASS): Don't pass CHILLFLAGS, CHILL_FOR_TARGET, or
CHILL_LIB.
(CONFIGURE_TARGET_MODULES): Remove configure-target-libchill.
(CHECK_TARGET_MODULES): Likewise.
(INSTALL_TARGET_MODULES): Likewise.
(CLEAN_TARGET_MODULES): Likewise.
(configure-target-libchill): Remove.
(all-target-libchill): Remove.
* configure.in (target_libs): Remove target-libchill.
Do not compute CHILL_FOR_TARGET.
* libchill: Remove directory.
2002-04-12 Richard Henderson <rth@redhat.com>
* config.guess (sun4u:SunOS:5.*:*): Guess sparcv9 if 64-bit isa

View File

@ -77,8 +77,6 @@ fortran Richard Henderson rth@redhat.com
fortran Toon Moene toon@moene.indiv.nluug.nl
c++ Jason Merrill jason@redhat.com
c++ Mark Mitchell mark@codesourcery.com
chill Dave Brolley brolley@redhat.com
chill Per Bothner per@bothner.com
cpplib Dave Brolley brolley@redhat.com
cpplib Per Bothner per@bothner.com
cpplib Zack Weinberg zack@codesourcery.com

View File

@ -100,8 +100,6 @@ LIBCFLAGS_FOR_TARGET = $(CFLAGS_FOR_TARGET)
PICFLAG =
PICFLAG_FOR_TARGET =
CHILLFLAGS = $(CFLAGS)
CHILL_LIB = -lchill
CXX = c++
# Use -O2 to stress test the compiler.
@ -178,7 +176,7 @@ OTHERS =
# This is set by the configure script to the list of directories which
# should be built using the target tools.
TARGET_CONFIGDIRS = libiberty libgloss $(SPECIAL_LIBS) newlib librx winsup opcodes bsp libstub cygmon libf2c libchill libobjc
TARGET_CONFIGDIRS = libiberty libgloss $(SPECIAL_LIBS) newlib librx winsup opcodes bsp libstub cygmon libf2c libobjc
# Target libraries are put under this directory:
# Changed by configure to $(target_alias) if cross.
@ -235,7 +233,6 @@ INSTALL_TARGET_CROSS = installdirs \
# Should be substed by configure.in
FLAGS_FOR_TARGET =
CC_FOR_TARGET =
CHILL_FOR_TARGET =
CXX_FOR_TARGET =
CXX_FOR_TARGET_FOR_RECURSIVE_MAKE =
GCJ_FOR_TARGET =
@ -359,9 +356,6 @@ BASE_FLAGS_TO_PASS = \
"CC_FOR_TARGET=$(CC_FOR_TARGET)" \
"CFLAGS=$(CFLAGS)" \
"CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \
"CHILLFLAGS=$(CHILLFLAGS)" \
"CHILL_FOR_TARGET=$(CHILL_FOR_TARGET)" \
"CHILL_LIB=$(CHILL_LIB)" \
"GCJ_FOR_TARGET=$(GCJ_FOR_TARGET)" \
"CXX_FOR_BUILD=$(CXX_FOR_BUILD)" \
"CXXFLAGS=$(CXXFLAGS)" \
@ -789,7 +783,6 @@ ALL_TARGET_MODULES = \
all-target-librx \
all-target-newlib \
all-target-libf2c \
all-target-libchill \
all-target-libobjc \
all-target-libtermcap \
all-target-winsup \
@ -813,7 +806,6 @@ CONFIGURE_TARGET_MODULES = \
configure-target-librx \
configure-target-newlib \
configure-target-libf2c \
configure-target-libchill \
configure-target-libobjc \
configure-target-libtermcap \
configure-target-winsup \
@ -836,7 +828,6 @@ CHECK_TARGET_MODULES = \
check-target-libstdc++-v3 \
check-target-newlib \
check-target-libf2c \
check-target-libchill \
check-target-libobjc \
check-target-winsup \
check-target-libiberty \
@ -853,7 +844,6 @@ INSTALL_TARGET_MODULES = \
install-target-libstdc++-v3 \
install-target-newlib \
install-target-libf2c \
install-target-libchill \
install-target-libobjc \
install-target-libtermcap \
install-target-winsup \
@ -942,7 +932,6 @@ CLEAN_TARGET_MODULES = \
clean-target-librx \
clean-target-newlib \
clean-target-libf2c \
clean-target-libchill \
clean-target-libobjc \
clean-target-winsup \
clean-target-libgloss \
@ -1787,8 +1776,6 @@ all-target-libstub: configure-target-libstub
all-libtool:
configure-target-libf2c: $(ALL_GCC_C)
all-target-libf2c: configure-target-libf2c all-target-libiberty
configure-target-libchill: $(ALL_GCC_C)
all-target-libchill: configure-target-libchill all-target-libiberty
configure-target-libobjc: $(ALL_GCC_C)
all-target-libobjc: configure-target-libobjc all-target-libiberty
all-m4: all-libiberty all-texinfo

View File

@ -73,7 +73,6 @@ target_libs="target-libiberty \
target-librx \
${libstdcxx_version} \
target-libf2c \
target-libchill \
${libgcj}
target-libobjc"
@ -1539,20 +1538,6 @@ case $CC_FOR_TARGET in
*) CC_FOR_TARGET=$CC_FOR_TARGET' $(FLAGS_FOR_TARGET)' ;;
esac
if test "x${CHILL_FOR_TARGET+set}" = xset; then
:
elif test -d ${topsrcdir}/gcc; then
CHILL_FOR_TARGET='$$r/gcc/xgcc -B$$r/gcc/ -L$$r/gcc/ch/runtime/'
elif test "$host" = "$target"; then
CHILL_FOR_TARGET='$(CC)'
else
CHILL_FOR_TARGET=`echo gcc | sed -e 's/x/x/' ${program_transform_name}`
fi
case $CHILL_FOR_TARGET in
*' $(FLAGS_FOR_TARGET)') ;;
*) CHILL_FOR_TARGET=$CHILL_FOR_TARGET' $(FLAGS_FOR_TARGET)' ;;
esac
if test "x${GCJ_FOR_TARGET+set}" = xset; then
:
elif test -d ${topsrcdir}/gcc; then
@ -1599,7 +1584,6 @@ s:^TARGET_CONFIGDIRS[ ]*=.*$:TARGET_CONFIGDIRS = ${target_configdirs}:
s%^TARGET_CONFIGARGS[ ]*=.*$%TARGET_CONFIGARGS = ${targargs}%
s%^FLAGS_FOR_TARGET[ ]*=.*$%FLAGS_FOR_TARGET = ${FLAGS_FOR_TARGET}%
s%^CC_FOR_TARGET[ ]*=.*$%CC_FOR_TARGET = ${CC_FOR_TARGET}%
s%^CHILL_FOR_TARGET[ ]*=.*$%CHILL_FOR_TARGET = ${CHILL_FOR_TARGET}%
s%^GCJ_FOR_TARGET[ ]*=.*$%GCJ_FOR_TARGET = ${GCJ_FOR_TARGET}%
s%^CXX_FOR_TARGET[ ]*=.*$%CXX_FOR_TARGET = ${qCXX_FOR_TARGET}%
s%^CXX_FOR_TARGET_FOR_RECURSIVE_MAKE[ ]*=.*$%CXX_FOR_TARGET_FOR_RECURSIVE_MAKE = ${qqCXX_FOR_TARGET}%

View File

@ -1,3 +1,12 @@
2002-04-15 Mark Mitchell <mark@codesourcery.com>
Remove Chill front end.
* gcc.c (default_compilers): Remove Chill entries.
* ch: Remove directory.
* doc/frontends.texi: Remove information about Chill.
* doc/sourcebuild.texi: Likewise.
* doc/standards.texi: Likewise.
2002-04-15 Douglas B Rupp <rupp@gnat.com>
* config/alpha/vms.h (INCLUDE_DEFAULTS): Add /gnu/lib/gcc-lib/include.

File diff suppressed because it is too large Load Diff

View File

@ -1,184 +0,0 @@
# Top level Makefile fragment for GNU CHILL.
# Copyright (C) 1994, 1998, 2000 Free Software Foundation, Inc.
#This file is part of GNU CC.
#GNU CC 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 2, or (at your option)
#any later version.
#GNU CC 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 CC; see the file COPYING. If not, write to
#the Free Software Foundation, 59 Temple Place - Suite 330,
#Boston, MA 02111-1307, USA. */
# This file provides the language dependent support in the main Makefile.
# Each language makefile fragment must provide the following targets:
#
# foo.all.build, foo.all.cross, foo.start.encap, foo.rest.encap,
# foo.info, foo.dvi,
# foo.install-normal, foo.install-common, foo.install-info, foo.install-man,
# foo.uninstall,
# foo.mostlyclean, foo.clean, foo.distclean, foo.extraclean,
# foo.maintainer-clean, foo.stage1, foo.stage2, foo.stage3, foo.stage4
#
# where `foo' is the name of the language.
#
# It should also provide rules for:
#
# - making any compiler driver (eg: g++)
# - the compiler proper (eg: cc1plus)
# - define the names for selecting the language in LANGUAGES.
#
# define version of GNUCHILL compiler. Note: maybe we have to change the
# mechanism
GNUCHILL_VERSION = 1.5.2
# Actual names to use when installing a native compiler.
# (Cygnus configure overrides these when using -program-transform-name).
CHILL_INSTALL_NAME = chill
# Actual names to use when installing a cross-compiler.
# (Cygnus configure overrides these when using -program-transform-name).
CHILL_CROSS_NAME = $(target_alias)-chill
CHILL_SRCS = $(srcdir)/ch/actions.c $(srcdir)/ch/convert.c \
$(srcdir)/ch/decl.c $(srcdir)/ch/except.c $(srcdir)/ch/expr.c \
$(srcdir)/ch/grant.c $(srcdir)/ch/inout.c $(srcdir)/ch/lang.c \
$(srcdir)/ch/lex.c $(srcdir)/ch/loop.c \
$(srcdir)/ch/parse.c $(srcdir)/ch/satisfy.c \
$(srcdir)/ch/tasking.c $(srcdir)/ch/timing.c $(srcdir)/ch/tree.c \
$(srcdir)/ch/typeck.c
# Extra flags to pass to recursive makes.
CHILL_FLAGS_TO_PASS = \
"CHILLFLAGS=$(CHILLFLAGS)" \
"CHILL_FOR_TARGET=$(CHILL_FOR_TARGET)" \
"CHILL_LIB=$(CHILL_LIB)" \
"GNUCHILL_VERSION=$(GNUCHILL_VERSION)"
#
# Define the names for selecting languages in LANGUAGES.
CHILL: chill cc1chill$(exeext)
# handle startfile in chill script and build script to install
chill: $(srcdir)/ch/chill.in Makefile
thisdir=`pwd` ; \
sed -e "s:startfile=chillrt0:startfile=$${thisdir}/ch/runtime/chillrt0.o:" \
-e "s:libpath=chillrt:libpath=-L$${thisdir}/ch/runtime/:" \
-e "s:whatgcc=gcc:whatgcc=\"$${thisdir}/xgcc$(exeext) -B$${thisdir}/\":" \
-e "s:gnuchill_version=unknown:gnuchill_version=$(GNUCHILL_VERSION):" \
-e "s:gnuchill_script_flags=:gnuchill_script_flags=\"$(GNUCHILL_SCRIPT_FLAGS)\":" $(srcdir)/ch/chill.in > chill ; \
chmod a+x chill ; \
if [ -f ../gcc-cross$(exeext) ]; then \
whatgcc=$(GCC_CROSS_NAME) ; \
else \
whatgcc=$(GCC_INSTALL_NAME) ; \
fi; \
sed -e "s:startfile=chillrt0:startfile=$(libsubdir)/chillrt0.o:" \
-e "s:whatgcc=gcc:whatgcc=$(bindir)/$${whatgcc}:" \
-e "s:gnuchill_version=unknown:gnuchill_version=$(GNUCHILL_VERSION):" \
-e "s:libpath=chillrt:libpath=:" \
-e "s:gnuchill_script_flags=:gnuchill_script_flags=\"$(GNUCHILL_SCRIPT_FLAGS)\":" $(srcdir)/ch/chill.in > chill.install ; \
chmod a+x chill.install
# Don't depend on cc1chill$(exeext), because chill-cross is always built for cross,
# and thus a cc1chill$(exeext) dependence would force cc1chill$(exeext) to always be built.
# Note that gcc-cross and g++-cross do not have cc1 or cc1plus dependencies.
chill-cross: $(srcdir)/ch/chill.in
touch $@
cc1chill$(exeext): $(P) $(CHILL_SRCS) $(LIBDEPS) $(BACKEND) \
insn-config.h insn-flags.h insn-attr.h insn-codes.h \
attribs.o c-typeck.o c-aux-info.o c-common.o \
ggc-callbacks.o
cd ch; $(MAKE) $(LANG_FLAGS_TO_PASS) $(CHILL_FLAGS_TO_PASS) ../cc1chill$(exeext)
#
# Build hooks:
CHILL.all.build: chill
CHILL.all.cross: chill-cross
CHILL.start.encap: chill
CHILL.rest.encap:
CHILL.dvi: ch/chill.dvi
CHILL.generated-manpages:
CHILL.info: $(srcdir)/ch/chill.info
$(srcdir)/ch/chill.info: $(srcdir)/ch/chill.texi
cd $(srcdir)/ch && $(MAKEINFO) -o chill.info chill.texi
ch/chill.dvi: $(srcdir)/ch/chill.texi
s=`cd $(srcdir); pwd`; export s; \
cd ch && $(TEXI2DVI) $$s/ch/chill.texi
#
# Install hooks:
# cc1chill is installed elsewhere as part of $(COMPILERS).
CHILL.install-normal:
# Install the driver program
CHILL.install-common: installdirs
-if [ -f cc1chill$(exeext) ] ; then \
if [ -f chill.install ] ; then \
if [ -f gcc-cross$(exeext) ]; then \
rm -f $(bindir)/$(CHILL_CROSS_NAME); \
$(INSTALL_SCRIPT) chill.install $(bindir)/$(CHILL_CROSS_NAME); \
chmod a+x $(bindir)/$(CHILL_CROSS_NAME); \
else \
rm -f $(bindir)/$(CHILL_INSTALL_NAME); \
$(INSTALL_SCRIPT) chill.install $(bindir)/$(CHILL_INSTALL_NAME); \
chmod a+x $(bindir)/$(CHILL_INSTALL_NAME); \
fi ; \
fi ; \
fi
# Don't delete $(infodir)/ch.info* unless there's actually new
# docs to install (in case LANGUAGES didn't contain chill earlier).
CHILL.install-info: installdirs
-cd $(srcdir)/ch; for i in chill.info*; do \
rm -f $(infodir)/chill.info*; \
realfile=`echo $$i | sed -e 's|.*/\([^/]*\)$$|\1|'`; \
$(INSTALL_DATA) $$i $(infodir)/$$realfile; \
done
CHILL.install-man:
CHILL.uninstall:
-rm -rf $(bindir)/$(CHILL_INSTALL_NAME)
-rm -rf $(bindir)/$(CHILL_CROSS_NAME)
#
# Clean hooks:
# A lot of the ancillary files are deleted by the main makefile.
# We just have to delete files specific to us.
CHILL.mostlyclean:
-rm -f chill.install ch/*.o ch/ch-version.c
CHILL.clean:
CHILL.distclean:
-rm -f ch/config.status ch/Makefile
CHILL.extraclean:
CHILL.maintainer-clean:
-rm -f ch/TAGS
-rm -f $(srcdir)/ch/chill.info* ch/chill.dvi ch/chill.??s ch/chill.*aux
# Delete locally created file.
-rm -f ch/hash.h
#
# Stage hooks:
# The main makefile has already created stage?/ch.
CHILL.stage1: stage1-start
-mv ch/*.o stage1/ch
CHILL.stage2: stage2-start
-mv ch/*.o stage2/ch
CHILL.stage3: stage3-start
-mv ch/*.o stage3/ch
CHILL.stage4: stage4-start
-mv ch/*.o stage4/ch

View File

@ -1,324 +0,0 @@
# Makefile for GNU CHILL compiler.
# Copyright (C) 1987, 1988, 1990, 1991, 1992, 1993, 1994, 1998,
# 1999, 2000, 2001 Free Software Foundation, Inc.
#This file is part of GNU CC.
#GNU CC 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 2, or (at your option)
#any later version.
#GNU CC 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 CC; see the file COPYING. If not, write to
#the Free Software Foundation, 59 Temple Place - Suite 330,
#Boston, MA 02111-1307, USA. */
# The makefile built from this file lives in the language subdirectory.
# It's purpose is to provide support for:
#
# 1) recursion where necessary, and only then (building .o's), and
# 2) building and debugging cc1 from the language subdirectory, and
# 3) nothing else.
#
# The parent makefile handles all other chores, with help from the
# language makefile fragment, of course.
#
# The targets for external use are:
# all, TAGS, ???mostlyclean, ???clean.
# Suppress smart makes who think they know how to automake Yacc files
.y.c:
# Variables that exist for you to override.
# See below for how to change them for certain systems.
# Various ways of specifying flags for compilations:
# CFLAGS is for the user to override to, e.g., do a bootstrap with -O2.
# BOOT_CFLAGS is the value of CFLAGS to pass
# to the stage2 and stage3 compilations
# XCFLAGS is used for most compilations but not when using the GCC just built.
XCFLAGS =
CFLAGS = -g
BOOT_CFLAGS = -O $(CFLAGS)
# These exists to be overridden by the x-* and t-* files, respectively.
X_CFLAGS =
T_CFLAGS =
X_CPPFLAGS =
T_CPPFLAGS =
CC = @CC@
AR = ar
AR_FLAGS = rc
SHELL = /bin/sh
MAKEINFO = makeinfo
TEXI2DVI = texi2dvi
# Define this as & to perform parallel make on a Sequent.
# Note that this has some bugs, and it seems currently necessary
# to compile all the gen* files first by hand to avoid erroneous results.
P =
# This is used instead of ALL_CFLAGS when compiling with GCC_FOR_TARGET.
# It omits XCFLAGS, and specifies -B./.
# It also specifies -B$(tooldir)/ to find as and ld for a cross compiler.
GCC_CFLAGS=$(INTERNAL_CFLAGS) $(X_CFLAGS) $(T_CFLAGS) $(CFLAGS)
# Tools to use when building a cross-compiler.
# These are used because `configure' appends `cross-make'
# to the makefile when making a cross-compiler.
# We don't use cross-make. Instead we use the tools
# from the build tree, if they are available.
# program_transform_name and objdir are set by configure.in.
program_transform_name =
objdir = .
target=@target@
xmake_file=@dep_host_xmake_file@
tmake_file=@dep_tmake_file@
#version=`sed -e 's/.*\"\([^ \"]*\)[ \"].*/\1/' < $(srcdir)/version.c`
#mainversion=`sed -e 's/.*\"\([0-9]*\.[0-9]*\).*/\1/' < $(srcdir)/version.c`
# Directory where sources are, from where we are.
srcdir = @srcdir@
VPATH = @srcdir@
# Directory where texinfo.tex lives
# texidir = $(srcdir)/../../texinfo
# Top build directory, relative to here.
top_builddir = ..
# Internationalization library.
INTLLIBS = @INTLLIBS@
# Additional system libraries to link with.
CLIB=
# End of variables for you to override.
# Definition of `all' is here so that new rules inserted by sed
# do not specify the default target.
all: all.indirect
# This tells GNU Make version 3 not to put all variables in the environment.
.NOEXPORT:
# sed inserts variable overrides after the following line.
####target overrides
@target_overrides@
####host overrides
@host_overrides@
#
# Now figure out from those variables how to compile and link.
all.indirect: Makefile ../chill ../cc1chill$(exeext)
# IN_GCC distinguishes between code compiled into GCC itself and other
# programs built during a bootstrap.
# autoconf inserts -DCROSS_COMPILE if we are building a cross compiler.
INTERNAL_CFLAGS = -DIN_GCC @CROSS@
# This is the variable actually used when we compile.
ALL_CFLAGS = $(INTERNAL_CFLAGS) $(X_CFLAGS) $(T_CFLAGS) $(CFLAGS) $(XCFLAGS)
# Likewise.
ALL_CPPFLAGS = $(CPPFLAGS) $(X_CPPFLAGS) $(T_CPPFLAGS)
# This is where we get libiberty.a from.
LIBIBERTY = ../../libiberty/libiberty.a
# How to link with both our special library facilities
# and the system's installed libraries.
LIBS = $(LIBIBERTY) $(CLIB) $(INTLLIBS)
LIBDEPS = $(INTLLIBS) $(LIBIBERTY)
# Specify the directories to be searched for header files.
# Both . and srcdir are used, in that order,
# so that tm.h and config.h will be found in the compilation
# subdirectory rather than in the source directory.
INCLUDES = -I. -I.. -I$(srcdir) -I$(srcdir)/.. -I$(srcdir)/../config -I$(srcdir)/../../include
# Flags to pass to recursive makes.
# ??? $(CC) may need some work to handle stage[123].
# ??? The choices here will need some experimenting with.
FLAGS_TO_PASS = \
"AR_FLAGS=$(AR_FLAGS)" \
"AR_FOR_TARGET=$(AR_FOR_TARGET)" \
"BISON=$(BISON)" \
"BISONFLAGS=$(BISONFLAGS)" \
"CC=$(CC)" \
"CFLAGS=$(CFLAGS)" \
"GCC_FOR_TARGET=$(CC_FOR_TARGET)" \
"LDFLAGS=$(LDFLAGS)" \
"LEX=$(LEX)" \
"LEXFLAGS=$(LEXFLAGS)" \
"MAKEINFO=$(MAKEINFO)" \
"MAKEINFOFLAGS=$(MAKEINFOFLAGS)" \
"RANLIB_FOR_TARGET=$(RANLIB_FOR_TARGET)" \
"RANLIB_TEST_FOR_TARGET=$(RANLIB_TEST_FOR_TARGET)" \
"SHELL=$(SHELL)" \
"exec_prefix=$(exec_prefix)" \
"prefix=$(prefix)" \
"tooldir=$(tooldir)" \
"bindir=$(bindir)" \
"libsubdir=$(libsubdir)"
# Always use -I$(srcdir)/config when compiling.
.c.o:
$(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $<
# This tells GNU make version 3 not to export all the variables
# defined in this file into the environment.
.NOEXPORT:
#
# Lists of files for various purposes.
# Language-specific object files for CHILL
CHILL_OBJS = parse.o actions.o except.o grant.o lang.o \
tree.o lex.o decl.o typeck.o convert.o expr.o loop.o \
tasking.o timing.o inout.o satisfy.o ch-version.o \
../ggc-callbacks.o
BACKEND = ../toplev.o ../libbackend.a
../cc1chill$(exeext): $(P) $(CHILL_OBJS) $(BACKEND) $(LIBDEPS)
$(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(CHILL_OBJS) \
$(BACKEND) $(LIBS)
# This executable is used in the CHILL regression
# test script
utils/printf : $(srcdir)/utils/printf.c
$(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $<
#
# This is the top-level trigger for a CHILL regression test.
# It also builds those tools needed for CHILL regression testing.
#
check: ../cc1chill$(exeext) utils/printf
cd ..; $(MAKE) $(FLAGS_TO_PASS) xgcc gcov cpp cc1 ld
$(srcdir)/regression.sh -d -p
clean-tests:
cd testsuite/execute; $(MAKE) clean
cd testsuite/execute/oe; $(MAKE) clean
cd testsuite/compile/elektra; $(MAKE) clean
cd testsuite/compile/votrics; $(MAKE) clean
cd testsuite/compile; $(MAKE) clean
cd testsuite/noncompile; $(MAKE) clean
cd testsuite/examples; $(MAKE) clean
mostlyclean:
test -d testsuite && $(MAKE) clean-tests
rm -f *.o
clean: mostlyclean
#
Makefile: $(srcdir)/Makefile.in $(srcdir)/../configure
cd ..; $(SHELL) config.status
native: config.status ../cc1chill$(exeext) ../chill
#
# Compiling object files from source files.
# Note that dependencies on obstack.h are not written
# because that file is not part of GCC.
# CHILL language specific files.
EXPR_H = $(srcdir)/../expr.h ../insn-codes.h
RTL_H = $(srcdir)/../rtl.h $(srcdir)/../rtl.def \
$(srcdir)/../machmode.h $(srcdir)/../machmode.def
TREE_H = $(srcdir)/../tree.h $(srcdir)/../real.h $(srcdir)/../tree.def \
$(srcdir)/../machmode.h $(srcdir)/../machmode.def
CHILL_TREE_H = $(TREE_H) ch-tree.h ch-tree.def
# hash.h really depends on $(srcdir)/gperf.
# But this would screw things for people that don't have gperf,
# if gperf got touched, say.
# Thus you have to remove hash.h to force it to be re-made.
# Note: CHILL requires two sets of keywords, one all uppercase and
# one all lowercase. The hash table ends up with both sets in it.
$(srcdir)/hash.h:
sed -e '1,/^%%/d' < $(srcdir)/gperf | \
sed '/^[^a-zA-Z]/d' | tr "[a-z]" "[A-Z]" > gperf.tmp2
cat $(srcdir)/gperf gperf.tmp2 > gperf.tmp
gperf -L C -F ', 0, 0, 0' -D -E -S1 -p -j1 -i 1 -g -o -t -k'*' \
gperf.tmp > $(srcdir)/hash.h || ( \
echo "Please update your 'gperf' from ftp://ftp.gnu.org/pub/gnu/gperf/" >&2 ; \
exit 1 )
$(RM) gperf.tmp gperf.tmp2
actions.o : actions.c $(CONFIG_H) $(CHILL_TREE_H) actions.h $(RTL_H) \
lex.h $(srcdir)/../flags.h $(srcdir)/../input.h \
$(EXPR_H) $(srcdir)/../system.h $(srcdir)/../toplev.h diagnostic.h
convert.o : convert.c $(CONFIG_H) $(CHILL_TREE_H) $(srcdir)/../flags.h \
$(srcdir)/../tree.h $(srcdir)/../system.h $(srcdir)/../toplev.h \
$(srcdir)/../convert.h
decl.o : decl.c $(CONFIG_H) $(CHILL_TREE_H) $(srcdir)/../flags.h lex.h \
$(srcdir)/../system.h $(srcdir)/../toplev.h diagnostic.h
except.o : except.c $(CONFIG_H) $(srcdir)/../tree.h $(RTL_H) $(CHILL_TREE_H) \
$(srcdir)/../system.h $(srcdir)/../toplev.h
expr.o : expr.c $(CONFIG_H) $(RTL_H) $(CHILL_TREE_H) $(srcdir)/../flags.h \
$(EXPR_H) $(srcdir)/../tree.h lex.h $(srcdir)/../system.h \
$(srcdir)/../toplev.h
grant.o: grant.c $(CONFIG_H) $(CHILL_TREE_H) $(RTL_H) $(srcdir)/../flags.h \
$(srcdir)/../input.h lex.h actions.h $(srcdir)/../system.h \
$(srcdir)/../toplev.h $(srcdir)/../output.h
inout.o : inout.c $(CONFIG_H) $(CHILL_TREE_H) $(srcdir)/../flags.h \
$(srcdir)/../input.h $(srcdir)/../system.h $(srcdir)/../toplev.h
lang.o : lang.c $(CONFIG_H) $(CHILL_TREE_H) $(srcdir)/../input.h lex.h \
$(srcdir)/../system.h $(srcdir)/../toplev.h $(EXPR_H) $(RTL_H) \
$(srcdir)/../diagnostic.h
lex.o : lex.c $(CONFIG_H) $(CHILL_TREE_H) $(RTL_H) $(srcdir)/../flags.h \
$(srcdir)/../input.h $(srcdir)/parse.h $(srcdir)/../system.h \
$(srcdir)/../toplev.h lex.h hash.h
loop.o : loop.c $(CONFIG_H) $(RTL_H) $(CHILL_TREE_H) lex.h \
$(srcdir)/../flags.h $(srcdir)/../input.h \
$(srcdir)/../tree.h $(srcdir)/../system.h $(srcdir)/../toplev.h
parse.o : parse.c $(CONFIG_H) $(CHILL_TREE_H) parse.h \
lex.h actions.h tasking.h $(srcdir)/../system.h $(srcdir)/../toplev.h
satisfy.o : satisfy.c $(CONFIG_H) $(CHILL_TREE_H) $(srcdir)/../tree.h \
$(srcdir)/../flags.h lex.h $(srcdir)/../system.h $(srcdir)/../toplev.h
timing.o : timing.c $(CONFIG_H) $(CHILL_TREE_H) $(RTL_H) $(srcdir)/../flags.h \
$(srcdir)/../input.h lex.h $(srcdir)/../system.h $(srcdir)/../toplev.h
tasking.o : tasking.c $(CONFIG_H) $(CHILL_TREE_H) $(RTL_H) \
$(srcdir)/../flags.h $(srcdir)/../input.h \
lex.h $(srcdir)/../system.h $(srcdir)/../toplev.h
tree.o : tree.c $(CONFIG_H) $(CHILL_TREE_H) $(srcdir)/../system.h \
$(srcdir)/../toplev.h
typeck.o : typeck.c $(CONFIG_H) $(CHILL_TREE_H) ../insn-codes.h \
$(srcdir)/../expr.h ../insn-codes.h $(srcdir)/../flags.h lex.h \
$(srcdir)/../system.h $(srcdir)/../toplev.h $(srcdir)/../output.h
ch-version.o : ch-version.c
ch-version.c : Makefile
echo 'const char * const gnuchill_version = "$(GNUCHILL_VERSION)";' > $@
## This is ugly, but I don't want GNU make to put these variables in
## the environment. Older makes will see this as a set of targets
## with no dependencies and no actions.
unexport CHILLFLAGS CHILL_LIB CHILL_FOR_TARGET :
#
# These exist for maintenance purposes.
# Update the tags table.
TAGS: force
cd $(srcdir); \
etags *.y *.h *.c *.l ../*.h ../*.c; \
.PHONY: TAGS
force:

View File

@ -1,43 +0,0 @@
This directory contains the GNU front-end for the Chill language,
contributed by Cygnus Solutions.
Chill is the "CCITT High-Level Language", where CCITT is the old
name for what is now ITU, the International Telecommunications Union.
It is is language in the Modula2 family, and targets many of the
same applications as Ada (especially large embedded systems).
Chill was never used much in the United States, but is still
being used in Europe, Brazil, Korea, and other places.
Chill has been standardized by a series of reports/standards.
The GNU implementation mostly follows the 1988 version of
the language, with some backwards compatibility options for
the 1984 version, and some other extensions. However, it
does not implement all of the features of any standard.
The most recent standard is Z.200 (11/93), available from
http://www.itu.int/itudoc/itu-t/rec/z.html.
The GNU Chill implementation is not being actively developed.
Cygnus has one customer we are maintaining Chill for,
but we are not planning on putting major work into Chill.
This Net release is for educational purposes (as an example
of a different Gcc front-end), and for those who find it useful.
It is an unsupported hacker release. Bug reports without
patches are likely to get ignored. Questions may get answered or
ignored depending on our mood! If you want to try your luck,
you can send a note to David Brolley <brolley@cygnus.com> or
Per Bothner <bothner@cygnus.com>.
One known problem is that we only support native builds of GNU Chill.
If you need a cross-compiler, you will find various problems,
including the directory structure, and the setjmp-based exception
handling mechanism.
The Chill run-time system is in the runtime sub-directory.
Notice rts.c contains a poor main's implementation of Chill
"processes" (threads). It is not added to libchill.a.
We only use it for testing. (Our customer uses a different
implementation for production work.)
The GNU Chill implementation was primarily written by
Per Bothner, along with Bill Cox, Wilfried Moser, Michael
Tiemann, and David Brolley.

File diff suppressed because it is too large Load Diff

View File

@ -1,34 +0,0 @@
/* Declarations for ch-actions.c.
Copyright (C) 1992, 1993, 1994, 1998, 2000 Free Software Foundation, Inc.
This file is part of GNU CC.
GNU CC 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 2, or (at your option)
any later version.
GNU CC 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 CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* used by compile_file */
void init_chill PARAMS ((void));
extern int grant_count;
extern void push_handler PARAMS ((void));
extern void pop_handler PARAMS ((int));
extern void push_action PARAMS ((void));
extern int chill_handle_single_dimension_case_label PARAMS ((tree, tree, int *, int *));
extern tree build_chill_multi_dimension_case_expr PARAMS ((tree, tree, tree));
extern tree build_multi_case_selector_expression PARAMS ((tree, tree));
extern void compute_else_ranges PARAMS ((tree, tree));

View File

@ -1,114 +0,0 @@
/* This file contains the definitions and documentation for the
additional tree codes used in the CHILL front end (see tree.def
for the standard codes).
Copyright (C) 1992, 1993 Free Software Foundation, Inc.
This file is part of GNU CC.
GNU CC 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 2, or (at your option)
any later version.
GNU CC 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 CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/*
* CHILL types.
*/
DEFTREECODE (GRANT_TYPE, "grant_type", 't', 0)
DEFTREECODE (SEIZE_TYPE, "seize_type", 't', 0)
/*
* CHILL decls.
*/
DEFTREECODE (KEYWORD_DECL, "keyword_decl", 'd', 0)
DEFTREECODE (INSTANCE_METHOD_DECL, "instance_method_decl", 'd', 0)
DEFTREECODE (CLASS_METHOD_DECL, "class_method_decl", 'd', 0)
/* A 'SEIZE (OLD->NEW)!POSTFIX' or 'GRANT (OLD->NEW)!POSTFIX' is
represented as an ALIAS_DECL where DECL_OLD_PREFIX, DECL_NEW_PREFIX,
and DECL_POSTFIX points to OLD, NEW, and POSTFIX, respectively.
These are IDENTIFIER_NODEs, or NULL if empty.
DECL_NAME is NEW!POSTFIX. After binding, DECL_ABSTRACT_ORIGIN
(if not an error_mark) points to a decl whose DECL_NAME is OLD!POSTFIX.
and which this name is linked to.
For SEIZE, DECL_SEIZEFILE names the most recent use_seize_file directive.
For GRANT, DECL_SEIZEFILE names the seizefile doing the granting. */
DEFTREECODE (ALIAS_DECL, "alias_decl", 'd', 0)
/* A variable, which is BASED on a pointer variable in DECL_ABSTRACT_ORIGIN. */
DEFTREECODE (BASED_DECL, "based_decl", 'd', 0)
/* A pseudo-variable declared by a DO WITH. */
DEFTREECODE (WITH_DECL, "with_decl", 'd', 0)
/*
* CHILL exprs.
*/
DEFTREECODE (CONCAT_EXPR, "concat_expr", '2', 2)
/* A slice (sub-array or sub-string) of operand 0, where
operand 1 is the start of the slice, and operand 2 is its length.
Currently, only used for bitstring sclices. */
DEFTREECODE (SLICE_EXPR, "slice_expr", 'e', 3)
/* Later, SET_IN_EXPR might be replaced by BIT_FIELD_REF or IN_EXPR. */
DEFTREECODE (SET_IN_EXPR, "set_in_expr", '2', 2)
/* A CASE_EXPR EX implements Chill CASE expression.
TREE_OPERAND (EX, 0) is a TREE_LIST representing the <case selector list>,
with one node for each expression. (Only one is supported by the
current implementation.)
TREE_OPERAND (EX, 1) is also a TREE_LIST, with one node for each
<value case alternative>. The TREE_VALUE of these node is the
<sub expression> (case element body); the TREE_PURPOSE contains
the <case label specification>. (The TREE_PURPOSE for the
optional ELSE (default) branch is NULL_TREE.) Each <case label
specification> is also represented as a list with one TREE_LIST
node for each <case label list> (though only length==1 is currently
supported). And finally: each <case label list> is again a list
with one TREE_LIST node for each <case label>. */
DEFTREECODE (CASE_EXPR, "case_expr", 'e', 2)
/* Powerset and static bit array operations.
Operands have same mode as result. */
DEFTREECODE (SET_NOT_EXPR, "set_not_expr", '1', 1)
DEFTREECODE (SET_IOR_EXPR, "set_ior_expr", '2', 2)
DEFTREECODE (SET_XOR_EXPR, "set_xor_expr", '2', 2)
DEFTREECODE (SET_AND_EXPR, "set_and_expr", '2', 2)
DEFTREECODE (SET_DIFF_EXPR, "set_diff_expr", '2', 2)
DEFTREECODE (PAREN_EXPR, "paren_expr", '1', 1)
DEFTREECODE (STRING_EQ_EXPR, "string_eq_expr", '2', 2)
DEFTREECODE (STRING_LT_EXPR, "string_lt_expr", '2', 2)
/* Used to represent a string repetition expression, until
we have a type for it; a SET_TYPE replicator needs a
TYPE_DOMAIN even if it represents the empty set */
DEFTREECODE (REPLICATE_EXPR, "replicate_expr", 'e', 2)
/* An undefined value. Used for the Chill operator '*',
and sometimes for padding. */
DEFTREECODE (UNDEFINED_EXPR, "undefined_expr", 'e', 0)
/* Used to represent a process instance */
DEFTREECODE (INSTANCE_TYPE, "instance_type", 't', 0)
/* Used to represent a reference to an array of bitfields. Currently restricted
to fields which are 1 bit wide. */
DEFTREECODE (PACKED_ARRAY_REF, "packed_array_ref", 'r', 2)
/* ALSO NOTE: LANG_TYPE is used for two things during pass 1;
such a node is converted to some other type node during satisfy.
If CH_NOVELTY_FLAG is set, then this node is a logical copy of
its TREE_TYPE, but with a different novelty.
If TYPE_READONLY is set, then the node stands for 'READ M'
where M is the TREE_TYPE. */

File diff suppressed because it is too large Load Diff

View File

@ -1,252 +0,0 @@
GNU CHILL: A Complete CHILL Implementation
CHILL (the CCITT High Level Language) is a strongly-typed, block
structured language designed primarily for the implementation of large
and complex embedded systems. Tens of millions of lines of CHILL code
exist, and about 15,000 programmers world-wide use CHILL. Many
central-office telephone switching systems use CHILL for their control
software.
CHILL was designed to
- enhance reliability and run time efficiency by means of extensive
compile time checking;
- provide sufficient flexibility and power to encompass the required
range of applications and to exploit a variety of hardware;
_ provide facilities that encourage piecewise and modular development
of large systems;
- cater to real-time implementations by providing built-in concurrency
and time supervision primitives;
- permit the generation of highly efficient object code;
- facilitate ease of use and a short learning curve.
CHILL is specified in the "Blue Book":
CCITT High Level Language (CHILL) Recommendation Z.200
ISO/IEC 9496, Geneva 1989 ISBN 92-61-03801-8
Cygnus Support has completed the first level implementation of the
GNU CHILL compiler. Our compiler now supports the core features of
the CHILL language. Our goal is a fully retargetable, complete
implementation of the Z.200 specification. The next phase of
implementation will include:
. a minimal real-time kernel for demonstration use
. more rigorous type checking
. retargetable input/output
. interprocess communications
. fully compliant exception handling.
The State of the Implementation
The GNU CHILL compiler is in early beta state, performing correct
compilation and execution of correctly coded programs. Like most
CHILL compilers, the GNU compiler implements a large subset of the
language (as described below).
Since it uses the same compiler back-ends as the GNU C and C++
compilers, GNU CHILL is almost instantly available on all
platforms supported by GNU C, including the following:
m680xx, i960, i80x86, AMD29K, R3000, R4000, SPARClite,
Hitachi H8 and SH families, Z8001/2
It has been specifically tested under SunOS on SPARCs and under
SCO Unix on 80386s.
All of the GCC optimizations apply to CHILL as well, including
function inlining, dead code elimination, jump-to-jump elimination,
cross-jumping (tail-merging), constant propagation, common
subexpression elimination, loop-invariant code motion, strength
reduction, loop unrolling, induction variable elimination, flow
analysis (copy propagation, dead store elimination and elimination
of unreachable code), dataflow-driven instruction scheduling, and
many others.
I/O statements are parsed. The anticipated timeframe for I/O code
generation is Q1 1994.
What's Next
The multi-tasking functions require a small real time kernel.
A free implementation of such a kernel is not yet available.
We plan to offer a productized P-threads interface in Q2 1994.
Other runtime functions involving strings and powersets are
working.
GDB, the GNU Debugger, has been modified to provide simple CHILL
support. Some CHILL expressions are not yet recognized.
For those who aren't familiar with CHILL, here's a small but
useful example program:
--
-- Convert binary integers to decimal-coded ASCII string
--
vary1: MODULE
-- include declarations so we can output the test results
<> USE_SEIZE_FILE 'chprintf.grt' <>
SEIZE chprintf;
-- create a new name for the CHAR array mode
SYNMODE dec_string = CHAR (6) VARYING;
int_to_dec_char: PROC (decimal_num INT IN)
RETURNS (dec_string);
DCL neg_num BOOL := FALSE; -- save sign of parameter
DCL out_string dec_string;
IF decimal_num < 0 THEN -- positive numbers are easier
decimal_num := -decimal_num;
neg_num := TRUE;
FI
IF decimal_num = 0 THEN
out_string := '0'; /* handle zero */
ELSE
out_string := '';
DO WHILE decimal_num /= 0; -- loop until number is zero
-- concatenate a new digit in front of the output string
out_string := CHAR (ABS (decimal_num REM D'10) + H'30)
// out_string;
decimal_num := decimal_num / D'10;
OD;
IF neg_num THEN
-- prepend a hyphen for numbers < zero
out_string := '-' // out_string; -- restore sign
FI;
FI;
RESULT out_string; -- remember result
decimal_num := 0; -- reset for next call
neg_num := FALSE;
out_string := ' ';
END int_to_dec_char;
/* Try some test cases */
chprintf (int_to_dec_char (123456), 0);
chprintf ("^J", 0);
chprintf (int_to_dec_char (-654321), 0);
chprintf ("^J", 0);
chprintf (int_to_dec_char (0), 0);
chprintf ("^J", 0);
END vary1;
Completeness
GNU CHILL currently supports the following features. This outline
generally follows the structure of the Blue Book specification:
CCITT High Level Language (CHILL) Recommendation Z.200
ISO/IEC 9496, Geneva 1989 ISBN 92-61-03801-8
Modes (types)
no DYNAMIC modes yet
discrete modes
integer, boolean, character, real
multiple integer/real precisions (an extension)
set modes, range modes
powersets
references
(no ROW modes)
procedure modes
instance modes
event modes
buffer modes
(no input/output modes yet)
(no timing modes yet)
composite modes
strings
arrays
structures
VARYING string/array modes
(type-checking is not fully rigorous yet)
forward references
Expressions
literals
tuples
slices, ranges
the standard operators
Actions (statements)
assignments
if .. then .. else .. fi
cases
do action
do .. with
exits
calls
results/returns
gotos
assertions
cause exception
start/stop/continue process
Input/Output
(not yet)
Exception handling
fully compiled, but exceptions aren't
generated in all of the required situations
Time Supervision
(syntax only)
Inter-process communications
delay/delay case actions
send signal/receive case actions
send buffer/receive case actions
Multi-module programming
Seize/grant processing
multiple modules per source file
Bibliography
This list is included as an invitation. We'd appreciate hearing
of CHILL-related documents (with ISBN if possible) which aren't
described here. We're particularly interested in getting copies
of other conference Proceedings.
CCITT High Level Language (CHILL) Recommendation Z.200
ISO/IEC 9496, Geneva 1989 ISBN 92-61-03801-8
(The "blue book". The formal language definition; mostly a
language-lawyer's document, but more readable than most.)
Study Group X - Report R 34
This is the May 1992 revision of Z.200.
An Analytic Description of CHILL, the CCITT high-level
language, Branquart, Louis & Wodon, Springer-Verlag 1981
ISBN 3-540-11196-4
CHILL User's Manual
CCITT, Geneva 1986 ISBN 92-61-02601-X
(Most readable, but doesn't cover the whole language).
Introduction to CHILL
CCITT, Geneva 1983 ISBN 92-61-017771-1
CHILL CCITT High Level Language
Proceedings of the 5th CHILL Conference
North-Holland, 1991 ISBN 0 444 88904 3
Introduction to the CHILL programming Language
TELEBRAS, Campinas, Brazil 1990
CHILL: A Self-Instruction Manual
Telecommunication Institute - PITTC
Available from KVATRO A/S, N-7005 Trondheim, Norway
Phone: +47 7 52 00 90
(Great discussion of novelty.)
Some of these documents are available from Global Engineering
Documents, in Irvine, CA, USA. +1 714 261 1455.

View File

@ -1,130 +0,0 @@
#!/bin/sh
# Compile GNU Chill programs.
: || exec /bin/sh -f $0 $argv:q
# The compiler name might be different when doing cross-compilation
# (this should be configured)
gcc_name=gcc
whatgcc=gcc
speclang=-xnone
startfile=chillrt0
gnuchill_script_flags=
gnuchill_version=unknown
extraflags=
# replace the command name by the name of the new command
progname=`basename $0`
case "$0" in
*/*)
gcc=`echo $0 | sed -e "s;/[^/]*$;;"`/$gcc_name
;;
*)
gcc=$gcc_name
;;
esac
# $first is yes for first arg, no afterwards.
first=yes
# If next arg is the argument of an option, $quote is non-empty.
# More precisely, it is the option that wants an argument.
quote=
# $library is made empty to disable use of libchill.
library="-lchill"
libpath=chillrt
numargs=$#
for arg
do
if [ $first = yes ]
then
# Need some 1st arg to `set' which does not begin with `-'.
# We get rid of it after the loop ends.
set gcc
first=no
fi
# If you have to ask what this does, you should not edit this file. :-)
# The ``S'' at the start is so that echo -nostdinc does not eat the
# -nostdinc.
arg=`echo "S$arg" | sed "s/^S//; s/'/'\\\\\\\\''/g"`
if [ x$quote != x ]
then
quote=
else
quote=
case $arg in
-nostdlib)
# Inhibit linking with -lchill.
library=
libpath=
startfile=
;;
-B*)
gcc=`echo $arg | sed -e "s/^-B//"`$gcc_name
;;
-[bBVDUoeTuIYmLiA] | -Tdata | -Xlinker)
# these switches take following word as argument,
# so don't treat it as a file name.
quote=$arg
;;
-[cSEM] | -MM)
# Don't specify libraries if we won't link,
# since that would cause a warning.
library=
libpath=
startfile=
;;
-x*)
speclang=$arg
;;
-v)
# catch `chill -v'
if [ $numargs = 1 ] ; then
library=
libpath=
startfile=
fi
echo "GNUCHILL version $gnuchill_version"
;;
-fgrant-only | -fchill-grant-only)
#inhibit production of an object file
extraflags="-S -o /dev/null"
library=
libpath=
startfile=
;;
-*)
# Pass other options through; they don't need -x and aren't inputs.
;;
*)
# If file ends in .i, put options around it.
# But not if a specified -x option is currently active.
case "$speclang $arg" in -xnone\ *.[i])
set "$@" -xchill "'$arg'" -xnone
continue
esac
;;
esac
fi
set "$@" "'$arg'"
done
# Get rid of that initial 1st arg
if [ $first = no ]; then
shift
else
echo "$0: No input files specified."
exit 1
fi
if [ x$quote != x ]
then
echo "$0: argument to \`$quote' missing"
exit 1
fi
# The '-ansi' flag prevents cpp from changing this:
# NEWMODE x = SET (sun, mon, thu, wed, thu, fri, sat);
#to this:
# NEWMODE x = SET (1, mon, thu, wed, thu, fri, sat);
#which is a CHILL syntax error.
eval $whatgcc -ansi $gnuchill_script_flags $startfile "$@" $libpath $library $extraflags

File diff suppressed because it is too large Load Diff

View File

@ -1,38 +0,0 @@
# Top level configure fragment for GNU CHILL.
# Copyright (C) 1994, 2000, 2001 Free Software Foundation, Inc.
#This file is part of GNU CC.
#GNU CC 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 2, or (at your option)
#any later version.
#GNU CC 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 CC; see the file COPYING. If not, write to
#the Free Software Foundation, 59 Temple Place - Suite 330,
#Boston, MA 02111-1307, USA. */
# 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="CHILL"
compilers="cc1chill\$(exeext)"
stagestuff="chill chill-cross\$(exeext) cc1chill\$(exeext)"
outputs=ch/Makefile
target_libs=target-libchill
build_by_default=no

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,707 +0,0 @@
/* Exception support for GNU CHILL.
WARNING: Only works for native (needs setjmp.h)! FIXME!
Copyright (C) 1992, 1993, 1994, 1998, 1999, 2000, 2001
Free Software Foundation, Inc.
This file is part of GNU CC.
GNU CC 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 2, or (at your option)
any later version.
GNU CC 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 CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#include "config.h"
#include "system.h"
/* On Suns this can get you to the right definition if you
set the right value for TARGET. */
#include <setjmp.h>
#ifdef sequent
/* Can you believe they forgot this? */
#ifndef _JBLEN
#define _JBLEN 11
#endif
#endif
#ifndef _JBLEN
#define _JBLEN (sizeof(jmp_buf)/sizeof(int))
#define _JBLEN_2 _JBLEN+20
#else
/* if we use i.e. posix threads, this buffer must be longer */
#define _JBLEN_2 _JBLEN+20
#endif
/* On Linux setjmp is __setjmp FIXME: what is for CROSS */
#ifndef SETJMP_LIBRARY_NAME
#ifdef __linux__
#define SETJMP_LIBRARY_NAME "__setjmp"
#else
#define SETJMP_LIBRARY_NAME "setjmp"
#endif
#endif
#include "tree.h"
#include "ch-tree.h"
#include "rtl.h"
#include "toplev.h"
extern int expand_exit_needed;
static tree link_handler_decl;
static tree handler_link_pointer_type;
static tree unlink_handler_decl;
static int exceptions_initialized = 0;
static void emit_setup_handler PARAMS ((void));
static void initialize_exceptions PARAMS ((void));
static tree start_handler_array PARAMS ((void));
static void finish_handler_array PARAMS ((void));
static tree char_pointer_type_for_handler;
/* If this is 1, operations to push and pop on the __exceptionStack
are inline. The default is is to use a function call, to
allow for a per-thread exception stack. */
static int inline_exception_stack_ops = 0;
struct handler_state
{
struct handler_state *next;
/* Starts at 0, then incremented for every <on-alternative>. */
int prev_on_alternative;
/* If > 0: handler number for ELSE handler. */
int else_handler;
int action_number;
char do_pushlevel;
tree on_alt_list;
tree setjmp_expr;
/* A decl for the static handler array (used to map exception name to int).*/
tree handler_array_decl;
rtx end_label;
/* Used to pass a tree from emit_setup_handler to chill_start_on. */
tree handler_ref;
tree unlink_cleanup;
tree function;
/* flag to indicate that we are currently compiling this handler.
is_handled will need this to determine an unhandled exception */
int compiling;
};
/* This is incremented by one each time we start an action which
might have an ON-handler. It is reset between passes. */
static int action_number = 0;
int action_nesting_level = 0;
/* The global_handler_list is constructed in pass 1. It is not sorted.
It contains one element for each action that actually had an ON-handler.
An element's ACTION_NUMBER matches the action_number
of that action. The global_handler_list is eaten up during pass 2. */
#define ACTION_NUMBER(HANDLER) ((HANDLER)->action_number)
struct handler_state *global_handler_list = NULL;
/* This is a stack of handlers, one for each nested ON-handler. */
static struct handler_state *current_handler = NULL;
static struct handler_state *free_handlers = NULL; /* freelist */
static tree handler_element_type;
static tree handler_link_type;
static tree BISJ;
static tree jbuf_ident, prev_ident, handlers_ident;
static tree exception_stack_decl = 0;
/* Chain of cleanups associated with exception handlers.
The TREE_PURPOSE is an INTEGER_CST whose value is the
DECL_ACTION_NESTING_LEVEL (when the handled actions was entered).
The TREE_VALUE is an expression to expand when we exit that action. */
static tree cleanup_chain = NULL_TREE;
#if 0
/* Merge the current sequence onto the tail of the previous one. */
void
pop_sequence ()
{
rtx sequence_first = get_insns ();
end_sequence ();
emit_insns (sequence_first);
}
#endif
/* Things we need to do at the beginning of pass 2. */
void
except_init_pass_2 ()
{
/* First sort the global_handler_list on ACTION_NUMBER.
This will already be in close to reverse order (the exception being
nested ON-handlers), so insertion sort should essentially linear. */
register struct handler_state *old_list = global_handler_list;
/* First add a dummy final element. */
if (free_handlers)
global_handler_list = free_handlers;
else
global_handler_list
= (struct handler_state*) permalloc (sizeof (struct handler_state));
/* Make the final dummy "larger" than any other element. */
ACTION_NUMBER (global_handler_list) = action_number + 1;
/* Now move all the elements in old_list over to global_handler_list. */
while (old_list != NULL)
{
register struct handler_state **ptr = &global_handler_list;
/* Unlink from old_list. */
register struct handler_state *current = old_list;
old_list = old_list->next;
while (ACTION_NUMBER (current) > ACTION_NUMBER (*ptr))
ptr = &(*ptr)->next;
/* Link into proper place in global_handler_list (new list). */
current->next = *ptr;
*ptr = current;
}
/* Don't forget to reset action_number. */
action_number = 0;
}
/* This function is called at the beginning of an action that might be
followed by an ON-handler. Chill syntax doesn't let us know if
we actually have an ON-handler until we see the ON, so we save
away during pass 1 that information for use during pass 2. */
void
push_handler ()
{
register struct handler_state *hstate;
action_number++;
action_nesting_level++;
if (pass == 1)
{
if (free_handlers)
{
hstate = free_handlers;
free_handlers = hstate->next;
}
else
{
hstate =
(struct handler_state*) permalloc (sizeof (struct handler_state));
}
hstate->next = current_handler;
current_handler = hstate;
hstate->prev_on_alternative = 0;
hstate->else_handler = 0;
hstate->on_alt_list = NULL_TREE;
hstate->compiling = 0;
ACTION_NUMBER (hstate) = action_number;
return;
}
if (ACTION_NUMBER (global_handler_list) != action_number)
return;
/* OK. This action actually has an ON-handler.
Pop it from global_handler_list, and use it. */
hstate = global_handler_list;
global_handler_list = hstate->next;
/* Since this is pass 2, let's generate prologue code for that. */
hstate->next = current_handler;
current_handler = hstate;
hstate->prev_on_alternative = 0;
hstate->function = current_function_decl;
emit_setup_handler ();
}
static tree
start_handler_array ()
{
tree handler_array_type, decl;
push_obstacks_nochange ();
end_temporary_allocation ();
handler_array_type = build_array_type (handler_element_type, NULL_TREE);
decl = build_lang_decl (VAR_DECL,
get_unique_identifier ("handler_table"),
handler_array_type);
/* TREE_TYPE (decl) = handler_array_type;*/
TREE_READONLY (decl) = 1;
TREE_STATIC (decl) = 1;
DECL_INITIAL (decl) = error_mark_node;
pushdecl (decl);
make_decl_rtl (decl, NULL_PTR, 0);
current_handler->handler_array_decl = decl;
return decl;
}
static void
finish_handler_array ()
{
tree decl = current_handler->handler_array_decl;
tree t;
tree handler_array_init = NULL_TREE;
int handlers_count = 1;
int nelts;
/* Build the table mapping exceptions to handler(-number)s.
This is done in reverse order. */
/* First push the end of the list. This is either the ELSE
handler (current_handler->else_handler>0) or NULL handler to indicate
the end of the list (if current_handler->else-handler == 0).
The following works either way. */
handler_array_init = build_tree_list
(NULL_TREE, chill_expand_tuple
(handler_element_type,
build_nt (CONSTRUCTOR, NULL_TREE,
tree_cons (NULL_TREE,
null_pointer_node,
build_tree_list (NULL_TREE,
build_int_2 (current_handler->else_handler,
0))))));
for (t = current_handler->on_alt_list; t != NULL_TREE; t = TREE_CHAIN (t))
{ tree handler_number = TREE_PURPOSE(t);
tree elist = TREE_VALUE (t);
for ( ; elist != NULL_TREE; elist = TREE_CHAIN (elist))
{
tree ex_decl =
build_chill_exception_decl (IDENTIFIER_POINTER(TREE_VALUE(elist)));
tree ex_addr = build1 (ADDR_EXPR,
char_pointer_type_for_handler,
ex_decl);
tree el = build_nt (CONSTRUCTOR, NULL_TREE,
tree_cons (NULL_TREE,
ex_addr,
build_tree_list (NULL_TREE,
handler_number)));
mark_addressable (ex_decl);
TREE_CONSTANT (ex_addr) = 1;
handler_array_init =
tree_cons (NULL_TREE,
chill_expand_tuple (handler_element_type, el),
handler_array_init);
handlers_count++;
}
}
#if 1
nelts = list_length (handler_array_init);
TYPE_DOMAIN (TREE_TYPE (decl))
= build_index_type (build_int_2 (nelts - 1, - (nelts == 0)));
layout_type (TREE_TYPE (decl));
DECL_INITIAL (decl)
= convert (TREE_TYPE (decl),
build_nt (CONSTRUCTOR, NULL_TREE, handler_array_init));
/* Pop back to the obstack that is current for this binding level.
This is because MAXINDEX, rtl, etc. to be made below
must go in the permanent obstack. But don't discard the
temporary data yet. */
pop_obstacks ();
layout_decl (decl, 0);
/* To prevent make_decl_rtl (called indiectly by rest_of_decl_compilation)
throwing the existing RTL (which has already been used). */
PUT_MODE (DECL_RTL (decl), DECL_MODE (decl));
rest_of_decl_compilation (decl, (char*)0, 0, 0);
expand_decl_init (decl);
#else
/* To prevent make_decl_rtl (called indirectly by finish_decl)
altering the existing RTL. */
GET_MODE (DECL_RTL (current_handler->handler_array_decl)) =
DECL_MODE (current_handler->handler_array_decl);
finish_decl (current_handler->handler_array_decl,
build_nt (CONSTRUCTOR, NULL_TREE, handler_array_init),
NULL_TREE);
#endif
}
void
pop_handler (used)
int used;
{
action_nesting_level--;
if (pass == 1)
{
struct handler_state *old = current_handler;
if (old == NULL)
abort ();
current_handler = old->next;
if (used)
{ /* Push unto global_handler_list. */
old->next = global_handler_list;
global_handler_list = old;
}
else
{
/* Push onto free_handlers free list. */
old->next = free_handlers;
free_handlers = old;
}
}
else if (used)
{
current_handler = current_handler->next;
}
}
/* Emit code before an action that has an ON-handler. */
static void
emit_setup_handler ()
{
tree handler_decl, handler_addr, t;
/* Field references. */
tree jbuf_ref, handlers_ref,prev_ref;
if (!exceptions_initialized)
{
/* We temporarily reset the maximum_field_alignment to zero so the
compiler's exception data structures can be compatible with the
run-time system, even when we're compiling with -fpack. */
unsigned int save_maximum_field_alignment = maximum_field_alignment;
maximum_field_alignment = 0;
push_obstacks_nochange ();
end_temporary_allocation ();
initialize_exceptions ();
pop_obstacks ();
maximum_field_alignment = save_maximum_field_alignment;
}
push_momentary ();
handler_decl = build_lang_decl (VAR_DECL,
get_unique_identifier ("handler"),
handler_link_type);
push_obstacks_nochange ();
pushdecl(handler_decl);
expand_decl (handler_decl);
finish_decl (handler_decl);
jbuf_ref = build_component_ref (handler_decl, jbuf_ident);
jbuf_ref = build_chill_arrow_expr (jbuf_ref, 1);
handlers_ref = build_component_ref (handler_decl, handlers_ident);
prev_ref = build_component_ref (handler_decl, prev_ident);
/* Emit code to link in handler in __exceptionStack chain. */
mark_addressable (handler_decl);
handler_addr = build1 (ADDR_EXPR, handler_link_pointer_type, handler_decl);
if (inline_exception_stack_ops)
{
expand_expr_stmt (build_chill_modify_expr (prev_ref,
exception_stack_decl));
expand_expr_stmt (build_chill_modify_expr (exception_stack_decl,
handler_addr));
current_handler->handler_ref = prev_ref;
}
else
{
expand_expr_stmt (build_chill_function_call (link_handler_decl,
build_tree_list (NULL_TREE,
handler_addr)));
current_handler->handler_ref = handler_addr;
}
/* Expand: handler->__handlers = { <<array mapping names to ints } */
t = build1 (NOP_EXPR, build_pointer_type (handler_element_type),
build_chill_arrow_expr (start_handler_array (), 1));
expand_expr_stmt (build_chill_modify_expr (handlers_ref, t));
/* Emit code to unlink handler. */
if (inline_exception_stack_ops)
current_handler->unlink_cleanup
= build_chill_modify_expr (exception_stack_decl,
current_handler->handler_ref);
else
current_handler->unlink_cleanup
= build_chill_function_call (unlink_handler_decl,
build_tree_list(NULL_TREE,
current_handler->handler_ref));
cleanup_chain = tree_cons (build_int_2 (action_nesting_level, 0),
current_handler->unlink_cleanup,
cleanup_chain);
/* Emit code for setjmp. */
current_handler->setjmp_expr =
build_chill_function_call (BISJ, build_tree_list (NULL_TREE, jbuf_ref));
expand_start_case (1, current_handler->setjmp_expr,
integer_type_node, "on handler");
chill_handle_case_label (integer_zero_node, current_handler->setjmp_expr);
}
/* Start emitting code for: <actions> ON <handlers> END.
Assume we've parsed <actions>, and the setup needed for it. */
void
chill_start_on ()
{
expand_expr_stmt (current_handler->unlink_cleanup);
/* Emit code to jump past the handlers. */
current_handler->end_label = gen_label_rtx ();
current_handler->compiling = 1;
emit_jump (current_handler->end_label);
}
void
chill_finish_on ()
{
expand_end_case (current_handler->setjmp_expr);
finish_handler_array ();
emit_label (current_handler->end_label);
pop_momentary ();
cleanup_chain = TREE_CHAIN (cleanup_chain);
}
void
chill_handle_on_labels (labels)
tree labels;
{
unsigned int alternative = ++current_handler->prev_on_alternative;
if (pass == 1)
{
tree handler_number = build_int_2 (alternative, 0);
current_handler->on_alt_list =
tree_cons (handler_number, labels, current_handler->on_alt_list);
}
else
{
/* Find handler_number saved in pass 1. */
tree tmp;
for (tmp = current_handler->on_alt_list;
compare_tree_int (TREE_PURPOSE (tmp), alternative) != 0;
tmp = TREE_CHAIN (tmp))
;
if (expand_exit_needed)
expand_exit_something (), expand_exit_needed = 0;
chill_handle_case_label (TREE_PURPOSE (tmp),
current_handler->setjmp_expr);
}
}
void
chill_start_default_handler ()
{
current_handler->else_handler = ++current_handler->prev_on_alternative;
if (!ignoring)
{
chill_handle_case_default ();
}
}
void
chill_check_no_handlers ()
{
if (current_handler != NULL)
abort ();
}
static void
initialize_exceptions ()
{
tree jmp_buf_type = build_array_type (integer_type_node,
build_index_type (build_int_2 (_JBLEN_2-1, 0)));
tree setjmp_fndecl, link_ftype;
tree parmtypes
= tree_cons (NULL_TREE, build_pointer_type (jmp_buf_type), void_list_node);
setjmp_fndecl = builtin_function ("setjmp",
build_function_type (integer_type_node,
parmtypes),
0, NOT_BUILT_IN,
SETJMP_LIBRARY_NAME);
BISJ = build1 (ADDR_EXPR, build_pointer_type (TREE_TYPE (setjmp_fndecl)),
setjmp_fndecl);
char_pointer_type_for_handler
= build_pointer_type (build_type_variant (char_type_node, 1, 0));
handler_element_type =
build_chill_struct_type (chainon
(build_decl (FIELD_DECL,
get_identifier("__exceptid"),
char_pointer_type_for_handler),
build_decl (FIELD_DECL,
get_identifier("__handlerno"),
integer_type_node)));
jbuf_ident = get_identifier("__jbuf");
prev_ident = get_identifier("__prev");
handlers_ident = get_identifier("__handlers");
handler_link_type =
build_chill_struct_type
(chainon
(build_decl (FIELD_DECL, prev_ident, ptr_type_node),
chainon
(build_decl (FIELD_DECL, handlers_ident,
build_pointer_type (handler_element_type)),
build_decl (FIELD_DECL, jbuf_ident, jmp_buf_type))));
handler_link_pointer_type = build_pointer_type (handler_link_type);
if (inline_exception_stack_ops)
{
exception_stack_decl =
build_lang_decl (VAR_DECL,
get_identifier("__exceptionStack"),
handler_link_pointer_type);
TREE_STATIC (exception_stack_decl) = 1;
TREE_PUBLIC (exception_stack_decl) = 1;
DECL_EXTERNAL (exception_stack_decl) = 1;
push_obstacks_nochange ();
pushdecl(exception_stack_decl);
make_decl_rtl (exception_stack_decl, NULL_PTR, 1);
finish_decl (exception_stack_decl);
}
link_ftype = build_function_type (void_type_node,
tree_cons (NULL_TREE,
handler_link_pointer_type,
void_list_node));
link_handler_decl = builtin_function ("__ch_link_handler", link_ftype,
0, NOT_BUILT_IN, NULL_PTR);
unlink_handler_decl = builtin_function ("__ch_unlink_handler", link_ftype,
0, NOT_BUILT_IN, NULL_PTR);
exceptions_initialized = 1;
}
/* Do the cleanup(s) needed for a GOTO label.
We only need to do the last of the cleanups. */
void
expand_goto_except_cleanup (label_level)
int label_level;
{
tree list = cleanup_chain;
tree last = NULL_TREE;
for ( ; list != NULL_TREE; list = TREE_CHAIN (list))
{
if (compare_tree_int (TREE_PURPOSE (list), label_level) > 0)
last = list;
else
break;
}
if (last)
expand_expr_stmt (TREE_VALUE (last));
}
/* Returns true if there is a valid handler for EXCEPT_NAME
in the current static scope.
0 ... no handler found
1 ... local handler available
2 ... function may propagate this exception
*/
int
is_handled (except_name)
tree except_name;
{
tree t;
struct handler_state *h = current_handler;
/* if we are are currently compiling this handler
we have to start at the next level */
if (h && h->compiling)
h = h->next;
while (h != NULL)
{
if (h->function != current_function_decl)
break;
if (h->else_handler > 0)
return 1;
for (t = h->on_alt_list; t != NULL_TREE; t = TREE_CHAIN (t))
{
if (value_member (except_name, TREE_VALUE (t)))
return 1;
}
h = h->next;
}
t = TYPE_RAISES_EXCEPTIONS (TREE_TYPE (current_function_decl));
if (value_member (except_name, t))
return 2;
return 0;
}
/* function generates code to reraise exceptions
for PROC's propagating exceptions. */
void
chill_reraise_exceptions (exceptions)
tree exceptions;
{
tree wrk;
if (exceptions == NULL_TREE)
return; /* just in case */
if (pass == 1)
{
for (wrk = exceptions; wrk != NULL_TREE; wrk = TREE_CHAIN (wrk))
chill_handle_on_labels (build_tree_list (NULL_TREE, TREE_VALUE (wrk)));
}
else /* pass == 2 */
{
chill_start_on ();
expand_exit_needed = 0;
for (wrk = exceptions; wrk != NULL_TREE; wrk = TREE_CHAIN (wrk))
{
chill_handle_on_labels (TREE_VALUE (wrk));
/* do a CAUSE exception */
expand_expr_stmt (build_cause_exception (TREE_VALUE (wrk), 0));
expand_exit_needed = 1;
}
chill_finish_on ();
}
pop_handler (1);
}

File diff suppressed because it is too large Load Diff

View File

@ -1,166 +0,0 @@
struct resword {
const char *name;
short token;
enum rid rid;
enum toktype { RESERVED, DIRECTIVE, PREDEF } flags;
};
extern tree ridpointers [];
#ifdef __GNUC__
__inline
#endif
static unsigned int hash PARAMS ((const char *, unsigned int));
#ifdef __GNUC__
__inline
#endif
struct resword *in_word_set PARAMS ((const char *, unsigned int));
%%
access, ACCESS, NORID, RESERVED
after, AFTER, NORID, RESERVED
all, ALL, NORID, RESERVED
all_static_off, ALL_STATIC_OFF, NORID, DIRECTIVE
all_static_on, ALL_STATIC_ON, NORID, DIRECTIVE
and, AND, NORID, RESERVED
andif, ANDIF, NORID, RESERVED
array, ARRAY, NORID, RESERVED
asm, ASM_KEYWORD, NORID, RESERVED
assert, ASSERT, NORID, RESERVED
at, AT, NORID, RESERVED
based, BASED, NORID, RESERVED
begin, BEGINTOKEN, NORID, RESERVED
bin, BIN, NORID, RESERVED
bit, BOOLS, RID_BOOLS, PREDEF
body, BODY, NORID, RESERVED
bools, BOOLS, RID_BOOLS, RESERVED
buffer, BUFFER, NORID, RESERVED
buffer_code, IGNORED_DIRECTIVE, NORID, DIRECTIVE
by, BY, NORID, RESERVED
call, CALL, NORID, RESERVED
case, CASE, NORID, RESERVED
cause, CAUSE, NORID, RESERVED
ccitt_os, IGNORED_DIRECTIVE, NORID, DIRECTIVE
chars, CHARS, NORID, RESERVED
context, CONTEXT, NORID, RESERVED
continue, CONTINUE, NORID, RESERVED
cycle, CYCLE, NORID, RESERVED
dcl, DCL, NORID, RESERVED
debug_lines, IGNORED_DIRECTIVE, NORID, DIRECTIVE
debug_symbols, IGNORED_DIRECTIVE, NORID, DIRECTIVE
debug_types, IGNORED_DIRECTIVE, NORID, DIRECTIVE
delay, DELAY, NORID, RESERVED
do, DO, NORID, RESERVED
down, DOWN, NORID, RESERVED
dynamic, DYNAMIC, RID_DYNAMIC, RESERVED
else, ELSE, NORID, RESERVED
elsif, ELSIF, NORID, RESERVED
empty_off, EMPTY_OFF, NORID, DIRECTIVE
empty_on, EMPTY_ON, NORID, DIRECTIVE
end, END, NORID, RESERVED
esac, ESAC, NORID, RESERVED
even, IGNORED_DIRECTIVE, NORID, DIRECTIVE
event, EVENT, NORID, RESERVED
event_code, IGNORED_DIRECTIVE, NORID, DIRECTIVE
ever, EVER, NORID, RESERVED
exceptions, EXCEPTIONS, NORID, RESERVED
exit, EXIT, NORID, RESERVED
extra_const_seg, IGNORED_DIRECTIVE, NORID, DIRECTIVE
far, IGNORED_DIRECTIVE, NORID, DIRECTIVE
fi, FI, NORID, RESERVED
for, FOR, NORID, RESERVED
forbid, FORBID, NORID, RESERVED
general, GENERAL, NORID, RESERVED
generate_all_set_names, IGNORED_DIRECTIVE, NORID, DIRECTIVE
generate_set_names, IGNORED_DIRECTIVE, NORID, DIRECTIVE
goto, GOTO, NORID, RESERVED
grant, GRANT, NORID, RESERVED
grant_file_size, IGNORED_DIRECTIVE, NORID, DIRECTIVE
if, IF, NORID, RESERVED
in, IN, RID_IN, RESERVED
init, INIT, NORID, RESERVED
inline, INLINE, RID_INLINE, RESERVED
inout, PARAMATTR, RID_INOUT, RESERVED
large, IGNORED_DIRECTIVE, NORID, DIRECTIVE
list, IGNORED_DIRECTIVE, NORID, DIRECTIVE
loc, LOC, NORID, RESERVED
make_publics_for_discrete_syns, IGNORED_DIRECTIVE, NORID, DIRECTIVE
medium, IGNORED_DIRECTIVE, NORID, DIRECTIVE
mod, MOD, NORID, RESERVED
module, MODULE, NORID, RESERVED
multiple_const_segs, IGNORED_DIRECTIVE, NORID, DIRECTIVE
multiple_data_segs, IGNORED_DIRECTIVE, NORID, DIRECTIVE
newmode, NEWMODE, NORID, RESERVED
nolist, IGNORED_DIRECTIVE, NORID, DIRECTIVE
no_overlap_check, IGNORED_DIRECTIVE, NORID, DIRECTIVE
nonref, NONREF, NORID, RESERVED
nopack, NOPACK, NORID, RESERVED
not, NOT, NORID, RESERVED
od, OD, NORID, RESERVED
of, OF, NORID, RESERVED
on, ON, NORID, RESERVED
only_for_simulation, IGNORED_DIRECTIVE, NORID, DIRECTIVE
only_for_target, IGNORED_DIRECTIVE, NORID, DIRECTIVE
optimize, IGNORED_DIRECTIVE, NORID, DIRECTIVE
optimize_runtime, IGNORED_DIRECTIVE, NORID, DIRECTIVE
optimization_window, IGNORED_DIRECTIVE, NORID, DIRECTIVE
or, OR, NORID, RESERVED
orif, ORIF, NORID, RESERVED
out, PARAMATTR, RID_OUT, RESERVED
pack, PACK, NORID, RESERVED
page, IGNORED_DIRECTIVE, NORID, DIRECTIVE
pos, POS, NORID, RESERVED
powerset, POWERSET, NORID, RESERVED
prefixed, PREFIXED, NORID, RESERVED
print_o_code, IGNORED_DIRECTIVE, NORID, DIRECTIVE
print_symbol_table, IGNORED_DIRECTIVE, NORID, DIRECTIVE
priority, PRIORITY, NORID, RESERVED
proc, PROC, NORID, RESERVED
process, PROCESS, NORID, RESERVED
process_type, PROCESS_TYPE_TOKEN, NORID, DIRECTIVE
range, RANGE, NORID, RESERVED
range_off, RANGE_OFF, NORID, DIRECTIVE
range_on, RANGE_ON, NORID, DIRECTIVE
read, READ, RID_READ, RESERVED
receive, RECEIVE, NORID, RESERVED
recursive, RECURSIVE, NORID, RESERVED
reentrant, IGNORED_DIRECTIVE, NORID, DIRECTIVE
reentrant_all, IGNORED_DIRECTIVE, NORID, DIRECTIVE
ref, REF, NORID, RESERVED
region, REGION, NORID, RESERVED
rem, REM, NORID, RESERVED
remote, REMOTE, NORID, RESERVED
result, RESULT, NORID, RESERVED
return, RETURN, NORID, RESERVED
returns, RETURNS, NORID, RESERVED
row, ROW, NORID, RESERVED
seize, SEIZE, NORID, RESERVED
send, SEND, NORID, RESERVED
send_buffer_default_priority, SEND_BUFFER_DEFAULT_PRIORITY, NORID, DIRECTIVE
send_signal_default_priority, SEND_SIGNAL_DEFAULT_PRIORITY, NORID, DIRECTIVE
set, SET, NORID, RESERVED
short_pred_succ, IGNORED_DIRECTIVE, NORID, DIRECTIVE
signal, SIGNAL, NORID, RESERVED
signal_code, SIGNAL_CODE, NORID, DIRECTIVE
signal_max_length, IGNORED_DIRECTIVE, NORID, DIRECTIVE
simple, SIMPLE, NORID, RESERVED
small, IGNORED_DIRECTIVE, NORID, DIRECTIVE
spec, SPEC, NORID, RESERVED
start, START, NORID, RESERVED
state_routine, IGNORED_DIRECTIVE, NORID, DIRECTIVE
static, STATIC, NORID, RESERVED
step, STEP, NORID, RESERVED
stop, STOP, NORID, RESERVED
struct, STRUCT, NORID, RESERVED
support_causing_address, IGNORED_DIRECTIVE, NORID, DIRECTIVE
syn, SYN, NORID, RESERVED
synmode, SYNMODE, NORID, RESERVED
text, TEXT, NORID, RESERVED
then, THEN, NORID, RESERVED
this, THIS, NORID, RESERVED
timeout, TIMEOUT, NORID, RESERVED
to, TO, NORID, RESERVED
up, UP, NORID, RESERVED
use_seize_file, USE_SEIZE_FILE, NORID, DIRECTIVE
use_seize_file_restricted, USE_SEIZE_FILE_RESTRICTED, NORID, DIRECTIVE
varying, VARYING, NORID, RESERVED
while, WHILE, NORID, RESERVED
with, WITH, NORID, RESERVED
xor, XOR, NORID, RESERVED

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,40 +0,0 @@
/* Definitions for switches for GNU CHILL.
Copyright (C) 1995, 1998 Free Software Foundation, Inc.
This file is part of GNU CC.
GNU CC 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 2, or (at your option)
any later version.
GNU CC 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 CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* This is the contribution to the `documented_lang_options' array in
toplev.c for CHILL. */
DEFINE_LANG_NAME ("Chill")
{ "-lang-chill", "" },
{ "-flocal-loop-counter", "" },
{ "-fno-local-loop-counter", "Do not make separate scopes for every 'for' loop"},
{ "-fgrant-only", "Stop after successfully generating a grant file" },
{ "-fchill-grant-only", "" },
{ "-fold-strings", "Implement the 1984 Chill string semantics" },
{ "-fno-old-strings", "" },
{ "-fignore-case", "convert all idenitifers to lower case" },
{ "-fno-ignore-case", "" },
{ "-fpack", "Pack structures into available space"},
{ "-fno-pack", "" },
{ "-fspecial_UC", "Make special words be in uppercase" },
{ "-fspecial_LC", "" },
{ "-fruntime-checking", "" },
{ "-fno-runtime-checking", "Disable runtime checking of parameters" },

View File

@ -1,30 +0,0 @@
/* Definitions for specs for GNU CHILL.
Copyright (C) 1995, 1998, 1999 Free Software Foundation, Inc..
This file is part of GNU CC.
GNU CC 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 2, or (at your option)
any later version.
GNU CC 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 CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* This is the contribution to the `default_compilers' array in gcc.c for
CHILL. */
{".ch", "@chill"},
{".chi", "@chill"},
{"@chill",
"tradcpp0 -lang-chill %{!no-gcc:-D__GNUCHILL__=%v1} %(cpp_options)\
%{!M:%{!MM:%{!E:%{!pipe:%g.i} |\n\
cc1chill %{!pipe:%g.i} %(cc1_options)\
%{!fsyntax-only:%(invoke_as)}}}}\n"},

View File

@ -1,308 +0,0 @@
/* Language-specific hook definitions for CHILL front end.
Copyright (C) 1992, 1993, 1994, 1998, 1999, 2000, 2001
Free Software Foundation, Inc.
This file is part of GNU CC.
GNU CC 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 2, or (at your option)
any later version.
GNU CC 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 CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#include "config.h"
#include "system.h"
#include "tree.h"
#include "ch-tree.h"
#include "lex.h"
#include "input.h"
#include "toplev.h"
#include "rtl.h"
#include "expr.h"
#include "diagnostic.h"
/* Type node for boolean types. */
tree boolean_type_node;
/* True if STRING(INDEX) yields a CHARS(1) (or BOOLS(1)) rather than
a CHAR (or BOOL). Also, makes CHARS(1) similar for CHAR,
and BOOLS(1) similar to BOOL. This is for compatibility
for the 1984 version of Z.200.*/
int flag_old_strings = 0;
/* This is set non-zero to force user input tokens to lower case.
This is non-standard. See Z.200, page 8. */
int ignore_case = 1;
/* True if reserved and predefined words ('special' words in the Z.200
terminology) are in uppercase. Obviously, this had better not be
true if we're ignoring input case. */
int special_UC = 0;
/* The actual name of the input file, regardless of any #line directives */
const char* chill_real_input_filename;
extern FILE* finput;
static int deep_const_expr PARAMS ((tree));
static void chill_print_error_function PARAMS ((diagnostic_context *,
const char *));
/* Return 1 if the expression tree given has all
constant nodes as its leaves,otherwise. */
static int
deep_const_expr (exp)
tree exp;
{
enum chill_tree_code code;
int length;
int i;
if (exp == NULL_TREE)
return 0;
code = TREE_CODE (exp);
length = first_rtl_op (TREE_CODE (exp));
/* constant leaf? return TRUE */
if (TREE_CODE_CLASS (code) == 'c')
return 1;
/* Recursively check next level down. */
for (i = 0; i < length; i++)
if (! deep_const_expr (TREE_OPERAND (exp, i)))
return 0;
return 1;
}
tree
const_expr (exp)
tree exp;
{
if (TREE_CODE (exp) == INTEGER_CST)
return exp;
if (TREE_CODE (exp) == CONST_DECL)
return const_expr (DECL_INITIAL (exp));
if (TREE_CODE_CLASS (TREE_CODE (exp)) == 'd'
&& DECL_INITIAL (exp) != NULL_TREE
&& TREE_READONLY (exp))
return DECL_INITIAL (exp);
if (deep_const_expr (exp))
return exp;
if (TREE_CODE (exp) != ERROR_MARK)
error ("non-constant expression");
return error_mark_node;
}
/* Each of the functions defined here
is an alternative to a function in objc-actions.c. */
/* Used by c-lex.c, but only for objc. */
tree
lookup_interface (arg)
tree arg ATTRIBUTE_UNUSED;
{
return 0;
}
int
maybe_objc_comptypes (lhs, rhs)
tree lhs ATTRIBUTE_UNUSED, rhs ATTRIBUTE_UNUSED;
{
return -1;
}
tree
maybe_building_objc_message_expr ()
{
return 0;
}
int
recognize_objc_keyword ()
{
return 0;
}
void
lang_init_options ()
{
}
/* used by print-tree.c */
void
lang_print_xnode (file, node, indent)
FILE *file ATTRIBUTE_UNUSED;
tree node ATTRIBUTE_UNUSED;
int indent ATTRIBUTE_UNUSED;
{
}
/*
* process chill-specific compiler command-line options
* do not complain if the option is not recognised
*/
int
lang_decode_option (argc, argv)
int argc;
char **argv;
{
char *p = argv[0];
static int explicit_ignore_case = 0;
if (!strcmp(p, "-lang-chill"))
; /* do nothing */
else if (!strcmp (p, "-fruntime-checking"))
{
range_checking = 1;
empty_checking = 1;
}
else if (!strcmp (p, "-fno-runtime-checking"))
{
range_checking = 0;
empty_checking = 0;
runtime_checking_flag = 0;
}
else if (!strcmp (p, "-flocal-loop-counter"))
flag_local_loop_counter = 1;
else if (!strcmp (p, "-fno-local-loop-counter"))
flag_local_loop_counter = 0;
else if (!strcmp (p, "-fold-strings"))
flag_old_strings = 1;
else if (!strcmp (p, "-fno-old-strings"))
flag_old_strings = 0;
else if (!strcmp (p, "-fignore-case"))
{
explicit_ignore_case = 1;
if (special_UC)
{
error ("ignoring case upon input and");
error ("making special words uppercase wouldn't work");
}
else
ignore_case = 1;
}
else if (!strcmp (p, "-fno-ignore-case"))
ignore_case = 0;
else if (!strcmp (p, "-fspecial_UC"))
{
if (explicit_ignore_case)
{
error ("making special words uppercase and");
error (" ignoring case upon input wouldn't work");
}
else
special_UC = 1, ignore_case = 0;
}
else if (!strcmp (p, "-fspecial_LC"))
special_UC = 0;
else if (!strcmp (p, "-fpack"))
maximum_field_alignment = BITS_PER_UNIT;
else if (!strcmp (p, "-fno-pack"))
maximum_field_alignment = 0;
else if (!strcmp (p, "-fchill-grant-only"))
grant_only_flag = 1;
else if (!strcmp (p, "-fgrant-only"))
grant_only_flag = 1;
/* user has specified a seize-file path */
else if (p[0] == '-' && p[1] == 'I')
register_seize_path (&p[2]);
if (!strcmp(p, "-itu")) /* Force Z.200 semantics */
{
pedantic = 1; /* FIXME: new flag name? */
flag_local_loop_counter = 1;
}
else
return c_decode_option (argc, argv);
return 1;
}
static void
chill_print_error_function (context, file)
diagnostic_context *buffer __attribute__((__unused__));
const char *file;
{
static tree last_error_function = NULL_TREE;
static struct module *last_error_module = NULL;
if (last_error_function == current_function_decl
&& last_error_module == current_module)
return;
last_error_function = current_function_decl;
last_error_module = current_module;
if (file)
fprintf (stderr, "%s: ", file);
if (current_function_decl == global_function_decl
|| current_function_decl == NULL_TREE)
{
if (current_module == NULL)
fprintf (stderr, "At top level:\n");
else
fprintf (stderr, "In module %s:\n",
IDENTIFIER_POINTER (current_module->name));
}
else
{
const char *kind = "function";
const char *name = (*decl_printable_name) (current_function_decl, 2);
fprintf (stderr, "In %s `%s':\n", kind, name);
}
}
/* Print an error message for invalid use of an incomplete type.
VALUE is the expression that was used (or 0 if that isn't known)
and TYPE is the type that was invalid. */
void
incomplete_type_error (value, type)
tree value ATTRIBUTE_UNUSED;
tree type ATTRIBUTE_UNUSED;
{
error ("internal error - use of undefined type");
}
/* Return the typed-based alias set for T, which may be an expression
or a type. Return -1 if we don't do anything special. */
HOST_WIDE_INT
lang_get_alias_set (t)
tree t ATTRIBUTE_UNUSED;
{
/* ??? Need to figure out what the rules are. Certainly we'd need
to handle union-like things, and probably variant records.
Until then, turn off type-based aliasing completely. */
return 0;
}
void
lang_init ()
{
chill_real_input_filename = input_filename;
/* the beginning of the file is a new line; check for # */
/* With luck, we discover the real source file's name from that
and put it in input_filename. */
ungetc (check_newline (), finput);
/* set default grant file */
set_default_grant_file ();
print_error_function = chill_print_error_function;
}

File diff suppressed because it is too large Load Diff

View File

@ -1,98 +0,0 @@
/* Define constants for communication with the CHILL parser.
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1999, 2000
Free Software Foundation, Inc.
This file is part of GNU CC.
GNU CC 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 2, or (at your option)
any later version.
GNU CC 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 CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
enum rid
{
RID_UNUSED, /* keep this one first, please */
RID_ALL,
RID_ASSERTFAIL,
RID_ASSOCIATION,
RID_BIN,
RID_BIT,
RID_BOOL,
RID_BOOLS,
RID_BYTE,
RID_CHAR,
RID_CHARS,
RID_DOUBLE,
RID_DURATION,
RID_DYNAMIC,
RID_ELSE,
RID_EMPTY,
RID_FALSE,
RID_FLOAT,
RID_GENERAL,
RID_IN,
RID_INLINE,
RID_INOUT,
RID_INSTANCE,
RID_INT,
RID_LOC,
RID_LONG,
RID_LONG_REAL,
RID_NULL,
RID_OUT,
RID_OVERFLOW,
RID_PTR,
RID_RANGE,
RID_RANGEFAIL,
RID_READ,
RID_REAL,
RID_RECURSIVE,
RID_SHORT,
RID_SIMPLE,
RID_TIME,
RID_TRUE,
RID_UBYTE,
RID_UINT,
RID_ULONG,
RID_UNSIGNED,
RID_USHORT,
RID_VOID,
RID_MAX /* Last element */
};
#define NORID RID_UNUSED
#define RID_FIRST_MODIFIER RID_UNSIGNED
/* The elements of `ridpointers' are identifier nodes
for the reserved type names and storage classes.
It is indexed by a RID_... value. */
extern tree ridpointers[(int) RID_MAX];
extern char *token_buffer; /* Pointer to token buffer. */
extern tree make_pointer_declarator PARAMS ((tree, tree));
extern void reinit_parse_for_function PARAMS ((void));
extern int yylex PARAMS ((void));
extern tree default_grant_file;
extern tree current_grant_file;
extern tree current_seize_file;
extern int chill_at_module_level;
extern tree chill_initializer_name;
extern void prepare_paren_colon PARAMS ((void));

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,70 +0,0 @@
typedef union {
long itype;
tree ttype;
enum tree_code code;
char *filename;
int lineno;
} YYSTYPE;
extern YYSTYPE yylval;
/* DELAY is defined in the standard headers on some platforms like
SunOS 4.1.4. */
#ifdef DELAY
#undef DELAY
#endif
enum terminal
{
/*EOF = 0,*/
last_char_nonterminal = 256,
/* Please keep these in alphabetic order, for easier reference and updating.
*/
ABSOLUTE, ACCESS, AFTER, ALL, ALLOCATE, AND, ANDIF, ARRAY,
ARROW, ASGN, ASM_KEYWORD, ASSERT, ASSOCIATION, AT,
BASED, BEGINTOKEN, BIN, BIT, BITSTRING, BODY, BOOLS, BUFFER,
BUFFERNAME, BUFFER_CODE, BY,
CALL, CASE, CAUSE, CDDEL, CHAR, CHARS, COLON, COMMA, CONCAT, CONST,
CONTINUE, CYCLE,
DCL, DELAY, DIV, DO, DOT, DOWN, DYNAMIC,
ELSE, ELSIF, END, ENTRY, EQL, ESAC, EVENT, EVENT_CODE, EVER,
EXCEPTIONS, EXIT,
EXPR, /* an expression that has been pushed back */
FI, FLOATING, FOR, FORBID,
GENERAL, GOTO, GRANT, GT, GTE,
HEADEREL,
IF, IGNORED_DIRECTIVE, IN, INIT, INOUT, INLINE,
LC, LOC, LPC, LPRN, LT, LTE,
MOD, MODULE, MUL,
NAME, NE, NEW, NEWMODE, NONREF, NOPACK, NOT, NUMBER,
OD, OF, ON, OR, ORIF,
PACK, PARAMATTR, PERVASIVE, PLUS, POS, POWERSET,
PREFIXED, PRIORITY, PROC, PROCESS,
RANGE, RC, READ, READTEXT, RECEIVE, RECURSIVE, REF, REGION, REM,
RESULT, RETURN, RETURNS, ROUND, ROW, RPC, RPRN, RPRN_COLON,
SAME, SC, SEIZE, SEND, SET, SHARED, SIGNAL, SIGNALNAME, SIMPLE,
SINGLECHAR, SPEC, START, STATIC, STEP, STOP, STREAM, STRING,
STRUCT, SUB, SYN, SYNMODE,
TERMINATE, TEXT, THEN, THIS, TIMEOUT, TO, TRUNC, TYPENAME,
UP, USAGE,
VARYING,
WHERE, WHILE, WITH,
XOR,
/* These tokens only used within ch-lex.l to process compiler directives */
ALL_STATIC_OFF, ALL_STATIC_ON, EMPTY_OFF, EMPTY_ON,
GRANT_FILE_SIZE, PROCESS_TYPE_TOKEN, RANGE_OFF, RANGE_ON,
SEND_BUFFER_DEFAULT_PRIORITY, SEND_SIGNAL_DEFAULT_PRIORITY,
SIGNAL_CODE, SIGNAL_MAX_LENGTH, USE_SEIZE_FILE, USE_SEIZE_FILE_RESTRICTED,
USE_GRANT_FILE,
/* These tokens are recognized, and reported as errors, by the lexer. */
CONTEXT, REMOTE,
/* This token is passed back to the parser when an the main
input file (not a seize file) has reached end-of-file. */
END_PASS_1,
EMPTY, UMINUS,
dummy_last_terminal
};

View File

@ -1,629 +0,0 @@
/* Name-satisfaction for GNU Chill compiler.
Copyright (C) 1993, 1998, 1999, 2000 Free Software Foundation, Inc.
This file is part of GNU CC.
GNU CC 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 2, or (at your option)
any later version.
GNU CC 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 CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#include "config.h"
#include "system.h"
#include "tree.h"
#include "flags.h"
#include "ch-tree.h"
#include "lex.h"
#include "toplev.h"
#define SATISFY(ARG) ((ARG) = satisfy(ARG, chain))
struct decl_chain
{
struct decl_chain *prev;
/* DECL can be a decl, or a POINTER_TYPE or a REFERENCE_TYPE. */
tree decl;
};
/* forward declarations */
static tree satisfy PARAMS ((tree, struct decl_chain *));
static void cycle_error_print PARAMS ((struct decl_chain *, tree));
static tree safe_satisfy_decl PARAMS ((tree, struct decl_chain *));
static void satisfy_list PARAMS ((tree, struct decl_chain *));
static void satisfy_list_values PARAMS ((tree, struct decl_chain *));
static struct decl_chain dummy_chain;
#define LOOKUP_ONLY (chain==&dummy_chain)
/* Recursive helper routine to logically reverse the chain. */
static void
cycle_error_print (chain, decl)
struct decl_chain *chain;
tree decl;
{
if (chain->decl != decl)
{
cycle_error_print (chain->prev, decl);
if (TREE_CODE_CLASS (TREE_CODE (chain->decl)) == 'd')
error_with_decl (chain->decl, " `%s', which depends on ...");
}
}
static tree
safe_satisfy_decl (decl, prev_chain)
tree decl;
struct decl_chain *prev_chain;
{
struct decl_chain new_link;
struct decl_chain *link;
struct decl_chain *chain = prev_chain;
const char *save_filename = input_filename;
int save_lineno = lineno;
tree result = decl;
if (decl == NULL_TREE)
return decl;
if (!LOOKUP_ONLY)
{
int pointer_type_breaks_cycle = 0;
/* Look for a cycle.
We could do this test more efficiently by setting a flag. FIXME */
for (link = prev_chain; link != NULL; link = link->prev)
{
if (TREE_CODE_CLASS (TREE_CODE (link->decl)) != 'd')
pointer_type_breaks_cycle = 1;
if (link->decl == decl)
{
if (!pointer_type_breaks_cycle)
{
error_with_decl (decl, "cycle: `%s' depends on ...");
cycle_error_print (prev_chain, decl);
error_with_decl (decl, " `%s'");
return error_mark_node;
}
/* There is a cycle, but it includes a pointer type,
so we're OK. However, we still have to continue
the satisfy (for example in case this is a TYPE_DECL
that points to a LANG_DECL). The cycle-check for
POINTER_TYPE/REFERENCE_TYPE should stop the recursion. */
break;
}
}
new_link.decl = decl;
new_link.prev = prev_chain;
chain = &new_link;
}
input_filename = DECL_SOURCE_FILE (decl);
lineno = DECL_SOURCE_LINE (decl);
switch ((enum chill_tree_code)TREE_CODE (decl))
{
case ALIAS_DECL:
if (!LOOKUP_ONLY && !DECL_POSTFIX_ALL(decl))
result = safe_satisfy_decl (DECL_ABSTRACT_ORIGIN (decl), chain);
break;
case BASED_DECL:
SATISFY (TREE_TYPE (decl));
SATISFY (DECL_ABSTRACT_ORIGIN (decl));
break;
case CONST_DECL:
SATISFY (TREE_TYPE (decl));
SATISFY (DECL_INITIAL (decl));
if (!LOOKUP_ONLY)
{
if (DECL_SIZE (decl) == 0)
{
tree init_expr = DECL_INITIAL (decl);
tree init_type;
tree specified_mode = TREE_TYPE (decl);
if (init_expr == NULL_TREE
|| TREE_CODE (init_expr) == ERROR_MARK)
goto bad_const;
init_type = TREE_TYPE (init_expr);
if (specified_mode == NULL_TREE)
{
if (init_type == NULL_TREE)
{
check_have_mode (init_expr, "SYN without mode");
goto bad_const;
}
TREE_TYPE (decl) = init_type;
CH_DERIVED_FLAG (decl) = CH_DERIVED_FLAG (init_expr);
}
else if (CH_IS_ASSOCIATION_MODE (specified_mode) ||
CH_IS_ACCESS_MODE (specified_mode) || CH_IS_TEXT_MODE (specified_mode) ||
CH_IS_BUFFER_MODE (specified_mode) || CH_IS_EVENT_MODE (specified_mode))
{
error ("SYN of this mode not allowed");
goto bad_const;
}
else if (!CH_COMPATIBLE (init_expr, specified_mode))
{
error ("mode of SYN incompatible with value");
goto bad_const;
}
else if (discrete_type_p (specified_mode)
&& TREE_CODE (init_expr) == INTEGER_CST
&& (compare_int_csts (LT_EXPR, init_expr,
TYPE_MIN_VALUE (specified_mode))
|| compare_int_csts (GT_EXPR, init_expr,
TYPE_MAX_VALUE(specified_mode))
))
{
error ("SYN value outside range of its mode");
/* set an always-valid initial value to prevent
other errors. */
DECL_INITIAL (decl) = TYPE_MIN_VALUE (specified_mode);
}
else if (CH_STRING_TYPE_P (specified_mode)
&& (init_type && CH_STRING_TYPE_P (init_type))
&& integer_zerop (string_assignment_condition (specified_mode, init_expr)))
{
error ("INIT string too large for mode");
DECL_INITIAL (decl) = error_mark_node;
}
else
{
struct ch_class class;
class.mode = TREE_TYPE (decl);
class.kind = CH_VALUE_CLASS;
DECL_INITIAL (decl)
= convert_to_class (class, DECL_INITIAL (decl));
}
/* DECL_SIZE is set to prevent re-doing this stuff. */
DECL_SIZE (decl) = TYPE_SIZE (TREE_TYPE (decl));
DECL_SIZE_UNIT (decl) = TYPE_SIZE_UNIT (TREE_TYPE (decl));
if (! TREE_CONSTANT (DECL_INITIAL (decl))
&& TREE_CODE (DECL_INITIAL (decl)) != ERROR_MARK)
{
error_with_decl (decl,
"value of %s is not a valid constant");
DECL_INITIAL (decl) = error_mark_node;
}
}
result = DECL_INITIAL (decl);
}
break;
bad_const:
DECL_INITIAL (decl) = error_mark_node;
TREE_TYPE (decl) = error_mark_node;
return error_mark_node;
case FUNCTION_DECL:
SATISFY (TREE_TYPE (decl));
if (CH_DECL_PROCESS (decl))
safe_satisfy_decl ((tree) DECL_TASKING_CODE_DECL (decl), prev_chain);
break;
case PARM_DECL:
SATISFY (TREE_TYPE (decl));
break;
/* RESULT_DECL doesn't need to be satisfied;
it's only built internally in pass 2 */
case TYPE_DECL:
SATISFY (TREE_TYPE (decl));
if (CH_DECL_SIGNAL (decl))
safe_satisfy_decl ((tree) DECL_TASKING_CODE_DECL (decl), prev_chain);
if (!LOOKUP_ONLY)
{
if (TYPE_NAME (TREE_TYPE (decl)) == NULL_TREE)
TYPE_NAME (TREE_TYPE (decl)) = decl;
layout_decl (decl, 0);
if (CH_DECL_SIGNAL (decl) && CH_TYPE_NONVALUE_P (TREE_TYPE (decl)))
error ("mode with non-value property in signal definition");
result = TREE_TYPE (decl);
}
break;
case VAR_DECL:
SATISFY (TREE_TYPE (decl));
if (!LOOKUP_ONLY)
{
layout_decl (decl, 0);
if (TREE_READONLY (TREE_TYPE (decl)))
TREE_READONLY (decl) = 1;
}
break;
default:
;
}
/* Now set the DECL_RTL, if needed. */
if (!LOOKUP_ONLY && DECL_RTL (decl) == 0
&& (TREE_CODE (decl) == VAR_DECL || TREE_CODE (decl) == FUNCTION_DECL
|| TREE_CODE (decl) == CONST_DECL))
{
if (TREE_CODE (decl) == FUNCTION_DECL && decl_function_context (decl))
make_function_rtl (decl);
else if (!TREE_STATIC (decl) && !DECL_EXTERNAL (decl))
expand_decl (decl);
else
{ char * asm_name;
if (current_module == 0 || TREE_PUBLIC (decl)
|| current_function_decl)
asm_name = NULL;
else
{
asm_name = (char*)
alloca (IDENTIFIER_LENGTH (current_module->prefix_name)
+ IDENTIFIER_LENGTH (DECL_NAME (decl)) + 3);
sprintf (asm_name, "%s__%s",
IDENTIFIER_POINTER (current_module->prefix_name),
IDENTIFIER_POINTER (DECL_NAME (decl)));
}
make_decl_rtl (decl, asm_name, TREE_PUBLIC (decl));
}
}
input_filename = save_filename;
lineno = save_lineno;
return result;
}
tree
satisfy_decl (decl, lookup_only)
tree decl;
int lookup_only;
{
return safe_satisfy_decl (decl, lookup_only ? &dummy_chain : NULL);
}
static void
satisfy_list (exp, chain)
register tree exp;
struct decl_chain *chain;
{
for (; exp != NULL_TREE; exp = TREE_CHAIN (exp))
{
SATISFY (TREE_VALUE (exp));
SATISFY (TREE_PURPOSE (exp));
}
}
static void
satisfy_list_values (exp, chain)
register tree exp;
struct decl_chain *chain;
{
for (; exp != NULL_TREE; exp = TREE_CHAIN (exp))
{
SATISFY (TREE_VALUE (exp));
}
}
static tree
satisfy (exp, chain)
tree exp;
struct decl_chain *chain;
{
int arg_length;
int i;
tree decl;
if (exp == NULL_TREE)
return NULL_TREE;
#if 0
if (!UNSATISFIED (exp))
return exp;
#endif
switch (TREE_CODE_CLASS (TREE_CODE (exp)))
{
case 'd':
if (!LOOKUP_ONLY)
return safe_satisfy_decl (exp, chain);
break;
case 'r':
case 's':
case '<':
case 'e':
switch ((enum chill_tree_code)TREE_CODE (exp))
{
case REPLICATE_EXPR:
goto binary_op;
case TRUTH_NOT_EXPR:
goto unary_op;
case COMPONENT_REF:
SATISFY (TREE_OPERAND (exp, 0));
if (!LOOKUP_ONLY && TREE_TYPE (exp) == NULL_TREE)
return resolve_component_ref (exp);
return exp;
case CALL_EXPR:
SATISFY (TREE_OPERAND (exp, 0));
SATISFY (TREE_OPERAND (exp, 1));
if (!LOOKUP_ONLY && TREE_TYPE (exp) == NULL_TREE)
return build_generalized_call (TREE_OPERAND (exp, 0),
TREE_OPERAND (exp, 1));
return exp;
case CONSTRUCTOR:
{ tree link = TREE_OPERAND (exp, 1);
int expand_needed = TREE_TYPE (exp)
&& TREE_CODE_CLASS (TREE_CODE (TREE_TYPE (exp))) != 't';
for (; link != NULL_TREE; link = TREE_CHAIN (link))
{
SATISFY (TREE_VALUE (link));
if (!TUPLE_NAMED_FIELD (link))
SATISFY (TREE_PURPOSE (link));
}
SATISFY (TREE_TYPE (exp));
if (expand_needed && !LOOKUP_ONLY)
{
tree type = TREE_TYPE (exp);
TREE_TYPE (exp) = NULL_TREE; /* To force expansion. */
return chill_expand_tuple (type, exp);
}
return exp;
}
default:
;
}
arg_length = TREE_CODE_LENGTH (TREE_CODE (exp));
for (i = 0; i < arg_length; i++)
SATISFY (TREE_OPERAND (exp, i));
return exp;
case '1':
unary_op:
SATISFY (TREE_OPERAND (exp, 0));
if ((enum chill_tree_code)TREE_CODE (exp) == PAREN_EXPR)
return TREE_OPERAND (exp, 0);
if (!LOOKUP_ONLY)
return finish_chill_unary_op (exp);
break;
case '2':
binary_op:
SATISFY (TREE_OPERAND (exp, 0));
SATISFY (TREE_OPERAND (exp, 1));
if (!LOOKUP_ONLY && TREE_CODE (exp) != RANGE_EXPR)
return finish_chill_binary_op (exp);
break;
case 'x':
switch ((enum chill_tree_code)TREE_CODE (exp))
{
case IDENTIFIER_NODE:
decl = lookup_name (exp);
if (decl == NULL)
{
if (LOOKUP_ONLY)
return exp;
error ("undeclared identifier `%s'", IDENTIFIER_POINTER (exp));
return error_mark_node;
}
if (LOOKUP_ONLY)
return decl;
return safe_satisfy_decl (decl, chain);
case TREE_LIST:
satisfy_list (exp, chain);
break;
default:
;
}
break;
case 't':
/* If TYPE_SIZE is non-NULL, exp and its subfields has already been
satified and laid out. The exception is pointer and reference types,
which we layout before we lay out their TREE_TYPE. */
if (TYPE_SIZE (exp) && TREE_CODE (exp) != POINTER_TYPE
&& TREE_CODE (exp) != REFERENCE_TYPE)
return exp;
if (TYPE_MAIN_VARIANT (exp) != exp)
SATISFY (TYPE_MAIN_VARIANT (exp));
switch ((enum chill_tree_code)TREE_CODE (exp))
{
case LANG_TYPE:
{
tree d = TYPE_DOMAIN (exp);
tree t = satisfy (TREE_TYPE (exp), chain);
SATISFY (d);
/* It is possible that one of the above satisfy calls recursively
caused exp to be satisfied, in which case we're done. */
if (TREE_CODE (exp) != LANG_TYPE)
return exp;
TREE_TYPE (exp) = t;
TYPE_DOMAIN (exp) = d;
if (!LOOKUP_ONLY)
exp = smash_dummy_type (exp);
}
break;
case ARRAY_TYPE:
SATISFY (TREE_TYPE (exp));
SATISFY (TYPE_DOMAIN (exp));
SATISFY (TYPE_ATTRIBUTES (exp));
if (!LOOKUP_ONLY)
CH_TYPE_NONVALUE_P (exp) = CH_TYPE_NONVALUE_P (TREE_TYPE (exp));
if (!TYPE_SIZE (exp) && !LOOKUP_ONLY)
exp = layout_chill_array_type (exp);
break;
case FUNCTION_TYPE:
SATISFY (TREE_TYPE (exp));
if (TREE_CODE_CLASS (TREE_CODE (TREE_TYPE (exp))) != 't'
&& !LOOKUP_ONLY && TREE_CODE (TREE_TYPE (exp)) != ERROR_MARK)
{
error ("RETURNS spec with invalid mode");
TREE_TYPE (exp) = error_mark_node;
}
satisfy_list_values (TYPE_ARG_TYPES (exp), chain);
if (!TYPE_SIZE (exp) && !LOOKUP_ONLY)
layout_type (exp);
break;
case ENUMERAL_TYPE:
if (TYPE_SIZE (exp) == NULL_TREE && !LOOKUP_ONLY)
{ tree pair;
/* FIXME: Should this use satisfy_decl? */
for (pair = TYPE_VALUES (exp); pair; pair = TREE_CHAIN (pair))
SATISFY (DECL_INITIAL (TREE_VALUE (pair)));
layout_enum (exp);
}
break;
case INTEGER_TYPE:
SATISFY (TYPE_MIN_VALUE (exp));
SATISFY (TYPE_MAX_VALUE (exp));
if (TREE_TYPE (exp) != NULL_TREE)
{ /* A range type */
if (TREE_TYPE (exp) != ridpointers[(int) RID_RANGE]
&& TREE_TYPE (exp) != ridpointers[(int) RID_BIN]
&& TREE_TYPE (exp) != string_index_type_dummy)
SATISFY (TREE_TYPE (exp));
if (!TYPE_SIZE (exp) && !LOOKUP_ONLY)
exp = layout_chill_range_type (exp, 1);
}
break;
case POINTER_TYPE:
case REFERENCE_TYPE:
if (LOOKUP_ONLY)
SATISFY (TREE_TYPE (exp));
else
{
struct decl_chain *link;
int already_seen = 0;
for (link = chain; ; link = link->prev)
{
if (link == NULL)
{
struct decl_chain new_link;
new_link.decl = exp;
new_link.prev = chain;
TREE_TYPE (exp) = satisfy (TREE_TYPE (exp), &new_link);
break;
}
else if (link->decl == exp)
{
already_seen = 1;
break;
}
}
if (!TYPE_SIZE (exp))
{
layout_type (exp);
if (TREE_CODE (exp) == REFERENCE_TYPE)
CH_NOVELTY (exp) = CH_NOVELTY (TREE_TYPE (exp));
if (! already_seen)
{
tree valtype = TREE_TYPE (exp);
if (TREE_CODE_CLASS (TREE_CODE (valtype)) != 't')
{
if (TREE_CODE (valtype) != ERROR_MARK)
error ("operand to REF is not a mode");
TREE_TYPE (exp) = error_mark_node;
return error_mark_node;
}
else if (TREE_CODE (exp) == POINTER_TYPE
&& TYPE_POINTER_TO (valtype) == NULL)
TYPE_POINTER_TO (valtype) = exp;
}
}
}
break;
case RECORD_TYPE:
{
/* FIXME: detected errors in here will be printed as
often as this sequence runs. Find another way or
place to print the errors. */
/* if we have an ACCESS or TEXT mode we have to set
maximum_field_alignment to 0 to fit with runtime
system, even when we compile with -fpack. */
unsigned int save_maximum_field_alignment = maximum_field_alignment;
if (CH_IS_ACCESS_MODE (exp) || CH_IS_TEXT_MODE (exp))
maximum_field_alignment = 0;
for (decl = TYPE_FIELDS (exp); decl; decl = TREE_CHAIN (decl))
{
SATISFY (TREE_TYPE (decl));
if (!LOOKUP_ONLY)
{
/* if we have a UNION_TYPE here (variant structure), check for
non-value mode in it. This is not allowed (Z.200/pg. 33) */
if (TREE_CODE (TREE_TYPE (decl)) == UNION_TYPE &&
CH_TYPE_NONVALUE_P (TREE_TYPE (decl)))
{
error ("field with non-value mode in variant structure not allowed");
TREE_TYPE (decl) = error_mark_node;
}
/* RECORD_TYPE gets the non-value property if one of the
fields has the non-value property */
CH_TYPE_NONVALUE_P (exp) |= CH_TYPE_NONVALUE_P (TREE_TYPE (decl));
}
if (TREE_CODE (decl) == CONST_DECL)
{
SATISFY (DECL_INITIAL (decl));
if (!LOOKUP_ONLY)
{
if (CH_IS_BUFFER_MODE (exp) || CH_IS_EVENT_MODE (exp))
DECL_INITIAL (decl)
= check_queue_size (DECL_INITIAL (decl));
else if (CH_IS_TEXT_MODE (exp) &&
DECL_NAME (decl) == get_identifier ("__textlength"))
DECL_INITIAL (decl)
= check_text_length (DECL_INITIAL (decl));
}
}
else if (TREE_CODE (decl) == FIELD_DECL)
{
SATISFY (DECL_INITIAL (decl));
}
}
satisfy_list (TYPE_TAG_VALUES (exp), chain);
if (!TYPE_SIZE (exp) && !LOOKUP_ONLY)
exp = layout_chill_struct_type (exp);
maximum_field_alignment = save_maximum_field_alignment;
/* perform some checks on nonvalue modes, they are record_mode's */
if (!LOOKUP_ONLY)
{
if (CH_IS_BUFFER_MODE (exp))
{
tree elemmode = buffer_element_mode (exp);
if (elemmode != NULL_TREE && CH_TYPE_NONVALUE_P (elemmode))
{
error ("buffer element mode must not have non-value property");
invalidate_buffer_element_mode (exp);
}
}
else if (CH_IS_ACCESS_MODE (exp))
{
tree recordmode = access_recordmode (exp);
if (recordmode != NULL_TREE && CH_TYPE_NONVALUE_P (recordmode))
{
error ("recordmode must not have the non-value property");
invalidate_access_recordmode (exp);
}
}
}
}
break;
case SET_TYPE:
SATISFY (TYPE_DOMAIN (exp));
if (!TYPE_SIZE (exp) && !LOOKUP_ONLY)
exp = layout_powerset_type (exp);
break;
case UNION_TYPE:
for (decl = TYPE_FIELDS (exp); decl; decl = TREE_CHAIN (decl))
{
SATISFY (TREE_TYPE (decl));
if (!LOOKUP_ONLY)
CH_TYPE_NONVALUE_P (exp) |= CH_TYPE_NONVALUE_P (TREE_TYPE (decl));
}
if (!TYPE_SIZE (exp) && !LOOKUP_ONLY)
exp = layout_chill_variants (exp);
break;
default:
;
}
}
return exp;
}

File diff suppressed because it is too large Load Diff

View File

@ -1,27 +0,0 @@
/* Implement process-related declarations for CHILL.
Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc.
This file is part of GNU CC.
GNU CC 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 2, or (at your option)
any later version.
GNU CC 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 CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#ifndef GCC_TASKING_H
#define GCC_TASKING_H
/* list of this module's process, buffer, etc. decls */
extern tree tasking_list;
#endif /* ! GCC_TASKING_H */

View File

@ -1,491 +0,0 @@
/* Implement timing-related actions for CHILL.
Copyright (C) 1992, 1993, 1994, 1998, 2000, 2001
Free Software Foundation, Inc.
This file is part of GNU CC.
GNU CC 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 2, or (at your option)
any later version.
GNU CC 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 CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#include "config.h"
#include "system.h"
#include "tree.h"
#include "rtl.h"
#include "ch-tree.h"
#include "flags.h"
#include "input.h"
#include "obstack.h"
#include "lex.h"
#include "toplev.h"
/* set non-zero if input text is forced to lowercase */
extern int ignore_case;
/* set non-zero if special words are to be entered in uppercase */
extern int special_UC;
/* timing modes */
tree abs_timing_type_node;
tree duration_timing_type_node;
/* rts time type */
static tree rtstime_type_node = NULL_TREE;
/* the stack for AFTER primval [ DELAY ] IN
and has following layout
TREE_VALUE (TREE_VALUE (after_stack)) = current time or NULL_TREE (if DELAY specified)
TREE_PURPOSE (TREE_VALUE (after_stack)) = the duration location
TREE_VALUE (TREE_PURPOSE (after_stack)) = label at TIMEOUT
TREE_PURPOSE (TREE_PURPOSE (after_stack)) = label at the end of AFTER action
*/
tree after_stack = NULL_TREE;
/* in pass 1 we need a separate list for the labels */
static tree after_stack_pass_1 = NULL_TREE;
static tree after_help;
void
timing_init ()
{
tree ptr_ftype_durt_ptr_int;
tree int_ftype_abst_ptr_int;
tree void_ftype_ptr;
tree long_ftype_int_int_int_int_int_int_int_ptr_int;
tree void_ftype_abstime_ptr;
tree int_ftype_ptr_durt_ptr;
tree void_ftype_durt_ptr;
tree void_ftype_ptr_durt_ptr_int;
tree temp;
tree endlink;
tree ulong_type;
ulong_type = TREE_TYPE (lookup_name (
get_identifier ((ignore_case || ! special_UC ) ?
"ulong" : "ULONG")));
/* build modes for TIME and DURATION */
duration_timing_type_node = make_unsigned_type (LONG_TYPE_SIZE);
temp = pushdecl (build_decl (TYPE_DECL, ridpointers[(int)RID_DURATION],
duration_timing_type_node));
SET_CH_NOVELTY_NONNIL (duration_timing_type_node, temp);
abs_timing_type_node = make_unsigned_type (LONG_TYPE_SIZE);
temp = pushdecl (build_decl (TYPE_DECL, ridpointers[(int)RID_TIME],
abs_timing_type_node));
SET_CH_NOVELTY_NONNIL (abs_timing_type_node, temp);
/* the mode of time the runtimesystem returns */
if (rtstime_type_node == NULL_TREE)
{
tree decl1, decl2, result;
decl1 = build_decl (FIELD_DECL,
get_identifier ("secs"),
ulong_type);
DECL_INITIAL (decl1) = NULL_TREE;
decl2 = build_decl (FIELD_DECL,
get_identifier ("nsecs"),
ulong_type);
DECL_INITIAL (decl2) = NULL_TREE;
TREE_CHAIN (decl2) = NULL_TREE;
TREE_CHAIN (decl1) = decl2;
result = build_chill_struct_type (decl1);
pushdecl (temp = build_decl (TYPE_DECL,
get_identifier ("__tmp_rtstime"), result));
DECL_SOURCE_LINE (temp) = 0;
satisfy_decl (temp, 0);
rtstime_type_node = TREE_TYPE (temp);
}
endlink = void_list_node;
ptr_ftype_durt_ptr_int
= build_function_type (ptr_type_node,
tree_cons (NULL_TREE, duration_timing_type_node,
tree_cons (NULL_TREE, ptr_type_node,
tree_cons (NULL_TREE, integer_type_node,
endlink))));
int_ftype_abst_ptr_int
= build_function_type (integer_type_node,
tree_cons (NULL_TREE, abs_timing_type_node,
tree_cons (NULL_TREE, ptr_type_node,
tree_cons (NULL_TREE, integer_type_node,
endlink))));
void_ftype_ptr
= build_function_type (void_type_node,
tree_cons (NULL_TREE, ptr_type_node,
endlink));
long_ftype_int_int_int_int_int_int_int_ptr_int
= build_function_type (abs_timing_type_node,
tree_cons (NULL_TREE, integer_type_node,
tree_cons (NULL_TREE, integer_type_node,
tree_cons (NULL_TREE, integer_type_node,
tree_cons (NULL_TREE, integer_type_node,
tree_cons (NULL_TREE, integer_type_node,
tree_cons (NULL_TREE, integer_type_node,
tree_cons (NULL_TREE, integer_type_node,
tree_cons (NULL_TREE, ptr_type_node,
tree_cons (NULL_TREE, integer_type_node,
endlink))))))))));
void_ftype_abstime_ptr
= build_function_type (void_type_node,
tree_cons (NULL_TREE, abs_timing_type_node,
tree_cons (NULL_TREE, ptr_type_node,
endlink)));
int_ftype_ptr_durt_ptr
= build_function_type (integer_type_node,
tree_cons (NULL_TREE, ptr_type_node,
tree_cons (NULL_TREE, duration_timing_type_node,
tree_cons (NULL_TREE, ptr_type_node,
endlink))));
void_ftype_durt_ptr
= build_function_type (void_type_node,
tree_cons (NULL_TREE, duration_timing_type_node,
tree_cons (NULL_TREE, ptr_type_node,
endlink)));
void_ftype_ptr_durt_ptr_int
= build_function_type (void_type_node,
tree_cons (NULL_TREE, ptr_type_node,
tree_cons (NULL_TREE, duration_timing_type_node,
tree_cons (NULL_TREE, ptr_type_node,
tree_cons (NULL_TREE, integer_type_node,
endlink)))));
builtin_function ("_abstime", long_ftype_int_int_int_int_int_int_int_ptr_int,
0, NOT_BUILT_IN, NULL_PTR);
builtin_function ("__check_cycle", void_ftype_ptr_durt_ptr_int,
0, NOT_BUILT_IN, NULL_PTR);
builtin_function ("__convert_duration_rtstime", void_ftype_durt_ptr,
0, NOT_BUILT_IN, NULL_PTR);
builtin_function ("__define_timeout", ptr_ftype_durt_ptr_int,
0, NOT_BUILT_IN, NULL_PTR);
builtin_function ("_inttime", void_ftype_abstime_ptr,
0, NOT_BUILT_IN, NULL_PTR);
builtin_function ("__remaintime", int_ftype_ptr_durt_ptr,
0, NOT_BUILT_IN, NULL_PTR);
builtin_function ("__rtstime", void_ftype_ptr,
0, NOT_BUILT_IN, NULL_PTR);
builtin_function ("__wait_until", int_ftype_abst_ptr_int,
0, NOT_BUILT_IN, NULL_PTR);
}
/*
*
* build AT action
*
* AT primval IN
* ok-actionlist
* TIMEOUT
* to-actionlist
* END;
*
* gets translated to
*
* if (__wait_until (primval) == 0)
* ok-actionlist
* else
* to-action-list
*
*/
void
build_at_action (t)
tree t;
{
tree abstime, expr, filename, fcall;
if (t == NULL_TREE || TREE_CODE (t) == ERROR_MARK)
abstime = convert (abs_timing_type_node, build_int_2 (0, 0));
else
abstime = t;
if (TREE_TYPE (abstime) != abs_timing_type_node)
{
error ("absolute time value must be of mode TIME");
abstime = convert (abs_timing_type_node, build_int_2 (0, 0));
}
filename = force_addr_of (get_chill_filename ());
fcall = build_chill_function_call (
lookup_name (get_identifier ("__wait_until")),
tree_cons (NULL_TREE, abstime,
tree_cons (NULL_TREE, filename,
tree_cons (NULL_TREE, get_chill_linenumber (), NULL_TREE))));
expr = build (EQ_EXPR, integer_type_node, fcall, integer_zero_node);
expand_start_cond (expr, 0);
emit_line_note (input_filename, lineno);
}
/*
*
* build CYCLE action
*
* CYCLE primval IN
* actionlist
* END;
*
* gets translated to
*
* {
* RtsTime now;
* label:
* __rtstime (&now);
* actionlist
* __check_cycle (&now, primval, filename, lineno);
* goto label;
* }
*
*/
tree
build_cycle_start (t)
tree t;
{
tree purpose = build_tree_list (NULL_TREE, NULL_TREE);
tree toid = build_tree_list (purpose, NULL_TREE);
/* define the label. Note: define_label needs to be called in
pass 1 and pass 2. */
TREE_VALUE (toid) = define_label (input_filename, lineno,
get_unique_identifier ("CYCLE_label"));
if (! ignoring)
{
tree duration_value, now_location;
if (t == NULL_TREE || TREE_CODE (t) == ERROR_MARK)
duration_value = convert (duration_timing_type_node, build_int_2 (0,0));
else
duration_value = t;
if (TREE_TYPE (duration_value) != duration_timing_type_node)
{
error ("duration primitive value must be of mode DURATION");
duration_value = convert (duration_timing_type_node, build_int_2 (0,0));
}
TREE_PURPOSE (TREE_PURPOSE (toid)) = duration_value;
/* define the variable */
now_location = decl_temp1 (get_unique_identifier ("CYCLE_var"),
rtstime_type_node, 0,
NULL_TREE, 0, 0);
TREE_VALUE (TREE_PURPOSE (toid)) = force_addr_of (now_location);
/* build the call to __rtstime */
expand_expr_stmt (
build_chill_function_call (lookup_name (get_identifier ("__rtstime")),
build_tree_list (NULL_TREE, TREE_VALUE (TREE_PURPOSE (toid)))));
}
return toid;
}
void
build_cycle_end (toid)
tree toid;
{
tree filename, linenumber;
/* here we call __check_cycle and then jump to beginning of this
action */
filename = force_addr_of (get_chill_filename ());
linenumber = get_chill_linenumber ();
expand_expr_stmt (
build_chill_function_call (
lookup_name (get_identifier ("__check_cycle")),
tree_cons (NULL_TREE, TREE_VALUE (TREE_PURPOSE (toid)),
tree_cons (NULL_TREE, TREE_PURPOSE (TREE_PURPOSE (toid)),
tree_cons (NULL_TREE, filename,
tree_cons (NULL_TREE, linenumber, NULL_TREE))))));
expand_goto (TREE_VALUE (toid));
}
/*
*
* build AFTER ACTION
*
* AFTER primval [ DELAY ] IN
* action-list
* TIMEOUT
* to-action-list
* END
*
* gets translated to
*
* {
* struct chill_time __now;
* duration dur = primval;
* if (! delay_spceified)
* __rts_time (&__now);
* .
* .
* goto end-label;
* to-label:
* .
* .
* end-label:
* }
*
*/
void
build_after_start (duration, delay_flag)
tree duration;
int delay_flag;
{
tree value, purpose;
if (! ignoring)
{
value = tree_cons (NULL_TREE, NULL_TREE, NULL_TREE);
purpose = after_stack_pass_1;
after_stack_pass_1 = TREE_CHAIN (after_stack_pass_1);
after_stack = tree_cons (purpose, value, after_stack);
if (TREE_TYPE (duration) != duration_timing_type_node)
{
error ("duration primitive value must be of mode DURATION");
duration = convert (duration_timing_type_node, build_int_2 (0,0));
}
TREE_PURPOSE (value) = decl_temp1 (get_identifier ("AFTER_duration"),
duration_timing_type_node, 0,
duration, 0, 0);
if (! delay_flag)
{
/* in this case we have to get the current time */
TREE_VALUE (value) = decl_temp1 (get_unique_identifier ("AFTER_now"),
rtstime_type_node, 0,
NULL_TREE, 0, 0);
/* build the function call to initialize the variable */
expand_expr_stmt (
build_chill_function_call (lookup_name (get_identifier ("__rtstime")),
build_tree_list (NULL_TREE, force_addr_of (TREE_VALUE (value)))));
}
}
else
{
/* in pass 1 we just save the labels */
after_help = tree_cons (NULL_TREE, NULL_TREE, after_help);
after_stack_pass_1 = chainon (after_stack_pass_1, after_help);
}
}
void
build_after_timeout_start ()
{
tree label_name;
if (! ignoring)
{
/* jump to the end of AFTER action */
lookup_and_expand_goto (TREE_PURPOSE (TREE_PURPOSE (after_stack)));
label_name = TREE_VALUE (TREE_PURPOSE (after_stack));
/* mark we are in TIMEOUT part of AFTER action */
TREE_VALUE (TREE_PURPOSE (after_stack)) = NULL_TREE;
}
else
{
label_name = get_unique_identifier ("AFTER_tolabel");
TREE_VALUE (after_help) = label_name;
}
define_label (input_filename, lineno, label_name);
}
void
build_after_end ()
{
tree label_name;
/* define the end label */
if (! ignoring)
{
label_name = TREE_PURPOSE (TREE_PURPOSE (after_stack));
after_stack = TREE_CHAIN (after_stack);
}
else
{
label_name = get_unique_identifier ("AFTER_endlabel");
TREE_PURPOSE (after_help) = label_name;
after_help = TREE_CHAIN (after_help);
}
define_label (input_filename, lineno, label_name);
}
tree
build_timeout_preface ()
{
tree timeout_value = null_pointer_node;
if (after_stack != NULL_TREE &&
TREE_VALUE (TREE_PURPOSE (after_stack)) != NULL_TREE)
{
tree to_loc;
to_loc = decl_temp1 (get_unique_identifier ("TOloc"),
rtstime_type_node, 0, NULL_TREE, 0, 0);
timeout_value = force_addr_of (to_loc);
if (TREE_VALUE (TREE_VALUE (after_stack)) == NULL_TREE)
{
/* DELAY specified -- just call __convert_duration_rtstime for
given duration value */
expand_expr_stmt (
build_chill_function_call (
lookup_name (get_identifier ("__convert_duration_rtstime")),
tree_cons (NULL_TREE, TREE_PURPOSE (TREE_VALUE (after_stack)),
tree_cons (NULL_TREE, timeout_value, NULL_TREE))));
}
else
{
/* delay not specified -- call __remaintime which returns the
remaining time of duration in rtstime format and check the
result */
tree fcall =
build_chill_function_call (
lookup_name (get_identifier ("__remaintime")),
tree_cons (NULL_TREE, force_addr_of (TREE_VALUE (TREE_VALUE (after_stack))),
tree_cons (NULL_TREE, TREE_PURPOSE (TREE_VALUE (after_stack)),
tree_cons (NULL_TREE, timeout_value, NULL_TREE))));
tree expr = build (NE_EXPR, integer_type_node,
fcall, integer_zero_node);
expand_start_cond (expr, 0);
lookup_and_expand_goto (TREE_VALUE (TREE_PURPOSE (after_stack)));
expand_end_cond ();
}
}
return timeout_value;
}
void
build_timesupervised_call (fcall, to_loc)
tree fcall;
tree to_loc;
{
if (to_loc == null_pointer_node)
expand_expr_stmt (fcall);
else
{
tree expr = build (NE_EXPR, integer_type_node, fcall, integer_zero_node);
expand_start_cond (expr, 0);
lookup_and_expand_goto (TREE_VALUE (TREE_PURPOSE (after_stack)));
expand_end_cond ();
}
}

View File

@ -1,294 +0,0 @@
/* Language-dependent node constructors for parse phase of GNU compiler.
Copyright (C) 1992, 1993, 1994, 1998, 1999, 2000
Free Software Foundation, Inc.
This file is part of GNU CC.
GNU CC 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 2, or (at your option)
any later version.
GNU CC 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 CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#include "config.h"
#include "system.h"
#include "obstack.h"
#include "tree.h"
#include "ch-tree.h"
#include "toplev.h"
extern struct obstack permanent_obstack;
/* This is special sentinel used to communicate from build_string_type
to layout_chill_range_type for the index range of a string. */
tree string_index_type_dummy;
static tree make_powerset_type PARAMS ((tree));
/* Build a chill string type.
For a character string, ELT_TYPE==char_type_node;
for a bit-string, ELT_TYPE==boolean_type_node. */
tree
build_string_type (elt_type, length)
tree elt_type;
tree length;
{
register tree t;
if (TREE_CODE (elt_type) == ERROR_MARK || TREE_CODE (length) == ERROR_MARK)
return error_mark_node;
/* Allocate the array after the pointer type,
in case we free it in type_hash_canon. */
if (pass > 0 && TREE_CODE (length) == INTEGER_CST
&& ! tree_int_cst_equal (length, integer_zero_node)
&& compare_int_csts (LT_EXPR, TYPE_MAX_VALUE (chill_unsigned_type_node),
length))
{
error ("string length > UPPER (UINT)");
length = integer_one_node;
}
/* Subtract 1 from length to get max index value.
Note we cannot use size_binop for pass 1 expressions. */
if (TREE_CODE (length) == INTEGER_CST || pass != 1)
length = size_binop (MINUS_EXPR, length, size_one_node);
else
length = build (MINUS_EXPR, sizetype, length, size_one_node);
t = make_node (elt_type == boolean_type_node ? SET_TYPE : ARRAY_TYPE);
TREE_TYPE (t) = elt_type;
MARK_AS_STRING_TYPE (t);
TYPE_DOMAIN (t) = build_chill_range_type (string_index_type_dummy,
integer_zero_node, length);
if (pass == 1 && TREE_CODE (length) == INTEGER_CST)
TYPE_DOMAIN (t) = layout_chill_range_type (TYPE_DOMAIN (t), 0);
if (pass != 1
|| (TREE_CODE (length) == INTEGER_CST && TYPE_SIZE (elt_type)))
{
if (TREE_CODE (t) == SET_TYPE)
t = layout_powerset_type (t);
else
t = layout_chill_array_type (t);
}
return t;
}
static tree
make_powerset_type (domain)
tree domain;
{
tree t = make_node (SET_TYPE);
TREE_TYPE (t) = boolean_type_node;
TYPE_DOMAIN (t) = domain;
return t;
}
/* Used to layout both bitstring and powerset types. */
tree
layout_powerset_type (type)
tree type;
{
tree domain = TYPE_DOMAIN (type);
if (! discrete_type_p (domain))
{
error ("can only build a powerset from a discrete mode");
return error_mark_node;
}
if (TREE_CODE (TYPE_MAX_VALUE (domain)) == ERROR_MARK ||
TREE_CODE (TYPE_MIN_VALUE (domain)) == ERROR_MARK)
return error_mark_node;
if (TREE_CODE (TYPE_MAX_VALUE (domain)) != INTEGER_CST
|| TREE_CODE (TYPE_MIN_VALUE (domain)) != INTEGER_CST)
{
if (CH_BOOLS_TYPE_P (type))
error ("non-constant bitstring size invalid");
else
error ("non-constant powerset size invalid");
return error_mark_node;
}
if (TYPE_SIZE (type) == 0)
layout_type (type);
return type;
}
/* Build a SET_TYPE node whose elements are from the set of values
in TYPE. TYPE must be a discrete mode; we check for that here. */
tree
build_powerset_type (type)
tree type;
{
tree t = make_powerset_type (type);
if (pass != 1)
t = layout_powerset_type (t);
return t;
}
tree
build_bitstring_type (size_in_bits)
tree size_in_bits;
{
return build_string_type (boolean_type_node, size_in_bits);
}
/* Return get_identifier (the concatenations of part1, part2, and part3). */
tree
get_identifier3 (part1, part2, part3)
const char *part1, *part2, *part3;
{
char *buf = (char*)
alloca (strlen(part1) + strlen(part2) + strlen(part3) + 1);
sprintf (buf, "%s%s%s", part1, part2, part3);
return get_identifier (buf);
}
/* Build an ALIAS_DECL for the prefix renamed clause:
(OLD_PREFIX -> NEW_PREFIX) ! POSTFIX. */
tree
build_alias_decl (old_prefix, new_prefix, postfix)
tree old_prefix, new_prefix, postfix;
{
tree decl = make_node (ALIAS_DECL);
const char *postfix_pointer = IDENTIFIER_POINTER (postfix);
int postfix_length = IDENTIFIER_LENGTH (postfix);
int old_length = old_prefix ? IDENTIFIER_LENGTH(old_prefix) : 0;
int new_length = new_prefix ? IDENTIFIER_LENGTH(new_prefix) : 0;
char *buf = (char*) alloca (old_length + new_length + postfix_length + 3);
/* Convert (OP->NP)!P!ALL to (OP!P->NP!P)!ALL */
if (postfix_length > 1 && postfix_pointer[postfix_length-1] == '*')
{
int chopped_length = postfix_length - 2; /* Without final "!*" */
if (old_prefix)
sprintf (buf, "%s!%.*s", IDENTIFIER_POINTER (old_prefix),
chopped_length, postfix_pointer);
else
sprintf (buf, "%.*s", chopped_length, postfix_pointer);
old_prefix = get_identifier (buf);
if (new_prefix)
sprintf (buf, "%s!%.*s", IDENTIFIER_POINTER (new_prefix),
chopped_length, postfix_pointer);
else
sprintf (buf, "%.*s", chopped_length, postfix_pointer);
new_prefix = get_identifier (buf);
postfix = ALL_POSTFIX;
}
DECL_OLD_PREFIX (decl) = old_prefix;
DECL_NEW_PREFIX (decl) = new_prefix;
DECL_POSTFIX (decl) = postfix;
if (DECL_POSTFIX_ALL (decl))
DECL_NAME (decl) = NULL_TREE;
else if (new_prefix == NULL_TREE)
DECL_NAME (decl) = postfix;
else
DECL_NAME (decl) = get_identifier3 (IDENTIFIER_POINTER (new_prefix),
"!", IDENTIFIER_POINTER (postfix));
return decl;
}
/* Return the "old name string" of an ALIAS_DECL. */
tree
decl_old_name (decl)
tree decl;
{
if (DECL_OLD_PREFIX (decl) == NULL_TREE)
return DECL_POSTFIX (decl);
return get_identifier3 (IDENTIFIER_POINTER (DECL_OLD_PREFIX (decl)),
"!", IDENTIFIER_POINTER (DECL_POSTFIX (decl)));
}
/* See if OLD_NAME (an identifier) matches the OLD_PREFIX!POSTFIX
of ALIAS. If so, return the corresponding NEW_NEW!POSTFIX. */
tree
decl_check_rename (alias, old_name)
tree alias, old_name;
{
const char *old_pointer = IDENTIFIER_POINTER (old_name);
int old_len = IDENTIFIER_LENGTH (old_name);
if (DECL_OLD_PREFIX (alias))
{
int old_prefix_len = IDENTIFIER_LENGTH (DECL_OLD_PREFIX (alias));
if (old_prefix_len >= old_len
|| old_pointer[old_prefix_len] != '!'
|| strncmp (old_pointer, IDENTIFIER_POINTER (DECL_OLD_PREFIX (alias)), old_prefix_len) != 0)
return NULL_TREE;
/* Skip the old prefix. */
old_pointer += old_prefix_len + 1; /* Also skip the '!', */
}
if (DECL_POSTFIX_ALL (alias)
|| strcmp (IDENTIFIER_POINTER (DECL_POSTFIX (alias)), old_pointer) == 0)
{
if (DECL_NEW_PREFIX (alias))
return get_identifier3 (IDENTIFIER_POINTER (DECL_NEW_PREFIX (alias)),
"!", old_pointer);
else if (old_pointer == IDENTIFIER_POINTER (old_name))
return old_name;
else
return get_identifier (old_pointer);
}
else
return NULL_TREE;
}
/* 'EXIT foo' is treated like 'GOTO EXIT!foo'.
This function converts LABEL into a labal name for EXIT. */
tree
munge_exit_label (label)
tree label;
{
return get_identifier3 ("EXIT", "!", IDENTIFIER_POINTER (label));
}
/* Make SAVE_EXPRs as needed, but don't turn a location into a non-location. */
tree
save_if_needed (exp)
tree exp;
{
return CH_REFERABLE (exp) ? stabilize_reference (exp) : save_expr (exp);
}
/* Return the number of elements in T, which must be a discrete type. */
tree
discrete_count (t)
tree t;
{
tree hi = convert (sizetype, TYPE_MAX_VALUE (t));
if (TYPE_MIN_VALUE (t))
hi = size_binop (MINUS_EXPR, hi, convert (sizetype, TYPE_MIN_VALUE (t)));
return size_binop (PLUS_EXPR, hi, integer_one_node);
}

File diff suppressed because it is too large Load Diff

View File

@ -1,272 +0,0 @@
/* Copyright (C) 1992, 1993, 1994, 1998 Free Software Foundation, Inc.
This file is part of GNU CC.
GNU CC 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 2, or (at your option)
any later version.
GNU CC 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 CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#if 0
tree
build_component_ref (datum, field_name)
tree datum, field_name;
{
return build_chill_component_ref (datum, field_name);
}
/* Mark EXP saying that we need to be able to take the
address of it; it should not be allocated in a register.
Value is 1 if successful. */
int
mark_addressable (exp)
tree exp;
{
register tree x = exp;
while (1)
switch (TREE_CODE (x))
{
case ADDR_EXPR:
case COMPONENT_REF:
case ARRAY_REF:
case REALPART_EXPR:
case IMAGPART_EXPR:
x = TREE_OPERAND (x, 0);
break;
case CONSTRUCTOR:
TREE_ADDRESSABLE (x) = 1;
return 1;
case VAR_DECL:
case CONST_DECL:
case PARM_DECL:
case RESULT_DECL:
if (DECL_REGISTER (x) && !TREE_ADDRESSABLE (x)
&& DECL_NONLOCAL (x))
{
if (TREE_PUBLIC (x))
{
error ("global register variable `%s' used in nested function",
IDENTIFIER_POINTER (DECL_NAME (x)));
return 0;
}
pedwarn ("register variable `%s' used in nested function",
IDENTIFIER_POINTER (DECL_NAME (x)));
}
else if (DECL_REGISTER (x) && !TREE_ADDRESSABLE (x))
{
if (TREE_PUBLIC (x))
{
error ("address of global register variable `%s' requested",
IDENTIFIER_POINTER (DECL_NAME (x)));
return 0;
}
/* If we are making this addressable due to its having
volatile components, give a different error message. Also
handle the case of an unnamed parameter by not trying
to give the name. */
else if (C_TYPE_FIELDS_VOLATILE (TREE_TYPE (x)))
{
error ("cannot put object with volatile field into register");
return 0;
}
pedwarn ("address of register variable `%s' requested",
IDENTIFIER_POINTER (DECL_NAME (x)));
}
put_var_into_stack (x);
/* drops in */
case FUNCTION_DECL:
TREE_ADDRESSABLE (x) = 1;
#if 0 /* poplevel deals with this now. */
if (DECL_CONTEXT (x) == 0)
TREE_ADDRESSABLE (DECL_ASSEMBLER_NAME (x)) = 1;
#endif
default:
return 1;
}
}
/* Return an unsigned type the same as TYPE in other respects. */
tree
unsigned_type (type)
tree type;
{
tree type1 = TYPE_MAIN_VARIANT (type);
if (type1 == signed_char_type_node || type1 == char_type_node)
return unsigned_char_type_node;
if (type1 == integer_type_node)
return unsigned_type_node;
if (type1 == short_integer_type_node)
return short_unsigned_type_node;
if (type1 == long_integer_type_node)
return long_unsigned_type_node;
if (type1 == long_long_integer_type_node)
return long_long_unsigned_type_node;
return type;
}
/* Return a signed type the same as TYPE in other respects. */
tree
signed_type (type)
tree type;
{
tree type1 = TYPE_MAIN_VARIANT (type);
if (type1 == unsigned_char_type_node || type1 == char_type_node)
return signed_char_type_node;
if (type1 == unsigned_type_node)
return integer_type_node;
if (type1 == short_unsigned_type_node)
return short_integer_type_node;
if (type1 == long_unsigned_type_node)
return long_integer_type_node;
if (type1 == long_long_unsigned_type_node)
return long_long_integer_type_node;
return type;
}
/* Return a type the same as TYPE except unsigned or
signed according to UNSIGNEDP. */
tree
signed_or_unsigned_type (unsignedp, type)
int unsignedp;
tree type;
{
if (! INTEGRAL_TYPE_P (type))
return type;
if (TYPE_PRECISION (type) == TYPE_PRECISION (signed_char_type_node))
return unsignedp ? unsigned_char_type_node : signed_char_type_node;
if (TYPE_PRECISION (type) == TYPE_PRECISION (integer_type_node))
return unsignedp ? unsigned_type_node : integer_type_node;
if (TYPE_PRECISION (type) == TYPE_PRECISION (short_integer_type_node))
return unsignedp ? short_unsigned_type_node : short_integer_type_node;
if (TYPE_PRECISION (type) == TYPE_PRECISION (long_integer_type_node))
return unsignedp ? long_unsigned_type_node : long_integer_type_node;
if (TYPE_PRECISION (type) == TYPE_PRECISION (long_long_integer_type_node))
return (unsignedp ? long_long_unsigned_type_node
: long_long_integer_type_node);
return type;
}
extern tree intHI_type_node;
extern tree intSI_type_node;
extern tree intDI_type_node;
extern tree unsigned_intHI_type_node;
extern tree unsigned_intSI_type_node;
extern tree unsigned_intDI_type_node;
/* Return an integer type with BITS bits of precision,
that is unsigned if UNSIGNEDP is nonzero, otherwise signed. */
tree
type_for_size (bits, unsignedp)
unsigned bits;
int unsignedp;
{
if (bits == TYPE_PRECISION (signed_char_type_node))
return unsignedp ? unsigned_char_type_node : signed_char_type_node;
if (bits == TYPE_PRECISION (short_integer_type_node))
return unsignedp ? short_unsigned_type_node : short_integer_type_node;
if (bits == TYPE_PRECISION (integer_type_node))
return unsignedp ? unsigned_type_node : integer_type_node;
if (bits == TYPE_PRECISION (long_integer_type_node))
return unsignedp ? long_unsigned_type_node : long_integer_type_node;
if (bits == TYPE_PRECISION (long_long_integer_type_node))
return (unsignedp ? long_long_unsigned_type_node
: long_long_integer_type_node);
if (bits <= TYPE_PRECISION (intHI_type_node))
return unsignedp ? unsigned_intHI_type_node : intHI_type_node;
if (bits <= TYPE_PRECISION (intSI_type_node))
return unsignedp ? unsigned_intSI_type_node : intSI_type_node;
if (bits <= TYPE_PRECISION (intDI_type_node))
return unsignedp ? unsigned_intDI_type_node : intDI_type_node;
return 0;
}
/* Return a data type that has machine mode MODE.
If the mode is an integer,
then UNSIGNEDP selects between signed and unsigned types. */
tree
type_for_mode (mode, unsignedp)
enum machine_mode mode;
int unsignedp;
{
if (mode == TYPE_MODE (signed_char_type_node))
return unsignedp ? unsigned_char_type_node : signed_char_type_node;
if (mode == TYPE_MODE (short_integer_type_node))
return unsignedp ? short_unsigned_type_node : short_integer_type_node;
if (mode == TYPE_MODE (integer_type_node))
return unsignedp ? unsigned_type_node : integer_type_node;
if (mode == TYPE_MODE (long_integer_type_node))
return unsignedp ? long_unsigned_type_node : long_integer_type_node;
if (mode == TYPE_MODE (long_long_integer_type_node))
return unsignedp ? long_long_unsigned_type_node : long_long_integer_type_node;
if (mode == TYPE_MODE (intHI_type_node))
return unsignedp ? unsigned_intHI_type_node : intHI_type_node;
if (mode == TYPE_MODE (intSI_type_node))
return unsignedp ? unsigned_intSI_type_node : intSI_type_node;
if (mode == TYPE_MODE (intDI_type_node))
return unsignedp ? unsigned_intDI_type_node : intDI_type_node;
if (mode == TYPE_MODE (float_type_node))
return float_type_node;
if (mode == TYPE_MODE (double_type_node))
return double_type_node;
if (mode == TYPE_MODE (long_double_type_node))
return long_double_type_node;
if (mode == TYPE_MODE (build_pointer_type (char_type_node)))
return build_pointer_type (char_type_node);
if (mode == TYPE_MODE (build_pointer_type (integer_type_node)))
return build_pointer_type (integer_type_node);
return 0;
}
tree
truthvalue_conversion (expr)
tree expr;
{
return chill_truthvalue_conversion (expr);
}
#endif

View File

@ -4,17 +4,16 @@
@c For copying conditions, see the file gcc.texi.
@node G++ and GCC
@chapter Compile C, C++, Objective-C, Ada, CHILL, Fortran, or Java
@chapter Compile C, C++, Objective-C, Ada, Fortran, or Java
@cindex Objective-C
@cindex Fortran
@cindex Java
@cindex CHILL
@cindex Ada
Several versions of the compiler (C, C++, Objective-C, Ada, CHILL,
Several versions of the compiler (C, C++, Objective-C, Ada,
Fortran, and Java) are integrated; this is why we use the name
``GNU Compiler Collection''. GCC can compile programs written in any of these
languages. The Ada, CHILL, Fortran, and Java compilers are described in
languages. The Ada, Fortran, and Java compilers are described in
separate manuals.
@cindex GCC

View File

@ -50,9 +50,6 @@ language front ends, and test suites. @xref{gcc Directory, , The
@item include
Headers for the @code{libiberty} library.
@item libchill
The CHILL runtime library.
@item libf2c
The Fortran runtime library.

View File

@ -1,4 +1,4 @@
@c Copyright (C) 2000, 2001 Free Software Foundation, Inc.
@c Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc.
@c This is part of the GCC manual.
@c For copying conditions, see the file gcc.texi.
@ -178,9 +178,6 @@ information as well.
GNAT Reference Manual}, for information on standard
conformance and compatibility of the Ada compiler.
@xref{References,,Language Definition References, chill, GNU Chill},
for details of the CHILL standard.
@xref{Language,,The GNU Fortran Language, g77, Using and Porting GNU
Fortran}, for details of the Fortran language supported by GCC@.

View File

@ -1,3 +1,7 @@
Mon Apr 15 10:59:14 2002 Mark Mitchell <mark@codesourcery.com>
* g77.texi: Remove Chill reference.
2002-04-14 Hans-Peter Nilsson <hp@bitrange.com>
* Make-lang.in (f/target.o): Depend on diagnostic.h.

View File

@ -841,7 +841,7 @@ files and accepts Fortran-specific command-line options, plus some
command-line options that are designed to cater to Fortran users
but apply to other languages as well.
@xref{G++ and GCC,,Compile C; C++; Objective-C; Ada; CHILL; Fortran;
@xref{G++ and GCC,,Compile C; C++; Objective-C; Ada; Fortran;
or Java,gcc,Using the GNU Compiler Collection (GCC)},
for information on the way different languages are handled
by the GNU CC compiler (@command{gcc}).

View File

@ -823,7 +823,6 @@ static const struct compiler default_compilers[] =
{".F", "#Fortran", 0}, {".FOR", "#Fortran", 0}, {".FPP", "#Fortran", 0},
{".r", "#Ratfor", 0},
{".p", "#Pascal", 0}, {".pas", "#Pascal", 0},
{".ch", "#Chill", 0}, {".chi", "#Chill", 0},
{".java", "#Java", 0}, {".class", "#Java", 0},
{".zip", "#Java", 0}, {".jar", "#Java", 0},
/* Next come the entries for C. */

View File

@ -1,3 +1,7 @@
2002-04-15 Mark Mitchell <mark@codesourcery.com>
* testsuite/lib/chill.exp: Remove.
2002-04-14 Jakub Jelinek <jakub@redhat.com>
* g++.dg/other/big-struct.C: New test.

View File

@ -1,365 +0,0 @@
#
# Expect script for Chill Regression Tests
# Copyright (C) 1993, 1996, 1997 Free Software Foundation
#
# This file 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 2 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, write to the Free Software
# Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
# Written by Jeffrey Wheat (cassidy@cygnus.com)
#
#
# chill support library procedures and testsuite specific instructions
#
#
# default_chill_version
# extract and print the version number of the chill compiler
# exits if compiler does not exist
#
proc default_chill_version { } {
global GCC_UNDER_TEST
# ignore any arguments after the command
set compiler [lindex $GCC_UNDER_TEST 0]
# verify that the compiler exists
if {[which $compiler] != 0} then {
set tmp [ exec $compiler -v ]
regexp "version.*$" $tmp version
if [info exists version] then {
clone_output "[which $compiler] $version\n"
}
} else {
warning "$compiler does not exist"
exit -1
}
}
#
# chill_compile
# compile the specified file
#
# returns values:
# return 0 on success
# return 1 on failure with $result containing compiler output
# exit with -1 if compiler doesn't exist
#
# verbosity output:
# 1 - indicate compile in progress
# 2 - indicate compile, target name
# 3 - indicate compile, target name, exec command, and result
#
proc chill_compile { src obj } {
global GCC_UNDER_TEST
global CFLAGS
global errno
global result
global verbose
global subdir
global tmpdir
set errno 0
set cflags $CFLAGS
set dumpfile [file rootname $obj].cmp ;# name of file to dump stderr in
# verify that the compiler exists
if { [which $GCC_UNDER_TEST] == 0 } then {
warning "$GCC_UNDER_TEST does not exist"
exit -1
}
if { $verbose == 1 } then {
send_user "Compiling... "
} else {
verbose " - CMPL: Compiling [file tail $src]" 2
}
# if object type is a grt file, then only build a grant file
if [string match "*.grt" $obj] then {
set cflags [concat $cflags -fgrant-only]
}
# build command line
set commandline "$GCC_UNDER_TEST $cflags -I$subdir -c $src"
# write command line to logfile
send_log "\n### EXEC: $commandline\n"
# tell us whats going on if verbose
verbose "### EXEC: $commandline" 3
# exec the compiler with the appropriate flags
set errno [catch "exec $commandline" result]
# dump compiler's stderr output into $dumpfile - this is a gross hack
set dumpfile [open $dumpfile w+]; puts $dumpfile $result; close $dumpfile
# log any compiler output unless its null
if ![string match "" $result] then { send_log "\n$result\n" }
unset cflags
return
}
#
# chill_link
# link the specified files
#
# returns values:
# return 0 on success
# return 1 on failure with $result containing compiler output
# exit with -1 if compiler doesn't exist
#
# verbosity output:
# 1 - indicate linking in progress
# 2 - indicate linking, target name
# 3 - indicate linking, target name, exec command, and result
#
proc chill_link { target } {
global GCC_UNDER_TEST
global CFLAGS
global errno
global result
global verbose
global tmptarget
global crt0
global libs
global objs
set errno 0
# verify that the compiler exists
if { [which $GCC_UNDER_TEST] == 0 } then {
warning "$GCC_UNDER_TEST does not exist"
exit -1
}
if { $verbose == 1 } then {
send_user "Linking... "
} else {
verbose " - LINK: Linking [file tail $target]" 2
}
# verify that the object exists
if ![file exists $target.o] then {
set errno 1
set result "file $target.o doesn't exist"
return
}
# build command line
set commandline "$GCC_UNDER_TEST $CFLAGS -o $target $target.o $objs $crt0 $libs"
# write command line to logfile
send_log "\n### EXEC: $commandline\n"
# tell us whats going on if we are verbose
verbose "### EXEC: $commandline" 3
# link the objects, sending any linker output to $result
set errno [catch "exec $commandline > $tmptarget.lnk" result]
# log any linker output unless its null
if ![string match "" $result] then { send_log "\n$result\n" }
return
}
#
# default_chill_start
#
proc default_chill_start { } {
global srcdir
global subdir
global tmpdir
global verbose
if { $verbose > 1 } then { send_user "Configuring testsuite... " }
# tmpdir is obtained from $objdir/site.exp. if not, set it to /tmp
if ![info exists tmpdir] then { set tmpdir /tmp }
# save and convert $srcdir to an absolute pathname, stomp on the old value
# stomp on $subdir and set to the absolute path to the subdirectory
global osrcdir; set osrcdir $srcdir; set srcdir [cd $srcdir; pwd]
global osubdir; set osubdir $subdir; set subdir $srcdir/$subdir
# cd the temporary directory, $tmpdir
cd $tmpdir; verbose "### PWD: [pwd]" 5
# copy init files to the tmpdir
foreach initfile [glob -nocomplain $subdir/*.init] {
set targfile $tmpdir/[file tail [file rootname $initfile]]
verbose "### EXEC: cp $initfile $targfile" 5
if [catch "exec cp $initfile $targfile"] then {
send_user "\nConfigure failed.\n"
exit -1
}
}
if { $verbose > 1 } then { send_user "Configuring finished.\n" }
}
#
# default_chill_exit
#
#
proc default_chill_exit { } {
global srcdir
global objdir
global tmpdir
global osrcdir
global osubdir
# reset directory variables
set srcdir $osrcdir; set subdir $osubdir
# remove all generated targets and objects
verbose "### EXEC: rm -f $tmpdir/*" 3
catch "exec rm -f $tmpdir/*" result
# change back to the main object directory
cd $objdir
verbose "### SANITY: [pwd]" 5
}
#
# chill_diff
# compare two files line-by-line
#
# returns values:
# return 0 on success
# return 1 if different
# return -1 if output file doesn't exist
#
# verbosity output:
# 1 - indicate diffing in progress
# 2 - indicate diffing, target names
# 3 - indicate diffing, target names, and result
#
proc chill_diff { file_1 file_2 } {
global errno
global result
global target
global tmptarget
global verbose
set eof -1
set errno 0
set differences 0
if { $verbose == 1 } then {
send_user "Diffing... "
} else {
verbose " - DIFF: Diffing [file tail $file_1] [file tail $file_2]" 2
}
# write command line to logfile
send_log "### EXEC: diff $file_1 $file_2\n"
# tell us whats going on if we are verbose
verbose "### EXEC: diff $file_1 $file_2" 3
# verify file exists and open it
if [file exists $file_1] then {
set file_a [open $file_1 r]
} else {
set errno -1; set result "$file_1 doesn't exist"
return
}
# verify file exists and is not zero length, and then open it
if [file exists $file_2] then {
if [file size $file_2]!=0 then {
set file_b [open $file_2 r]
} else {
set errno -1; set result "$file_2 is zero bytes"; return
}
} else {
set errno -1; set result "$file_2 doesn't exist"; return
}
# spoof the diff routine
lappend list_a $target
while { [gets $file_a line] != $eof } {
if [regexp "^#.*$" $line] then {
continue
} else {
lappend list_a $line
}
}
close $file_a
# spoof the diff routine
lappend list_b $target
while { [gets $file_b line] != $eof } {
if [regexp "^#.*$" $line] then {
continue
} else {
# use [file tail $line] to strip off pathname
lappend list_b [file tail $line]
}
}
close $file_b
for { set i 0 } { $i < [llength $list_a] } { incr i } {
set line_a [lindex $list_a $i]
set line_b [lindex $list_b $i]
if [string compare $line_a $line_b] then {
set errno 1
set count [expr $i+1]
set linenum [format %dc%d $count $count]
verbose "$linenum" 3
verbose "< $line_a" 3
verbose "---" 3
verbose "> $line_b" 3
send_log "$file_1: < $count: $line_a\n"
send_log "$file_2: > $count: $line_b\n"
set result "differences found"
}
}
return
}
#
# chill_fail
# a wrapper around the framework fail proc
#
proc chill_fail { target result } {
global verbose
if { $verbose == 1 } then { send_user "\n" }
fail $target
verbose "--------------------------------------------------" 3
verbose "### RESULT: $result" 3
}
#
# chill_pass
# a wrapper around the framework fail proc
#
proc chill_pass { target } {
global verbose
if { $verbose == 1 } then { send_user "\n" }
pass $target
}

View File

@ -1,865 +0,0 @@
2002-01-11 Craig Rodrigues <rodrigc@gcc.gnu.org>
PR other/5299
* delaycase.c (__delay_event): Fix spelling error.
* waitbuffer.c: Same.
2000-05-31 Richard Henderson <rth@cygnus.com>
* Makefile.in (STROBJS): Get memmove.o from configure.
* configure.in (RANLIB): Detect and substitute.
(memmove): Detect and substitute.
* memmove.c (memmove): Use size_t.
2000-05-29 Zack Weinberg <zack@wolery.cumb.org>
* concatstr.c, exh.c: Include stdlib.h and string.h.
* delaycase.c, eqstr.c, memmove.c, printbuffer.c,
printevent.c, sendbuffer.c, waitbuffer.c: Include string.h.
Mon Apr 3 01:20:50 2000 George France <france@crl.dec.com>
* basicio.c (PATH_MAX): Always provide a definition.
Wed Oct 27 01:13:12 1999 Alan Modra <alan@SPRI.Levels.UniSA.Edu.Au>
* Makefile.in (config.status): Fix leading whitespace.
(clean): Remove libchill.a.
Thu Sep 2 17:50:47 1999 Jeffrey A Law (law@cygnus.com)
* powerset.h (SET_WORD, SET_SHORT, SET_CHAR): Do not redefine based
on USE_CHAR.
(USE_CHAR): No longer define.
* eqps.c ffsetclrps.c flsetclrps.c: Remove !USE_CHARS support.
Mon Aug 30 16:42:45 1999 Hans-Peter Nilsson <hp@axis.se>
* Makefile.in (chillrt0.o): Depend on chillrt0.c explicitly.
Fri Aug 6 23:32:29 1999 Daniel Jacobowitz <drow@drow.them.org>
* Makefile.in (FLAGS_TO_PASS): Include prefix, exec_prefix,
libdir, libsubdir and tooldir.
Thu May 20 03:20:59 1999 Jeffrey A Law (law@cygnus.com)
* configure.in (AC_EXEEXT): Remove call.
(compiler_name): Explicitly check with no extension and .exe
extension.
* configure: Regenerate.
Wed Mar 24 22:41:28 1999 Mumit Khan <khan@xraylith.wisc.edu>
* configure.in (AC_PREREQ): Update to 2.13.
(AC_EXEEXT): Call to find possible file extension.
(compiler_name): Use.
* configure: Regenerate.
1999-01-19 08:10 -0500 Zack Weinberg <zack@rabi.columbia.edu>
* Makefile.in: Fix typos in previous change.
(rtsdummy.o): Don't depend on gvarargs.h.
Mon Jan 18 04:47:34 1999 Jeffrey A Law (law@cygnus.com)
Hans-Peter Nilsson <hp@axis.se>
* Makefile.in: Add many missing dependencies.
Sun Jan 3 21:04:53 1999 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
* readrecord.c: Include <sys/types.h> for off_t.
1998-11-26 Manfred Hollstein <manfred@s-direktnet.de>
* configure.in (compiler_name): Add check to detect if this
language's compiler has been built.
* configure: Regenerate.
Mon Nov 23 16:48:39 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* configure.in: Use AC_PREREQ(2.12.1).
Fri Nov 20 18:48:34 1998 J"orn Rennecke <amylaar@cygnus.co.uk>
* basicio.c (PATH_MAX): Define only to _POSIX_PATH_MAX if that is
defined. Otherwise, try MAXPATHLEN.
Thu Oct 22 14:37:35 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* configure.in: Use AC_CONFIG_AUX_DIR($topsrcdir).
1998-09-22 Ben Elliston <bje@cygnus.com>
* configure.in: This is GNU CHILL, not GNU Fortran.
1998-09-20 Manfred Hollstein <manfred@s-direktnet.de>
* Makefile.in: Add dummy targets "info", "install-info", "clean-info"
and "dvi".
1998-09-13 David S. Miller <davem@pierdol.cobaltmicro.com>
* configure.in: Use 'if test' not brackets.
* configure: Rebuilt.
Wed Sep 9 21:32:46 1998 Jeffrey A Law (law@cygnus.com)
* Add library exception clause to the copyright notice for all
.c and .h files.
Tue Sep 8 10:41:38 1998 Jeffrey A Law (law@cygnus.com)
* rts.h: Update with missing code.
Sun Sep 6 01:30:40 1998 Jeffrey A Law (law@cygnus.com)
* allgmem.c: Do not include config.h anymore.
* allmem.c allocate.c andps.c cardps.c cause.c copyps.c: Likewise.
* diffps.c eqps.c exh.c exhstack.c ffsetclrps.c ffsetps.c: Likewise.
* flsetclrps.c flsetps.c inbitstr.c inps.c leps.c ltps.c: Likewise.
* neps.c notps.c orps.c retmem.c rtsdummy.c setbitps.c: Likewise.
* setbits.c sliceps.c terminate.c unhex.c unhex1.c xorps.c: Likewise.
Sat Sep 5 02:09:42 1998 Jeffrey A Law (law@cygnus.com)
* Chill runtime moved into toplevel libchill.
* Makefile.in Revamped due to move. Add multilib support.
* configure.in: Similarly. Use autoconf.
* powerset.h: Do not depend on BITS_PER_UNIT.
Fri Apr 24 16:12:40 1998 Dave Brolley <brolley@cygnus.com>
* writerecord.c (sys/types.h): #included to pick up off_t.
Tue Nov 26 01:56:03 1996 Wilfried Moser <moser@rtl.cygnus.com>
* memmove.c (memmove): If nor overlapping use memcpy instead of
byte copy.
Tue May 14 21:26:52 1996 Per Bothner <bothner@deneb.cygnus.com>
* gestr.c, gtstr.c, lestr.c, nestr.c: Removed - no longer used.
* Makefile.in (STROBJS) Removed gestr.o, gtstr.o, lestr.o, nestr.o.
Thu May 9 06:59:23 1996 Wilfried Moser <moser@rtl.cygnus.com>
* basicio.c (__connect): In case of Same, fix condition for
exception.
Thu Feb 29 10:55:01 1996 Per Bothner <bothner@kalessin.cygnus.com>
* format.c: Use ANSI-standard float.h, rather than old values.h.
Mon Jan 15 06:16:22 1996 Wilfried Moser <moser@rtl.cygnus.com>
* sendbuffer.c (__send_buffer): Take care of possibly unaligned
pointers.
* waitbuffer.c (__wait_buffer): Ditto.
Thu Nov 30 03:49:58 1995 Wilfried Moser <moser@rtl.cygnus.com>
* format.c (inpioctrl): Process NOTCONNECTED.
(outioctrl): Deto.
(scanformcont): Fix processing of %% in format string.
Mon Nov 27 05:27:14 1995 Wilfried Moser <moser@rtl.cygnus.com>
* chillrt0.c (main): Pass argc & argv to __RTS_INIT__.
Thu Nov 23 05:15:05 1995 Wilfried Moser <moser@rtl.cygnus.com>
* ioerror.h (io_info_word_t): Make value of first entry compile time
comfigurable.
Tue Nov 7 22:52:24 1995 Wilfried Moser <moser@rtl.cygnus.com>
* format.c: Rename ultoa to myultoa cause of conflicting types
on some systems.
Mon Nov 6 03:17:50 1995 Wilfried Moser <moser@rtl.cygnus.com>
* chillrt0.c: Move definition of chill_stdin, chill_stdout,
chill_stderr ...
* chillstdio.c: ... to here.
* delete.c, eoln.c, existing.c, getusage.c, indexable.c,
isassociated.c, outoffile.c, readable.c, sequencible.c,
variable.c, writeable.c: Modified for new implementation of
chill file i/o.
* basicio.c, format.c, getassoc.c, gettextaccess.c, gettextindex.c,
gettextrecord.c, ioerror.c, readrecord.c, settextaccess.c,
settextindex.c, settextrecord.c, writerecord.c: New files to
implement chill file i/o.
* allocate.c, terminate.c: New files to implement chill's
ALLOCATE and TERMINATE built-in's.
* associate.c, checksum.c, connect.c, create.c, disconnect.c,
dissociate.c, findfile.c, findnextfile.c, fstable.c, getass.c,
getdir.c, gettxtacc.c, gettxtidx.c, gettxtrec.c, iostatus.c,
lowlevelio.c, modify.c, rdformat.c, rdrecord.c, rdstring.c,
rdtext.c, rdunixstd.c, readlen.c, regexp.h, setdir.c, settxtacc.c,
settxtidx.c, settxtrec.c, skiprec.c, wrformat.c, wrrecord.c,
wrstring.c, wrtext.c, wrunixstd.c: Removed.
Tue Sep 12 04:27:47 1995 Wilfried Moser <moser@rtl.cygnus.com>
* Makefile.in (Makefile): Add rule for Makefile.
OBJS depends on ../../cc1 to build a new library when cc1 have
changed.
Mon Jul 31 15:04:04 1995 Per Bothner <bothner@kalessin.cygnus.com>
* ffsetclrps.c, flsetclrps.c: Completely different interface,
* storeoutps.c: Remove, no longer needed.
* Makefile.in (PSOBJS): Take out storeoutps.o.
Mon Jun 19 05:23:35 1995 Wilfried Moser <moser@rtl.cygnus.com>
* exh.c (__cause_exception): New argument.
(__cause_ex1): New function. This function will get called
now by the compiler when an exception should be raised.
* abstime.c, allgmem.c, allmem.c, checkcycle.c, delaycase.c,
ffsetps.c, flsetps.c, inbitstr.c, sendbuffer.c, waitbuffer.c:
Change calls to __cause_exception to calls to __cause_ex1.
* unhex.c (unhandled_exception),
cause.c (cause_exception): New argument.
* rts.h: Add prototypes for __delay_this and __continue_that.
* ffsetclrps.c, flsetclrps.c, inps.c, rtltypes.h, setbitps.c:
Remove prototype for __cause_exception (not needed).
* rdstring.c (_readstring), wrstring.c (_writestring): Add argument
to call to __cause_exception.
* Makefile.in, unhex1.c: New file. Function __unhandled_ex
is defined here. This gets called when the compiler doesn't
find a handler when causing an exception.
Tue Apr 11 16:01:02 1995 Per Bothner <bothner@kalessin.cygnus.com>
* iomodes.h (__tmp_WIO_union, __tmp_RIO_union): Make __forbyte
be explicitly signed, for the sake of systems where char is unsigned.
Wed Mar 22 06:10:18 1995 Wilfried Moser <moser@rtl.cygnus.com>
* setbitps.c (__setbitpowerset): Change definition of new_value
to char, cause booleans are represented as 8 bit values by the
compiler. Use only least significant bit of new_value.
Tue Jan 17 07:32:17 1995 Wilfried Moser <moser@rtl.cygnus.com>
* inps.c (__inpowerset): Don't do rangecheck. Return 0
if value not in range.
* Makefile.in, inbitstr.c (__inbitstring): New file and
function for accessing single elements in a bitstring.
Tue Dec 6 02:35:00 1994 Wilfried Moser <moser@rtl.cygnus.com>
* rdformat.c (rf_parse_iolist): In case of __IO_set and
__IO_SetRange process the ignore_case flag.
* iomodes.h: Change definition of __tmp_RIO_forset and
__tmp_RIO_forsetrange.
Fri Nov 4 12:04:16 1994 Per Bothner <bothner@kalessin.cygnus.com>
* concatstr.c (__concatstring): Add support for input strings
to overlap target.
* setbits.c (__setbits): Fix function name passed
to __cause_exception.
Wed Nov 2 05:02:59 1994 Wilfried Moser (moser@rtl.cygnus.com)
* Makefile.in (TIMEOBJS): Add new files.
* checkcycle.c (__check_cycle): New file and function for
CYCLE statement.
* convdurrtstime.c (__convert_duration_rtstime): New file
and function for conversion of DURATION (unsigned long) to
RtsTime format.
* delaycase.c (__delay_event): Implement processing of
timesupervision.
* remaintime.c (__remaintime): New file and function to
calculate the remaining time of a duration (used for
timesupervision).
* rts.h: New definitions and prototypes.
* sendbuffer.c (__send_buffer): Implement processing of
timesupervision.
* waitbuffer.c (__wait_buffer): Implement processing of
timesupervision.
* waituntil.c (__wait_until): Changed due to implementation
of timesupervision.
Thu Oct 6 06:41:02 1994 Wilfried Moser (moser@rtl.cygnus.com)
* wrformat.c (default_conv): Remove processing of
POWERSET's.
* rdformat.c (rf_parse_iolist): Remove processing of
POWERSET's.
* iomodes.h: Remove definition for POWERSET's.
Fri Sep 30 01:52:25 1994 Wilfried Moser (moser@rtl.cygnus.com)
* rdformat.c (rf_parse_iolist): Fix processing of BITSTRINGs.
Mon Sep 26 16:10:47 1994 Per Bothner (bothner@kalessin.cygnus.com)
* copyps.c (__pscpy): Add missing 'const'.
* wrformat.c (default_conv): Replace memcpy by explicit loop,
since memcpy can get mis-optimized when we have unaligned data.
* wrformat.c (__write_format): Don't alloca an extra copy of
the format string.
Mon Sep 26 08:54:03 1994 Wilfried Moser (moser@rtl.cygnus.com)
* wrformat.c (default_conv): Remove formating of nonprintable
characters (ESC-sequences wouldn't work).
Fri Sep 23 00:48:28 1994 Wilfried Moser (moser@rtl.cygnus.com)
* copyps.c (__pscpy): Fix masking out unused bits.
* fileio.h: Fix prototype.
Tue Sep 13 04:54:45 1994 Wilfried Moser (moser@rtl.cygnus.com)
* rdformat.c (__read_format): Remove end-of-input string
check.
Thu Sep 8 17:20:07 1994 Per Bothner (bothner@kalessin.cygnus.com)
* setbits.c (__setbits): New function, based on __setpowersetbits,
but with 4 instead of 5 parameters.
* setpsbits.c: Removed. No longer used.
* Makefile (PSOBJS): Update accordingly.
Mon Sep 5 08:03:46 1994 Wilfried Moser (moser@rtl.cygnus.com)
* queuelength.c (__queue_length): New file and function
to implement QUEUE_LENGTH built-in.
* Makefile.in (TASKOBJS): Add queuelength.o.
Fri Aug 26 16:27:21 1994 Per Bothner (bothner@kalessin.cygnus.com)
* Makefile.in (INCLUDES): Add -I../../include.
Wed Aug 24 01:12:32 1994 Wilfried Moser (moser@rtl.cygnus.com)
* sendbuffer.c, waitbuffer.c, delaycase.c, printbuffer.c,
printevent.c: Be careful with addresses of data from the
application,they may be unaligned (-fpack).
Fri Aug 19 07:16:15 1994 Wilfried Moser (moser@rtl.cygnus.com)
* wrformat.c (default_conv), rdformat.c (rf_parse_iolist): Be
careful with addresses of data from the application, they may
be unaligned (-fpack).
Fri Aug 12 20:31:47 1994 Per Bothner (bothner@kalessin.cygnus.com)
* eqps.c (__eqpowerset): Calculate number of full words
as floor, not ceiling of bitslength/SET_WORD_SIZE.
Fri Aug 5 17:25:48 1994 Per Bothner (bothner@kalessin.cygnus.com)
* eqps.c (__eqpowerset): Revert Wilfried's fix, and fix
the problem in a slightly different way (which is simpler
and will also work for 0-length bitstrings).
* neps.c (__nepowerset): Simplify - just call __eqpowerset.
Fri Jul 29 04:06:56 1994 Wilfried Moser (moser@rtl.cygnus.com)
* neps.c (__nepowerset): Correct processing of powerset
in case of USE_CHARS defined.
Wed Jul 27 05:27:06 1994 Wilfried Moser (moser@rtl.cygnus.com)
* eqps.c (__eqpowerset): Correct processing of powerset
in case of USE_CHARS defined.
Mon Jun 27 01:17:09 1994 Wilfried Moser (moser@rtl.cygnus.com)
* iomodes.h: Change layout of __tmp_WIO_list that it is always
the same, regardless if compiled with -fpack or not.
Tue May 31 04:54:48 1994 Wilfried Moser (moser@rtl.cygnus.com)
* printbuffer.c, printevent.c, rts.h, sendbuffer.c,
waitbuffer.c: Finish the implementation of BUFFER's
and EVENT's.
Tue May 10 05:17:43 1994 Wilfried Moser (moser@rtl.cygnus.com)
* iomodes.h: Change names of __access, __association and
__text to __access_type, __association_type and
__text_type. __access is already defined in one of the
linux header files.
Wed May 4 15:37:22 1994 Wilfried Moser (moser@rtl.cygnus.com)
* Makefile.in (clean): Add chillrt0.o
* continue.c (__continue): Implement the function.
* delaycase.c (__delay_event): Implement the function.
* printbuffer.c (__print_buffer): Implement the function.
* printevent.c (__print_event.c): Implement the function.
* rts.h: Change datatypes used for EVENT's and BUFFER's.
* sendbuffer.c (__send_buffer): Implement the function.
FIXME: not completely done.
* waitbuffer.c (__wait_buffer): Implement the function.
FIXME: not completely done.
Thu Apr 28 14:39:06 1994 Wilfried Moser (moser@rtl.cygnus.com)
* Makefile.in (TASKOBJS): New variable for tasking related
objects files.
* Makefile.in (TIMEOBJS): New object file added.
* rts.h: Add definitions for BUFFER's and EVENT's.
* waituntil.c (__wait_until): New file and new function.
Implements the AT action.
* delaycase.c (__delay_event): New file and new function.
Implements the DELAY and DELAY CASE action. FIXME: not yet done.
* continue.c (__continue): New file and new function.
Implements the CONTINUE action. FIXME: not yet done.
* sendbuffer.c (__send_buffer): New file and new function.
Implements the SEND buffer action. FIXME: not yet done.
* waitbuffer.c (__wait_buffer): New file and new function.
Implements the RECEIVE buffer CASE action. FIXME: not yet done.
* printevent.c (__print_event): New file and new function.
Prints an event queue. FIXME: not yet done.
* printbuffer.c (__print_buffer): New file and new function.
Prints a buffer queue. FIXME: not yet done.
Fri Apr 1 10:59:55 1994 Wilfried Moser (fs_moser at rcsw47)
* wrformat.c (default_conv): Change output of characters in the
range 0 to 31 (control characters now printed as ^C).
Fri Apr 15 16:29:21 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
* Makefile.in: XTRAFLAGS is no longer need, since -Bdir now
implies -Idir/include.
(XTRAFLAGS): Don't define.
(ALL_CFLAGS): Don't include $(XTRAFLAGS).
Thu Apr 14 13:44:31 1994 Wilfried Moser (moser@phishhead.cygnus.com)
* Makefile.in (TIMEOBJS): New variable for time related stuff.
* Makefile.in (OBJS): Add TIMEOBJS.
* abstime.c (_abstime): New file and new function to handle
ABSTIME builtin.
* inttime.c (_inttime): New file and new function to handle
INTTIME builtin.
Tue Mar 29 13:11:37 1994 Wilfried Moser (fs_moser at rcsw1h)
* Makefile.in (LIBOBJS2): Add new modules rdformat.o rdstring.o
rdunixstd.o
* iomodes.h: Remove unnecessary definitions. Redefine interface to
READTEXT/WRITETEXT functions.
* rdstring.c (_readstring): Rework function.
* rdformat.c: Rework functionality.
* rdunixstd.d: New module. This is designed to implement
READTEXT (stdin...).
* wrformat.c (copy_text): Change return value of function. In case
of an empty string this function has failed.
* wrformat.c: Change formating of a NULL pointer to NULL instead
of 0.
* wrformat.c (PUT_CHARS): Change macro according to new return
value of function copy_text.
Sun Mar 20 21:11:35 1994 Per Bothner (bothner@kalessin.cygnus.com)
* powerset.h: Bitstrings are now allocated in units
of (unsigned char), rather than words.
* eqps.c (__eqpowerset): Optimize slighly for above change.
* setbitps.c (__setbitpowerset): Clean up parameter list.
Thu Mar 10 11:10:32 1994 Bill Cox (bill@rtl.cygnus.com)
* Makefile.in: Add standard gcc Makefile stuff. Move
chillcrt0 and libchill.a to all.indirect from all target.
Tue Mar 1 17:01:32 1994 Wilfried Moser (fs_moser at rcsw1h)
* iomodes.h: Add definition for POWERSET's
* wrunixstd.c: Change the write call to an fprintf cause a system
we have doesn't support write.
* wrformat.c: Add processing of SET's and POWERSET's
Sat Jan 29 13:32:52 1994 Bill Cox (bill@rtl.cygnus.com)
* Makefile.in: Add new files copyps.c and concatps.c.
* copyps.c: New function with functionality from sliceps.c,
* sliceps.c: Change to call copyps now from here.
* concatps.c: New function - call copyps from here.
* powerset.h: Fix CLEAR_BIT_IN_CHAR macro.
Wed Jan 26 12:30:48 1994 Mike Stump (mrs@cygnus.com)
* Makefile.in: Don't echo ranlib command.
Wed Jan 26 12:21:11 1994 Mike Stump (mrs@cygnus.com)
* Makefile.in: Make sure cross builds work. AR, and RANLIB now
used properly. Make sure we can reconfigure if Makefile.in
changes. Use GCC_FOR_TARGET, not CC to compile libchill.a.
Fri Jan 21 15:30:31 1994 Per Bothner (bothner@kalessin.cygnus.com)
* allgmem.c: Make prototype K&R-compatible.
Sat Jan 15 10:04:08 1994 Bill Cox (bill@rtl.cygnus.com)
* Makefile.in: Remove unused install code.
(Install will happen from devo/gcc). Add
rules for cleaning up.
Fri Jan 14 21:43:45 1994 Per Bothner (bothner@kalessin.cygnus.com)
* chillrt0.c (__init_list): Renamed to _ch_init_list, to
avoid a conflict on the Alpha.
Tue Jan 25 13:28:15 1994 Wilfried Moser (fs_moser at rcsw1j)
* Makefile.in: clean up for cross compilation. Remove a lot of
functions (file-io) which are not used at the moment.
* iomodes.h: clean up the datatypes passed to the writetext
functions.
* unhex.c: Comment out include of gvarargs.h (not needed).
* rtsdummy.c: Comment out include of gvarargs.h (not needed).
* wrformat.c: change various procedure arguments according to the
new type passed by the compiler. Remove include of fcntl.h and
sys/stat.h (not needed).
* wrformat.c (default_conv): Change formatting of integers in case
of %O, %H, %B to unsigned. (PR-4395)
* wrstring.c: change various procedure arguments according to the
new type passed by the compiler. Remove include of fcntl.h and
sys/stat.h (not needed).
* wrtext.c: change various procedure arguments according to the
new type passed by the compiler.
* wrunixstd.c: change various procedure arguments according to the
new type passed by the compiler. Remove include of fcntl.h and
sys/stat.h (not needed).
* wrunixstd.c (_writeunixstd): Change the fwrite call to fprintf.
This is necessary due to a port to a system which does not
support fwrite.
Sun Jan 2 14:40:32 1994 Bill Cox (bill@cygnus.com)
* Makefile.in: Clean out obsolete .c286 suffix references.
Sat Jan 1 16:51:22 1994 Bill Cox (bill@cygnus.com)
* Makefile.in: Add dependencies on fileio.h
Sat Jan 1 12:31:22 1994 Bill Cox (bill@cygnus.com)
* Reorganize the whole directory and the Makefile. Now you
can recompile a single function and not have to recompile
a whole file full of them.
* eqps.c, neps.c: Fix handling of a one-word set. (PR-4077).
Thu Dec 16 10:19:00 1993 Bill Cox (bill@rtl.cygnus.com)
* fileio.c (default_conv): Changes to support all basic CHILL types.
Standardize function header formats.
Tue Dec 14 14:36:27 1993 Bill Cox (bill@rtl.cygnus.com)
* fileio.c (writeunixstd): Call _allocate_memory and
_return_memory, so we'll get appropriate exceptions.
* powerset.c: Ensure a space between each macro name and the
parameters.
Mon Nov 22 10:42:37 1993 Wilfried Moser (moser@rtl.cygnus.com)
* Makefile.in: Add functions to LIBFUNCS1
* chillrt0.c (main): Clear the exception stack.
* libchill.c (__setexceptionStack, __getexceptionStack): New
functions according to allow one exceptionStack per thread.
Sat Nov 20 17:45:52 1993 Per Bothner (bothner@kalessin.cygnus.com)
* libchill.c (__ch_link_handler, __ch_unlink_handler): New functions.
Fri Nov 19 14:37:12 1993 Bill Cox (bill@rtl.cygnus.com)
* Makefile.in, string.c: Add memmove function (PR-3937).
Wed Nov 17 17:07:46 1993 Bill Cox (bill@rtl.cygnus.com)
* fileio.c (_writestring): Add parameters for the source file
and line number where it was called, for way better error
messages.
* powerset.c: Make all length and count variables longs.
Allows much larger powersets.
Mon Nov 15 14:59:47 1993 Bill Cox (bill@rtl.cygnus.com)
* fileio.c (writestring): Changed interface.
* iomodes.h: New structures for above interface.
* libchill.c: Delete bunch of powerset-related cruft.
(cause_exception): Empty it out.
* powerset.c: Call correct exception causer.
* string.c: Rewrite string comparisons from scratch. They
were bad...
Sat Oct 30 14:54:39 1993 Bill Cox (bill@rtl.cygnus.com)
* Makefile.in: Change paths to executables.
Thu Oct 28 16:38:34 1993 Bill Cox (bill@rtl.cygnus.com)
* powerset.c (__inpowerset, __setbitpowerset): Correct error checking.
These were throwing false exceptions.
(__setpowersetbits): Add check for null output set ptr.
Wed Oct 27 16:45:29 1993 Bill Cox (bill@rtl.cygnus.com)
* powerset.c (__diffpowerset): Check for SET_SHORT_SIZE, not
SET_CHAR_SIZE twice.
(__ffsetpowerset, __flsetpowerset): Add code for CHAR and SHORT sets.
* libchill.c (cause_exception): Output a message to stderr, and
abort, as a default exception action.
Thu Oct 21 16:04:09 1993 Per Bothner (bothner@kalessin.cygnus.com)
* fileio.c (__write_format): Add missing increment of fstr.
Thu Sep 30 20:11:34 1993 Per Bothner (bothner@kalessin.cygnus.com)
* powerset.c (__psslice): Take length, rather than upper bound.
Sun Sep 19 23:14:57 1993 Per Bothner (bothner@kalessin.cygnus.com)
* chillrt0.c, fileio.c (_writeunixstd): Change a standard Unix file
from (long*) to (long). Use fwrite rather than write.
* fileio.c (PUT_CHARS, PUT_CHAR): New macros.
* fileio.c (__write_format): Use them.
* fileio.c (__write-format): Handle "%/" format even if
not io_ctrl_allowed (by emitting '\n').
Fri Sep 10 12:15:51 1993 Wilfried Moser (fs_moser at rcsw1j)
* chillrt0.c: Make stdin, stdout, stderr available to chill
programs. This is done by setting the apropriate file handles
to chill_stdin, chill_stdout, chill_stderr.
* fileio.c: Add a new function (_writeunixstd) to the
chill library. This function will be called when the compiler
detects a WRITETEXT action to one of the above mentioned
file handles.
* Makefile.in: Add _writeunixstd to LIBFUNCS3.
Sat Aug 21 17:17:53 1993 Bill Cox (bill@rtl.cygnus.com)
* Makefile.in: Add psset to list of powerset stuff.
* powerset.c: Standardize (and correct) for loops. Fix
comments.
Mon Jul 5 09:48:06 1993 Wilfried Moser (fs_moser at rcsw1j)
* rtltypes.h: Change layout of struct __ch_handler. The entry
jmp_buf is moved to the end of the structure.
Mon Jun 14 12:17:53 1993 david d `zoo' zuhn (zoo at rtl.cygnus.com)
* Makefile.in: rename INSTALLDIR to libdir; remove parentdir
support; update definition of INSTALL
Thu Jun 10 18:14:41 1993 Wilfried Moser (moser@deneb.cygnus.com)
* libchill.c: (vector): This entry was removed. It is no
longer neccessary.
* Makefile.in: Change due to the remove of vector.
Wed Jun 9 10:39:25 1993 Wilfried Moser (moser@deneb.cygnus.com)
* chillrt0.c (main): Change processing of constructors
according to the new design made for tasking.
* libchill.c (__rts_main_loop, __rts_init): Don't do an
abort () there.
Mon May 31 08:24:51 1993 Ian Lance Taylor (ian@cygnus.com)
* Makefile.in (install): Create directory if necessary.
Sun May 30 15:57:05 1993 Per Bothner (bothner@cygnus.com)
* powerset.c (__eqpowerset, _newpowerset): Don't call
MASK_UNUSED_{CHAR,SHORT}_BITS on input operand
(which might be in read-only memory).
* powerset.c (SET_CHAR, SET_SHORT): Make unsigned.
Fri May 21 10:45:07 1993 Bill Cox (bill@rtl.cygnus.com)
* Makefile.in, chillrt0.c, fileio.c, libchill.c,
powerset.c, rtltypes.h: Wilfried's changes checked
in at Cygnus.
Tue May 18 09:21:56 1993 Bill Cox (bill@rtl.cygnus.com)
* powerset.c, Makefile.in: Add psslice routine.
Change function name from bitsetpowerset to
setpowersetbits. Drop build of I/O library
stuff, per Wilfried's request.
Tue May 18 07:55:25 1993 Wilfried Moser (fs_moser at rcsw1j)
* Makefile.in: clean up directory. Remove chillrt0.c
from libchill.a, this will be linked separately.
Remove librmt.a from Makefile, this is application
dependent.
Fri May 7 10:45:09 1993 Ian Lance Taylor (ian@cygnus.com)
* Makefile.in (tooldir): Define.
* configure.in: If cross-compilation, install in $(tooldir)/lib
rather than in $(exec_prefix)/lib.
Sat May 1 11:43:44 1993 Bill Cox (bill@rtl.cygnus.com)
* Makefile.in: Add store_output to lists.
* powerset.c: Add char- and short-length set handling
across the board.
Thu Apr 8 17:43:33 1993 Bill Cox (bill@rtl.cygnus.com)
* powerset.c (nepowerset): Return TRUE for non-equal comparison.
* string.c (eqstring, nestring): Call memcmp for the real work.
Mon Mar 22 23:22:53 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
* Makefile.in: add dvi, check and installcheck targets
Fri Mar 12 10:59:31 1993 Bill Cox (bill@rtl.cygnus.com)
* string.c (nestring): Fix return status - was completely bogus.
Fri Mar 5 18:34:15 1993 Per Bothner (bothner@rtl.cygnus.com)
* powerset.c: Re-name INT_TYPE_SIZE to SET_WORD_SIZE.
* powerset.c: Use SET_WORD instead of (unsigned int).
* powerset.c (__eqpowerset, __nepowerset): Fix masking
of final word to not trash memory.
Fri Mar 5 07:55:13 1993 Bill Cox (bill@rtl.cygnus.com)
* Makefile.in, powerset.c (__nepowerset): add psne for powerset
inequality test.
* string.c: fix comment.
Sat Feb 20 08:07:21 1993 Bill Cox (bill@rtl.cygnus.com)
* Makefile.in, libchill.c, powerset.c: split out powerset stuff.
* powerset.c: fix __ffsetpowerset and __flsetpowerset.
Fri Feb 19 11:00:10 1993 Bill Cox (bill@rtl.cygnus.com)
* Makefile.in: add psmax and psmin to LIBFUNCS1, so the
ffsetpowerset and flsetpowerset functions get into the library.
Sat Feb 13 15:43:21 1993 Bill Cox (bill@rtl.cygnus.com)
* Makefile.in, string.c: cleanup
Sat Feb 13 13:52:20 1993 Bill Cox (bill@rtl.cygnus.com)
* Makefile.in: Add LIBFUNC4, and loop for it. Builds
string-related runtime functions, adds them to libchill.a.
Wed Feb 10 09:45:29 1993 Bill Cox (bill@rtl.cygnus.com)
* rtltypes.h: added missing TExceptionDefinition.
* libchill.c: add GNU comment header, various new powerset
support routines. Change function declarations for K&R
compatibility.
* string.c: added - runtime string routines (relationals and
concat).
Tue Feb 9 16:17:35 1993 Per Bothner (bothner@rtl.cygnus.com)
* libchill.c, rtltypes.h: Replace exceptions-handling code.
* fileio.c: Comment out non-working pseudo-exception-handlers.
Fri Feb 5 07:38:39 1993 Fred Fish (fnf@cygnus.com)
* Makefile.in (RANLIB_TEST, INSTALL, INSTALL_PROGRAM,
INSTALL_DATA): Supply default definitions.
Sat Jan 30 13:57:09 1993 Per Bothner (bothner@rtl.cygnus.com)
* libchill.c: Change exception to be plain (char*).
(This is a simplification, at the cost of needing strcmp's.)
* Makefile.in: Move install actions over form ../gcc/Makefile.in.
Wed Jan 27 23:22:44 1993 Per Bothner (bothner@rtl.cygnus.com)
* libchill.c (__cause_exception): Exception is (for now)
(char**), rather than short.
Also, add (commented-out) sketch of new exception implementation.
Tue Jan 12 21:14:56 1993 Per Bothner (bothner@cygnus.com)
* libchill.c: Re-wrote bitstring/powerset code: Each chunk is
now a (unsigned int), rather than a (char), and bit-order
depends on BITS_BIG_ENDIAN, rather than being always
litle-endian. Other improvements here and there.
* libchill.c (__cardpowerset, __diffpowerset): Faster code.
* libchill.c (__setbitinstring): New routine, to assign
a single bit in a bitstring/powerset.
* Makefile.in (LIBFUNCS1): Add psset for __setbitinstring().
Tue Jan 12 00:10:46 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
* Makefile.in: compile all files with ALL_CFLAGS instead of CFLAGS,
default ALL_CFLAGS to include CFLAGS,
default XTRAFLAGS which is used to find the C library (like libg++),
added dummy install-info target for devo builds,
Wed Jan 6 08:03:46 1993 Fred Fish (fnf@cygnus.com)
* Makefile.in (libchill.a): Since libchill.a depends upon
chillrt0.o, don't remove chillrt0.o after adding to archive.
* config/mh-sysv4: Add SVR4 configuration file.
* Makefile.in (GCC_MAKEFILE): Define to point to gcc/chill
compiler Makefile, which contains the actual makefile fragments
to do the install, since it knows where gcc/chill is installed.
* Makefile.in: Add lines that configure looks for to insert
host, target, and site specific Makefile fragments.
* Makefile.in (install): New target that invokes make on the
gcc/chill makefile to do the actual install.
* configure.in (*-*-sysv4): Use mh-sysv4 as host_makefile_frag.
Sun Jan 3 16:47:25 1993 Per Bothner (bothner@cygnus.com)
* chillrt0.c: Comment out for now the non-portable
kludge for adding build_exceptions to the C++ initialision list.
Sat Jan 2 15:51:43 1993 Per Bothner (bothner@rtl.cygnus.com)
* New directory. Moved files from ../gcc/chillrt.
* configure.in: New file.
* Makefile.in: Modified from old Makefile to fit into standard
directory structure.

View File

@ -1,246 +0,0 @@
# Makefile for GNU CHILL compiler runtime library.
# Copyright (C) 1987, 88, 90-94, 1998, 1999 Free Software Foundation, Inc.
#This file is part of GNU CC.
#GNU CC 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 2, or (at your option)
#any later version.
#GNU CC 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 CC; see the file COPYING. If not, write to
#the Free Software Foundation, 59 Temple Place - Suite 330,
#Boston, MA 02111-1307, USA. */
# This was cribbed from the libf2c, libiberty and libstdc++ Makefile.in
# files. Some of this stuff may be unnecessary and worthless.
SHELL = /bin/sh
#### Start of system configuration section. ####
srcdir = @srcdir@
VPATH = @srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
target_alias = @target_alias@
gcc_version = @gcc_version@
gcc_version_trigger = @gcc_version_trigger@
libdir = $(exec_prefix)/lib
libsubdir = $(libdir)/gcc-lib/$(target_alias)/$(gcc_version)
# Multilib support variables.
MULTISRCTOP =
MULTIBUILDTOP =
MULTIDIRS =
MULTISUBDIR =
MULTIDO = true
MULTICLEAN = true
# Not configured per top-level version, since that doesn't get passed
# down at configure time, but overrridden by the top-level install
# target.
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
AR = @AR@
AR_FLAGS = rc
RANLIB = @RANLIB@
CC = @CC@
CFLAGS = @CFLAGS@
ALL_CFLAGS = -I. -I$(srcdir) $(CPPFLAGS) $(DEFS) $(CFLAGS)
.SUFFIXES:
.SUFFIXES: .c .o
.c.o:
$(CC) -c $(ALL_CFLAGS) $(INCLUDES) $<
# Lists of required functions for each archive.
LIBOBJS1 = allgmem.o allmem.o allocate.o cause.o exhstack.o exh.o retmem.o \
unhex.o unhex1.o rtsdummy.o terminate.o
IOOBJS = basicio.o chillstdio.o delete.o eoln.o existing.o format.o getassoc.o \
gettextaccess.o gettextindex.o gettextrecord.o getusage.o \
indexable.o ioerror.o isassociated.o outoffile.o readable.o \
readrecord.o sequencible.o settextaccess.o settextindex.o \
settextrecord.o variable.o writeable.o writerecord.o
PSOBJS = andps.o cardps.o concatps.o copyps.o diffps.o eqps.o ffsetclrps.o \
ffsetps.o flsetclrps.o flsetps.o inbitstr.o inps.o leps.o ltps.o \
neps.o notps.o orps.o setbitps.o setbits.o sliceps.o xorps.o
STROBJS = concatstr.o eqstr.o ltstr.o @MEMMOVE_O@
TIMEOBJS = abstime.o inttime.o waituntil.o remaintime.o convdurrtstime.o \
checkcycle.o
TASKOBJS = continue.o delaycase.o printbuffer.o printevent.o queuelength.o \
sendbuffer.o waitbuffer.o
OBJS = $(LIBOBJS1) $(IOOBJS) $(PSOBJS) $(STROBJS) $(TIMEOBJS) $(TASKOBJS)
libchill.a: $(OBJS)
$(AR) $(AR_FLAGS) $@ $(OBJS)
$(RANLIB) $@
allgmem.o: allgmem.c rtltypes.h
allmem.o: allmem.c rtltypes.h
allocate.o: allocate.c rtltypes.h
cause.o: cause.c
exhstack.o: exhstack.c rtltypes.h
exh.o: exh.c rtltypes.h
retmem.o: retmem.c
unhex.o: unhex.c
unhex1.o: unhex1.c
rtsdummy.o: rtsdummy.c rtltypes.h
terminate.o: terminate.c rtltypes.h
basicio.o: basicio.c fileio.h
chillstdio.o: chillstdio.c iomodes.h
delete.o: delete.c fileio.h
eoln.o: eoln.c fileio.h
existing.o: existing.c fileio.h
format.o: format.c bitstring.h auxtypes.h iomodes.h format.h fileio.h ioerror.h
getassoc.o: getassoc.c fileio.h
gettextaccess.o: gettextaccess.c fileio.h
gettextindex.o: gettextindex.c fileio.h
gettextrecord.o: gettextrecord.c fileio.h
getusage.o: getusage.c fileio.h
indexable.o: indexable.c fileio.h
ioerror.o: ioerror.c
isassociated.o: isassociated.c fileio.h
outoffile.o: outoffile.c fileio.h
readable.o: readable.c fileio.h
readrecord.o: readrecord.c fileio.h
sequencible.o: sequencible.c fileio.h
settextaccess.o: settextaccess.c fileio.h
settextindex.o: settextindex.c fileio.h
settextrecord.o: settextrecord.c fileio.h
variable.o: variable.c fileio.h
writeable.o: writeable.c fileio.h
writerecord.o: writerecord.c fileio.h
andps.o: andps.c powerset.h
cardps.o: cardps.c powerset.h
concatps.o: concatps.c powerset.h
copyps.o: copyps.c powerset.h
diffps.o: diffps.c powerset.h
eqps.o: eqps.c powerset.h
ffsetclrps.o: ffsetclrps.c powerset.h
ffsetps.o: ffsetps.c powerset.h
flsetclrps.o: flsetclrps.c powerset.h
flsetps.o: flsetps.c powerset.h
inbitstr.o: inbitstr.c powerset.h
inps.o: inps.c powerset.h
leps.o: leps.c powerset.h
ltps.o: ltps.c powerset.h
neps.o: neps.c powerset.h
notps.o: notps.c powerset.h
orps.o: orps.c powerset.h
setbitps.o: setbitps.c powerset.h
setbits.o: setbits.c powerset.h
sliceps.o: sliceps.c powerset.h
xorps.o: xorps.c powerset.h
concatstr.o: concatstr.c
eqstr.o: eqstr.c
ltstr.o: ltstr.c
memmove.o: memmove.c
abstime.o: abstime.c rtltypes.h
inttime.o: inttime.c
waituntil.o: waituntil.c rtltypes.h rts.h
remaintime.o: remaintime.c rts.h
convdurrtstime.o: convdurrtstime.c rts.h
checkcycle.o: checkcycle.c rtltypes.h rts.h
continue.o: continue.c rtltypes.h rts.h
delaycase.o: delaycase.c rtltypes.h rts.h
printbuffer.o: printbuffer.c rtltypes.h rts.h
printevent.o: printevent.c rtltypes.h rts.h
queuelength.o: queuelength.c rtltypes.h rts.h
sendbuffer.o: sendbuffer.c rtltypes.h rts.h
waitbuffer.o: waitbuffer.c rtltypes.h rts.h
$(PSOBJS): $(srcdir)/powerset.h
librmt.o: $(srcdir)/rtltypes.h
chillrt0.o: chillrt0.c $(srcdir)/rtltypes.h $(srcdir)/iomodes.h $(srcdir)/auxtypes.h
$(LIBOBJS1): $(srcdir)/rtltypes.h
$(TIMEOBJS): $(srcdir)/rtltypes.h $(srcdir)/rts.h
$(TASKOBJS): $(srcdir)/rts.h $(srcdir)/rtltypes.h
$(IOOBJS): $(srcdir)/fileio.h $(srcdir)/bitstring.h $(srcdir)/auxtypes.h \
$(srcdir)/iomodes.h $(srcdir)/format.h $(srcdir)/ioerror.h
# Flags to pass to a recursive make.
FLAGS_TO_PASS = \
"AR=$(AR)" \
"AR_FLAGS=$(AR_FLAGS)" \
"CC=$(CC)" \
"CFLAGS=$(CFLAGS)" \
"LIBCFLAGS=$(LIBCFLAGS)" \
"EXTRA_OFILES=$(EXTRA_OFILES)" \
"HDEFINES=$(HDEFINES)" \
"INSTALL=$(INSTALL)" \
"INSTALL_DATA=$(INSTALL_DATA)" \
"INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
"LDFLAGS=$(LDFLAGS)" \
"LOADLIBES=$(LOADLIBES)" \
"PICFLAG=$(PICFLAG)" \
"RANLIB=$(RANLIB)" \
"SHELL=$(SHELL)" \
"prefix=$(prefix)" \
"exec_prefix=$(exec_prefix)" \
"libdir=$(libdir)" \
"libsubdir=$(libsubdir)" \
"tooldir=$(tooldir)"
all: chillrt0.o libchill.a
@$(MULTIDO) $(FLAGS_TO_PASS) multi-do DO=all
Makefile: Makefile.in config.status
$(SHELL) config.status
config.status: configure
rm -f config.cache
CONFIG_SITE=no-such-file CC='$(CC)' AR='$(AR)' CFLAGS='$(CFLAGS)' \
CPPFLAGS='$(CPPFLAGS)' $(SHELL) config.status --recheck
${srcdir}/configure: configure.in
rm -f config.cache
cd ${srcdir} && autoconf
install: all
$(INSTALL_DATA) libchill.a $(libsubdir)$(MULTISUBDIR)/libchill.a.n
$(RANLIB) $(libsubdir)$(MULTISUBDIR)/libchill.a.n
mv $(libsubdir)$(MULTISUBDIR)/libchill.a.n $(libsubdir)$(MULTISUBDIR)/libchill.a
$(INSTALL_DATA) chillrt0.o $(libsubdir)$(MULTISUBDIR)/chillrt0.o
@rootme=`pwd`/ ; export rootme ; \
$(MULTIDO) $(FLAGS_TO_PASS) multi-do DO=install
check uninstall install-strip dist installcheck installdirs info install-info clean-info dvi:
mostlyclean:
rm -f *.o
@$(MULTICLEAN) multi-clean DO=mostlyclean
clean: mostlyclean
rm -f config.log libchill.a
@$(MULTICLEAN) multi-clean DO=clean
distclean: clean
@$(MULTICLEAN) multi-clean DO=distclean
rm -f config.cache config.status Makefile configure
maintainer-clean realclean: distclean
.PHONY: mostlyclean clean distclean maintainer-clean all check uninstall \
install-strip dist installcheck installdirs

View File

@ -1,139 +0,0 @@
/* Implement timing-related runtime actions for CHILL.
Copyright (C) 1992,1993 Free Software Foundation, Inc.
Author: Wilfried Moser
This file is part of GNU CC.
GNU CC 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 2, or (at your option)
any later version.
GNU CC 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 CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* As a special exception, if you link this library with other files,
some of which are compiled with GCC, to produce an executable,
this library does not by itself cause the resulting executable
to be covered by the GNU General Public License.
This exception does not however invalidate any other reasons why
the executable file might be covered by the GNU General Public License. */
#include <time.h>
#include "rtltypes.h"
EXCEPTION (rangefail);
#define SECOND_VALID 1
#define MINUTE_VALID 2
#define HOUR_VALID 4
#define DAY_VALID 8
#define MONTH_VALID 16
#define YEAR_VALID 32
extern void __cause_ex1 (char *ex, char *file, int lineno);
#define CAUSE_RANGEFAIL __cause_ex1 ("rangefail", filename, lineno)
/*
* function _abstime
*
* parameters:
* mask - mask of valid values
* year
* month
* day
* hour
* minute
* second
*
* returns:
* unsigned long
*
* exceptions:
* rangefail
*
* abstract:
* perform the ABSTIME builtin call
*
*/
unsigned long
_abstime (mask, year, month, day, hour, minute, second,
filename, lineno)
int mask, year, month, day, hour, minute, second;
char *filename;
int lineno;
{
struct tm *time_str;
time_t result, current_time;
/* first of all get current time */
if ((current_time = time (0)) == (time_t)-1)
/* FIXME: what excpetion ?? */
CAUSE_RANGEFAIL;
/* if we just have to determine the current time, we are ready.
This is shown by mask == 0. */
if (mask == 0)
return (unsigned long)current_time;
/* convert current time to struct tm */
time_str = localtime (&current_time);
if (mask & YEAR_VALID)
{
if (year < 1900)
CAUSE_RANGEFAIL;
time_str->tm_year = year - 1900;
}
if (mask & MONTH_VALID)
{
if (month < 1 || month > 12)
CAUSE_RANGEFAIL;
time_str->tm_mon = month - 1;
}
if (mask & DAY_VALID)
{
if (day < 1 || day > 31)
CAUSE_RANGEFAIL;
time_str->tm_mday = day;
}
if (mask & HOUR_VALID)
{
if (hour < 0 || hour > 23)
CAUSE_RANGEFAIL;
time_str->tm_hour = hour;
}
if (mask & MINUTE_VALID)
{
if (minute < 0 || minute > 59)
CAUSE_RANGEFAIL;
time_str->tm_min = minute;
}
if (mask & SECOND_VALID)
{
if (second < 0 || second > 59)
CAUSE_RANGEFAIL;
time_str->tm_sec = second;
}
/* do it */
time_str->tm_isdst = -1;
if ((result = mktime (time_str)) == (time_t)-1)
CAUSE_RANGEFAIL;
return (unsigned long)result;
}

View File

@ -1,68 +0,0 @@
/* Implement runtime actions for CHILL.
Copyright (C) 1992,1993 Free Software Foundation, Inc.
Author: Wilfried Moser
This file is part of GNU CC.
GNU CC 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 2, or (at your option)
any later version.
GNU CC 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 CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* As a special exception, if you link this library with other files,
some of which are compiled with GCC, to produce an executable,
this library does not by itself cause the resulting executable
to be covered by the GNU General Public License.
This exception does not however invalidate any other reasons why
the executable file might be covered by the GNU General Public License. */
#include <stdlib.h>
#include "rtltypes.h"
extern void __cause_ex1 (char *ex, char *filename, int lineno);
EXCEPTION (notimplemented);
/*
* function _allocate_global_memory
*
* parameters:
* ptr pointer to location where pointer should be written
* size number of bytes to allocate
* filename source file which issued the call
* linenumber line number of the call within that file
*
* returns:
* void
*
* exceptions:
* spacefail
* protectionfail
* rangefail
*
* abstract:
* allocate global memory. At the moment we dont know how to realize this,
* therefore cause NotImplemented.
*
*/
void
_allocate_global_memory (ptr, size, filename, linenumber)
void **ptr;
int size;
char *filename;
int linenumber;
{
__cause_ex1 ("notimplemented", filename, linenumber);
}

View File

@ -1,80 +0,0 @@
/* Implement runtime actions for CHILL.
Copyright (C) 1992,1993 Free Software Foundation, Inc.
Author: Wilfried Moser
This file is part of GNU CC.
GNU CC 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 2, or (at your option)
any later version.
GNU CC 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 CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* As a special exception, if you link this library with other files,
some of which are compiled with GCC, to produce an executable,
this library does not by itself cause the resulting executable
to be covered by the GNU General Public License.
This exception does not however invalidate any other reasons why
the executable file might be covered by the GNU General Public License. */
#define __CHILL_LIB__
#include <stdlib.h>
#include "rtltypes.h"
extern void __cause_ex1 (char *exname, char *file, int lineno);
/* define needed exceptions */
EXCEPTION (protectionfail);
EXCEPTION (rangefail);
EXCEPTION (spacefail);
/*
* function _allocate_memory
*
* parameters:
* ptr pointer to location where pointer should be written
* size number of bytes to allocate
* filename source file which issued the call
* linenumber line number within that source file
*
* returns:
* void
*
* exceptions:
* spacefail
* protectionfail
* rangefail
*
* abstract:
* allocate memory from heap
*
*/
void
_allocate_memory (ptr, size, filename, linenumber)
void **ptr;
int size;
char *filename;
int linenumber;
{
void *tmp;
if (!ptr)
__cause_ex1 ("protectionfail", filename, linenumber);
if (size < 0)
__cause_ex1 ("rangefail", filename, linenumber);
tmp = malloc (size);
if (!tmp)
__cause_ex1 ("spacefail", filename, linenumber);
*ptr = tmp;
}

View File

@ -1,74 +0,0 @@
/* Implement runtime actions for CHILL.
Copyright (C) 1992,1993 Free Software Foundation, Inc.
Author: Wilfried Moser
This file is part of GNU CC.
GNU CC 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 2, or (at your option)
any later version.
GNU CC 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 CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* As a special exception, if you link this library with other files,
some of which are compiled with GCC, to produce an executable,
this library does not by itself cause the resulting executable
to be covered by the GNU General Public License.
This exception does not however invalidate any other reasons why
the executable file might be covered by the GNU General Public License. */
#define __CHILL_LIB__
#include <stdlib.h>
#include "rtltypes.h"
extern void __cause_ex1 (char *exname, char *file, int lineno);
/* define needed exceptions */
EXCEPTION (allocatefail)
EXCEPTION (rangefail)
/*
* function __allocate
*
* parameters:
* size number of bytes to allocate
* filename source file which issued the call
* linenumber line number within that source file
*
* returns:
* void *
*
* exceptions:
* allocatefail
* rangefail
*
* abstract:
* allocate memory from heap
*
*/
void *
__allocate (size, filename, linenumber)
int size;
char *filename;
int linenumber;
{
void *tmp;
if (size < 0)
__cause_ex1 ("rangefail", filename, linenumber);
tmp = malloc (size);
if (!tmp)
__cause_ex1 ("allocatefail", filename, linenumber);
return tmp;
}

View File

@ -1,83 +0,0 @@
/* Implement POWERSET runtime actions for CHILL.
Copyright (C) 1992,1993 Free Software Foundation, Inc.
Author: Wilfried Moser, et al
This file is part of GNU CC.
GNU CC 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 2, or (at your option)
any later version.
GNU CC 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 CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* As a special exception, if you link this library with other files,
some of which are compiled with GCC, to produce an executable,
this library does not by itself cause the resulting executable
to be covered by the GNU General Public License.
This exception does not however invalidate any other reasons why
the executable file might be covered by the GNU General Public License. */
#define __CHILL_LIB__
#include <stdio.h>
#include "powerset.h"
/*
* function __andpowerset
*
* parameters:
* out return from __andpowerset
* left left powerset
* right right powerset
* bitlength length of powerset in bits
*
* returns:
* void
*
* exceptions:
* none
*
* abstract:
* and's two powersets
*
*/
void
__andpowerset (out, left, right, bitlength)
SET_WORD *out;
SET_WORD *left;
SET_WORD *right;
unsigned long bitlength;
{
if (bitlength <= SET_CHAR_SIZE)
{
*((SET_CHAR *)out) = *((SET_CHAR *)left) &
*((SET_CHAR *)right);
MASK_UNUSED_CHAR_BITS((SET_CHAR *)out, bitlength);
}
else if (bitlength <= SET_SHORT_SIZE)
{
*((SET_SHORT *)out) = *((SET_SHORT *)left) &
*((SET_SHORT *)right);
MASK_UNUSED_SHORT_BITS((SET_SHORT *)out, bitlength);
}
else
{
unsigned long len = BITS_TO_WORDS (bitlength);
register unsigned long i;
for (i = 0; i < len; i++)
out[i] = left[i] & right[i];
MASK_UNUSED_WORD_BITS ((out + len - 1),
bitlength % SET_WORD_SIZE);
}
}

View File

@ -1,53 +0,0 @@
/* Implement Input/Output runtime actions for CHILL.
Copyright (C) 1992,1993 Free Software Foundation, Inc.
Author: Wilfried Moser, et al
This file is part of GNU CC.
GNU CC 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 2, or (at your option)
any later version.
GNU CC 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 CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* As a special exception, if you link this library with other files,
some of which are compiled with GCC, to produce an executable,
this library does not by itself cause the resulting executable
to be covered by the GNU General Public License.
This exception does not however invalidate any other reasons why
the executable file might be covered by the GNU General Public License. */
#ifndef _auxtypes_h_
#define _auxtypes_h_
typedef enum { False, True } Boolean;
#define VARYING_STRING(strlen) \
struct { unsigned short len; char body[strlen]; }
typedef struct {
unsigned short len;
char body[1];
} VarString;
/* Macros for moving an (U)INT and (U)LONG without alignment worries */
#define MOV2(tgt,src) \
*((char*)(tgt) ) = *((char*)(src) ), \
*((char*)(tgt)+1) = *((char*)(src)+1)
#define MOV4(tgt,src) \
*((char*)(tgt) ) = *((char*)(src) ), \
*((char*)(tgt)+1) = *((char*)(src)+1), \
*((char*)(tgt)+2) = *((char*)(src)+2), \
*((char*)(tgt)+3) = *((char*)(src)+3)
#endif

View File

@ -1,483 +0,0 @@
/* Implement Input/Output runtime actions for CHILL.
Copyright (C) 1992,1993 Free Software Foundation, Inc.
Author: Wilfried Moser, et al
This file is part of GNU CC.
GNU CC 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 2, or (at your option)
any later version.
GNU CC 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 CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* As a special exception, if you link this library with other files,
some of which are compiled with GCC, to produce an executable,
this library does not by itself cause the resulting executable
to be covered by the GNU General Public License.
This exception does not however invalidate any other reasons why
the executable file might be covered by the GNU General Public License. */
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <fcntl.h>
#include <limits.h>
#include <errno.h>
#include <string.h>
#include <stdlib.h>
#include "fileio.h"
#ifndef PATH_MAX
# ifdef _POSIX_PATH_MAX
# define PATH_MAX _POSIX_PATH_MAX
# else
# ifdef MAXPATHLEN
# define PATH_MAX MAXPATHLEN
# else
# define PATH_MAX 1024
# endif
# endif
#endif
static
void
GetSetAttributes( Association_Mode* the_assoc )
{
struct stat statbuf;
int retco;
if( (retco = stat( the_assoc->pathname, &statbuf )) )
return;
if( S_ISREG(statbuf.st_mode) )
{
SET_FLAG( the_assoc, IO_EXISTING );
if( !TEST_FLAG( the_assoc, IO_VARIABLE ) )
SET_FLAG( the_assoc, IO_INDEXABLE );
}
else
if( S_ISCHR(statbuf.st_mode) || S_ISFIFO(statbuf.st_mode) )
{
SET_FLAG( the_assoc, IO_EXISTING );
CLR_FLAG( the_assoc, IO_INDEXABLE );
}
SET_FLAG( the_assoc, IO_SEQUENCIBLE );
/* FIXME: File size and computation of number of records for outoffile ? */
if( !access( the_assoc->pathname, R_OK ) )
SET_FLAG( the_assoc, IO_READABLE );
if( !access( the_assoc->pathname, W_OK ) )
SET_FLAG( the_assoc, IO_WRITEABLE );
}
static
void
makeName( Association_Mode* the_assoc, char* the_path, int the_path_len,
char* file, int line)
{
int namlen;
if( ! the_assoc->pathname &&
! (the_assoc->pathname = (char*)malloc( PATH_MAX )) )
CHILLEXCEPTION( file, line, SPACEFAIL, PATHNAME_ALLOC );
if( the_path[0] != DIRSEP )
{
if( !getcwd( the_assoc->pathname, PATH_MAX ) )
{
the_assoc->syserrno = errno;
CHILLEXCEPTION( file, line, ASSOCIATEFAIL, GETCWD_FAILS );
}
namlen = strlen( the_assoc->pathname );
the_assoc->pathname[namlen++] = DIRSEP;
}
else
namlen = 0;
strncpy( the_assoc->pathname + namlen, the_path, the_path_len );
the_assoc->pathname[namlen+the_path_len] = '\0';
}
/*
* ASSOCIATE
*/
/* Caution: returns an Association mode location (!) */
Association_Mode*
__associate( Association_Mode* the_assoc,
char* the_path,
int the_path_len,
char* the_mode,
int the_mode_len,
char* file,
int line )
{
if( !the_assoc )
CHILLEXCEPTION( file, line, EMPTY, NULL_ASSOCIATION );
if( TEST_FLAG(the_assoc, IO_ISASSOCIATED) )
CHILLEXCEPTION( file, line, ASSOCIATEFAIL, IS_ASSOCIATED );
/* clear all flags */
the_assoc->flags = 0;
if( ! the_path_len )
CHILLEXCEPTION( file, line, ASSOCIATEFAIL, NO_PATH_NAME );
makeName( the_assoc, the_path, the_path_len, file, line );
GetSetAttributes( the_assoc );
CLR_FLAG( the_assoc, IO_VARIABLE );
if ( the_mode )
{
if( !strncmp( the_mode, "VARIABLE", 8 ) )
{
SET_FLAG( the_assoc, IO_VARIABLE );
CLR_FLAG( the_assoc, IO_INDEXABLE );
}
else
if( strlen( the_mode ) )
CHILLEXCEPTION( file, line, ASSOCIATEFAIL, INVALID_ASSOCIATION_MODE );
}
SET_FLAG( the_assoc, IO_ISASSOCIATED );
return the_assoc;
}
/*
* DISSOCIATE
*/
void
__dissociate( Association_Mode* the_assoc, char* file, int line )
{
if( !the_assoc )
CHILLEXCEPTION( file, line, EMPTY, NULL_ASSOCIATION );
if( !TEST_FLAG( the_assoc, IO_ISASSOCIATED ) )
CHILLEXCEPTION( file, line, NOTASSOCIATED, IS_NOT_ASSOCIATED );
if( the_assoc->access )
__disconnect( the_assoc->access, file, line );
the_assoc->access = NULL;
CLR_FLAG( the_assoc, IO_ISASSOCIATED );
/* free allocated memory */
if (the_assoc->pathname)
{
free (the_assoc->pathname);
the_assoc->pathname = 0;
}
if (the_assoc->bufptr)
{
free (the_assoc->bufptr);
the_assoc->bufptr = 0;
}
}
/*
* CREATE
*/
void __create( Association_Mode* the_assoc, char* file, int line )
{
if( !the_assoc )
CHILLEXCEPTION( file, line, EMPTY, NULL_ASSOCIATION );
if( !TEST_FLAG( the_assoc, IO_ISASSOCIATED ) )
CHILLEXCEPTION( file, line, NOTASSOCIATED, IS_NOT_ASSOCIATED );
if( TEST_FLAG( the_assoc, IO_EXISTING ) )
CHILLEXCEPTION( file, line, CREATEFAIL, FILE_EXISTING );
if( (the_assoc->handle = open( the_assoc->pathname, O_CREAT+O_TRUNC+O_WRONLY, 0666 ))
== -1 )
CHILLEXCEPTION( file, line, CREATEFAIL, CREATE_FAILS );
the_assoc->usage = ReadWrite;
GetSetAttributes( the_assoc );
close( the_assoc->handle );
}
/*
* MODIFY
*/
void
__modify( Association_Mode* the_assoc,
char* the_path,
int the_path_len,
char* the_mode,
int the_mode_len,
char* file,
int line )
{
if( !the_assoc )
CHILLEXCEPTION( file, line, EMPTY, NULL_ASSOCIATION );
if( !TEST_FLAG( the_assoc, IO_ISASSOCIATED ) )
CHILLEXCEPTION( file, line, NOTASSOCIATED, IS_NOT_ASSOCIATED );
if( the_path_len )
{
char* oldname;
if( ! (oldname = (char*)malloc( PATH_MAX )) )
CHILLEXCEPTION( file, line, SPACEFAIL, PATHNAME_ALLOC );
strcpy( oldname, the_assoc->pathname );
makeName( the_assoc, the_path, the_path_len, file, line );
if( rename( oldname, the_assoc->pathname ) )
{
free( oldname );
CHILLEXCEPTION( file, line, MODIFYFAIL, RENAME_FAILS );
}
free( oldname );
}
else
{
/* FIXME: other options? */
}
}
static
/*** char* DirMode[] = { "rb", "r+b", "r+b" }; ***/
int DirMode[] = { O_RDONLY, O_RDWR, O_RDWR };
static
/*** char* SeqMode [] = { "rb", "r+b", "r+b" }; ***/
int SeqMode[] = { O_RDONLY, O_RDWR, O_RDWR };
/*
* CONNECT
*/
void
__connect( void* the_transfer,
Association_Mode* the_assoc,
Usage_Mode the_usage,
Where_Mode the_where,
Boolean with_index,
signed long the_index,
char* file,
int line )
{
Access_Mode* the_access;
off_t filepos;
off_t savepos;
char dummy;
unsigned long nbytes;
int oflag;
if( !the_transfer )
CHILLEXCEPTION( file, line, EMPTY, NULL_ACCESS );
if( !the_assoc )
CHILLEXCEPTION( file, line, EMPTY, NULL_ASSOCIATION );
if( TEST_FLAG((Text_Mode*)the_transfer, IO_TEXTLOCATION ))
{
if( ! ((Text_Mode*)the_transfer)->access_sub )
CHILLEXCEPTION( file, line, EMPTY, NO_ACCESS_SUBLOCATION );
the_access = ((Text_Mode*)the_transfer)->access_sub;
SET_FLAG( the_access, IO_TEXTIO );
}
else
{
the_access = (Access_Mode*)the_transfer;
CLR_FLAG( the_access, IO_TEXTIO );
}
/* FIXME: This should be an (implementation-dependent) static check
if( with_index && the_access->rectype > Fixed )
CHILLEXCEPTION( file, line, CONNECTFAIL, IMPL_RESTRICTION );
*/
if( ! TEST_FLAG(the_assoc, IO_ISASSOCIATED) )
CHILLEXCEPTION( file, line, NOTASSOCIATED, IS_NOT_ASSOCIATED );
if( ! TEST_FLAG( the_assoc, IO_EXISTING ) )
CHILLEXCEPTION( file, line, CONNECTFAIL, NOT_EXISTING );
if( ! TEST_FLAG( the_assoc, IO_READABLE ) &&
( the_usage = ReadOnly || the_usage == ReadWrite ) )
CHILLEXCEPTION( file, line, CONNECTFAIL, NOT_READABLE );
if( ! TEST_FLAG( the_assoc, IO_WRITEABLE ) &&
( the_usage = WriteOnly || the_usage == ReadWrite ) )
CHILLEXCEPTION( file, line, CONNECTFAIL, NOT_WRITEABLE );
if( ! TEST_FLAG( the_assoc, IO_INDEXABLE )
&& TEST_FLAG( the_access, IO_INDEXED ) )
CHILLEXCEPTION( file, line, CONNECTFAIL, NOT_INDEXABLE );
if( ! TEST_FLAG( the_assoc, IO_SEQUENCIBLE )
&& ! TEST_FLAG( the_access, IO_INDEXED ) )
CHILLEXCEPTION( file, line, CONNECTFAIL, NOT_SEQUENCIBLE );
if( the_where == Same && the_assoc->access == NULL )
CHILLEXCEPTION( file, line, CONNECTFAIL, NO_CURRENT_POS );
/* This dynamic condition is not checked for text connections. */
if( ! TEST_FLAG( the_access, IO_TEXTIO ) )
if( ! TEST_FLAG( the_assoc, IO_VARIABLE )
&& the_access->rectype > Fixed
&& ( the_usage == WriteOnly || the_usage == ReadWrite ) )
CHILLEXCEPTION( file, line, CONNECTFAIL, NOT_VARIABLE );
if( TEST_FLAG( the_assoc, IO_VARIABLE )
&& the_access->rectype == Fixed
&& ( the_usage == ReadOnly || the_usage == ReadWrite ) )
CHILLEXCEPTION( file, line, CONNECTFAIL, NOT_FIXED );
if( ! TEST_FLAG( the_access, IO_INDEXED ) && the_usage == ReadWrite )
CHILLEXCEPTION( file, line, CONNECTFAIL, NOT_INDEXED );
/* Access location may be connected to a different association. */
if( the_access->association && the_access->association != the_assoc )
__disconnect( the_access, file, line );
/* Is the association location already connected? */
if( the_assoc->access )
{
/* save position just in case we need it for the_where == Same */
if( (savepos = lseek( the_assoc->handle, 0L, SEEK_CUR )) == -1L )
CHILLEXCEPTION( file, line, CONNECTFAIL, LSEEK_FAILS );
/* text: read correction, flush buffer */
if( the_assoc->bufptr ){
savepos -= the_assoc->bufptr->len - the_assoc->bufptr->cur;
the_assoc->bufptr->len = the_assoc->bufptr->cur = 0;
}
/* implicit disconnect */
__disconnect( the_assoc->access, file, line );
}
the_assoc->usage = the_usage;
CLR_FLAG( the_access, IO_OUTOFFILE );
if( TEST_FLAG( the_access, IO_INDEXED ) )
{
if( (the_assoc->handle = open( the_assoc->pathname, DirMode[the_usage] )) == -1 )
CHILLEXCEPTION( file, line, CONNECTFAIL, OPEN_FAILS );
/* Set base index. */
switch( the_where )
{
case First:
filepos = 0;
break;
case Same:
filepos = savepos;
break;
case Last:
if( lseek( the_assoc->handle, 0L, SEEK_END ) == -1L )
CHILLEXCEPTION( file, line, CONNECTFAIL, LSEEK_FAILS );
filepos = lseek( the_assoc->handle, 0L, SEEK_CUR );
break;
}
/* Set current index */
if( with_index )
{
if( the_index < the_access->lowindex
|| the_access->highindex < the_index )
CHILLEXCEPTION( file, line, RANGEFAIL, BAD_INDEX );
filepos += (the_index - the_access->lowindex) * the_access->reclength;
}
if( lseek( the_assoc->handle, filepos, SEEK_SET ) == -1L )
CHILLEXCEPTION( file, line, CONNECTFAIL, LSEEK_FAILS );
the_access->base = filepos;
}
else
{
/* for association to text for reading: allocate buffer */
if( TEST_FLAG((Text_Mode*)the_transfer, IO_TEXTLOCATION ) &&
the_usage == ReadOnly &&
!the_assoc->bufptr )
{
if( ! (the_assoc->bufptr = (readbuf_t*)malloc( sizeof(readbuf_t) )) )
CHILLEXCEPTION( file, line, CONNECTFAIL, BUFFER_ALLOC );
memset (the_assoc->bufptr, 0, sizeof (readbuf_t));
}
if( (the_assoc->handle = open( the_assoc->pathname, SeqMode[the_usage] )) == -1 )
CHILLEXCEPTION( file, line, CONNECTFAIL, OPEN_FAILS );
/* Set base index. */
switch( the_where )
{
case First:
filepos = 0;
break;
case Same:
filepos = savepos;
break;
case Last:
if( lseek( the_assoc->handle, 0L, SEEK_END ) == -1L )
CHILLEXCEPTION( file, line, CONNECTFAIL, LSEEK_FAILS );
filepos = lseek( the_assoc->handle, 0L, SEEK_CUR );
break;
}
/* file truncation for sequential, Write Only */
/***************************** FIXME: cannot truncate at Same
if( the_usage == WriteOnly )
{
if( fseek( the_assoc->file_ptr, filepos, SEEK_SET ) == -1L )
CHILLEXCEPTION( file, line, CONNECTFAIL, FSEEK_FAILS );
fclose( the_assoc->file_ptr );
if( !(the_assoc->file_ptr = fopen( the_assoc->pathname, "ab" )) )
CHILLEXCEPTION( file, line, CONNECTFAIL, OPEN_FAILS );
}
else
***************************/
if( (filepos = lseek( the_assoc->handle, filepos, SEEK_SET )) == -1L )
CHILLEXCEPTION( file, line, CONNECTFAIL, LSEEK_FAILS );
}
the_access->association = the_assoc;
the_assoc->access = the_access;
/* for text: set carriage control default */
if( TEST_FLAG((Text_Mode*)the_transfer, IO_TEXTLOCATION ) ){
the_assoc->ctl_pre = '\0';
the_assoc->ctl_post = '\n';
}
}
void
__disconnect( void* the_transfer, char* file, int line )
{
Access_Mode* the_access;
if( !the_transfer )
CHILLEXCEPTION( file, line, EMPTY, NULL_ACCESS );
if( TEST_FLAG((Text_Mode*)the_transfer, IO_TEXTLOCATION ))
{
the_access = ((Text_Mode*)the_transfer)->access_sub;
CLR_FLAG( the_access, IO_TEXTIO );
}
else
the_access = (Access_Mode*)the_transfer;
if( !the_access->association )
CHILLEXCEPTION( file, line, NOTCONNECTED, IS_NOT_CONNECTED );
close( the_access->association->handle );
/* FIXME: check result */
if( the_access->store_loc )
free( the_access->store_loc );
the_access->store_loc = NULL;
the_access->association->access = NULL;
the_access->association = NULL;
}

View File

@ -1,37 +0,0 @@
/* Implement Input/Output runtime actions for CHILL.
Copyright (C) 1992,1993 Free Software Foundation, Inc.
Author: Wilfried Moser, et al
This file is part of GNU CC.
GNU CC 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 2, or (at your option)
any later version.
GNU CC 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 CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* As a special exception, if you link this library with other files,
some of which are compiled with GCC, to produce an executable,
this library does not by itself cause the resulting executable
to be covered by the GNU General Public License.
This exception does not however invalidate any other reasons why
the executable file might be covered by the GNU General Public License. */
#ifndef _bitstring_h_
#define _bitstring_h_
int __inpowerset( int i, char* string, int strlen, int dummy );
void __setbitpowerset (char *powerset, unsigned long bitlength,
long minval, long bitno, char newval,
char *filename, int lineno);
#endif

View File

@ -1,106 +0,0 @@
/* Implement POWERSET runtime actions for CHILL.
Copyright (C) 1992,1993 Free Software Foundation, Inc.
Author: Wilfried Moser, et al
This file is part of GNU CC.
GNU CC 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 2, or (at your option)
any later version.
GNU CC 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 CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* As a special exception, if you link this library with other files,
some of which are compiled with GCC, to produce an executable,
this library does not by itself cause the resulting executable
to be covered by the GNU General Public License.
This exception does not however invalidate any other reasons why
the executable file might be covered by the GNU General Public License. */
#define __CHILL_LIB__
#include <stdio.h>
#include "powerset.h"
/*
* function __cardpowerset
*
* parameters:
* ps powerset
* bitlength length of powerset
*
* returns:
* long number of set bits
*
* exceptions:
* none
*
* abstract:
* returns the number of set bit's in a powerset
*
*/
/* bit_count[I] is number of '1' bits in I. */
static
const unsigned char __four_bit_count[16] = {
0, 1, 1, 2,
1, 2, 2, 3,
1, 2, 2, 3,
2, 3, 3, 4 };
long
__cardpowerset (ps, bitlength)
SET_WORD *ps;
unsigned long bitlength;
{
unsigned long count = 0;
if (bitlength <= SET_CHAR_SIZE)
{
register SET_CHAR c = *((SET_CHAR *)ps);
/* count 4 bits at a time. */
while (c > 0)
{
count += __four_bit_count[c & 15];
c >>= 4;
}
return count;
}
else if (bitlength <= SET_SHORT_SIZE)
{
register SET_SHORT c = *((SET_SHORT *)ps);
/* count 4 bits at a time. */
while (c > 0)
{
count += __four_bit_count[c & 15];
c >>= 4;
}
return count;
}
else
{
register SET_WORD *p = ps;
SET_WORD *endp = p + BITS_TO_WORDS(bitlength);
while (p < endp)
{
register SET_WORD c = *p++;
/* count 4 bits at a time. */
while (c > 0)
{
count += __four_bit_count[c & 15];
c >>= 4;
}
}
return (count);
}
}

View File

@ -1,54 +0,0 @@
/* Implement runtime actions for CHILL.
Copyright (C) 1992,1993 Free Software Foundation, Inc.
Author: Wilfried Moser
This file is part of GNU CC.
GNU CC 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 2, or (at your option)
any later version.
GNU CC 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 CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* As a special exception, if you link this library with other files,
some of which are compiled with GCC, to produce an executable,
this library does not by itself cause the resulting executable
to be covered by the GNU General Public License.
This exception does not however invalidate any other reasons why
the executable file might be covered by the GNU General Public License. */
#define __CHILL_LIB__
/*
* function cause_exception
*
* parameters:
* exname exception name
* file file name
* lineno line number
* user_arg user specified argument
*
* returns:
* void
*
* abstract:
* dummy for ChillLib but may be overwritten by the user
*
*/
void
cause_exception (exname, file, lineno, user_arg)
char *exname;
char *file;
int lineno;
int user_arg;
{
}

View File

@ -1,73 +0,0 @@
/* Implement timing-related runtime actions for CHILL.
Copyright (C) 1992,1993 Free Software Foundation, Inc.
Author: Wilfried Moser
This file is part of GNU CC.
GNU CC 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 2, or (at your option)
any later version.
GNU CC 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 CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* As a special exception, if you link this library with other files,
some of which are compiled with GCC, to produce an executable,
this library does not by itself cause the resulting executable
to be covered by the GNU General Public License.
This exception does not however invalidate any other reasons why
the executable file might be covered by the GNU General Public License. */
#include "rtltypes.h"
#include "rts.h"
EXCEPTION (cyclefail);
/*
* function __check_cycle
*
* parameters:
* t pointer to initial time
* dur duration
* filename filename of call
* lineno linenumber of call
*
* returns:
* void
*
* exceptions:
* cyclefail
*
* abstract:
* Function checks if cycle is possible (there is time left) and wait the
* remaining time.
*
*/
extern int __remaintime (RtsTime *since, unsigned long dur, RtsTime *remain);
extern int __cause_ex1 (char *ex, char *file, int lineno);
void
__check_cycle (t, dur, fname, lineno)
RtsTime *t;
unsigned long dur;
char *fname;
int lineno;
{
RtsTime remain;
if (__remaintime (t, dur, &remain) != 0)
/* no time left -- cause exception */
__cause_ex1 ("cyclefail", fname, lineno);
/* delay the process */
__delay_this (wait_wait, &remain, fname, lineno);
}

View File

@ -1,155 +0,0 @@
/* Implement runtime actions for CHILL.
Copyright (C) 1992,1993 Free Software Foundation, Inc.
Author: Wilfried Moser
This file is part of GNU CC.
GNU CC 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 2, or (at your option)
any later version.
GNU CC 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 CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* As a special exception, if you link this library with other files,
some of which are compiled with GCC, to produce an executable,
this library does not by itself cause the resulting executable
to be covered by the GNU General Public License.
This exception does not however invalidate any other reasons why
the executable file might be covered by the GNU General Public License. */
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <string.h>
#include "rtltypes.h"
#include "iomodes.h"
/* type definitions */
typedef void (*init_ptr) ();
typedef void (*rts_init_ptr) (int *argc, char *argv []);
typedef struct INIT_LIST
{
init_ptr code;
struct INIT_LIST *forward;
} InitList;
InitList *_ch_init_list = 0;
/* force linker to get correct RTS functions */
extern rts_init_ptr __RTS_INIT__;
extern init_ptr __RTS_MAIN_LOOP__;
extern init_ptr __RTS_FETCH_NUMBERS__;
extern init_ptr __RTS_FETCH_NAMES__;
static init_ptr *rts_dummies[4] =
{
&__RTS_INIT__,
&__RTS_MAIN_LOOP__,
&__RTS_FETCH_NUMBERS__,
&__RTS_FETCH_NAMES__,
};
/* chill argc and argv */
int chill_argc = 0;
TVaryingCharType **chill_argv = NULL;
/* the program name for debugging purpose */
char *progname = 0;
extern void *__xmalloc_ ();
/*
* function __xrealloc_
*
* parameter:
* ptr pointer to reallocate
* size new number of bytes
*
* returns:
* void*
*
* abstract:
* This is the general reallocation routine for libchill
*
*/
void *
__xrealloc_ (ptr, size)
void *ptr;
int size;
{
void *tmp = realloc (ptr, size);
if (!tmp)
{
fprintf (stderr, "ChillLib: Out of heap space.\n");
fflush (stderr);
exit (ENOMEM);
}
return (tmp);
} /* __xrealloc_ */
static void
setup_argc_argv (argc, argv)
int argc;
char *argv[];
{
int i;
chill_argv = __xmalloc_ ((argc + 1) * sizeof (TVaryingCharType *));
for (i = 0; i < argc; i++)
{
chill_argv[i] = __xmalloc_ (sizeof (TVaryingCharType) + strlen (argv[i]) + 1);
chill_argv[i]->len = strlen (argv[i]);
strcpy (chill_argv[i]->body, argv[i]);
}
chill_argv[chill_argc = argc] = NULL;
if ((progname = strrchr (argv[0], '/')) == 0)
progname = argv[0];
else
progname++;
} /* setup_argc_argv */
extern void __setexceptionStack ();
/*--------- main entry for each CHILL - program ----------*/
int
main (argc, argv)
int argc;
char *argv [];
{
/* call look up for tasking */
(*__RTS_INIT__) (&argc, argv);
/* setup argc and argv */
setup_argc_argv (argc, argv);
/* clear exception stack */
__setexceptionStack (0);
/* now call code at module level */
while (_ch_init_list)
{
if (_ch_init_list->code)
(*(_ch_init_list->code)) ();
_ch_init_list = _ch_init_list->forward;
}
/* if we have rts linked, something will be done, else just return */
(*__RTS_MAIN_LOOP__) ();
return (0);
} /* main */

View File

@ -1,218 +0,0 @@
/* Implement runtime actions for CHILL.
Copyright (C) 1992,1993 Free Software Foundation, Inc.
Author: Wilfried Moser
This file is part of GNU CC.
GNU CC 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 2, or (at your option)
any later version.
GNU CC 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 CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* As a special exception, if you link this library with other files,
some of which are compiled with GCC, to produce an executable,
this library does not by itself cause the resulting executable
to be covered by the GNU General Public License.
This exception does not however invalidate any other reasons why
the executable file might be covered by the GNU General Public License. */
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <string.h>
#include "iomodes.h"
/* predefined associations, accesses, and text for stdin, stdout, stderr */
/* stdin */
#define STDIO_TEXT_LENGTH 1024
#define STDIN_TEXT_LENGTH STDIO_TEXT_LENGTH
static Access_Mode stdin_access;
#ifndef STDIN_FILENO
#define STDIN_FILENO 0
#endif
static
Association_Mode stdin_association =
{
IO_EXISTING | IO_READABLE | IO_SEQUENCIBLE | IO_ISASSOCIATED,
NULL,
&stdin_access,
STDIN_FILENO,
NULL,
0,
ReadOnly
};
static Access_Mode stdin_access =
{
IO_TEXTIO,
STDIN_TEXT_LENGTH + 2,
0,
0,
&stdin_association,
0,
NULL,
VaryingChars
};
static
VARYING_STRING(STDIN_TEXT_LENGTH) stdin_text_record;
Text_Mode chill_stdin =
{
IO_TEXTLOCATION,
(VarString *)&stdin_text_record,
&stdin_access,
0
};
/* stdout */
#define STDOUT_TEXT_LENGTH STDIO_TEXT_LENGTH
#ifndef STDOUT_FILENO
#define STDOUT_FILENO 1
#endif
static Access_Mode stdout_access;
static
Association_Mode stdout_association =
{
IO_EXISTING | IO_WRITEABLE | IO_SEQUENCIBLE | IO_ISASSOCIATED,
NULL,
&stdout_access,
STDOUT_FILENO,
NULL,
0,
WriteOnly
};
static Access_Mode stdout_access =
{
IO_TEXTIO,
STDOUT_TEXT_LENGTH + 2,
0,
0,
&stdout_association,
0,
NULL,
VaryingChars
};
static
VARYING_STRING(STDOUT_TEXT_LENGTH) stdout_text_record;
Text_Mode chill_stdout =
{
IO_TEXTLOCATION,
(VarString *)&stdout_text_record,
&stdout_access,
0
};
/* stderr */
#define STDERR_TEXT_LENGTH STDIO_TEXT_LENGTH
#ifndef STDERR_FILENO
#define STDERR_FILENO 2
#endif
static Access_Mode stderr_access;
static
Association_Mode stderr_association =
{
IO_EXISTING | IO_WRITEABLE | IO_SEQUENCIBLE | IO_ISASSOCIATED,
NULL,
&stderr_access,
STDERR_FILENO,
NULL,
0,
WriteOnly
};
static Access_Mode stderr_access =
{
IO_TEXTIO,
STDERR_TEXT_LENGTH + 2,
0,
0,
&stderr_association,
0,
NULL,
VaryingChars
};
static
VARYING_STRING(STDIN_TEXT_LENGTH) stderr_text_record;
Text_Mode chill_stderr =
{
IO_TEXTLOCATION,
(VarString *)&stderr_text_record,
&stderr_access,
0
};
/*
* function __xmalloc_
*
* parameter:
* size number of bytes to allocate
*
* returns:
* void*
*
* abstract:
* This is the general allocation routine for libchill
*
*/
void *
__xmalloc_ (size)
int size;
{
void *tmp = malloc (size);
if (!tmp)
{
fprintf (stderr, "ChillLib: Out of heap space.\n");
fflush (stderr);
exit (ENOMEM);
}
return (tmp);
} /* __xmalloc_ */
static char *
newstring (char *str)
{
char *tmp = __xmalloc_ (strlen (str) + 1);
strcpy (tmp, str);
return tmp;
}
static void setup_stdinout (void) __attribute__((constructor));
static void
setup_stdinout ()
{
/* allocate the names */
stdin_association.pathname = newstring ("stdin");
stdout_association.pathname = newstring ("stdout");
stderr_association.pathname = newstring ("stderr");
/* stdin needs a readbuffer */
stdin_association.bufptr = __xmalloc_ (sizeof (readbuf_t));
memset (stdin_association.bufptr, 0, sizeof (readbuf_t));
}

View File

@ -1,101 +0,0 @@
/* Implement powerset-related runtime actions for CHILL.
Copyright (C) 1992, 93, 1994 Free Software Foundation, Inc.
Author: Bill Cox
This file is part of GNU CC.
GNU CC 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 2, or (at your option)
any later version.
GNU CC 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 CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* As a special exception, if you link this library with other files,
some of which are compiled with GCC, to produce an executable,
this library does not by itself cause the resulting executable
to be covered by the GNU General Public License.
This exception does not however invalidate any other reasons why
the executable file might be covered by the GNU General Public License. */
#define __CHILL_LIB__
#include "powerset.h"
extern void cause_exception (char *exname, char *file, int lineno);
/*
* function __concatps
*
* parameters:
* OUT - pointer to output PS
* LEFT - pointer to left PS
* LEFTLEN - length of left PS in bits
* RIGHT - pointer to right PS
* RIGHTLEN - length of right PS in bits
*
* returns:
* void
*
* exceptions:
* none
*
* abstract:
* concatenates two powersets into the output powerset.
*
*/
extern void
__pscpy (SET_WORD *dps,
unsigned long dbl,
unsigned long doffset,
SET_WORD *sps,
unsigned long sbl,
unsigned long start,
unsigned long length);
void
__concatps (out, left, leftlen, right, rightlen)
SET_WORD *out;
SET_WORD *left;
unsigned long leftlen;
SET_WORD *right;
unsigned long rightlen;
{
/* allocated sizes for each set involved */
unsigned long outall, leftall, rightall;
if (!out)
{
/* FIXME: cause an exception */
}
else if (leftlen == 0 || !left)
{
if (rightlen == 0 || !right)
return; /* no work to do */
__pscpy (out, rightlen, (unsigned long)0,
right, rightlen, (unsigned long)0, rightlen);
}
else if (rightlen == 0 || !right)
{
if (leftlen == 0 || !left)
return; /* no work to do */
__pscpy (out, leftlen, (unsigned long)0,
left, leftlen, (unsigned long)0, leftlen);
}
/* copy the left powerset into bits 0..leftlen - 1 */
__pscpy (out, leftlen + rightlen, (unsigned long)0,
left, leftlen, (unsigned long)0, leftlen);
/* copy the right powerset into bits leftlen..leftlen+rightlen-1 */
__pscpy (out, leftlen + rightlen, leftlen,
right, rightlen, (unsigned long)0, rightlen);
}

View File

@ -1,80 +0,0 @@
/* Implement string-related runtime actions for CHILL.
Copyright (C) 1992,1993,2000 Free Software Foundation, Inc.
Author: Bill Cox
This file is part of GNU CC.
GNU CC 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 2, or (at your option)
any later version.
GNU CC 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 CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* As a special exception, if you link this library with other files,
some of which are compiled with GCC, to produce an executable,
this library does not by itself cause the resulting executable
to be covered by the GNU General Public License.
This exception does not however invalidate any other reasons why
the executable file might be covered by the GNU General Public License. */
#include <stdlib.h>
#include <string.h>
#define MIN(a, b) ((a) < (b) ? (a) : (b))
extern void cause_exception (char *exname, char *file, int lineno);
/*
* function __concatstring
*
* parameters:
* OUT - pointer to output string
* S1 - pointer to left string
* LEN1 - length of left string
* S2 - pointer to right string
* LEN2 - length of right string
*
* returns:
* pointer to OUT string
*
* exceptions:
* none
*
* abstract:
* concatenates two character strings into the output string
*
*/
char *
__concatstring (out, s1, len1, s2, len2)
char *out, *s1;
int len1;
char *s2;
int len2;
{
if (out)
{
if (s2 /* Check for overlap between s2 and out. */
&& ((s2 >= out && s2 < (out + len1 + len2))
|| (s2 + len2 > out && s2 <= out + len1)))
{
char *tmp = alloca (len2);
memcpy (tmp, s2, len2);
s2 = tmp;
}
if (s1)
memmove (out, s1, len1);
if (s2)
memcpy (&out[len1], s2, len2);
}
return out;
}

1686
libchill/configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -1,162 +0,0 @@
# Process this file with autoconf to produce a configure script.
# Copyright (C) 1995, 1997, 1998, 1999 Free Software Foundation, Inc.
# Contributed by Dave Love (d.love@dl.ac.uk).
#
#This file is part of GNU CC.
#
#GNU CHILL 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 2, or (at your option)
#any later version.
#
#GNU CHILL 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 CHILL; see the file COPYING. If not, write to
#the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#02111-1307, USA.
AC_PREREQ(2.13)
AC_INIT(chillrt0.c)
if test "${srcdir}" = "." ; then
if test "${with_target_subdir}" != "." ; then
topsrcdir=${with_multisrctop}../..
else
topsrcdir=${with_multisrctop}..
fi
else
topsrcdir=${srcdir}/..
fi
dnl This is needed for a multilibbed build in the source tree so
dnl that install-sh and config.sub get found.
AC_CONFIG_AUX_DIR($topsrcdir)
# If the language specific compiler does not exist, but the "gcc" directory
# does, we do not build anything. Note, $r is set by the top-level Makefile.
# Note that when we look for the compiler, we search both with and without
# extension to handle cross and canadian cross builds.
compiler_name=cc1chill
rm -f skip-this-dir
AC_MSG_CHECKING(if compiler $compiler_name has been built)
AC_CACHE_VAL(chill_cv_compiler_exists,
[chill_cv_compiler_exists=yes
if test -n "$r"; then
if test -d "$r"/gcc; then
if test -f "$r"/gcc/$compiler_name \
|| test -f "$r"/gcc/$compiler_name.exe; then
true
else
chill_cv_compiler_exists=no
echo "rm -f config.cache config.log multilib.out" > skip-this-dir
fi
fi
fi
])
AC_MSG_RESULT($chill_cv_compiler_exists)
if test x$chill_cv_compiler_exists = xno
then
rm -f Makefile conftest* confdefs* core
exit 0
fi
dnl Checks for programs.
# For chill we'll set CC to point at the built gcc, but this will get it into
# the makefiles
AC_PROG_CC
test "$AR" || AR=ar
AC_SUBST(AR)
if test "$RANLIB"; then :
AC_SUBST(RANLIB)
else
AC_PROG_RANLIB
fi
AC_PROG_MAKE_SET
dnl Checks for libraries.
dnl Checks for header files.
# Sanity check for the cross-compilation case:
AC_CHECK_HEADER(stdio.h,:,
[AC_MSG_ERROR([Can't find stdio.h.
You must have a usable C system for the target already installed, at least
including headers and, preferably, the library, before you can configure
the Chill runtime system. If necessary, install gcc now with \`LANGUAGES=c',
then the target library, then build with \`LANGUAGES=chill'.])])
AC_HEADER_STDC
AC_MSG_CHECKING(for posix)
AC_CACHE_VAL(chill_cv_header_posix,
AC_EGREP_CPP(yes,
[#include <sys/types.h>
#include <unistd.h>
#ifdef _POSIX_VERSION
yes
#endif
],
chill_cv_header_posix=yes,
chill_cv_header_posix=no))
AC_MSG_RESULT($chill_cv_header_posix)
# We can rely on the GNU library being posix-ish. I guess checking the
# header isn't actually like checking the functions, though...
AC_MSG_CHECKING(for GNU library)
AC_CACHE_VAL(chill_cv_lib_gnu,
AC_EGREP_CPP(yes,
[#include <stdio.h>
#ifdef __GNU_LIBRARY__
yes
#endif
],
chill_cv_lib_gnu=yes, chill_cv_lib_gnu=no))
AC_MSG_RESULT($chill_cv_lib_gnu)
dnl Checks for library functions.
AC_TYPE_SIGNAL
# we'll get atexit by default
if test $ac_cv_header_stdc != yes; then
AC_CHECK_FUNC(atexit,
AC_DEFINE(onexit,atexit),dnl just in case
[AC_DEFINE(NO_ONEXIT)
AC_CHECK_FUNC(onexit,,
[AC_CHECK_FUNC(on_exit,
AC_DEFINE(onexit,on_exit),)])])
else true
fi
AC_CHECK_FUNC(memmove,
MEMMOVE_O='',
MEMMOVE_O=memmove.o)
AC_SUBST(MEMMOVE_O)
# We need multilib support, but only if configuring for the target.
AC_OUTPUT(Makefile,
[test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h
if test -n "$CONFIG_FILES"; then
if test -n "${with_target_subdir}"; then
# FIXME: We shouldn't need to set ac_file
ac_file=Makefile
. ${topsrcdir}/config-ml.in
fi
fi],
srcdir=${srcdir}
host=${host}
target=${target}
with_target_subdir=${with_target_subdir}
with_multisubdir=${with_multisubdir}
ac_configure_args="--enable-multilib ${ac_configure_args}"
CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
topsrcdir=${topsrcdir}
)
dnl Local Variables:
dnl comment-start: "dnl "
dnl comment-end: ""
dnl comment-start-skip: "\\bdnl\\b\\s *"
dnl End:

View File

@ -1,91 +0,0 @@
/* Implement tasking-related runtime actions for CHILL.
Copyright (C) 1992,1993 Free Software Foundation, Inc.
Author: Wilfried Moser
This file is part of GNU CC.
GNU CC 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 2, or (at your option)
any later version.
GNU CC 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 CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* As a special exception, if you link this library with other files,
some of which are compiled with GCC, to produce an executable,
this library does not by itself cause the resulting executable
to be covered by the GNU General Public License.
This exception does not however invalidate any other reasons why
the executable file might be covered by the GNU General Public License. */
#include "rtltypes.h"
#include "rts.h"
/*
* function __continue
*
* parameters:
* evaddr pointer to Eventlocation
* filename source file name where function gets called
* lineno linenumber in source file
*
* returns:
* void
*
* exceptions:
* none
*
* abstract:
* implement the CHILL CONTINUE action.
*/
void
__continue (evaddr, filename, lineno)
Event_Queue **evaddr;
char *filename;
int lineno;
{
Event_Queue *ev = *evaddr;
Event_Queue *wrk;
if (ev == 0)
/* nothing to do */
return;
/* search for 1st one is not already continued */
while (ev && ev->is_continued)
ev = ev->forward;
if (!ev)
/* all have been continued in that queue, do nothing */
return;
wrk = ev->startlist;
while (wrk)
{
Event_Queue *tmp = (Event_Queue *)wrk->listhead;
while (tmp->forward != wrk)
tmp = tmp->forward;
tmp->forward = wrk->forward;
wrk = wrk->chain;
}
/* so far so good, continue this one */
ev->is_continued = 1;
ev->who_continued = THIS;
/* tell the runtime system to activate the process */
__continue_that (ev->this, ev->priority, filename, lineno);
}
/* force function print_event to be linked */
extern void __print_event ();
static EntryPoint pev = __print_event;

View File

@ -1,60 +0,0 @@
/* Implement timing-related runtime actions for CHILL.
Copyright (C) 1992,1993 Free Software Foundation, Inc.
Author: Wilfried Moser
This file is part of GNU CC.
GNU CC 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 2, or (at your option)
any later version.
GNU CC 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 CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* As a special exception, if you link this library with other files,
some of which are compiled with GCC, to produce an executable,
this library does not by itself cause the resulting executable
to be covered by the GNU General Public License.
This exception does not however invalidate any other reasons why
the executable file might be covered by the GNU General Public License. */
#include "rts.h"
/*
* function __convert_duration_rtstime
*
* parameters:
* dur the duration value
* t pointer to the duration value converted to RtsTime
*
* returns:
* void
*
* exceptions:
* none
*
* abstract:
* converts a duration value (unsigned long in millisecs) to RtsTime
* format.
*
*/
void
__convert_duration_rtstime (dur, t)
unsigned long dur;
RtsTime *t;
{
unsigned long tmp;
t->secs = dur / 1000;
tmp = dur - (t->secs * 1000);
t->nanosecs = tmp * 1000000;
}

View File

@ -1,118 +0,0 @@
/* Implement POWERSET runtime actions for CHILL.
Copyright (C) 1992,1993 Free Software Foundation, Inc.
Author: Wilfried Moser, et al
This file is part of GNU CC.
GNU CC 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 2, or (at your option)
any later version.
GNU CC 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 CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* As a special exception, if you link this library with other files,
some of which are compiled with GCC, to produce an executable,
this library does not by itself cause the resulting executable
to be covered by the GNU General Public License.
This exception does not however invalidate any other reasons why
the executable file might be covered by the GNU General Public License. */
#define __CHILL_LIB__
#include <stdio.h>
#include "powerset.h"
/*
* function __powerset_copy
* This is more general than __psslice, since it
* can be told where in the destination powerset (DOFFSET
* parameter) to start storing the slice.
*
* parameters:
* dps dest powerset
* dbl destination bit length
* doffset offset bit number (zero origin)
* sps sourcepowerset
* sbl source powerset length in bits
* start starting bit number
* end ending bit number
*
* exceptions:
* none
*
* abstract:
* Extract into a powerset a slice of another powerset.
*
*/
void
__pscpy (dps, dbl, doffset, sps, sbl, start, length)
SET_WORD *dps;
unsigned long dbl;
unsigned long doffset;
const SET_WORD*sps;
unsigned long sbl;
unsigned long start;
unsigned long length;
{
unsigned long end = start + length - 1;
unsigned long src, dst;
/* assert end >= start;
assert end - start + 1 <= dbl;
assert "the sets don't overlap in memory" */
/* assert doffset >= 0 and < dbl */
for (src = start, dst = doffset; src <= end; src++, dst++)
{
char tmp;
if (sbl <= SET_CHAR_SIZE) /* fetch a bit */
tmp = GET_BIT_IN_CHAR (*((SET_CHAR *)sps), src);
else if (sbl <= SET_SHORT_SIZE)
tmp = GET_BIT_IN_SHORT (*((SET_SHORT *)sps), src);
else
tmp = GET_BIT_IN_WORD (sps[src / SET_WORD_SIZE], src % SET_WORD_SIZE);
if (tmp & 1)
{
if (dbl <= SET_CHAR_SIZE) /* store a 1-bit */
SET_BIT_IN_CHAR (*((SET_CHAR *)dps), dst);
else if (dbl <= SET_SHORT_SIZE)
SET_BIT_IN_SHORT (*((SET_SHORT *)dps), dst);
else
SET_BIT_IN_WORD (dps[dst / SET_WORD_SIZE], dst % SET_WORD_SIZE);
}
else
{
if (dbl <= SET_CHAR_SIZE) /* store a 0-bit */
CLEAR_BIT_IN_CHAR (*((SET_CHAR *)dps), dst);
else if (dbl <= SET_SHORT_SIZE)
CLEAR_BIT_IN_SHORT (*((SET_SHORT *)dps), dst);
else
CLEAR_BIT_IN_WORD (dps[dst / SET_WORD_SIZE], dst % SET_WORD_SIZE);
}
}
if (dbl <= SET_CHAR_SIZE) /* clear unused bits in output bitstring */
{
MASK_UNUSED_CHAR_BITS ((SET_CHAR *)dps, dbl);
}
else if (dbl <= SET_SHORT_SIZE)
{
MASK_UNUSED_SHORT_BITS ((SET_SHORT *)dps, dbl);
}
else
{
MASK_UNUSED_WORD_BITS ((SET_WORD *)(dps + (dbl/SET_WORD_SIZE)),
dbl % SET_WORD_SIZE);
}
}

View File

@ -1,229 +0,0 @@
/* Implement tasking-related runtime actions for CHILL.
Copyright (C) 1992,1993 Free Software Foundation, Inc.
Author: Wilfried Moser
This file is part of GNU CC.
GNU CC 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 2, or (at your option)
any later version.
GNU CC 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 CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* As a special exception, if you link this library with other files,
some of which are compiled with GCC, to produce an executable,
this library does not by itself cause the resulting executable
to be covered by the GNU General Public License.
This exception does not however invalidate any other reasons why
the executable file might be covered by the GNU General Public License. */
#include <string.h>
#include "rtltypes.h"
#include "rts.h"
extern void __cause_ex1 (char *ex, char *file, int lineno);
EXCEPTION (delayfail);
#define CAUSE_DELAYFAIL __cause_ex1 ("delayfail", filename, lineno)
EXCEPTION (notyetimplemented);
#define CAUSE_NOTIMPLEMENTED __cause_ex1 ("notyetimplemeyed", filename, lineno)
/*
* function __delay_event
*
* parameters:
* ev_got pointer to location where to write the event got.
* nevents number of events in list
* evptrs array of event descriptors
* priority specified priority
* insloc pointer to resulting instance location
* to timeout value
* filename filename of caller
* lineno linenumber of caller
*
* returns:
* int 0 .. success
* 1 .. timed out
*
* exceptions:
* delayfail
*
* abstract:
* implement the CHILL DELAY and DELAY CASE actions.
*
*/
int
__delay_event (ev_got, nevents, evptrs, priority, to, insloc, filename, lineno)
void **ev_got;
int nevents;
Event_Descr *evptrs;
int priority;
void *to;
INSTANCE *insloc;
char *filename;
int lineno;
{
int i, already_done = 0;
Event_Queue *start_list = 0;
Event_Queue **retval = 0;
Event_Queue *wrk;
int timed_out = 0;
/* check if all specified event queues have enough space left
to perform the delay */
for (i = 0; i < nevents; i++)
{
Event_Queue *e;
unsigned long cnt = 0;
int j, have_done = 0;
if (evptrs[i].maxqueuelength == 0)
CAUSE_DELAYFAIL;
else if (evptrs[i].maxqueuelength == (unsigned long)-1L)
/* infinite length */
continue;
/* check if we already have processed this one, that means, this
event is mentioned more than once */
for (j = 0; j < i; j++)
{
if (evptrs[i].ev == evptrs[j].ev)
{
have_done = 1;
break;
}
}
if (have_done)
continue;
memcpy (&e, evptrs[i].ev, sizeof (Event_Queue *));
while (e)
{
cnt++;
e = e->forward;
}
if (cnt >= evptrs[i].maxqueuelength)
CAUSE_DELAYFAIL;
}
for (i = 0; i < nevents; i++)
{
/* queue that stuff on each event */
Event_Queue *wrk;
Event_Queue *ev;
Event_Queue *prev_queue_entry = 0;
Event_Queue *prev_list_entry;
int j, have_done = 0;
/* check for this event already processed */
for (j = 0; j < i; j++)
{
if (evptrs[i].ev == evptrs[j].ev)
{
have_done = 1;
break;
}
}
if (have_done)
continue;
memcpy (&ev, &evptrs[i].ev, sizeof (Event_Queue *));
MALLOC (wrk, sizeof (Event_Queue));
memset (wrk, 0, sizeof (Event_Queue));
wrk->priority = priority;
wrk->this = THIS;
wrk->listhead = evptrs[i].ev;
/* search for the place to queue this entry in */
while (ev->forward != 0 && ev->priority >= priority)
{
prev_queue_entry = ev;
ev = ev->forward;
}
/* ready to put entry into queue */
if (ev->forward == 0 || prev_queue_entry == 0)
{
/* beginning or end of the list */
wrk->forward = ev->forward;
ev->forward = wrk;
}
else
{
/* this is somewhere in the middle */
wrk->forward = prev_queue_entry->forward;
prev_queue_entry->forward = wrk;
}
/* queue it into list */
wrk->startlist = start_list;
if (! start_list)
{
/* we are the first in the list */
start_list = wrk;
prev_list_entry = wrk;
wrk->startlist = start_list;
}
else
{
prev_list_entry->chain = wrk;
prev_list_entry = wrk;
}
}
/* tell runtime system to delay that process */
timed_out = __delay_this (wait_event_delay, to, filename, lineno);
if (timed_out)
{
/* we have to remove the entries from the queue's */
wrk = start_list;
while (wrk)
{
Event_Queue *tmp = (Event_Queue *)wrk->listhead;
while (tmp->forward != wrk)
tmp = tmp->forward;
tmp->forward = wrk->forward;
wrk = wrk->chain;
}
}
wrk = start_list;
while (wrk)
{
Event_Queue *tmp;
if (wrk->is_continued && ! already_done)
{
already_done = 1;
retval = wrk->listhead;
if (insloc && !timed_out)
{
insloc->ptype = wrk->who_continued.ptype;
insloc->pcopy = wrk->who_continued.pcopy;
}
}
tmp = wrk->chain;
FREE (wrk);
wrk = tmp;
}
if (!timed_out && ev_got)
*ev_got = (void *)retval;
return timed_out;
}
/* force function print_event to be linked */
extern void __print_event ();
static EntryPoint pev = __print_event;

View File

@ -1,50 +0,0 @@
/* Implement Input/Output runtime actions for CHILL.
Copyright (C) 1992,1993 Free Software Foundation, Inc.
Author: Wilfried Moser, et al
This file is part of GNU CC.
GNU CC 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 2, or (at your option)
any later version.
GNU CC 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 CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* As a special exception, if you link this library with other files,
some of which are compiled with GCC, to produce an executable,
this library does not by itself cause the resulting executable
to be covered by the GNU General Public License.
This exception does not however invalidate any other reasons why
the executable file might be covered by the GNU General Public License. */
#include <unistd.h>
#include "fileio.h"
void __delete( Association_Mode* the_assoc, char* file, int line )
{
if( !the_assoc )
CHILLEXCEPTION( file, line, EMPTY, NULL_ASSOCIATION );
if( !TEST_FLAG( the_assoc, IO_ISASSOCIATED ) )
CHILLEXCEPTION( file, line, NOTASSOCIATED, IS_NOT_ASSOCIATED );
/* forced dissociate */
if( the_assoc->access )
__disconnect( the_assoc->access, file, line );
/* delete */
if( unlink( the_assoc->pathname ) )
CHILLEXCEPTION( file, line, DELETEFAIL, DELETE_FAILS );
CLR_FLAG( the_assoc, IO_EXISTING );
}

View File

@ -1,81 +0,0 @@
/* Implement POWERSET runtime actions for CHILL.
Copyright (C) 1992,1993 Free Software Foundation, Inc.
Author: Wilfried Moser, et al
This file is part of GNU CC.
GNU CC 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 2, or (at your option)
any later version.
GNU CC 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 CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* As a special exception, if you link this library with other files,
some of which are compiled with GCC, to produce an executable,
this library does not by itself cause the resulting executable
to be covered by the GNU General Public License.
This exception does not however invalidate any other reasons why
the executable file might be covered by the GNU General Public License. */
#define __CHILL_LIB__
#include <stdio.h>
#include "powerset.h"
/*
* function __diffpowerset
*
* parameters:
* out result of __diffpowerset
* left powerset
* right powerset
* bitlength length of powerset
*
* returns:
* void
*
* exceptions:
* none
*
* abstract:
* makes a difference of 2 powersets (out = left - right)
*
*/
void
__diffpowerset (out, left, right, bitlength)
SET_WORD *out;
SET_WORD *left;
SET_WORD *right;
unsigned long bitlength;
{
if (bitlength <= SET_CHAR_SIZE)
{
*((SET_CHAR *)out) = *((SET_CHAR *)left) & ~
*((SET_CHAR *)right);
MASK_UNUSED_CHAR_BITS ((SET_CHAR *)out, bitlength);
}
else if (bitlength <= SET_SHORT_SIZE)
{
*((SET_SHORT *)out) = *((SET_SHORT *)left) & ~
*((SET_SHORT *)right);
MASK_UNUSED_SHORT_BITS ((SET_SHORT *)out, bitlength);
}
else
{
unsigned long len = BITS_TO_WORDS(bitlength);
register unsigned long i;
for (i = 0; i < len; i++)
out[i] = left[i] & ~right[i];
MASK_UNUSED_WORD_BITS ((out + len - 1), bitlength % SET_WORD_SIZE);
}
}

View File

@ -1,38 +0,0 @@
/* Implement Input/Output runtime actions for CHILL.
Copyright (C) 1992,1993 Free Software Foundation, Inc.
Author: Wilfried Moser, et al
This file is part of GNU CC.
GNU CC 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 2, or (at your option)
any later version.
GNU CC 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 CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* As a special exception, if you link this library with other files,
some of which are compiled with GCC, to produce an executable,
this library does not by itself cause the resulting executable
to be covered by the GNU General Public License.
This exception does not however invalidate any other reasons why
the executable file might be covered by the GNU General Public License. */
#include "fileio.h"
Boolean
__eoln( Text_Mode* the_text, char* file, int line )
{
if( !the_text )
CHILLEXCEPTION( file, line, EMPTY, NULL_TEXT );
return the_text->actual_index == the_text->access_sub->reclength - 2;
}

View File

@ -1,74 +0,0 @@
/* Implement POWERSET runtime actions for CHILL.
Copyright (C) 1992,1993 Free Software Foundation, Inc.
Author: Wilfried Moser, et al
This file is part of GNU CC.
GNU CC 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 2, or (at your option)
any later version.
GNU CC 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 CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* As a special exception, if you link this library with other files,
some of which are compiled with GCC, to produce an executable,
this library does not by itself cause the resulting executable
to be covered by the GNU General Public License.
This exception does not however invalidate any other reasons why
the executable file might be covered by the GNU General Public License. */
#define __CHILL_LIB__
#include <stdio.h>
#include "powerset.h"
/*
* function __eqpowerset
*
* parameters:
* left left powerset
* right right powerset
* bitlength length of powerset in bits
*
* returns:
* 1 if powersets are equal, bit for bit
*
* exceptions:
* none
*
* abstract:
* compares two powersets for equality
*
*/
int
__eqpowerset (left, right, bitlength)
SET_WORD *left;
SET_WORD *right;
unsigned long bitlength;
{
{
SET_WORD c;
register unsigned long i;
unsigned long len = bitlength / SET_WORD_SIZE;
for (i = 0; i < len; i++) /* a word-oriented memcmp */
if (left[i] != right[i])
return 0;
/* do the last (possibly partial) word */
bitlength %= SET_WORD_SIZE;
if (bitlength == 0)
return 1;
c = left[i] ^ right[i];
MASK_UNUSED_WORD_BITS (&c, bitlength);
return (c == 0) ? 1 : 0;
}
}

View File

@ -1,64 +0,0 @@
/* Implement string-related runtime actions for CHILL.
Copyright (C) 1992,1993 Free Software Foundation, Inc.
Author: Bill Cox
This file is part of GNU CC.
GNU CC 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 2, or (at your option)
any later version.
GNU CC 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 CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* As a special exception, if you link this library with other files,
some of which are compiled with GCC, to produce an executable,
this library does not by itself cause the resulting executable
to be covered by the GNU General Public License.
This exception does not however invalidate any other reasons why
the executable file might be covered by the GNU General Public License. */
#include <string.h>
extern void cause_exception (char *exname, char *file, int lineno);
/*
* function __eqstring
*
* parameters:
* S1 - pointer to left string
* LEN1 - length of left string
* S2 - pointer to right string
* LEN2 - length of right string
*
* returns:
* 1 if strings equal, 0 if not
*
* exceptions:
* none
*
* abstract:
* compares two character strings for equality
*
*/
int
__eqstring (s1, len1, s2, len2)
char *s1;
int len1;
char *s2;
int len2;
{
if (len1 != len2)
return 0;
return ! memcmp (s1, s2, len1);
}

View File

@ -1,162 +0,0 @@
/* Implement runtime actions for CHILL.
Copyright (C) 1992,1993 Free Software Foundation, Inc.
Author: Wilfried Moser
This file is part of GNU CC.
GNU CC 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 2, or (at your option)
any later version.
GNU CC 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 CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* As a special exception, if you link this library with other files,
some of which are compiled with GCC, to produce an executable,
this library does not by itself cause the resulting executable
to be covered by the GNU General Public License.
This exception does not however invalidate any other reasons why
the executable file might be covered by the GNU General Public License. */
#define __CHILL_LIB__
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <setjmp.h>
#include "rtltypes.h"
extern void cause_exception (char *exname, char *file, int lineno, int user_arg);
extern void unhandled_exception (char *exname, char *file, int lineno, int user_arg);
/* An action with a handler:
BODY ON (e1, e2): H12; (e3): H3; ELSE HE; END;
is translated into:
struct __ch_handler __tmp;
static struct __ch_handler_excepts _H[4] =
{
{ <<e1>>, 1 },
{ <<e2>>, 1 },
{ <<e3>>, 2 },
{ __ch_else_except, 3 },
};
__ch_link_handler(&__tmp);
__tmp.handlers = _H;
switch (setmp(&__tmp.jbuf))
{
case 0: BODY; __ch_unlink_handler(&__tmp); break;
case 1: H12; break;
case 2: H3; break;
case 3: HE; break;
}
*/
/* this part contains all neccessary functions to handle exceptions in CHILL */
/* These two trivial function aren't inlines, to allow for
more flexibility (e.g. a per-thread exception stack). */
extern void __setexceptionStack (TExceptionHandlerStack *new);
extern TExceptionHandlerStack * __getexceptionStack (void);
void
__ch_link_handler (handler)
struct __ch_handler *handler;
{
handler->prev = __getexceptionStack ();
__setexceptionStack (handler);
}
void
__ch_unlink_handler (handler)
struct __ch_handler *handler;
{
__setexceptionStack (handler->prev);
}
/*
* function __cause_exception
*
* parameters:
* exnum name string of exception to raise
* file filename of CAUSE statement
* lineno linenumber of CAUSE statement
* user_arg user specified argument
*
* returns:
* never leave function with longjmp or abort
*
* abstract:
* search exceptionstack for last handler of caused exception,
* call userdefined function to signal exception,
* jump to handler with longjmp or call unhandled_exception
*
*/
void
__cause_exception (ex, file, lineno, user_arg)
char *ex;
char *file;
int lineno;
int user_arg;
{
register struct __ch_handler *handler = __getexceptionStack();
/* call user defined cause function */
cause_exception (ex, file, lineno, user_arg);
for ( ; handler != NULL; handler = handler->prev)
{
register struct __ch_handled_excepts *list = handler->handlers;
for ( ; list->code != 0; list++ )
{
if (list->ex == __ch_else_except || EX_EQ(list->ex, ex)) /* found */
{
__setexceptionStack (handler->prev);
longjmp(handler->jbuf, list->code);
}
}
}
/* no handler found -- call unhandled_exception */
unhandled_exception (ex, file, lineno, user_arg);
abort ();
}
/*
* function __cause_ex1
*
* parameters:
* exnum name string of exception to raise
* file filename of CAUSE statement
* lineno linenumber of CAUSE statement
*
* returns:
* never leave function with longjmp or abort
*
* abstract:
* This is the function the compiler generated code calls.
* Search exceptionstack for last handler of caused exception,
* call userdefined function to signal exception,
* jump to handler with longjmp or call unhandled_exception
*
*/
void
__cause_ex1 (ex, file, lineno)
char *ex;
char *file;
int lineno;
{
__cause_exception (ex, file, lineno, 0);
}

View File

@ -1,47 +0,0 @@
/* Implement runtime actions for CHILL.
Copyright (C) 1992,1993 Free Software Foundation, Inc.
Author: Wilfried Moser
This file is part of GNU CC.
GNU CC 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 2, or (at your option)
any later version.
GNU CC 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 CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* As a special exception, if you link this library with other files,
some of which are compiled with GCC, to produce an executable,
this library does not by itself cause the resulting executable
to be covered by the GNU General Public License.
This exception does not however invalidate any other reasons why
the executable file might be covered by the GNU General Public License. */
#define __CHILL_LIB__
#include <setjmp.h>
#include "rtltypes.h"
typedef void (*init_ptr) ();
typedef int * tasking_ptr;
static TExceptionHandlerStack *__exceptionStack;
TExceptionHandlerStack * __getexceptionStack ()
{
return __exceptionStack;
}
void __setexceptionStack (TExceptionHandlerStack *new)
{
__exceptionStack = new;
}

View File

@ -1,39 +0,0 @@
/* Implement Input/Output runtime actions for CHILL.
Copyright (C) 1992,1993 Free Software Foundation, Inc.
Author: Wilfried Moser, et al
This file is part of GNU CC.
GNU CC 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 2, or (at your option)
any later version.
GNU CC 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 CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* As a special exception, if you link this library with other files,
some of which are compiled with GCC, to produce an executable,
this library does not by itself cause the resulting executable
to be covered by the GNU General Public License.
This exception does not however invalidate any other reasons why
the executable file might be covered by the GNU General Public License. */
#include "fileio.h"
Boolean
__existing( Association_Mode* the_assoc, char* file, int line )
{
if( !the_assoc )
CHILLEXCEPTION( file, line, EMPTY, NULL_ASSOCIATION );
if( !TEST_FLAG(the_assoc, IO_ISASSOCIATED) )
CHILLEXCEPTION( file, line, NOTASSOCIATED, IS_NOT_ASSOCIATED );
return TEST_FLAG(the_assoc, IO_EXISTING ) ? True : False;
}

View File

@ -1,92 +0,0 @@
/* Implement POWERSET runtime actions for CHILL.
Copyright (C) 1992,1993 Free Software Foundation, Inc.
Author: Wilfried Moser, et al
This file is part of GNU CC.
GNU CC 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 2, or (at your option)
any later version.
GNU CC 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 CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* As a special exception, if you link this library with other files,
some of which are compiled with GCC, to produce an executable,
this library does not by itself cause the resulting executable
to be covered by the GNU General Public License.
This exception does not however invalidate any other reasons why
the executable file might be covered by the GNU General Public License. */
#define __CHILL_LIB__
#include <stdio.h>
#include "powerset.h"
/*
* function __ffsetclrpowerset
*
* parameters:
* ps powerset
* bitlength length of powerset
*
* returns:
* int -1 .. nothing found
* >=0 .. index of first true bit found
* exceptions:
* none
*/
int
__ffsetclrpowerset (ps, bitlength, first_bit)
SET_WORD *ps;
unsigned long bitlength;
int first_bit;
{
register int bitno;
if (first_bit >= bitlength)
return -1;
{
unsigned int words_to_skip = (unsigned) first_bit / SET_WORD_SIZE;
unsigned long cnt = words_to_skip * SET_WORD_SIZE;
SET_WORD *p = ps + words_to_skip;
SET_WORD *endp = ps + BITS_TO_WORDS(bitlength);
SET_WORD c;
first_bit = (unsigned) first_bit % (unsigned) SET_WORD_SIZE;
c = *p++;
if (c)
{
for (bitno = first_bit; bitno < SET_WORD_SIZE; bitno++)
if (GET_BIT_IN_WORD(c, bitno))
goto found;
}
cnt += SET_WORD_SIZE;
while (p < endp)
{
if ((c = *p++))
{
/* found a bit set .. calculate which */
for (bitno = 0; bitno < SET_WORD_SIZE; bitno++)
if (GET_BIT_IN_WORD(c, bitno))
goto found;
}
cnt += SET_WORD_SIZE;
}
return -1;
found:
bitno += cnt;
return bitno >= bitlength ? -1 : bitno;
}
}

View File

@ -1,116 +0,0 @@
/* Implement POWERSET runtime actions for CHILL.
Copyright (C) 1992,1993 Free Software Foundation, Inc.
Author: Wilfried Moser, et al
This file is part of GNU CC.
GNU CC 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 2, or (at your option)
any later version.
GNU CC 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 CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* As a special exception, if you link this library with other files,
some of which are compiled with GCC, to produce an executable,
this library does not by itself cause the resulting executable
to be covered by the GNU General Public License.
This exception does not however invalidate any other reasons why
the executable file might be covered by the GNU General Public License. */
#define __CHILL_LIB__
#include <stdio.h>
#include "powerset.h"
extern void __cause_ex1 (char *exname, char *file, int lineno);
/*
* function __ffsetpowerset
*
* parameters:
* ps powerset
* bitlength length of powerset
* minval set low bound
* filename caller's file name
* lineno caller's line number
*
* returns:
* int enum value of lowest member of powerset
*
* exceptions:
* "empty" if the set is empty
*
* abstract:
* Find first bit set in a powerset and return the corresponding value.
*
*/
long
__ffsetpowerset (ps, bitlength, minval, filename, lineno)
SET_WORD *ps;
unsigned long bitlength;
long minval;
char *filename;
int lineno;
{
unsigned long bitno;
if (bitlength <= SET_CHAR_SIZE)
{
SET_CHAR cset = *((SET_CHAR *)ps);
if (cset != 0)
{
/* found a bit set .. calculate which */
for (bitno = 0; bitno < SET_CHAR_SIZE; bitno++)
if (GET_BIT_IN_CHAR (cset, bitno))
break;
/* return its index */
return bitno + minval;
}
}
else if (bitlength <= SET_SHORT_SIZE)
{
SET_SHORT sset = *((SET_SHORT *)ps);
if (sset != 0)
{
/* found a bit set .. calculate which */
for (bitno = 0; bitno < SET_SHORT_SIZE; bitno++)
if (GET_BIT_IN_SHORT (sset, bitno))
break;
/* return its index */
return bitno + minval;
}
}
else /* set composed of array of one or more WORDs */
{
SET_WORD *p = ps;
SET_WORD *endp = ps + BITS_TO_WORDS(bitlength);
unsigned long cnt;
/* FIXME: bitorder problems? */
for (cnt = 0; p < endp; p++, cnt += SET_WORD_SIZE)
{
SET_WORD c = *p;
if (c)
{
/* found a bit set .. calculate which */
for (bitno = 0; bitno < SET_WORD_SIZE; bitno++)
if (GET_BIT_IN_WORD (c, bitno))
break;
/* return its index */
return cnt + bitno + minval;
}
}
}
/* no bits found - raise exception */
__cause_ex1 ("empty", filename, lineno);
}

View File

@ -1,161 +0,0 @@
/* Implement Input/Output runtime actions for CHILL.
Copyright (C) 1992,1993 Free Software Foundation, Inc.
Author: Wilfried Moser, et al
This file is part of GNU CC.
GNU CC 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 2, or (at your option)
any later version.
GNU CC 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 CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* As a special exception, if you link this library with other files,
some of which are compiled with GCC, to produce an executable,
this library does not by itself cause the resulting executable
to be covered by the GNU General Public License.
This exception does not however invalidate any other reasons why
the executable file might be covered by the GNU General Public License. */
#ifndef _fileio_h_
#define _fileio_h_
#include <stdio.h>
#include "auxtypes.h"
#include "ioerror.h"
#include "iomodes.h"
#define DIRSEP '/'
#define TEST_FLAG(Xloc,Flag) (((Xloc)->flags) & (Flag))
#define SET_FLAG(Xloc,Flag) (Xloc)->flags |= (Flag)
#define CLR_FLAG(Xloc,Flag) (Xloc)->flags = ((Xloc)->flags & ~(Flag))
Boolean
__isassociated( Association_Mode* the_assoc, char* file, int line );
Boolean
__existing( Association_Mode* the_assoc, char* file, int line );
Boolean
__readable( Association_Mode* the_assoc, char* file, int line );
Boolean
__writeable( Association_Mode* the_assoc, char* file, int line );
Boolean
__indexable( Association_Mode* the_assoc, char* file, int line );
Boolean
__sequencible( Association_Mode* the_assoc, char* file, int line );
Boolean
__variable( Association_Mode* the_assoc, char* file, int line );
typedef signed long int Index_t;
Association_Mode*
__associate( Association_Mode* the_assoc,
char* the_path,
int the_path_len,
char* the_mode,
int the_mode_len,
char* file,
int line );
void
__dissociate( Association_Mode* the_assoc, char* file, int line );
void
__create( Association_Mode* the_assoc, char* file, int line );
void
__delete( Association_Mode* the_assoc, char* file, int line );
void
__modify( Association_Mode* the_assoc,
char* the_path,
int the_path_len,
char* the_mode,
int the_mode_len,
char* file,
int line );
void
__connect( void* the_transfer,
Association_Mode* the_assoc,
Usage_Mode the_usage,
Where_Mode the_where,
Boolean with_index,
signed long the_index,
char* file,
int line );
void
__disconnect( void* the_transfer, char* file, int line );
Association_Mode*
__getassociation( void* the_transfer, char* file, int line );
Usage_Mode
__getusage( void* the_transfer, char* file, int line );
Boolean
__outoffile( void* the_transfer, char* file, int line );
void*
__readrecord( Access_Mode* the_access,
signed long the_index,
char* the_buf_addr,
char* file,
int line );
void
__writerecord( Access_Mode* the_access,
signed long the_index,
char* the_val_addr,
unsigned long the_val_len,
char* file,
int line );
VarString*
__gettextrecord( Text_Mode* the_text, char* file, int line );
unsigned long
__gettextindex( Text_Mode* the_text, char* file, int line );
Access_Mode*
__gettextaccess( Text_Mode* the_text, char* file, int line );
Boolean
__eoln( Text_Mode* the_text, char* file, int line );
void
__settextrecord( Text_Mode* the_text,
VarString* the_text_rec,
char* file,
int line );
void
__settextindex( Text_Mode* the_text,
signed long the_text_index,
char* file,
int line );
void
__settextaccess( Text_Mode* the_text,
Access_Mode* the_access,
char* file,
int line );
#endif

View File

@ -1,89 +0,0 @@
/* Implement POWERSET runtime actions for CHILL.
Copyright (C) 1992,1993 Free Software Foundation, Inc.
Author: Wilfried Moser, et al
This file is part of GNU CC.
GNU CC 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 2, or (at your option)
any later version.
GNU CC 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 CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* As a special exception, if you link this library with other files,
some of which are compiled with GCC, to produce an executable,
this library does not by itself cause the resulting executable
to be covered by the GNU General Public License.
This exception does not however invalidate any other reasons why
the executable file might be covered by the GNU General Public License. */
#define __CHILL_LIB__
#include <stdio.h>
#include "powerset.h"
/*
* function __flsetclrpowerset
*
* parameters:
* ps powerset
* bitlength length of powerset
*
* returns:
* int -1 .. nothing found
* >= 0 .. index of last set bit
* exceptions:
* none
*
* abstract:
* Find last bit set in a powerset and return the corresponding value
* in *out and clear this bit. Return 0 for no more found, else 1.
*
*/
int
__flsetclrpowerset (ps, bitlength, first_bit)
SET_WORD *ps;
unsigned long bitlength;
int first_bit;
{
register int bitno;
{
SET_WORD *p, c;
bitno = bitlength - 1;
if (bitno < first_bit)
return -1;
p = &ps[(unsigned) bitno / SET_WORD_SIZE];
c = *p;
if (((unsigned) bitlength % SET_WORD_SIZE) != 0)
MASK_UNUSED_WORD_BITS(&c, (unsigned) bitlength % SET_WORD_SIZE);
if (c)
goto found;
else
bitno -= ((unsigned) bitno % SET_WORD_SIZE) + 1;
while (bitno >= first_bit)
{
c = *--p;
if (c)
goto found;
bitno -= SET_WORD_SIZE;
}
return -1;
found:
for (; bitno >= first_bit; bitno--)
{
if (GET_BIT_IN_WORD (c, (unsigned) bitno % SET_WORD_SIZE))
return bitno;
}
return -1;
}
}

View File

@ -1,114 +0,0 @@
/* Implement POWERSET runtime actions for CHILL.
Copyright (C) 1992,1993 Free Software Foundation, Inc.
Author: Wilfried Moser, et al
This file is part of GNU CC.
GNU CC 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 2, or (at your option)
any later version.
GNU CC 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 CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* As a special exception, if you link this library with other files,
some of which are compiled with GCC, to produce an executable,
this library does not by itself cause the resulting executable
to be covered by the GNU General Public License.
This exception does not however invalidate any other reasons why
the executable file might be covered by the GNU General Public License. */
#define __CHILL_LIB__
#include <stdio.h>
#include "powerset.h"
extern void __cause_ex1 (char *exname, char *file, int lineno);
/*
* function __flsetpowerset
*
* parameters:
* ps powerset
* bitlength length of powerset
* minval set low bound
* filename caller's file name
* lineno caller's line number
*
* returns:
* int largest enumeration value
* exceptions:
* "empty" if set is empty
*
* abstract:
* Find last bit set in a powerset and return the corresponding value.
*
*/
long
__flsetpowerset (ps, bitlength, minval, filename, lineno)
SET_WORD *ps;
unsigned long bitlength;
long minval;
char *filename;
int lineno;
{
unsigned long bitno;
if (bitlength <= SET_CHAR_SIZE)
{
SET_CHAR cset = *((SET_CHAR *)ps);
if (cset != 0)
{
/* found a bit set .. calculate which */
for (bitno = SET_CHAR_SIZE; bitno >= 1; bitno--)
if (GET_BIT_IN_CHAR (cset, bitno - 1))
break;
/* return its index */
return bitno + minval - 1;
}
}
else if (bitlength <= SET_SHORT_SIZE)
{
SET_SHORT sset = *((SET_SHORT *)ps);
if (sset != 0)
{
/* found a bit set .. calculate which */
for (bitno = SET_SHORT_SIZE; bitno >= 1; bitno--)
if (GET_BIT_IN_SHORT (sset, bitno - 1))
break;
/* return its index */
return bitno + minval - 1;
}
}
else /* set composed of array of one or more WORDs */
{
SET_WORD *endp = ps;
SET_WORD *p = ps + BITS_TO_WORDS(bitlength) - 1;
unsigned long cnt;
/* FIXME: bitorder problems? */
for (cnt = ((bitlength - 1) / SET_WORD_SIZE) * SET_WORD_SIZE;
p >= endp; p--, cnt -= SET_WORD_SIZE)
{
SET_WORD c = *p;
if (c)
{
/* found a bit set .. calculate which */
for (bitno = SET_WORD_SIZE; bitno >= 1; bitno--)
if (GET_BIT_IN_WORD (c, bitno - 1))
break;
return cnt + bitno + minval - 1;
}
}
}
/* no bits found - raise exception */
__cause_ex1 ("empty", filename, lineno);
}

File diff suppressed because it is too large Load Diff

View File

@ -1,79 +0,0 @@
/* Implement Input/Output runtime actions for CHILL.
Copyright (C) 1992,1993 Free Software Foundation, Inc.
Author: Wilfried Moser, et al
This file is part of GNU CC.
GNU CC 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 2, or (at your option)
any later version.
GNU CC 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 CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* As a special exception, if you link this library with other files,
some of which are compiled with GCC, to produce an executable,
this library does not by itself cause the resulting executable
to be covered by the GNU General Public License.
This exception does not however invalidate any other reasons why
the executable file might be covered by the GNU General Public License. */
#ifndef _format_h_
#define _format_h_
#include "iomodes.h"
#include "fileio.h"
extern Text_Mode __stdin_text;
extern Text_Mode __stdout_text;
extern Text_Mode __stderr_text;
void
__readtext_f( Text_Mode* TextLoc,
signed long Index,
char* fmtptr,
int fmtlen,
__tmp_IO_list* ioptr,
int iolen,
char* file,
int line );
void
__readtext_s( void* string_ptr,
int string_len,
char* fmtptr,
int fmtlen,
__tmp_IO_list* ioptr,
int iolen,
char* file,
int line );
void
__writetext_f( Text_Mode* Text_Loc,
signed long Index,
char* fmtptr,
int fmtlen,
__tmp_IO_list* ioptr,
int iolen,
char* file,
int line );
void
__writetext_s( void* string_ptr,
int string_len,
char* fmtptr,
int fmtlen,
__tmp_IO_list* ioptr,
int iolen,
char* file,
int line );
#endif _format_h_

View File

@ -1,45 +0,0 @@
/* Implement Input/Output runtime actions for CHILL.
Copyright (C) 1992,1993 Free Software Foundation, Inc.
Author: Wilfried Moser, et al
This file is part of GNU CC.
GNU CC 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 2, or (at your option)
any later version.
GNU CC 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 CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* As a special exception, if you link this library with other files,
some of which are compiled with GCC, to produce an executable,
this library does not by itself cause the resulting executable
to be covered by the GNU General Public License.
This exception does not however invalidate any other reasons why
the executable file might be covered by the GNU General Public License. */
#include "fileio.h"
Association_Mode*
__getassociation( void* the_transfer, char* file, int line )
{
Access_Mode* the_access;
if( !the_transfer )
CHILLEXCEPTION( file, line, EMPTY, NULL_ACCESS );
if( TEST_FLAG((Text_Mode*)the_transfer, IO_TEXTLOCATION ))
the_access = ((Text_Mode*)the_transfer)->access_sub;
else
the_access = (Access_Mode*)the_transfer;
return the_access->association;
}

View File

@ -1,39 +0,0 @@
/* Implement Input/Output runtime actions for CHILL.
Copyright (C) 1992,1993 Free Software Foundation, Inc.
Author: Wilfried Moser, et al
This file is part of GNU CC.
GNU CC 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 2, or (at your option)
any later version.
GNU CC 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 CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* As a special exception, if you link this library with other files,
some of which are compiled with GCC, to produce an executable,
this library does not by itself cause the resulting executable
to be covered by the GNU General Public License.
This exception does not however invalidate any other reasons why
the executable file might be covered by the GNU General Public License. */
#include "fileio.h"
Access_Mode*
__gettextaccess( Text_Mode* the_text, char* file, int line )
{
if( !the_text )
CHILLEXCEPTION( file, line, EMPTY, NULL_TEXT );
return the_text->access_sub;
}

View File

@ -1,38 +0,0 @@
/* Implement Input/Output runtime actions for CHILL.
Copyright (C) 1992,1993 Free Software Foundation, Inc.
Author: Wilfried Moser, et al
This file is part of GNU CC.
GNU CC 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 2, or (at your option)
any later version.
GNU CC 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 CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* As a special exception, if you link this library with other files,
some of which are compiled with GCC, to produce an executable,
this library does not by itself cause the resulting executable
to be covered by the GNU General Public License.
This exception does not however invalidate any other reasons why
the executable file might be covered by the GNU General Public License. */
#include "fileio.h"
unsigned long
__gettextindex( Text_Mode* the_text, char* file, int line )
{
if( !the_text )
CHILLEXCEPTION( file, line, EMPTY, NULL_TEXT );
return the_text->actual_index;
}

View File

@ -1,38 +0,0 @@
/* Implement Input/Output runtime actions for CHILL.
Copyright (C) 1992,1993 Free Software Foundation, Inc.
Author: Wilfried Moser, et al
This file is part of GNU CC.
GNU CC 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 2, or (at your option)
any later version.
GNU CC 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 CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* As a special exception, if you link this library with other files,
some of which are compiled with GCC, to produce an executable,
this library does not by itself cause the resulting executable
to be covered by the GNU General Public License.
This exception does not however invalidate any other reasons why
the executable file might be covered by the GNU General Public License. */
#include "fileio.h"
VarString*
__gettextrecord( Text_Mode* the_text, char* file, int line )
{
if( !the_text )
CHILLEXCEPTION( file, line, EMPTY, NULL_TEXT );
return the_text->text_record;
}

View File

@ -1,48 +0,0 @@
/* Implement Input/Output runtime actions for CHILL.
Copyright (C) 1992,1993 Free Software Foundation, Inc.
Author: Wilfried Moser, et al
This file is part of GNU CC.
GNU CC 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 2, or (at your option)
any later version.
GNU CC 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 CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* As a special exception, if you link this library with other files,
some of which are compiled with GCC, to produce an executable,
this library does not by itself cause the resulting executable
to be covered by the GNU General Public License.
This exception does not however invalidate any other reasons why
the executable file might be covered by the GNU General Public License. */
#include "fileio.h"
Usage_Mode
__getusage( void* the_transfer, char* file, int line )
{
Access_Mode* the_access;
if( !the_transfer )
CHILLEXCEPTION( file, line, EMPTY, NULL_ACCESS );
if( TEST_FLAG((Text_Mode*)the_transfer, IO_TEXTLOCATION ))
the_access = ((Text_Mode*)the_transfer)->access_sub;
else
the_access = (Access_Mode*)the_transfer;
if( !the_access->association )
CHILLEXCEPTION( file, line, NOTCONNECTED, IS_NOT_CONNECTED );
return the_access->association->usage;
}

View File

@ -1,81 +0,0 @@
/* Implement POWERSET runtime actions for CHILL.
Copyright (C) 1992,1993 Free Software Foundation, Inc.
Author: Wilfried Moser, et al
This file is part of GNU CC.
GNU CC 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 2, or (at your option)
any later version.
GNU CC 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 CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* As a special exception, if you link this library with other files,
some of which are compiled with GCC, to produce an executable,
this library does not by itself cause the resulting executable
to be covered by the GNU General Public License.
This exception does not however invalidate any other reasons why
the executable file might be covered by the GNU General Public License. */
#define __CHILL_LIB__
#include <stdio.h>
#include "powerset.h"
extern void __cause_ex1 (char *exname, char *file, int lineno);
/*
* function __inbitstring
*
* parameters:
* bitno bit number within set
* powerset the powerset
* bitlength length of powerset in bits
* minval number of lowest bit stored
* fname filename of caller
* lineno linenumber of caller
*
* returns:
* int 1 .. found
* 0 .. not found
*
* exceptions:
* rangefail
*
* abstract:
* checks if a given value is included in a bitstring
*
*/
int
__inbitstring (bitno, powerset, bitlength, minval, fname, lineno)
unsigned long bitno;
SET_WORD *powerset;
unsigned long bitlength;
long minval;
char *fname;
int lineno;
{
if (powerset == NULL
|| bitno < minval
|| (bitno - minval) >= bitlength)
__cause_ex1 ("rangefail", fname, lineno);
bitno -= minval;
if (bitlength <= SET_CHAR_SIZE)
return GET_BIT_IN_CHAR (*((SET_CHAR *)powerset), bitno);
else if (bitlength <= SET_SHORT_SIZE)
return GET_BIT_IN_SHORT (*((SET_SHORT *)powerset), bitno);
else
return GET_BIT_IN_WORD (powerset[bitno / SET_WORD_SIZE],
bitno % SET_WORD_SIZE);
}

View File

@ -1,39 +0,0 @@
/* Implement Input/Output runtime actions for CHILL.
Copyright (C) 1992,1993 Free Software Foundation, Inc.
Author: Wilfried Moser, et al
This file is part of GNU CC.
GNU CC 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 2, or (at your option)
any later version.
GNU CC 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 CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* As a special exception, if you link this library with other files,
some of which are compiled with GCC, to produce an executable,
this library does not by itself cause the resulting executable
to be covered by the GNU General Public License.
This exception does not however invalidate any other reasons why
the executable file might be covered by the GNU General Public License. */
#include "fileio.h"
Boolean
__indexable( Association_Mode* the_assoc, char* file, int line )
{
if( !the_assoc )
CHILLEXCEPTION( file, line, EMPTY, NULL_ASSOCIATION );
if( !TEST_FLAG(the_assoc, IO_ISASSOCIATED) )
CHILLEXCEPTION( file, line, NOTASSOCIATED, IS_NOT_ASSOCIATED );
return TEST_FLAG(the_assoc, IO_INDEXABLE) ? True : False;
}

View File

@ -1,72 +0,0 @@
/* Implement POWERSET runtime actions for CHILL.
Copyright (C) 1992,1993 Free Software Foundation, Inc.
Author: Wilfried Moser, et al
This file is part of GNU CC.
GNU CC 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 2, or (at your option)
any later version.
GNU CC 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 CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* As a special exception, if you link this library with other files,
some of which are compiled with GCC, to produce an executable,
this library does not by itself cause the resulting executable
to be covered by the GNU General Public License.
This exception does not however invalidate any other reasons why
the executable file might be covered by the GNU General Public License. */
#define __CHILL_LIB__
#include <stdio.h>
#include "powerset.h"
/*
* function __inpowerset
*
* parameters:
* bitno bit number within set
* powerset the powerset
* bitlength length of powerset in bits
* minval number of lowest bit stored
*
* returns:
* int 1 .. found
* 0 .. not found
*
* exceptions:
* rangefail
*
* abstract:
* checks if a given value is included in a powerset
*
*/
int
__inpowerset (bitno, powerset, bitlength, minval)
unsigned long bitno;
SET_WORD *powerset;
unsigned long bitlength;
long minval;
{
if (bitno < minval || (bitno - minval) >= bitlength)
return 0;
bitno -= minval;
if (bitlength <= SET_CHAR_SIZE)
return GET_BIT_IN_CHAR (*((SET_CHAR *)powerset), bitno);
else if (bitlength <= SET_SHORT_SIZE)
return GET_BIT_IN_SHORT (*((SET_SHORT *)powerset), bitno);
else
return GET_BIT_IN_WORD (powerset[bitno / SET_WORD_SIZE],
bitno % SET_WORD_SIZE);
}

View File

@ -1,93 +0,0 @@
/* Implement timing-related runtime actions for CHILL.
Copyright (C) 1992,1993 Free Software Foundation, Inc.
Author: Wilfried Moser
This file is part of GNU CC.
GNU CC 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 2, or (at your option)
any later version.
GNU CC 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 CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* As a special exception, if you link this library with other files,
some of which are compiled with GCC, to produce an executable,
this library does not by itself cause the resulting executable
to be covered by the GNU General Public License.
This exception does not however invalidate any other reasons why
the executable file might be covered by the GNU General Public License. */
#include <time.h>
typedef struct
{
void *p;
unsigned long len;
} Descr;
typedef Descr **Toutlist;
#define ASSIGN_VALUE(OUT,VAL) \
do \
{ \
if (OUT) \
switch (OUT->len) \
{ \
case 1: \
*(char *)((OUT)->p) = VAL; \
break; \
case 2: \
*(short *)((OUT)->p) = VAL; \
break; \
case 4: \
*(int *)((OUT)->p) = VAL; \
break; \
} \
} while (0)
/*
* function _inttime
*
* parameters:
* t time_t
* list the pointers to the results
*
* returns:
* void
*
* exceptions:
* none
*
* abstract:
* perform the INTTIME builtin call
*
*/
void
_inttime (timer, outlist)
time_t timer;
Toutlist outlist;
{
struct tm *time_str;
/* get struct tm from time_t */
time_str = localtime (&timer);
/* assign the values */
ASSIGN_VALUE (outlist[0], time_str->tm_year + 1900);
ASSIGN_VALUE (outlist[1], time_str->tm_mon + 1);
ASSIGN_VALUE (outlist[2], time_str->tm_mday);
ASSIGN_VALUE (outlist[3], time_str->tm_hour);
ASSIGN_VALUE (outlist[4], time_str->tm_min);
ASSIGN_VALUE (outlist[5], time_str->tm_sec);
}

View File

@ -1,53 +0,0 @@
/* Implement Input/Output runtime actions for CHILL.
Copyright (C) 1992,1993 Free Software Foundation, Inc.
Author: Wilfried Moser, et al
This file is part of GNU CC.
GNU CC 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 2, or (at your option)
any later version.
GNU CC 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 CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* As a special exception, if you link this library with other files,
some of which are compiled with GCC, to produce an executable,
this library does not by itself cause the resulting executable
to be covered by the GNU General Public License.
This exception does not however invalidate any other reasons why
the executable file might be covered by the GNU General Public License. */
#include <setjmp.h>
/* define names of IO-exceptions */
char * __IO_exception_names[] =
{
"UNUSED",
"notassociated",
"associatefail",
"createfail",
"deletefail",
"modifyfail",
"connectfail",
"notconnected",
"empty",
"rangefail",
"spacefail",
"readfail",
"writefail",
"textfail",
};
jmp_buf __io_exception;
jmp_buf __rw_exception;

View File

@ -1,169 +0,0 @@
/* Implement Input/Output runtime actions for CHILL.
Copyright (C) 1992,1993 Free Software Foundation, Inc.
Author: Wilfried Moser, et al
This file is part of GNU CC.
GNU CC 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 2, or (at your option)
any later version.
GNU CC 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 CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* As a special exception, if you link this library with other files,
some of which are compiled with GCC, to produce an executable,
this library does not by itself cause the resulting executable
to be covered by the GNU General Public License.
This exception does not however invalidate any other reasons why
the executable file might be covered by the GNU General Public License. */
#ifndef _ioerror_h_
#define _ioerror_h_
#include <setjmp.h>
/* Note: numbers must be in the same order as
strings in ioerror.c */
typedef enum
{ NOTASSOCIATED = 1,
ASSOCIATEFAIL,
CREATEFAIL,
DELETEFAIL,
MODIFYFAIL,
CONNECTFAIL,
NOTCONNECTED,
EMPTY,
RANGEFAIL,
SPACEFAIL,
READFAIL,
WRITEFAIL,
TEXTFAIL
} io_exceptions_t;
#ifndef FIRST_IO_ERROR_NUMBER
#define FIRST_IO_ERROR_NUMBER 0
#endif
typedef enum {
FIRST_AND_UNUSED = FIRST_IO_ERROR_NUMBER,
INTERNAL_ERROR,
INVALID_IO_LIST,
REPFAC_OVERFLOW,
CLAUSE_WIDTH_OVERFLOW,
UNMATCHED_CLOSING_PAREN,
UNMATCHED_OPENING_PAREN,
BAD_FORMAT_SPEC_CHAR,
NO_PAD_CHAR,
IO_CONTROL_NOT_VALID,
DUPLICATE_QUALIFIER,
NO_FRACTION_WIDTH,
NO_EXPONENT_WIDTH,
FRACTION_WIDTH_OVERFLOW,
EXPONENT_WIDTH_OVERFLOW,
NO_FRACTION,
NO_EXPONENT,
NEGATIVE_FIELD_WIDTH,
TEXT_LOC_OVERFLOW,
IOLIST_EXHAUSTED,
CONVCODE_MODE_MISFIT,
SET_CONVERSION_ERROR,
BOOL_CONVERSION_ERROR,
NON_INT_FIELD_WIDTH,
EXCESS_IOLIST_ELEMENTS,
NOT_ENOUGH_CHARS,
NO_CHARS_FOR_INT,
NO_CHARS_FOR_FLOAT,
NO_EXPONENT_VAL,
INT_VAL_OVERFLOW,
REAL_OVERFLOW,
NO_DIGITS_FOR_INT,
NO_DIGITS_FOR_FLOAT,
NO_CHARS_FOR_SET,
NO_CHARS_FOR_CHAR,
NO_CHARS_FOR_BOOLS,
NO_CHARS_FOR_CHARS,
NO_CHARS_FOR_TEXT,
NO_CHARS_FOR_EDIT,
NO_SPACE_TO_SKIP,
FORMAT_TEXT_MISMATCH,
INTEGER_RANGE_ERROR,
SET_RANGE_ERROR,
CHAR_RANGE_ERROR,
INVALID_CHAR,
/* end of formatting errors */
NULL_ASSOCIATION,
NULL_ACCESS,
NULL_TEXT,
IS_NOT_ASSOCIATED,
IS_ASSOCIATED,
GETCWD_FAILS,
INVALID_ASSOCIATION_MODE,
FILE_EXISTING,
CREATE_FAILS,
DELETE_FAILS,
RENAME_FAILS,
IMPL_RESTRICTION,
NOT_EXISTING,
NOT_READABLE,
NOT_WRITEABLE,
NOT_INDEXABLE,
NOT_SEQUENCIBLE,
NO_CURRENT_POS,
NOT_VARIABLE,
NOT_FIXED,
NOT_INDEXED,
LENGTH_CHANGE,
LSEEK_FAILS,
BUFFER_ALLOC,
OPEN_FAILS,
NO_ACCESS_SUBLOCATION,
BAD_INDEX,
IS_NOT_CONNECTED,
NO_PATH_NAME,
PATHNAME_ALLOC,
BAD_USAGE,
OUT_OF_FILE,
NULL_STORE_LOC,
STORE_LOC_ALLOC,
OS_IO_ERROR,
RECORD_TOO_LONG,
RECORD_TOO_SHORT,
BAD_TEXTINDEX,
NULL_TEXTREC
} io_info_word_t;
extern
char* io_info_text [];
extern
char* exc_text [];
extern
jmp_buf __io_exception;
extern
jmp_buf __rw_exception;
void __cause_exception (char *ex, char* f, int line, int info);
extern char * __IO_exception_names[];
#define IOEXCEPTION(EXC,INFO) \
longjmp( __io_exception, (EXC<<16) + INFO )
#define RWEXCEPTION(EXC,INFO) \
longjmp( __rw_exception, (EXC<<16) + INFO )
#define CHILLEXCEPTION(FILE,LINE,EXC,INFO) \
__cause_exception (__IO_exception_names[EXC], FILE, LINE, INFO);
#endif

View File

@ -1,259 +0,0 @@
/* Implement Input/Output runtime actions for CHILL.
Copyright (C) 1992,1993 Free Software Foundation, Inc.
Author: Wilfried Moser, et al
This file is part of GNU CC.
GNU CC 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 2, or (at your option)
any later version.
GNU CC 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 CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* As a special exception, if you link this library with other files,
some of which are compiled with GCC, to produce an executable,
this library does not by itself cause the resulting executable
to be covered by the GNU General Public License.
This exception does not however invalidate any other reasons why
the executable file might be covered by the GNU General Public License. */
#ifndef _iomodes_h_
#define _iomodes_h_
#include "auxtypes.h"
typedef enum { ReadOnly, WriteOnly, ReadWrite
} Usage_Mode;
typedef enum { First, Same, Last
} Where_Mode;
typedef enum { None, Fixed, VaryingChars
} Record_t;
/* association flags */
#define IO_ISASSOCIATED 0x00000001
#define IO_EXISTING 0x00000002
#define IO_READABLE 0x00000004
#define IO_WRITEABLE 0x00000008
#define IO_INDEXABLE 0x00000010
#define IO_SEQUENCIBLE 0x00000020
#define IO_VARIABLE 0x00000040
#define IO_FIRSTLINE 0x00000100
#define IO_FORCE_PAGE 0x00000200
struct Access_Mode;
#define READBUFLEN 512
typedef struct
{
unsigned long len;
unsigned long cur;
char buf[READBUFLEN];
} readbuf_t;
typedef struct Association_Mode {
unsigned long flags; /* INIT = 0 */
char* pathname;
struct Access_Mode* access;
int handle;
readbuf_t* bufptr;
long syserrno;
char usage;
char ctl_pre;
char ctl_post;
} Association_Mode;
/*
rectype indexed max. reclength act. reclength
---------------------------------------------------
None T/F 0
Fixed T/F SIZE(recmode) = SIZE(recmode)
Varying F SIZE(recmode) >= length
*/
/* access/text flags */
#define IO_TEXTLOCATION 0x80000000
#define IO_INDEXED 0x00000001
#define IO_TEXTIO 0x00000002
#define IO_OUTOFFILE 0x00010000
typedef struct Access_Mode {
unsigned long flags; /* INIT */
unsigned long reclength; /* INIT */
signed long lowindex; /* INIT */
signed long highindex; /* INIT */
Association_Mode* association;
unsigned long base;
char* store_loc;
Record_t rectype; /* INIT */
} Access_Mode;
typedef struct Text_Mode {
unsigned long flags; /* INIT */
VarString* text_record; /* INIT */
Access_Mode* access_sub; /* INIT */
unsigned long actual_index;
} Text_Mode;
typedef enum
{
__IO_UNUSED,
__IO_ByteVal,
__IO_UByteVal,
__IO_IntVal,
__IO_UIntVal,
__IO_LongVal,
__IO_ULongVal,
__IO_ByteLoc,
__IO_UByteLoc,
__IO_IntLoc,
__IO_UIntLoc,
__IO_LongLoc,
__IO_ULongLoc,
__IO_ByteRangeLoc,
__IO_UByteRangeLoc,
__IO_IntRangeLoc,
__IO_UIntRangeLoc,
__IO_LongRangeLoc,
__IO_ULongRangeLoc,
__IO_BoolVal,
__IO_BoolLoc,
__IO_BoolRangeLoc,
__IO_SetVal,
__IO_SetLoc,
__IO_SetRangeLoc,
__IO_CharVal,
__IO_CharLoc,
__IO_CharRangeLoc,
__IO_CharStrLoc,
__IO_CharVaryingLoc,
__IO_BitStrLoc,
__IO_RealVal,
__IO_RealLoc,
__IO_LongRealVal,
__IO_LongRealLoc
} __tmp_IO_enum;
typedef struct
{
long value;
char* name;
} __tmp_IO_enum_table_type;
typedef struct
{
long value;
__tmp_IO_enum_table_type* name_table;
} __tmp_WIO_set;
typedef struct
{
char* ptr;
long lower;
long upper;
} __tmp_IO_charrange;
typedef union
{
signed long slong;
unsigned long ulong;
} __tmp_IO_long;
typedef struct
{
void* ptr;
__tmp_IO_long lower;
__tmp_IO_long upper;
} __tmp_IO_intrange;
typedef struct
{
void* ptr;
unsigned long lower;
unsigned long upper;
} __tmp_RIO_boolrange;
typedef struct
{
void* ptr;
long length;
__tmp_IO_enum_table_type* name_table;
} __tmp_RIO_set;
typedef struct
{
void* ptr;
long length;
__tmp_IO_enum_table_type* name_table;
unsigned long lower;
unsigned long upper;
} __tmp_RIO_setrange;
typedef struct
{
char* string;
long string_length;
} __tmp_IO_charstring;
typedef union
{
char __valbyte;
unsigned char __valubyte;
short __valint;
unsigned short __valuint;
long __vallong;
unsigned long __valulong;
void* __locint;
__tmp_IO_intrange __locintrange;
unsigned char __valbool;
unsigned char* __locbool;
__tmp_RIO_boolrange __locboolrange;
__tmp_WIO_set __valset;
__tmp_RIO_set __locset;
__tmp_RIO_setrange __locsetrange;
unsigned char __valchar;
unsigned char* __locchar;
__tmp_IO_charrange __loccharrange;
__tmp_IO_charstring __loccharstring;
float __valreal;
float* __locreal;
double __vallongreal;
double* __loclongreal;
} __tmp_IO_union;
/*
* CAUTION: The longest variant of __tmp_IO_union is 5 words long.
* Together with __descr this caters for double alignment where required.
*/
typedef struct
{
__tmp_IO_union __t;
__tmp_IO_enum __descr;
} __tmp_IO_list;
#endif

View File

@ -1,37 +0,0 @@
/* Implement Input/Output runtime actions for CHILL.
Copyright (C) 1992,1993 Free Software Foundation, Inc.
Author: Wilfried Moser, et al
This file is part of GNU CC.
GNU CC 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 2, or (at your option)
any later version.
GNU CC 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 CC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* As a special exception, if you link this library with other files,
some of which are compiled with GCC, to produce an executable,
this library does not by itself cause the resulting executable
to be covered by the GNU General Public License.
This exception does not however invalidate any other reasons why
the executable file might be covered by the GNU General Public License. */
#include "fileio.h"
Boolean
__isassociated( Association_Mode* the_assoc, char* file, int line )
{
if( !the_assoc )
CHILLEXCEPTION( file, line, EMPTY, NULL_ASSOCIATION );
return TEST_FLAG(the_assoc, IO_ISASSOCIATED) ? True : False;
}

Some files were not shown because too many files have changed in this diff Show More