634 aClass allSuperclasses reverseDo:defineAction. |
634 aClass allSuperclasses reverseDo:defineAction. |
635 defineAction value:aClass. |
635 defineAction value:aClass. |
636 ! |
636 ! |
637 |
637 |
638 generateSTSource:aString |
638 generateSTSource:aString |
639 |stream definedClasses sep className| |
639 |stream definedClasses sep className modulesParentDir modulesDir| |
640 |
640 |
641 "/ generate a unique name, consisting of my processID and a sequence number |
641 "/ generate a unique name, consisting of my processID and a sequence number |
642 "/ the processId is added to allow filein of modules from different |
642 "/ the processId is added to allow filein of modules from different |
643 "/ lifes |
643 "/ lifes |
644 |
644 |
645 SequenceNumber := (SequenceNumber ? 0) + 1. |
645 SequenceNumber := (SequenceNumber ? 0) + 1. |
646 |
646 |
647 initName := 'm_' , OperatingSystem getProcessId printString, '_' , SequenceNumber printString. |
647 initName := 'm_' , OperatingSystem getProcessId printString, '_' , SequenceNumber printString. |
648 |
648 |
649 stFileName := (Filename currentDirectory construct:(initName , '.st')) name. |
649 "/ Smalltalk isSmalltalkDevelopmentSystem ifTrue:[ |
|
650 "/ modulesParentDir := Filename currentDirectory. |
|
651 "/ ] ifFalse:[ |
|
652 "/ modulesParentDir := Filename tempDirectory. |
|
653 "/ ]. |
|
654 "/ modulesDir := modulesParentDir construct:'modules'. |
|
655 modulesDir := ParserFlags stcModulePath. |
|
656 stFileName := (modulesDir construct:(initName , '.st')) name. |
|
657 |
650 [ |
658 [ |
651 stream := stFileName asFilename writeStream. |
659 stream := stFileName asFilename writeStream. |
652 ] on:FileStream openErrorSignal do:[:ex| |
660 ] on:FileStream openErrorSignal do:[:ex| |
653 originator parseError:'cannot create temporary sourcefile for compilation'. |
661 originator parseError:'cannot create temporary sourcefile for compilation'. |
654 ^ #CannotLoad |
662 ^ #CannotLoad |
835 ! ! |
843 ! ! |
836 |
844 |
837 !STCCompilerInterface class methodsFor:'documentation'! |
845 !STCCompilerInterface class methodsFor:'documentation'! |
838 |
846 |
839 version |
847 version |
840 ^ '$Header: /cvs/stx/stx/libcomp/STCCompilerInterface.st,v 1.20 2011-08-08 21:03:12 cg Exp $' |
848 ^ '$Header: /cvs/stx/stx/libcomp/STCCompilerInterface.st,v 1.21 2011-08-08 21:23:42 cg Exp $' |
841 ! |
849 ! |
842 |
850 |
843 version_CVS |
851 version_CVS |
844 ^ '$Header: /cvs/stx/stx/libcomp/STCCompilerInterface.st,v 1.20 2011-08-08 21:03:12 cg Exp $' |
852 ^ '$Header: /cvs/stx/stx/libcomp/STCCompilerInterface.st,v 1.21 2011-08-08 21:23:42 cg Exp $' |
845 ! ! |
853 ! ! |
846 |
854 |
847 STCCompilerInterface initialize! |
855 STCCompilerInterface initialize! |