Recent changes to the expression parser broke function name resolution when using the IR interpreter instead of JIT. This patch changes the IRMemoryMap ivar in InterpreterStackFrame to an IRExecutionUnitSP (which is a subclass), allowing InterpreterStackFrame::ResolveConstantValue() to call FindSymbol() on the name of the Value when it's a FunctionVal. It also changes IRExecutionUnit::FindInSymbols() to call GetFileAddress() on the symball if ResolveCallableAddress() fails and there is no valid Process.
Details
Diff Detail
Event Timeline
Aside from one minor object ownership issue this is good to go. Change the IRExecutionUnitSP to an IRExecutionUnit& and you have my blessing!
source/Expression/IRInterpreter.cpp | ||
---|---|---|
106 | As noted below, this can just be an IRExecutionUnit&. | |
689 | Given that the caller of Interpret has an execution_unit_sp, and Interpret does not create any objects that live longer than the Interpret invocation (specifically, the InterpreterStackFrame is stack-allocated) I believe we should not need to take the shared pointer. An IRExecutionUnit& should suffice. |
As noted below, this can just be an IRExecutionUnit&.