Neil Brown
86f0218899
Changed the occam parser to understand the MOBILE and CLONE keywords
2009-03-20 15:17:43 +00:00
Neil Brown
1c0f4d17ca
Changed the RecordType item to support multiple attributes (including mobility)
2009-03-20 15:17:15 +00:00
Neil Brown
e79fa43fa2
Fixed the last few of the channel uses to request abbreviations of channels when using them
2009-03-21 23:24:21 +00:00
Neil Brown
e0bec17672
Fixed the tests enough to get them to compile, but a lot fail
2009-03-21 23:05:11 +00:00
Neil Brown
e4bed22b7e
Various fixes to the C++ backend to at least get it compiling (not tested it much yet)
2009-03-21 23:04:25 +00:00
Neil Brown
bf2f50ba2c
Removed a lot of commented out old code in the C backend
2009-03-21 23:03:46 +00:00
Neil Brown
defca6e34d
Started simplifying some of the C backend in light of the new changes, and made a few fixes
...
The first few cgtests (at least) now pass with the new system in the C backend.
2009-03-21 22:59:25 +00:00
Neil Brown
63d6c5258d
Added an extra GCC flag to help catch problems with the C output
2009-03-21 22:57:49 +00:00
Neil Brown
88077ce755
Cleared up a problem where passes from the Rain list could be enabled in occam and vice versa
2009-03-20 15:16:20 +00:00
Neil Brown
b6b0577ecd
Fixed directed variables (for the C++ backend)
2009-03-21 21:01:25 +00:00
Neil Brown
8e768e2b25
Started fixing up the new variable stuff to work with mobiles
2009-03-21 20:50:06 +00:00
Neil Brown
87fefcb66d
Fiddled with the new variable stuff in the C backend, and now variable subscripts seem to work
2009-03-21 19:30:29 +00:00
Neil Brown
ca207f7291
Quickly implemented the first version of a revamp of the genVariable code in the C backend
...
Surprisingly, the generated code seems to be compiled by GCC without warnings. Array subscripts are currently unimplemented (a star, i.e. equivalent of subscript 0) is used wherever there should be a subscript.
The new mechanism is based on working out the C type of the original variable/abbrev-mode, the C type of the desired variable/abbrev-mode, and works out how many *s or &s to insert to coerce it to the right type.
2009-03-21 18:43:32 +00:00
Neil Brown
1343954c2f
Added an option to automatically run indent on C/C++ source before running GCC
...
This option is very handy when debugging the C/C++ output of Tock when GCC gives a compiler error.
2009-03-21 18:25:09 +00:00
Neil Brown
936dc29fde
Fixed some of the tests, and added another testcase for array passing, based on one of Carl's examples
2009-03-20 12:59:16 +00:00
Neil Brown
56cd7d73c4
Changed the channel-output code generation so that it knows the desired type being sent
2009-03-20 11:37:52 +00:00
Neil Brown
65550b705e
Added an AllSizesVariable item to the AST so that the backend inserts the right code for mobiles and non-mobiles
2009-03-20 11:31:14 +00:00
Neil Brown
f5ce1c8f89
Added the code to mobilise arrays inside protocols
2009-03-20 11:26:54 +00:00
Neil Brown
3c4f76ed46
Fixed the memory leaks arising from not clearing mobiles before an input
2009-03-19 18:18:17 +00:00
Neil Brown
7d3e9e8648
Stopped MTRelease being called with a NULL pointer
2009-03-19 16:59:19 +00:00
Neil Brown
65875f523f
Added mobile cloning rather than using dereferencing to copy mobiles
2009-03-19 16:47:31 +00:00
Neil Brown
2e99bcfc5e
Added the mobilisation of process parameters, but I think I need to clone, not dereference
2009-03-19 15:45:49 +00:00
Neil Brown
8abd09758c
Fixed the implicit mobility module to mobilise arrays inside channels
2009-03-19 15:23:56 +00:00
Neil Brown
8e5e73e3a2
Fixed the support in the backends for mobile channel stuff
2009-03-19 15:23:35 +00:00
Neil Brown
ca61da25cf
Added a function to the Types module to allow you to easily change the type of a SpecType
2009-03-19 15:13:00 +00:00
Neil Brown
26824883d6
Changed the implicit mobility to only look at mobile variables, and recorded what future use is causing a copy decision
2009-03-19 14:00:59 +00:00
Neil Brown
94d436cbaf
Added the testcase I'm using for the implicit mobility stuff
2009-03-19 11:47:31 +00:00
Neil Brown
b970b9df33
Added command line options for occam 2 mobility, and turned it off by default
2009-03-19 11:38:48 +00:00
Neil Brown
a995d29c32
Moved the mobile stuff across to use the CCSP API
2009-03-19 11:33:09 +00:00
Neil Brown
4bc15aae48
Bashed the backend until it works with the new mobility passes (standard occam may be broken though)
2009-02-27 17:12:17 +00:00
Neil Brown
823592bd1d
Added some passes to mobilise non-mobile arrays
2009-02-27 17:12:08 +00:00
Neil Brown
2dd8867c91
Removed C++CSP's mobile stuff so that I only have one unified system to deal with for now
2009-02-27 17:04:11 +00:00
Neil Brown
9614d5f7f9
Fixed the intrinsic PROCs to be generated correctly
2009-02-27 17:13:18 +00:00
Neil Brown
0d5c8f28fd
Fixed a couple of helper functions to navigate through mobile arrays properly
2009-02-27 17:09:14 +00:00
Neil Brown
4041284feb
Renamed a slightly confusing backend pass
2009-02-27 17:04:41 +00:00
Neil Brown
2a2ce367ca
Added some missing cases in the ShowCode module
2009-02-27 17:02:34 +00:00
Neil Brown
564f611fb3
Fixed the types on the string intrinstics to be unsigned char rather than char
2009-02-27 17:01:46 +00:00
Neil Brown
c787aa9fa5
Fixed a bug in the occam type inference where channels of arrays were not being processed properly
2009-02-27 17:01:07 +00:00
Neil Brown
cd1b409f96
Removed cppremoveSpec, since it was doing the same as cremoveSpec
2009-02-27 10:49:45 +00:00
Adam Sampson
69b798735f
Resolve user types when checking parallel array access.
2009-03-21 15:39:13 +00:00
Adam Sampson
77be0c1137
Add some testcases for usage-checking on user-defined array types.
...
These were based on KRoC bug #194 , submitted by Jonathan May.
2009-03-21 15:37:56 +00:00
Adam Sampson
deedad4268
Add kyb as another possible name for the keyboard channel.
2009-03-21 15:22:58 +00:00
Neil Brown
d0d5cf6779
Fixed the C++ backend where I was trying to be too clever with the sizes
2009-02-11 14:19:34 +00:00
Neil Brown
6d112a244e
Fixed when names are exempted from abbreviation checking by the PERMITALIASES pragma
2009-02-11 13:15:25 +00:00
Neil Brown
a1585c74a9
Fixed inferTypes so that it again handles Specifications in Structured ExpressionList in function definitions
2009-02-11 11:53:04 +00:00
Neil Brown
152f5fc252
Changed the abbreviation checking so that it doesn't check nonce names
...
When we pull up names (which happens before abbreviation checking), we create a lot of nonces with greater scope than the original variables. When we go to abbreviation check this, we therefore set off lots of false alarms about originally safe code. So to fix this, the easiest method seems to be turning off checking on all the names introduced by the compiler.
2009-02-11 11:23:39 +00:00
Neil Brown
18f23bf767
Fixed a small problem with the types of arrays of channel-ends in the C++ generation
2009-02-10 22:21:13 +00:00
Neil Brown
6d5c01ac69
Changed inferTypes so that directions are inferred when channels (and arrays of channels) are abbreviated
2009-02-10 22:20:51 +00:00
Neil Brown
4055746e19
Fixed typeOfVariable to handle directed inferred variables
2009-02-10 22:20:02 +00:00
Neil Brown
6db9b221af
Moved the adding of direction specifiers out of the type inferrence pass into a new pass that runs before type inference
2009-02-10 21:34:42 +00:00