public Statement produceBlock_arguments_(final BlockNode _block, final Expression[] _arguments) {
final SequenceNode[] _body;
final Statement[] _stmts;
final Expression[] _argTemps;
final VariableNode _result;
final Statement _lastStatement;
_body = new SequenceNode[1];
_body[0] = _block.body();
if (_body[0].statements().length == 0) {
return NilLiteralNode.factory.basicNew();
}
for (final VariableDeclarationNode _temp : _block.body().temporaries()) {
_body[0] = ((SequenceNode) VariableRenamer.factory.in_rename_to_(_body[0], _temp.name(), LiteralSendInliner.this.newTempSuggestion_(_temp.name()).name()));
}
_argTemps = st.gravel.support.jvm.ArrayExtensions.collect_(_arguments, ((st.gravel.support.jvm.Block1<Expression, Expression>) (new st.gravel.support.jvm.Block1<Expression, Expression>() {
@Override
public Expression value_(final Expression _each) {
if (_each.isVariableNode()) {
return _each;
} else {
final VariableNode _t;
_t = LiteralSendInliner.this.newTempSuggestion_("extract");
LiteralSendInliner.this.extraEmit_(LocalWriteNode.factory.name_value_(_t.name(), _each));
return _t;
}
}
})));
_stmts = _body[0].statements();
int _temp1 = (_stmts.length - 1);
for (int _i = 1; _i <= _temp1; _i++) {
final Statement _stmt;
_stmt = _stmts[_i - 1];
LiteralSendInliner.this.extraEmit_(LiteralSendInliner.this.in_replaceAll_with_(_stmt, _block.arguments(), _argTemps));
}
_lastStatement = this.in_replaceAll_with_(_stmts[_stmts.length - 1], _block.arguments(), _argTemps);
if (_lastStatement.isReturnNode()) {