diff options
author | ubq323 <ubq323@ubq323.website> | 2024-06-22 12:23:55 +0100 |
---|---|---|
committer | ubq323 <ubq323@ubq323.website> | 2024-06-22 12:23:55 +0100 |
commit | 1d496f5f7f01b20fb34e63d1c85a33d8decd1894 (patch) | |
tree | da55156c23b474fa56b012cbb645b244adf42402 /dis.c | |
parent | ba0eb2042cefce45efa5c1ad294f05d0122815ee (diff) |
add function literals
Diffstat (limited to 'dis.c')
-rw-r--r-- | dis.c | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -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); + } + } + + } |