HHBC AST type substitutions for friendly C interop
commit6f8cb6dbb8d374fb167d6f5311e0dad3aefb378c
authorShayne Fletcher <shaynefletcher@fb.com>
Thu, 1 Jul 2021 13:32:46 +0000 (1 06:32 -0700)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Thu, 1 Jul 2021 13:33:56 +0000 (1 06:33 -0700)
tree59e6a5cad9cabef6d61794135a679973bedbabcb
parent744210ee89560a2a48c9bd57e0b1816a67512790
HHBC AST type substitutions for friendly C interop

Summary:
We are working towards making the HHBC AST completely `repr(C)`. This diff makes some substitutions for builtin slices with substitutions supplied by the newly developed `ffi` crate (https://www.internalfb.com/diff/D29466554 (https://github.com/facebook/hhvm/commit/e843aa208e3fff8465ebe5980d5f59937cfbee70)).

## What's covered here

- New conversion functions for `Slice` and `Str`
- Expressed in terms of `Slice`, `Str` and `repr(C)`:
  - `ParamId<>`
  - `hhbc_by_ref_id::class::Type<>` and friends,
  - `ByRefs<'arena>`

Reviewed By: shiqicao

Differential Revision: D29486892

fbshipit-source-id: 2217ccfe1bb4e627a20bdab5839ea5f40af8a5ad
18 files changed:
hphp/hack/Cargo.lock
hphp/hack/src/hhbc/bytecode_printer/print.rs
hphp/hack/src/hhbc/hhbc_by_ref/cargo/hhbc_by_ref_emit_body/Cargo.toml
hphp/hack/src/hhbc/hhbc_by_ref/cargo/hhbc_by_ref_emit_class/Cargo.toml
hphp/hack/src/hhbc/hhbc_by_ref/cargo/hhbc_by_ref_emit_expression/Cargo.toml
hphp/hack/src/hhbc/hhbc_by_ref/cargo/hhbc_by_ref_emit_function/Cargo.toml
hphp/hack/src/hhbc/hhbc_by_ref/cargo/hhbc_by_ref_emit_memoize_method/Cargo.toml
hphp/hack/src/hhbc/hhbc_by_ref/cargo/hhbc_by_ref_hhbc_ast/Cargo.toml
hphp/hack/src/hhbc/hhbc_by_ref/cargo/hhbc_by_ref_hhbc_id/Cargo.toml
hphp/hack/src/hhbc/hhbc_by_ref/emit_body.rs
hphp/hack/src/hhbc/hhbc_by_ref/emit_class.rs
hphp/hack/src/hhbc/hhbc_by_ref/emit_expression.rs
hphp/hack/src/hhbc/hhbc_by_ref/emit_memoize_function.rs
hphp/hack/src/hhbc/hhbc_by_ref/emit_memoize_method.rs
hphp/hack/src/hhbc/hhbc_by_ref/emit_statement.rs
hphp/hack/src/hhbc/hhbc_by_ref/hhbc_ast.rs
hphp/hack/src/hhbc/hhbc_by_ref/hhbc_id.rs
hphp/hack/src/utils/ffi/ffi.rs