Skip to content

Commit

Permalink
Showing 4 changed files with 9 additions and 10 deletions.
6 changes: 3 additions & 3 deletions core/src/main/java/org/jruby/ir/runtime/IRRuntimeHelpers.java
Original file line number Diff line number Diff line change
@@ -1928,12 +1928,12 @@ public static IRubyObject useBindingSelf(Binding binding) {
* Create a new Symbol.to_proc for the given symbol name and encoding.
*
* @param context
* @param symbol
* @param id
* @return
*/
@JIT
public static RubyProc newSymbolProc(ThreadContext context, ByteList symbol) {
return (RubyProc) context.runtime.newSymbol(symbol).to_proc(context);
public static RubyProc newSymbolProc(ThreadContext context, String id) {
return (RubyProc) context.runtime.newSymbol(id).to_proc(context);
}

/**
Original file line number Diff line number Diff line change
@@ -335,9 +335,9 @@ public org.objectweb.asm.Label newLabel() {
*
* Stack required: none
*
* @param bytes the ByteList for the symbol.
* @param id raw id string for the symbol.
*/
public abstract void pushSymbolProc(ByteList bytes);
public abstract void pushSymbolProc(String id);

/**
* Push the JRuby runtime on the stack.
Original file line number Diff line number Diff line change
@@ -354,13 +354,13 @@ public void run() {
});
}

public void pushSymbolProc(final ByteList bytes) {
public void pushSymbolProc(final String id) {
cacheValuePermanentlyLoadContext("symbolProc", RubyProc.class, null, new Runnable() {
@Override
public void run() {
loadContext();
pushByteList(bytes);
invokeIRHelper("newSymbolProc", sig(RubyProc.class, ThreadContext.class, ByteList.class));
adapter.ldc(id);
invokeIRHelper("newSymbolProc", sig(RubyProc.class, ThreadContext.class, String.class));
}
});
}
3 changes: 1 addition & 2 deletions core/src/main/java/org/jruby/ir/targets/JVMVisitor.java
Original file line number Diff line number Diff line change
@@ -2608,8 +2608,7 @@ public void Symbol(Symbol symbol) {

@Override
public void SymbolProc(SymbolProc symbolproc) {
// FIXME: bytelist_love - we can also do getId() is we will just cache lookup for symbol?
jvmMethod().pushSymbolProc(symbolproc.getName().getBytes());
jvmMethod().pushSymbolProc(symbolproc.getId());
}

@Override

0 comments on commit 6f74142

Please sign in to comment.