LoaderState
2016-12-26 16:02:13 0 举报
Erlang LoaderState数据结构
作者其他创作
大纲/内容
LineInstr* line_instr;\t/* Line instructions */
Eterm* fname;\t/* List of file names */
int loc_size; /* Size of location info in bytes (2/4) */
int num_literals;\t /* Number of literals in table */
int lambdas_allocated; /* Size of allocated lambda table. */
int num_fnames; /* Number of filenames in fname table */
int* func_line;\t/* Mapping from function to first line instr */
unsigned file_left; /* Number of bytes left int file */
Eterm function; /* Tagged atom for current function (or 0 if none) */
Eterm* atom; /* Atom table */
int code_buffer_size; /* Size of code buffer in words */
int num_exps; /* Number of exports */
GenOp* genop;\t /* The last generic instruction seen */
char* file_name; /* Name of file we are reading(usually chunk name) */
char* lambda_error;\t\t/* Delayed missing 'FunT' error. */
int num_line_items;\t/* Number of line items. */
int num_functions; /* Number of functions in module */
int allocated_literals; /* Number of literal entries allocated */
int num_line_instrs;\t/* Maximum number of line instructions */
GenOp* free_genop;\t /* List of free genops */
unsugned size; /* Size of chunk */
unsigned arity; /* Arity for current function */
Lambda* lambdas; /* Pointer to lambdas. */
int num_labels; /* Numbers of labels */
LiteralPatch* literal_patches; /* Operands that need to be patched. */
int num_atoms; /* Number of atoms in atom table */
ExportEntry* export;\t/* Pointer to export table */
Label* labels;
GenOpBlock* genop_blocks; /* List of all block of allocated genops */
int specific_op; /* Specific opcode (-1 if not found) */
int ci; /* Current index into loaded code */
LoaderState
byte* code_start; /* Start of code file */
struct chunks[NUM_CHUNK_TYPES]
byte* file_p; /* Current pointer within file */
Eterm group_leader; /* Group leader (for diagnostics) */
int on_load; /* Index in the code for the on_load function (or 0 if there is no on_load function) */
Uint total_literal_size;\t/* Total heap size for all literals. */
int current_li;\t/* Current line instruction */
Literal* literals;\t /* Array of literals */
int num_imports; /* Number of imports */
ImportEntry* import;\t/* Import entry (translated information) */
BeamInstr* code; /* Loaded code */
BeamInstr catches; /* Linked list of catch_yf instructions */
ErlDrvBinary* bin; /* Binary holding BEAM file (or NULL) */
Eterm module; /* Tagged atom for module name */
int may_load_nif; /* true if NIFs may later be loaded for this module */
Lambda def_lambdas[16];\t/* Default storage for lambda table. */
BeamInstr* line_item;\t/* Line items from the BEAM file. */
unsigned loaded_size; /* Final size of code loaded */
The current logical file within the binary
byte mod_md5[16]; /* MD5 for module code */
StringPatch* string_patches; /* Linked list of position into string table to patch */
unsigned code_size; /* Size of code file */
byte* start; /* Start of chunk (in binary) */
int num_lambdas; /* Number of lambdas in table. */
0 条评论
下一页
为你推荐
查看更多