#REFACTORING by exept
authorClaus Gittinger <cg@exept.de>
Sun, 08 Sep 2019 16:08:12 +0200
changeset 4555 806a25fa298a
parent 4554 0e22c00caf3c
child 4556 07a781ae80ba
#REFACTORING by exept class: ByteCodeCompiler changed: #compile:forClass:inCategory:notifying:install:skipIfSame:silent:foldConstants:
ByteCodeCompiler.st
--- a/ByteCodeCompiler.st	Sun Sep 08 16:06:47 2019 +0200
+++ b/ByteCodeCompiler.st	Sun Sep 08 16:08:12 2019 +0200
@@ -3025,51 +3025,51 @@
 !
 
 compile:aStringArg forClass:aClassArg inCategory:cat notifying:aRequestor
-		 install:install skipIfSame:skipIfSame silent:silent foldConstants:fold
+                 install:install skipIfSame:skipIfSame silent:silent foldConstants:fold
 
     aRequestor notNil ifTrue:[
-	^ self
-	    compile:aStringArg
-	    forClass:aClassArg
-	    inCategory:cat
-	    notifying:aRequestor
-	    install:install
-	    skipIfSame:skipIfSame
-	    silent:silent
-	    foldConstants:fold
-	    ifFail:nil
+        ^ self
+            compile:aStringArg
+            forClass:aClassArg
+            inCategory:cat
+            notifying:aRequestor
+            install:install
+            skipIfSame:skipIfSame
+            silent:silent
+            foldConstants:fold
+            ifFail:nil
     ].
 
     ^ self
-	compile:aStringArg
-	forClass:aClassArg
-	inCategory:cat
-	notifying:aRequestor
-	install:install
-	skipIfSame:skipIfSame
-	silent:silent
-	foldConstants:fold
-	ifFail:[:exOrNil |
-		 exOrNil notNil ifTrue:[
-		    ParseError new
-			errorMessage:(exOrNil errorMessage) startPosition:(exOrNil startPosition) endPosition:(exOrNil endPosition);
-			parameter:exOrNil parameter;
-			lineNumber:exOrNil lineNumber;
-			raiseRequest.
-		 ] ifFalse:[
-		     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
-		 ].
-	]
+        compile:aStringArg
+        forClass:aClassArg
+        inCategory:cat
+        notifying:aRequestor
+        install:install
+        skipIfSame:skipIfSame
+        silent:silent
+        foldConstants:fold
+        ifFail:[:exOrNil |
+                 exOrNil notNil ifTrue:[
+                    ParseError new
+                        errorMessage:(exOrNil errorMessage) startPosition:(exOrNil startPosition) endPosition:(exOrNil endPosition);
+                        parameter:exOrNil parameter;
+                        lineNumber:exOrNil lineNumber;
+                        raiseRequest.
+                 ] ifFalse:[
+                     ParseError raiseRequestErrorString:'compilation failed'. "/ #Error
+                 ].
+                 (install and:[selector notNil]) ifTrue:[
+                     |newMethod|
+
+                      "/ if proceeded, install a trap method
+                     newMethod := (Method trapMethodForNumArgs:selector argumentCount) copy.
+                     newMethod mclass:nil; setPackage:nil.
+                     newMethod makeInvalid.
+                     newMethod source:aStringArg.
+                     aClassArg basicAddSelector:selector withMethod:newMethod
+                 ].
+        ]
 
     "Modified: / 18-01-2011 / 11:35:21 / cg"
 !