You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The compiler is able to spot and optimise away a redundant temp that is assigned to and then its value immediately returned. It can also optimise away unconditional jumps to a return message bytecode, by inlining a copy of the return bytecode in place of the jump. In combination this particular code form causes the compiler to generate text maps with different numbers of entries for release (optimized) vs debug (non-optimized) code. It is an invariant of the debugger that the text maps should have the same number of entries as these are used to map between debug/release representations of methods when de-optimizing methods on the stack for debugging.
If a breakpoint is set inside the setUp method and then a step occurs so the debugger converts the setUp frame and the runCase (block) frame to debug frames, the IP is remapped incorrectly in the runCase frame so that when returned to it sends the setUp message again. The issue relates to the optimisation of 'push self; send' into a single instruction in the release build of the method vs separate instructions in the debug build.
This can be worked around by changing the pair of sends in the runCase block to a cascade.
From @blairmcg on October 5, 2016 18:11
The compiler is able to spot and optimise away a redundant temp that is assigned to and then its value immediately returned. It can also optimise away unconditional jumps to a return message bytecode, by inlining a copy of the return bytecode in place of the jump. In combination this particular code form causes the compiler to generate text maps with different numbers of entries for release (optimized) vs debug (non-optimized) code. It is an invariant of the debugger that the text maps should have the same number of entries as these are used to map between debug/release representations of methods when de-optimizing methods on the stack for debugging.
Copied from original issue: dolphinsmalltalk/DolphinVM#95
The text was updated successfully, but these errors were encountered: