Commit Graph

2327 Commits

Author SHA1 Message Date
Neil Brown
69d7bc6455 Fixed recursive channel bundle types to work properly 2009-03-23 15:54:24 +00:00
Neil Brown
2d232dd322 Fixed subscripting of channel bundles to be corrected like record field subscripts are 2009-03-23 15:53:56 +00:00
Neil Brown
084861e0be Altered the parser to change CLAIM from being a process into a specification 2009-03-23 15:52:44 +00:00
Neil Brown
1edabee2e7 Changed the AST claim element to be an abbreviation rather than a process 2009-03-23 15:52:19 +00:00
Neil Brown
4493b3d9e4 Removed some of the mobile passes at Carl's suggestion that I didn't need them anyway 2009-03-23 15:51:11 +00:00
Neil Brown
228523e7e7 Added the generation of IsDefined checks, and stopped them being applied to derefenced arrays 2009-03-23 15:48:24 +00:00
Neil Brown
fae0d6d6a2 Made intrinsic PROCs take the workspace as a parameter, and turned . to _ in their names (and implemented the RESIZE.MOBILE.ARRAY.1D intrinsic) 2009-03-23 15:46:24 +00:00
Neil Brown
5f9d0c6429 Added various keywords, AST elements and parser bits related to channel bundles, claim blocks and shared channels 2009-03-22 22:49:49 +00:00
Neil Brown
3ae4824184 Added a missing case to the C backend 2009-03-22 22:49:10 +00:00
Neil Brown
0fc7266c29 Fixed various things to do with abbreviating sizes arrays, and corrected array assignment and the mobile type for Bool 2009-03-22 22:32:56 +00:00
Neil Brown
be36af4bf0 Added a work-around for resolving user defined types in the CompState 2009-03-22 22:31:49 +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
7b52565270 Fixed a few things that work around the user data types problem 2009-03-22 21:06:31 +00:00
Neil Brown
0a97946fbf Fixed various type-checking things related to mobile types 2009-03-22 21:05:36 +00:00
Neil Brown
9913bddb28 Fixed array constructor types that have been lifted to mobile arrays 2009-03-22 21:05:05 +00:00
Neil Brown
12b3c4cd89 Added a pass (and adjusted the backends) to deal with the move-in move-out semantics of mobiles
Also known as communication semantics, I think.  The pass adds an extra channel parameter per mobile (perhaps in future this could be a single extra channel?) that is used to send back the mobile value, and hacked the backend so that the communications to receive these mobiles are done in the right place (after the processes have been run, but before waiting on the barrier for them to complete).

cgtest83 now compiles, runs and passes without a segfault.
2009-03-22 18:28:42 +00:00
Neil Brown
d12d630de1 Added some code to allocate a mobile before a dereferenced input 2009-03-22 18:28:19 +00:00
Neil Brown
20f2fb2c14 Renamed squashArrays to backendPasses, since that's what it has become 2009-03-22 18:27:10 +00:00
Neil Brown
4f6050069c Moved isMobileType into the Types module where it belongs 2009-03-22 18:26:14 +00:00
Neil Brown
3831a007f7 Finally got round to adding a little program to qualify the AST tags in the TAGS file 2009-03-22 15:51:43 +00:00
Neil Brown
68161bdfea Fixed one of the occam passes so that it no longer enforces that mobile array dimensions are statically known 2009-03-22 15:00:08 +00:00
Neil Brown
4fd2c7c890 Took out my warning option since it causes problems 2009-03-22 14:50:25 +00:00
Neil Brown
854a1fca50 Fixed various things in the C backend and made genVariable more flexible, for functions that want to specify the C type desired 2009-03-22 14:49:35 +00:00
Neil Brown
3801857817 Fixed a bug in the C backend (using the wrong type in a call) 2009-03-22 14:27:46 +00:00
Neil Brown
81ebebe4fe Added a quick work-around in SimplifyAbbrevs for the SYB-Map issue 2009-03-22 00:32:56 +00:00
Neil Brown
2fc327287a Fixed various conflicts in the backends directory while merging one of my branches 2009-03-21 23:43:04 +00:00
Neil Brown
90634ff1d6 Improved the error message for getting the C type to leave the mobile wrapper on 2009-03-21 23:41:54 +00:00
Neil Brown
f5fa5e5caf Fiddled with the code supplying the mobile types to MTAlloc 2009-03-20 21:20:43 +00:00
Neil Brown
03f1b2d115 Added a few more mobile things (DEFINED keyword, an intrinsic) 2009-03-20 20:53:51 +00:00
Neil Brown
1d43b9d7bd Poked the mobile and record stuff until cgtest83 compiles (it blows up on running, but it compiles) 2009-03-20 19:24:54 +00:00
Neil Brown
bbabef868c Moved the comma-related helper functions to the GenerateCBased module 2009-03-20 19:24:20 +00:00
Neil Brown
3a7b2aaaf4 Added a function for getting the attributes of a record type 2009-03-20 19:10:11 +00:00
Neil Brown
64f58f3770 Fiddled the occam type checker and inference to understand the basics of mobile types (and infer the dereferences) 2009-03-20 15:19:06 +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
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