BCompiler.st
changeset 118 c9f4955e6cfd
parent 117 3736a828cb50
child 120 13f0112a469a
--- a/BCompiler.st	Thu Sep 07 14:07:16 1995 +0200
+++ b/BCompiler.st	Tue Sep 12 12:46:13 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.38 1995-09-07 12:06:30 claus Exp $
+$Header: /cvs/stx/stx/libcomp/Attic/BCompiler.st,v 1.39 1995-09-12 10:45:39 claus Exp $
 '!
 
 !ByteCodeCompiler class methodsFor:'documentation'!
@@ -47,7 +47,7 @@
 
 version
 "
-$Header: /cvs/stx/stx/libcomp/Attic/BCompiler.st,v 1.38 1995-09-07 12:06:30 claus Exp $
+$Header: /cvs/stx/stx/libcomp/Attic/BCompiler.st,v 1.39 1995-09-12 10:45:39 claus Exp $
 "
 !
 
@@ -319,6 +319,7 @@
 	    install ifTrue:[
 		aClass addSelector:sel withMethod:newMethod
 	    ].
+	    Transcript show:'*** '.
 	    sel notNil ifTrue:[
 		Transcript show:(sel ,' ')
 	    ].
@@ -530,8 +531,10 @@
 
 canCreateMachineCode
     "return true, if compilation to machine code is supported.
-     Currently, all SYSV4 and Linux systems do so
-     (due to the need for dynamic loading of object files).
+     Currently, all SYSV4 and Linux systems do so;
+     REAL/IX, AIX and HPUX do not (due to the need for dynamic loading 
+     of object files, which is not supported by those).
+     MIPS ULTRIX is almost finished, but not yet released.
 
      However, if no compiler is around (i.e. the demo distribution),
      there is no chance ..."
@@ -539,18 +542,10 @@
     |canDo|
 
     ObjectFileLoader isNil ifTrue:[^ false].
+    ObjectFileLoader canLoadObjectFiles ifFalse:[^ false].
 
-    canDo := false.
-    OperatingSystem getSystemType = 'iris' ifTrue:[
-	canDo := true.
-    ].
-    OperatingSystem getSystemType = 'linux' ifTrue:[
-	canDo := true.
-    ].
-    canDo ifTrue:[
-	^ self stcPath notNil
-    ].
-    ^ false
+    "/ no chance, if no stc is available
+    ^ self stcPath notNil
 
     "
      Compiler canCreateMachineCode     
@@ -1542,10 +1537,7 @@
      initName newMethod ok status className sep class stcPath|
 
     STCCompilation == #never ifTrue:[^ #Error].
-    stcPath := self class stcPath.
-    stcPath isNil ifTrue:[
-	^ #Error
-    ].
+    (stcPath := self class stcPath) isNil ifTrue:[^ #Error].
 
     SequenceNumber isNil ifTrue:[
 	SequenceNumber := 0.
@@ -1640,7 +1632,7 @@
 	status >= 16r200 ifTrue:[
 	    self parseError:'STC error during compilation' position:1.
 	] ifFalse:[
-	    self parseError:'oops, no STC - cannot compile primitive code' position:1.
+	    self parseError:'oops, no STC - cannot create machine code' position:1.
 	].
 	^ #Error
     ].
@@ -1666,7 +1658,7 @@
     ].
 
     ObjectFileLoader isNil ifTrue:[
-	self parseError:'no dynamic load configured - cannot compile primitive code' position:1.
+	self parseError:'no dynamic load configured - cannot create machine code' position:1.
 	^ #Error
     ].
 "/ ObjectFileLoader verbose:true.
@@ -1676,7 +1668,7 @@
     "
     handle := ObjectFileLoader loadDynamicObject:oFileName.
     handle isNil ifTrue:[
-	self parseError:'dynamic load failed - cannot compile primitive code' position:1.
+	self parseError:'dynamic load failed - cannot create machine code' position:1.
 	^ #Error
     ].
 "/    ('handle is ' , handle printString) printNL.
@@ -1685,7 +1677,7 @@
     address isNil ifTrue:[
 	address := ObjectFileLoader getFunction:'_' , initName , '_Init' from:handle.
 	address isNil ifTrue:[
-	    self parseError:initName , '_Init() lookup failed - cannot compile primitive code' position:1.
+	    self parseError:initName , '_Init() lookup failed - cannot create machine code' position:1.
 	    ^ #Error
 	]
     ].