ACE
ACE copied to clipboard
Convert codebase to C++?
Most ACE utils/managers are having create/destroy functions, so this could be constructors. Also, some things that will be possible in C++ and aren't in C:
- blitter as a global object - setting regs via method chaining, also add some helper methods. Should be able to make blitter usage a lot easier while also allowing to strip some of current blitter fns bloat/limitations without making code too messy
-
constexpr
most of constructors - templated stuff - abiltiy to have byte- or word-indexed tilebuffer without duplicating the codebase
- optimize stuff here and there with
std::move
- better memory management - ability to have static allocation for most of things instead of current dynamic-only approach. Should allow compiler for more optimizations. Done with either constructing globals for static alloc or using
new
/smart pointers for dynamic alloc - template most of helper fns so that they can be better optimized
Things to figure out:
- what C++ features to use and what to skip to prevent machine code and memory bloat or general slowdowns
- which compiler to officially support - Bartman's offers more recent C++ standard but has no STL/stdlib, Bebbo has those and optimizes better in some cases but doesn't support bleeding edge C++ and it's getting older with each day
- should the C++ be just a wrapper for C code or rewrite it in-place? Some people may want to use C flavor
while on a high level i would like to see that, I'm afraid given how few people work on the optimisation pipeline for 68k in gcc, the performance impact for c++ features that have not been optimised in the 68k backend may be noticeable