}
String reason = tagAttrs.get(ATTR_REASON);
String annotationText = InlineUtil.buildInlineAnnotationText(true, reason, callAttrs, methodAttrs);
result.put(currentBytecode, new LineAnnotation(annotationText, Color.GREEN));
}
}
break;
case TAG_INLINE_FAIL:
{
if (inMethod || isC2)
{
if (!sanityCheckInline(currentInstruction))
{
throw new AnnotationException("Expected an invoke instruction (in INLINE_FAIL)", currentBytecode,
currentInstruction);
}
String reason = tagAttrs.get(ATTR_REASON);
String annotationText = InlineUtil.buildInlineAnnotationText(false, reason, callAttrs, methodAttrs);
result.put(currentBytecode, new LineAnnotation(annotationText, Color.RED));
}
}
break;
case TAG_BRANCH:
{
if (!result.containsKey(currentBytecode))
{
if (inMethod || isC2)
{
if (!sanityCheckBranch(currentInstruction))
{
throw new AnnotationException("Expected a branch instruction (in BRANCH)", currentBytecode,
currentInstruction);
}
String branchAnnotation = buildBranchAnnotation(tagAttrs);
result.put(currentBytecode, new LineAnnotation(branchAnnotation, Color.BLUE));
}
}
}
break;
case TAG_INTRINSIC:
{
if (inMethod || isC2)
{
if (!sanityCheckIntrinsic(currentInstruction))
{
for (BytecodeInstruction ins : instructions)
{
logger.info("! instruction: {}", ins);
}
throw new AnnotationException("Expected an invoke instruction (IN INTRINSIC)", currentBytecode,
currentInstruction);
}
StringBuilder reason = new StringBuilder();
reason.append("Intrinsic: ").append(tagAttrs.get(ATTR_ID));
result.put(currentBytecode, new LineAnnotation(reason.toString(), Color.GREEN));
}
}
break;
case TAG_ELIMINATE_ALLOCATION: