Make FuncEnvironment::return_mode() default to NormalReturns.

`NormalReturns` is what we expect most users will normally want.
This commit is contained in:
Dan Gohman
2018-10-26 17:02:22 -07:00
committed by Benjamin Bouvier
parent a19c6088f0
commit 2de5542139

View File

@@ -230,7 +230,9 @@ pub trait FuncEnvironment {
/// Should the code be structured to use a single `fallthrough_return` instruction at the end
/// of the function body, rather than `return` instructions as needed? This is used by VMs
/// to append custom epilogues.
fn return_mode(&self) -> ReturnMode;
fn return_mode(&self) -> ReturnMode {
ReturnMode::NormalReturns
}
}
/// An object satisfying the `ModuleEnvironment` trait can be passed as argument to the