summaryrefslogtreecommitdiff
path: root/core/gotham_state.rs
AgeCommit message (Collapse)Author
2022-01-07chore: update copyright to 2022 (#13306)Ryan Dahl
Co-authored-by: Erfan Safari <erfanshield@outlook.com>
2021-04-14fix(core): better "missing type" GothamState error (#10189)Ben Noordhuis
Include the type name in the error message so you know what to look for.
2021-04-09perf(core): use BTreeMap for GothamState (#10073)Aaron O'Mullan
This commit replaces GothamState's internal HashMap with a BTreeMap to improve performance. OpState/GothamState keys by TypeId which is essentially an opaque u64. For small sets of integer keys BTreeMap outperforms HashMap mainly since it removes the hashing overhead and Eq/Comp on integer-like types is very cheap, it should also have a smaller memory footprint. We only use ~30 unique types and thus ~30 unique keys to access OpState, so the keyset is small and immutable throughout the life of a JsRuntime, there's no meaningful churn in keys added/removed.
2021-03-26remove macro_use (#9884)Ryan Dahl
2021-01-10update copyright to 2021 (#9081)Ryan Dahl
2020-12-09test(core): type aliases in OpState (#8653)Bartek IwaƄczuk
This commit adds a test case to core/gotham_state.rs that shows that type aliases can't be used reliably. Instead wrapper types should be used.
2020-09-21chore: add copyright (#7593)tokiedokie
2020-09-10Use gotham-like state for ops (#7385)Ryan Dahl
Provides a concrete state type that can be dynamically added. This is necessary for op crates. * renames BasicState to OpState * async ops take `Rc<RefCell<OpState>>` * sync ops take `&mut OpState` * removes `OpRegistry`, `OpRouter` traits * `get_error_class_fn` moved to OpState * ResourceTable moved to OpState