41
41
import org .enso .interpreter .runtime .callable .CallerInfo ;
42
42
import org .enso .interpreter .runtime .callable .function .Function ;
43
43
import org .enso .interpreter .runtime .data .text .Text ;
44
- import org .enso .interpreter .runtime .state .State ;
45
44
import org .enso .interpreter .runtime .warning .WarningsLibrary ;
46
45
import org .enso .interpreter .runtime .warning .WithWarnings ;
47
46
import org .graalvm .options .OptionDescriptor ;
@@ -131,7 +130,6 @@ private static class ReplExecutionEventNodeImpl extends ExecutionEventNode
131
130
private @ Child ToJavaStringNode toJavaStringNode = ToJavaStringNode .build ();
132
131
133
132
private ReplExecutionEventNodeState nodeState ;
134
- private State monadicState ;
135
133
136
134
private EventContext eventContext ;
137
135
private DebuggerMessageHandler handler ;
@@ -250,8 +248,6 @@ protected void onEnter(VirtualFrame frame) {
250
248
if (atExit == null ) {
251
249
CallerInfo lastScope = Function .ArgumentsHelper .getCallerInfo (frame .getArguments ());
252
250
Object lastReturn = EnsoContext .get (this ).getNothing ();
253
- // Note [Safe Access to State in the Debugger Instrument]
254
- monadicState = null ; // Function.ArgumentsHelper.getState(frame.getArguments());
255
251
nodeState = new ReplExecutionEventNodeState (lastReturn , lastScope );
256
252
startSessionImpl ();
257
253
}
@@ -264,12 +260,6 @@ public void onReturnValue(VirtualFrame frame, Object result) {
264
260
}
265
261
}
266
262
267
- /* Note [Safe Access to State in the Debugger Instrument]
268
- * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
269
- * This is safe to do as we ensure that the instrument's `onEnter` is always called as the
270
- * first instruction of the function that it's observing.
271
- */
272
-
273
263
/**
274
264
* Called by Truffle whenever an unwind {@see {@link EventContext#createUnwind(Object)}} was
275
265
* thrown in the course of REPL execution.
@@ -292,8 +282,6 @@ private void startSession(RootNode root, VirtualFrame frame, Object toReturn) {
292
282
new CallerInfo (frame .materialize (), enso .getLocalScope (), enso .getModuleScope ());
293
283
}
294
284
if (lastScope != null ) {
295
- // Note [Safe Access to State in the Debugger Instrument]
296
- monadicState = EnsoContext .get (root ).currentState ();
297
285
nodeState = new ReplExecutionEventNodeState (toReturn , lastScope );
298
286
startSessionImpl ();
299
287
}
0 commit comments