File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
crates/wasmi/src/engine/translator/func2 Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -372,8 +372,8 @@ impl FuncTranslator {
372
372
Ok ( ( ) )
373
373
}
374
374
375
- /// Translates a generic return instruction.
376
- fn translate_return ( & mut self , consume_fuel : Option < Instr > ) -> Result < Instr , Error > {
375
+ /// Encodes a generic return instruction.
376
+ fn encode_return ( & mut self , consume_fuel : Option < Instr > ) -> Result < Instr , Error > {
377
377
let len_results = self . func_type_with ( FuncType :: len_results) ;
378
378
let instr = match len_results {
379
379
0 => Instruction :: Return ,
@@ -442,7 +442,7 @@ impl FuncTranslator {
442
442
}
443
443
self . reachable |= frame. is_branched_to ( ) ;
444
444
if self . reachable && self . stack . is_control_empty ( ) {
445
- self . translate_return ( consume_fuel_instr) ?;
445
+ self . encode_return ( consume_fuel_instr) ?;
446
446
}
447
447
Ok ( ( ) )
448
448
}
Original file line number Diff line number Diff line change @@ -211,7 +211,7 @@ impl<'a> VisitOperator<'a> for FuncTranslator {
211
211
fn visit_return ( & mut self ) -> Self :: Output {
212
212
bail_unreachable ! ( self ) ;
213
213
let consume_fuel_instr = self . stack . consume_fuel_instr ( ) ;
214
- self . translate_return ( consume_fuel_instr) ?;
214
+ self . encode_return ( consume_fuel_instr) ?;
215
215
let len_results = self . func_type_with ( FuncType :: len_results) ;
216
216
for _ in 0 ..len_results {
217
217
self . stack . pop ( ) ;
You can’t perform that action at this time.
0 commit comments