tock-mirror/backends
Neil Brown b803b1ec91 Reworked how stack sizes are calculated, and changed how we use them in the build process
Now that we support separate compilation, some of the stack sizes for PROCs depend on the stack sizes of other PROCs that were compiled in different files.  We can't just assume the default 512 bytes for these "foreign" PROCs, because that often won't be enough.  So instead, we must make the stack sizes for the current PROCs depend on (i.e. use in the calculation) the stack sizes of the foreign PROCs.

This dependence adds some issues though.  We cannot declare in one C file a const int that depends on the value of an extern const int from another C file (not valid C, it seems).  So instead, we move all the stack size declarations to header files, and use #includes and the preprocessor to make sure that the stack sizes are statically determined.

This in turn simplifies the build process in some ways.  These headers only need to be compiled by the .occ file that has the main process, by including them all into a C file and compiling that as before.  It means that each .occ file only has one .o file resulting (plus two C headers*, and a .inc file) so linking is a bit less confusing.

* I am keeping the two C headers for now, rather than appending the sizes one to the normal header, because I'm not entirely sure whether having one header that the C file depends on may trigger a recompilation that we don't want in some build systems.  I can always merge them later if that's not a valid worry.
2009-04-03 12:24:53 +00:00
..
AnalyseAsm.hs Reworked how stack sizes are calculated, and changed how we use them in the build process 2009-04-03 12:24:53 +00:00
AnalyseAsmTest.hs In AnalyseAsm, ignore labels that contain "." anywhere. 2008-04-06 15:31:28 +00:00
BackendPasses.hs Made makeNonce use the munged meta-tag, to stop wrapper PROCs from different files having name clashes at link-time 2009-04-02 20:02:11 +00:00
BackendPassesTest.hs A mega-patch that gets tocktest compiling again 2009-03-31 17:56:56 +00:00
GenerateC.hs Reworked how stack sizes are calculated, and changed how we use them in the build process 2009-04-03 12:24:53 +00:00
GenerateCBased.hs Added code to put static before every identifier that is not being exported, to avoid collisions between occam files 2009-04-01 19:50:15 +00:00
GenerateCPPCSP.hs Made makeNonce use the munged meta-tag, to stop wrapper PROCs from different files having name clashes at link-time 2009-04-02 20:02:11 +00:00
GenerateCTest.hs Fixed the C tests to compile again after the most recent changes 2009-04-01 19:58:47 +00:00
TLP.hs Add kyb as another possible name for the keyboard channel. 2009-03-21 15:22:58 +00:00