You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Skip through and skip to cause an infinite loop if the user tries to skip an instruction that is neither a message nor an assignement #26
that calls skip until the wanted node is not reached. However,
SindarinDebugger>>#skipWith: replacementValue
"If it is a message-send or assignment, skips the execution of the current instruction, and puts the replacementValue on the execution stack.""If the current node is a message send or assignment"
(self node isMessage notand: [ self node isAssignment not ])
ifTrue: [ ^self ].
self node isMessage
ifTrue: [ ^selfskipMessageNodeWith: replacementValue ].
self node isAssignment
ifTrue: [ ^selfskipAssignmentNodeWith: replacementValue ]
does nothing without making the execution go forward if the current node is neither an assignment nor a message. That's why, these commands cause an infinite loop if such a node (method node, block creation, return node...) is between the starting point and the point of arrival. SindarinDebugger>>#skipToPC:, although it's not used yet, suffers from the same problem.
To fix that, we can:
either modify skip so that it skips any type of node.
or change skipUpToNode:skipTargerNode: and skipToPC: so that they stop when a node that isn't a message nor an assignment is met.
Activity
adri09070 commentedon Sep 5, 2022
This issue should be closed via the bunch of PRs I did to improve the unitary skip