sourceMode & foldConstant settings
authorClaus Gittinger <cg@exept.de>
Fri, 09 Feb 1996 18:43:20 +0100
changeset 359 26ce81391dbb
parent 358 a7546792f073
child 360 5347e1bfae74
sourceMode & foldConstant settings
Launcher.st
--- a/Launcher.st	Fri Feb 09 17:13:01 1996 +0100
+++ b/Launcher.st	Fri Feb 09 18:43:20 1996 +0100
@@ -598,7 +598,8 @@
     |box warnings warnSTX warnUnderscore warnOldStyle allowUnderscore immutableArrays
      warnSTXBox warnUnderscoreBox warnOldStyleBox 
      stcCompilation compilationList stcCompilationOptions stcIncludes stcDefines stcOptions
-     stcLibraries historyLines catchRedefs 
+     stcLibraries historyLines sourceMode catchRedefs keepSourceOptions keepSource keepSourceList 
+     foldConstants
      warnEnabler check y component oldIndent|
 
     warnings := Compiler warnings asValue.
@@ -608,35 +609,42 @@
     warnOldStyle := Compiler warnOldStyleAssignment asValue.
     allowUnderscore := Compiler allowUnderscoreInIdentifier asValue.
     immutableArrays := Compiler arraysAreImmutable asValue.
+    foldConstants := Compiler foldConstants asValue.
+
     stcCompilationOptions := #( always default never).
     stcCompilation := SelectionInList new list:(resources array:#('always' 'primitive code only' 'never')).
     stcCompilation selectionIndex:2.
+
     stcIncludes := Compiler stcCompilationIncludes asValue.
     stcDefines := Compiler stcCompilationDefines asValue.
     stcOptions := Compiler stcCompilationOptions asValue.
     ObjectFileLoader notNil ifTrue:[
-	stcLibraries := (String fromStringCollection:ObjectFileLoader searchedLibraries separatedBy:' ') asValue.
+        stcLibraries := (String fromStringCollection:ObjectFileLoader searchedLibraries separatedBy:' ') asValue.
     ].
 
     catchRedefs := Class catchMethodRedefinitions asValue.
     historyLines := (HistoryManager notNil and:[HistoryManager isActive]) asValue.
 
+    keepSourceOptions := #( keep reference absReference sourceReference discard ).
+    keepSource := SelectionInList new list:(resources array:#('keep as string' 'reference to filename' 'reference to full path' 'append and ref in `st.src''' 'discard' )).
+    keepSource selectionIndex:1.
+
     warnEnabler := Plug new.
     warnEnabler
-	respondTo:#check 
-	with:[warnings value ifTrue:[
-		warnSTXBox enable. 
-		warnOldStyleBox enable.
-		allowUnderscore value ifTrue:[
-		    warnUnderscoreBox enable.
-		] ifFalse:[
-		    warnUnderscoreBox disable.
-		].
-	      ] ifFalse:[
-		warnSTXBox disable. 
-		warnUnderscoreBox disable.
-		warnOldStyleBox disable.
-	      ]].
+        respondTo:#check 
+        with:[warnings value ifTrue:[
+                warnSTXBox enable. 
+                warnOldStyleBox enable.
+                allowUnderscore value ifTrue:[
+                    warnUnderscoreBox enable.
+                ] ifFalse:[
+                    warnUnderscoreBox disable.
+                ].
+              ] ifFalse:[
+                warnSTXBox disable. 
+                warnUnderscoreBox disable.
+                warnOldStyleBox disable.
+              ]].
 
     warnings onChangeSend:#check to:warnEnabler.
     allowUnderscore onChangeSend:#check to:warnEnabler.
@@ -648,54 +656,59 @@
     check := box addCheckBox:(resources string:'keep history line in methods') on:historyLines.
     HistoryManager isNil ifTrue:[check disable].
 
+    keepSourceList := box addPopUpList:(resources string:'fileIn source mode') on:keepSource.
+    keepSource selectionIndex:( keepSourceOptions indexOf:(ClassCategoryReader sourceMode) ifAbsent:1).
+
     box addHorizontalLine.
 
     ObjectFileLoader notNil ifTrue:[
-	compilationList := box addPopUpList:(resources string:'compilation to machine code') on:stcCompilation.
-	stcCompilation selectionIndex:( stcCompilationOptions indexOf:(Compiler stcCompilation) ifAbsent:2).
+        compilationList := box addPopUpList:(resources string:'compilation to machine code') on:stcCompilation.
+        stcCompilation selectionIndex:( stcCompilationOptions indexOf:(Compiler stcCompilation) ifAbsent:2).
 
-	y := box yPosition.
-	component := box addTextLabel:(resources string:'stc include directories:').
-	component width:0.5; adjust:#right; borderWidth:0.
-	box yPosition:y.
-	component := box addInputFieldOn:stcIncludes tabable:true.
-	component width:0.5; left:0.5; immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine.
+        y := box yPosition.
+        component := box addTextLabel:(resources string:'stc include directories:').
+        component width:0.5; adjust:#right; borderWidth:0.
+        box yPosition:y.
+        component := box addInputFieldOn:stcIncludes tabable:true.
+        component width:0.5; left:0.5; immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine.
 
-	box addVerticalSpace.
-	y := box yPosition.
-	component := box addTextLabel:'stc defines:'.
-	component width:0.5; adjust:#right; borderWidth:0.
-	box yPosition:y.
-	component := box addInputFieldOn:stcDefines tabable:true.
-	component width:0.5; left:0.5; immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine.
+        box addVerticalSpace.
+        y := box yPosition.
+        component := box addTextLabel:'stc defines:'.
+        component width:0.5; adjust:#right; borderWidth:0.
+        box yPosition:y.
+        component := box addInputFieldOn:stcDefines tabable:true.
+        component width:0.5; left:0.5; immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine.
 
-	box addVerticalSpace.
-	y := box yPosition.
-	component := box addTextLabel:'stc options:'.
-	component width:0.5; adjust:#right; borderWidth:0.
-	box yPosition:y.
-	component := box addInputFieldOn:stcOptions tabable:true.
-	component width:0.5; left:0.5; immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine.
+        box addVerticalSpace.
+        y := box yPosition.
+        component := box addTextLabel:'stc options:'.
+        component width:0.5; adjust:#right; borderWidth:0.
+        box yPosition:y.
+        component := box addInputFieldOn:stcOptions tabable:true.
+        component width:0.5; left:0.5; immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine.
 
-	box addVerticalSpace.
-	y := box yPosition.
-	component := box addTextLabel:'stc C-libraries:'.
-	component width:0.5; adjust:#right; borderWidth:0.
-	box yPosition:y.
-	component := box addInputFieldOn:stcLibraries tabable:true.
-	component width:0.5; left:0.5; immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine.
+        box addVerticalSpace.
+        y := box yPosition.
+        component := box addTextLabel:'stc C-libraries:'.
+        component width:0.5; adjust:#right; borderWidth:0.
+        box yPosition:y.
+        component := box addInputFieldOn:stcLibraries tabable:true.
+        component width:0.5; left:0.5; immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine.
 
-	box addVerticalSpace.
-	box addHorizontalLine.
+        box addVerticalSpace.
+        box addHorizontalLine.
 
-	"/ if there is no compiler around,
-	"/ change to compile nothing, and disable the checkBoxes
-	Compiler canCreateMachineCode ifFalse:[
-	    stcCompilation selectionIndex:3.
-	    compilationList disable.
-	].
+        "/ if there is no compiler around,
+        "/ change to compile nothing, and disable the checkBoxes
+        Compiler canCreateMachineCode ifFalse:[
+            stcCompilation selectionIndex:3.
+            compilationList disable.
+        ].
     ].
 
+    box addCheckBox:(resources string:'constant folding') on:foldConstants.
+    box addVerticalSpace.
     box addCheckBox:(resources string:'allow underscore in identifiers') on:allowUnderscore.
     box addVerticalSpace.
     box addCheckBox:(resources string:'literal arrays are immutable') on:immutableArrays.
@@ -719,32 +732,34 @@
     box showAtPointer.
 
     box accepted ifTrue:[
-	HistoryManager notNil ifTrue:[
-	    historyLines value ifTrue:[
-		HistoryManager activate
-	    ] ifFalse:[
-		HistoryManager deactivate
-	    ].
-	].
-	Class catchMethodRedefinitions:catchRedefs value.
-	Compiler warnings:warnings value.
-	Compiler warnSTXSpecials:warnSTX value.
-	Compiler warnOldStyleAssignment:warnOldStyle value.
-	Compiler warnUnderscoreInIdentifier:warnUnderscore value.
-	Compiler allowUnderscoreInIdentifier:allowUnderscore value.
-	Compiler arraysAreImmutable:immutableArrays value.
-	Compiler stcCompilation:(stcCompilationOptions at:stcCompilation selectionIndex).
-	Compiler stcCompilationIncludes:stcIncludes value.
-	Compiler stcCompilationDefines:stcDefines value.
-	Compiler stcCompilationOptions:stcOptions value.
-	ObjectFileLoader notNil ifTrue:[
-	    ObjectFileLoader searchedLibraries:(stcLibraries value asCollectionOfWords).
-	]
+        HistoryManager notNil ifTrue:[
+            historyLines value ifTrue:[
+                HistoryManager activate
+            ] ifFalse:[
+                HistoryManager deactivate
+            ].
+        ].
+        Class catchMethodRedefinitions:catchRedefs value.
+        ClassCategoryReader sourceMode:(keepSourceOptions at:keepSource selectionIndex).
+        Compiler warnings:warnings value.
+        Compiler warnSTXSpecials:warnSTX value.
+        Compiler warnOldStyleAssignment:warnOldStyle value.
+        Compiler warnUnderscoreInIdentifier:warnUnderscore value.
+        Compiler allowUnderscoreInIdentifier:allowUnderscore value.
+        Compiler arraysAreImmutable:immutableArrays value.
+        Compiler stcCompilation:(stcCompilationOptions at:stcCompilation selectionIndex).
+        Compiler stcCompilationIncludes:stcIncludes value.
+        Compiler stcCompilationDefines:stcDefines value.
+        Compiler stcCompilationOptions:stcOptions value.
+        Compiler foldConstants:foldConstants value.
+        ObjectFileLoader notNil ifTrue:[
+            ObjectFileLoader searchedLibraries:(stcLibraries value asCollectionOfWords).
+        ]
     ].
     box destroy
 
     "Modified: 10.9.1995 / 19:19:18 / claus"
-    "Modified: 4.12.1995 / 01:11:23 / cg"
+    "Modified: 9.2.1996 / 17:44:29 / cg"
 !
 
 keyboardSetting 
@@ -2155,5 +2170,5 @@
 !NewLauncher class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libtool/Launcher.st,v 1.77 1996-02-02 19:53:17 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/Launcher.st,v 1.78 1996-02-09 17:43:20 cg Exp $'
 ! !