Mirror of http://offog.org/git/tock.git . Tock (translator from occam to C from Kent) is a Haskell-based compiler for occam and related languages.
Go to file
Neil Brown e457d82f0c Changed FUNCTIONs and PROCs to have optional bodies, and put all the externals into the AST (without bodies)
This may seem like an odd change, but it simplifies the logic a lot.  I kept having problems with passes not operating on externals (e.g. functions-to-procs, adding array sizes, constant folding in array dimensions) and adding a special case every time to also process the externals was getting silly.

Putting the externals in the AST therefore made sense, but I didn't want to just add dummy bodies as this would cause them to throw up errors (e.g. in the type-checking for functions).  So I turned the bodies into a Maybe type, and that has worked out well.

I also stopped storing the formals in csExternals (since they are now in csNames, and the tree), which streamlined that nicely, and stopped me having to keep them up to date.
2009-04-04 14:56:35 +00:00
backends Changed FUNCTIONs and PROCs to have optional bodies, and put all the externals into the AST (without bodies) 2009-04-04 14:56:35 +00:00
checks Added a couple of filter calls to the usage checking to speed it up 2009-04-04 08:52:41 +00:00
common Changed FUNCTIONs and PROCs to have optional bodies, and put all the externals into the AST (without bodies) 2009-04-04 14:56:35 +00:00
config Changed the build process to support a directory to put modules and includes in, and added a dummy lib (occamutl) 2009-04-04 12:28:47 +00:00
data Changed FUNCTIONs and PROCs to have optional bodies, and put all the externals into the AST (without bodies) 2009-04-04 14:56:35 +00:00
docextra Add the Tock hacker's guide to the repository. 2008-11-20 13:41:06 +00:00
flow Changed FUNCTIONs and PROCs to have optional bodies, and put all the externals into the AST (without bodies) 2009-04-04 14:56:35 +00:00
frontends Changed FUNCTIONs and PROCs to have optional bodies, and put all the externals into the AST (without bodies) 2009-04-04 14:56:35 +00:00
pass Changed FUNCTIONs and PROCs to have optional bodies, and put all the externals into the AST (without bodies) 2009-04-04 14:56:35 +00:00
pregen Make GenNavAST generate instances of a "Polyplate" class. 2008-05-10 16:27:46 +00:00
support Added some missing static specifiers to some occam support functions 2009-04-01 18:59:10 +00:00
testcases Fixed some of the tests, and added another testcase for array passing, based on one of Carl's examples 2009-03-20 12:59:16 +00:00
transformations Changed FUNCTIONs and PROCs to have optional bodies, and put all the externals into the AST (without bodies) 2009-04-04 14:56:35 +00:00
AUTHORS Changed tock to use autoconf/automake for its build process 2007-10-08 17:02:03 +00:00
cgtests.mk Changed the names of generated tock files to have ".tock" before the extension 2009-04-02 15:40:39 +00:00
ChangeLog Changed tock to use autoconf/automake for its build process 2007-10-08 17:02:03 +00:00
compile-cgtests Added rules for getting and making the cgtests to the new Automake make system 2007-10-09 00:44:41 +00:00
configure.ac Changed the build process to support a directory to put modules and includes in, and added a dummy lib (occamutl) 2009-04-04 12:28:47 +00:00
COPYING Add licensing information. 2007-08-18 20:42:11 +00:00
COPYING.LIB Add licensing information. 2007-08-18 20:42:11 +00:00
LANGUAGE Implement channel direction decorators. 2008-06-09 21:35:20 +00:00
Main.hs Added a command-line option to print the include path 2009-04-04 13:45:22 +00:00
Makefile.am Changed the build process to support a directory to put modules and includes in, and added a dummy lib (occamutl) 2009-04-04 12:28:47 +00:00
NEWS Changed tock to use autoconf/automake for its build process 2007-10-08 17:02:03 +00:00
occamutl.tock.h Changed the build process to support a directory to put modules and includes in, and added a dummy lib (occamutl) 2009-04-04 12:28:47 +00:00
occamutl.tock.inc Changed the build process to support a directory to put modules and includes in, and added a dummy lib (occamutl) 2009-04-04 12:28:47 +00:00
ProcessTags.hs Finally got round to adding a little program to qualify the AST tags in the TAGS file 2009-03-22 15:51:43 +00:00
rangetest.c Fixed rangetest to work with the new support headers (it doesn't need the CIF header, only the plain header) 2009-04-02 13:20:35 +00:00
README Changed tock to use autoconf/automake for its build process 2007-10-08 17:02:03 +00:00
SYNTAX Give tock its own repo -- i.e. remove everything else and move tock up 2007-07-16 21:48:55 +00:00
TestMain.hs Added some testcases related to checking the use of abbreviations 2009-02-08 23:25:30 +00:00
TODO Give tock its own repo -- i.e. remove everything else and move tock up 2007-07-16 21:48:55 +00:00