Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
Poytr1 committed Sep 14, 2023
1 parent 7a7276d commit 37cfe17
Showing 1 changed file with 17 additions and 4 deletions.
21 changes: 17 additions & 4 deletions third_party/move/move-vm/runtime/src/interpreter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ use move_vm_types::{
views::TypeView,
};
use std::{cmp::min, collections::VecDeque, fmt::Write, sync::Arc};
use move_core_types::value::MoveValue;

macro_rules! debug_write {
($($toks: tt)*) => {
Expand Down Expand Up @@ -124,21 +123,35 @@ impl Interpreter {
args: Vec<Value>,
) -> VMResult<Vec<Value>> {
let mut locals = Locals::new(function.local_count());
let mut args_1 = vec![];
for (i, value) in args.into_iter().enumerate() {
locals
.store_loc(
i,
value,
value.copy_value().unwrap(),
loader
.vm_config()
.enable_invariant_violation_check_in_swap_loc,
)
.map_err(|e| self.set_location(e))?;
args_1.push(value);
}

let mut current_frame = self
.make_new_frame(loader, function, ty_args, locals)
.map_err(|err| self.set_location(err))?;
self.call_traces.push(CallTrace {
pc: current_frame.pc,
module_id: "".to_string(),
func_name: current_frame.function.name().to_string(),
inputs: args_1,
outputs: vec![],
type_args: current_frame.ty_args.clone(),
}).map_err(|e| {
let err = PartialVMError::new(StatusCode::ABORTED);
let err = set_err_info!(current_frame, err);
self.maybe_core_dump(err, &current_frame)
})?;
loop {
let resolver = current_frame.resolver(loader);
let exit_code =
Expand Down Expand Up @@ -1125,8 +1138,8 @@ struct CallTrace {
pc: u16,
module_id: String,
func_name: String,
inputs: Vec<MoveValue>,
outputs: Vec<MoveValue>,
inputs: Vec<Value>,
outputs: Vec<Value>,
type_args: Vec<Type>,
}

Expand Down

0 comments on commit 37cfe17

Please sign in to comment.