PmTypes.dcl 4.24 KB
Newer Older
Diederik van Arkel's avatar
Diederik van Arkel committed
1
2
definition module PmTypes

3
// The types for the Project Manager
Diederik van Arkel's avatar
Diederik van Arkel committed
4

5
6
7
8
9
from	StdPathname			import :: Pathname
from	UtilNewlinesFile	import :: NewlineConvention(..)
import	PmCompilerOptions
from	UtilStrictLists		import :: List
import	UtilDate
Diederik van Arkel's avatar
Diederik van Arkel committed
10
11
12

::	Modulename			:== String

Diederik van Arkel's avatar
Diederik van Arkel committed
13
::	Processor //= CurrentProcessor | MC68000 | MC68020 | MC68020_and_68881
14
15
DefaultProcessor :: Processor
PlatformProcessors :: [Processor]
Diederik van Arkel's avatar
Diederik van Arkel committed
16

Diederik van Arkel's avatar
Diederik van Arkel committed
17
ProcessorSuffix :: !Processor -> String
Diederik van Arkel's avatar
Diederik van Arkel committed
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
instance == Processor
instance toString Processor
instance fromString Processor

:: LinkObjFileName	:== String
:: LinkLibraryName	:== String

::	LinkOptions =
	{ extraObjectModules	:: !List {#Char}
	, libraries				:: !List {#Char}
	, method				:: !LinkMethod
	, generate_relocations	:: !Bool			// Win only option?
	, generate_link_map		:: !Bool
	, link_resources		:: !Bool
	, resource_source		:: !String

	, generate_dll			:: !Bool
	, dll_export_list_name	:: !String
Diederik van Arkel's avatar
Diederik van Arkel committed
36
	
Diederik van Arkel's avatar
Diederik van Arkel committed
37
//	, add_carb_resource		:: !Bool			// Mac-only!
Diederik van Arkel's avatar
Diederik van Arkel committed
38
39
40
41
	}

DefaultLinkOptions		:: LinkOptions

42
:: LinkMethod				// => is really project method/type now?
Diederik van Arkel's avatar
Diederik van Arkel committed
43
	= LM_Static
Diederik van Arkel's avatar
Diederik van Arkel committed
44
//	| LM_Eager
Diederik van Arkel's avatar
Diederik van Arkel committed
45
	| LM_Dynamic
Diederik van Arkel's avatar
Diederik van Arkel committed
46
47
	| LM_StaticLibrary		// produce static library
	| LM_DynamicLibrary		// produce shared library
Diederik van Arkel's avatar
Diederik van Arkel committed
48
49
50
51
52
53
54
55
56
57
58
59
60
61

instance toString LinkMethod
instance fromString LinkMethod
instance == LinkMethod

//	Window position and size

::	WindowPos_and_Size	=
	{ posx	:: !Int
	, posy	:: !Int
	, sizex	:: !Int
	, sizey	:: !Int
	}

62
63
64
65
:: OptionalWindowPosAndSize = NoWindowPosAndSize | WindowPosAndSize !WindowPos_and_Size;

//instance == WindowPos_and_Size
instance == OptionalWindowPosAndSize
Diederik van Arkel's avatar
Diederik van Arkel committed
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88

DefWindowPos_and_Size	:: WindowPos_and_Size

::	EditOptions	=
	{ newlines	:: !NewlineConvention	// newline convention
/*	
	{ tabs		:: !Int					// tab size
	, fontname	:: !String				// !FontName
	, fontsize	:: !Int					// !FontSize
	, autoi		:: !Bool				// auto-indent
	, newlines	:: !NewlineConvention	// newline convention
	, showtabs	:: !Bool
	, showlins	:: !Bool
	, showsync	:: !Bool
*/
	}

instance == EditOptions

//	The Edit Window parameters: edit options and window position and size

::	EditWdOptions	=
	{ eo			:: !EditOptions
89
	, pos_size		:: !OptionalWindowPosAndSize 
Diederik van Arkel's avatar
Diederik van Arkel committed
90
91
92
93
94
95
96
97
	}

//	The Code Generator Options: default settings for the code generator

::	CodeGenOptions	=
	{ cs	:: !Bool			// generate stack checks
	, ci	:: !Bool			// generate index checks
//	, kaf	:: !Bool			// keep abc-files
98
//	, tp	:: !Processor
Diederik van Arkel's avatar
Diederik van Arkel committed
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
	}

instance == CodeGenOptions

DefCodeGenOptions		:: CodeGenOptions

//	The Application Options: default settings for the application.

::	ApplicationOptions	=
	{ hs								:: !Int			// heap size
	, ss								:: !Int			// stack size
	, em								:: !Int			// extra memory
	, heap_size_multiple				:: !Int
	, initial_heap_size					:: !Int
	, set								:: !Bool		// show execution time
	, sgc								:: !Bool		// show garbage collections
	, pss								:: !Bool		// print stack size
	, marking_collection				:: !Bool		// use marking garbage collector

	, o									:: !Output		// console type
Diederik van Arkel's avatar
Diederik van Arkel committed
119
120
	, fn								:: !String		// font name: only on Mac platform
	, fs								:: !Int			// font size: only on Mac platform
Diederik van Arkel's avatar
Diederik van Arkel committed
121
122
123
124
125
126
127
128
129
130
131
132
133
134
	, write_stderr_to_file				:: !Bool

	, memoryProfiling					:: !Bool
	, memoryProfilingMinimumHeapSize	:: !Int
	, profiling							:: !Bool		// time profiling
	, stack_traces						:: !Bool		// stack traces
	, standard_rte						:: !Bool		// DvA: use standard RTE (only in IDE)
	}

DefApplicationOptions	:: ApplicationOptions

::	Output
	= BasicValuesOnly
	| ShowConstructors
135
	| NoReturnType
Diederik van Arkel's avatar
Diederik van Arkel committed
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
	| NoConsole

instance == Output
instance toString Output
instance fromString Output

:: ModInfoAndName =
	{ info	:: ModInfo
	, name	:: {#Char}
	}

::	ModInfo =
	{ dir				:: !String				// !Pathname
	, compilerOptions	:: !CompilerOptions
	, defeo 			:: !EditWdOptions		// definition module edit options
	, impeo				:: !EditWdOptions		// implementation module edit options
	, defopen 			:: !Bool				// definition module is open
	, impopen 			:: !Bool				// implementation module is open
	, date 				:: !DATE				// ???
	, abcLinkInfo		:: !ABCLinkInfo			// found dependant libs and objs
	}

:: ABCLinkInfo =
	{ linkObjFileNames :: !List LinkObjFileName
	, linkLibraryNames :: !List LinkLibraryName
	}

:: StaticLibInfo =
	{ sLibs :: !List Pathname
	, sDcls :: !List Modulename
	, sDeps :: !List Modulename
	}

isProjLibraryModule :: !.String !StaticLibInfo -> Bool