From a2fe4f00d0c824a8884b20ebfdebe68cd957ddb2 Mon Sep 17 00:00:00 2001 From: Christoph Thiede Date: Fri, 29 Apr 2022 18:30:06 +0200 Subject: [PATCH] wip through filters Closes #73 --- .../Context.extension/instance/tdbIsOrHasSender..st | 4 ++++ .../Context.extension/methodProperties.json | 1 + .../streamChildrenForFilter.aboveHome.on..st | 12 ++++++++++++ .../instance/streamChildrenForFilter.on..st | 6 +++++- .../TDBTrace.class/methodProperties.json | 3 ++- 5 files changed, 24 insertions(+), 2 deletions(-) create mode 100644 packages/TraceDebugger.package/Context.extension/instance/tdbIsOrHasSender..st create mode 100644 packages/TraceDebugger.package/TDBTrace.class/instance/streamChildrenForFilter.aboveHome.on..st diff --git a/packages/TraceDebugger.package/Context.extension/instance/tdbIsOrHasSender..st b/packages/TraceDebugger.package/Context.extension/instance/tdbIsOrHasSender..st new file mode 100644 index 00000000..5d39b475 --- /dev/null +++ b/packages/TraceDebugger.package/Context.extension/instance/tdbIsOrHasSender..st @@ -0,0 +1,4 @@ +*TraceDebugger-Core-testing +tdbIsOrHasSender: aContext + + ^ (self tdbIdentical: aContext) or: [self hasSender: aContext tdbproxyYourself] \ No newline at end of file diff --git a/packages/TraceDebugger.package/Context.extension/methodProperties.json b/packages/TraceDebugger.package/Context.extension/methodProperties.json index 35a6855c..ea8c1536 100644 --- a/packages/TraceDebugger.package/Context.extension/methodProperties.json +++ b/packages/TraceDebugger.package/Context.extension/methodProperties.json @@ -6,6 +6,7 @@ "tdbFullStack" : "ct 2/8/2022 19:26", "tdbHandlerContexts" : "ct 3/19/2022 20:36", "tdbHasHome:" : "ct 11/30/2021 22:52", + "tdbIsOrHasSender:" : "ct 3/23/2022 22:20", "tdbIsSignalContext" : "ct 3/21/2022 16:34", "tdbIsUnhandledSignalContext" : "ct 3/21/2022 16:34", "tdbLivingHomeSuchThat:" : "ct 3/13/2022 01:13", diff --git a/packages/TraceDebugger.package/TDBTrace.class/instance/streamChildrenForFilter.aboveHome.on..st b/packages/TraceDebugger.package/TDBTrace.class/instance/streamChildrenForFilter.aboveHome.on..st new file mode 100644 index 00000000..1c6e3b86 --- /dev/null +++ b/packages/TraceDebugger.package/TDBTrace.class/instance/streamChildrenForFilter.aboveHome.on..st @@ -0,0 +1,12 @@ +private +streamChildrenForFilter: filter aboveHome: startContext on: aStream + + self children do: [:child | + (((child contextAtTime: child minTimeIndex) home in: [:childHome | startContext tdbIsOrHasSender: childHome]) + and: [filter value: child originalContext]) + ifTrue: [aStream nextPut: child] + ifFalse: + [child + streamChildrenForFilter: filter + aboveHome: startContext + on: aStream]]. \ No newline at end of file diff --git a/packages/TraceDebugger.package/TDBTrace.class/instance/streamChildrenForFilter.on..st b/packages/TraceDebugger.package/TDBTrace.class/instance/streamChildrenForFilter.on..st index e1331c82..e0d09f02 100644 --- a/packages/TraceDebugger.package/TDBTrace.class/instance/streamChildrenForFilter.on..st +++ b/packages/TraceDebugger.package/TDBTrace.class/instance/streamChildrenForFilter.on..st @@ -4,4 +4,8 @@ streamChildrenForFilter: filter on: aStream self children do: [:child | (filter value: child originalContext) ifTrue: [aStream nextPut: child] - ifFalse: [child streamChildrenForFilter: filter on: aStream]]. \ No newline at end of file + ifFalse: + [child + streamChildrenForFilter: filter + aboveHome: self originalContext home + on: aStream]]. \ 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 5bd53d40..11f85136 100644 --- a/packages/TraceDebugger.package/TDBTrace.class/methodProperties.json +++ b/packages/TraceDebugger.package/TDBTrace.class/methodProperties.json @@ -25,7 +25,8 @@ "printOn:" : "ct 12/1/2021 23:08", "spaceUsed" : "ct 3/15/2022 22:01", "streamAllContextsOn:satisfying:" : "ct 3/14/2022 19:04", - "streamChildrenForFilter:on:" : "ct 2/19/2022 16:48", + "streamChildrenForFilter:aboveHome:on:" : "ct 3/23/2022 22:28", + "streamChildrenForFilter:on:" : "ct 3/23/2022 22:26", "traceAtTime:" : "ct 11/30/2021 20:26", "traceAtTime:ifAbsent:" : "ct 1/26/2022 14:34", "tracingSimulatorClass" : "ct 1/7/2022 19:58",