oops - couldn't compile for Object (no superclass)
authorClaus Gittinger <cg@exept.de>
Mon, 26 Feb 1996 15:40:15 +0100
changeset 214 683adf870f54
parent 213 59bb47d60601
child 215 d104a3e755a7
oops - couldn't compile for Object (no superclass)
BCompiler.st
ByteCodeCompiler.st
--- a/BCompiler.st	Sat Feb 24 20:36:24 1996 +0100
+++ b/BCompiler.st	Mon Feb 26 15:40:15 1996 +0100
@@ -1795,7 +1795,7 @@
 !ByteCodeCompiler methodsFor:'machine code generation'!
 
 compileToMachineCode:aString forClass:aClass inCategory:cat 
-			     notifying:requestor 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
@@ -1804,17 +1804,17 @@
 
     |stFileName stream handle address flags command oFileName 
      initName newMethod ok status className sep class stcPath 
-     errorStream errorMessages eMsg m|
+     errorStream errorMessages eMsg m supers|
 
     ObjectFileLoader isNil ifTrue:[^ #CannotLoad].
     STCCompilation == #never ifTrue:[^ #CannotLoad].
     (stcPath := self class incrementalStcPath) isNil ifTrue:[
-	self parseError:'no stc compiler available - cannot create machine code' position:1.
-	^ #CannotLoad
+        self parseError:'no stc compiler available - cannot create machine code' position:1.
+        ^ #CannotLoad
     ].
 
     SequenceNumber isNil ifTrue:[
-	SequenceNumber := 0.
+        SequenceNumber := 0.
     ].
     SequenceNumber := SequenceNumber + 1.
 
@@ -1822,23 +1822,26 @@
     stFileName := initName , '.st'. 
     stream := stFileName asFilename writeStream.
     stream isNil ifTrue:[
-	self parseError:'cannot create temporary sourcefile for compilation'.
-	^ #CannotLoad
+        self parseError:'cannot create temporary sourcefile for compilation'.
+        ^ #CannotLoad
     ].
     sep := stream class chunkSeparator.
 
     class := aClass.
     class isMeta ifTrue:[
-	class := aClass soleInstance
+        class := aClass soleInstance
     ].
-    class allSuperclasses reverseDo:[:cls|
-	cls ~~ Object ifTrue:[
-	    cls isLoaded ifFalse:[
-		^ #CannotLoad
-	    ].
-	    cls fileOutDefinitionOn:stream.
-	    stream nextPut:sep; cr.
-	]
+    supers := aClass allSuperclasses.
+    supers notNil ifTrue:[
+        supers reverseDo:[:cls|
+            cls ~~ Object ifTrue:[
+                cls isLoaded ifFalse:[
+                    ^ #CannotLoad
+                ].
+                cls fileOutDefinitionOn:stream.
+                stream nextPut:sep; cr.
+            ]
+        ]
     ].
     class fileOutDefinitionOn:stream.
     stream nextPut:sep; cr.
@@ -1849,9 +1852,9 @@
     className := aClass name.
 
     aClass isMeta ifTrue:[
-	stream nextPutAll:(className copyTo:(className size - 5)); nextPutAll:' class'.
+        stream nextPutAll:(className copyTo:(className size - 5)); nextPutAll:' class'.
     ] ifFalse:[
-	stream nextPutAll:className.
+        stream nextPutAll:className.
     ].
     stream nextPutAll:' methodsFor:'''; nextPutAll:cat; nextPutAll:''''.
     stream nextPut:sep.
@@ -1870,13 +1873,13 @@
 
     flags := '-commonSymbols +sharedLibCode +newIncremental -E:errorOutput -N' , initName .
     STCCompilationDefines notNil ifTrue:[
-	flags := STCCompilationDefines , ' ' , flags
+        flags := STCCompilationDefines , ' ' , flags
     ].
     STCCompilationIncludes notNil ifTrue:[
-	flags := STCCompilationIncludes , ' ' , flags
+        flags := STCCompilationIncludes , ' ' , flags
     ].
     STCCompilationOptions notNil ifTrue:[
-	flags := STCCompilationOptions , ' ' , flags
+        flags := STCCompilationOptions , ' ' , flags
     ].
 
     command := stcPath , ' ' , flags , ' -c ' , stFileName.
@@ -1887,30 +1890,30 @@
 
     "for debugging - leave c intermediate"
     STCKeepCIntermediate == true ifTrue:[
-	command := stcPath , ' ' , flags , ' -C ' , stFileName.
-	'executing: ' infoPrint. command infoPrintNL.
-	OperatingSystem executeCommand:command
+        command := stcPath , ' ' , flags , ' -C ' , stFileName.
+        'executing: ' infoPrint. command infoPrintNL.
+        OperatingSystem executeCommand:command
     ].
 
     oFileName asFilename exists ifTrue:[
-	ok ifFalse:[
-	    'oops - system says it failed - but o-file is there ...' infoPrintNL.
-	    ok := true
-	]
+        ok ifFalse:[
+            'oops - system says it failed - but o-file is there ...' infoPrintNL.
+            ok := true
+        ]
     ] ifFalse:[
-	ok := false
+        ok := false
     ].
 
     ok ifFalse:[
-	status >= 16r200 ifTrue:[
-	    errorStream := 'errorOutput' asFilename readStream.
-	    errorStream notNil ifTrue:[
-		errorMessages := errorStream contents.
-		errorMessages notNil ifTrue:[
-		    errorMessages := errorMessages asStringCollection.
-		    errorMessages size > 20 ifTrue:[
-			errorMessages := (errorMessages copyTo:20) copyWith:'... more messages skipped'
-		    ].
+        status >= 16r200 ifTrue:[
+            errorStream := 'errorOutput' asFilename readStream.
+            errorStream notNil ifTrue:[
+                errorMessages := errorStream contents.
+                errorMessages notNil ifTrue:[
+                    errorMessages := errorMessages asStringCollection.
+                    errorMessages size > 20 ifTrue:[
+                        errorMessages := (errorMessages copyTo:20) copyWith:'... more messages skipped'
+                    ].
 "/                    errorMessages := errorMessages collect:[:line |
 "/                        (line startsWith:(stFileName , ':')) ifTrue:[
 "/                            'Line: ' , (line copyFrom:(stFileName size + 2))
@@ -1918,27 +1921,27 @@
 "/                            line
 "/                        ]
 "/                      ].
-		    errorMessages := errorMessages asString
-		].
-	    ].
-	    errorMessages isNil ifTrue:[
-		errorMessages := ''
-	    ].
-	    eMsg := ('STC / CC error during compilation:\\',errorMessages) withCRs.
-	] ifFalse:[
-	    eMsg := 'oops, no STC - cannot create machine code'
-	].
-	'errorOutput' asFilename remove.
-	self parseError:eMsg position:1.
-	OperatingSystem removeFile:stFileName.
-	^ #Error
+                    errorMessages := errorMessages asString
+                ].
+            ].
+            errorMessages isNil ifTrue:[
+                errorMessages := ''
+            ].
+            eMsg := ('STC / CC error during compilation:\\',errorMessages) withCRs.
+        ] ifFalse:[
+            eMsg := 'oops, no STC - cannot create machine code'
+        ].
+        'errorOutput' asFilename remove.
+        self parseError:eMsg position:1.
+        OperatingSystem removeFile:stFileName.
+        ^ #Error
     ].
 
     (ObjectFileLoader notNil 
     and:[ObjectFileLoader canLoadObjectFiles]) ifFalse:[
-	self parseError:'no dynamic load configured - cannot load machine code' position:1.
-	OperatingSystem removeFile:stFileName.
-	^ #CannotLoad
+        self parseError:'no dynamic load configured - cannot load machine code' position:1.
+        OperatingSystem removeFile:stFileName.
+        ^ #CannotLoad
     ].
 
     oFileName := ObjectFileLoader createLoadableObjectFor:initName.
@@ -1948,80 +1951,80 @@
     "
     handle := ObjectFileLoader loadDynamicObject:oFileName.
     handle isNil ifTrue:[
-	OperatingSystem removeFile:stFileName.
-	OperatingSystem removeFile:oFileName.
-	self parseError:'dynamic load failed - cannot create machine code' position:1.
-	^ #CannotLoad
+        OperatingSystem removeFile:stFileName.
+        OperatingSystem removeFile:oFileName.
+        self parseError:'dynamic load failed - cannot create machine code' position:1.
+        ^ #CannotLoad
     ].
 "/    ('handle is ' , handle printString) infoPrintNL.
 
     address := ObjectFileLoader getFunction:'__' , initName , '_Init' from:handle.
     address isNil ifTrue:[
-	address := ObjectFileLoader getFunction:'_' , initName , '_Init' from:handle.
-	address isNil ifTrue:[
-	    (ObjectFileLoader getListOfUndefinedSymbolsFrom:handle) size > 0 ifTrue:[
-		ObjectFileLoader listUndefinedSymbolsIn:handle.
-		eMsg := 'undefined symbols in primitive code'.
-	    ] ifFalse:[
-		eMsg := initName , '_Init() lookup failed'
-	    ].
+        address := ObjectFileLoader getFunction:'_' , initName , '_Init' from:handle.
+        address isNil ifTrue:[
+            (ObjectFileLoader getListOfUndefinedSymbolsFrom:handle) size > 0 ifTrue:[
+                ObjectFileLoader listUndefinedSymbolsIn:handle.
+                eMsg := 'undefined symbols in primitive code'.
+            ] ifFalse:[
+                eMsg := initName , '_Init() lookup failed'
+            ].
 
-	    ObjectFileLoader unloadDynamicObject:handle.
+            ObjectFileLoader unloadDynamicObject:handle.
 
-	    OperatingSystem removeFile:stFileName.
-	    OperatingSystem removeFile:oFileName.
-	    self parseError:(eMsg , ' - cannot create machine code') position:1.
-	    ^ #CannotLoad
-	]
+            OperatingSystem removeFile:stFileName.
+            OperatingSystem removeFile:oFileName.
+            self parseError:(eMsg , ' - cannot create machine code') position:1.
+            ^ #CannotLoad
+        ]
     ].
 
 "/    ('init at ' , address printString) infoPrintNL.
 
     m := ObjectFileLoader 
-	callInitFunctionAt:address 
-	specialInit:true
-	forceOld:true 
-	interruptable:false
-	argument:2
-	identifyAs:handle
-	returnsObject:true.
+        callInitFunctionAt:address 
+        specialInit:true
+        forceOld:true 
+        interruptable:false
+        argument:2
+        identifyAs:handle
+        returnsObject:true.
 
     "
      did it work ?
     "
     newMethod := aClass compiledMethodAt:selector.
     newMethod notNil ifTrue:[
-	m ~~ newMethod ifTrue:[
-	    'BCOMPILER: oops - loaded method installed itself elsewhere' errorPrintNL.
-	].
+        m ~~ newMethod ifTrue:[
+            'BCOMPILER: oops - loaded method installed itself elsewhere' errorPrintNL.
+        ].
 
-	newMethod source:aString.
-	Project notNil ifTrue:[
-	    newMethod package:(Project currentPackageName)
-	].
+        newMethod source:aString.
+        Project notNil ifTrue:[
+            newMethod package:(Project currentPackageName)
+        ].
 
 "/        aClass updateRevisionString.
-	aClass addChangeRecordForMethod:newMethod.
-	(silent or:[Smalltalk silentLoading == true]) ifFalse:[
-	    Transcript showCr:('    compiled: ', className,' ',selector,' - machine code')
-	].
-	ObjectMemory flushCaches.
+        aClass addChangeRecordForMethod:newMethod.
+        (silent or:[Smalltalk silentLoading == true]) ifFalse:[
+            Transcript showCr:('    compiled: ', className,' ',selector,' - machine code')
+        ].
+        ObjectMemory flushCaches.
 
-	OperatingSystem removeFile:stFileName.
+        OperatingSystem removeFile:stFileName.
 
-	handle method:newMethod.
+        handle method:newMethod.
 
-	"/ check for obsolete loaded objects and unload them
+        "/ check for obsolete loaded objects and unload them
 
-	ObjectFileLoader loadedObjectHandlesDo:[:anotherHandle |
-	    anotherHandle isMethodHandle ifTrue:[
-		anotherHandle method isNil ifTrue:[
-		    ObjectFileLoader unloadObjectFile:anotherHandle pathName.
-		    OperatingSystem removeFile:anotherHandle pathName.
-		]
-	    ]
-	].
-	^ newMethod.
+        ObjectFileLoader loadedObjectHandlesDo:[:anotherHandle |
+            anotherHandle isMethodHandle ifTrue:[
+                anotherHandle method isNil ifTrue:[
+                    ObjectFileLoader unloadObjectFile:anotherHandle pathName.
+                    OperatingSystem removeFile:anotherHandle pathName.
+                ]
+            ]
+        ].
+        ^ newMethod.
     ].
 
     OperatingSystem removeFile:stFileName.
@@ -2033,40 +2036,40 @@
      |m|
 
      Object subclass:#Test
-	    instanceVariableNames:''
-	    classVariableNames:''
-	    poolDictionaries:''
-	    category:'tests'.
+            instanceVariableNames:''
+            classVariableNames:''
+            poolDictionaries:''
+            category:'tests'.
      m := ByteCodeCompiler
-	    compile:'foo ^ ''hello'''
-	    forClass:Test
-	    inCategory:'tests'
-	    notifying:nil
-	    install:false
-	    skipIfSame:false.
+            compile:'foo ^ ''hello'''
+            forClass:Test
+            inCategory:'tests'
+            notifying:nil
+            install:false
+            skipIfSame:false.
      m inspect
     "
     "
      |m|
 
      Object subclass:#Test
-	    instanceVariableNames:''
-	    classVariableNames:''
-	    poolDictionaries:''
-	    category:'tests'.
+            instanceVariableNames:''
+            classVariableNames:''
+            poolDictionaries:''
+            category:'tests'.
      m := ByteCodeCompiler
-	    compileToMachineCode:'foo %{ RETURN (_MKSMALLINT(1)); %}'
-	    forClass:Test
-	    inCategory:'tests'
-	    notifying:nil
-	    install:false
-	    skipIfSame:false
-	    silent:false.
+            compileToMachineCode:'foo %{ RETURN (_MKSMALLINT(1)); %}'
+            forClass:Test
+            inCategory:'tests'
+            notifying:nil
+            install:false
+            skipIfSame:false
+            silent:false.
      m inspect
     "
 
     "Modified: 14.9.1995 / 22:33:04 / claus"
-    "Modified: 17.12.1995 / 16:03:18 / cg"
+    "Modified: 26.2.1996 / 15:34:41 / cg"
 !
 
 createLoadableObjectFor:baseFileName
@@ -2137,6 +2140,6 @@
 !ByteCodeCompiler class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libcomp/Attic/BCompiler.st,v 1.66 1996-02-10 18:33:10 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libcomp/Attic/BCompiler.st,v 1.67 1996-02-26 14:40:15 cg Exp $'
 ! !
 ByteCodeCompiler initialize!
--- a/ByteCodeCompiler.st	Sat Feb 24 20:36:24 1996 +0100
+++ b/ByteCodeCompiler.st	Mon Feb 26 15:40:15 1996 +0100
@@ -1795,7 +1795,7 @@
 !ByteCodeCompiler methodsFor:'machine code generation'!
 
 compileToMachineCode:aString forClass:aClass inCategory:cat 
-			     notifying:requestor 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
@@ -1804,17 +1804,17 @@
 
     |stFileName stream handle address flags command oFileName 
      initName newMethod ok status className sep class stcPath 
-     errorStream errorMessages eMsg m|
+     errorStream errorMessages eMsg m supers|
 
     ObjectFileLoader isNil ifTrue:[^ #CannotLoad].
     STCCompilation == #never ifTrue:[^ #CannotLoad].
     (stcPath := self class incrementalStcPath) isNil ifTrue:[
-	self parseError:'no stc compiler available - cannot create machine code' position:1.
-	^ #CannotLoad
+        self parseError:'no stc compiler available - cannot create machine code' position:1.
+        ^ #CannotLoad
     ].
 
     SequenceNumber isNil ifTrue:[
-	SequenceNumber := 0.
+        SequenceNumber := 0.
     ].
     SequenceNumber := SequenceNumber + 1.
 
@@ -1822,23 +1822,26 @@
     stFileName := initName , '.st'. 
     stream := stFileName asFilename writeStream.
     stream isNil ifTrue:[
-	self parseError:'cannot create temporary sourcefile for compilation'.
-	^ #CannotLoad
+        self parseError:'cannot create temporary sourcefile for compilation'.
+        ^ #CannotLoad
     ].
     sep := stream class chunkSeparator.
 
     class := aClass.
     class isMeta ifTrue:[
-	class := aClass soleInstance
+        class := aClass soleInstance
     ].
-    class allSuperclasses reverseDo:[:cls|
-	cls ~~ Object ifTrue:[
-	    cls isLoaded ifFalse:[
-		^ #CannotLoad
-	    ].
-	    cls fileOutDefinitionOn:stream.
-	    stream nextPut:sep; cr.
-	]
+    supers := aClass allSuperclasses.
+    supers notNil ifTrue:[
+        supers reverseDo:[:cls|
+            cls ~~ Object ifTrue:[
+                cls isLoaded ifFalse:[
+                    ^ #CannotLoad
+                ].
+                cls fileOutDefinitionOn:stream.
+                stream nextPut:sep; cr.
+            ]
+        ]
     ].
     class fileOutDefinitionOn:stream.
     stream nextPut:sep; cr.
@@ -1849,9 +1852,9 @@
     className := aClass name.
 
     aClass isMeta ifTrue:[
-	stream nextPutAll:(className copyTo:(className size - 5)); nextPutAll:' class'.
+        stream nextPutAll:(className copyTo:(className size - 5)); nextPutAll:' class'.
     ] ifFalse:[
-	stream nextPutAll:className.
+        stream nextPutAll:className.
     ].
     stream nextPutAll:' methodsFor:'''; nextPutAll:cat; nextPutAll:''''.
     stream nextPut:sep.
@@ -1870,13 +1873,13 @@
 
     flags := '-commonSymbols +sharedLibCode +newIncremental -E:errorOutput -N' , initName .
     STCCompilationDefines notNil ifTrue:[
-	flags := STCCompilationDefines , ' ' , flags
+        flags := STCCompilationDefines , ' ' , flags
     ].
     STCCompilationIncludes notNil ifTrue:[
-	flags := STCCompilationIncludes , ' ' , flags
+        flags := STCCompilationIncludes , ' ' , flags
     ].
     STCCompilationOptions notNil ifTrue:[
-	flags := STCCompilationOptions , ' ' , flags
+        flags := STCCompilationOptions , ' ' , flags
     ].
 
     command := stcPath , ' ' , flags , ' -c ' , stFileName.
@@ -1887,30 +1890,30 @@
 
     "for debugging - leave c intermediate"
     STCKeepCIntermediate == true ifTrue:[
-	command := stcPath , ' ' , flags , ' -C ' , stFileName.
-	'executing: ' infoPrint. command infoPrintNL.
-	OperatingSystem executeCommand:command
+        command := stcPath , ' ' , flags , ' -C ' , stFileName.
+        'executing: ' infoPrint. command infoPrintNL.
+        OperatingSystem executeCommand:command
     ].
 
     oFileName asFilename exists ifTrue:[
-	ok ifFalse:[
-	    'oops - system says it failed - but o-file is there ...' infoPrintNL.
-	    ok := true
-	]
+        ok ifFalse:[
+            'oops - system says it failed - but o-file is there ...' infoPrintNL.
+            ok := true
+        ]
     ] ifFalse:[
-	ok := false
+        ok := false
     ].
 
     ok ifFalse:[
-	status >= 16r200 ifTrue:[
-	    errorStream := 'errorOutput' asFilename readStream.
-	    errorStream notNil ifTrue:[
-		errorMessages := errorStream contents.
-		errorMessages notNil ifTrue:[
-		    errorMessages := errorMessages asStringCollection.
-		    errorMessages size > 20 ifTrue:[
-			errorMessages := (errorMessages copyTo:20) copyWith:'... more messages skipped'
-		    ].
+        status >= 16r200 ifTrue:[
+            errorStream := 'errorOutput' asFilename readStream.
+            errorStream notNil ifTrue:[
+                errorMessages := errorStream contents.
+                errorMessages notNil ifTrue:[
+                    errorMessages := errorMessages asStringCollection.
+                    errorMessages size > 20 ifTrue:[
+                        errorMessages := (errorMessages copyTo:20) copyWith:'... more messages skipped'
+                    ].
 "/                    errorMessages := errorMessages collect:[:line |
 "/                        (line startsWith:(stFileName , ':')) ifTrue:[
 "/                            'Line: ' , (line copyFrom:(stFileName size + 2))
@@ -1918,27 +1921,27 @@
 "/                            line
 "/                        ]
 "/                      ].
-		    errorMessages := errorMessages asString
-		].
-	    ].
-	    errorMessages isNil ifTrue:[
-		errorMessages := ''
-	    ].
-	    eMsg := ('STC / CC error during compilation:\\',errorMessages) withCRs.
-	] ifFalse:[
-	    eMsg := 'oops, no STC - cannot create machine code'
-	].
-	'errorOutput' asFilename remove.
-	self parseError:eMsg position:1.
-	OperatingSystem removeFile:stFileName.
-	^ #Error
+                    errorMessages := errorMessages asString
+                ].
+            ].
+            errorMessages isNil ifTrue:[
+                errorMessages := ''
+            ].
+            eMsg := ('STC / CC error during compilation:\\',errorMessages) withCRs.
+        ] ifFalse:[
+            eMsg := 'oops, no STC - cannot create machine code'
+        ].
+        'errorOutput' asFilename remove.
+        self parseError:eMsg position:1.
+        OperatingSystem removeFile:stFileName.
+        ^ #Error
     ].
 
     (ObjectFileLoader notNil 
     and:[ObjectFileLoader canLoadObjectFiles]) ifFalse:[
-	self parseError:'no dynamic load configured - cannot load machine code' position:1.
-	OperatingSystem removeFile:stFileName.
-	^ #CannotLoad
+        self parseError:'no dynamic load configured - cannot load machine code' position:1.
+        OperatingSystem removeFile:stFileName.
+        ^ #CannotLoad
     ].
 
     oFileName := ObjectFileLoader createLoadableObjectFor:initName.
@@ -1948,80 +1951,80 @@
     "
     handle := ObjectFileLoader loadDynamicObject:oFileName.
     handle isNil ifTrue:[
-	OperatingSystem removeFile:stFileName.
-	OperatingSystem removeFile:oFileName.
-	self parseError:'dynamic load failed - cannot create machine code' position:1.
-	^ #CannotLoad
+        OperatingSystem removeFile:stFileName.
+        OperatingSystem removeFile:oFileName.
+        self parseError:'dynamic load failed - cannot create machine code' position:1.
+        ^ #CannotLoad
     ].
 "/    ('handle is ' , handle printString) infoPrintNL.
 
     address := ObjectFileLoader getFunction:'__' , initName , '_Init' from:handle.
     address isNil ifTrue:[
-	address := ObjectFileLoader getFunction:'_' , initName , '_Init' from:handle.
-	address isNil ifTrue:[
-	    (ObjectFileLoader getListOfUndefinedSymbolsFrom:handle) size > 0 ifTrue:[
-		ObjectFileLoader listUndefinedSymbolsIn:handle.
-		eMsg := 'undefined symbols in primitive code'.
-	    ] ifFalse:[
-		eMsg := initName , '_Init() lookup failed'
-	    ].
+        address := ObjectFileLoader getFunction:'_' , initName , '_Init' from:handle.
+        address isNil ifTrue:[
+            (ObjectFileLoader getListOfUndefinedSymbolsFrom:handle) size > 0 ifTrue:[
+                ObjectFileLoader listUndefinedSymbolsIn:handle.
+                eMsg := 'undefined symbols in primitive code'.
+            ] ifFalse:[
+                eMsg := initName , '_Init() lookup failed'
+            ].
 
-	    ObjectFileLoader unloadDynamicObject:handle.
+            ObjectFileLoader unloadDynamicObject:handle.
 
-	    OperatingSystem removeFile:stFileName.
-	    OperatingSystem removeFile:oFileName.
-	    self parseError:(eMsg , ' - cannot create machine code') position:1.
-	    ^ #CannotLoad
-	]
+            OperatingSystem removeFile:stFileName.
+            OperatingSystem removeFile:oFileName.
+            self parseError:(eMsg , ' - cannot create machine code') position:1.
+            ^ #CannotLoad
+        ]
     ].
 
 "/    ('init at ' , address printString) infoPrintNL.
 
     m := ObjectFileLoader 
-	callInitFunctionAt:address 
-	specialInit:true
-	forceOld:true 
-	interruptable:false
-	argument:2
-	identifyAs:handle
-	returnsObject:true.
+        callInitFunctionAt:address 
+        specialInit:true
+        forceOld:true 
+        interruptable:false
+        argument:2
+        identifyAs:handle
+        returnsObject:true.
 
     "
      did it work ?
     "
     newMethod := aClass compiledMethodAt:selector.
     newMethod notNil ifTrue:[
-	m ~~ newMethod ifTrue:[
-	    'BCOMPILER: oops - loaded method installed itself elsewhere' errorPrintNL.
-	].
+        m ~~ newMethod ifTrue:[
+            'BCOMPILER: oops - loaded method installed itself elsewhere' errorPrintNL.
+        ].
 
-	newMethod source:aString.
-	Project notNil ifTrue:[
-	    newMethod package:(Project currentPackageName)
-	].
+        newMethod source:aString.
+        Project notNil ifTrue:[
+            newMethod package:(Project currentPackageName)
+        ].
 
 "/        aClass updateRevisionString.
-	aClass addChangeRecordForMethod:newMethod.
-	(silent or:[Smalltalk silentLoading == true]) ifFalse:[
-	    Transcript showCr:('    compiled: ', className,' ',selector,' - machine code')
-	].
-	ObjectMemory flushCaches.
+        aClass addChangeRecordForMethod:newMethod.
+        (silent or:[Smalltalk silentLoading == true]) ifFalse:[
+            Transcript showCr:('    compiled: ', className,' ',selector,' - machine code')
+        ].
+        ObjectMemory flushCaches.
 
-	OperatingSystem removeFile:stFileName.
+        OperatingSystem removeFile:stFileName.
 
-	handle method:newMethod.
+        handle method:newMethod.
 
-	"/ check for obsolete loaded objects and unload them
+        "/ check for obsolete loaded objects and unload them
 
-	ObjectFileLoader loadedObjectHandlesDo:[:anotherHandle |
-	    anotherHandle isMethodHandle ifTrue:[
-		anotherHandle method isNil ifTrue:[
-		    ObjectFileLoader unloadObjectFile:anotherHandle pathName.
-		    OperatingSystem removeFile:anotherHandle pathName.
-		]
-	    ]
-	].
-	^ newMethod.
+        ObjectFileLoader loadedObjectHandlesDo:[:anotherHandle |
+            anotherHandle isMethodHandle ifTrue:[
+                anotherHandle method isNil ifTrue:[
+                    ObjectFileLoader unloadObjectFile:anotherHandle pathName.
+                    OperatingSystem removeFile:anotherHandle pathName.
+                ]
+            ]
+        ].
+        ^ newMethod.
     ].
 
     OperatingSystem removeFile:stFileName.
@@ -2033,40 +2036,40 @@
      |m|
 
      Object subclass:#Test
-	    instanceVariableNames:''
-	    classVariableNames:''
-	    poolDictionaries:''
-	    category:'tests'.
+            instanceVariableNames:''
+            classVariableNames:''
+            poolDictionaries:''
+            category:'tests'.
      m := ByteCodeCompiler
-	    compile:'foo ^ ''hello'''
-	    forClass:Test
-	    inCategory:'tests'
-	    notifying:nil
-	    install:false
-	    skipIfSame:false.
+            compile:'foo ^ ''hello'''
+            forClass:Test
+            inCategory:'tests'
+            notifying:nil
+            install:false
+            skipIfSame:false.
      m inspect
     "
     "
      |m|
 
      Object subclass:#Test
-	    instanceVariableNames:''
-	    classVariableNames:''
-	    poolDictionaries:''
-	    category:'tests'.
+            instanceVariableNames:''
+            classVariableNames:''
+            poolDictionaries:''
+            category:'tests'.
      m := ByteCodeCompiler
-	    compileToMachineCode:'foo %{ RETURN (_MKSMALLINT(1)); %}'
-	    forClass:Test
-	    inCategory:'tests'
-	    notifying:nil
-	    install:false
-	    skipIfSame:false
-	    silent:false.
+            compileToMachineCode:'foo %{ RETURN (_MKSMALLINT(1)); %}'
+            forClass:Test
+            inCategory:'tests'
+            notifying:nil
+            install:false
+            skipIfSame:false
+            silent:false.
      m inspect
     "
 
     "Modified: 14.9.1995 / 22:33:04 / claus"
-    "Modified: 17.12.1995 / 16:03:18 / cg"
+    "Modified: 26.2.1996 / 15:34:41 / cg"
 !
 
 createLoadableObjectFor:baseFileName
@@ -2137,6 +2140,6 @@
 !ByteCodeCompiler class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libcomp/ByteCodeCompiler.st,v 1.66 1996-02-10 18:33:10 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libcomp/ByteCodeCompiler.st,v 1.67 1996-02-26 14:40:15 cg Exp $'
 ! !
 ByteCodeCompiler initialize!