* we might want to make it optional - I think it's only used for some
* features beyond what MRI does like printing locals in backtraces.
*/
if (currentNode != null && Truffle.getRuntime().getCurrentFrame() != null) {
activations.add(new Activation(currentNode, Truffle.getRuntime().getCurrentFrame().getFrame(FrameInstance.FrameAccess.MATERIALIZE, true).materialize()));
}
Truffle.getRuntime().iterateFrames(new FrameInstanceVisitor<RubyMethod>() {
@Override
public RubyMethod visitFrame(FrameInstance frameInstance) {
// Multiple top level methods (require) introduce null call nodes - ignore them
if (frameInstance.getCallNode() != null) {
activations.add(new Activation(frameInstance.getCallNode(),
frameInstance.getFrame(FrameInstance.FrameAccess.MATERIALIZE, true).materialize()));
}
return null;
}