gpt4 book ai didi

org.jruby.ir.instructions.YieldInstr.()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-14 09:17:31 28 4
gpt4 key购买 nike

本文整理了Java中org.jruby.ir.instructions.YieldInstr.<init>()方法的一些代码示例,展示了YieldInstr.<init>()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YieldInstr.<init>()方法的具体详情如下:
包路径:org.jruby.ir.instructions.YieldInstr
类名称:YieldInstr
方法名:<init>

YieldInstr.<init>介绍

暂无

代码示例

代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-jruby

@Override
public Instr cloneForInlining(InlinerInfo ii) {
  return new YieldInstr(ii.getRenamedVariable(result), blockArg.cloneForInlining(ii), yieldArg.cloneForInlining(ii), unwrapArray);
}

代码示例来源:origin: org.kill-bill.billing/killbill-osgi-bundles-jruby

@Override
public Instr cloneForInlining(InlinerInfo ii) {
  return new YieldInstr(ii.getRenamedVariable(result), blockArg.cloneForInlining(ii), yieldArg.cloneForInlining(ii), unwrapArray);
}

代码示例来源:origin: org.jruby/jruby-core

public static YieldInstr decode(IRReaderDecoder d) {
  return new YieldInstr(d.decodeVariable(), d.decodeOperand(), d.decodeOperand(), d.decodeBoolean());
}

代码示例来源:origin: org.jruby/jruby-complete

public static YieldInstr decode(IRReaderDecoder d) {
  return new YieldInstr(d.decodeVariable(), d.decodeOperand(), d.decodeOperand(), d.decodeBoolean());
}

代码示例来源:origin: org.jruby/jruby-complete

@Override
public Instr clone(CloneInfo ii) {
  // FIXME: Is it necessary to clone a yield instruction in a method
  // that is being inlined, i.e. in METHOD_INLINE clone mode?
  // Fix BasicBlock.java:clone!!
  return new YieldInstr(ii.getRenamedVariable(result), getBlockArg().cloneForInlining(ii),
      getYieldArg().cloneForInlining(ii), unwrapArray);
}

代码示例来源:origin: org.jruby/jruby-core

@Override
public Instr clone(CloneInfo ii) {
  // FIXME: Is it necessary to clone a yield instruction in a method
  // that is being inlined, i.e. in METHOD_INLINE clone mode?
  // Fix BasicBlock.java:clone!!
  return new YieldInstr(ii.getRenamedVariable(result), getBlockArg().cloneForInlining(ii),
      getYieldArg().cloneForInlining(ii), unwrapArray);
}

代码示例来源:origin: org.kill-bill.billing/killbill-osgi-bundles-jruby

public Operand buildYield(YieldNode node, IRScope s) {
  Variable ret = s.getNewTemporaryVariable();
  s.addInstr(new YieldInstr(ret, s.getImplicitBlockArg(), build(node.getArgsNode(), s), node.getExpandArguments()));
  return ret;
}

代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-jruby

public Operand buildYield(YieldNode node, IRScope s) {
  Variable ret = s.getNewTemporaryVariable();
  s.addInstr(new YieldInstr(ret, s.getImplicitBlockArg(), build(node.getArgsNode(), s), node.getExpandArguments()));
  return ret;
}

代码示例来源:origin: org.jruby/jruby-core

public Operand buildYield(YieldNode node, Variable result) {
  if (scope instanceof IRScriptBody) throwSyntaxError(node, "Invalid yield");
  boolean unwrap = true;
  Node argNode = node.getArgsNode();
  // Get rid of one level of array wrapping
  if (argNode != null && (argNode instanceof ArrayNode) && ((ArrayNode)argNode).size() == 1) {
    argNode = ((ArrayNode)argNode).getLast();
    unwrap = false;
  }
  Variable ret = result == null ? createTemporaryVariable() : result;
  if (argNode instanceof ArrayNode && unwrap) {
    addInstr(new YieldInstr(ret, scope.getYieldClosureVariable(), buildArray((ArrayNode)argNode, true), unwrap));
  } else {
    addInstr(new YieldInstr(ret, scope.getYieldClosureVariable(), build(argNode), unwrap));
  }
  return ret;
}

代码示例来源:origin: org.jruby/jruby-complete

public Operand buildYield(YieldNode node, Variable result) {
  if (scope instanceof IRScriptBody) throwSyntaxError(node, "Invalid yield");
  boolean unwrap = true;
  Node argNode = node.getArgsNode();
  // Get rid of one level of array wrapping
  if (argNode != null && (argNode instanceof ArrayNode) && ((ArrayNode)argNode).size() == 1) {
    argNode = ((ArrayNode)argNode).getLast();
    unwrap = false;
  }
  Variable ret = result == null ? createTemporaryVariable() : result;
  if (argNode instanceof ArrayNode && unwrap) {
    addInstr(new YieldInstr(ret, scope.getYieldClosureVariable(), buildArray((ArrayNode)argNode, true), unwrap));
  } else {
    addInstr(new YieldInstr(ret, scope.getYieldClosureVariable(), build(argNode), unwrap));
  }
  return ret;
}

代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-jruby

@Override
public Operand buildYield(YieldNode node, IRScope s) {
  boolean unwrap = true;
  Node argNode = node.getArgsNode();
  // Get rid of one level of array wrapping
  if (argNode != null && (argNode instanceof ArrayNode) && ((ArrayNode)argNode).size() == 1) {
    argNode = ((ArrayNode)argNode).getLast();
    unwrap = false;
  }
  Variable ret = s.getNewTemporaryVariable();
  s.addInstr(new YieldInstr(ret, s.getImplicitBlockArg(), build(argNode, s), unwrap));
  return ret;
}

代码示例来源:origin: org.kill-bill.billing/killbill-osgi-bundles-jruby

@Override
public Operand buildYield(YieldNode node, IRScope s) {
  boolean unwrap = true;
  Node argNode = node.getArgsNode();
  // Get rid of one level of array wrapping
  if (argNode != null && (argNode instanceof ArrayNode) && ((ArrayNode)argNode).size() == 1) {
    argNode = ((ArrayNode)argNode).getLast();
    unwrap = false;
  }
  Variable ret = s.getNewTemporaryVariable();
  s.addInstr(new YieldInstr(ret, s.getImplicitBlockArg(), build(argNode, s), unwrap));
  return ret;
}

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com