--- a/MethodWithBreakpoints.st Thu May 08 19:50:33 2014 +0200
+++ b/MethodWithBreakpoints.st Fri May 09 13:48:01 2014 +0200
@@ -78,16 +78,27 @@
"remove myself - i.e. replace by the original method
(i.e. the one without line breakpoints)"
- |cls selector|
+ | cls selector original |
(cls := self mclass) notNil ifTrue:[
(selector := self selector) notNil ifTrue:[
self breakPoint:#cg.
- cls basicAddSelector:selector withMethod:originalMethod
+ originalMethod notNil ifTrue:[
+ original := originalMethod
+ ] ifFalse:[
+ original := self programmingLanguage compilerClass
+ compile: self source
+ in: self mclass
+ notifying:nil
+ install:false
+ ifFail:[ self error:'Failed to recompile method' ].
+ ].
+ cls basicAddSelector:selector withMethod:original.
]
]
"Modified: / 29-08-2013 / 01:17:05 / cg"
+ "Modified: / 09-05-2014 / 12:41:30 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!MethodWithBreakpoints methodsFor:'queries'!
@@ -101,10 +112,10 @@
!MethodWithBreakpoints class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/MethodWithBreakpoints.st,v 1.4 2014-02-03 09:36:36 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/MethodWithBreakpoints.st,v 1.5 2014-05-09 11:48:01 vrany Exp $'
!
version_CVS
- ^ '$Header: /cvs/stx/stx/libbasic/MethodWithBreakpoints.st,v 1.4 2014-02-03 09:36:36 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/MethodWithBreakpoints.st,v 1.5 2014-05-09 11:48:01 vrany Exp $'
! !