Skip to content

Commit

Permalink
cursor/trace: complement trunk updates (Context>>#step will never ans…
Browse files Browse the repository at this point in the history
…wer nil)
  • Loading branch information
LinqLover committed Jan 14, 2024
1 parent ac8d8c6 commit cac601b
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ doStepOver: aContext
[(self completeStep: (self basicCalleeOf: aContext))
ifNil: [^ self]]
ifTrue:
[self step ifNil: [^ self].
[self step.
((self context tdbIdentical: aContext) not
and: [aContext in: [:ctx | self context hasSender: ctx]])
ifTrue: [self completeStep: self context]].
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ step
"Do at least one step forward to the next visible context. Answer the new current context or nil if the execution has been completed."

| context filter filtered method newMethod result |
result := self basicStep ifNil: [^ nil].
result := self basicStep.
filter := self contextFilter ifNil: [^ result].

method := nil.
Expand All @@ -13,5 +13,5 @@ step
filtered := filter value: context]
ifTrue: [filtered]]
whileFalse:
[result := self basicStep ifNil: [^ nil]].
[result := self basicStep].
^ result
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ stepOverUnhandledError: aContext from: startContext until: aBlock
[trace := self traceFor: context.
[(trace contextAtTime: self timeIndex) isDead]
whileFalse:
[self step ifNil: [^ nil].
[self step.
(aBlock cull: (context := self context))
ifTrue: [^ context]]]].
^ context
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ stepToHome: aContext

homeTrace := self livingHomeTraceFor: aContext.

self step ifNil: [^ nil].
self step.
home := homeTrace contextAtTime: self timeIndex.
home isDead ifTrue:
[^ self context].
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ stepUntil: aBlock
start := context.
[aBlock cull: context]
whileFalse:
[self step ifNil: [^ nil].
[self step.
context := self context.

"Detect unhandled errors."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"doStepInto" : "ct 3/11/2022 16:48",
"doStepInto:" : "ct 3/16/2022 16:41",
"doStepOver" : "ct 3/11/2022 16:48",
"doStepOver:" : "ct 3/16/2022 16:40",
"doStepOver:" : "ct 1/14/2024 18:15",
"doStepThrough" : "ct 3/11/2022 16:48",
"doStepThrough:" : "ct 3/11/2022 16:48",
"doStepThrough:until:" : "ct 12/27/2022 17:00",
Expand Down Expand Up @@ -98,14 +98,14 @@
"senderOf:" : "ct 3/17/2022 19:22",
"spaceUsed" : "ct 6/3/2022 16:49",
"stackForContext:" : "ct 3/16/2022 17:14",
"step" : "ct 3/17/2022 14:38",
"step" : "ct 1/14/2024 18:14",
"stepBack" : "ct 3/11/2022 18:30",
"stepBackToSendOrReturn" : "ct 3/16/2022 00:26",
"stepBackUntil:" : "ct 3/11/2022 18:31",
"stepOverUnhandledError:from:until:" : "ct 3/17/2022 15:24",
"stepToHome:" : "ct 1/3/2024 00:27",
"stepOverUnhandledError:from:until:" : "ct 1/14/2024 18:15",
"stepToHome:" : "ct 1/14/2024 18:14",
"stepToSendOrReturn" : "ct 3/11/2022 18:44",
"stepUntil:" : "ct 3/17/2022 14:38",
"stepUntil:" : "ct 1/14/2024 18:14",
"timeIndex" : "ct 3/16/2022 17:16",
"timeIndex:" : "ct 11/20/2021 22:12",
"trace" : "ct 12/31/2021 02:16",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ advance

| timeIndex result newRoot |
result := context step.
result ifNil: [^ nil].
timeIndex := timeInterval stop + 1.

result sender == context
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ advanceUntil: aBlock

| trace |
trace := self.
[trace isNil or: [aBlock cull: trace]] whileFalse:
[aBlock cull: trace] whileFalse:
[trace := trace advance].
^ trace
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"forContext:parent:timeIndex:" : "ct 3/15/2022 22:50",
"forStackOfContext:" : "ct 2/8/2022 19:27" },
"instance" : {
"advance" : "ct 1/2/2024 22:02",
"advanceUntil:" : "ct 3/17/2022 14:38",
"advance" : "ct 1/14/2024 18:13",
"advanceUntil:" : "ct 1/14/2024 18:13",
"advancedTo:atTime:" : "ct 3/15/2022 22:02",
"allDescendantsBreadthFirstDo:" : "ct 2/3/2022 19:08",
"atTime:putChild:" : "ct 1/25/2022 20:24",
Expand Down

0 comments on commit cac601b

Please sign in to comment.