BCompiler.st
changeset 84 ecb74f0507fd
parent 78 e320344c19b7
child 85 31681583c44f
--- a/BCompiler.st	Tue Apr 11 17:30:32 1995 +0200
+++ b/BCompiler.st	Tue May 02 01:04:40 1995 +0200
@@ -26,7 +26,7 @@
 COPYRIGHT (c) 1989 by Claus Gittinger
 	     All Rights Reserved
 
-$Header: /cvs/stx/stx/libcomp/Attic/BCompiler.st,v 1.19 1995-03-18 05:08:59 claus Exp $
+$Header: /cvs/stx/stx/libcomp/Attic/BCompiler.st,v 1.20 1995-05-01 23:03:42 claus Exp $
 '!
 
 !ByteCodeCompiler class methodsFor:'documentation'!
@@ -47,7 +47,7 @@
 
 version
 "
-$Header: /cvs/stx/stx/libcomp/Attic/BCompiler.st,v 1.19 1995-03-18 05:08:59 claus Exp $
+$Header: /cvs/stx/stx/libcomp/Attic/BCompiler.st,v 1.20 1995-05-01 23:03:42 claus Exp $
 "
 !
 
@@ -109,73 +109,73 @@
 	    silent:false
 !
 
-compile:methodText forClass:classToCompileFor notifying:someOne
+compile:methodText forClass:classToCompileFor notifying:requestor
     "compile a source-string for a method in classToCompileFor.
-     Errors are forwarded to someOne."
+     Errors are forwarded to requestor."
 
     ^ self compile:methodText
 	  forClass:classToCompileFor
 	inCategory:'others'
-	 notifying:someOne
+	 notifying:requestor
 	   install:true
 	skipIfSame:false
 	    silent:false
 !
 
-compile:aString forClass:aClass inCategory:cat notifying:someOne
+compile:aString forClass:aClass inCategory:cat notifying:requestor
     "compile a source-string for a method in classToCompileFor.
-     errors are forwarded to someOne.
+     errors are forwarded to requestor.
      The method will get cat as category"
 
     ^ self compile:aString
 	  forClass:aClass
 	inCategory:cat
-	 notifying:someOne
+	 notifying:requestor
 	   install:true
 	skipIfSame:false
 	    silent:false
 !
 
-compile:aString forClass:aClass inCategory:cat notifying:someOne install:install
+compile:aString forClass:aClass inCategory:cat notifying:requestor install:install
     "compile a source-string for a method in classToCompileFor.
      The install-argument controls if the method is to be installed into the
      classes method-dictionary, or just to be compiled and a method object to be returned.
-     Errors are forwarded to someOne. The method will get cat as category"
+     Errors are forwarded to requestor. The method will get cat as category"
 
     ^ self compile:aString
 	  forClass:aClass
 	inCategory:cat
-	 notifying:someOne
+	 notifying:requestor
 	   install:install
 	skipIfSame:false
 	    silent:false
 !
 
-compile:aString forClass:aClass inCategory:cat notifying:someOne
+compile:aString forClass:aClass inCategory:cat notifying:requestor
 		 install:install skipIfSame:skipIfSame
     "compile a source-string for a method in classToCompileFor.
      The install-argument controls if the method is to be installed into the
      classes method-dictionary, or just to be compiled and a method object to be returned.
-     Errors are forwarded to someOne. The method will get cat as category.
+     Errors are forwarded to requestor. The method will get cat as category.
      If skipIsSame is true, and the source is the same as an existing
      methods source, this is a noop (for fast fileIn)."
 
     ^ self compile:aString
 	  forClass:aClass
 	inCategory:cat
-	 notifying:someOne
+	 notifying:requestor
 	   install:install
 	skipIfSame:skipIfSame
 	    silent:false
 !
 
-compile:aString forClass:aClass inCategory:cat notifying:someOne
+compile:aString forClass:aClass inCategory:cat notifying:requestor
 		 install:install skipIfSame:skipIfSame silent:silent
 
     "the basic workhorse method for compiling:
      compile a source-string for a method in classToCompileFor.
-     errors are forwarded to someOne (report on Transcript and return
-     #Error, if someOne is nil).
+     errors are forwarded to requestor (report on Transcript and return
+     #Error, if requestor is nil).
 
      The new method will get cat as category. 
      If install is true, the method will go into the classes method-table, 
@@ -196,7 +196,8 @@
     "create a compiler, let it parse and create the parsetree"
 
     compiler := self for:(ReadStream on:aString) in:aClass.
-    compiler notifying:someOne.
+    compiler parseForCode.
+    compiler notifying:requestor.
     silent ifTrue:[
 "/        compiler ignoreErrors.
 	compiler ignoreWarnings
@@ -212,7 +213,7 @@
 		oldMethod source = aString ifTrue:[
 		    oldMethod isInvalid ifFalse:[
 			silencio ifFalse:[
-			    Transcript showCr:('unchanged: ',aClass name,' ',compiler selector)
+			    Transcript showCr:('    unchanged: ',aClass name,' ',compiler selector)
 			].
 			"
 			 same. however, category may be different
@@ -235,6 +236,7 @@
 
     (compiler errorFlag or:[tree == #Error]) ifTrue:[
 "/        compiler parseError:'syntax error'.
+	Transcript show:'    '.
 	compiler selector notNil ifTrue:[
 	    Transcript show:(compiler selector,' ')
 	].
@@ -256,7 +258,7 @@
 	^ compiler compileToMachineCode:aString 
 			       forClass:aClass 
 			     inCategory:cat 
-			      notifying:someOne
+			      notifying:requestor
 				install:install 
 			     skipIfSame:skipIfSame 
 				 silent:silent.
@@ -297,6 +299,7 @@
 	"
 	symbolicCodeArray := compiler genSymbolicCode.
 	(symbolicCodeArray == #Error) ifTrue:[
+	    Transcript show:'    '.
 	    compiler selector notNil ifTrue:[
 		Transcript show:(compiler selector,' ')
 	    ].
@@ -309,6 +312,7 @@
 	 (someone willin' to make machine code :-)
 	"
 	((compiler genByteCodeFrom:symbolicCodeArray) == #Error) ifTrue:[
+	    Transcript show:'    '.
 	    compiler selector notNil ifTrue:[
 		Transcript show:(compiler selector,' ')
 	    ].
@@ -354,7 +358,7 @@
     ].
 
     silencio ifFalse:[
-	Transcript showCr:('compiled: ',aClass name,' ',compiler selector)
+	Transcript showCr:('    compiled: ',aClass name,' ',compiler selector)
     ].
 
     ^ newMethod
@@ -1345,7 +1349,7 @@
 !ByteCodeCompiler methodsFor:'machine code generation'!
 
 compileToMachineCode:aString forClass:aClass inCategory:cat 
-			     notifying:someOne install:install skipIfSame:skipIfSame silent:silent
+			     notifying:requestor install:install skipIfSame:skipIfSame silent:silent
     "this is called to compile primitive code.
      This is EXPERIMENTAL and going to be changed to raise an error,
      an redefined in subclasses which can do it (either by direct compilation, or by calling
@@ -1481,7 +1485,7 @@
 	newMethod source:aString.
 	aClass addChangeRecordForMethod:newMethod.
 	(silent or:[Smalltalk silentLoading == true]) ifFalse:[
-	    Transcript showCr:('compiled: ', aClass name,' ',self selector,' - machine code')
+	    Transcript showCr:('    compiled: ', aClass name,' ',self selector,' - machine code')
 	].
 	^ newMethod.
     ].