"/
"/ $Header$
"/
"/ bytecode compiler frontend for smalltalk
"/
"/ load the files, save binary versions
|args|
args := Smalltalk commandLineArguments.
args do:[:arg |
|inFile outFile baseName className class|
(arg startsWith:'-') ifFalse:[
inFile := arg asFilename.
('loading ' , inFile name , ' ...') errorPrintCR.
Object errorSignal handle:[:ex |
'error while loading: ' errorPrint. ex errorString errorPrintCR.
] do:[
Smalltalk fileIn:inFile name.
].
('done loading') errorPrintCR.
baseName := inFile withoutSuffix.
className := baseName baseName.
outFile := baseName construct:'.cls'.
className := Smalltalk classNameForFile:className.
class := Smalltalk classNamed:className.
class notNil ifTrue:[
('saving ' , class name , ' ...') errorPrintCR.
class binaryFileOutWithSourceMode:#reference
] ifFalse:[
('no class for ' , className) errorPrintCR
]
]
].
!
Smalltalk exit.
!