Commit Graph

14 Commits

Author SHA1 Message Date
Neil Brown
55ed3e9984 Fixed the shift helper functions to work for int 2008-02-29 03:05:36 +00:00
Neil Brown
79b5e8edb0 Fixed the signed/unsigned comparison warnings in the shift helper functions 2008-02-29 00:28:31 +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
2ca965ebf0 Added a missing definition of the lshift/rshift C helper functions for bytes (uint8_t) 2008-02-28 16:55:41 +00:00
Neil Brown
0ecb7146e4 Fixed the implementation of REM for floating point types 2008-02-27 20:56:13 +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
40bb883497 Fixed the printf specifiers on float and double items for printing errors 2008-02-27 15:09:27 +00:00
Neil Brown
7433e49d49 Added support for List types to the C and C++ backend, in genType at least 2007-10-27 11:24:24 +00:00
Neil Brown
a1baa16d9e Made some fixes in the support header files, and changed functions to fix issues with const-ness in C++ 2007-10-11 01:30:49 +00:00
Neil Brown
5b10466e68 Fixed the channel arrays (and abbreviations thereof) to have the correct types (correcting an earlier mistake), and added helper functions to the support headers for easy initialisation of the arrays 2007-10-07 23:03:15 +00:00
Neil Brown
c1c1397f67 Added the occam_negate_ functions to the tock support header file, and defined a new macro that reduces some of the replicated macro calls 2007-10-07 11:07:20 +00:00
Adam Sampson
c8d5a4ff40 Add licensing information.
The compiler itself is under the GPLv2+; the support code that gets built into
user programs is under the LGPLv2+. This matches the existing practice for the
KRoC project.

(As with Occade, I've used the new GPLv3-style license header in the source
files, though, since that avoids having to update the FSF's postal address.)
2007-08-18 20:42:11 +00:00
Neil Brown
935d69d544 C++CSP Backend Added
C++CSP backend has been added.  It consists of a support header file and one new Haskell module: GenerateCPPCSP

The module is largely based on GenerateC, changed as needed.  
There is a large section at the bottom of the file with verbatim copy-and-paste from GenerateC,
due to wanting the same functionality, but for calls to use my C++CSP generation not the C generation -- 
hence I cannot simply import those functions.

The backend can generate code for cgtests 0 through 16 (incl) that will compile as valid C++.  The majority of the
tests pass when run (some do segfault, admittedly).  However some arrays still need more testing/work, particularly:
- timers
- array slices
- retyping

The tock_support_cppcsp.h header makes use of tock_support.h, but I had to add a few #ifnders to the latter
file so that I can use it with C++CSP and block out some of the CIF stuff.
2007-07-26 21:11:01 +00:00
Adam Sampson
50731d0b75 Give tock its own repo -- i.e. remove everything else and move tock up 2007-07-16 21:48:55 +00:00