Mercurial > hg > truffle
diff truffle/com.oracle.truffle.api/src/com/oracle/truffle/api/debug/TagBreakpointFactory.java @ 22110:c2cb9f1c8688
Replacing the langClass.newInstance() hack in Debugger with proper way to obtain the language instance
author | Jaroslav Tulach <jaroslav.tulach@oracle.com> |
---|---|
date | Wed, 26 Aug 2015 15:22:31 +0200 |
parents | 78c3d3d8d86e |
children | dc83cc1f94f2 3aad794eec0e |
line wrap: on
line diff
--- a/truffle/com.oracle.truffle.api/src/com/oracle/truffle/api/debug/TagBreakpointFactory.java Wed Aug 26 14:13:43 2015 +0200 +++ b/truffle/com.oracle.truffle.api/src/com/oracle/truffle/api/debug/TagBreakpointFactory.java Wed Aug 26 15:22:31 2015 +0200 @@ -102,8 +102,10 @@ */ @CompilationFinal private boolean breakpointsActive = true; private final CyclicAssumption breakpointsActiveUnchanged = new CyclicAssumption(BREAKPOINT_NAME + " globally active"); + private final Debugger debugger; - TagBreakpointFactory(BreakpointCallback breakpointCallback, final WarningLog warningLog) { + TagBreakpointFactory(Debugger debugger, BreakpointCallback breakpointCallback, final WarningLog warningLog) { + this.debugger = debugger; this.breakpointCallback = breakpointCallback; this.warningLog = warningLog; @@ -327,7 +329,7 @@ if (conditionExpr == null) { newInstrument = Instrument.create(new UnconditionalTagBreakInstrumentListener(), BREAKPOINT_NAME); } else { - newInstrument = Instrument.create(this, Debugger.createAdvancedInstrumentRootFactory(newProbe, conditionExpr, this), Boolean.class, BREAKPOINT_NAME); + newInstrument = Instrument.create(this, debugger.createAdvancedInstrumentRootFactory(newProbe, conditionExpr, this), Boolean.class, BREAKPOINT_NAME); } newProbe.attach(newInstrument); instruments.add(newInstrument);