private void processParseTag()

in core/src/main/java/org/adoptopenjdk/jitwatch/report/suggestion/SuggestionWalker.java [256:344]


	private void processParseTag(Tag parseTag, IMetaMember caller, IParseDictionary parseDictionary)
	{
		String methodID = null;

		int currentBytecode = -1;

		for (Tag child : parseTag.getChildren())
		{
			String tagName = child.getName();
			Map<String, String> attrs = child.getAttributes();

			switch (tagName)
			{
			case TAG_METHOD:
			{
				methodID = attrs.get(ATTR_ID);
				break;
			}

			case TAG_BC:
			{
				String bci = attrs.get(ATTR_BCI);
				currentBytecode = Integer.parseInt(bci);
				break;
			}

			case TAG_BRANCH:
			{
				handleBranchTag(attrs, currentBytecode, caller);
				break;
			}

			case TAG_CALL:
			{
				methodID = attrs.get(ATTR_METHOD);
				break;
			}

			case TAG_INLINE_FAIL:
			{
				handleInlineFailTag(attrs, methodID, caller, currentBytecode, parseDictionary);
				break;
			}

			case TAG_PARSE:
			{
				String callerID = attrs.get(ATTR_METHOD);

				IMetaMember nestedCaller = ParseUtil.lookupMember(callerID, parseDictionary, model);

				if (nestedCaller != null)
				{
					processParseTag(child, nestedCaller, parseDictionary);
				}
				break;
			}

			case TAG_PHASE:
			{
				String phaseName = attrs.get(ATTR_NAME);

				if (S_PARSE_HIR.equals(phaseName))
				{
					processParseTag(child, caller, parseDictionary);
				}
				else
				{
					logger.warn("Don't know how to handle phase {}", phaseName);
				}
				break;
			}

			case TAG_HOT_THROW:
			{
				String preallocated = attrs.get(ATTR_PREALLOCATED);

				if (!"1".equals(preallocated))
				{
					handleHotThrowNotPreallocated(attrs, currentBytecode, caller);
				}
				break;
			}

			default:
				handleOther(child);
				break;
			}
		}
	}