All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.jruby.compiler.ir.operands.DynamicReference Maven / Gradle / Ivy

There is a newer version: 9.4.9.0
Show newest version
package org.jruby.compiler.ir.operands;
import org.jruby.compiler.ir.representations.InlinerInfo;

import java.util.List;
import java.util.Map;

public class DynamicReference extends Operand
{
        // SSS FIXME: Should this be Operand or CompoundString?
        // Can it happen that symbols are built out of other than compound strings?  
        // Or can it happen during optimizations that this becomes a generic operand?
    CompoundString _refName;

    public DynamicReference(CompoundString n) { _refName = n; }

    public boolean isNonAtomicValue() { return true; }

    public Operand getSimplifiedOperand(Map valueMap)
    { 
       _refName = (CompoundString)_refName.getSimplifiedOperand(valueMap);
       return this;
    }

    /** Append the list of variables used in this operand to the input list */
    @Override
    public void addUsedVariables(List l)
    {
        _refName.addUsedVariables(l);
    }

    public Operand cloneForInlining(InlinerInfo ii) {
        return _refName.cloneForInlining(ii);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy