public PutGlobalVarInstr(RubySymbol varName, Operand value) { this(new GlobalVariable(varName), value); }
public void GlobalVariable(GlobalVariable globalvariable) { print(globalvariable.getId()); } public void Hash(Hash hash) {
@Override public Object interpret(ThreadContext context, StaticScope currScope, DynamicScope currDynScope, IRubyObject self, Object[] temp) { return getTarget().retrieve(context, self, currScope, currDynScope, temp); }
case FLOAT: return org.jruby.ir.operands.Float.decode(this); case FROZEN_STRING: return FrozenString.decode(this); case GLOBAL_VARIABLE: return GlobalVariable.decode(this); case HASH: return Hash.decode(this); case IR_EXCEPTION: return IRException.decode(this);
@Override public Object interpret(ThreadContext context, StaticScope currScope, DynamicScope currDynScope, IRubyObject self, Object[] temp) { return getTarget().retrieve(context, self, currScope, currDynScope, temp); }
case FLOAT: return org.jruby.ir.operands.Float.decode(this); case FROZEN_STRING: return FrozenString.decode(this); case GLOBAL_VARIABLE: return GlobalVariable.decode(this); case HASH: return Hash.decode(this); case IR_EXCEPTION: return IRException.decode(this);
public PutGlobalVarInstr(RubySymbol varName, Operand value) { this(new GlobalVariable(varName), value); }
public boolean computeScopeFlags(IRScope scope) { String name = getTarget().getId(); if (name.equals("$_") || name.equals("$LAST_READ_LINE")) { scope.getFlags().add(IRFlags.REQUIRES_LASTLINE); } else if (name.equals("$~") || name.equals("$`") || name.equals("$'") || name.equals("$+") || name.equals("$LAST_MATCH_INFO") || name.equals("$PREMATCH") || name.equals("$POSTMATCH") || name.equals("$LAST_PAREN_MATCH")) { scope.getFlags().add(IRFlags.REQUIRES_BACKREF); return true; } return false; }
public PutGlobalVarInstr(String varName, Operand value) { super(Operation.PUT_GLOBAL_VAR, new GlobalVariable(varName), null, value); }
public void GlobalVariable(GlobalVariable globalvariable) { print(globalvariable.getId()); } public void Hash(Hash hash) {
public GetGlobalVariableInstr(Variable dest, RubySymbol gvarName) { this(dest, new GlobalVariable(gvarName)); }
public boolean computeScopeFlags(IRScope scope) { String name = getTarget().getId(); if (name.equals("$_") || name.equals("$LAST_READ_LINE")) { scope.getFlags().add(IRFlags.REQUIRES_LASTLINE); } else if (name.equals("$~") || name.equals("$`") || name.equals("$'") || name.equals("$+") || name.equals("$LAST_MATCH_INFO") || name.equals("$PREMATCH") || name.equals("$POSTMATCH") || name.equals("$LAST_PAREN_MATCH")) { scope.getFlags().add(IRFlags.REQUIRES_BACKREF); return true; } return false; }
@Override public Instr cloneForInlining(InlinerInfo ii) { return new PutGlobalVarInstr(((GlobalVariable) operands[TARGET]).getName(), operands[VALUE].cloneForInlining(ii)); }
public GetGlobalVariableInstr(Variable dest, String gvarName) { super(Operation.GET_GLOBAL_VAR, dest, new GlobalVariable(gvarName), null); }
@Override public boolean computeScopeFlags(IRScope scope) { String name = getTarget().getId(); if (name.equals("$_") || name.equals("$LAST_READ_LINE")) { scope.getFlags().add(IRFlags.REQUIRES_LASTLINE); } else if (name.equals("$~") || name.equals("$`") || name.equals("$'") || name.equals("$+") || name.equals("$LAST_MATCH_INFO") || name.equals("$PREMATCH") || name.equals("$POSTMATCH") || name.equals("$LAST_PAREN_MATCH")) { scope.getFlags().add(IRFlags.REQUIRES_BACKREF); return true; } return false; }
@Override public Instr cloneForInlining(InlinerInfo ii) { return new PutGlobalVarInstr(((GlobalVariable) operands[TARGET]).getName(), operands[VALUE].cloneForInlining(ii)); }