gccrs: Refactor intrinsic compilation to reduce code duplication
Intrinsic compilation in gccrs is refactored to use a wrapper class, reducing code duplication and improving maintainability.
This commit overhauls how gccrs handles intrinsic compilation by introducing a new Intrinsic wrapper class. This class manages the setup of the function block, including parameters and type parameters, allowing lower-level lambdas to focus solely on compiling the function body. This change significantly reduces code duplication, cutting down the rust-intrinsic-handlers.cc file by nearly 1000 lines.
In Details
The gccrs backend has specific handlers for Rust intrinsics. Previously, the lambda provided to compile an intrinsic had to manage the entire function block setup. This commit introduces IntrinsicCtx, a class that encapsulates this setup, and Intrinsic::compile, a method that orchestrates the compilation of the intrinsic's function block. This refactoring aims to deduplicate code across various intrinsic handlers, making the backend more maintainable. The structure is similar to how builtin macro handlers are managed, suggesting potential for further file splitting if the handler code gro…