1 /* do not edit automatically generated by mc from M2RTS. */
2 /* M2RTS.mod Implements the run time system facilities of Modula-2.
4 Copyright (C) 2001-2024 Free Software Foundation, Inc.
5 Contributed by Gaius Mulley <gaius.mulley@southwales.ac.uk>.
7 This file is part of GNU Modula-2.
9 GNU Modula-2 is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation; either version 3, or (at your option)
14 GNU Modula-2 is distributed in the hope that it will be useful, but
15 WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 General Public License for more details.
19 Under Section 7 of GPL version 3, you are granted additional
20 permissions described in the GCC Runtime Library Exception, version
21 3.1, as published by the Free Software Foundation.
23 You should have received a copy of the GNU General Public License and
24 a copy of the GCC Runtime Library Exception along with this program;
25 see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
26 <http://www.gnu.org/licenses/>. */
31 # if !defined (PROC_D)
33 typedef void (*PROC_t
) (void);
34 typedef struct { PROC_t proc
; } PROC
;
49 # include "GNumberIO.h"
53 # include "GStorage.h"
54 # include "GRTExceptions.h"
55 # include "GM2EXCEPTION.h"
56 # include "GM2Dependent.h"
58 typedef struct M2RTS_ArgCVEnvP_p M2RTS_ArgCVEnvP
;
61 typedef char *M2RTS_PtrToChar
;
64 static bool isHalting
;
66 static bool Initialized
;
69 ConstructModules - resolve dependencies and then call each
70 module constructor in turn.
73 extern "C" void M2RTS_ConstructModules (void * applicationmodule
, void * libname
, void * overrideliborder
, int argc
, void * argv
, void * envp
);
76 DeconstructModules - resolve dependencies and then call each
77 module constructor in turn.
80 extern "C" void M2RTS_DeconstructModules (void * applicationmodule
, void * libname
, int argc
, void * argv
, void * envp
);
83 RegisterModule - adds module name to the list of outstanding
84 modules which need to have their dependencies
85 explored to determine initialization order.
88 extern "C" void M2RTS_RegisterModule (void * name
, void * libname
, M2RTS_ArgCVEnvP init
, M2RTS_ArgCVEnvP fini
, PROC dependencies
);
91 RequestDependant - used to specify that modulename is dependant upon
92 module dependantmodule.
95 extern "C" void M2RTS_RequestDependant (void * modulename
, void * libname
, void * dependantmodule
, void * dependantlibname
);
98 InstallTerminationProcedure - installs a procedure, p, which will
99 be called when the procedure
100 ExecuteTerminationProcedures
101 is invoked. It returns TRUE if the
102 procedure is installed.
105 extern "C" bool M2RTS_InstallTerminationProcedure (PROC p
);
108 ExecuteInitialProcedures - executes the initial procedures installed by
109 InstallInitialProcedure.
112 extern "C" void M2RTS_ExecuteInitialProcedures (void);
115 InstallInitialProcedure - installs a procedure to be executed just
116 before the BEGIN code section of the
120 extern "C" bool M2RTS_InstallInitialProcedure (PROC p
);
123 ExecuteTerminationProcedures - calls each installed termination procedure
127 extern "C" void M2RTS_ExecuteTerminationProcedures (void);
130 Terminate - provides compatibility for pim. It calls exit with
131 the exitcode provided in a prior call to ExitOnHalt
132 (or zero if ExitOnHalt was never called). It does
133 not call ExecuteTerminationProcedures.
136 extern "C" void M2RTS_Terminate (void) __attribute__ ((noreturn
));
139 HALT - terminate the current program. The procedure
140 ExecuteTerminationProcedures
141 is called before the program is stopped. The parameter
142 exitcode is optional. If the parameter is not supplied
143 HALT will call libc 'abort', otherwise it will exit with
144 the code supplied. Supplying a parameter to HALT has the
145 same effect as calling ExitOnHalt with the same code and
146 then calling HALT with no parameter.
149 extern "C" void M2RTS_HALT (int exitcode
) __attribute__ ((noreturn
));
152 Halt - provides a more user friendly version of HALT, which takes
153 four parameters to aid debugging. It writes an error message
154 to stderr and calls exit (1).
157 extern "C" void M2RTS_Halt (const char *description_
, unsigned int _description_high
, const char *filename_
, unsigned int _filename_high
, const char *function_
, unsigned int _function_high
, unsigned int line
) __attribute__ ((noreturn
));
160 HaltC - provides a more user friendly version of HALT, which takes
161 four parameters to aid debugging. It writes an error message
162 to stderr and calls exit (1).
165 extern "C" void M2RTS_HaltC (void * description
, void * filename
, void * function
, unsigned int line
) __attribute__ ((noreturn
));
168 ExitOnHalt - if HALT is executed then call exit with the exit code, e.
171 extern "C" void M2RTS_ExitOnHalt (int e
);
174 ErrorMessage - emits an error message to stderr and then calls exit (1).
177 extern "C" void M2RTS_ErrorMessage (const char *message_
, unsigned int _message_high
, const char *filename_
, unsigned int _filename_high
, unsigned int line
, const char *function_
, unsigned int _function_high
) __attribute__ ((noreturn
));
180 Length - returns the length of a string, a. This is called whenever
181 the user calls LENGTH and the parameter cannot be calculated
185 extern "C" unsigned int M2RTS_Length (const char *a_
, unsigned int _a_high
);
186 extern "C" void M2RTS_AssignmentException (void * filename
, unsigned int line
, unsigned int column
, void * scope
, void * message
) __attribute__ ((noreturn
));
187 extern "C" void M2RTS_ReturnException (void * filename
, unsigned int line
, unsigned int column
, void * scope
, void * message
) __attribute__ ((noreturn
));
188 extern "C" void M2RTS_IncException (void * filename
, unsigned int line
, unsigned int column
, void * scope
, void * message
) __attribute__ ((noreturn
));
189 extern "C" void M2RTS_DecException (void * filename
, unsigned int line
, unsigned int column
, void * scope
, void * message
) __attribute__ ((noreturn
));
190 extern "C" void M2RTS_InclException (void * filename
, unsigned int line
, unsigned int column
, void * scope
, void * message
) __attribute__ ((noreturn
));
191 extern "C" void M2RTS_ExclException (void * filename
, unsigned int line
, unsigned int column
, void * scope
, void * message
) __attribute__ ((noreturn
));
192 extern "C" void M2RTS_ShiftException (void * filename
, unsigned int line
, unsigned int column
, void * scope
, void * message
) __attribute__ ((noreturn
));
193 extern "C" void M2RTS_RotateException (void * filename
, unsigned int line
, unsigned int column
, void * scope
, void * message
) __attribute__ ((noreturn
));
194 extern "C" void M2RTS_StaticArraySubscriptException (void * filename
, unsigned int line
, unsigned int column
, void * scope
, void * message
) __attribute__ ((noreturn
));
195 extern "C" void M2RTS_DynamicArraySubscriptException (void * filename
, unsigned int line
, unsigned int column
, void * scope
, void * message
) __attribute__ ((noreturn
));
196 extern "C" void M2RTS_ForLoopBeginException (void * filename
, unsigned int line
, unsigned int column
, void * scope
, void * message
) __attribute__ ((noreturn
));
197 extern "C" void M2RTS_ForLoopToException (void * filename
, unsigned int line
, unsigned int column
, void * scope
, void * message
) __attribute__ ((noreturn
));
198 extern "C" void M2RTS_ForLoopEndException (void * filename
, unsigned int line
, unsigned int column
, void * scope
, void * message
) __attribute__ ((noreturn
));
199 extern "C" void M2RTS_PointerNilException (void * filename
, unsigned int line
, unsigned int column
, void * scope
, void * message
) __attribute__ ((noreturn
));
200 extern "C" void M2RTS_NoReturnException (void * filename
, unsigned int line
, unsigned int column
, void * scope
, void * message
) __attribute__ ((noreturn
));
201 extern "C" void M2RTS_CaseException (void * filename
, unsigned int line
, unsigned int column
, void * scope
, void * message
) __attribute__ ((noreturn
));
202 extern "C" void M2RTS_WholeNonPosDivException (void * filename
, unsigned int line
, unsigned int column
, void * scope
, void * message
) __attribute__ ((noreturn
));
203 extern "C" void M2RTS_WholeNonPosModException (void * filename
, unsigned int line
, unsigned int column
, void * scope
, void * message
) __attribute__ ((noreturn
));
204 extern "C" void M2RTS_WholeZeroDivException (void * filename
, unsigned int line
, unsigned int column
, void * scope
, void * message
) __attribute__ ((noreturn
));
205 extern "C" void M2RTS_WholeZeroRemException (void * filename
, unsigned int line
, unsigned int column
, void * scope
, void * message
) __attribute__ ((noreturn
));
206 extern "C" void M2RTS_WholeValueException (void * filename
, unsigned int line
, unsigned int column
, void * scope
, void * message
) __attribute__ ((noreturn
));
207 extern "C" void M2RTS_RealValueException (void * filename
, unsigned int line
, unsigned int column
, void * scope
, void * message
) __attribute__ ((noreturn
));
208 extern "C" void M2RTS_ParameterException (void * filename
, unsigned int line
, unsigned int column
, void * scope
, void * message
) __attribute__ ((noreturn
));
209 extern "C" void M2RTS_NoException (void * filename
, unsigned int line
, unsigned int column
, void * scope
, void * message
) __attribute__ ((noreturn
));
212 ErrorString - writes a string to stderr.
215 static void ErrorString (const char *a_
, unsigned int _a_high
);
218 ErrorStringC - writes a string to stderr.
221 static void ErrorStringC (void * str
);
224 ErrorMessageC - emits an error message to stderr and then calls exit (1).
227 static void ErrorMessageC (void * message
, void * filename
, unsigned int line
, void * function
) __attribute__ ((noreturn
));
230 Init - initialize the initial, terminate procedure lists and booleans.
233 static void Init (void);
236 CheckInitialized - checks to see if this module has been initialized
237 and if it has not it calls Init. We need this
238 approach as this module is called by module ctors
239 before we reach main.
242 static void CheckInitialized (void);
246 ErrorString - writes a string to stderr.
249 static void ErrorString (const char *a_
, unsigned int _a_high
)
254 /* make a local copy of each unbounded array. */
255 memcpy (a
, a_
, _a_high
+1);
257 n
= static_cast<int> (libc_write (stderrFd
, const_cast<void*> (static_cast<const void*>(a
)), static_cast<size_t> (StrLib_StrLen ((const char *) a
, _a_high
))));
262 ErrorStringC - writes a string to stderr.
265 static void ErrorStringC (void * str
)
269 len
= static_cast<int> (libc_write (stderrFd
, str
, libc_strlen (str
)));
274 ErrorMessageC - emits an error message to stderr and then calls exit (1).
277 static void ErrorMessageC (void * message
, void * filename
, unsigned int line
, void * function
)
279 typedef struct ErrorMessageC__T1_a ErrorMessageC__T1
;
281 struct ErrorMessageC__T1_a
{ char array
[10+1]; };
282 ErrorMessageC__T1 buffer
;
284 ErrorStringC (filename
);
285 ErrorString ((const char *) ":", 1);
286 NumberIO_CardToStr (line
, 0, (char *) &buffer
.array
[0], 10);
287 ErrorString ((const char *) &buffer
.array
[0], 10);
288 ErrorString ((const char *) ":", 1);
289 if ((libc_strlen (function
)) > 0)
291 ErrorString ((const char *) "in ", 3);
292 ErrorStringC (function
);
293 ErrorString ((const char *) " has caused ", 12);
295 ErrorStringC (message
);
296 buffer
.array
[0] = ASCII_nl
;
297 buffer
.array
[1] = ASCII_nul
;
298 ErrorString ((const char *) &buffer
.array
[0], 10);
304 Init - initialize the initial, terminate procedure lists and booleans.
307 static void Init (void)
311 CallExit
= false; /* default by calling abort */
316 CheckInitialized - checks to see if this module has been initialized
317 and if it has not it calls Init. We need this
318 approach as this module is called by module ctors
319 before we reach main.
322 static void CheckInitialized (void)
333 ConstructModules - resolve dependencies and then call each
334 module constructor in turn.
337 extern "C" void M2RTS_ConstructModules (void * applicationmodule
, void * libname
, void * overrideliborder
, int argc
, void * argv
, void * envp
)
339 M2Dependent_ConstructModules (applicationmodule
, libname
, overrideliborder
, argc
, argv
, envp
);
344 DeconstructModules - resolve dependencies and then call each
345 module constructor in turn.
348 extern "C" void M2RTS_DeconstructModules (void * applicationmodule
, void * libname
, int argc
, void * argv
, void * envp
)
350 M2Dependent_DeconstructModules (applicationmodule
, libname
, argc
, argv
, envp
);
355 RegisterModule - adds module name to the list of outstanding
356 modules which need to have their dependencies
357 explored to determine initialization order.
360 extern "C" void M2RTS_RegisterModule (void * name
, void * libname
, M2RTS_ArgCVEnvP init
, M2RTS_ArgCVEnvP fini
, PROC dependencies
)
362 M2Dependent_RegisterModule (name
, libname
, (M2Dependent_ArgCVEnvP
) {(M2Dependent_ArgCVEnvP_t
) init
.proc
}, (M2Dependent_ArgCVEnvP
) {(M2Dependent_ArgCVEnvP_t
) fini
.proc
}, dependencies
);
367 RequestDependant - used to specify that modulename is dependant upon
368 module dependantmodule.
371 extern "C" void M2RTS_RequestDependant (void * modulename
, void * libname
, void * dependantmodule
, void * dependantlibname
)
373 M2Dependent_RequestDependant (modulename
, libname
, dependantmodule
, dependantlibname
);
378 InstallTerminationProcedure - installs a procedure, p, which will
379 be called when the procedure
380 ExecuteTerminationProcedures
381 is invoked. It returns TRUE if the
382 procedure is installed.
385 extern "C" bool M2RTS_InstallTerminationProcedure (PROC p
)
387 return M2Dependent_InstallTerminationProcedure (p
);
388 /* static analysis guarentees a RETURN statement will be used before here. */
389 __builtin_unreachable ();
394 ExecuteInitialProcedures - executes the initial procedures installed by
395 InstallInitialProcedure.
398 extern "C" void M2RTS_ExecuteInitialProcedures (void)
400 M2Dependent_ExecuteInitialProcedures ();
405 InstallInitialProcedure - installs a procedure to be executed just
406 before the BEGIN code section of the
410 extern "C" bool M2RTS_InstallInitialProcedure (PROC p
)
412 return M2Dependent_InstallInitialProcedure (p
);
413 /* static analysis guarentees a RETURN statement will be used before here. */
414 __builtin_unreachable ();
419 ExecuteTerminationProcedures - calls each installed termination procedure
423 extern "C" void M2RTS_ExecuteTerminationProcedures (void)
425 M2Dependent_ExecuteTerminationProcedures ();
430 Terminate - provides compatibility for pim. It calls exit with
431 the exitcode provided in a prior call to ExitOnHalt
432 (or zero if ExitOnHalt was never called). It does
433 not call ExecuteTerminationProcedures.
436 extern "C" void M2RTS_Terminate (void)
438 libc_exit (ExitValue
);
443 HALT - terminate the current program. The procedure
444 ExecuteTerminationProcedures
445 is called before the program is stopped. The parameter
446 exitcode is optional. If the parameter is not supplied
447 HALT will call libc 'abort', otherwise it will exit with
448 the code supplied. Supplying a parameter to HALT has the
449 same effect as calling ExitOnHalt with the same code and
450 then calling HALT with no parameter.
453 extern "C" void M2RTS_HALT (int exitcode
)
458 ExitValue
= exitcode
;
462 /* double HALT found */
468 M2RTS_ExecuteTerminationProcedures ();
472 libc_exit (ExitValue
);
482 Halt - provides a more user friendly version of HALT, which takes
483 four parameters to aid debugging. It writes an error message
484 to stderr and calls exit (1).
487 extern "C" void M2RTS_Halt (const char *description_
, unsigned int _description_high
, const char *filename_
, unsigned int _filename_high
, const char *function_
, unsigned int _function_high
, unsigned int line
)
489 char description
[_description_high
+1];
490 char filename
[_filename_high
+1];
491 char function
[_function_high
+1];
493 /* make a local copy of each unbounded array. */
494 memcpy (description
, description_
, _description_high
+1);
495 memcpy (filename
, filename_
, _filename_high
+1);
496 memcpy (function
, function_
, _function_high
+1);
498 M2RTS_ErrorMessage ((const char *) description
, _description_high
, (const char *) filename
, _filename_high
, line
, (const char *) function
, _function_high
);
503 HaltC - provides a more user friendly version of HALT, which takes
504 four parameters to aid debugging. It writes an error message
505 to stderr and calls exit (1).
508 extern "C" void M2RTS_HaltC (void * description
, void * filename
, void * function
, unsigned int line
)
510 ErrorMessageC (description
, filename
, line
, function
);
515 ExitOnHalt - if HALT is executed then call exit with the exit code, e.
518 extern "C" void M2RTS_ExitOnHalt (int e
)
526 ErrorMessage - emits an error message to stderr and then calls exit (1).
529 extern "C" void M2RTS_ErrorMessage (const char *message_
, unsigned int _message_high
, const char *filename_
, unsigned int _filename_high
, unsigned int line
, const char *function_
, unsigned int _function_high
)
531 typedef struct ErrorMessage__T2_a ErrorMessage__T2
;
533 struct ErrorMessage__T2_a
{ char array
[10+1]; };
534 ErrorMessage__T2 buffer
;
535 char message
[_message_high
+1];
536 char filename
[_filename_high
+1];
537 char function
[_function_high
+1];
539 /* make a local copy of each unbounded array. */
540 memcpy (message
, message_
, _message_high
+1);
541 memcpy (filename
, filename_
, _filename_high
+1);
542 memcpy (function
, function_
, _function_high
+1);
544 ErrorString ((const char *) filename
, _filename_high
);
545 ErrorString ((const char *) ":", 1);
546 NumberIO_CardToStr (line
, 0, (char *) &buffer
.array
[0], 10);
547 ErrorString ((const char *) &buffer
.array
[0], 10);
548 ErrorString ((const char *) ":", 1);
549 if (! (StrLib_StrEqual ((const char *) function
, _function_high
, (const char *) "", 0)))
551 ErrorString ((const char *) "in ", 3);
552 ErrorString ((const char *) function
, _function_high
);
553 ErrorString ((const char *) " has caused ", 12);
555 ErrorString ((const char *) message
, _message_high
);
556 buffer
.array
[0] = ASCII_nl
;
557 buffer
.array
[1] = ASCII_nul
;
558 ErrorString ((const char *) &buffer
.array
[0], 10);
564 Length - returns the length of a string, a. This is called whenever
565 the user calls LENGTH and the parameter cannot be calculated
569 extern "C" unsigned int M2RTS_Length (const char *a_
, unsigned int _a_high
)
575 /* make a local copy of each unbounded array. */
576 memcpy (a
, a_
, _a_high
+1);
580 while ((l
<= h
) && (a
[l
] != ASCII_nul
))
585 /* static analysis guarentees a RETURN statement will be used before here. */
586 __builtin_unreachable ();
589 extern "C" void M2RTS_AssignmentException (void * filename
, unsigned int line
, unsigned int column
, void * scope
, void * message
)
592 The following are the runtime exception handler routines.
594 RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_rangeException
)), filename
, line
, column
, scope
, message
);
597 extern "C" void M2RTS_ReturnException (void * filename
, unsigned int line
, unsigned int column
, void * scope
, void * message
)
599 RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_rangeException
)), filename
, line
, column
, scope
, message
);
602 extern "C" void M2RTS_IncException (void * filename
, unsigned int line
, unsigned int column
, void * scope
, void * message
)
604 RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_rangeException
)), filename
, line
, column
, scope
, message
);
607 extern "C" void M2RTS_DecException (void * filename
, unsigned int line
, unsigned int column
, void * scope
, void * message
)
609 RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_rangeException
)), filename
, line
, column
, scope
, message
);
612 extern "C" void M2RTS_InclException (void * filename
, unsigned int line
, unsigned int column
, void * scope
, void * message
)
614 RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_rangeException
)), filename
, line
, column
, scope
, message
);
617 extern "C" void M2RTS_ExclException (void * filename
, unsigned int line
, unsigned int column
, void * scope
, void * message
)
619 RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_rangeException
)), filename
, line
, column
, scope
, message
);
622 extern "C" void M2RTS_ShiftException (void * filename
, unsigned int line
, unsigned int column
, void * scope
, void * message
)
624 RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_rangeException
)), filename
, line
, column
, scope
, message
);
627 extern "C" void M2RTS_RotateException (void * filename
, unsigned int line
, unsigned int column
, void * scope
, void * message
)
629 RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_rangeException
)), filename
, line
, column
, scope
, message
);
632 extern "C" void M2RTS_StaticArraySubscriptException (void * filename
, unsigned int line
, unsigned int column
, void * scope
, void * message
)
634 RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_indexException
)), filename
, line
, column
, scope
, message
);
637 extern "C" void M2RTS_DynamicArraySubscriptException (void * filename
, unsigned int line
, unsigned int column
, void * scope
, void * message
)
639 RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_indexException
)), filename
, line
, column
, scope
, message
);
642 extern "C" void M2RTS_ForLoopBeginException (void * filename
, unsigned int line
, unsigned int column
, void * scope
, void * message
)
644 RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_rangeException
)), filename
, line
, column
, scope
, message
);
647 extern "C" void M2RTS_ForLoopToException (void * filename
, unsigned int line
, unsigned int column
, void * scope
, void * message
)
649 RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_rangeException
)), filename
, line
, column
, scope
, message
);
652 extern "C" void M2RTS_ForLoopEndException (void * filename
, unsigned int line
, unsigned int column
, void * scope
, void * message
)
654 RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_rangeException
)), filename
, line
, column
, scope
, message
);
657 extern "C" void M2RTS_PointerNilException (void * filename
, unsigned int line
, unsigned int column
, void * scope
, void * message
)
659 RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_invalidLocation
)), filename
, line
, column
, scope
, message
);
662 extern "C" void M2RTS_NoReturnException (void * filename
, unsigned int line
, unsigned int column
, void * scope
, void * message
)
664 RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_functionException
)), filename
, line
, column
, scope
, message
);
667 extern "C" void M2RTS_CaseException (void * filename
, unsigned int line
, unsigned int column
, void * scope
, void * message
)
669 RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_caseSelectException
)), filename
, line
, column
, scope
, message
);
672 extern "C" void M2RTS_WholeNonPosDivException (void * filename
, unsigned int line
, unsigned int column
, void * scope
, void * message
)
674 RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_wholeDivException
)), filename
, line
, column
, scope
, message
);
677 extern "C" void M2RTS_WholeNonPosModException (void * filename
, unsigned int line
, unsigned int column
, void * scope
, void * message
)
679 RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_wholeDivException
)), filename
, line
, column
, scope
, message
);
682 extern "C" void M2RTS_WholeZeroDivException (void * filename
, unsigned int line
, unsigned int column
, void * scope
, void * message
)
684 RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_wholeDivException
)), filename
, line
, column
, scope
, message
);
687 extern "C" void M2RTS_WholeZeroRemException (void * filename
, unsigned int line
, unsigned int column
, void * scope
, void * message
)
689 RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_wholeDivException
)), filename
, line
, column
, scope
, message
);
692 extern "C" void M2RTS_WholeValueException (void * filename
, unsigned int line
, unsigned int column
, void * scope
, void * message
)
694 RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_wholeValueException
)), filename
, line
, column
, scope
, message
);
697 extern "C" void M2RTS_RealValueException (void * filename
, unsigned int line
, unsigned int column
, void * scope
, void * message
)
699 RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_realValueException
)), filename
, line
, column
, scope
, message
);
702 extern "C" void M2RTS_ParameterException (void * filename
, unsigned int line
, unsigned int column
, void * scope
, void * message
)
704 RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_rangeException
)), filename
, line
, column
, scope
, message
);
707 extern "C" void M2RTS_NoException (void * filename
, unsigned int line
, unsigned int column
, void * scope
, void * message
)
709 RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_exException
)), filename
, line
, column
, scope
, message
);
712 extern "C" void _M2_M2RTS_init (__attribute__((unused
)) int argc
, __attribute__((unused
)) char *argv
[], __attribute__((unused
)) char *envp
[])
717 extern "C" void _M2_M2RTS_fini (__attribute__((unused
)) int argc
, __attribute__((unused
)) char *argv
[], __attribute__((unused
)) char *envp
[])