Commit 625bd7e4 authored by Kunshan Wang's avatar Kunshan Wang

sync muapi.h with spec

parent 2e5c2f30
......@@ -265,11 +265,6 @@ struct MuVM {
// Set handlers
void (*set_trap_handler)(MuVM *mvm, MuTrapHandler trap_handler, MuCPtr userdata);
// Build boot image
void (*make_boot_image)(MuVM *mvm,
MuID* whitelist, MuArraySize whitelist_sz,
MuCString output_file); /// MUAPIPARSER whitelist:array:whitelist_sz
// Proprietary API of refimpl2: Let the micro VM execute.
void (*execute)(MuVM *mvm);
......@@ -426,8 +421,9 @@ struct MuCtx {
void (*disable_watchpoint)(MuCtx *ctx, MuWPID wpid);
// Mu memory pinning, usually object pinning
MuUPtrValue (*pin )(MuCtx *ctx, MuValue loc); // loc is either MuRefValue or MuIRefValue
void (*unpin)(MuCtx *ctx, MuValue loc); // loc is either MuRefValue or MuIRefValue
MuUPtrValue (*pin )(MuCtx *ctx, MuValue loc); // loc is either MuRefValue or MuIRefValue
void (*unpin )(MuCtx *ctx, MuValue loc); // loc is either MuRefValue or MuIRefValue
MuUPtrValue (*get_addr)(MuCtx *ctx, MuValue loc); // loc is either MuRefValue or MuIRefValue
// Expose Mu functions as native callable things, usually function pointers
MuValue (*expose )(MuCtx *ctx, MuFuncRefValue func, MuCallConv call_conv, MuIntValue cookie);
......@@ -435,6 +431,15 @@ struct MuCtx {
// Create an IR builder and start building.
MuIRBuilder* (*new_ir_builder)(MuCtx *ctx);
// Build boot image
void (*make_boot_image)(MuVM *mvm,
MuID* whitelist, MuArraySize whitelist_sz,
MuIRefValue *sym_fields, MuCString *sym_strings, MuArraySize nsyms,
MuIRefValue *reloc_fields, MuCString *reloc_strings, MuArraySize nrelocs,
MuFuncRefValue primordial_func, MuStackRefValue primordial_stack,
MuRefValue primordial_threadlocal,
MuCString output_file); /// MUAPIPARSER whitelist:array:whitelist_sz;sym_fields:array:nsyms;sym_strings:array:nsyms;reloc_fields:array:nrelocs;reloc_strings:array:nrelocs;primordial_func:optional;primordial_stack:optional;primordial_threadlocal:optional
};
// These types are all aliases of MuID. They are provided to guide C
......@@ -758,9 +763,10 @@ struct MuIRBuilder {
#define MU_CI_UVM_KILL_DEPENDENCY ((MuCommInst)0x230) /// MUAPIPARSER muname:@uvm.kill_dependency
#define MU_CI_UVM_NATIVE_PIN ((MuCommInst)0x240) /// MUAPIPARSER muname:@uvm.native.pin
#define MU_CI_UVM_NATIVE_UNPIN ((MuCommInst)0x241) /// MUAPIPARSER muname:@uvm.native.unpin
#define MU_CI_UVM_NATIVE_EXPOSE ((MuCommInst)0x242) /// MUAPIPARSER muname:@uvm.native.expose
#define MU_CI_UVM_NATIVE_UNEXPOSE ((MuCommInst)0x243) /// MUAPIPARSER muname:@uvm.native.unexpose
#define MU_CI_UVM_NATIVE_GET_COOKIE ((MuCommInst)0x244) /// MUAPIPARSER muname:@uvm.native.get_cookie
#define MU_CI_UVM_NATIVE_GET_ADDR ((MuCommInst)0x242) /// MUAPIPARSER muname:@uvm.native.get_addr
#define MU_CI_UVM_NATIVE_EXPOSE ((MuCommInst)0x243) /// MUAPIPARSER muname:@uvm.native.expose
#define MU_CI_UVM_NATIVE_UNEXPOSE ((MuCommInst)0x244) /// MUAPIPARSER muname:@uvm.native.unexpose
#define MU_CI_UVM_NATIVE_GET_COOKIE ((MuCommInst)0x245) /// MUAPIPARSER muname:@uvm.native.get_cookie
#define MU_CI_UVM_META_ID_OF ((MuCommInst)0x250) /// MUAPIPARSER muname:@uvm.meta.id_of
#define MU_CI_UVM_META_NAME_OF ((MuCommInst)0x251) /// MUAPIPARSER muname:@uvm.meta.name_of
#define MU_CI_UVM_META_LOAD_BUNDLE ((MuCommInst)0x252) /// MUAPIPARSER muname:@uvm.meta.load_bundle
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment