Support call stack and FunctionExit for native functions.

This commit is contained in:
Stephen Chung
2022-02-02 14:47:35 +08:00
parent 7163a7331a
commit 4a80483749
13 changed files with 190 additions and 77 deletions

View File

@@ -220,6 +220,7 @@ impl Engine {
Ok(ref mut obj_ptr) => {
self.eval_op_assignment(
global, state, lib, op_info, op_pos, obj_ptr, root, new_val,
level,
)
.map_err(|err| err.fill_position(new_pos))?;
#[cfg(not(feature = "unchecked"))]
@@ -314,6 +315,7 @@ impl Engine {
)?;
self.eval_op_assignment(
global, state, lib, op_info, op_pos, val_target, root, new_val,
level,
)
.map_err(|err| err.fill_position(new_pos))?;
}
@@ -380,6 +382,7 @@ impl Engine {
&mut (&mut orig_val).into(),
root,
new_val,
level,
)
.map_err(|err| err.fill_position(new_pos))?;