Neil Brown
b83bcc0f34
Added INITIAL variable abbreviations (as specifications) to the occam parser
2008-03-10 22:55:57 +00:00
Neil Brown
239dea3f36
Made the OF in CHAN OF optional in the occam parser
2008-03-10 22:43:18 +00:00
Adam Sampson
3005dfb506
Add a pass for folding constants in occam.
...
The existing constant-folding code in the parser is still there, since it needs
to know whether things are constant, and A.Dimension expects an Int.
However, this pass is useful because it does a better job of constant folding
than the parser would on its own: it can fold subexpressions of expressions
that are as a whole not constant.
2008-03-17 15:48:43 +00:00
Adam Sampson
3340e95806
Make agg_typesDone include constantsFolded.
...
This is so that constant folding gets done early; it's important that it
doesn't happen after anything that tries to pull values into variables later
on.
2008-03-17 15:47:57 +00:00
Adam Sampson
ca230be268
Use Prop.agg_typesDone rather than listing its members.
2008-03-17 15:47:29 +00:00
Adam Sampson
1124bb5a44
Use either Alt or TimerAlt as appropriate.
2008-03-15 15:15:21 +00:00
Adam Sampson
89040a97b0
Move the dummy occam pass into an OccamPasses module.
...
(The plan is to gradually replace it with real passes.)
2008-03-15 14:40:17 +00:00
Adam Sampson
79a5799b8f
Some minor cleanups to ParseOccam.
2008-03-15 14:10:51 +00:00
Adam Sampson
54668d3ba2
Implement the RESCHEDULE intrinsic.
2008-03-15 11:00:11 +00:00
Adam Sampson
4a68dda2b5
Clean up the generation of wrapper Procs for Pars.
...
Procs that are in csParProcs are now generated with the correct calling
convention directly, rather than having a second wrapper function generated
around them.
2008-03-14 22:01:59 +00:00
Adam Sampson
9c2a6b6656
Handle both addl and subl for stack increases.
...
GCC seems to very occasionally generate addl -N rather than subl N.
Also don't allow subl -N any more -- if it's adjusting the stack pointer back
up, that doesn't mean it's going to use any less of the stack...
2008-03-14 22:00:36 +00:00
Adam Sampson
5156626ab0
Remove the identifyParProcs pass.
...
All it did was to make a list of the Procs generated by parsToProcs, so
parsToProcs may as well just do the same job itself.
The reason I'd made it a separate pass originally was that I wanted to
optimise out the wrapper when the child of a Par was already a ProcCall.
That optimisation isn't going to be possible any more with the new CCSP,
since wrappers have to fetch their arguments in a different way from
ordinary Procs.
2008-03-14 14:53:05 +00:00
Adam Sampson
26c9e5b57f
Tidy up "tocktest --help" to match "tock --help".
2008-03-13 10:55:49 +00:00
Adam Sampson
3996a1379b
Update BackendPassesTest to match my last _sizes change.
2008-03-13 10:52:23 +00:00
Adam Sampson
6df110dce4
Wrap QuickCheck tests into HUnit tests.
...
This means all the tests now get run as part of one list, and HUnit keeps track
of the number of failures for us. (The reason I was doing this was so that
tocktest will exit non-zero on QuickCheck test failure too.)
As part of this, I've reworked TestMain's main function quite a bit. It'll now
filter QuickCheck tests into response to options too.
2008-03-12 19:38:02 +00:00
Adam Sampson
8120a75186
Clean up TestUtils.
...
Reorder functions in categories, and add some folds so it's easier to navigate.
2008-03-12 18:27:30 +00:00
Adam Sampson
808277ca84
Remove now-unused code for running timed tests.
2008-03-12 18:21:22 +00:00
Adam Sampson
ba10c85fc0
Set TESTS, so tocktest gets run on "make check".
2008-03-12 18:11:31 +00:00
Adam Sampson
f71998f8ec
Exit non-zero if any of the HUnit tests fail.
2008-03-12 18:06:36 +00:00
Adam Sampson
0c1bf64302
Fix Haddock for TestMain.
2008-03-12 17:32:19 +00:00
Adam Sampson
b814e81bec
Do away with the killval hack.
...
This now uses the same approach to detect a kill as libkrocif.
2008-03-12 16:43:15 +00:00
Adam Sampson
006559271d
Declare size arrays before the corresponding real arrays.
...
This is because we sometimes need the size array while initialising the real
array -- for example, if we're initialising a 2D array of channels.
2008-03-12 15:14:00 +00:00
Adam Sampson
d7333e4479
Implement FLUSH in the output handlers.
2008-03-12 14:48:27 +00:00
Adam Sampson
88af6a29d2
Abstract CCSP setup into a function, and set up terminal properly.
...
If stdin is in use, it'll now be put into non-canonical mode. This is almost
the same as libkrocif's behaviour, except I've set VTIME to 0, since I don't
think there's a good reason to have a terminal read complete if no characters
are available.
This also sets CCSP's branding to "Tock", so error messages now start "Tock: ".
2008-03-12 14:38:58 +00:00
Adam Sampson
ac532be667
Implement stdin input handler.
...
This uses a slight hack to figure out when a killable BSC has actually been
killed (which I think should probably be a CCSP feature anyway).
2008-03-12 12:01:40 +00:00
Adam Sampson
f2d3280cee
Abstract killing TLP channel handlers out into a function.
2008-03-12 10:47:19 +00:00
Adam Sampson
8880413128
Use TimerAlt rather than Alt.
...
It really ought to pick the right one depending on whether there are any timer
guards.
2008-03-11 18:52:35 +00:00
Adam Sampson
7eaab68f04
Implement TLP output channels using a CIF helper process.
...
Input channels will be similar, but are stubbed out for now.
2008-03-11 18:47:48 +00:00
Adam Sampson
882d0c002a
Remove debugging code.
2008-03-11 17:43:54 +00:00
Neil Brown
5002b73238
Changed the cgtests to no longer use a custom garbage collector
2008-03-10 17:23:37 +00:00
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