summaryrefslogtreecommitdiff
path: root/dis.c
diff options
context:
space:
mode:
authorubq323 <ubq323@ubq323.website>2024-06-22 12:23:55 +0100
committerubq323 <ubq323@ubq323.website>2024-06-22 12:23:55 +0100
commit1d496f5f7f01b20fb34e63d1c85a33d8decd1894 (patch)
treeda55156c23b474fa56b012cbb645b244adf42402 /dis.c
parentba0eb2042cefce45efa5c1ad294f05d0122815ee (diff)
add function literals
Diffstat (limited to 'dis.c')
-rw-r--r--dis.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/dis.c b/dis.c
index ba0e1db..5097b05 100644
--- a/dis.c
+++ b/dis.c
@@ -87,6 +87,17 @@ void disasm_chunk(Chunk *ch) {
}
}
+ printf("\n");
+
+ for (uint8_t cix = 0; cix < ch->consts.len; cix++) {
+ Val c = ch->consts.d[cix];
+ if (IS_FUNC(c)) {
+ printf("const %d is function:\n", cix);
+ disasm_chunk(&AS_FUNC(c)->chunk);
+ }
+ }
+
+
}