Commit Graph

2327 Commits

Author SHA1 Message Date
Neil Brown
dbf0b90601 Fixed array sizes for external procs to have one extra formal per dimension, rather than passing the whole array in a single formal (this is now how it should work!) 2009-03-27 16:28:23 +00:00
Neil Brown
74e3f61614 Fixed arrays of user data types that are arrays to be flattened into a multidimensional array, rather than an array of arrays 2009-03-27 16:24:15 +00:00
Neil Brown
63cb30802e Fixed the type inference for CLAIMs 2009-03-27 16:24:01 +00:00
Neil Brown
7764b4caf8 Added some debug messages during usage checking, and stopped checking PROCs with one argument for alias issues 2009-03-27 12:02:52 +00:00
Neil Brown
363ef6a9bc Made sure that user types are resolved when type-checking for occam 2009-03-27 09:44:05 +00:00
Neil Brown
574694d078 Fixed some stuff on external PROCs (the adding of sizes parameters) 2009-03-26 23:58:08 +00:00
Neil Brown
6e66cf7521 Added a command-line option to change how much stack the unknown functions are given 2009-03-26 22:49:38 +00:00
Neil Brown
eb99480484 Finished off the support for external C functions 2009-03-26 22:37:28 +00:00
Neil Brown
95d7144c7b Added the ability to specify linker flags separately from C compilation flags 2009-03-26 22:36:13 +00:00
Neil Brown
09093cff12 Added the ability to print out HTML-highlighted lexed occam
This falls a bit outside the compiler's remit, but it will be the same code to print out the lexed occam without highlighting, which I plan to use for doing libraries with Tock in a bit.
2009-03-26 22:34:34 +00:00
Neil Brown
733293745e Added a work-around for generating infinity and NaN in the C backend 2009-03-26 18:39:23 +00:00
Neil Brown
86bbdc8b8e Changed the constant folder to fold RetypesExpr 2009-03-26 18:38:53 +00:00
Neil Brown
bd2dfe3d2a Fixed pullUp so that it pulls up PROC parameters again 2009-03-26 18:38:28 +00:00
Neil Brown
ffbf4bed87 Removed a few bits of awkwardness in Unnest 2009-03-26 18:37:16 +00:00
Neil Brown
d35825ec50 Added support for constant-folding reals, and for constant-folding RETYPES 2009-03-26 18:33:14 +00:00
Neil Brown
96984250b7 Added some missing cases to the ShowCode module 2009-03-26 18:30:30 +00:00
Neil Brown
633a3dbbc5 Quickly added a command line option to allow you to specify flags to pass to the C/C++ compiler 2009-03-25 22:35:49 +00:00
Neil Brown
cd36f383c9 Turned off unused variable checking for now -- I think it's bugged 2009-03-25 18:33:23 +00:00
Neil Brown
1c4d44b739 Fixed generation of C types for channels (somewhere, one is being abbreviated with ValAbbrev, so I'll allow it for now) 2009-03-25 18:27:13 +00:00
Neil Brown
127a72ad5e Fixed channel arrays in PROC parameters to be pulled up 2009-03-25 18:26:33 +00:00
Neil Brown
fd7de709c0 Fixed the counter-example generation so that it works even when inequalities remain after the problem has been solved
Fixes #86.
2009-03-25 17:56:30 +00:00
Neil Brown
9cf4efee69 Added processing of the new types of actuals in the code for getting variables for usage checking 2009-03-25 16:39:06 +00:00
Neil Brown
9b753edde2 Got arrays abbrevs with unknown dimensions in the type to take the type from the RHS 2009-03-25 16:38:40 +00:00
Neil Brown
5418916245 Added the parsing of channel-array literals in PROC parameters 2009-03-25 16:38:21 +00:00
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