Pharo Metalink 不适用于#ifTrue:发送节点

Pharo Metalink not works on #ifTrue: send node

当我在以下代码中将 MetaLink 添加到所有发送节点时,#ifTrue: 上的 Metalink 不起作用:

aMethod
    10 = 11
        ifTrue: [ ^ 3 ]

添加元链接的代码:

ast sendNodes do: [ :n | 
            n link: (MetaLink new
                        metaObject: [ :node | 
                            Transcript show: node asString; cr ];
                        arguments: #(node);
                        selector: #value:;
                        control: #before;
                        yourself) ]

谁能解释为什么会这样? 如何在 #ifTrue: 发送上添加 MetaLink?

感谢@LeandroCaniglia 的评论,这是因为编译优化。

您可以在Opal Compiler settings中取消选中Inline If并重新编译该方法。

重新编译后,重新安装您的 Metalinks,您将看到 #ifTrue: 作为消息调用。