growl/chunk.h
2026-01-19 09:08:23 -03:00

22 lines
339 B
C

#ifndef CHUNK_H
#define CHUNK_H
#include "common.h"
#include "object.h"
/** Bytecode chunk */
typedef struct Bc {
U8 *items;
Z count, capacity;
struct {
O *items;
Z count, capacity;
} constants;
} Bc;
V chunk_emit_byte(Bc *, U8);
V chunk_emit_sleb128(Bc *, I);
I chunk_add_constant(Bc *, O);
V chunk_free(Bc *);
#endif