Consolidate all allocation functions in a single 'static struct
commit99cac02d22efe34f6723ea62c539fa2e7e9cf4b5
authorJake Bailey (Hacklang) <jakebailey@fb.com>
Thu, 27 Jan 2022 18:21:14 +0000 (27 10:21 -0800)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Thu, 27 Jan 2022 18:22:40 +0000 (27 10:22 -0800)
tree2f8dda85adf317bf0790b901fe40b661e27dcaa1
parent70078cc208fa4f0238b19b0cac91c55c4e290381
Consolidate all allocation functions in a single 'static struct

Summary: Attempt to encourage the use of a single Conser table for each type by putting all Consers in a single place, the Allocator struct. Provide an API that only allows constructing a single static Allocator (per Reason implementation).

Differential Revision: D33782351

fbshipit-source-id: e4fd3251eeff6b0d1852fdbb6c5ba7b53ba64524
25 files changed:
hphp/hack/src/rupro/lib/alloc/alloc_bytes.rs [new file with mode: 0644]
hphp/hack/src/rupro/lib/alloc/alloc_decl_defs.rs [new file with mode: 0644]
hphp/hack/src/rupro/lib/alloc/alloc_pos.rs [new file with mode: 0644]
hphp/hack/src/rupro/lib/alloc/alloc_reason.rs [new file with mode: 0644]
hphp/hack/src/rupro/lib/alloc/alloc_typing_defs.rs [new file with mode: 0644]
hphp/hack/src/rupro/lib/alloc/mod.rs [new file with mode: 0644]
hphp/hack/src/rupro/lib/decl_hint.rs
hphp/hack/src/rupro/lib/decl_ty_provider.rs [deleted file]
hphp/hack/src/rupro/lib/folded_decl_provider/provider.rs
hphp/hack/src/rupro/lib/mod.rs
hphp/hack/src/rupro/lib/pos/relative_path.rs
hphp/hack/src/rupro/lib/pos_provider.rs [deleted file]
hphp/hack/src/rupro/lib/reason.rs
hphp/hack/src/rupro/lib/shallow_decl_provider/provider.rs
hphp/hack/src/rupro/lib/sn_provider.rs
hphp/hack/src/rupro/lib/typing.rs
hphp/hack/src/rupro/lib/typing_ctx.rs
hphp/hack/src/rupro/lib/typing_defs/expand.rs
hphp/hack/src/rupro/lib/typing_env.rs
hphp/hack/src/rupro/lib/typing_param.rs
hphp/hack/src/rupro/lib/typing_phase.rs
hphp/hack/src/rupro/lib/typing_return.rs
hphp/hack/src/rupro/lib/typing_toplevel.rs
hphp/hack/src/rupro/lib/typing_ty_provider.rs [deleted file]
hphp/hack/src/rupro/stc_ffi.rs