Skip to content

Commit

Permalink
Showing 2 changed files with 13 additions and 0 deletions.
10 changes: 10 additions & 0 deletions core/src/main/java/org/jruby/runtime/CompiledIRBlockBody.java
Original file line number Diff line number Diff line change
@@ -31,6 +31,16 @@ public ArgumentDescriptor[] getArgumentDescriptors() {
return closure.getArgumentDescriptors();
}

@Override
protected IRubyObject callDirect(ThreadContext context, Block block, IRubyObject[] args, Block blockArg) {
throw new RuntimeException("callDirect not implemented in CompiledIRBlockBody. Implement me!");
}

@Override
protected IRubyObject yieldDirect(ThreadContext context, Block block, IRubyObject[] args, IRubyObject self) {
throw new RuntimeException("yieldDirect not implemented in CompiledIRBlockBody. Implement me!");
}

protected IRubyObject commonYieldPath(ThreadContext context, Block block, IRubyObject[] args, IRubyObject self, Block blockArg) {
Binding binding = block.getBinding();
Visibility oldVis = binding.getFrame().getVisibility();
Original file line number Diff line number Diff line change
@@ -4,6 +4,7 @@
import org.jruby.RubyModule;
import org.jruby.compiler.Compilable;
import org.jruby.ir.IRClosure;
import org.jruby.ir.IRFlags;
import org.jruby.ir.IRScope;
import org.jruby.ir.interpreter.Interpreter;
import org.jruby.ir.interpreter.InterpreterContext;
@@ -50,6 +51,7 @@ public void completeBuild(CompiledIRBlockBody blockBody) {
this.callCount = -1;
blockBody.evalType = this.evalType; // share with parent
this.jittedBody = blockBody;
hasCallProtocolIR = closure.getFlags().contains(IRFlags.HAS_EXPLICIT_CALL_PROTOCOL);
}

@Override
@@ -75,6 +77,7 @@ public InterpreterContext ensureInstrsReady() {

if (interpreterContext == null) {
interpreterContext = closure.getInterpreterContext();
hasCallProtocolIR = closure.getFlags().contains(IRFlags.HAS_EXPLICIT_CALL_PROTOCOL);
}
return interpreterContext;
}

0 comments on commit baeb61d

Please sign in to comment.