Neil Brown
d4938a166c
Fixed some more Rain tests related to the old method of inferring types
2008-06-01 17:21:14 +00:00
Neil Brown
155f58c174
Fixed the Rain parser tests with respect to the new type inference
2008-06-01 16:48:15 +00:00
Neil Brown
edbfea163f
Changed FlowGraphTest to compile against my latest changes
2008-05-30 19:44:26 +00:00
Neil Brown
fe525fa088
Simplified the deriving clause for Var in UsageCheckUtils, effectively using the GHC NewTypeDeriving extension
2008-05-30 18:39:59 +00:00
Neil Brown
600ce667cb
Refactored the code for making and printing out the move/copy decisions in the ImplicitMobility module
2008-05-30 18:28:40 +00:00
Neil Brown
46ef8e7e65
Annotated the move Rain testcase with the expected results
2008-05-30 18:28:19 +00:00
Neil Brown
a7944ddf9f
Changed the move testcase to use the correct Rain TLP interface
2008-05-30 17:32:06 +00:00
Neil Brown
947f252e66
Corrected the implicit mobility so that it now works properly on the Rain move testcase
2008-05-30 17:29:21 +00:00
Neil Brown
a5fca4816b
Added the beginnings of support for implicit mobility for Rain (just printing out the decisions for now)
2008-05-30 17:16:10 +00:00
Neil Brown
0746219984
Added support for recording terminator nodes (as well as root nodes) while building the flow graph
2008-05-30 17:15:52 +00:00
Neil Brown
f444d81f89
Changed flowAlgorithm to give a better error message when something internal goes wrong
2008-05-30 17:14:42 +00:00
Neil Brown
c4702a7f6e
Added a new helper function, eitherToMaybe in Utils
2008-05-30 17:14:28 +00:00
Neil Brown
1a1e78a9c4
Added a dummy Show instance for UsageLabel
2008-05-30 16:41:08 +00:00
Neil Brown
01e702acb2
Changed to print out the error context (based on the meta tag) on stderr instead of stdout
2008-05-30 16:40:21 +00:00
Neil Brown
d623c82b3b
Removed some of the bad uses of findMeta (where no meta tag would be found) from the Rain parser
2008-05-30 16:39:58 +00:00
Neil Brown
05c16b77d3
Added comments to the flowAlgorithm function and tweaked the names to make it clear it can do forward or backward analysis
2008-05-23 15:38:03 +00:00
Neil Brown
60eb320ee0
Separated FlowGraph into two modules (the new one being FlowUtils)
2008-05-23 14:52:25 +00:00
Adam Sampson
397ba6a3f5
Add some missing type constraints.
...
These were tripping GHC 6.8's monomorphism restriction warning.
2008-05-26 17:41:38 +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
Adam Sampson
d8d6ab12cc
Generate size arrays using IsExpr rather than Is.
...
This wasn't actually wrong, but everywhere else uses IsExpr for Val
abbreviations.
2008-05-26 17:19:25 +00:00
Adam Sampson
d9e00294f9
Format a NameDef constant more nicely.
2008-05-26 17:17:59 +00:00
Adam Sampson
a7877ecd68
Make applyToOnly more general, and use it in more places.
...
This simplifies several bits of code that are doing things with Structureds.
2008-05-25 22:36:54 +00:00
Adam Sampson
6debf9292f
Rework Traversal, and convert all passes to use it.
...
This changes the Traversal API to the one that I've been working on in
the Polyplate branch, but implemented in terms of Data. The
performance isn't as good as the Polyplate version, but the code is a
lot simpler because it doesn't need all the type constraints (and it
doesn't make GHC struggle).
This also reworks all the passes in Tock to use the new API, including
those that previously used makeGeneric (which I've now removed) or
everywhereM. Most of the passes are simpler because of this, and I
suspect it's fixed a few subtle bugs resulting from missing recursion
in makeGeneric code.
I haven't yet profiled this, but subjectively it seems about the same
as the old Traversal (and thus faster for all the passes that didn't
yet use it).
2008-05-25 20:13:57 +00:00
Adam Sampson
b413cf3dc2
Fix some broken Haddock.
2008-05-25 18:49:15 +00:00
Adam Sampson
5d8d96fb7a
GenerateC doesn't need Text.Regex any more.
2008-05-25 18:42:18 +00:00
Neil Brown
d044b51335
Renamed ndType to ndSpecType, as per Trac ticket #59
2008-05-21 13:38:51 +00:00
Neil Brown
35498a4d13
Renamed the "Typed" type-class to "ASTTypeable" as per the Trac ticket
2008-05-21 13:16:45 +00:00
Neil Brown
8943b767eb
Fixed the SimplifyTypes module
...
This fixes Trac ticket #46 . The pass for masking out state bodies has been moved to PassList (since it's so small and should be run first) for now, and SimplifyTypes has had its previous two passes merged into one.
2008-05-21 13:12:49 +00:00
Neil Brown
9f411bfd45
Fixed the Rain passes so that the order correctly satisfies the pre-requisites
2008-05-21 12:46:51 +00:00
Neil Brown
4537cd205c
Fixed the occam pass list so that it now has the correct order in respect to all the pre-requisite properties
2008-05-21 12:30:04 +00:00
Neil Brown
15cf63980f
Changed the pass mechanism to use a fixed list again rather than use the dependency graph
...
This fixes ticket #47 from Trac, which explains how using a dependency graph for passes was a bit too over the top, and led to unexpected results. Under the "new" (the original!) system, the pass list is used as-is, but the dependencies are checked to make sure the pass list order isn't wrong. In future we should also add back running the properties at the appropriate point (currently disabled).
2008-05-21 12:26:32 +00:00
Neil Brown
0627ff2b4f
Changed the Rain TLP interface to use lists for output streams as I'd originally intended
2008-05-21 00:20:29 +00:00
Neil Brown
0b1708c241
Added the equality operator for tockList in the C++ support code
2008-05-21 00:20:11 +00:00
Neil Brown
11588b34a3
Fixed a bug where transformConstr would skip over the second of two nested definitions of array constructors
2008-05-20 23:44:32 +00:00
Neil Brown
48fbf5f3e1
Added pulling up of list literals and list-constructed expressions
2008-05-20 23:44:07 +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
e5d8b51827
Added a missing line to substitute back inferred types for anonymous non-numeric types
2008-05-20 22:08:15 +00:00
Neil Brown
8c78d056b6
Improved display of unknown types (for debugging, really)
2008-05-20 22:07:35 +00:00
Neil Brown
926659cf70
Fixed the Rain lists testcase to adhere to the new type unification scheme
2008-05-20 21:56:25 +00:00
Neil Brown
af63afa5e9
Added type inference for list literals and list constructors
2008-05-20 21:56:07 +00:00
Neil Brown
2b3783d845
Fixed the handling of types for function returns
...
Function returns are done in Rain by assigning to the function name, so we need a bit of extra code when checking assignments to see if the LHS is a function name.
2008-05-20 18:11:05 +00:00
Neil Brown
7f387ae6a9
Fixed a conflict in configure.ac, adding the GLIB_ flags to the C flags
2008-05-18 11:39:51 +00:00
Neil Brown
bd7584e280
Turned off the checkFunction pass for now, since it is over-eager at spotting problems with Rain functions
2008-03-25 18:46:51 +00:00
Neil Brown
f9d55d2c65
Expanded the Rain lists testcase
2008-03-25 18:45:19 +00:00
Neil Brown
20a142839f
Added the beginnings of list support for CCSP (using glib)
2008-03-25 18:44:49 +00:00
Neil Brown
963b677142
Added support for detecting glib for the C backend
2008-03-25 18:43:48 +00:00
Neil Brown
f0a90a3024
Removed "run" from the Rain syntax, and adopted the occam approach instead
2008-03-25 17:32:54 +00:00
Neil Brown
4429dfc051
Added Meta tags all over the place in the type unification to give better error messages
2008-05-20 18:42:20 +00:00
Neil Brown
6afea19ee6
Cleared up the mess of old stuff in the list of rain passes
2008-05-18 11:36:08 +00:00
Neil Brown
8cc602100d
Added code to replace the unknown types with their deduced values after type unification
2008-05-18 11:34:26 +00:00