Commit Graph

43 Commits

Author SHA1 Message Date
Neil Brown
8fe152bf98 Merged the type-checking on time-related statements in Rain into the pass that checks types in communications 2008-03-24 15:15:28 +00:00
Neil Brown
cbbafffbd2 Changed Rain to use the new timer type rather than things like the GetTime statement 2008-03-24 13:50:14 +00:00
Neil Brown
c68aa42277 Added a sub-type to Timers, to support multiple types 2008-03-23 22:20:16 +00:00
Neil Brown
c1479bc1a8 Fixed the list of excluded Rain things by removing IntrinsicFunctionCall from the list 2008-03-23 11:48:33 +00:00
Neil Brown
dd7b0268b2 Added a new property (functionTypesChecked) to help fix the pass ordering 2008-03-23 00:09:01 +00:00
Neil Brown
230db2de08 Added support for specifications at the start of functions without ruining the check for a return statement 2008-03-22 18:57:23 +00:00
Neil Brown
ae142a94e1 Added support for uniquifying function arguments to the Rain passes 2008-03-22 18:34:07 +00:00
Neil Brown
33b04e7646 Tidied up a few unused functions and module imports 2008-03-21 15:16:36 +00:00
Neil Brown
0dc458ff03 Fixed transformEachRange to change the abbreviation mode of the loop counter 2008-03-21 15:09:00 +00:00
Neil Brown
dfea2c11a5 Added a dummy Rain pass to supply the new retypesChecked property 2008-03-21 15:07:56 +00:00
Neil Brown
50ce3410b8 Added the pass for giving lists a type to the pass list 2008-03-20 16:54:40 +00:00
Neil Brown
af4a66e2e4 Corrected the spelling of the name of one of the Rain passes 2008-03-20 16:46:45 +00:00
Neil Brown
8f51ead090 Rewrote transformRangeRep, stopping it requiring constants in ranges 2008-03-20 12:40:07 +00:00
Neil Brown
ad7a76dace Altered transformEachRange to make it more straight-forward 2008-03-20 09:36:26 +00:00
Neil Brown
43b77ff1a0 Made names for loop variables unique in Rain, and made their abbreviation mode Abbrev 2008-03-19 17:19:58 +00:00
Neil Brown
6b04b6d944 Added a pass to pull up expressions in for-each loops into a variable 2008-03-19 17:18:56 +00:00
Neil Brown
db0467f1ca Adjusted the rain passes to use the new array constructor type, and weaned a few of them off everywhereM 2008-03-19 13:24:15 +00:00
Adam Sampson
79eefd5e98 Move constant checking from the occam parser into a pass.
The parser now doesn't do any constant folding or checking.
2008-03-19 12:47:29 +00:00
Neil Brown
5c43172e46 Added an annotation to array subscripts to indicate whether they should have a run-time check added or not 2008-03-09 14:30:19 +00:00
Neil Brown
ba75f5b06c Removed the initialiser expression on the Declaration item in the AST 2008-03-09 00:23:13 +00:00
Neil Brown
7af49a2d10 Fixed the checkFunction pass 2008-02-25 21:27:37 +00:00
Neil Brown
dcf419744a Renamed the transformFunction pass into checkFunction, and adjusted the tests for it accordingly 2008-02-25 21:17:37 +00:00
Neil Brown
2e6718ac50 Changed all the lists of passes to add pre- and post- properties 2008-02-19 09:43:40 +00:00
Neil Brown
360abc195e Moved the enabling/disabling of passes based on CompState from PassList to the point of the declaration of the passes 2008-02-16 11:09:25 +00:00
Neil Brown
3ce0eaf452 Made the first adjustment to the Pass system, ready to introduce properties and a dependency graph. For now passes are still executed in list order 2008-02-16 10:19:14 +00:00
Neil Brown
95cdb39789 Generalised the type of the monad for the excludeConstr function, and correspondingly the functions that use it 2008-02-08 11:33:19 +00:00
Neil Brown
acd57d74de Changed the A.Structured type to be parameterised
This patch is actually an amalgam of multiple (already large) patches.  Those patches conflicted (parameterised Structured vs. changes to usage checking and FlowGraph) and encountered a nasty bug in darcs 1 involving exponential time (see http://wiki.darcs.net/DarcsWiki/ConflictsFAQ for more details).  Reasoning that half an hour (of 100% CPU use) was too long to apply patches, I opted to re-record the parameterised Structured changes as this new large patch.  Here are the commit messages originally used for the patches (which, as mentioned, were already large patches):

A gigantic patch switching all the non-test modules over to using parameterised A.Structured
Changed the FlowGraph module again to handle any sort of Structured you want to pass to it (mainly for testing)
A further gigantic patch changing all the tests to work with the new parameterised Structured
Fixed a nasty bug involving functions being named incorrectly inside transformInputCase
Added a hand-written instance of Data for Structured that allows us to use ext1M properly
Fixed a few warnings in the code
2008-02-05 19:40:27 +00:00
Neil Brown
edc3a7e910 Removed the die function (that has no source position) and as far as possible replaced all its uses with dieP and a valid position 2008-01-28 17:21:13 +00:00
Neil Brown
26dd2fa5c4 Renamed the TestUtil and TreeUtil modules to TestUtils and TreeUtils, to be consistent with the Utils module 2007-12-13 19:05:29 +00:00
Neil Brown
25f2efb94c Changed the existing Rain code (and tests) to use the new List type rather than the Array type 2007-10-25 10:13:17 +00:00
Neil Brown
6b95827cab Added an optional initialiser-expression to Declaration in the AST, and changed the rest of the code accordingly 2007-10-24 23:50:00 +00:00
Neil Brown
38c409d378 Added the -fwarn-unused-imports compiler option to warn about unused imports, and then set about pruning and ordering (mostly in my code) the import lists for all the modules 2007-09-27 13:13:46 +00:00
Neil Brown
4e635d84ba Rain: added a pass for checking the types in GetTime processes 2007-09-19 11:36:55 +00:00
Neil Brown
6c3864cdfd Rain: wired up the new type-checking passes 2007-09-16 12:09:22 +00:00
Neil Brown
9ef8343c3a Rain: moved matchParamPass into RainTypes 2007-09-15 21:29:30 +00:00
Neil Brown
7f9357d658 Rain: changed from using the isSafeConversion function to a more appropriate new function isImplicitConversionRain 2007-09-15 18:54:19 +00:00
Neil Brown
feedce5a24 Removed unnecessary dependencies of a few non-test modules on TestUtil 2007-09-15 14:33:23 +00:00
Neil Brown
9ffb5b5931 Rain: corrected a comment in RainPasses 2007-09-15 11:25:35 +00:00
Neil Brown
bad3f0818a Rain: implemented the pass to record the types of integer literals 2007-09-15 10:55:53 +00:00
Neil Brown
01f763373d Rain: added a new pass for folding constants 2007-09-15 09:36:50 +00:00
Neil Brown
4d09fd4a85 Rain: added a pass that moves declarations inside par blocks to being outside the par blocks (so that they are in scope for the whole of the par block) 2007-09-14 13:03:59 +00:00
Neil Brown
c40d94c655 Added a couple of passes that check the validity of the AST at the beginning and end of the Rain passes 2007-09-12 08:50:19 +00:00
Neil Brown
2ff46a9041 Rearranged the Rain source files, renamed a couple of Rain files, and changed the Makefile accordingly. 2007-09-10 17:28:57 +00:00