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
Neil Brown
6f8aeba867
Made sure that the three temporary files all have different stems, because otherwise there can be collisions between the object files of the C and occam.
2007-10-08 22:32:03 +00:00
Neil Brown
b0f5f6be77
Removed kroc-wrapper.occ, in favour of generating it as a temporary file for each all-in-one compilation
2007-10-08 22:24:02 +00:00
Neil Brown
32fa80be0f
Removed the kroc C wrapper file (kroc-wrapper-c.c) in favour of tacking it onto the end of each C file we create (to better facilitate all-in-one compilation)
2007-10-08 22:04:11 +00:00
Neil Brown
85fdfe7af7
Added a missing command to actually compile the C file produced by the post-analyse pass, and fixed the file extensions passed to the kroc link command
2007-10-08 21:54:12 +00:00
Neil Brown
c17cf0ce38
Added the first attempt at getting Tock to do an all-in-one compile, from occam/Rain all the way through into an executable binary
2007-10-08 21:18:07 +00:00
Neil Brown
7cee4e46fc
Changed tock to use autoconf/automake for its build process
...
The old Makefile has been removed, and configure.ac and Makefile.am added in its place, along with the four files (AUTHORS, ChangeLog, NEWS and README) that autoconf requires you to have (all currently blank). tock and tocktest can now be compiled, but the rules for cgtests and compiling the C and C++ files are currently missing.
2007-10-08 17:02:03 +00:00
Neil Brown
5b10466e68
Fixed the channel arrays (and abbreviations thereof) to have the correct types (correcting an earlier mistake), and added helper functions to the support headers for easy initialisation of the arrays
2007-10-07 23:03:15 +00:00
Neil Brown
4e6938e0ae
Fixed AnalyseAsm so that it can parse negative literals in the assembly code
2007-10-07 15:09:36 +00:00
Neil Brown
5450f77963
Added a test for genBytesIn in the C and C++ backends
2007-10-07 11:47:39 +00:00
Neil Brown
c1c1397f67
Added the occam_negate_ functions to the tock support header file, and defined a new macro that reduces some of the replicated macro calls
2007-10-07 11:07:20 +00:00
Neil Brown
9c4f977416
Added tests for channels carrying counted arrays of arrays for the C and C++ backends
2007-10-06 23:50:20 +00:00
Neil Brown
5e1e51ac15
Refactored the C++ genOutputItem to merge some duplicate code
2007-10-06 23:08:05 +00:00
Neil Brown
9af1ec78bb
Fixed all the tests for sending items in C++, and made the tests pass
2007-10-06 23:05:03 +00:00
Neil Brown
6d29bbd260
Added some tests for outputs in the C and C++ backends, but the C++ backend needs fixing
2007-10-06 18:20:55 +00:00
Neil Brown
3b20d18937
Added tests for the genOutput and genOutputCase functions, corrected the C++ code, and added some helper functions to the C++ support header
2007-10-06 17:05:49 +00:00
Neil Brown
97ee0c4a4e
Added tests for ProtocolCase in introduceSpec, and made the C++ version behave the same as the C version
2007-10-06 16:35:02 +00:00
Neil Brown
03a4b8e41b
Removed the generate of tuples for sequential protocols in C++, since we're now using a byte-array approach
2007-10-06 16:22:51 +00:00
Neil Brown
062851dabf
Added tests for introduceSpec and Is, for all types except arrays
2007-10-06 15:55:18 +00:00
Neil Brown
683757d293
Changed the Makefile to use the public SVN repository for getting the cgtests
2007-10-06 15:29:39 +00:00
Neil Brown
0cf27ce4b6
Simplified the tests for IsChannelArray a little by overriding genVariable in the test
2007-10-06 13:32:12 +00:00
Neil Brown
0517465eff
Removed the function genArraySizesSize from GenOps, since it was only called in one place
2007-10-06 12:52:59 +00:00
Neil Brown
c3fad80f06
Changed the behaviour of the C++ version of declareArraySizes, moving towards potentially merging more of the C++ array handling with the C array handling
2007-10-06 12:49:30 +00:00
Neil Brown
e7cdaf2e90
Changed the type of genArraySizesLiteral, added tests for the C++ version and implemented the C++ version
2007-10-06 12:31:14 +00:00
Neil Brown
8ea4ad79e8
Changed the type of declareArraySizes, and added a C++ implementation of it
2007-10-06 12:22:40 +00:00
Neil Brown
071172954d
Removed redundant/common code in the C++ backend relating to arrays
2007-10-06 11:59:29 +00:00
Neil Brown
9a6f9186a9
Changed the behaviour of genArraySizesLiteral to include the curly brackets
2007-10-06 11:55:50 +00:00
Neil Brown
a583403372
Removed the C++ code for IsChannelArray, so that the C version is used instead
2007-10-06 11:40:10 +00:00
Neil Brown
4c0c27f350
Added a test for handling IsChannelArray in introduceSpec, for both C and C++ backends
2007-10-06 11:38:16 +00:00
Neil Brown
c521187cd2
Added a genArrayStoreName function to GenOps and implemented it for both C and C++
2007-10-06 11:30:03 +00:00
Neil Brown
24b3975cf8
Fixed channel arrays that are abbreviations to have the proper indirection, because they can be constructed in a special way (using IsChannelArray)
2007-10-06 00:57:03 +00:00
Neil Brown
9d5164d9c1
Changed the generation of the record structs to use the altered genDeclaration (that can now generate declarations for inside records)
2007-10-05 20:06:11 +00:00
Neil Brown
904d1e8f5f
Changed the genDeclaration function so that it can either generate stand-alone declarations (as it did before), or declarations inside records
2007-10-05 19:01:42 +00:00
Neil Brown
34609f1fee
Corrected the C++ tests and implementation of arrays inside records -- the dimensions of the tockArrayView were not being set, but they should be.
2007-10-05 17:52:37 +00:00
Neil Brown
8cd20b9906
Changed the C++ implementation of introduceSpec to fall through to the C implementation for all unhandled cases (which will remove duplicate code)
2007-10-05 17:51:00 +00:00