--- a/BCompiler.st Tue Jun 06 06:04:36 1995 +0200
+++ b/BCompiler.st Tue Jun 27 04:17:58 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.24 1995-06-06 04:03:50 claus Exp $
+$Header: /cvs/stx/stx/libcomp/Attic/BCompiler.st,v 1.25 1995-06-27 02:16:55 claus Exp $
'!
!ByteCodeCompiler class methodsFor:'documentation'!
@@ -47,7 +47,7 @@
version
"
-$Header: /cvs/stx/stx/libcomp/Attic/BCompiler.st,v 1.24 1995-06-06 04:03:50 claus Exp $
+$Header: /cvs/stx/stx/libcomp/Attic/BCompiler.st,v 1.25 1995-06-27 02:16:55 claus Exp $
"
!
@@ -404,7 +404,7 @@
stcCompilationFlags:aString
"define the flags (for example, additional -D defines or
- -I includes to be used when compiling to machine code.
+ -I includes to be used when compiling to machine code).
These are passed to stc.
This can be set from your private.rc file."
@@ -544,7 +544,7 @@
maxStackDepth := 0.
codeBytes := ByteArray uninitializedNew:codeSize.
- relocInfo := Array new:(codeSize + 1).
+ relocInfo := Array basicNew:(codeSize + 1).
symIndex := 1.
codeIndex := 1.
@@ -595,7 +595,7 @@
].
"move that literal to the front"
('COMPILER: move literal', (litArray at:index) , ' to front') infoPrintNL.
- t := Array new:litArray size.
+ t := Array basicNew:litArray size.
t replaceFrom:2 to:index - 1 with:litArray startingAt:1.
t replaceFrom:index with:litArray startingAt:index+1.
t at:1 put:(litArray at:index).
@@ -1371,7 +1371,9 @@
For a description of the arguments, see compile:forClass....."
|stFileName stream handle address flags command oFileName soFileName
- initName newMethod ok status|
+ initName newMethod ok status className sep|
+
+ sep := stream class chunkSeparator.
SequenceNumber isNil ifTrue:[
SequenceNumber := 0.
@@ -1385,29 +1387,31 @@
aClass allSuperclasses reverseDo:[:cls|
cls ~~ Object ifTrue:[
cls fileOutDefinitionOn:stream.
- stream nextPut:(stream class chunkSeparator); cr.
+ stream nextPut:sep; cr.
]
].
aClass fileOutDefinitionOn:stream.
- stream nextPut:(stream class chunkSeparator); cr.
+ stream nextPut:sep; cr.
aClass fileOutPrimitiveDefinitionsOn:stream.
- stream nextPut:(stream class chunkSeparator).
+ stream nextPut:sep.
+ className := aClass name.
+
aClass isMeta ifTrue:[
- stream nextPutAll:(aClass name copyTo:(aClass name size - 5)), ' class methodsFor:''' , cat , ''''.
+ stream nextPutAll:(className copyTo:(className size - 5)); nextPutAll:' class'.
] ifFalse:[
- stream nextPutAll:aClass name , ' methodsFor:''' , cat , ''''.
+ stream nextPutAll:className.
].
- stream nextPut:(stream class chunkSeparator).
+ stream nextPutAll:' methodsFor:'''; nextPutAll:cat; nextPutAll:''''.
+ stream nextPut:sep.
stream cr.
stream nextPutAll:'"{ Line: 1 }"'; cr.
stream nextPutAll:aString.
- stream nextPut:(stream class chunkSeparator).
- stream space.
- stream nextPut:(stream class chunkSeparator).
+ stream nextPut:sep; space; nextPut:sep.
+
stream close.
"
@@ -1509,12 +1513,12 @@
"
did it work ?
"
- newMethod := aClass compiledMethodAt:self selector.
+ newMethod := aClass compiledMethodAt:selector.
newMethod notNil ifTrue:[
newMethod source:aString.
aClass addChangeRecordForMethod:newMethod.
(silent or:[Smalltalk silentLoading == true]) ifFalse:[
- Transcript showCr:(' compiled: ', aClass name,' ',self selector,' - machine code')
+ Transcript showCr:(' compiled: ', className,' ',selector,' - machine code')
].
^ newMethod.
].