Package org.adoptopenjdk.jitwatch.model

Examples of org.adoptopenjdk.jitwatch.model.AnnotationException


        if (inMethod || isC2)
        {
          if (!sanityCheckInline(currentInstruction))
          {
            throw new AnnotationException("Expected an invoke instruction (in INLINE_SUCCESS)", currentBytecode,
                currentInstruction);
          }

          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));
View Full Code Here

TOP

Related Classes of org.adoptopenjdk.jitwatch.model.AnnotationException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.