From 946566819959424718de199eda40bb60c87eaa70 Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Wed, 9 Oct 2019 09:33:41 -0700 Subject: [PATCH] Fix a TODO comment. (#405) The parameter to defined_func_index is in the defined-function space, so calling func_index on it works to translate it into module space. --- lightbeam/src/module.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lightbeam/src/module.rs b/lightbeam/src/module.rs index 2070695908..f4b787c8cd 100644 --- a/lightbeam/src/module.rs +++ b/lightbeam/src/module.rs @@ -357,9 +357,8 @@ pub trait ModuleContext { fn func_index(&self, defined_func_index: u32) -> u32; fn defined_func_index(&self, func_index: u32) -> Option; - fn defined_func_type(&self, func_idx: u32) -> &Self::Signature { - // TODO: This assumes that there are no imported functions. - self.func_type(self.func_index(func_idx)) + fn defined_func_type(&self, defined_func_idx: u32) -> &Self::Signature { + self.func_type(self.func_index(defined_func_idx)) } fn func_type(&self, func_idx: u32) -> &Self::Signature {