about summary refs log tree commit diff
path: root/src/rt/rust_task.cpp
diff options
context:
space:
mode:
authorBjörn Steinbrink <bsteinbr@gmail.com>2013-06-19 20:28:42 +0200
committerBjörn Steinbrink <bsteinbr@gmail.com>2013-06-20 23:53:26 +0200
commitdc262d9aa742adadb92558a588aeaa57267fdee4 (patch)
treedf5a5944b64e3b24f3548f5ce5c79bc32a528e42 /src/rt/rust_task.cpp
parentf348465283d6cd85b69bcdc1711d14985d154c39 (diff)
downloadrust-dc262d9aa742adadb92558a588aeaa57267fdee4.tar.gz
rust-dc262d9aa742adadb92558a588aeaa57267fdee4.zip
Avoid unnecessary scratch datums for by-copy function arguments
Currently, by-copy function arguments are always stored into a scratch
datum, which serves two purposes.  First, it is required to be able to
have a temporary cleanup, in case that the call fails before the callee
actually takes ownership of the value. Second, if the argument is to be
passed by reference, the copy is required, so that the function doesn't
get a reference to the original value.

But in case that the datum does not need a drop glue call and it is
passed by value, there's no need to perform the extra copy.
Diffstat (limited to 'src/rt/rust_task.cpp')
0 files changed, 0 insertions, 0 deletions