Neil Brown
aaf951fe67
Split up the OccamTypes module into OccamCheckTypes and OccamInferTypes
2009-04-17 14:11:44 +00:00
Neil Brown
f36543d067
Fixed the dereference-inference for mobiles
...
The new system works by inserting code in the processing of all AST elements that directly contain a variable. If the variable needs to be dereferenced, it is. This only happens outside variables, and when a variable is subscripted. I did try putting this processing in doVariable, but then odd double-dereferences began to crop up, so I realised the processing has to happen outside the variable. It seems to pass cgtest85 fine, which it was having lots of trouble with before.
2009-04-17 11:46:00 +00:00
Neil Brown
19cd8085d2
Fixed the abbreviation modes of claimed channels a bit
...
This doesn't solve the problem (see #95 ), but it at least properly confines the problem to shared channel bundles, rather than affecting shared normal channels too.
2009-04-16 17:18:39 +00:00
Neil Brown
decd2d16df
Fixed type inference for multidimensional array literals
...
Fixes #93
2009-04-16 12:27:37 +00:00
Neil Brown
2af2563773
Changed CLAIMs to be ValAbbrev (this eases dealing with it in the C backend later)
2009-04-16 10:22:49 +00:00
Neil Brown
d419c89843
Fixed the type-checking for the allocation of mobile arrays
2009-04-15 19:37:19 +00:00
Neil Brown
681b1aa878
Added a couple of new pragmas (TOCKINCLUDE and TOCKNATIVELINK) to help with modules
2009-04-15 17:09:22 +00:00
Neil Brown
587554a5a0
Stopped INLINE PROCs and INLINE FUNCTIONs being written out to the .tock.inc files
2009-04-15 12:05:34 +00:00
Neil Brown
d03a0d4cb1
Added support for a new TOCKSIZES pragma that will be used in .module files to indicate that some .sizes should be loaded
2009-04-14 17:05:37 +00:00
Neil Brown
058ed31cad
Changed the implicit modules to be INCLUDEd rather than USEd (duh!)
2009-04-14 17:04:46 +00:00
Neil Brown
ce15465849
Made the preprocessor be a little clearer with regards to its suffix workings
2009-04-14 17:04:13 +00:00
Neil Brown
433be2105b
Corrected the parser to accept normal channels with only one end shared
2009-04-14 12:07:41 +00:00
Neil Brown
1a3df54ee7
Fixed SKIP not being allowed as a guard without a precondition
2009-04-14 11:13:00 +00:00
Neil Brown
71267f12d5
Fixed direction specifiers in the LHS of a RETYPES confusing the parser
2009-04-14 11:12:44 +00:00
Neil Brown
bf8c87b873
Fixed the type-checking so that user-defined types that are mobile type-check properly
2009-04-13 22:41:07 +00:00
Neil Brown
f2c4ada01b
Removed PolyplateSpine in favour of using PolyplateM (and the State monad) everywhere
2009-04-13 20:37:14 +00:00
Neil Brown
04974ae470
Fixed various typing problems involving channel bundles
2009-04-13 19:20:15 +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
80dac0492b
Fixed a bug where specifications were being misinterpreted inside IFs during parsing
...
I find it surprising this bug had been in there so long. It was interpreting "INT i" as an expression in an IF, then couldn't resolve i, rather than backing out and correctly parsing the whole line, "INT i:" as a specification.
2009-04-12 16:26:54 +00:00
Neil Brown
c8b724d2be
Merged the latest set of changes from the trunk into the Polyplate branch
...
I also added the import list to all the Data.Generics imports in the tests (as I did for the other modules recently)
2009-04-10 20:38:29 +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
e61a23855a
Fixed all the conflicts while merging into the Polyplate branch
2009-04-09 11:01:39 +00:00
Neil Brown
ae74752336
Fixed a bug introduced in the Polyplate merging where findDir wasn't working properly
2009-02-11 16:02:56 +00:00
Neil Brown
9294febd6f
Converted addDirections to the Polyplate traversals, and fixed inferTypes to work in Polyplate (more merging from trunk)
2009-02-11 12:17:28 +00:00
Neil Brown
a72b01ff02
Merged the latest changes from my usage checking into the polyplate branch
2009-02-10 17:11:24 +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
5a10e94c6a
Fixed various conflicts between the Polyplate branch and the latest changes in the trunk
2009-01-28 15:48:08 +00:00
Neil Brown
ccb6c7aa1d
Fixed the types in various test modules to work with Polyplate
2008-12-14 19:18:00 +00:00
Neil Brown
2349474ba6
Fixed the occam modules to work with the new Polyplate type-classes
2008-12-14 18:52:52 +00:00
Neil Brown
1141ecb472
Fixed the Rain modules to use the new Pass system/types
2008-12-14 18:35:39 +00:00
Neil Brown
aa10b0113d
Allowed direction specifiers to be added to variables that are channel bundles when they are passed as arguments
2009-04-12 13:51:48 +00:00
Neil Brown
da43dcb3f5
Allowed multiple empty dimensions in mobile types, not just one
2009-04-12 13:51:32 +00:00
Neil Brown
5534d1c3d6
Fixed some problems with DATA TYPEs that were actually MOBILE stuff not being resolved at the right points
2009-04-12 13:50:59 +00:00
Neil Brown
ddbec737f2
Got all the tests compiling again after recent changes
...
For some reason, the usage check tests are now very slow to run (perhaps because of all the operator definitions added to each one?), which needs further investigation.
2009-04-10 19:29:40 +00:00
Neil Brown
e462da4a76
Added a system for specifying implicitly-used modules on the command-line
...
An implicitly used module is equivalent to a #USE directive before the first line of the main file. This, combined with changes in occbuild, are my current way of implementing the automatic use of the forall module in occam.
2009-04-10 19:26:22 +00:00
Neil Brown
09ea5fd610
Fixed operators not being written correctly to include files
2009-04-10 18:26:39 +00:00
Neil Brown
ce0214cbf4
Fixed operators defined inside functions not being recorded in csOperators
2009-04-10 16:07:18 +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
92c92a3f65
Fixed various small mobile typing issues
2009-04-09 17:05:16 +00:00
Neil Brown
229f2197af
Turned findMeta into a member of a FindMeta type-class
2009-04-09 11:13:37 +00:00
Neil Brown
998cf1c005
Fixed various bits of type-inference in OccamTypes
2009-04-09 10:00:03 +00:00
Neil Brown
de097bb138
Fixed type-checking on ambigious record fields, so that now the cgtests are happy again
2009-04-08 19:11:33 +00:00
Neil Brown
6814ac2679
Added a joinWith helper (short for concat . intersperse) and changed most of the uses in the code to use the helper function
2009-04-08 16:28:23 +00:00
Neil Brown
397d8b7936
Resolved the types of the operators before searching through them for matches
2009-04-08 12:30:48 +00:00
Neil Brown
dc4cfe331b
Made the operator search ignore the values of array dimensions, as it should do
2009-04-08 12:23:45 +00:00
Neil Brown
1ea35c6715
Fixed the name munging for declared user-defined operators
2009-04-08 12:14:05 +00:00
Neil Brown
d782c91ed0
Added some missing occam operators to the various lists
2009-04-08 12:03:48 +00:00
Neil Brown
26be673ce1
Made sure that user-defined types are resolved before looking for matching operator definitions
2009-04-08 10:18:14 +00:00
Neil Brown
49d6e2aaaf
Reworked how the stack sizes are recorded and merged together
...
The previous method, using the C preprocessor was both nasty, and crazily resource-intensive. The new method stores stack size information in files that are read in and processed by the compiler when it comes time to link.
2009-04-07 16:03:52 +00:00
Neil Brown
a8c9802f5d
Changed the occam type checker to handle checking user defined operators better
...
They are now recursed into with no type context, then afterwards the type is deduced. This seems to be how they were meant to work, and is also much faster than what I was doing.
2009-04-07 15:52:06 +00:00