Neil Brown
e90ea48baa
Fixed the test for genOverArray, to test arrays with fixed and unknown dimensions
2008-03-09 17:26:37 +00:00
Neil Brown
7dc379cb86
Fixed a test relating to initialising channel arrays
2008-03-09 17:25:50 +00:00
Neil Brown
3189c066b5
Fixed genRetypeSizes and its associated tests in light of the new array sizes passes
2008-03-09 16:58:05 +00:00
Neil Brown
668983f1e5
Adjusted the tests for the new type of genArraySubscript
2008-03-09 16:20:06 +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
Adam Sampson
f8d4efa0e9
Go back to generating Time variables for timers.
...
This is for two reasons: first, the C++CSP backend still needs them, and
second, the way I'd done the removal wasn't correct; since you can have arrays
of them, abbreviate them, etc., they need to be stripped out by an earlier
pass so that other passes don't try to operate upon them.
2008-03-09 11:57:43 +00:00
Adam Sampson
35538cda36
Resolve conflicts.
...
This simplifies the formals/actuals stuff enough that most of it can probably
go away (once it's made to work again).
2008-03-08 17:18:22 +00:00
Neil Brown
ba9ac70d7c
Changed the C and C++ backends to write directly to the output file, to save building up the strings in memory
2008-03-08 14:10:05 +00:00
Neil Brown
e1fd001322
Fixed a bug relating to not initialising C channel arrays properly (an over-enthusiastic trimming earlier)
2008-03-08 13:42:36 +00:00
Neil Brown
10effbf8f5
Corrected most of the tests for the C/C++ backends to reflect the recent changes to array handling
2008-03-08 13:19:06 +00:00
Adam Sampson
2f7539bcdb
Convert the C backend to the new CIF API (mostly).
...
Most of this is mechanical: changing function names, and carrying the "wptr"
argument around. I've made the code for computing Expressions from Structureds
a bit more generic too.
The only complex bit is the handling of PAR processes, which I'm not very happy
with at the moment; they used to use the normal C calling convention, but now
you need to pack the arguments into the workspace. I'm handling this at the
moment by generating wrapper functions that do the unpacking, but it would be
better in the future to make the wrapper PROCs that we already generate have
the right interface.
This won't work for programs that use any of the top-level channels yet, since
there are no handlers for them.
2008-03-07 17:50:10 +00:00
Neil Brown
60daa07b93
Renamed one of the array functions in the function table to be clearer
2008-03-01 20:22:34 +00:00
Neil Brown
6d4f1dd702
Added labels to all the top-level tests that didn't have one
2008-02-28 16:11:01 +00:00
Neil Brown
b3458ec541
Corrected the pointer indirection for records inside records
2008-02-28 16:08:06 +00:00
Neil Brown
62e45a8909
Added a missed new C/C++ test to the list of tests to run
2008-02-28 15:33:08 +00:00
Neil Brown
d73f2f509c
Added some template types to one of the uses of tockArrayView to please the C++ compiler, and adjusted the tests accordingly
2008-02-28 15:32:26 +00:00
Neil Brown
63730b5aff
Adjusted the tests for record definitions in the C/C++ backends to use the new function in the dictionary for them
2008-02-27 18:56:09 +00:00
Neil Brown
cc29010103
Fixed some more monomorphism restriction warnings in GenerateCTest
2008-02-08 13:35:04 +00:00
Neil Brown
f17ff5071c
Added a Warn monad for warnings, and incorporated a WriterT monad into the PassM stack to support the Warn monad, then changed all the rest of the code accordingly, including adding a Warn instance for the GenParser parser that hides it in the state
2008-02-08 13:22:23 +00:00
Neil Brown
e0d6c5eb08
Fixed the monomorphism restriction warnings in GenerateCTest
2008-02-08 01:11:20 +00:00
Neil Brown
7e7625385d
Pulled out various types and definitions from GenerateC into a common module, GenerateCBased
2008-02-08 01:08:42 +00:00
Neil Brown
a143fb75ef
Changed all the C/C++ backend functions to stop passing round GenOps everywhere; they now all properly pull it from the monad
2008-02-08 01:01:44 +00:00
Neil Brown
df832b450d
Changed the C/C++ backends to read GenOps from a reader-monad rather than passing the ops around (rough draft)
2008-02-08 00:33:44 +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
bdda623d7e
Added types to all the cases where the monomorhpism restriction applied
2008-01-26 20:51:11 +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
7d175b1d0d
Added more documentation to the testing frameworks in the backends directory.
2007-11-12 17:51:54 +00:00
Neil Brown
7433e49d49
Added support for List types to the C and C++ backend, in genType at least
2007-10-27 11:24:24 +00:00
Neil Brown
7f59eec189
Changed the C and C++ backends (and tests) to handle declarations with initialisers properly
2007-10-25 00:27:12 +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
dfee567ffc
Added tests for ClearMobile in the C and C++ backends
2007-10-24 20:52:39 +00:00
Neil Brown
48c1bea724
Added tests for the AllocMobile item in the C and C++ backends
2007-10-24 19:44:50 +00:00
Neil Brown
0eea361f95
Added tests for DerefVariable during the genVariable function for the C and C++ backends
2007-10-24 15:57:40 +00:00
Neil Brown
441b700d8d
Added tests for the new mobile types in the C and C++ backends
2007-10-21 14:16:24 +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
d4dabfd3bb
Removed unused code from the GenerateCTest module
2007-10-14 00:09:28 +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
acd09137f6
Added tests for genRetypeSizes in the C and C++ backends
2007-10-13 17:49:09 +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
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
a1f0faac8f
Added tests for RETYPES specifications in the C and C++ backends
2007-10-13 12:50:39 +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
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
3f6fe50438
Added tests for (non-case-protocol) inputs in the C and C++ backends
2007-10-10 20:45:05 +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