PmTypes.dcl 4.04 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
Diederik van Arkel's avatar
Diederik van Arkel committed
14

Diederik van Arkel's avatar
Diederik van Arkel committed
15
ProcessorSuffix :: !Processor -> String
Diederik van Arkel's avatar
Diederik van Arkel committed
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
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
34
35
	
	, add_carb_resource		:: !Bool			// Mac-only!
Diederik van Arkel's avatar
Diederik van Arkel committed
36
37
38
39
	}

DefaultLinkOptions		:: LinkOptions

40
:: LinkMethod				// => is really project method/type now?
Diederik van Arkel's avatar
Diederik van Arkel committed
41
	= LM_Static
Diederik van Arkel's avatar
Diederik van Arkel committed
42
//	| LM_Eager
Diederik van Arkel's avatar
Diederik van Arkel committed
43
	| LM_Dynamic
Diederik van Arkel's avatar
Diederik van Arkel committed
44
45
	| LM_StaticLibrary		// produce static library
	| LM_DynamicLibrary		// produce shared library
Diederik van Arkel's avatar
Diederik van Arkel committed
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113

instance toString LinkMethod
instance fromString LinkMethod
instance == LinkMethod

//	Window position and size

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

instance == WindowPos_and_Size

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
	, pos_size		:: !WindowPos_and_Size 
	}

//	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
	, tp	:: !Processor
	}

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
114
115
	, 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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
	, 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
130
	| NoReturnType
Diederik van Arkel's avatar
Diederik van Arkel committed
131
132
133
134
135
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
	| 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