Neil Brown
d98c5079ca
Cleaned up all the warnings in Tock's code (most unused modules, or unused functions)
2009-05-19 09:05:38 +00:00
Neil Brown
3a5565471f
Added support for extended rendezvous throughout the compiler
2009-04-19 16:26:37 +00:00
Neil Brown
56e9609148
Fixed CHAN TYPE stuff not working properly in ShowCode
2009-04-18 21:34:14 +00:00
Neil Brown
46b1b29e12
Moved some of the operators stuff out into its own module, and corrected ShowCode to display operators nicely
2009-04-18 21:03:12 +00:00
Neil Brown
307b0f906f
Added some missing bits to ShowCode
2009-04-18 20:07:58 +00:00
Neil Brown
57ffc7bfa4
Split out a chunk of CompState into a CompOpts type for things that can be set on the command-line
2009-04-17 21:10:14 +00:00
Neil Brown
e409b15b58
Merged latest patches from trunk into Polyplate
2009-04-13 16:58:07 +00:00
Neil Brown
d4a119ecf4
Added lexing, parsing and type-checking support for FORKING and FORK
2009-04-13 14:57:03 +00:00
Neil Brown
8f767ff0d4
Made all the imports of Data.Generics have an import list
...
This makes sure that we catch all leftover instances of using SYB to do generic operations that we should be using Polyplate for instead. Most modules should only import Data, and possibly Typeable.
2009-04-09 15:36:37 +00:00
Neil Brown
c69ea8815d
Merged in the latest changes from the trunk into the Polyplate branch
2009-02-03 13:14:07 +00:00
Neil Brown
560b67de5e
Added a missing case in showOccamM for A.Type
2008-12-14 18:26:10 +00:00
Neil Brown
e53da5822f
Fixed a problem where operators with % in the name were screwing up an error message
2009-04-10 16:06:49 +00:00
Neil Brown
238abc5070
Removed all the stuff from the ShowCode module that used to deal with operators
2009-04-05 22:38:00 +00:00
Neil Brown
e457d82f0c
Changed FUNCTIONs and PROCs to have optional bodies, and put all the externals into the AST (without bodies)
...
This may seem like an odd change, but it simplifies the logic a lot. I kept having problems with passes not operating on externals (e.g. functions-to-procs, adding array sizes, constant folding in array dimensions) and adding a special case every time to also process the externals was getting silly.
Putting the externals in the AST therefore made sense, but I didn't want to just add dummy bodies as this would cause them to throw up errors (e.g. in the type-checking for functions). So I turned the bodies into a Maybe type, and that has worked out well.
I also stopped storing the formals in csExternals (since they are now in csNames, and the tree), which streamlined that nicely, and stopped me having to keep them up to date.
2009-04-04 14:56:35 +00:00
Neil Brown
5024e0d615
Fixed the generation of formals that are arrays of channel-ends
2009-04-02 15:58:35 +00:00
Neil Brown
1e538fc592
Fixed ShowCode to print direction specifiers in the right place after variable names, as it's important now that what we spit out for PROC headers is legitimate occam
2009-04-01 17:08:04 +00:00
Neil Brown
dbf886996a
Removed various bits of old code relating to the old sizes mechanism
2009-03-31 10:50:04 +00:00
Neil Brown
3876c1b6e9
Added support for VariableSizes to the ShowCode module
2009-03-30 15:33:10 +00:00
Neil Brown
96984250b7
Added some missing cases to the ShowCode module
2009-03-26 18:30:30 +00:00
Neil Brown
45b22472c3
Changed the rest of tock to reflect the changes to the Is constructor
2009-03-24 23:57:24 +00:00
Neil Brown
41805aaacf
Changed the ChanEnd constructor to only keep information about its shared-ness, not about the whole channel
2009-03-23 18:40:28 +00:00
Neil Brown
8af024e08d
Fixed a ShowCode comment and added a missing case
2009-03-23 15:55:15 +00:00
Neil Brown
8492dc03d4
Introduced a ShareMode in the AST, and used it in the channel attributes (rather than Bool)
2009-03-22 22:29:39 +00:00
Neil Brown
1044a94730
Changed most of the rest of Tock (except some tests) to understand the new record attributes
2009-03-20 15:18:29 +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
2a2ce367ca
Added some missing cases in the ShowCode module
2009-02-27 17:02:34 +00:00
Neil Brown
ec1341849d
Added a ShowOccam instance for A.Dimension
2009-02-02 23:51:15 +00:00
Neil Brown
8de2dbca88
Adjusted the modules in common to match the new array constructor change
2009-02-01 21:52:13 +00:00
Neil Brown
594d7ef242
Tweaked various code in the common and checks directory to work with the new step count in the For replicator
2009-01-28 23:43:16 +00:00
Neil Brown
336c5abe3c
Fixed the ShowCode module to work with the new channel-ends
2009-01-20 17:27:10 +00:00
Neil Brown
192ccd4e2c
Extended the type unification for Rain to support type-checking things that are being poisoned (which could be either end of a channel)
2008-09-12 14:40:04 +00:00
Adam Sampson
19484ec72e
Show channel attributes in occam code.
2008-06-09 12:36:26 +00:00
Neil Brown
41ff60cb78
Removed the Rep constructor from Structured and instead added a Rep constructor to SpecType
...
This way, all replicators are declared like other names, and their scope is considered replicated. This simplifies the code a little.
Fixes #55
2008-06-04 17:00:43 +00:00
Neil Brown
4e6b166696
Fixed implicit mobility to work in the (C++, at least) backend
2008-06-01 19:46:32 +00:00
Neil Brown
e66ce1f810
Added a line to ShowCode for dereferenced variables
2008-06-01 19:25:33 +00:00
Neil Brown
969c04d42b
Improved the Rain support in ShowCode a little
2008-06-01 17:58:40 +00:00
Adam Sampson
8b3eba594d
Add SubscriptCheck field to SubscriptFromFor etc.
...
This makes it possible to mark a slice as not needing runtime
checking, which is immediately useful for _sizes arrays.
This fixes cgtest03, which was previously failing to compile because
the _sizes array for one of the constants in it contained a runtime
check and thus wasn't itself constant. I've added a testcase file for
the relevant bit of code.
2008-05-26 17:36:26 +00:00
Neil Brown
2300a5c3a7
Added a few extra cases in ShowCode, for some Rain things
2008-05-20 23:42:52 +00:00
Neil Brown
8c78d056b6
Improved display of unknown types (for debugging, really)
2008-05-20 22:07:35 +00:00
Neil Brown
fb090a3618
Hacked the ShowCode module quickly to display a lot more Rain code (stealing from the occam stuff, and twiddling it slightly)
2008-05-17 22:21:18 +00:00
Neil Brown
e6162877af
Changed the AST to fix the different unknown/inferred types
...
The Infer type (used by the occam frontend) is now separated from the "Unknown" types used in type unification that I'm experimenting with in Rain.
2008-05-17 12:47:31 +00:00
Neil Brown
962c1477b9
Added a special type for marking the type of numeric literals to be inferred later
2008-05-14 11:59:33 +00:00
Neil Brown
3daf82d318
Merged Alternative and AlternativeCond into a single Alternative item that always has a pre-condition
2008-04-03 14:52:37 +00:00
Adam Sampson
37b5735de1
When showing occam code, use CHAN/PORT rather than CHAN OF/PORT OF.
2008-04-05 23:19:12 +00:00
Adam Sampson
e52b51b050
Add an Infer type to mark types that should be inferred.
...
We can then check it's been removed using a property later.
2008-04-04 12:09:33 +00:00
Adam Sampson
3283b7db41
Remove the Type/AbbrevMode information from Actual*.
...
It's redundant, since you can always compute them from the variable, and it
makes the code that deals with actuals rather cleaner.
On the other hand, it slightly complicates some of the tests, because any names
you use in an Actual need to be defined...
2008-03-26 18:16:09 +00:00
Neil Brown
c68aa42277
Added a sub-type to Timers, to support multiple types
2008-03-23 22:20:16 +00:00
Neil Brown
7830d82c51
Fixed the display of names in ShowCode for Rain
2008-03-23 12:13:55 +00:00
Adam Sampson
8b5233ba47
Add ShowCode instances for A.Name.
2008-03-22 00:42:00 +00:00
Neil Brown
a6452f93df
Added a ShowOccam and ShowRain instance for lists of things
2008-03-20 16:34:11 +00:00