1234567891011121314151617181920212223242526272829 |
- #ifndef BYTECODE_H
- #define BYTECODE_H
- #ifdef __cplusplus
- extern "C" {
- #endif
- #include "vm/Operation.h"
- typedef struct {
- int capacity;
- int length;
- unsigned char* code;
- } ByteCode;
- ByteCode* bcInit();
- void bcDelete(ByteCode* bc);
- int bcReserveBytes(ByteCode* bc, int length);
- void bcSetBytes(ByteCode* bc, int p, const void* data, int length);
- void bcAddBytes(ByteCode* bc, const void* data, int length);
- int bcGetAddress(ByteCode* bc);
- void bcInsertBytes(ByteCode* bc, const void* data, int length, int address);
- #ifdef __cplusplus
- }
- #endif
- #endif
|