public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, DynamicScope evalScope, Block block, String backtraceName) { if (IRRuntimeHelpers.isDebug()) { LOG.info("CFG:\n" + cfg()); } try { context.pushScope(evalScope); // Since IR introduces additional local vars, we may need to grow the dynamic scope. // To do that, IREvalScript has to tell the dyn-scope how many local vars there are. // Since the same static scope (the scope within which the eval string showed up) // might be shared by multiple eval-scripts, we cannot 'setIRScope(this)' once and // forget about it. We need to set this right before we are ready to grow the // dynamic scope local var space. ((IRStaticScope)getStaticScope()).setIRScope(this); evalScope.growIfNeeded(); // FIXME: Do not push new empty arg array in every time return Interpreter.INTERPRET_EVAL(context, self, this, clazz, new IRubyObject[] {}, backtraceName, block, null); } finally { context.popScope(); } }
public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, DynamicScope evalScope, Block block, String backtraceName) { if (IRRuntimeHelpers.isDebug()) { LOG.info("CFG:\n" + cfg()); } try { context.pushScope(evalScope); // Since IR introduces additional local vars, we may need to grow the dynamic scope. // To do that, IREvalScript has to tell the dyn-scope how many local vars there are. // Since the same static scope (the scope within which the eval string showed up) // might be shared by multiple eval-scripts, we cannot 'setIRScope(this)' once and // forget about it. We need to set this right before we are ready to grow the // dynamic scope local var space. ((IRStaticScope)getStaticScope()).setIRScope(this); evalScope.growIfNeeded(); // FIXME: Do not push new empty arg array in every time return Interpreter.INTERPRET_EVAL(context, self, this, clazz, new IRubyObject[] {}, backtraceName, block, null); } finally { context.popScope(); } }