@Override public Operand getSimplifiedOperand(Map<Operand, Operand> valueMap, boolean force) { Operand newArray = array.getSimplifiedOperand(valueMap, force); /* * SSS FIXME: Cannot convert this to an Array operand! * if (_array instanceof Variable) { _array = ((Variable)_array).getValue(valueMap); } */ return (newArray == array) ? this : new Splat(newArray); }
public void Splat(Splat splat) { visit(splat.getArray()); } public void StandardError(StandardError standarderror) { }
@Override public Operand cloneForInlining(InlinerInfo ii) { return hasKnownValue() ? this : new Splat(array.cloneForInlining(ii)); }
case SCOPE_MODULE: return ScopeModule.decode(this); case SELF: return Self.SELF; case SPLAT: return Splat.decode(this); case STANDARD_ERROR: return new StandardError(); case STRING_LITERAL: return StringLiteral.decode(this);
case SCOPE_MODULE: return ScopeModule.decode(this); case SELF: return Self.SELF; case SPLAT: return Splat.decode(this); case STANDARD_ERROR: return new StandardError(); case STRING_LITERAL: return StringLiteral.decode(this);
@Override public Operand getSimplifiedOperand(Map<Operand, Operand> valueMap, boolean force) { Operand newArray = array.getSimplifiedOperand(valueMap, force); return (newArray == array) ? this : new Splat(newArray); }
@Override public Operand cloneForInlining(CloneInfo ii) { return hasKnownValue() ? this : new Splat(array.cloneForInlining(ii)); }
public void Splat(Splat splat) { visit(splat.getArray()); } public void StandardError(StandardError standarderror) { }
/** When fixing up splats in nested closure we need to tweak the operand if it is a LocalVariable */ public Operand cloneForDepth(int n) { return array instanceof LocalVariable ? new Splat(((LocalVariable) array).cloneForDepth(n)) : this; }
@Override public Operand cloneForInlining(CloneInfo ii) { return hasKnownValue() ? this : new Splat(array.cloneForInlining(ii)); }
@Override public void Splat(Splat splat) { visit(splat.getArray()); // Splat is now only used in call arg lists where it is guaranteed that // the splat-arg is an array. // // It is: // - either a result of a args-cat/args-push (which generate an array), // - or a result of a BuildSplatInstr (which also generates an array), // - or a rest-arg that has been received (which also generates an array) // and is being passed via zsuper. // // In addition, since this only shows up in call args, the array itself is // never modified. The array elements are extracted out and inserted into // a java array. So, a dup is not required either. // // So, besides retrieving the array, nothing more to be done here! }
@Override public Operand getSimplifiedOperand(Map<Operand, Operand> valueMap, boolean force) { Operand newArray = array.getSimplifiedOperand(valueMap, force); return (newArray == array) ? this : new Splat(newArray); }
@Override public Operand cloneForInlining(InlinerInfo ii) { return hasKnownValue() ? this : new Splat(array.cloneForInlining(ii)); }
@Override public void Splat(Splat splat) { visit(splat.getArray()); // Splat is now only used in call arg lists where it is guaranteed that // the splat-arg is an array. // // It is: // - either a result of a args-cat/args-push (which generate an array), // - or a result of a BuildSplatInstr (which also generates an array), // - or a rest-arg that has been received (which also generates an array) // and is being passed via zsuper. // // In addition, since this only shows up in call args, the array itself is // never modified. The array elements are extracted out and inserted into // a java array. So, a dup is not required either. // // So, besides retrieving the array, nothing more to be done here! }
@Override public Operand getSimplifiedOperand(Map<Operand, Operand> valueMap, boolean force) { Operand newArray = array.getSimplifiedOperand(valueMap, force); /* * SSS FIXME: Cannot convert this to an Array operand! * if (_array instanceof Variable) { _array = ((Variable)_array).getValue(valueMap); } */ return (newArray == array) ? this : new Splat(newArray); }
@Override public void encode(IRWriterEncoder e) { super.encode(e); e.encode(getArray()); }
/** When fixing up splats in nested closure we need to tweak the operand if it is a LocalVariable */ public Operand cloneForDepth(int n) { return array instanceof LocalVariable ? new Splat(((LocalVariable) array).cloneForDepth(n)) : this; }
@Override public void encode(IRWriterEncoder e) { super.encode(e); e.encode(getArray()); }
public static Splat decode(IRReaderDecoder d) { return new Splat(d.decodeOperand()); }
@Override public void Splat(Splat splat) { jvm.method().loadContext(); visit(splat.getArray()); jvm.method().invokeHelper("irSplat", RubyArray.class, ThreadContext.class, IRubyObject.class); }