aboutsummaryrefslogtreecommitdiffstats
path: root/src/bytecode/main.c
diff options
context:
space:
mode:
authorBad Diode <bd@badd10de.dev>2021-10-28 10:40:22 +0200
committerBad Diode <bd@badd10de.dev>2021-10-28 10:40:22 +0200
commitd04aea3c5875cd2859d6ab961256b11189c49839 (patch)
tree911b6df338dde38ed28c447cfba999bcc3cb1743 /src/bytecode/main.c
parent4515d21211263a2c7367ec20ec01ce9efaae1d18 (diff)
downloadbdl-d04aea3c5875cd2859d6ab961256b11189c49839.tar.gz
bdl-d04aea3c5875cd2859d6ab961256b11189c49839.zip
Prepare for closure capture
Diffstat (limited to 'src/bytecode/main.c')
-rwxr-xr-xsrc/bytecode/main.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/bytecode/main.c b/src/bytecode/main.c
index 7f2042e..4b80f71 100755
--- a/src/bytecode/main.c
+++ b/src/bytecode/main.c
@@ -57,8 +57,9 @@ process_source(const StringView *source) {
57#endif 57#endif
58 58
59 // Interpret chunk. 59 // Interpret chunk.
60 Object main_proc = make_lambda(main);
60 CallFrame frame = (CallFrame){ 61 CallFrame frame = (CallFrame){
61 .chunk = main, 62 .closure = main_proc.closure,
62 }; 63 };
63 array_push(vm.frames, frame); 64 array_push(vm.frames, frame);
64 vm_interpret(&vm); 65 vm_interpret(&vm);