Commit Graph

1360 Commits

Author SHA1 Message Date
Neil Brown
c778ff0031 Fixed some unused module import warnings, now that PassM is not build of monad transformers 2008-03-10 17:19:45 +00:00
Neil Brown
9f18b348e8 Corrected all the tests to use the new PassM monad 2008-03-10 17:07:48 +00:00
Neil Brown
a123981a74 Changed the running of the PassM monad to use the new mechanism 2008-03-10 15:19:50 +00:00
Neil Brown
6abda39ee2 Fixed a couple of uses of the PassM monad that depended on the old mechanism 2008-03-10 15:19:28 +00:00
Neil Brown
e3af6eecc1 Defined a custom monad for PassM rather than using the monad transformers in a stack 2008-03-10 15:18:31 +00:00
Adam Sampson
8aae275895 Fix ALT enabling in the C backend. 2008-03-10 11:38:25 +00:00
Neil Brown
0b93e67ca3 Fixed the last load of backend tests, for specs and actuals 2008-03-09 19:32:09 +00:00
Neil Brown
9b2f6b9e2b Updated a couple of the retypes-sizes tests for the backend 2008-03-09 19:23:46 +00:00
Neil Brown
9533fa9926 Reversed the effect of an earlier patch (to put timers back in the C++ backend) now that I've seen Adam's patch that fixes it anyway 2008-03-09 19:04:34 +00:00
Neil Brown
76aeabe747 Fixed genRetypesSizes to work properly again with arrays with a non-fixed dimension (oops) 2008-03-09 18:54:37 +00:00
Neil Brown
3d1aae72fc Fixed a couple of tests for a Rain pass 2008-03-09 18:43:22 +00:00
Neil Brown
0711a818ad Added dependencies on the AST module for GenOrdAST and GenTagAST 2008-03-09 18:42:02 +00:00
Neil Brown
f8cd341cd8 Fixed the tests for array slicing 2008-03-09 18:21:16 +00:00
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
dd14f6b62a Fixed one of the tests for declareSizesArray that had not been updated 2008-03-09 16:57:38 +00:00
Neil Brown
c1f0ff92c9 Corrected the transformation of AFTER for the BYTE type 2008-03-09 16:26:50 +00:00
Neil Brown
668983f1e5 Adjusted the tests for the new type of genArraySubscript 2008-03-09 16:20:06 +00:00
Neil Brown
0265063250 Re-added the index checking for array slices in the backend 2008-03-09 16:19:01 +00:00
Neil Brown
3d1945b517 Changed the code handling SizeVariable to output the size as an integer if it is known 2008-03-09 16:18:13 +00:00
Neil Brown
35b1ffdc51 Added a new pass to turn all array slices into the full FromFor form 2008-03-09 16:15:24 +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
c733ac2cff Fixed the C++ backends so that it continues to declare timer variables, even though the C backend doesn't any more 2008-03-09 12:48:26 +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
15d3d98850 Selected a compacting garbage collector when compiling the cg tests, as it seems to go faster and use less memory 2008-03-08 14:48:53 +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
c87581e490 Tidied up the export list for the GenerateC module 2008-03-08 14:03:10 +00:00
Neil Brown
5197435b2c Removed a lot of old comments and support code relating to the way arrays used to be handled in the C++ backend 2008-03-08 13:52:50 +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
Neil Brown
126dcdb4bb Removed all the unnecessary stuff from the C backend that used to be there for array sizes 2008-03-08 12:36:38 +00:00
Neil Brown
66a7ae9b58 Refactored the C backend, removed the abbrevVariable and genSlice functions 2008-03-08 11:55:56 +00:00
Neil Brown
3c070f035c Removed the code for initialising members - it is unneeded, and will no longer work until the ensuing _sizes declaration 2008-03-08 00:09:28 +00:00
Neil Brown
a4646f88fa Removed the C++ version of genDeclaration, deferring instead to the C version 2008-03-08 00:08:19 +00:00
Neil Brown
3f02caba7c Changed the handling of retypes with arrays to handle source items with unknown size 2008-03-08 00:06:35 +00:00
Neil Brown
24ddcf6f0d Changed chansToAny to use the makeGeneric pass structure 2008-03-07 23:32:00 +00:00
Neil Brown
5ae8aca68e Fixed the sizes of retyping a multi-dimensional array 2008-03-07 22:46:39 +00:00
Neil Brown
8030161a90 Changed bytesInType to use the new module for getting the size of the bool and int types 2008-03-07 21:24:20 +00:00
Neil Brown
5714b5552a Added an automatically generated module containing the sizes of bool and int in the C and C++ implementations on the host machine 2008-03-07 21:23:24 +00:00
Neil Brown
235ce3d3e5 Added a clean target to the cgtests makefile 2008-03-07 21:22:33 +00:00
Neil Brown
8d44077891 Refactored and enhanced the declareSizesArray pass 2008-03-07 15:54:10 +00:00
Neil Brown
5a42b7eb0c Corrected a test for abbreviating array variables 2008-03-07 15:52:05 +00:00
Neil Brown
fdef3b1924 Corrected genVariable to obey checkValid when working out the types for array slices 2008-03-07 15:51:27 +00:00
Neil Brown
ffc4594604 Removed some more unneeded code from GenerateCPPCSP, deferring to the C implementation 2008-03-07 15:49:09 +00:00
Neil Brown
f0fceb5aee Stopped array literals being pulled up out of record literals in C++, now that the array handling has been changed 2008-03-07 15:48:24 +00:00
Neil Brown
e3fed836c5 Made the cgtest compilation depend on tock, to force recompilation 2008-03-07 10:02:15 +00:00
Neil Brown
8d411184c1 Corrected the size of array slices 2008-03-07 10:00:02 +00:00