Open LinqLover opened 4 years ago
Unfortunately, the number of nested nodes does not even correspond with the number of iterations but the number of calls from the iterator block ...
Interesting. Well, it is not possible to catch neither block evaluation nor its return. That []-record is created manually. You discovered the drawback of that.
Would be nice to also simulate the block return somehow.
Hm, in theory, this should be solved by checking #outerCode
of the right CompiledBlock
, shouldn't it? And does MSR support the V3.X bytecode set all?
I don't think that I use SistaV1-specific calls. should work with V3PlusClosures, too.
But this refers to SistaV1 explicitly:
In V3PlusClosures, we don't have CompiledBlock
s, so aContext method
will always equal closure homeMethod
, correctly?
Correct. So, where is the issue? :-) Just the comment refers to SistaV1, not the code.
FWIW, here is another erroneous record that assumes recursion instead of method calls:
Recorded watching the packages #(Metacello Gofer)
with #recordAllObjects
.
Steps to reproduce:
Output:
The representation is counterintuitive. When using
#recordAllObjects
, the argumentn
is not recorded either.Rather, I would expect to see three children of the
Morph>>submorphsDo:
node, one for each invocation of the[] in UndefinedObject>>DoIt
block.