package org.jruby.ir.instructions;
import java.util.Arrays;
import org.jruby.ir.IRScope;
import org.jruby.ir.transformations.inlining.CloneInfo;
public class InlinedLineNumberInstr extends LineNumberInstr {
private final IRScope scope;
public InlinedLineNumberInstr(IRScope scope, int lineNumber) {
super(lineNumber);
this.scope = scope;
}
@Override
public String[] toStringNonOperandArgs() {
String[] base = super.toStringNonOperandArgs();
String[] args = Arrays.copyOf(base, base.length + 1);
args[args.length - 1] = "scope_name: " + scope.getId();
return args;
}
@Override
public Instr clone(CloneInfo ii) {
return this;
}
public IRScope getScope() {
return scope;
}
}