diff options
author | Xavier Leroy <xavier.leroy@inria.fr> | 1998-04-30 12:12:28 +0000 |
---|---|---|
committer | Xavier Leroy <xavier.leroy@inria.fr> | 1998-04-30 12:12:28 +0000 |
commit | baa58a54a938a07810e2fa201448ea277da7dae1 (patch) | |
tree | e3f07040ed8a0f29ab4ba915177d7c5ae56c206a /bytecomp/lambda.mli | |
parent | bdcbaa96025eb71f9aaeaef1573ca234b79fd846 (diff) |
Ajout du let_kind Variable, pour aider les transformations ulterieures (e.g. propagation des constantes entieres dans Closure)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@1944 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
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 *) |