Commit Graph

487 Commits

Author SHA1 Message Date
Neil Brown
48018a0acf Fixed up some of the backend passes tests (and corrected the pass itself) 2009-04-18 19:48:08 +00:00
Neil Brown
57ffc7bfa4 Split out a chunk of CompState into a CompOpts type for things that can be set on the command-line 2009-04-17 21:10:14 +00:00
Neil Brown
7dbff25b29 Moved csGlobalSizes to be a StateT on the appropriate backend pass 2009-04-17 19:29:50 +00:00
Neil Brown
378ef07893 Adjusted all the other modules to reflect the new change to CSM 2009-04-17 17:40:00 +00:00
Neil Brown
b0faa0e387 Fixed the sizes for mobile arrays of mobile arrays
The pass was folding the two arrays together, then digging too far into the dimensions of the outer array, rather than looking at the dimensions of the inner array.
2009-04-16 18:42:27 +00:00
Neil Brown
f909c6fd03 Fixed external calls so that passing mobile arrays to and from external calls now works 2009-04-16 18:29:14 +00:00
Neil Brown
437c6bd3ef Fixed genBytesIn for mobile arrays 2009-04-16 17:39:24 +00:00
Neil Brown
cdab6af65a Fixed the allocation of mobile arrays of mobile things so that the pointers in the new array are set to 0 2009-04-16 17:19:40 +00:00
Neil Brown
5a5b91e387 Fixed the passing of mobile arrays to old-style external calls 2009-04-16 14:19:25 +00:00
Neil Brown
a8b1697df6 Fixed the types for MOBILE array allocations that are inferred from something with unknown dimensions 2009-04-16 10:45:02 +00:00
Neil Brown
720388c764 Added a pass for MOBILE params to FORKed processes 2009-04-16 10:44:46 +00:00
Neil Brown
ee787b911c Rejigged the calculation of stack sizes to do partial subsitution for sizes files when they are generated 2009-04-16 10:25:43 +00:00
Neil Brown
c8136b7ef4 Fixed some problems with mobile stuff in the C backend 2009-04-16 10:25:16 +00:00
Neil Brown
ff9cabd80b Changed csParProcs to be a map that indicates whether the process is a wrapper for FORK or PAR 2009-04-16 10:25:02 +00:00
Neil Brown
a12c4cc814 Got most of the C++ backend working again, at least on the early cgtests 2009-04-14 15:33:34 +00:00
Neil Brown
535054eed0 Added a missing sanity check when allocating mobile arrays 2009-04-15 19:36:14 +00:00
Neil Brown
d07a4cb496 Fixed a function in AnalyseAsm to not read in the same sizes file twice, and made sure that sizes files are not emitted with their path 2009-04-15 17:17:22 +00:00
Neil Brown
f11db734a8 Added in kroc_argc and kroc_argv that is expected by one of the occam modules 2009-04-15 17:11:03 +00:00
Neil Brown
5f87855cc7 Fixed the backend so that it does not think stack sizes are needed for external functions 2009-04-15 17:10:29 +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
5fe8d4ba6a Fixed a couple of small things in the C backend that were causing GCC to spew out lots of warnings 2009-04-15 12:06:29 +00:00
Neil Brown
ca3fc18748 Fixed the backend to work out the header extension better 2009-04-14 17:03:55 +00:00
Neil Brown
5f5dac41d1 Fixed the backend to work with channels that shared at one end only 2009-04-14 17:01:09 +00:00
Neil Brown
46f9e1f7e4 Changed AnalyseAsm to give more helpful error messages when there is a problem 2009-04-14 16:59:53 +00:00
Neil Brown
f257100ba8 Added support for the SETPRI intrinsic 2009-04-14 11:05:27 +00:00
Neil Brown
c2b31d3c78 Fixed the listify function, especially for the C backend, so that the ordering is what we want, regardless of whether it makes sense 2009-04-13 22:40:25 +00:00
Neil Brown
d36503e15d Fixed a couple of problems in the backend with channel bundles 2009-04-13 20:37:21 +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
9069282ca2 Added support to the backend for FORK and FORKING 2009-04-13 14:58:07 +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
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
d49c7fad4a Fixed all the modules in the backends directory to work with the new Pass system 2008-12-14 18:32:34 +00:00
Neil Brown
9403f4d68b Filled in more expressions and corrected the generation of byte literals by borrowing code from the C backend 2008-11-27 09:25:34 +00:00
Neil Brown
ce86ec2337 Changed genMissing so that it generates a run-time error in the generated code 2008-11-27 09:25:07 +00:00
Neil Brown
e79ccf1b46 Fixed it so that names beginning with an upper-case letter are prefixed by an underscore in the CHP backend 2008-11-27 09:24:31 +00:00
Neil Brown
769ed4f3ca Filled in a little more of the CHP backend 2008-11-26 20:39:51 +00:00
Neil Brown
70d7b941cc Added support for more types and some expressions (mainly array stuff) 2008-11-26 18:47:32 +00:00
Neil Brown
ab8fd2434c Made all the missing stuff call genMissing 2008-11-26 15:51:21 +00:00
Neil Brown
d962126fed Added the framework for variable declarations 2008-11-26 15:47:22 +00:00
Neil Brown
d7c61a70c0 Fixed some indentation issues and added markers for things that are missing 2008-11-26 15:37:49 +00:00
Neil Brown
5d0391c98d Fixed it so that processes at the top-level are not inside let bindings 2008-11-26 15:28:36 +00:00
Neil Brown
caff6ae702 Added some more types, and import declarations 2008-11-26 15:27:16 +00:00
Neil Brown
b3c1a6f13b Filled out the very basics of a CHP backend, enough to get some proc headers 2008-11-26 15:11:51 +00:00
Neil Brown
e3c426e870 Added full-compile support for the CHP backend 2008-11-26 12:48:48 +00:00
Neil Brown
78716a2727 Added a CHP backend option to Tock 2008-11-26 12:24:21 +00:00
Neil Brown
47d565a3b9 Changed records to always use their original name in the C code
This fixes the problem with PROCs complaining that one munged version of the record name was not the same as another.

This will cause problems if two different record definitions for the same name are visible in the same file.
2009-04-12 13:06:49 +00:00
Neil Brown
7a7eefa33e Changed inline items to always be static
I'm not sure if this is a valid thing to do, but it solved a problem with the occam libraries where multiple occam files were including an inline FUNCTION from an include file, and this was causing problems at link time.
2009-04-12 13:02:58 +00:00