Neil Brown
009cf8cc8b
Added a helper function like functionOperator, but that only gives back a Just result if the operator is a non-overridden version
2009-04-08 15:15:47 +00:00
Neil Brown
adf046a30e
Fixed the implicit mobility module (it was only broken for Rain anyway)
2009-04-08 12:15:11 +00:00
Neil Brown
1e21895276
Stopped abbreviations of arrays of records being pulled up
2009-04-08 12:13:23 +00:00
Neil Brown
dc64b5e664
Fixed the filename munging in the generated copy_ procs for records
2009-04-08 12:13:07 +00:00
Neil Brown
3fd373e4ac
Stopped calls to the user-defined operators being pulled up
2009-04-07 16:12:03 +00:00
Neil Brown
a3ec0aab7f
Stopped the built-in operators from being transformed into PROCs
2009-04-07 16:11:18 +00:00
Neil Brown
ca3c982a7e
Fixed transformConstr to work with the new helper functions
2009-04-07 16:10:42 +00:00
Neil Brown
8a35da4be4
Fixed the removeAfter pass to work on function calls to the AFTER operator
2009-04-07 16:09:12 +00:00
Neil Brown
85790012b0
Allowed removeNesting to pull up functions (the only ones affected will be the built-in operators)
2009-04-07 16:07:46 +00:00
Neil Brown
8635039542
Stopped removeFreeNames from considering external things to be free names
2009-04-07 16:07:21 +00:00
Neil Brown
e457d82f0c
Changed FUNCTIONs and PROCs to have optional bodies, and put all the externals into the AST (without bodies)
...
This may seem like an odd change, but it simplifies the logic a lot. I kept having problems with passes not operating on externals (e.g. functions-to-procs, adding array sizes, constant folding in array dimensions) and adding a special case every time to also process the externals was getting silly.
Putting the externals in the AST therefore made sense, but I didn't want to just add dummy bodies as this would cause them to throw up errors (e.g. in the type-checking for functions). So I turned the bodies into a Maybe type, and that has worked out well.
I also stopped storing the formals in csExternals (since they are now in csNames, and the tree), which streamlined that nicely, and stopped me having to keep them up to date.
2009-04-04 14:56:35 +00:00
Neil Brown
d6ad0ba202
Made the name of record-copying PROCs different for each file that generates them, to avoid clashes at link time
2009-04-03 10:25:55 +00:00
Neil Brown
dbc1b461a4
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
Neil Brown
70789661f1
Got pragma-declared FUNCTIONS to be turned into PROCs and handled properly
2009-04-02 18:13:51 +00:00
Neil Brown
e91c075bcf
Fixed up a lot of the failing tests
...
I changed a little bit of the code, but mainly the tests. Several of the remaining failures are actually real failures, so I need to dig through the rest carefully. A lot are failing because the C++ backend is broken.
2009-04-01 11:49:37 +00:00
Neil Brown
56e5b8da8e
A mega-patch that gets tocktest compiling again
...
However, around a quarter of the tests currently fail...
2009-03-31 17:56:56 +00:00
Neil Brown
8ee32f0795
Made sure that record literals are pulled up (perhaps this accidentally lost in the past?)
2009-03-31 16:51:02 +00:00
Neil Brown
2941cbd049
Fixed a problem with record abbreviations being pulled all the way up to the top (which C doesn't like)
2009-03-31 16:50:42 +00:00
Neil Brown
9f5b685c02
Corrected a nasty problem with pulling up free names into arguments
...
The problem was that the free name could involved in an array dimension (and hence a type) of something in the PROC. When the name was then replaced in the type, CompState was not updated to have the new type, and instead kept the old type (potentially) all the way through to the backend, where it might be used for checking the bounds of an array index (against the old name taken from CompState, not the replaced name).
2009-03-31 11:51:02 +00:00
Neil Brown
dbf886996a
Removed various bits of old code relating to the old sizes mechanism
2009-03-31 10:50:04 +00:00
Neil Brown
e1cd694c27
Added code to pull up any VariableSizes expressions (since they result in an array)
2009-03-31 09:22:59 +00:00
Neil Brown
654dd453f1
Replaced another use of SizeVariable with VariableSizes (via specificDimSize), in SimplifyExprs
2009-03-31 09:22:38 +00:00
Neil Brown
af9ab28718
Replaced a use of SizeVariable with VariableSizes (indirectly) in SimplifyProcs
2009-03-31 09:21:32 +00:00
Neil Brown
72fe41cdc1
Added a couple of missing cases to isExempt (in the abbreviation checking)
2009-03-31 09:20:01 +00:00
Neil Brown
a71e2a8c0a
Fixed the pulling up of replication counts to pull up outside PARs
2009-03-27 21:29:30 +00:00
Neil Brown
74e3f61614
Fixed arrays of user data types that are arrays to be flattened into a multidimensional array, rather than an array of arrays
2009-03-27 16:24:15 +00:00
Neil Brown
bd2dfe3d2a
Fixed pullUp so that it pulls up PROC parameters again
2009-03-26 18:38:28 +00:00
Neil Brown
ffbf4bed87
Removed a few bits of awkwardness in Unnest
2009-03-26 18:37:16 +00:00
Neil Brown
127a72ad5e
Fixed channel arrays in PROC parameters to be pulled up
2009-03-25 18:26:33 +00:00
Neil Brown
45b22472c3
Changed the rest of tock to reflect the changes to the Is constructor
2009-03-24 23:57:24 +00:00
Neil Brown
f73171140c
Fixed a subtle bug with conflicting abbreviation modes in the PROCS generated to copy records
2009-03-23 21:08:40 +00:00
Neil Brown
41805aaacf
Changed the ChanEnd constructor to only keep information about its shared-ness, not about the whole channel
2009-03-23 18:40:28 +00:00
Neil Brown
228523e7e7
Added the generation of IsDefined checks, and stopped them being applied to derefenced arrays
2009-03-23 15:48:24 +00:00
Neil Brown
be36af4bf0
Added a work-around for resolving user defined types in the CompState
2009-03-22 22:31:49 +00:00
Neil Brown
81ebebe4fe
Added a quick work-around in SimplifyAbbrevs for the SYB-Map issue
2009-03-22 00:32:56 +00:00
Neil Brown
f5ce1c8f89
Added the code to mobilise arrays inside protocols
2009-03-20 11:26:54 +00:00
Neil Brown
65875f523f
Added mobile cloning rather than using dereferencing to copy mobiles
2009-03-19 16:47:31 +00:00
Neil Brown
2e99bcfc5e
Added the mobilisation of process parameters, but I think I need to clone, not dereference
2009-03-19 15:45:49 +00:00
Neil Brown
8abd09758c
Fixed the implicit mobility module to mobilise arrays inside channels
2009-03-19 15:23:56 +00:00
Neil Brown
26824883d6
Changed the implicit mobility to only look at mobile variables, and recorded what future use is causing a copy decision
2009-03-19 14:00:59 +00:00
Neil Brown
823592bd1d
Added some passes to mobilise non-mobile arrays
2009-02-27 17:12:08 +00:00
Neil Brown
6d112a244e
Fixed when names are exempted from abbreviation checking by the PERMITALIASES pragma
2009-02-11 13:15:25 +00:00
Neil Brown
152f5fc252
Changed the abbreviation checking so that it doesn't check nonce names
...
When we pull up names (which happens before abbreviation checking), we create a lot of nonces with greater scope than the original variables. When we go to abbreviation check this, we therefore set off lots of false alarms about originally safe code. So to fix this, the easiest method seems to be turning off checking on all the names introduced by the compiler.
2009-02-11 11:23:39 +00:00
Neil Brown
e37fa37c79
Recoded abbrevCheckPass so that it is much more efficient (now does everything in one pass of the AST)
2009-02-10 13:14:45 +00:00
Neil Brown
9d44e3475c
Swapped some uses of listify to fastListify, but the abbreviation checking is still very slow
2009-02-10 12:49:54 +00:00
Neil Brown
bcd670bfd2
Fixed a couple of problems with the usage checking
2009-02-10 12:40:24 +00:00
Neil Brown
cff10e2f28
Added a pass that checks that abbreviations are used properly
2009-02-10 11:32:10 +00:00
Neil Brown
14df1e09b7
Corrected some problems caused by moving the direction specifiers up to the whole array (the array wasn't then being pulled up)
2009-02-10 00:28:45 +00:00
Neil Brown
979eec927a
Added a pass that removes replicators with a count of 0, and turns replicators with a count of 1 into non-replicated things (with the appropriate abbreviation)
2009-02-04 11:30:57 +00:00
Neil Brown
359763380e
Fixed the test for the transformConstr pass
2009-02-03 12:37:32 +00:00