Skip to content
Prev Previous commit
Next Next commit
host_env: remove the pre-call foreign-call scaffolding
With the VM `_ctypes` and pyre both routed through `call`, delete the
foreign-call paths and libffi-type builders that no longer have a consumer:

- `callproc` (the low-level libffi `Vec<Type>` / `&[Arg]` entry) and its
  `CallResult` return type plus `call_result_bytes`.
- `callproc_simple` and its `SimpleArg` / `SimpleRestype` / `SimpleCallError`
  types (the pointer-only slice added for pyre's first cut), and the
  `lookup_function_symbol_addr_str` helper, along with their tests.
- `ffi_type_for_layout` + `CTypeParamKind`, `ffi_type_from_format`,
  `ffi_type_from_tag`, and `ffi_type_for_return_size` — the aggregate/simple
  libffi-type builders the old marshalling used. `call` and `CTypeLayout`
  build their own libffi types from `ffi_type_from_code` and the small
  `ffi_{pointer,byte_struct,repeat,void,i32,f64}_type` helpers, which stay.

`simple_type_chars` stays (still used by pyre's simple-type validation). The
`call` doc no longer references `callproc_simple`. A stale comment in the VM's
result decoder that named `call_result_bytes` is reworded.

host_env drops from 4051 to 3535 lines; the `call` ABI unit tests remain
(24 tests). test_ctypes is unchanged at run=322 skipped=58.

Assisted-by: Claude
  • Loading branch information
youknowone committed Jul 7, 2026
commit c49d4655761aa850c1f26325a17ddbdb7b1c6958
Loading
Loading