I've been searching around in the code for a way to add some new binary operators for the interpreter, but I cannot find a way to get them handled by the DynamicCallDispatcher.
It looks like the LanguageRuntime::InitOperatorImplementations() function is where the OperatorImplementationTable gets initialized. However, the InitOperatorImplementations function is virtual (implying that it could be overridden by subclasses),
but the table itself is private. The only other function that currently adds to this table is also private (AddImplementation). Right now, the InitOperatorImplementations function creates a new table and assigns it to the private _baseOperatorImplementations
data member. It seems like it would be better to have the function return a table that the caller can place into the _baseOperatorImplementations data member since it is a virtual function.
I saw in the comments for the LanguageRuntime that the table that is initialized is the "base" that everything gets copied from, and that it "can be extended on the fly to include extra implementations with arg conversions". What
do you mean by this?
Currently, I've been making custom AstNode classes to act as the binary operators that I want / need (since the only use for a custom binary implementation is during execution with an AST). Is this the intended approach to solving this issue?