old ticket exported from SLVM but needs a new TODO # and i need to bother to think about this more so i can either address it or remove the TODO from the code b/c what i'm currently doing works well enough.
below is extracted from: sstanfield/slvm#7
/// my slosh function!
#[sl_sh_fn]
fn myfun<'a>(#[return] arg1: &'a str, arg2: &str) -> &'a str {
...
}
to avoid needing to parse lifetimes for functions, when returning a reference specify with a #[return] macro (or something) that a given slosh value is also the value that will be returned. This can dramaticaly simplify the macro code while allowing a user to still write code that compiles in rust but is also performant in slosh.
e.g. the extant value problem and some related cases.
old ticket exported from SLVM but needs a new TODO # and i need to bother to think about this more so i can either address it or remove the TODO from the code b/c what i'm currently doing works well enough.
below is extracted from: sstanfield/slvm#7
to avoid needing to parse lifetimes for functions, when returning a reference specify with a #[return] macro (or something) that a given slosh value is also the value that will be returned. This can dramaticaly simplify the macro code while allowing a user to still write code that compiles in rust but is also performant in slosh.
e.g. the extant value problem and some related cases.