Skip to content

Commit 5795386

Browse files
committed
Fix assign micro_code
1 parent 9a87865 commit 5795386

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

vm/ignite/src/micro_code/call.rs

+4
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ use super::apply_builtin;
99

1010
/// Call a function with the given number of arguments.
1111
/// First it pops n values from the operand stack where n is the arity of the function.
12+
/// The values will be the arguments to the function and they are pushed to a vector and reversed.
13+
/// i.e. the last argument is the top value of the operand stack.
1214
/// Then it pops the closure from the operand stack.
1315
/// It checks that the closure is a closure and that the arity of the closure matches the number of arguments.
1416
/// If the closure is a builtin function it applies the builtin function and returns.
@@ -38,6 +40,8 @@ pub fn call(mut rt: Runtime, arity: usize) -> Result<Runtime> {
3840
);
3941
}
4042

43+
args.reverse();
44+
4145
let value = rt
4246
.current_thread
4347
.operand_stack

0 commit comments

Comments
 (0)