ByteCodeCompiler.st
changeset 3580 6a02c462b0ec
parent 3569 d2ca8339f9f7
child 3641 884997aa010d
--- a/ByteCodeCompiler.st	Mon Feb 09 11:05:33 2015 +0100
+++ b/ByteCodeCompiler.st	Mon Feb 09 11:09:24 2015 +0100
@@ -2980,8 +2980,19 @@
                         parameter:exOrNil parameter;
                         lineNumber:exOrNil lineNumber;
                         raiseRequest.
+                 ] ifFalse:[
+                     ParseError raiseRequestErrorString:'compilation failed'. #Error 
                  ].
-                 ParseError raiseRequestErrorString:'compilation failed'. #Error 
+                 (install and:[selector notNil]) ifTrue:[
+                     |newMethod|
+
+                      "/ if proceeded, install a trap method
+                     newMethod := (Method trapMethodForNumArgs:selector numArgs) copy.
+                     newMethod mclass:nil; setPackage:nil.
+                     newMethod makeInvalid.
+                     newMethod source:aStringArg.
+                     aClassArg basicAddSelector:selector withMethod:newMethod
+                 ].
         ]
 
     "Modified: / 18-01-2011 / 11:35:21 / cg"
@@ -3642,11 +3653,11 @@
 !ByteCodeCompiler class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libcomp/ByteCodeCompiler.st,v 1.293 2015-02-02 21:26:24 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libcomp/ByteCodeCompiler.st,v 1.294 2015-02-09 10:09:24 cg Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libcomp/ByteCodeCompiler.st,v 1.293 2015-02-02 21:26:24 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libcomp/ByteCodeCompiler.st,v 1.294 2015-02-09 10:09:24 cg Exp $'
 !
 
 version_SVN