Read only miror of the eden emulator
Find a file
lizzie 218c6705d9
Some checks are pending
tx-src / sources (push) Waiting to run
Check Strings / check-strings (push) Waiting to run
[hle] constexpr handler dispatch maps, introduce version gating (#4480)
This PR primarily focuses on upbringing constexpr maps for handlers.

Each time an HLE object of a service is construed, it registers it's own handlers, over and over.
Regardless of whetever it needs them at the moment or not.
Additionally we don't require to keep track of different function pointers amongst each object.
This can be done by overriding the given function instead, as opposed to having a separate
hash map for every given object.

In other words: Remove handlers (and handlers_tipc) map for every instance
then read from a static defined per-class.

- [x] Migrate all HLE functions to new `frozen::map` constexpr time finder
- [ ] Measure if this approach actually makes better codegen

Optional:
- [x] Properly gate all functions (that have versions commented next to them)
- [x] Maybe store `HandlerFnP<>` and `const char*` separately, version gating can go in a different map as well

Information such as name can be used on debug builds, but doesn't particularly help on release as one can consult an external reference (or have an annotated IPC map)

Signed-off-by: lizzie <lizzie@eden-emu.dev>

- [x] I have read and followed the [Contribution Guidelines](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/CONTRIBUTING.md#code-contributions).
- [x] I have read and followed the [AI Policy](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/docs/policies/AI.md)
- [x] I have read and followed the [Coding Guidelines](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/docs/policies/Coding.md) to the best of my ability.

-------------------

Co-authored-by: Maufeat <sahyno1996@gmail.com>
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4480
Reviewed-by: Maufeat <sahyno1996@gmail.com>
Reviewed-by: MaranBr <maranbr@eden-emu.dev>
2026-10-13 04:38:36 +02:00
.ci [tools] refactor, use #!/bin/sh, update license files (#3998) 2026-05-22 21:15:31 +02:00
.forgejo/workflows [ci] Only update translations once a week (#4256) 2026-08-08 05:46:52 +02:00
.github [forgejo] Replace mentions of yuzu in issue templates with eden (#3842) 2026-08-10 03:55:03 +02:00
.patch [cmake] Use a debloated boost distribution (#4198) 2026-09-15 07:22:23 +02:00
.reuse [qt] nuke game compat list (again) (#4201) 2026-07-12 09:32:11 +02:00
.tx [cmake] feat: FFmpeg CI, allow 16kb android builds, update translations for transifex (#2543) 2025-09-23 19:38:11 +02:00
CMakeModules Revert "[audio] Replace libopus with FFmpeg (#4169)" (#4419) 2026-09-14 14:34:24 +02:00
dist [dist, android] Update translations from Transifex for Oct 12 (#4527) 2026-10-12 19:23:00 +02:00
docs [hle] constexpr handler dispatch maps, introduce version gating (#4480) 2026-10-13 04:38:36 +02:00
externals [loader] add ZBIC (zstd variant) NSO decompression support for Switch 22.0+ (#4482) 2026-09-27 12:48:45 +02:00
hooks [tools] refactor, use #!/bin/sh, update license files (#3998) 2026-05-22 21:15:31 +02:00
LICENSES general: fix trailing whitespace 2024-01-08 09:34:32 -05:00
src [hle] constexpr handler dispatch maps, introduce version gating (#4480) 2026-10-13 04:38:36 +02:00
tools [hle] constexpr handler dispatch maps, introduce version gating (#4480) 2026-10-13 04:38:36 +02:00
.codespellrc core: refactor emulated cpu core activation 2023-12-04 10:37:16 -05:00
.git-blame-ignore-revs Skip git blame 2023-11-04 18:26:49 +00:00
.gitattributes chore: make yuzu REUSE compliant 2022-07-27 12:53:49 +02:00
.gitignore [android] Replace Oboe audio with SDL3 audio (#4338) 2026-09-02 00:29:58 +02:00
.shellcheckrc [tools, cmake] refactor: update/hash check scripts, use tags for some more deps, proper CPMUtil separation (#2666) 2025-10-05 03:04:53 +02:00
AGENTS.md [docs] Tighten AI restrictions and switch to CONTRIBUTING.md (#4193) 2026-07-09 23:06:46 +02:00
CLAUDE.md [docs] Tighten AI restrictions and switch to CONTRIBUTING.md (#4193) 2026-07-09 23:06:46 +02:00
CMakeLists.txt [cmake] Use a debloated boost distribution (#4198) 2026-09-15 07:22:23 +02:00
CONTRIBUTING.md [meta] Discourage profanity usage (#4239) 2026-08-09 02:53:16 +02:00
cpmfile.json [ffmpeg]Gamescope / Gamemode NVDEC Emulation - GPU Decoding Patches (#4501) 2026-10-01 03:34:57 +02:00
Doxyfile chore: make yuzu REUSE compliant 2022-07-27 12:53:49 +02:00
LICENSE.txt chore: make yuzu REUSE compliant 2022-07-27 12:53:49 +02:00
README.md [docs] Various grammar fixes, fix dead links, update deps.md, merge RDOC into Debug.md (#4315) 2026-09-01 06:45:47 +02:00
shell.nix Revert "[audio] Replace libopus with FFmpeg (#4169)" (#4419) 2026-09-14 14:34:24 +02:00


Eden
Eden

Eden is a free and open-source (FOSS) Switch 1 emulator started by developer Camille LaVey.
Written in C++, with builds for Windows, Linux, macOS, Android, FreeBSD and more.

Discord Stoat

Compatibility | Development | Building | Download | Support | License

Compatibility

The emulator is capable of running most commercial games at full speed, provided you meet the necessary hardware requirements.

A list of supported games will be available in future. Please be patient.

Check out our website for the latest news on exciting features, monthly progress reports, and more!

Packaging status

Contribute

To contribute to Eden; be it financially, code, bug reports, or otherwise, see our Contributing guidelines.

Documentation

We have a user manual! See our User Handbook.

Building

See the General Build Guide

For information on provided development tooling, see the Tools directory

Download

You can download the latest releases from our release page.

Save us some bandwidth! We have mirrors available as well.

License

Eden is licensed under the GPLv3 (or any later version). Refer to the LICENSE.txt file.

Special thanks

Super special thanks to Cloudflare for preventing the git server from blowing up.

  • Yuzu
  • Ryujinx
  • Sudachi
  • Citron
  • Torzu
  • Suyu
  • Ryubing

And everyone who continues or had contributed to the project! <3