Menu

[r77]: / trunk / src / ScriptEngine.inc  Maximize  Restore  History

Download this file

419 lines (363 with data), 10.4 kB

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
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
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
{
ScriptEngine II: Options
You can set up the options for the ScriptEngine II here.
}
{--------------------------------Configuration---------------------------------}
{Enable this option to suppress the generation of debug info for the
ScriptEngine II files. This will prevent the integrated debugger from stepping
into the ScriptEngine II Code.}
{.$define SEII_NoDebugInfo}
{This option will disable Range-Checking for the ScriptEngine II - Source. This
allows faster execution and smaller program sizes. If you do not define this
value, the default handling of range-checking will be used.}
{$define SEII_DisableRangeCheck}
{This option will disable threading-support for the scripts. If this define is
active, the System.Threading-Namespace will not be available for scripts -
already compiled scripts will not be able to create a thread. This is only
for security}
{.$define SEII_DisableThreadingSupport}
{This define will enable the caching for stack data during the execution of the
script. If you enable this define, the runtime will execute faster and causes
less memory fragmentation. But the memory usage will increase for about
32 KBytes per RunTime-Instance. You should only disable this define under
special circumstances.}
{$define SEII_UseRunTimeCache}
{This define will make the runtime cache bigger. The cache has a default size of
32 KB, with this define it has 1.5 MB. Note that this size is needed for every
instance of TSE2RunTime. The bigger cache has the advantage, that more stack
items fit into the cache and that small classes and records are stored inside
the cache. This define will be ignored if SEII_UseRunTimeCache is disabled.}
{$define SEII_BigRunTimeCache}
{If you enable this define, every class of the ScriptEngine II will have
TPersistant as the root object, otherwise TObject is used.}
{.$define SEII_UsePersistantAsRoot}
{If you disable this define, only simple usage detection of methods is used.
This improves the compilation speed, but increases the final size of the
compiled data. It is not advised to disable this feature.}
{$define SEII_UseSmartLinker}
{--------------------------------Include-Files---------------------------------}
{Enable this option to include extended math functions into the ScriptEngine II.
This option will be ignored for FreePascal-Uses because FPC does not have the
used routines yet.}
{$define SEII_NoExtendedMath}
{Enable this option to include an included performance counter to the
ScriptEngine II. This will allow you to use the object "TTimeCounter" in the
ScriptEngine. This object gives you the number of seconds between
"TTimeCounter.Start" and "TTimeCounter.Stop". Linux-Uses does not have the
used PerformanceCounter-Method, so this option is ignored in Linux.}
{.$define SEII_IncludePerfTimer}
{If you enable this define, the "SoundEx*" - functions will be included into
the ScriptEngine II - Strings-class. If you do not want to use any of these
function, it is advised to disable this define. Smaller exe-files will be the
result.}
{.$define SEII_IncludeSoundEx}
{-----------------------------------Defines------------------------------------}
{In this section, the previous configuration will be applied. It is not advised
to modify this section.}
{$IFDEF FPC}
{$MODE DELPHI}
{$DEFINE SEII_FPC}
{$IFDEF VER2_0}
{$DEFINE SEII_FPC_STRING_EAX}
{$ENDIF}
{$IFDEF VER2_2}
{$DEFINE SEII_FPC_STRING_EAX}
{$ENDIF}
{$DEFINE SEII_FPC_METHOD_AS_POINTER}
{$ENDIF}
{$IFDEF SEII_NoDebugInfo}
{$D-}
{$ENDIF}
{$IFDEF SEII_DisableRangeCheck}
{$R-}
{$ENDIF}
{$IFDEF SEII_DisableThreadingSupport}
{$DEFINE SEII_NO_SCRIPT_THREAD}
{$ENDIF}
{$IFDEF FPC}
{$DEFINE SEII_NO_EXT_MATH}
{$ELSE}
{$IFDEF SEII_NoExtendedMath}
{$DEFINE SEII_NO_EXT_MATH}
{$ENDIF}
{$ENDIF}
{$IFDEF WIN32}
{$IFDEF SEII_IncludePerfTimer}
{$DEFINE SEII_INCLUDE_PERF_TIMER}
{$ENDIF}
{$ENDIF}
{$IFDEF SEII_IncludeSoundEx}
{$DEFINE SEII_USE_SOUND_EX}
{$ENDIF}
{$IFDEF SEII_UseRunTimeCache}
{$DEFINE SEII_STACK_USE_CACHE}
{$DEFINE SEII_MM_USE_CACHE}
{$IFDEF SEII_BigRunTimeCache}
{$DEFINE SEII_MM_CACHE_BIG}
{$ENDIF}
{$ENDIF}
{$IFDEF SEII_UsePersistantAsRoot}
{$DEFINE SEII_INCLUDE_RTTI}
{$ENDIF}
{$IFDEF SEII_UseSmartLinker}
{$DEFINE SEII_SMART_LINKING}
{$ENDIF}
{--------------------------------Compiler Selection----------------------------}
{ defines for Delphi 1.0 }
{$IFDEF VER80}
{$DEFINE DELPHI}
{$DEFINE DELPHI1}
{$DEFINE DELPHI1UP}
{$DEFINE DELPHI_16BIT}
{$DEFINE WIN16}
{$DEFINE 16BIT}
{$ENDIF}
{ defines for Delphi 2.0 }
{$IFDEF VER90}
{$DEFINE DELPHI}
{$DEFINE DELPHI2}
{$DEFINE DELPHI1UP}
{$DEFINE DELPHI2UP}
{$ENDIF}
{ defines for C++Builder 1.0 }
{$IFDEF VER93}
{$DEFINE DELPHI1UP}
{$DEFINE DELPHI2UP}
{$DEFINE CBUILDER}
{$DEFINE CBUILDER1}
{$DEFINE CBUILDER1UP}
{$ENDIF}
{ defines for Delphi 3.0 }
{$IFDEF VER100}
{$DEFINE DELPHI}
{$DEFINE DELPHI3}
{$DEFINE DELPHI1UP}
{$DEFINE DELPHI2UP}
{$DEFINE DELPHI3UP}
{$ENDIF}
{ defines for C++Builder 3.0 }
{$IFDEF VER110}
{$DEFINE DELPHI1UP}
{$DEFINE DELPHI2UP}
{$DEFINE DELPHI3UP}
{$DEFINE CBUILDER}
{$DEFINE CBUILDER3}
{$DEFINE CBUILDER1UP}
{$DEFINE CBUILDER3UP}
{$ENDIF}
{ defines for Delphi 4.0 }
{$IFDEF VER120}
{$DEFINE DELPHI}
{$DEFINE DELPHI4}
{$DEFINE DELPHI1UP}
{$DEFINE DELPHI2UP}
{$DEFINE DELPHI3UP}
{$DEFINE DELPHI4UP}
{$ENDIF}
{ defines for C++Builder 4.0 }
{$IFDEF VER125}
{$DEFINE DELPHI1UP}
{$DEFINE DELPHI2UP}
{$DEFINE DELPHI3UP}
{$DEFINE DELPHI4UP}
{$DEFINE CBUILDER}
{$DEFINE CBUILDER4}
{$DEFINE CBUILDER1UP}
{$DEFINE CBUILDER3UP}
{$DEFINE CBUILDER4UP}
{$ENDIF}
{ defines for Delphi 5.0 }
{$IFDEF VER130}
{$DEFINE DELPHI}
{$DEFINE DELPHI5}
{$DEFINE DELPHI1UP}
{$DEFINE DELPHI2UP}
{$DEFINE DELPHI3UP}
{$DEFINE DELPHI4UP}
{$DEFINE DELPHI5UP}
{$ENDIF}
{ defines for C++Builder 5.0 }
{$IFDEF VER135}
{$DEFINE DELPHI1UP}
{$DEFINE DELPHI2UP}
{$DEFINE DELPHI3UP}
{$DEFINE DELPHI4UP}
{$DEFINE DELPHI5UP}
{$DEFINE CBUILDER}
{$DEFINE CBUILDER5}
{$DEFINE CBUILDER1UP}
{$DEFINE CBUILDER3UP}
{$DEFINE CBUILDER4UP}
{$DEFINE CBUILDER5UP}
{$ENDIF}
{ defines for Delphi 6.0 }
{$IFDEF VER140}
{$DEFINE VER140UP}
{$DEFINE DELPHI}
{$DEFINE DELPHI6}
{$DEFINE DELPHI1UP}
{$DEFINE DELPHI2UP}
{$DEFINE DELPHI3UP}
{$DEFINE DELPHI4UP}
{$DEFINE DELPHI5UP}
{$DEFINE DELPHI6UP}
{$ENDIF}
{ defines for Delphi 7.0 }
{$IFDEF VER150}
{$DEFINE VER140UP}
{$DEFINE DELPHI}
{$DEFINE DELPHI7}
{$DEFINE DELPHI1UP}
{$DEFINE DELPHI2UP}
{$DEFINE DELPHI3UP}
{$DEFINE DELPHI4UP}
{$DEFINE DELPHI5UP}
{$DEFINE DELPHI6UP}
{$DEFINE DELPHI7UP}
{$ENDIF}
{ defines for Delphi 2005 }
{$IFDEF VER170}
{$DEFINE VER140UP}
{$DEFINE DELPHI}
{$DEFINE DELPHI9}
{$DEFINE DELPHI2005}
{$DEFINE DELPHI1UP}
{$DEFINE DELPHI2UP}
{$DEFINE DELPHI3UP}
{$DEFINE DELPHI4UP}
{$DEFINE DELPHI5UP}
{$DEFINE DELPHI6UP}
{$DEFINE DELPHI7UP}
{$DEFINE DELPHI9UP}
{$DEFINE DELPHI2005UP}
{$DEFINE BDS}
{$DEFINE BDS3}
{$DEFINE BDS3UP}
{$ENDIF}
{ defines for Delphi 2006 }
{$IFDEF VER180}
{$DEFINE VER140UP}
{$DEFINE DELPHI}
{$DEFINE DELPHI10}
{$DEFINE DELPHI2006}
{$DEFINE DELPHI1UP}
{$DEFINE DELPHI2UP}
{$DEFINE DELPHI3UP}
{$DEFINE DELPHI4UP}
{$DEFINE DELPHI5UP}
{$DEFINE DELPHI6UP}
{$DEFINE DELPHI7UP}
{$DEFINE DELPHI9UP}
{$DEFINE DELPHI10A}
{$DEFINE DELPHI10UP}
{$DEFINE DELPHI2005UP}
{$DEFINE DELPHI2006UP}
{$DEFINE BDS}
{$DEFINE BDS4}
{$DEFINE BDS3UP}
{$DEFINE BDS4UP}
{$ENDIF}
{ defines for Delphi 2007 }
{$IFDEF VER185}
{$UNDEF DELPHI10A} // declared in VER180
{$UNDEF DELPHI2006} // declared in VER180
{$UNDEF BDS4} // declared in VER180
{$DEFINE DELPHI10B}
{$DEFINE DELPHI2007}
{$DEFINE DELPHI2007UP}
{$DEFINE BDS5}
{$DEFINE BDS5UP}
{$ENDIF}
{ defines for Delphi 2009 }
{$IFDEF VER200}
{$DEFINE VER140UP}
{$DEFINE VER150UP}
{$DEFINE DELPHI}
{$DEFINE DELPHI10}
{$DEFINE DELPHI2009}
{$DEFINE DELPHI1UP}
{$DEFINE DELPHI2UP}
{$DEFINE DELPHI3UP}
{$DEFINE DELPHI4UP}
{$DEFINE DELPHI5UP}
{$DEFINE DELPHI6UP}
{$DEFINE DELPHI7UP}
{$DEFINE DELPHI9UP}
{$DEFINE DELPHI10A}
{$DEFINE DELPHI10UP}
{$DEFINE DELPHI2005UP}
{$DEFINE DELPHI2006UP}
{$DEFINE DELPHI2007UP}
{$DEFINE DELPHI2009UP}
{$DEFINE BDS}
{$DEFINE BDS4}
{$DEFINE BDS3UP}
{$DEFINE BDS4UP}
{$ENDIF}
{ defines for Delphi 2010 }
{$IFDEF VER210}
{$DEFINE VER140UP}
{$DEFINE VER150UP}
{$DEFINE VER160UP}
{$DEFINE DELPHI}
{$DEFINE DELPHI10}
{$DEFINE DELPHI2010}
{$DEFINE DELPHI1UP}
{$DEFINE DELPHI2UP}
{$DEFINE DELPHI3UP}
{$DEFINE DELPHI4UP}
{$DEFINE DELPHI5UP}
{$DEFINE DELPHI6UP}
{$DEFINE DELPHI7UP}
{$DEFINE DELPHI9UP}
{$DEFINE DELPHI10A}
{$DEFINE DELPHI10UP}
{$DEFINE DELPHI2005UP}
{$DEFINE DELPHI2006UP}
{$DEFINE DELPHI2007UP}
{$DEFINE DELPHI2009UP}
{$DEFINE DELPHI2010UP}
{$DEFINE BDS}
{$DEFINE BDS4}
{$DEFINE BDS3UP}
{$DEFINE BDS4UP}
{$ENDIF}
// defines for Delphi XE)
{$IFDEF VER220}
{$DEFINE VER140UP}
{$DEFINE VER150UP}
{$DEFINE VER160UP}
{$DEFINE DELPHI}
{$DEFINE DELPHI10}
{$DEFINE DELPHI2010}
{$DEFINE DELPHI1UP}
{$DEFINE DELPHI2UP}
{$DEFINE DELPHI3UP}
{$DEFINE DELPHI4UP}
{$DEFINE DELPHI5UP}
{$DEFINE DELPHI6UP}
{$DEFINE DELPHI7UP}
{$DEFINE DELPHI9UP}
{$DEFINE DELPHI10A}
{$DEFINE DELPHI10UP}
{$DEFINE DELPHI2005UP}
{$DEFINE DELPHI2006UP}
{$DEFINE DELPHI2007UP}
{$DEFINE DELPHI2009UP}
{$DEFINE DELPHI2010UP}
{$DEFINE DELPHIXEUP}
{$DEFINE BDS}
{$DEFINE BDS4}
{$DEFINE BDS3UP}
{$DEFINE BDS4UP}
{$ENDIF}
{$IFDEF WIN32}
{$DEFINE MSWINDOWS} //not automatically defined for Delphi 2 thru 5
{$DEFINE 32BIT}
{$ENDIF}
{--------------------------------Compiler Selection----------------------------}
{$IFDEF DELPHI7UP}
{$WARN UNSAFE_CODE OFF}
{$WARN UNSAFE_TYPE OFF}
{$WARN UNSAFE_CAST OFF}
{$ENDIF}
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.