public void StringLiteral(StringLiteral stringliteral) { print(stringliteral.getByteList()); } public void SValue(SValue svalue) { visit(svalue.getArray()); }
public void StringLiteral(StringLiteral stringliteral) { print(stringliteral.getByteList()); } public void SValue(SValue svalue) { visit(svalue.getArray()); }
@Override public void StringLiteral(StringLiteral stringliteral) { jvm.method().pushString(stringliteral.getByteList()); }
@Override public void StringLiteral(StringLiteral stringliteral) { jvm.method().pushString(stringliteral.getByteList()); }
@Override public void StringLiteral(StringLiteral stringliteral) { jvmMethod().pushString(stringliteral.getByteList(), stringliteral.getCodeRange()); }
public boolean isSameEncodingAndCodeRange(RubyString str, StringLiteral newStr) { return newStr.getByteList().getEncoding() == encoding && newStr.getCodeRange() == str.getCodeRange(); }
@Override public void StringLiteral(StringLiteral stringliteral) { jvmMethod().pushString(stringliteral.getByteList(), stringliteral.getCodeRange()); }
public boolean isSameEncodingAndCodeRange(RubyString str, StringLiteral newStr) { return newStr.getByteList().getEncoding() == encoding && newStr.getCodeRange() == str.getCodeRange(); }
@Override public Object interpret(ThreadContext context, StaticScope currScope, DynamicScope currDynScope, IRubyObject self, Object[] temp) { ByteList bytes = new ByteList(); bytes.setEncoding(encoding); RubyString str = RubyString.newStringShared(context.runtime, bytes, StringSupport.CR_7BIT); for (Operand p : getOperands()) { if ((p instanceof StringLiteral) && (isSameEncodingAndCodeRange(str, (StringLiteral)p))) { str.getByteList().append(((StringLiteral)p).getByteList()); str.setCodeRange(((StringLiteral)p).getCodeRange()); } else { IRubyObject pval = (IRubyObject)p.retrieve(context, self, currScope, currDynScope, temp); str.append19(pval); } } if (frozen) { if (debug) { return IRRuntimeHelpers.freezeLiteralString(str, context, file, line); } return IRRuntimeHelpers.freezeLiteralString(str); } return str; }
@Override public Object interpret(ThreadContext context, StaticScope currScope, DynamicScope currDynScope, IRubyObject self, Object[] temp) { ByteList bytes = new ByteList(); bytes.setEncoding(encoding); RubyString str = RubyString.newStringShared(context.runtime, bytes, StringSupport.CR_7BIT); for (Operand p : getOperands()) { if ((p instanceof StringLiteral) && (isSameEncodingAndCodeRange(str, (StringLiteral)p))) { str.getByteList().append(((StringLiteral)p).getByteList()); str.setCodeRange(((StringLiteral)p).getCodeRange()); } else { IRubyObject pval = (IRubyObject)p.retrieve(context, self, currScope, currDynScope, temp); str.append19(pval); } } if (frozen) { if (debug) { return IRRuntimeHelpers.freezeLiteralString(str, context, file, line); } return IRRuntimeHelpers.freezeLiteralString(str); } return str; }