diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2017-10-10 11:26:29 +0200 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2017-10-10 11:26:29 +0200 |
commit | 083cb00e8d5746abe34a4844334d7d777f504fec (patch) | |
tree | a341ddcd9bd3b2a9b24d621918339a5740c69e76 | |
parent | ac3e3cf2b000ad30fad81c957cb9d73d887e01d2 (diff) | |
download | Nim-083cb00e8d5746abe34a4844334d7d777f504fec.tar.gz |
added a minor note to destroyer.nim
-rw-r--r-- | compiler/destroyer.nim | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/compiler/destroyer.nim b/compiler/destroyer.nim index 2ccef1724..95997e3c8 100644 --- a/compiler/destroyer.nim +++ b/compiler/destroyer.nim @@ -39,6 +39,9 @@ ## x = y where y is read only once ## is the same as: move(x, y) ## +## Actually the more general rule is: The *last* read of ``y`` +## can become a move if ``y`` is the result of a construction. +## ## We also need to keep in mind here that the number of reads is ## control flow dependent: ## let x = foo() |