Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package org.jruby.ir.operands;
 
 
 import java.util.List;
public class DynamicSymbol 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?
    final private CompoundString symbolName;
    public DynamicSymbol(CompoundString n) {  = n; }
    public String toString() {
        return ":" + .toString();
    }
    public Operand getSimplifiedOperand(Map<OperandOperandvalueMapboolean force) {
        CompoundString newSymbol = (CompoundString).getSimplifiedOperand(valueMapforce);
        return  == newSymbol ? this : new DynamicSymbol(newSymbol);
    }

    
Append the list of variables used in this operand to the input list
    @Override
    public void addUsedVariables(List<Variablel) {
        .addUsedVariables(l);
    }
    public Operand cloneForInlining(InlinerInfo ii) {
        return .cloneForInlining(ii);
    }
    @Override
    public Object retrieve(ThreadContext contextIRubyObject selfDynamicScope currDynScopeObject[] temp) {
        return context.runtime.newSymbol(((IRubyObject.retrieve(contextselfcurrDynScopetemp)).asJavaString());
    }
    @Override
    public void visit(IRVisitor visitor) {
        visitor.DynamicSymbol(this);
    }
New to GrepCode? Check out our FAQ X