From cac601b9185901d0e009c17cc0d99053b118f5d3 Mon Sep 17 00:00:00 2001 From: Christoph Thiede Date: Sun, 14 Jan 2024 18:46:25 +0100 Subject: [PATCH] cursor/trace: complement trunk updates (Context>>#step will never answer nil) --- .../TDBCursor.class/instance/doStepOver..st | 2 +- .../TDBCursor.class/instance/step.st | 4 ++-- .../instance/stepOverUnhandledError.from.until..st | 2 +- .../TDBCursor.class/instance/stepToHome..st | 2 +- .../TDBCursor.class/instance/stepUntil..st | 2 +- .../TDBCursor.class/methodProperties.json | 10 +++++----- .../TDBTrace.class/instance/advance.st | 1 - .../TDBTrace.class/instance/advanceUntil..st | 2 +- .../TDBTrace.class/methodProperties.json | 4 ++-- 9 files changed, 14 insertions(+), 15 deletions(-) diff --git a/packages/TraceDebugger.package/TDBCursor.class/instance/doStepOver..st b/packages/TraceDebugger.package/TDBCursor.class/instance/doStepOver..st index 761115b6..82aac443 100644 --- a/packages/TraceDebugger.package/TDBCursor.class/instance/doStepOver..st +++ b/packages/TraceDebugger.package/TDBCursor.class/instance/doStepOver..st @@ -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]]. diff --git a/packages/TraceDebugger.package/TDBCursor.class/instance/step.st b/packages/TraceDebugger.package/TDBCursor.class/instance/step.st index c1acb28a..d8dbee56 100644 --- a/packages/TraceDebugger.package/TDBCursor.class/instance/step.st +++ b/packages/TraceDebugger.package/TDBCursor.class/instance/step.st @@ -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. @@ -13,5 +13,5 @@ step filtered := filter value: context] ifTrue: [filtered]] whileFalse: - [result := self basicStep ifNil: [^ nil]]. + [result := self basicStep]. ^ result \ No newline at end of file diff --git a/packages/TraceDebugger.package/TDBCursor.class/instance/stepOverUnhandledError.from.until..st b/packages/TraceDebugger.package/TDBCursor.class/instance/stepOverUnhandledError.from.until..st index 44456b17..792b0d20 100644 --- a/packages/TraceDebugger.package/TDBCursor.class/instance/stepOverUnhandledError.from.until..st +++ b/packages/TraceDebugger.package/TDBCursor.class/instance/stepOverUnhandledError.from.until..st @@ -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 \ No newline at end of file diff --git a/packages/TraceDebugger.package/TDBCursor.class/instance/stepToHome..st b/packages/TraceDebugger.package/TDBCursor.class/instance/stepToHome..st index 6e55a09a..844390a5 100644 --- a/packages/TraceDebugger.package/TDBCursor.class/instance/stepToHome..st +++ b/packages/TraceDebugger.package/TDBCursor.class/instance/stepToHome..st @@ -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]. diff --git a/packages/TraceDebugger.package/TDBCursor.class/instance/stepUntil..st b/packages/TraceDebugger.package/TDBCursor.class/instance/stepUntil..st index 08915956..53f9dfd5 100644 --- a/packages/TraceDebugger.package/TDBCursor.class/instance/stepUntil..st +++ b/packages/TraceDebugger.package/TDBCursor.class/instance/stepUntil..st @@ -7,7 +7,7 @@ stepUntil: aBlock start := context. [aBlock cull: context] whileFalse: - [self step ifNil: [^ nil]. + [self step. context := self context. "Detect unhandled errors." diff --git a/packages/TraceDebugger.package/TDBCursor.class/methodProperties.json b/packages/TraceDebugger.package/TDBCursor.class/methodProperties.json index d6825295..9bff1c85 100644 --- a/packages/TraceDebugger.package/TDBCursor.class/methodProperties.json +++ b/packages/TraceDebugger.package/TDBCursor.class/methodProperties.json @@ -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", @@ -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", diff --git a/packages/TraceDebugger.package/TDBTrace.class/instance/advance.st b/packages/TraceDebugger.package/TDBTrace.class/instance/advance.st index 00dbb38d..8081978b 100644 --- a/packages/TraceDebugger.package/TDBTrace.class/instance/advance.st +++ b/packages/TraceDebugger.package/TDBTrace.class/instance/advance.st @@ -4,7 +4,6 @@ advance | timeIndex result newRoot | result := context step. - result ifNil: [^ nil]. timeIndex := timeInterval stop + 1. result sender == context diff --git a/packages/TraceDebugger.package/TDBTrace.class/instance/advanceUntil..st b/packages/TraceDebugger.package/TDBTrace.class/instance/advanceUntil..st index e8320b49..6a86a3f0 100644 --- a/packages/TraceDebugger.package/TDBTrace.class/instance/advanceUntil..st +++ b/packages/TraceDebugger.package/TDBTrace.class/instance/advanceUntil..st @@ -4,6 +4,6 @@ advanceUntil: aBlock | trace | trace := self. - [trace isNil or: [aBlock cull: trace]] whileFalse: + [aBlock cull: trace] whileFalse: [trace := trace advance]. ^ trace \ No newline at end of file diff --git a/packages/TraceDebugger.package/TDBTrace.class/methodProperties.json b/packages/TraceDebugger.package/TDBTrace.class/methodProperties.json index c4534ac3..e28cea79 100644 --- a/packages/TraceDebugger.package/TDBTrace.class/methodProperties.json +++ b/packages/TraceDebugger.package/TDBTrace.class/methodProperties.json @@ -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",