#REFACTORING by cg
class: InstrumentingCompiler
added: #correctVariable:atPosition:to:
class: InstrumentingCompiler class
changed: #compileMethod:
--- a/InstrumentingCompiler.st Tue Jan 28 16:02:31 2020 +0100
+++ b/InstrumentingCompiler.st Tue Jan 28 17:19:05 2020 +0100
@@ -168,13 +168,20 @@
aMethod hasPrimitiveCode ifTrue:[^ self].
aMethod isSubclassResponsibility ifTrue:[^ self].
(aMethod hasAnnotation:#noCoverage) ifTrue:[^ self].
+ aMethod isInstrumented ifTrue:[^ self].
- Class withoutUpdatingChangesDo:[
- Class packageQuerySignal answer: aMethod package do:[
- self
- compile:(aMethod source)
- forClass:(aMethod mclass)
- inCategory:(aMethod category)
+ Error handle:[:ex |
+ Transcript showCR:'error instrumenting: %1' with:aMethod.
+ Transcript showCR:' %1' with:ex description.
+ ex reject.
+ ] do:[
+ Class withoutUpdatingChangesDo:[
+ Class packageQuerySignal answer: aMethod package do:[
+ self
+ compile:(aMethod source)
+ forClass:(aMethod mclass)
+ inCategory:(aMethod category)
+ ]
]
]
!
@@ -484,6 +491,12 @@
"Created: / 30-09-2011 / 12:27:47 / cg"
! !
+!InstrumentingCompiler methodsFor:'ignored error handling'!
+
+correctVariable:name atPosition:pos1 to:pos2
+ ^ #correctIt
+! !
+
!InstrumentingCompiler methodsFor:'redefinable'!
blockExecutionInfoInstance