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
264149ef3f
Added some more tests for dynamically sized arrays
2008-03-06 01:49:33 +00:00
Neil Brown
70a207fe6c
Implemented the addSizesActualParameters pass
2008-03-05 23:40:17 +00:00
Neil Brown
8b3edc90ce
Added some limited tests for the addSizesActualParameters pass
2008-03-05 23:39:54 +00:00
Neil Brown
6a5d84ffcd
Implemented the addSizesFormalParameters pass
2008-03-05 22:10:21 +00:00
Neil Brown
3481a3f51d
Finished the tests for the addSizesFormalParameters pass
2008-03-05 22:09:51 +00:00
Neil Brown
6c629b33f7
Added a few types in BackendPassesTest to remove a monomorphism restriction warning
2008-03-05 21:04:42 +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
6a784bffd9
Switch the tests for declareSizesArray to be QuickCheck tests rather than HUnit tests
2008-03-05 16:35:37 +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
30f1b6ecab
Added tests for the declaring of _sizes arrays for record fields
2008-03-04 15:22:03 +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
2f7539bcdb
Convert the C backend to the new CIF API (mostly).
...
Most of this is mechanical: changing function names, and carrying the "wptr"
argument around. I've made the code for computing Expressions from Structureds
a bit more generic too.
The only complex bit is the handling of PAR processes, which I'm not very happy
with at the moment; they used to use the normal C calling convention, but now
you need to pack the arguments into the workspace. I'm handling this at the
moment by generating wrapper functions that do the unpacking, but it would be
better in the future to make the wrapper PROCs that we already generate have
the right interface.
This won't work for programs that use any of the top-level channels yet, since
there are no handlers for them.
2008-03-07 17:50:10 +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
Adam Sampson
8aabb0c98e
Add a missing fold marker.
2008-03-07 17:02:03 +00:00
Neil Brown
20f7666044
Refactored cgenArraySubscript ready to add support for static dimensions
2008-03-01 20:39:45 +00:00
Neil Brown
60daa07b93
Renamed one of the array functions in the function table to be clearer
2008-03-01 20:22:34 +00:00
Neil Brown
01ac2ef21d
Fixed an odd monomorphism restriction warning
2008-03-01 20:13:11 +00:00
Adam Sampson
50967cba95
Split the common C99/C++ support code out into a separate header.
...
Or, rather, add a new CIF-specific header, so tock_support.h is now the common
code and each of the backends has its own. This means some of the conditional
stuff can go away.
2008-03-05 16:54:29 +00:00
Adam Sampson
aff90d8d45
Some initial shuffling to get Tock working with the new CIF.
...
This changes the TLP code to use CCSP's stand-alone mode, and gets rid of the
old KRoC wrapper stuff. It also changes occam_stop everywhere in order to pass
the number of arguments (since ExternalCallN needs that now), and cleans up the
interaction with the C++ backend a bit.
2008-03-05 16:21:20 +00:00
Neil Brown
49585a1922
Added a constructor to record types to help build record literals (especially those that contain array literals)
2008-02-29 16:44:00 +00:00
Neil Brown
24dc839cfb
Added helper functions for PLUS, MINUS and TIMES to help constrain the result types and prevent surprising integer promotions
2008-02-29 00:20:52 +00:00
Neil Brown
6d4f1dd702
Added labels to all the top-level tests that didn't have one
2008-02-28 16:11:01 +00:00
Neil Brown
b3458ec541
Corrected the pointer indirection for records inside records
2008-02-28 16:08:06 +00:00
Neil Brown
62e45a8909
Added a missed new C/C++ test to the list of tests to run
2008-02-28 15:33:08 +00:00
Neil Brown
d73f2f509c
Added some template types to one of the uses of tockArrayView to please the C++ compiler, and adjusted the tests accordingly
2008-02-28 15:32:26 +00:00
Adam Sampson
8d06c3d180
Various tweaks to the Haddock comments to get it building with 0.8 again.
2008-02-28 14:20:34 +00:00
Neil Brown
7206d45af3
Toned down the amount of suffixes generated for C/C++ integer literals
2008-02-27 18:56:36 +00:00
Neil Brown
63730b5aff
Adjusted the tests for record definitions in the C/C++ backends to use the new function in the dictionary for them
2008-02-27 18:56:09 +00:00
Neil Brown
9ab4563a2c
Moved the definition of record types into the forward declarations
2008-02-27 18:25:14 +00:00
Neil Brown
018951ef40
Fixed the shift behaviour by moving it out into functions like the add and subtract operations already were
2008-02-27 15:13:11 +00:00
Neil Brown
9712df4458
Added a type annotation (esp. for signed types) for hex literals in the C/C++ backends
2008-02-27 14:00:54 +00:00
Neil Brown
9d1c170b34
Added a size suffix to the code generated for C/C++ integer and real literals (where needed)
2008-02-26 18:09:21 +00:00
Neil Brown
0f437dcf0e
Fixed the behaviour of the right-shift operator to match how it should work in occam
2008-02-26 17:20:29 +00:00
Neil Brown
74f3cb7fc2
Removed the export of "m" in TestUtils, instead moving the definition to each module that uses it (less confusing that way)
2008-02-24 18:55:44 +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
2e6718ac50
Changed all the lists of passes to add pre- and post- properties
2008-02-19 09:43:40 +00:00
Neil Brown
360abc195e
Moved the enabling/disabling of passes based on CompState from PassList to the point of the declaration of the passes
2008-02-16 11:09:25 +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
cc29010103
Fixed some more monomorphism restriction warnings in GenerateCTest
2008-02-08 13:35:04 +00:00
Neil Brown
b037b6a8ca
Tidied up the new code relating to warnings, and moved it all into the Errors module (out of CompState and Pass)
2008-02-08 13:31:37 +00:00
Neil Brown
f17ff5071c
Added a Warn monad for warnings, and incorporated a WriterT monad into the PassM stack to support the Warn monad, then changed all the rest of the code accordingly, including adding a Warn instance for the GenParser parser that hides it in the state
2008-02-08 13:22:23 +00:00
Neil Brown
035c526bef
Changed the TLP and PrettyShow modules to use CSMR instead of CSM
2008-02-08 11:29:09 +00:00
Neil Brown
e3e9e912f2
Added a read-only version of CSM, named CSMR
2008-02-08 11:17:50 +00:00