コード例 #1
0
  @Override
  public ByteCodeNode getByteCode(MethodGenerationContext generationContext) {
    ByteCodeBlock block = new ByteCodeBlock().append(left).append(right);

    if (comparisonInstruction != null) {
      block.append(comparisonInstruction);
    }

    LabelNode noMatch = new LabelNode("no_match");
    LabelNode end = new LabelNode("end");
    return block
        .append(new JumpInstruction(noMatchJumpInstruction, noMatch))
        .push(true)
        .gotoLabel(end)
        .append(noMatch)
        .push(false)
        .append(end);
  }