comparison graal/com.oracle.truffle.tools.debug.engine/src/com/oracle/truffle/tools/debug/engine/TagBreakpointFactory.java @ 21890:894f82515e38

Truffle/APIs and Debugging: Evolutionary steps to integrating debugging and tool support with TruffleVM APIs - Add a version string to language registration: Language.getShortName() produces a string with both language and version - Rename SLMain --> SLLanguage (little change current machinery) - Remove DebugEngine dependence on ExecutionContext: Visualizer access migrated to TruffleLanguage - ExecutionContext now has only one method left: getCompilerOptions() - Rename SourceExecutionProvider to DebugSupportProvider, now supplied by implementing abstract TruffleLanguage.getDebugSupport() - Revise DebugEngine and its helper classes to work with the new APIs
author Michael Van De Vanter <michael.van.de.vanter@oracle.com>
date Tue, 09 Jun 2015 15:20:30 -0700
parents 3b8bbf51d320
children
comparison
equal deleted inserted replaced
21889:45083be8a812 21890:894f82515e38
84 public int compare(Entry<SyntaxTag, TagBreakpointImpl> entry1, Entry<SyntaxTag, TagBreakpointImpl> entry2) { 84 public int compare(Entry<SyntaxTag, TagBreakpointImpl> entry1, Entry<SyntaxTag, TagBreakpointImpl> entry2) {
85 return entry1.getKey().name().compareTo(entry2.getKey().name()); 85 return entry1.getKey().name().compareTo(entry2.getKey().name());
86 } 86 }
87 }; 87 };
88 88
89 private final SourceExecutionProvider sourceExecutionProvider; 89 private final DebugExecutionSupport executionSupport;
90 private final BreakpointCallback breakpointCallback; 90 private final BreakpointCallback breakpointCallback;
91 private final WarningLog warningLog; 91 private final WarningLog warningLog;
92 92
93 /** 93 /**
94 * Map: Tags ==> Tag Breakpoints. There may be no more than one breakpoint per Tag. 94 * Map: Tags ==> Tag Breakpoints. There may be no more than one breakpoint per Tag.
100 * individual breakpoints are enabled. 100 * individual breakpoints are enabled.
101 */ 101 */
102 @CompilationFinal private boolean breakpointsActive = true; 102 @CompilationFinal private boolean breakpointsActive = true;
103 private final CyclicAssumption breakpointsActiveUnchanged = new CyclicAssumption(BREAKPOINT_NAME + " globally active"); 103 private final CyclicAssumption breakpointsActiveUnchanged = new CyclicAssumption(BREAKPOINT_NAME + " globally active");
104 104
105 TagBreakpointFactory(SourceExecutionProvider sourceExecutionProvider, BreakpointCallback breakpointCallback, WarningLog warningLog) { 105 TagBreakpointFactory(DebugExecutionSupport executionSupport, BreakpointCallback breakpointCallback, WarningLog warningLog) {
106 this.sourceExecutionProvider = sourceExecutionProvider; 106 this.executionSupport = executionSupport;
107 this.breakpointCallback = breakpointCallback; 107 this.breakpointCallback = breakpointCallback;
108 this.warningLog = warningLog; 108 this.warningLog = warningLog;
109 109
110 Probe.addProbeListener(new DefaultProbeListener() { 110 Probe.addProbeListener(new DefaultProbeListener() {
111 111
336 } 336 }
337 Instrument newInstrument = null; 337 Instrument newInstrument = null;
338 if (conditionExpr == null) { 338 if (conditionExpr == null) {
339 newInstrument = Instrument.create(new UnconditionalTagBreakInstrumentListener(), BREAKPOINT_NAME); 339 newInstrument = Instrument.create(new UnconditionalTagBreakInstrumentListener(), BREAKPOINT_NAME);
340 } else { 340 } else {
341 newInstrument = Instrument.create(this, sourceExecutionProvider.createAdvancedInstrumentRootFactory(conditionExpr, this), Boolean.class, BREAKPOINT_NAME); 341 newInstrument = Instrument.create(this, executionSupport.createAdvancedInstrumentRootFactory(conditionExpr, this), Boolean.class, BREAKPOINT_NAME);
342 } 342 }
343 newProbe.attach(newInstrument); 343 newProbe.attach(newInstrument);
344 instruments.add(newInstrument); 344 instruments.add(newInstrument);
345 changeState(isEnabled ? ENABLED : DISABLED); 345 changeState(isEnabled ? ENABLED : DISABLED);
346 } 346 }