about summary refs log tree commit diff
path: root/src/test/codegen/move-val-init.rs
AgeCommit message (Collapse)AuthorLines
2018-12-25Remove licensesMark Rousskov-10/+0
2017-10-26Avoid unnecessary copies of arguments that are simple bindingsBjörn Steinbrink-1/+1
Initially MIR differentiated between arguments and locals, which introduced a need to add extra copies assigning the argument to a local, even for simple bindings. This differentiation no longer exists, but we're still creating those copies, bloating the MIR and LLVM IR we emit. Additionally, the current approach means that we create debug info for both the incoming argument (marking it as an argument), and then immediately shadow it a local that goes by the same name. This can be confusing when using e.g. "info args" in gdb, or when e.g. a debugger with a GUI displays the function arguments separately from the local variables, especially when the binding is mutable, because the argument doesn't change, while the local variable does.
2017-04-18lower `move_val_init` during MIR constructionAriel Ben-Yehuda-0/+29
Because of its "magic" order-of-evaluation semantics, `move_val_init` must be lowered during MIR construction in order to work.