22 #name : ' NeoExReqInstrumentationBuilder' ,
33 #superclass : ' Object' ,
44 #instVars : [
5- ' preconditionMethodProxies' ,
6- ' postconditionMethodProxies' ,
75 ' preconditionTracingPoints' ,
8- ' postconditionTracingPoints'
6+ ' postconditionTracingPoints' ,
7+ ' methodProxies'
98 ],
109 #category : ' ExecutableRequirements-Technical' ,
1110 #package : ' ExecutableRequirements' ,
@@ -16,26 +15,23 @@ Class {
1615NeoExReqInstrumentationBuilder >> initialize [
1716
1817 super initialize.
19- preconditionMethodProxies := Dictionary new .
20- postconditionMethodProxies := Dictionary new .
18+ methodProxies := Dictionary new .
2119 preconditionTracingPoints := Dictionary new .
2220 postconditionTracingPoints := Dictionary new
2321]
2422
2523{ #category : ' as yet unclassified' }
2624NeoExReqInstrumentationBuilder >> installAllStepReports: aCollection [
2725
28- | tracingPoints methodProxies |
26+ | tracingPoints |
2927 aCollection do: [ :each | self installStepReport: each ].
3028 tracingPoints := self preconditionTracingPoints values
3129 , self postconditionTracingPoints values.
32- methodProxies := self preconditionMethodProxies values
33- , self postconditionMethodProxies values.
3430
3531 tracingPoints do: [ :each |
3632 each link: each metaLink.
3733 each install ].
38- methodProxies do : [ :each |
34+ self methodProxies valuesDo : [ :each |
3935 each
4036 install;
4137 enableInstrumentation ]
@@ -56,27 +52,27 @@ NeoExReqInstrumentationBuilder >> installMethodProxyForStepReport: aStepReport w
5652{ #category : ' as yet unclassified' }
5753NeoExReqInstrumentationBuilder >> installPostconditionMethodProxyForStepReport: aStepReport withNode: aNode [
5854
59- self postconditionMethodProxies
55+ self methodProxies
6056 at: aNode
61- ifPresent: [ :p | p handler addStepReport : aStepReport ]
57+ ifPresent: [ :p | p handler addPostconditionStepReport : aStepReport ]
6258 ifAbsentPut: [
6359 | handler |
64- handler := NeoExReqPostconditionMethodProxyHandler new
65- addStepReport : aStepReport;
60+ handler := NeoExReqMethodProxyHandler new
61+ addPostconditionStepReport : aStepReport;
6662 yourself .
6763 MpMethodProxy onMethod: aNode compiledMethod handler: handler ]
6864]
6965
7066{ #category : ' as yet unclassified' }
7167NeoExReqInstrumentationBuilder >> installPreconditionMethodProxyForStepReport: aStepReport withNode: aNode [
7268
73- self preconditionMethodProxies
69+ self methodProxies
7470 at: aNode
75- ifPresent: [ :p | p handler addStepReport : aStepReport ]
71+ ifPresent: [ :p | p handler addPreconditionStepReport : aStepReport ]
7672 ifAbsentPut: [
7773 | handler |
78- handler := NeoExReqPreconditionMethodProxyHandler new
79- addStepReport : aStepReport;
74+ handler := NeoExReqMethodProxyHandler new
75+ addPreconditionStepReport : aStepReport;
8076 yourself .
8177 MpMethodProxy onMethod: aNode compiledMethod handler: handler ]
8278]
@@ -87,12 +83,12 @@ NeoExReqInstrumentationBuilder >> installStepReport: aStepReport [
8783 | astNode |
8884 astNode := aStepReport step node.
8985 astNode isMethod
90- ifTrue: [
91- self installMethodProxyForStepReport: aStepReport withNode: astNode ]
86+ ifTrue: [ self installMethodProxyForStepReport: aStepReport withNode: astNode
87+ ]
9288 ifFalse: [
93- " self
89+ self
9490 installTracingPointForStepReport: aStepReport
95- withNode: astNode" ]
91+ withNode: astNode ]
9692]
9793
9894{ #category : ' as yet unclassified' }
@@ -123,7 +119,9 @@ NeoExReqInstrumentationBuilder >> installTracingPointForStepReport: aStepReport
123119{ #category : ' testing' }
124120NeoExReqInstrumentationBuilder >> isEmpty [
125121
126- ^ self preconditionMethodProxies isEmpty and : [self postconditionMethodProxies isEmpty and : [self preconditionTracingPoints isEmpty and : [ self postconditionTracingPoints isEmpty ]]].
122+ ^ self methodProxies isEmpty and : [
123+ self preconditionTracingPoints isEmpty and : [
124+ self postconditionTracingPoints isEmpty ] ]
127125]
128126
129127{ #category : ' testing' }
@@ -132,9 +130,9 @@ NeoExReqInstrumentationBuilder >> isNotEmpty [
132130]
133131
134132{ #category : ' accessing' }
135- NeoExReqInstrumentationBuilder >> postconditionMethodProxies [
133+ NeoExReqInstrumentationBuilder >> methodProxies [
136134
137- ^ postconditionMethodProxies
135+ ^ methodProxies
138136]
139137
140138{ #category : ' accessing' }
@@ -143,12 +141,6 @@ NeoExReqInstrumentationBuilder >> postconditionTracingPoints [
143141 ^ postconditionTracingPoints
144142]
145143
146- { #category : ' accessing' }
147- NeoExReqInstrumentationBuilder >> preconditionMethodProxies [
148-
149- ^ preconditionMethodProxies
150- ]
151-
152144{ #category : ' accessing' }
153145NeoExReqInstrumentationBuilder >> preconditionTracingPoints [
154146
@@ -158,16 +150,13 @@ NeoExReqInstrumentationBuilder >> preconditionTracingPoints [
158150{ #category : ' as yet unclassified' }
159151NeoExReqInstrumentationBuilder >> uninstallAllStepReports [
160152
161- | tracingPoints methodProxies |
153+ | tracingPoints |
162154 tracingPoints := self preconditionTracingPoints values
163155 , self postconditionTracingPoints values.
164- methodProxies := self preconditionMethodProxies values
165- , self postconditionMethodProxies values.
166156
167157 tracingPoints do: [ :each | each uninstall ].
168- methodProxies do : [ :each | each uninstall ].
158+ self methodProxies valuesDo : [ :each | each uninstall ].
169159 self preconditionTracingPoints removeAll.
170160 self postconditionTracingPoints removeAll.
171- self preconditionMethodProxies removeAll.
172- self postconditionMethodProxies removeAll.
161+ self methodProxies removeAll
173162]
0 commit comments