The runtime library for the SakuraE compiler, providing memory management, string manipulation, and basic I/O support.
alloc.h: Header for the memory allocator, defining core runtime allocation interfaces.alloc.cpp:__alloc(size_t size): Wrapsmallocto provide heap allocation with zero-initialization and error handling for out-of-memory conditions.__free(void* ptr): Wrapsfreefor releasing heap memory.
raw_string.cpp:create_string(const char* literal): Copies a C-style string literal into heap memory, supporting string mutability.free_string(char* str): Releases memory for strings created by the runtime.concat_string(const char* s1, const char* s2): Concatenates two strings and returns a new heap-allocated string.
print.cpp:__print(char* str): Prints a string to standard output.__println(char* str): Prints a string followed by a newline.
These files are typically compiled into object files or a static library and linked with the user program after LLVM code generation to provide essential runtime support.