return this.compileMethodNode_allowBlockInlining_(this.link_(_node), false);
}
public java.lang.invoke.MethodHandle buildOptimized() {
final MethodNode[] _node;
MethodNode _inlined;
final VariableDeclarationNode[] _arguments;
final String _selector;
_node = new MethodNode[1];
this.log_text_("methodNode: ", _methodNode.sourceString());
_node[0] = this.link_(_methodNode);
this.log_text_("linked methodNode: ", _node[0].sourceString());
for (final String _each : _copiedArgumentNames) {
final String _newTempName;
_newTempName = BlockInliner.this.newTempName_for_(_each, _node[0]);
_copiedArgRenames.put(_each, _newTempName);
}
_arguments = this.buildMethodNodeArguments_(_node[0]);
_selector = _systemMapping.selectorConverter().selectorForNumArgs_(_arguments.length);
this.log_text_("selector: ", _selector);
_node[0] = this.newMethodNode_arguments_body_(_selector, _arguments, _node[0].body()).withNlrMarker_(_node[0].nlrMarker());
this.log_text_("node: ", _node[0].sourceString());
st.gravel.support.jvm.ArrayExtensions.with_do_(_astConstants, _methodNode.arguments(), new st.gravel.support.jvm.Block2<Object, BlockSendArgument, VariableDeclarationNode>() {
@Override
public Object value_value_(final BlockSendArgument _astConstant, final VariableDeclarationNode _arg) {
if (_astConstant != null) {
BlockInliner.this.log_text_("block " + _arg.name() + ": ", _astConstant.blockNode().sourceString());
return _node[0] = ((MethodNode) VariableNodeReplacer.factory.in_replace_with_(_node[0], _arg.name(), BlockInliner.this.renamedBlockNodeFor_(_astConstant)));
}
return BlockInliner.this;
}
});
_inlined = LiteralSendInliner.factory.inline_(_node[0]);
_inlined = this.link_(_inlined);
this.log_text_("inlined: ", _inlined.sourceString());
return this.compileMethodNode_(_inlined);
}