Files
2026-03-30 19:20:11 +00:00

26 lines
734 B
C

#ifndef HEALPER_H
#define HEALPER_H
#include <stdint.h>
#include "classfile.h"
typedef struct Object {
CPEntry *cls;
uint16_t fields_count;
intptr_t *fields;
struct Object *next_free;
} Object;
#define OBJ_TO_SLOT(o) ((intptr_t)(uintptr_t)(o))
#define SLOT_TO_OBJ(s) ((Object *)(uintptr_t)(intptr_t)(s))
int midp_native_call(ClassFile *cf, const char *class_name, const char *name, const char *desc, intptr_t *stack, int *sp, int opcode);
void midp_sdl_init(int w, int h);
void midp_sdl_wait(int milliseconds);
void midp_sdl_destroy(void);
Object *heap_alloc(CPEntry *cls, uint16_t fields_count);
void heap_free(Object *obj);
void heap_destroy(void);
#endif