Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
80 changes: 0 additions & 80 deletions Sindarin-Tests/SindarinBytecodeToASTCacheTest.class.st

This file was deleted.

91 changes: 0 additions & 91 deletions Sindarin/SindarinBytecodeToASTCache.class.st

This file was deleted.

35 changes: 4 additions & 31 deletions Sindarin/SindarinDebugger.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ Class {
#instVars : [
'process',
'stepHooks',
'nodeMapForMethod',
'debugStarted',
'sindarinSession',
'blockToDebug'
],
Expand Down Expand Up @@ -86,8 +84,7 @@ SindarinDebugger >> attachTo: aDebugSession [

sindarinSession := aDebugSession asSindarinDebugSession.
process := aDebugSession interruptedProcess.
sindarinSession deactivateEventTriggering.
debugStarted := true
sindarinSession deactivateEventTriggering
]

{ #category : #astAndAstMapping }
Expand All @@ -107,7 +104,7 @@ SindarinDebugger >> contextIsAboutToSignalException: aContext [
"Returns whether aContext is about to execute a message-send of selector #signal to an instance of the Exception class (or one of its subclasses)"

| node |
node := (self nodeMapForMethod: aContext method) nodeForPC: aContext pc.
node := aContext method methodNode bcToASTCache nodeForPC: aContext pc.
node isMessage
ifFalse: [ ^ false ].
node selector = #signal
Expand Down Expand Up @@ -191,7 +188,6 @@ SindarinDebugger >> debug: aBlock [
sindarinSession deactivateEventTriggering.
[ self selector = #newProcess ] whileFalse: [ self step ]. "Step the process to get out of the on:do: context added at the bottom of its stack"
[ self selector = #newProcess ] whileTrue: [ self step ]. "Step the process so that it leaves BlockClosure>>#newProcess and enters the block for which a process was created"
debugStarted := true
]

{ #category : #accessing }
Expand All @@ -209,8 +205,7 @@ SindarinDebugger >> hasSignalledUnhandledException [

{ #category : #initialization }
SindarinDebugger >> initialize [
stepHooks := OrderedCollection new.
debugStarted := false
stepHooks := OrderedCollection new
]

{ #category : #private }
Expand Down Expand Up @@ -321,13 +316,7 @@ SindarinDebugger >> method [
SindarinDebugger >> node [
"Returns the AST node about to be executed by the top context of the execution"

debugStarted
ifFalse:
[ "Until the debug session is started, node is returned using the unoptimized version" "Sindarin starts by executing controlled steps to exit the caller code (e.g. tests)
before entering the actual debugged code, and we do not want to cache nodes for the
caller code." ^ self context method sourceNodeForPC: self context pc ].
"Once the hand is given to the tool or user, we start caching nodes for better performance"
^ self nodeMap nodeForPC: self context pc
^ self context method sourceNodeForPC: self context pc
]

{ #category : #astAndAstMapping }
Expand All @@ -337,22 +326,6 @@ SindarinDebugger >> nodeForContext: aContext [
^ aContext method sourceNodeForPC: aContext pc
]

{ #category : #astAndAstMapping }
SindarinDebugger >> nodeMap [
^ self nodeMapForMethod: self context method
]

{ #category : #astAndAstMapping }
SindarinDebugger >> nodeMapForMethod: aCompiledMethod [
nodeMapForMethod ifNil: [ nodeMapForMethod := Dictionary new ].
^ (nodeMapForMethod
at: aCompiledMethod methodClass name
ifAbsentPut: [ Dictionary new ])
at: aCompiledMethod selector
ifAbsentPut: [ SindarinBytecodeToASTCache
generateForCompiledMethod: aCompiledMethod ]
]

{ #category : #'graphical debugger' }
SindarinDebugger >> openInGraphicalDebugger [
sindarinSession canBeTerminated: false. "Prevents the graphical debugger from terminating the debug session when it's closed."
Expand Down