#ifndef __SCC_FRAME_ALLOC_H__ #define __SCC_FRAME_ALLOC_H__ #include typedef struct scc_frame_alloc_ops scc_frame_alloc_ops_t; struct scc_frame_alloc_ops { /// maybe have direct function to new scc_frame_alloc_ops_t *(*new)(scc_ir_func_t *func); int (*drop)(scc_frame_alloc_ops_t *alloc); int (*alloc_spill_slot)(scc_frame_alloc_ops_t *frame, int size, int align); int (*alloc_local_slot)(scc_frame_alloc_ops_t *frame, int size, int align, const char *name); void (*finalize)(scc_frame_alloc_ops_t *frame); int (*get_slot_offset)(scc_frame_alloc_ops_t *frame, int slot_id); int (*get_frame_size)(scc_frame_alloc_ops_t *frame); }; #endif