@Override public boolean hasTag(Class<? extends Tag> tag) { return eventContext.hasTag(tag); }
@Override public boolean hasTag(Class<? extends Tag> tag) { return eventContext.hasTag(tag); }
@Override void notifyNodeEntry(EventContext context) { if (exprStepping && context.hasTag(SourceElement.EXPRESSION.getTag())) { exprCounter++; activeExpression = false; } }
@Override void notifyNodeExit(EventContext context) { if (exprStepping && context.hasTag(SourceElement.EXPRESSION.getTag())) { boolean isOn = (--exprCounter) < 0; if (isOn) { activeExpression = true; } } }
@Override void notifyNodeExit(EventContext context) { if (exprStepping && context.hasTag(SourceElement.EXPRESSION.getTag())) { boolean isOn = (--exprCounter) < 0; if (isOn) { activeExpression = true; } } }
@Override void notifyNodeExit(EventContext context) { if (exprStepping && context.hasTag(SourceElement.EXPRESSION.getTag())) { boolean isOn = (--exprCounter) < 0; if (isOn) { activeExpression = true; } } }
@Override void notifyNodeEntry(EventContext context) { if (exprStepping && context.hasTag(SourceElement.EXPRESSION.getTag())) { exprCounter++; activeExpression = exprCounter <= 0; } }
@Override void notifyNodeEntry(EventContext context) { if (exprStepping && context.hasTag(SourceElement.EXPRESSION.getTag())) { exprCounter++; activeExpression = false; } }
@Override void notifyNodeExit(EventContext context) { if (exprStepping && context.hasTag(SourceElement.EXPRESSION.getTag())) { boolean isOn = (--exprCounter) < 0; if (isOn) { activeExpression = true; } } }
@Override void notifyNodeEntry(EventContext context) { if (exprStepping && context.hasTag(SourceElement.EXPRESSION.getTag())) { exprCounter++; activeExpression = exprCounter <= 0; } }
boolean matches(DebuggerSession session, EventContext context, SuspendAnchor anchor) { Set<SourceElement> elements = sourceElements; if (elements == null) { elements = session.getSourceElements(); } for (SourceElement se : elements) { if (context.hasTag(se.getTag()) && preferredAnchors.get(se).contains(anchor)) { return true; } } return false; }
private static boolean hasTag(Object impl, Class<? extends Tag> tag) { try { return ((Event) impl).getContext().hasTag(tag); } catch (Throwable t) { throw wrapException(impl, t); } }
@Override boolean step(DebuggerSession steppingSession, EventContext context, SuspendAnchor suspendAnchor) { if (stepConfig.matches(session, context, suspendAnchor) || SuspendAnchor.AFTER == suspendAnchor && (stackCounter < 0 || exprCounter < 0)) { stackCounter = 0; exprCounter = context.hasTag(SourceElement.EXPRESSION.getTag()) && SuspendAnchor.BEFORE == suspendAnchor ? 0 : -1; return --unfinishedStepCount <= 0; } else { return false; } }
@Override public ExecutionEventNode create(EventContext context) { if (context.hasTag(RootTag.class)) { return new RootSteppingDepthNode(context); } else { return new SteppingNode(context); } } }, hasExpressionElement, syntaxTags);
@Override boolean step(DebuggerSession steppingSession, EventContext context, SuspendAnchor suspendAnchor) { if (stepConfig.matches(session, context, suspendAnchor) || SuspendAnchor.AFTER == suspendAnchor && (stackCounter < 0 || exprCounter < 0)) { stackCounter = 0; exprCounter = context.hasTag(SourceElement.EXPRESSION.getTag()) && SuspendAnchor.BEFORE == suspendAnchor ? 0 : -1; return --unfinishedStepCount <= 0; } else { return false; } }
boolean matches(DebuggerSession session, EventContext context, SuspendAnchor anchor) { Set<SourceElement> elements = sourceElements; if (elements == null) { elements = session.getSourceElements(); } for (SourceElement se : elements) { if (context.hasTag(se.getTag()) && preferredAnchorMatches(se, anchor)) { return true; } } return false; }
StackPushPopNode(ShadowStack profilerStack, Instrumenter instrumenter, EventContext context, boolean ignoreInlinedRoots) { this.profilerStack = profilerStack; this.cachedThread = Thread.currentThread(); this.interpretedLocation = new StackTraceEntry(instrumenter, context, StackTraceEntry.STATE_INTERPRETED); this.compiledLocation = new StackTraceEntry(interpretedLocation, StackTraceEntry.STATE_COMPILED); this.compilationRootLocation = new StackTraceEntry(interpretedLocation, StackTraceEntry.STATE_COMPILATION_ROOT); this.isAttachedToRootTag = context.hasTag(StandardTags.RootTag.class); this.ignoreInlinedRoots = ignoreInlinedRoots; this.cachedStack = getStack(); }
@SuppressWarnings("unchecked") boolean validEventContext() { Node node = getInstrumentedNode(); if (node instanceof RootNode) { throw new IllegalStateException("Instrumentable node must not be a root node."); } Object object = null; if (node instanceof InstrumentableNode) { object = ((InstrumentableNode) node).getNodeObject(); } else { // legacy support return true; } if (object != null) { assert AccessorInstrumentHandler.interopAccess().isValidNodeObject(object); } boolean foundStandardTag = false; for (Class<?> clazz : StandardTags.ALL_TAGS) { if (hasTag((Class<? extends Tag>) clazz)) { foundStandardTag = true; } } if (foundStandardTag) { RootNode root = probeNode.getRootNode(); if (root != null && root.getSourceSection() != null) { assert sourceSection != null : "All nodes tagged with a standard tag and with a root node that has a source section must also have a source section."; } } return true; }
@SuppressWarnings("unchecked") boolean validEventContext() { Node node = getInstrumentedNode(); if (node instanceof RootNode) { throw new IllegalStateException("Instrumentable node must not be a root node."); } Object object = null; if (node instanceof InstrumentableNode) { object = ((InstrumentableNode) node).getNodeObject(); } else { // legacy support return true; } if (object != null) { assert AccessorInstrumentHandler.interopAccess().isValidNodeObject(object); } boolean foundStandardTag = false; for (Class<?> clazz : StandardTags.ALL_TAGS) { if (hasTag((Class<? extends Tag>) clazz)) { foundStandardTag = true; } } if (foundStandardTag) { RootNode root = probeNode.getRootNode(); if (root != null && root.getSourceSection() != null) { assert sourceSection != null : "All nodes tagged with a standard tag and with a root node that has a source section must also have a source section."; } } return true; }