bytecode compiler impirsts and external functions call support, byyterun imports and external functions calls parsing, initial impl of module manager

This commit is contained in:
ProgramSnail 2024-11-29 13:45:03 +03:00
parent 2cd7afe0c5
commit 0a26953318
11 changed files with 409 additions and 205 deletions

View file

@ -0,0 +1,19 @@
#pragma once
#include <stdint.h>
#include "utils.h"
struct ModSearchResult {
ssize_t symbol_offset; // < 0 => not found
uint32_t mod_id;
bytefile *mod_file;
};
void mod_add_search_path(const char *path);
bytefile *mod_get(uint32_t id);
int32_t mod_load(const char *name); // < 0 => not found
struct ModSearchResult mod_search_pub_symbol(const char *name);