Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: replace some references with owned structures in VMLogic #11615

Merged
merged 1 commit into from
Jun 20, 2024

Commits on Jun 20, 2024

  1. Put vm::Config and FeesConfig into Arc

    Not a refactor that makes things pretty, especially as it pertains to
    the tests which willy-nilly mutate fields within these configs. But in
    actual production code this makes a lot of sense -- we have a single
    store of configurations that get loaded at startup and then proliferated
    across the codebase. Having these be `Arc` is a minimal expense and
    having the configs be a reference-counted pointers makes it much more
    straightforward to keep these configurations wherever they belong
    without unnecessary cloning of the underlying data or introducing nasty
    lifetimes as was the case with `VMLogic`.
    
    (`VMLogic` still has a lifetime, but it no longer is because of configs)
    nagisa committed Jun 20, 2024
    Configuration menu
    Copy the full SHA
    4851fce View commit details
    Browse the repository at this point in the history