Neil Brown
7cbe98d200
Modified the lexer and parser to be able to parse PRAGMA EXTERNAL (and added #DEFINE support in the lexer)
2009-03-25 16:36:59 +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
53f7378988
Merged IsClaimed, IsChannelArray and IsExpr into Is, which now takes an Actual
2009-03-24 23:56:53 +00:00
Neil Brown
eaa8ece954
Fixed allocation of mobile channel bundles, as apparently a clone is unnecessary
2009-03-24 23:54:13 +00:00
Neil Brown
5ffea3f78e
Added a lex mode to Tock that shows how a program was lexed
2009-03-24 18:18:55 +00:00
Neil Brown
030e06f173
Allowed pragmas at the top-level of an occam file
2009-03-24 02:15:23 +00:00
Neil Brown
b100b828e1
Fixed the lexer so that it will give an error about pragmas rather than an internal failure
2009-03-24 02:14:51 +00:00
Neil Brown
e269efe388
Added some quick hacks to make recursive PROCs work
...
This is along the lines of the Tock ticket. cgtest90 (recursive FUNCTIONs) now passes, but cgtest91 (recursive PROCs) doesn't, because it uses barriers.
2009-03-24 00:14:14 +00:00
Neil Brown
e08197bbef
Added various bits for shared channels, which now means that cgtest86 compiles and passes
2009-03-24 00:08:02 +00:00
Neil Brown
10b4cd7cfc
Realised that allocating mobile arrays as arrays of bytes screws up the resize intrinsic, and gave it a helping hand
2009-03-23 21:28:28 +00:00
Neil Brown
d3f4ff1a9a
Corrected BYTESIN for mobile arrays
2009-03-23 21:18:52 +00:00
Neil Brown
658bfd08e4
Added some code to deal with channel bundles
2009-03-23 21:14:10 +00:00
Neil Brown
7458014c2c
Fixed the C types for records, again
2009-03-23 21:13:55 +00:00
Neil Brown
585a5ed477
Realised that mobile arrays should be allocated after all, unless they are missing a dimension
2009-03-23 21:13:13 +00:00
Neil Brown
3739ff7cbd
Added some extra paranoid bracketing
2009-03-23 21:12:46 +00:00
Neil Brown
34ae9861d0
Marked up channel bundles as being mobile
2009-03-23 21:12:36 +00:00
Neil Brown
f73171140c
Fixed a subtle bug with conflicting abbreviation modes in the PROCS generated to copy records
2009-03-23 21:08:40 +00:00
Neil Brown
9c433b248a
Tried using my new CCSP helper function to allocate arrays
2009-03-23 18:59:57 +00:00
Neil Brown
78f9fb6196
Added support in recordFields for channel bundles (which are similar enough to records)
2009-03-23 18:59:41 +00:00
Neil Brown
19e0fb0573
Added an AllocChannelBundle constructor in ExpressionList for assignments that allocate the two ends of a mobile channel bundle
2009-03-23 18:58:50 +00:00
Neil Brown
04108613d9
Added support to a couple of functions for the IsClaimed SpecType
2009-03-23 18:56:48 +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
e8fec8585b
Stopped mobile arrays being allocated after declaration (with random size!)
2009-03-23 15:56:04 +00:00
Neil Brown
919781eabc
Fixed the generation of mobile array dereferences
2009-03-23 15:55:38 +00:00
Neil Brown
8af024e08d
Fixed a ShowCode comment and added a missing case
2009-03-23 15:55:15 +00:00
Neil Brown
ef4c73aece
Added support in the parser for allocating mobile channel bundles, and for shared normal channels
2009-03-23 15:54:49 +00:00
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