public InterpretedIRMethod(IRScope method, Visibility visibility, RubyModule implementationClass) { super(method, visibility, implementationClass); // -1 jit.threshold is way of having interpreter not promote full builds. if (Options.JIT_THRESHOLD.load() == -1) callCount = -1; // If we are printing, do the build right at creation time so we can see it if (IRRuntimeHelpers.shouldPrintIR(implementationClass.getRuntime())) { ensureInstrsReady(); } // This is so profiled callsite can access the sites original method (callsites has IRScope in it). method.compilable = this; }
public InterpretedIRMethod(IRScope method, Visibility visibility, RubyModule implementationClass) { super(method, visibility, implementationClass); // -1 jit.threshold is way of having interpreter not promote full builds. if (Options.JIT_THRESHOLD.load() == -1) callCount = -1; // If we are printing, do the build right at creation time so we can see it if (IRRuntimeHelpers.shouldPrintIR(implementationClass.getRuntime())) { ensureInstrsReady(); } // This is so profiled callsite can access the sites original method (callsites has IRScope in it). method.compilable = this; }
protected void doDebug() { // FIXME: This is printing out IRScope CFG but JIT may be active and it might not reflect // currently executing. Move into JIT and into interp since they will be getting CFG from // different sources // FIXME: This is only printing out CFG once. If we keep applying more passes then we // will want to print out after those new passes. ensureInstrsReady(); LOG.info("Executing '" + method.getId() + "'"); if (!displayedCFG) { LOG.info(method.debugOutput()); displayedCFG = true; } }
@Override public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name, Block block) { if (IRRuntimeHelpers.isDebug()) doDebug(); if (callCount >= 0) promoteToFullBuild(context); return INTERPRET_METHOD(context, ensureInstrsReady(), getImplementationClass().getMethodLocation(), self, name, block); }
@Override public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2, Block block) { if (IRRuntimeHelpers.isDebug()) doDebug(); if (callCount >= 0) promoteToFullBuild(context); return INTERPRET_METHOD(context, ensureInstrsReady(), getImplementationClass().getMethodLocation(), self, name, arg0, arg1, arg2, block); }
@Override public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name) { if (IRRuntimeHelpers.isDebug()) doDebug(); if (callCount >= 0) promoteToFullBuild(context); return INTERPRET_METHOD(context, ensureInstrsReady(), getImplementationClass().getMethodLocation(), self, name, Block.NULL_BLOCK); }
@Override public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name, IRubyObject arg0, IRubyObject arg1) { if (IRRuntimeHelpers.isDebug()) doDebug(); if (callCount >= 0) promoteToFullBuild(context); return INTERPRET_METHOD(context, ensureInstrsReady(), getImplementationClass().getMethodLocation(), self, name, arg0, arg1, Block.NULL_BLOCK); }
@Override public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name, IRubyObject arg0, Block block) { if (IRRuntimeHelpers.isDebug()) doDebug(); if (callCount >= 0) promoteToFullBuild(context); return INTERPRET_METHOD(context, ensureInstrsReady(), getImplementationClass().getMethodLocation(), self, name, arg0, block); }
@Override public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name, IRubyObject arg0) { if (IRRuntimeHelpers.isDebug()) doDebug(); if (callCount >= 0) promoteToFullBuild(context); return INTERPRET_METHOD(context, ensureInstrsReady(), getImplementationClass().getMethodLocation(), self, name, arg0, Block.NULL_BLOCK); }
@Override public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name, IRubyObject arg0) { if (IRRuntimeHelpers.isDebug()) doDebug(); if (callCount >= 0) promoteToFullBuild(context); return INTERPRET_METHOD(context, ensureInstrsReady(), getImplementationClass().getMethodLocation(), self, name, arg0, Block.NULL_BLOCK); }
@Override public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2, Block block) { if (IRRuntimeHelpers.isDebug()) doDebug(); if (callCount >= 0) promoteToFullBuild(context); return INTERPRET_METHOD(context, ensureInstrsReady(), getImplementationClass().getMethodLocation(), self, name, arg0, arg1, arg2, block); }
@Override public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name, IRubyObject arg0, IRubyObject arg1, Block block) { if (IRRuntimeHelpers.isDebug()) doDebug(); if (callCount >= 0) promoteToFullBuild(context); return INTERPRET_METHOD(context, ensureInstrsReady(), getImplementationClass().getMethodLocation(), self, name, arg0, arg1, block); }
@Override public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name, IRubyObject[] args, Block block) { if (IRRuntimeHelpers.isDebug()) doDebug(); if (callCount >= 0) promoteToFullBuild(context); return INTERPRET_METHOD(context, ensureInstrsReady(), getImplementationClass().getMethodLocation(), self, name, args, block); }
@Override public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name) { if (IRRuntimeHelpers.isDebug()) doDebug(); if (callCount >= 0) promoteToFullBuild(context); return INTERPRET_METHOD(context, ensureInstrsReady(), getImplementationClass().getMethodLocation(), self, name, Block.NULL_BLOCK); }
@Override public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name, IRubyObject arg0, Block block) { if (IRRuntimeHelpers.isDebug()) doDebug(); if (callCount >= 0) promoteToFullBuild(context); return INTERPRET_METHOD(context, ensureInstrsReady(), getImplementationClass().getMethodLocation(), self, name, arg0, block); }
@Override public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name, IRubyObject arg0, IRubyObject arg1) { if (IRRuntimeHelpers.isDebug()) doDebug(); if (callCount >= 0) promoteToFullBuild(context); return INTERPRET_METHOD(context, ensureInstrsReady(), getImplementationClass().getMethodLocation(), self, name, arg0, arg1, Block.NULL_BLOCK); }
@Override public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name, IRubyObject[] args, Block block) { if (IRRuntimeHelpers.isDebug()) doDebug(); if (callCount >= 0) promoteToFullBuild(context); return INTERPRET_METHOD(context, ensureInstrsReady(), getImplementationClass().getMethodLocation(), self, name, args, block); }
@Override public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name, IRubyObject[] args) { if (IRRuntimeHelpers.isDebug()) doDebug(); if (callCount >= 0) promoteToFullBuild(context); return INTERPRET_METHOD(context, ensureInstrsReady(), getImplementationClass().getMethodLocation(), self, name, args, Block.NULL_BLOCK); }
@Override public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2) { if (IRRuntimeHelpers.isDebug()) doDebug(); if (callCount >= 0) promoteToFullBuild(context); return INTERPRET_METHOD(context, ensureInstrsReady(), getImplementationClass().getMethodLocation(), self, name, arg0, arg1, arg2, Block.NULL_BLOCK); }
@Override public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2) { if (IRRuntimeHelpers.isDebug()) doDebug(); if (callCount >= 0) promoteToFullBuild(context); return INTERPRET_METHOD(context, ensureInstrsReady(), getImplementationClass().getMethodLocation(), self, name, arg0, arg1, arg2, Block.NULL_BLOCK); }