class: Tools::BreakpointService
authorClaus Gittinger <cg@exept.de>
Mon, 22 Jul 2013 16:00:21 +0200
changeset 13209 887b3ce3c6e2
parent 13208 2c9e9dc1b880
child 13210 214639c7834e
class: Tools::BreakpointService changed: #recompile
Tools__BreakpointService.st
--- a/Tools__BreakpointService.st	Mon Jul 22 14:03:58 2013 +0200
+++ b/Tools__BreakpointService.st	Mon Jul 22 16:00:21 2013 +0200
@@ -263,7 +263,7 @@
 recompile
     "recompile the current method for changed breakpoints"
 
-    |oldMethod newMethod compiler class selector|
+    |oldMethod newMethod compilerClass compiler class selector|
 
     oldMethod := codeView method.
     (oldMethod notNil and:[oldMethod hasPrimitiveCode not]) ifTrue:[
@@ -288,9 +288,18 @@
             selector := oldMethod selector.
 
             Class withoutUpdatingChangesDo:[
-                compiler := ByteCodeCompilerWithBreakpointSupport new.
+                "/ compilerClass := ByteCodeCompilerWithBreakpointSupport.
+                compilerClass := oldMethod programmingLanguage compilerWithBreakpointSupportClass.
+                compilerClass isNil ifTrue:[
+                    Dialog warn:'No breakpoint support for this programming language'.
+                    ^ self.
+                ].
+                compiler := compilerClass new.
                 compiler breakpoints:breakpoints.
-                compiler methodClass:MethodWithBreakpoints.
+"/ not needed - new compilers already know it
+"/                compiler methodClass:(oldMethod programmingLanguage isSTXJavaScript 
+"/                                            ifTrue:[JavaScriptFunctionWithBreakpoints]
+"/                                            ifFalse:[MethodWithBreakpoints]).
                 newMethod := compiler
                             compile:oldMethod source
                             forClass:class
@@ -349,7 +358,7 @@
 
     "Created: / 05-07-2011 / 21:33:13 / cg"
     "Modified: / 18-07-2012 / 10:53:22 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-    "Modified: / 22-07-2013 / 13:33:09 / cg"
+    "Modified: / 22-07-2013 / 16:00:13 / cg"
 !
 
 setOrToggleBreakpointAtLine:line
@@ -527,14 +536,14 @@
 !BreakpointService class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libtool/Tools__BreakpointService.st,v 1.34 2013-07-22 12:02:18 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/Tools__BreakpointService.st,v 1.35 2013-07-22 14:00:21 cg Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libtool/Tools__BreakpointService.st,v 1.34 2013-07-22 12:02:18 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/Tools__BreakpointService.st,v 1.35 2013-07-22 14:00:21 cg Exp $'
 !
 
 version_SVN
-    ^ '$Id: Tools__BreakpointService.st,v 1.34 2013-07-22 12:02:18 cg Exp $'
+    ^ '$Id: Tools__BreakpointService.st,v 1.35 2013-07-22 14:00:21 cg Exp $'
 ! !