From 2de5542139c3bef1dd75b82ea039693df25378c6 Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Fri, 26 Oct 2018 17:02:22 -0700 Subject: [PATCH] Make `FuncEnvironment::return_mode()` default to `NormalReturns`. `NormalReturns` is what we expect most users will normally want. --- lib/wasm/src/environ/spec.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/wasm/src/environ/spec.rs b/lib/wasm/src/environ/spec.rs index 9f0dc14964..db6d0761d4 100644 --- a/lib/wasm/src/environ/spec.rs +++ b/lib/wasm/src/environ/spec.rs @@ -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