diff options
| author | Alasdair Armstrong | 2018-11-27 21:23:48 +0000 |
|---|---|---|
| committer | Alasdair Armstrong | 2018-11-27 21:43:19 +0000 |
| commit | 134ceff00b6a4837b133cb49b6d775161420dc62 (patch) | |
| tree | fce0e22b101ad22aa21983f5e4fb840ab530601e /language | |
| parent | 6b67c91583da5eedc02a3942ef864d1fd64a48aa (diff) | |
Fix memory leak in string_of_bits
Should hopefully fix memory leak in RISC-V.
Also adds an optimization pass that removes copying structs and allows
some structs to simply alias each other and avoid copying their
contents. This requires knowing certain things about the lifetimes of
the structs involved, as can't free the struct if another variable is
referencing it - therefore we conservatively only apply this
optimization for variables that are lifted outside function
definitions, and should therefore never get freed until the model
exits - however this may cause issues outside ARMv8, as there may be
cases where a struct can exist within a variant type (which are not
yet subject to this lifting optimisation), that would break these
assumptions - therefore this optimisation is only enabled with the
-Oexperimental flag.
Diffstat (limited to 'language')
| -rw-r--r-- | language/bytecode.ott | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/language/bytecode.ott b/language/bytecode.ott index d8d01fb5..d2580e8c 100644 --- a/language/bytecode.ott +++ b/language/bytecode.ott @@ -132,6 +132,7 @@ instr :: 'I_' ::= | jump ( cval ) string :: :: jump | clexp = bool id ( cval0 , ... , cvaln ) :: :: funcall | clexp = cval :: :: copy + | alias clexp = cval :: :: alias | clear ctyp id :: :: clear | return cval :: :: return | { instr0 ; ... ; instrn } :: :: block |
