Commit Graph

28 Commits

Author SHA1 Message Date
Neil Brown
3f02caba7c Changed the handling of retypes with arrays to handle source items with unknown size 2008-03-08 00:06:35 +00:00
Neil Brown
5ae8aca68e Fixed the sizes of retyping a multi-dimensional array 2008-03-07 22:46:39 +00:00
Neil Brown
8d44077891 Refactored and enhanced the declareSizesArray pass 2008-03-07 15:54:10 +00:00
Neil Brown
8d411184c1 Corrected the size of array slices 2008-03-07 10:00:02 +00:00
Neil Brown
a751531b4e Added some comments in declareSizesArray and renamed a variable to be clearer 2008-03-06 19:08:09 +00:00
Neil Brown
588381ee06 Fixed declareArraySizes to also use the size of an array element in its calculations for resizing 2008-03-06 18:40:20 +00:00
Neil Brown
0d638c690a Added some support for declaring sizes for retypes abbreviations (so far, only where the sizes are known at compile-time) 2008-03-06 18:30:29 +00:00
Neil Brown
41eda81ee7 Added some comments to declareSizesArray 2008-03-06 18:23:02 +00:00
Neil Brown
c3e1a32909 Rearranged declareSizesArray to easily support IsExpr 2008-03-06 18:03:49 +00:00
Neil Brown
8518860cd3 Fixed the handling of Is abbreviations (declaring array sizes) 2008-03-06 17:52:26 +00:00
Neil Brown
3d823fb1b5 Fixed the handling of actual array parameters to include array variables inside ActualExpression 2008-03-06 17:34:54 +00:00
Neil Brown
807b219a39 Implemented adding array sizes for Is abbreviations 2008-03-06 15:25:05 +00:00
Neil Brown
a9c2643ad4 Fixed some horribly exponential speculative recursion in one of the passes 2008-03-06 14:20:21 +00:00
Neil Brown
60c7a2dde3 Added a preliminary pass-list for the work on flattening arrays 2008-03-06 09:59:18 +00:00
Neil Brown
a2106a98e7 Fixed some incorrect recursion in the pass for declaring array _sizes 2008-03-06 01:50:01 +00:00
Neil Brown
70a207fe6c Implemented the addSizesActualParameters pass 2008-03-05 23:40:17 +00:00
Neil Brown
6a5d84ffcd Implemented the addSizesFormalParameters pass 2008-03-05 22:10:21 +00:00
Neil Brown
1fef1e64ed Added the beginnings of testing for adding _sizes parameters to PROC definitions (formals) 2008-03-05 17:31:14 +00:00
Neil Brown
2ea7c37abe Added the implementation of declaring _sizes arrays for record fields 2008-03-04 15:22:24 +00:00
Neil Brown
41303eb993 Altered the code and the tests for declareSizesArray to approach what it should be doing 2008-03-03 17:50:57 +00:00
Neil Brown
81ea069707 Added a dummy implementation of a new pass, declareSizesArray, and the tests for it 2008-03-03 15:02:07 +00:00
Adam Sampson
87a1c39411 Fix recursion in identifyParProcs that broke testcases/par.occ.
It wasn't looking for PROC definitions inside Specs. This is a good example of
a pass that really wants a trimmed "everywhere"/"contexts" rather than explicit
recursion.
2008-03-07 17:28:30 +00:00
Neil Brown
feabd450f0 Fixed a conflict between the prolifing-related changes and the dependence graph 2008-02-24 11:23:29 +00:00
Neil Brown
635f7bf1b0 Changed the backend passes in BackendPasses to not use the everywhere(M) function 2008-02-23 18:33:16 +00:00
Neil Brown
3ce0eaf452 Made the first adjustment to the Pass system, ready to introduce properties and a dependency graph. For now passes are still executed in list order 2008-02-16 10:19:14 +00:00
Neil Brown
acd57d74de Changed the A.Structured type to be parameterised
This patch is actually an amalgam of multiple (already large) patches.  Those patches conflicted (parameterised Structured vs. changes to usage checking and FlowGraph) and encountered a nasty bug in darcs 1 involving exponential time (see http://wiki.darcs.net/DarcsWiki/ConflictsFAQ for more details).  Reasoning that half an hour (of 100% CPU use) was too long to apply patches, I opted to re-record the parameterised Structured changes as this new large patch.  Here are the commit messages originally used for the patches (which, as mentioned, were already large patches):

A gigantic patch switching all the non-test modules over to using parameterised A.Structured
Changed the FlowGraph module again to handle any sort of Structured you want to pass to it (mainly for testing)
A further gigantic patch changing all the tests to work with the new parameterised Structured
Fixed a nasty bug involving functions being named incorrectly inside transformInputCase
Added a hand-written instance of Data for Structured that allows us to use ext1M properly
Fixed a few warnings in the code
2008-02-05 19:40:27 +00:00
Neil Brown
6b95827cab Added an optional initialiser-expression to Declaration in the AST, and changed the rest of the code accordingly 2007-10-24 23:50:00 +00:00
Neil Brown
8d95b65f00 Added support for the new AlternativeWait guards to the C backend
This was not as straightforward as the C++ backend.  CIF has no capability for supporting waiting *for* a specified time as an ALT guard; only waiting until (AFTER, in occam) a specified time.  This is further complicated by the fact that when you disable an ALT timer guard in CIF, you have to be able to supply the timeout value that you waited on in the enable sequence.

Therefore, I added a pass that transforms all WaitFor guards into WaitUntil guards, by declaring nonce time variables, getting the time, and adding on the delay that we want to wait for; these actions occur just before the ALT.

This new pass is in the new BackendPasses module, into which I also moved the identifyParProcs pass.  I also wrote tests for my new pass that live in the new BackendPassesTest module.
2007-09-27 11:48:04 +00:00