Commit Graph

962 Commits

Author SHA1 Message Date
Neil Brown
3727307a78 Changed the shared passes to operate on Structured items, rather than Process items 2007-10-17 13:24:42 +00:00
Neil Brown
1c858e112c Changed the occam and Rain parsers to return a Structured rather than a Process (which will simplify the generated ASTs) 2007-10-17 13:21:17 +00:00
Neil Brown
a25824b601 Changed the passes to be of type Pass, rather than A.Process -> PassM A.Process 2007-10-17 13:09:16 +00:00
Neil Brown
30b7cc686b Doubled the stack size for C++CSP processes, in order to get cg test 08 passing 2007-10-14 13:25:31 +00:00
Neil Brown
0fc7ceaf68 Fixed an issue where the size in counted array inputs in C++ was not being correctly calculated 2007-10-14 11:09:35 +00:00
Neil Brown
fed32e1531 Adjusted the tests for inputs to catch an error where the size in counted array inputs in C++ was not being correctly calculated 2007-10-14 11:09:08 +00:00
Neil Brown
05293f75c1 Fixed an error in the C++CSP support file where arrays with the first dimension being free would not have their size recalculated 2007-10-14 11:08:30 +00:00
Neil Brown
c19ae03116 Added a pass that changes all C++CSP channels to be of type tockSendableArrayOfBytes, so that the channels can be retyped into each other 2007-10-14 10:28:43 +00:00
Neil Brown
053f91bc59 Fixed a horrible error in the C++ support header file that was preventing byte-channels from working 2007-10-14 00:32:59 +00:00
Neil Brown
3c101bae19 Removed my old cgmap function, in favour of the identical library function mapM_ 2007-10-14 00:14:19 +00:00
Neil Brown
d4dabfd3bb Removed unused code from the GenerateCTest module 2007-10-14 00:09:28 +00:00
Neil Brown
fd74473b9b Removed a big load of unused code from the C++ code generation, that was related to the old way of handling protocols 2007-10-14 00:08:13 +00:00
Neil Brown
e9dbfbab3c Added the input-case to case pass to the pass-list, and therefore removed all code dealing with input-case statements in the C and C++ backends (and corresponding tests) 2007-10-14 00:01:44 +00:00
Neil Brown
d98cb21415 Added support for transforming ALT guards to the input-case -> case pass 2007-10-13 23:56:36 +00:00
Neil Brown
8b2e14f3bd Added tests and implementation for a new pass for transforming input-case statements into case statements 2007-10-13 23:28:41 +00:00
Neil Brown
443b648d73 Corrected the pass that creates abbreviations for output expressions to also work on OutputCase statements 2007-10-13 20:52:42 +00:00
Neil Brown
ffe8477237 Added a fix to prevent running a zero-length list of processes in CIF 2007-10-13 20:02:07 +00:00
Neil Brown
9e21e4fc0d Added a C++ implementation of the genRetypeSizes function 2007-10-13 17:57:23 +00:00
Neil Brown
1885518b8d Changed the C genRetypeSizes function to pass the tests 2007-10-13 17:54:46 +00:00
Neil Brown
acd09137f6 Added tests for genRetypeSizes in the C and C++ backends 2007-10-13 17:49:09 +00:00
Neil Brown
b4d34d1bc7 Made the C++ array stop if there is a problem with a retyping 2007-10-13 17:01:39 +00:00
Neil Brown
c74ae12810 Changed the type of genBytesIn again, to remove redundancy in its parameters 2007-10-13 16:16:52 +00:00
Neil Brown
a98ff8cad0 Removed the horrible tockBool type, now that we are no longer using vectors to store C++ arrays 2007-10-13 15:40:39 +00:00
Neil Brown
ed38f80db0 Changed the type of genRetypeSizes to removed the unused AbbrevMode parameter 2007-10-13 15:38:04 +00:00
Neil Brown
9a48683033 Refactored the C implementation of genBytesIn to better integrate the old genBytesIn' with genBytesIn 2007-10-13 15:01:51 +00:00
Neil Brown
ffd09847fe Removed genBytesIn' from the GenOps, in favour of adding a parameter to genBytesIn, and changed the tests and code accordingly 2007-10-13 14:51:29 +00:00
Neil Brown
d5d4580aa3 Changed the type of genSlice, and put the C++ version into the GenOps dictionary, as well as adding tests for the function 2007-10-13 13:20:40 +00:00
Neil Brown
886659fd09 Changed the C++ backend to pass the RETYPES tests (primarily white-space changes, and also reordering the parameters for tockArrayView) 2007-10-13 12:58:20 +00:00
Neil Brown
324257198a Changed the C backend to pass the RETYPES tests (mainly white-space changes) 2007-10-13 12:51:13 +00:00
Neil Brown
a1f0faac8f Added tests for RETYPES specifications in the C and C++ backends 2007-10-13 12:50:39 +00:00
Neil Brown
90799499d8 Changed a constructor of tockArrayView in the C++CSP support header, so that retyping conversions are more distinct from same-type constructors 2007-10-13 12:50:01 +00:00
Neil Brown
ec43e592f0 Fixed the initialisation of C++ channel arrays to initialise the correct array 2007-10-11 01:32:36 +00:00
Neil Brown
a1f209fb0d Added missing linker flags to the C++ all-in-one compilation command 2007-10-11 01:32:01 +00:00
Neil Brown
a1baa16d9e Made some fixes in the support header files, and changed functions to fix issues with const-ness in C++ 2007-10-11 01:30:49 +00:00
Neil Brown
3b0be45b74 Changed the Makefile rules for the cgtests so that it will clean them, and so it won't connect to the SVN repository every time 2007-10-11 01:04:03 +00:00
Neil Brown
3a959d69f4 Added inline modifiers to some of the short functions in the C++CSP support header file 2007-10-11 00:51:55 +00:00
Neil Brown
8d0b5fbe1a Added a helper function for receiving an array of bytes, and changed the C++CSP backend and tests to use the function 2007-10-11 00:51:07 +00:00
Neil Brown
1694f524fd Fixed a couple of mistakes in the C++CSP support header file 2007-10-11 00:40:41 +00:00
Neil Brown
4935a04aa4 Added the simplifyComms pass to the shared pass list for the compiler, and removed the corresponding code in the C backend that the pass replaces 2007-10-11 00:14:27 +00:00
Neil Brown
126226b039 Implemented the outExprs pass, and got it passing all the tests 2007-10-11 00:12:41 +00:00
Neil Brown
73ee9319e1 Added more tests for the outExprs pass in PassTest 2007-10-11 00:12:08 +00:00
Neil Brown
c7fe2431db Added a test for the new outExprs pass 2007-10-10 23:46:58 +00:00
Neil Brown
d04adba875 Added a new SimplifyComms module, containing a new (currently dummy) pass, outExprs 2007-10-10 23:13:01 +00:00
Neil Brown
4d6d6dc555 Added a new function (checkTempVarTypes) to the TestUtil module 2007-10-10 23:11:35 +00:00
Neil Brown
a68ecfb24b Added a new function (typeOfSpec) to the Types module 2007-10-10 23:10:46 +00:00
Neil Brown
cc2040679b Changed the C and C++ backends to pass the input tests 2007-10-10 20:46:23 +00:00
Neil Brown
3f6fe50438 Added tests for (non-case-protocol) inputs in the C and C++ backends 2007-10-10 20:45:05 +00:00
Neil Brown
caa2a6164d Added rules for getting and making the cgtests to the new Automake make system 2007-10-09 00:44:41 +00:00
Neil Brown
c9da8942d5 Changed the default compilation mode from being just occam/Rain->C/C++ compilation to being occam/Rain->binary ("all-in-one") compilation 2007-10-09 00:41:13 +00:00
Neil Brown
0bab7f1728 Changed the full compile-mode code, so that temporary files are deleted, even in case of error -- by using some monad trickery. 2007-10-09 00:19:49 +00:00