alexcrichton opened PR #1363 from less-traits
to master
:
This commit simplifies
Func
and its API through a few avenues:
- The
callable
module is removed in favor of always calling functions through their trampoline (now that we always have one)- The
Callable
trait is removed in favor of just using animpl Fn()
argument- The
Func::new
method is now generic and no longer requires an explicitRc
allocation- The
Func::new
closure now takes a leading&Caller
argument to empower it with the same capabilities ofFunc::wrap
alexcrichton updated PR #1363 from less-traits
to master
:
This commit simplifies
Func
and its API through a few avenues:
- The
callable
module is removed in favor of always calling functions through their trampoline (now that we always have one)- The
Callable
trait is removed in favor of just using animpl Fn()
argument- The
Func::new
method is now generic and no longer requires an explicitRc
allocation- The
Func::new
closure now takes a leading&Caller
argument to empower it with the same capabilities ofFunc::wrap
alexcrichton updated PR #1363 from less-traits
to master
:
This commit simplifies
Func
and its API through a few avenues:
- The
callable
module is removed in favor of always calling functions through their trampoline (now that we always have one)- The
Callable
trait is removed in favor of just using animpl Fn()
argument- The
Func::new
method is now generic and no longer requires an explicitRc
allocation- The
Func::new
closure now takes a leading&Caller
argument to empower it with the same capabilities ofFunc::wrap
alexcrichton updated PR #1363 from less-traits
to master
:
This commit simplifies
Func
and its API through a few avenues:
- The
callable
module is removed in favor of always calling functions through their trampoline (now that we always have one)- The
Callable
trait is removed in favor of just using animpl Fn()
argument- The
Func::new
method is now generic and no longer requires an explicitRc
allocation- The
Func::new
closure now takes a leading&Caller
argument to empower it with the same capabilities ofFunc::wrap
alexcrichton updated PR #1363 from less-traits
to master
:
This commit simplifies
Func
and its API through a few avenues:
- The
callable
module is removed in favor of always calling functions through their trampoline (now that we always have one)- The
Callable
trait is removed in favor of just using animpl Fn()
argument- The
Func::new
method is now generic and no longer requires an explicitRc
allocation- The
Func::new
closure now takes a leading&Caller
argument to empower it with the same capabilities ofFunc::wrap
sunfishcode submitted PR Review.
sunfishcode submitted PR Review.
sunfishcode created PR Review Comment:
Can this use
.add
instead of.offset
with a cast?
sunfishcode created PR Review Comment:
While we're here, instead of casting to
*mut u8
, could we change the signature ofwasmtime_call_trampoline
to expect a*mut u128
? And maybe we can also renamewasmtime_call_trampoline
to justcall_trampoline
, since we're qualifiying it with the crate name here anyway.
sunfishcode created PR Review Comment:
We use
u128
for values in a lot of places, Is there a reason to preferi128
here?Random idea, don't feel obliged to do this here, but we could also introduce a new type, like
VMValue
or so, which has the size and alignment of au128
, that we could use instead ofu128
everywhere, to help document the intent.
alexcrichton submitted PR Review.
alexcrichton created PR Review Comment:
Nah this was just carried over from the original implementation, I'll switch it all to u128
alexcrichton updated PR #1363 from less-traits
to master
:
This commit simplifies
Func
and its API through a few avenues:
- The
callable
module is removed in favor of always calling functions through their trampoline (now that we always have one)- The
Callable
trait is removed in favor of just using animpl Fn()
argument- The
Func::new
method is now generic and no longer requires an explicitRc
allocation- The
Func::new
closure now takes a leading&Caller
argument to empower it with the same capabilities ofFunc::wrap
alexcrichton updated PR #1363 from less-traits
to master
:
This commit simplifies
Func
and its API through a few avenues:
- The
callable
module is removed in favor of always calling functions through their trampoline (now that we always have one)- The
Callable
trait is removed in favor of just using animpl Fn()
argument- The
Func::new
method is now generic and no longer requires an explicitRc
allocation- The
Func::new
closure now takes a leading&Caller
argument to empower it with the same capabilities ofFunc::wrap
alexcrichton updated PR #1363 from less-traits
to master
:
This commit simplifies
Func
and its API through a few avenues:
- The
callable
module is removed in favor of always calling functions through their trampoline (now that we always have one)- The
Callable
trait is removed in favor of just using animpl Fn()
argument- The
Func::new
method is now generic and no longer requires an explicitRc
allocation- The
Func::new
closure now takes a leading&Caller
argument to empower it with the same capabilities ofFunc::wrap
alexcrichton merged PR #1363.
Last updated: Nov 22 2024 at 16:03 UTC