pass over the make RDI library

- Handle type layout in the library so converts simply
  define type graph and let the library handle DAG layout.
- Changed location baking. For now the library waits for scope, procs,
  global vars, and thread vars steps to serially finish because
  of common dependency on location sections, we need to parallel for each step.
- Changed encoded offset size for RDI_EvalOp_FrameOff to 8 bytes
  (1 byte is not enough to cover all cases)
- Added frame base location to RDI_Procedure (WASM encodes frame base
  as an index into a global array and so we have to resolve the base
  at runtime).
This commit is contained in:
Nikita Smith
2025-03-10 16:49:54 -07:00
parent 5717d6c54c
commit 44249f35fc
10 changed files with 457 additions and 264 deletions
+9 -7
View File
@@ -1027,12 +1027,14 @@ RDI_ThreadVariableMemberTable:
@table(name type desc)
RDI_ProcedureMemberTable:
{
{name_string_idx RDI_U32 ""}
{link_name_string_idx RDI_U32 ""}
{link_flags RDI_LinkFlags ""}
{type_idx RDI_U32 ""}
{root_scope_idx RDI_U32 ""}
{container_idx RDI_U32 ""}
{name_string_idx RDI_U32 ""}
{link_name_string_idx RDI_U32 ""}
{link_flags RDI_LinkFlags ""}
{type_idx RDI_U32 ""}
{root_scope_idx RDI_U32 ""}
{container_idx RDI_U32 ""}
{frame_base_location_first RDI_U32 ""}
{frame_base_location_opl RDI_U32 ""}
}
@table(name type desc)
@@ -1250,7 +1252,7 @@ RDI_EvalOpTable:
{MemRead 4 1 1 1}
{RegRead 5 4 0 1}
{RegReadDyn 6 0 1 1}
{FrameOff 7 1 0 1}
{FrameOff 7 8 0 1}
{ModuleOff 8 4 0 1}
{TLSOff 9 4 0 1}
{ObjectOff 10 0 0 0}