@TruffleBoundary private void doResetReportedException() { Throwable exception = exceptionsOnThreads.get(); synchronized (this) { if (exception != null) { exceptionsOnThreads.remove(); reportedExceptions.remove(exception); } if (reportedExceptions.isEmpty()) { haveReportedExceptions.set(false); } } }
private void updateStepping() { assert Thread.holdsLock(this); boolean needsStepping = suspendNext || suspendAll; if (!needsStepping) { // iterating concurrent hashmap should be save for (Thread t : strategyMap.keySet()) { SteppingStrategy s = strategyMap.get(t); assert s != null; if (!s.isDone()) { needsStepping = true; break; } } } stepping.set(needsStepping); }
private void updateStepping() { assert Thread.holdsLock(this); boolean needsStepping = suspendNext || suspendAll; if (!needsStepping) { // iterating concurrent hashmap should be save for (Thread t : strategyMap.keySet()) { SteppingStrategy s = strategyMap.get(t); assert s != null; if (!s.isDone()) { needsStepping = true; break; } } } stepping.set(needsStepping); }
/** * Set whether breakpoints of the given kind are active in this session. This has no effect on * breakpoints enabled/disabled state. Breakpoints need to be active to actually break the * execution. The breakpoints are active by default. * * @param breakpointKind the kind of breakpoints to activate/deactivate * @param active <code>true</code> to make breakpoints active, <code>false</code> to make * breakpoints inactive. * @since 1.0 */ public void setBreakpointsActive(Breakpoint.Kind breakpointKind, boolean active) { switch (breakpointKind) { case SOURCE_LOCATION: locationBreakpointsActive.set(active); break; case EXCEPTION: exceptionBreakpointsActive.set(active); break; case HALT_INSTRUCTION: alwaysHaltBreakpointsActive.set(active); break; default: CompilerDirectives.transferToInterpreter(); throw new IllegalStateException("Unhandled breakpoint kind: " + breakpointKind); } }
/** * Set a stepping suspension filter. Prepared steps skip code that does not match this filter. * * @since 0.26 */ public void setSteppingFilter(SuspensionFilter steppingFilter) { this.ignoreLanguageContextInitialization.set(steppingFilter.isIgnoreLanguageContextInitialization()); synchronized (this) { boolean oldIncludeInternal = this.includeInternal; this.includeInternal = steppingFilter.isInternalIncluded(); Predicate<Source> oldSourceFilter = this.sourceFilter; this.sourceFilter = steppingFilter.getSourcePredicate(); if (oldIncludeInternal != this.includeInternal || oldSourceFilter != this.sourceFilter) { removeBindings(); addBindings(this.includeInternal, this.sourceFilter); } } }
/** * Set a stepping suspension filter. Prepared steps skip code that match this filter. * * @since 0.26 */ public void setSteppingFilter(SuspensionFilter steppingFilter) { this.ignoreLanguageContextInitialization.set(steppingFilter.isIgnoreLanguageContextInitialization()); synchronized (this) { boolean oldIncludeInternal = this.includeInternal; this.includeInternal = steppingFilter.isInternalIncluded(); Predicate<Source> oldSourceFilter = this.sourceFilter; this.sourceFilter = steppingFilter.getSourcePredicate(); if (oldIncludeInternal != this.includeInternal || oldSourceFilter != this.sourceFilter) { removeBindings(); addBindings(this.includeInternal, this.sourceFilter); } } }
/** * Set whether breakpoints are active in this session. This has no effect on breakpoints * enabled/disabled state. Breakpoints need to be active to actually break the execution. The * breakpoints are active by default. * * @param active <code>true</code> to make all breakpoints active, <code>false</code> to make * all breakpoints inactive. * @since 0.24 */ public void setBreakpointsActive(boolean active) { breakpointsActive.set(active); }