Skip to content

Commit

Permalink
Return move value instead of value
Browse files Browse the repository at this point in the history
  • Loading branch information
Poytr1 committed Sep 24, 2023
1 parent 94a4f5d commit fa43236
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion third_party/move/move-vm/runtime/src/interpreter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ use move_vm_types::{
};
use std::{cmp::min, collections::VecDeque, fmt::Write, sync::Arc};
use move_core_types::call_trace::{InternalCallTrace, CallTraces};
use move_core_types::value::MoveTypeLayout;

macro_rules! debug_write {
($($toks: tt)*) => {
Expand Down Expand Up @@ -403,11 +404,12 @@ impl Interpreter {
for val in self.operand_stack.last_n(func.arg_count()).unwrap() {
inputs.push((*val).copy_value().unwrap());
}
let typeTags: Vec<MoveTypeLayout> = func.parameter_types().into_iter().enumerate().map(|(_, ty)| loader.type_to_type_layout(ty).unwrap()).collect();
call_traces.push(InternalCallTrace {
pc: 0,
module_id: module_id.to_string(),
func_name: func.name().to_string(),
inputs: inputs.into_iter().enumerate().map(|(_, i)| i.to_string()).collect(),
inputs: inputs.iter().zip(typeTags).map(|(v, l)| v.as_move_value(&l).to_string()).collect(),
outputs: vec![],
type_args: vec![],
sub_traces: vec![],
Expand Down

0 comments on commit fa43236

Please sign in to comment.