Commit Graph

28 Commits

Author SHA1 Message Date
Neil Brown
5c43172e46 Added an annotation to array subscripts to indicate whether they should have a run-time check added or not 2008-03-09 14:30:19 +00:00
Neil Brown
ba75f5b06c Removed the initialiser expression on the Declaration item in the AST 2008-03-09 00:23:13 +00:00
Neil Brown
8030161a90 Changed bytesInType to use the new module for getting the size of the bool and int types 2008-03-07 21:24:20 +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
Neil Brown
f5022228ba Fixed typeOfSpec to use the recorded type rather than trying to dig it out of the inner expression/variable 2008-02-29 16:33:33 +00:00
Neil Brown
1afea6c62c Fixed underlyingType not recursing properly into the inner types in arrays 2008-02-27 18:23:53 +00:00
Neil Brown
caff04c548 Changed the use of everywhereM in underlyingType to use makeGeneric instead 2008-02-24 15:52:09 +00:00
Neil Brown
a3ebd96a86 Changed all the functions in the EvalLiterals, Types and ShowCode modules to use CSMR (instead of CSM) 2008-02-08 11:24:37 +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
edc3a7e910 Removed the die function (that has no source position) and as far as possible replaced all its uses with dieP and a valid position 2008-01-28 17:21:13 +00:00
Neil Brown
741a01de5a Removed various tab characters and replaced them with spaces 2008-01-26 19:38:24 +00:00
Douglas Warren
1d83167c01 Fixed some haddock parsing problems in the documentation 2007-11-14 16:26:47 +00:00
Neil Brown
a6cbdfeb94 Changed some functions in the Types module to handle the new List type 2007-10-25 10:11:19 +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
31642036b7 Added support for the new AllocMobile item in the Types module 2007-10-24 19:31:07 +00:00
Neil Brown
f68a6cd31d Added cases for DerefVariable to some functions in Types 2007-10-24 15:57:03 +00:00
Neil Brown
a68ecfb24b Added a new function (typeOfSpec) to the Types module 2007-10-10 23:10:46 +00:00
Neil Brown
c59c2ed5f6 Removed an unused function (simplifyType) from the Types module 2007-10-02 14:48:09 +00:00
Neil Brown
38c409d378 Added the -fwarn-unused-imports compiler option to warn about unused imports, and then set about pruning and ordering (mostly in my code) the import lists for all the modules 2007-09-27 13:13:46 +00:00
Neil Brown
47052d5f39 Fixed a bug where the default cases were left out for the recent "genericised" functions in the Types module 2007-09-27 10:59:35 +00:00
Neil Brown
c925774280 Changed the types code so that all the tests for the new Time type pass 2007-09-19 11:24:14 +00:00
Neil Brown
629137443f Scrapped some boilerplate in Types by changing a couple of functions (simplifyType, underlyingType) to use generics 2007-09-18 18:37:53 +00:00
Neil Brown
1baecd7955 Moved findMeta into the Metadata module 2007-09-18 09:50:45 +00:00
Neil Brown
3e342a621c Added ShowOccam and ShowRain type-classes, and changed existing code to use these new show methods in error messages
The function showCode shows code as either occam or Rain depending on the frontend.  This is then used by a formatCode function that acts similar to 
printf, which makes it easy to format error messages that use showCode.
2007-09-16 17:20:57 +00:00
Neil Brown
a454aa78f8 Rain: implemented the checkExpression function and got it passing the tests so far 2007-09-15 18:57:02 +00:00
Neil Brown
7f9357d658 Rain: changed from using the isSafeConversion function to a more appropriate new function isImplicitConversionRain 2007-09-15 18:54:19 +00:00
Neil Brown
1ea59d40bd Created an export list for the Types module, and added documentation to all the exported functions 2007-09-15 14:31:33 +00:00
Neil Brown
2ff46a9041 Rearranged the Rain source files, renamed a couple of Rain files, and changed the Makefile accordingly. 2007-09-10 17:28:57 +00:00