本文整理了Java中org.jruby.ir.instructions.ZSuperInstr.prepareBlock()
方法的一些代码示例,展示了ZSuperInstr.prepareBlock()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZSuperInstr.prepareBlock()
方法的具体详情如下:
包路径:org.jruby.ir.instructions.ZSuperInstr
类名称:ZSuperInstr
方法名:prepareBlock
暂无
代码示例来源:origin: org.jruby/jruby-complete
@Override
public Object interpret(ThreadContext context, StaticScope currScope, DynamicScope currDynScope, IRubyObject self, Object[] temp) {
IRubyObject[] args = prepareArguments(context, self, currScope, currDynScope, temp);
Block block = prepareBlock(context, self, currScope, currDynScope, temp);
return IRRuntimeHelpers.zSuper(context, self, args, block);
}
代码示例来源:origin: org.jruby/jruby-core
@Override
public Object interpret(ThreadContext context, StaticScope currScope, DynamicScope currDynScope, IRubyObject self, Object[] temp) {
IRubyObject[] args = prepareArguments(context, self, currScope, currDynScope, temp);
Block block = prepareBlock(context, self, currScope, currDynScope, temp);
return IRRuntimeHelpers.zSuper(context, self, args, block);
}
代码示例来源:origin: org.kill-bill.billing/killbill-osgi-bundles-jruby
@Override
public Object interpret(ThreadContext context, DynamicScope currDynScope, IRubyObject self, Object[] temp, Block aBlock) {
DynamicScope argsDynScope = currDynScope;
// Find args that need to be passed into super
while (!argsDynScope.getStaticScope().isArgumentScope()) argsDynScope = argsDynScope.getNextCapturedScope();
IRScope argsIRScope = ((IRStaticScope)argsDynScope.getStaticScope()).getIRScope();
Operand[] superArgs = (argsIRScope instanceof IRMethod) ? ((IRMethod)argsIRScope).getCallArgs() : ((IRClosure)argsIRScope).getBlockArgs();
// Prepare args -- but look up in 'argsDynScope', not 'currDynScope'
IRubyObject[] args = prepareArguments(context, self, superArgs, argsDynScope, temp);
// Prepare block -- fetching from the frame stack, if necessary
Block block = prepareBlock(context, self, currDynScope, temp);
if (block == null || !block.isGiven()) block = context.getFrameBlock();
return interpretSuper(context, self, args, block);
}
代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-jruby
@Override
public Object interpret(ThreadContext context, DynamicScope currDynScope, IRubyObject self, Object[] temp, Block aBlock) {
DynamicScope argsDynScope = currDynScope;
// Find args that need to be passed into super
while (!argsDynScope.getStaticScope().isArgumentScope()) argsDynScope = argsDynScope.getNextCapturedScope();
IRScope argsIRScope = ((IRStaticScope)argsDynScope.getStaticScope()).getIRScope();
Operand[] superArgs = (argsIRScope instanceof IRMethod) ? ((IRMethod)argsIRScope).getCallArgs() : ((IRClosure)argsIRScope).getBlockArgs();
// Prepare args -- but look up in 'argsDynScope', not 'currDynScope'
IRubyObject[] args = prepareArguments(context, self, superArgs, argsDynScope, temp);
// Prepare block -- fetching from the frame stack, if necessary
Block block = prepareBlock(context, self, currDynScope, temp);
if (block == null || !block.isGiven()) block = context.getFrameBlock();
return interpretSuper(context, self, args, block);
}
内容来源于网络,如有侵权,请联系作者删除!