diff options
Diffstat (limited to 'bytecomp/lambda.mli')
-rw-r--r-- | bytecomp/lambda.mli | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/bytecomp/lambda.mli b/bytecomp/lambda.mli index 8a7472945..8a6244bb7 100644 --- a/bytecomp/lambda.mli +++ b/bytecomp/lambda.mli @@ -70,7 +70,16 @@ type structured_constant = type function_kind = Curried | Tupled -type let_kind = Strict | Alias | StrictOpt +type let_kind = Strict | Alias | StrictOpt | Variable +(* Meaning of kinds for let x = e in e': + Strict: e may have side-effets; always evaluate e first + (If e is a simple expression, e.g. a variable or constant, + we may still substitute e'[x/e].) + Alias: e is pure, we can substitute e'[x/e] if x has 0 or 1 occurrences + in e' + StrictOpt: e does not have side-effects, but depend on the store; + we can discard e if x does not appear in e' + Variable: the variable x is assigned later in e' *) type shared_code = (int * int) list (* stack size -> code label *) |