Previously we abused LLVMCompiledTrace to also be the generic "use a CompiledTrace that doesn't do much except in testing". This wasn't ideal for several reasons, and since we soon want to remove the LLVM backend, the time has come to remove this.
The solution this commit introduces is relatively simple: we provide two new test-only structs (CompiledTraceTesting and
CompiledTraceTestingWithHl) that implement the CompiledTrace trait. This gives the effect we want in tests without overloading LLVMCompiledTrace.
Note: we could have provided only 1 struct, and used an Option type for the HotLocation. That said, forcing the user to choose what they want makes it clearer what testing-only functionality they want in different testing scenarios, which seems helpful.
Previously we abused
LLVMCompiledTrace
to also be the generic "use aCompiledTrace
that doesn't do much except in testing". This wasn't ideal for several reasons, and since we soon want to remove the LLVM backend, the time has come to remove this.The solution this commit introduces is relatively simple: we provide two new test-only structs (
CompiledTraceTesting
andCompiledTraceTestingWithHl
) that implement theCompiledTrace
trait. This gives the effect we want in tests without overloadingLLVMCompiledTrace
.Note: we could have provided only 1 struct, and used an
Option
type for theHotLocation
. That said, forcing the user to choose what they want makes it clearer what testing-only functionality they want in different testing scenarios, which seems helpful.