mcflex.c: $(srcdir)/m2/mc/mc.flex
flex -t $< > $@
+m2/gm2-libs-boot/M2RTS.o: $(srcdir)/m2/gm2-libs/M2RTS.mod $(MCDEPS) $(BUILD-BOOT-H)
+ -test -d $(@D) || $(mkinstalldirs) $(@D)
+ $(MC) --suppress-noreturn -o=m2/gm2-libs-boot/M2RTS.c $(srcdir)/m2/gm2-libs/M2RTS.mod
+ $(COMPILER) -c -DIN_GCC $(CFLAGS) -I$(srcdir)/m2 -Im2 -I. -Im2/gm2-libs-boot $(MCINCLUDES) $(INCLUDES) m2/gm2-libs-boot/M2RTS.c -o $@
+
m2/gm2-libs-boot/%.o: $(srcdir)/m2/gm2-libs-boot/%.mod $(MCDEPS) $(BUILD-BOOT-H)
-test -d $(@D) || $(mkinstalldirs) $(@D)
$(MC) -o=m2/gm2-libs-boot/$*.c $(srcdir)/m2/gm2-libs-boot/$*.mod
-test -d m2/gm2-ppg-boot || $(mkinstalldirs) m2/gm2-ppg-boot
$(CXX) -I. -I$(srcdir)/../include -I$(srcdir) -I$(srcdir)/m2/mc-boot-ch -Im2/gm2-libs $(INCLUDES) -g -c $< -o $@
+m2/gm2-ppg-boot/$(SRC_PREFIX)M2RTS.o: $(srcdir)/m2/gm2-libs/M2RTS.mod $(MCDEPS) $(BUILD-BOOT-PPG-H)
+ -test -d m2/gm2-ppg-boot || $(mkinstalldirs) m2/gm2-ppg-boot
+ $(MCC) --suppress-noreturn -o=m2/gm2-ppg-boot/$(SRC_PREFIX)M2RTS.c $(srcdir)/m2/gm2-libs/M2RTS.mod
+ $(CXX) -I. -I$(srcdir)/../include -I$(srcdir) \
+ -Im2/gm2-ppg-boot -I$(srcdir)/m2/mc-boot -Im2/gm2-libs-boot \
+ -I$(srcdir)/m2/mc-boot-ch $(INCLUDES) -g -c m2/gm2-ppg-boot/$(SRC_PREFIX)M2RTS.c -o $@
+
m2/gm2-ppg-boot/$(SRC_PREFIX)%.o: $(srcdir)/m2/gm2-libs/%.mod $(MCDEPS) $(BUILD-BOOT-PPG-H)
-test -d m2/gm2-ppg-boot || $(mkinstalldirs) m2/gm2-ppg-boot
$(MCC) -o=m2/gm2-ppg-boot/$(SRC_PREFIX)$*.c $(srcdir)/m2/gm2-libs/$*.mod
-test -d m2/gm2-pg-boot || $(mkinstalldirs) m2/gm2-pg-boot
$(CXX) -I. -I$(srcdir)/../include -I$(srcdir) -I$(srcdir)/m2/mc-boot-ch -Im2/gm2-libs $(INCLUDES) -g -c $< -o $@
+m2/gm2-pg-boot/$(SRC_PREFIX)M2RTS.o: $(srcdir)/m2/gm2-libs/M2RTS.mod $(MCDEPS) $(BUILD-BOOT-PG-H)
+ -test -d m2/gm2-pg-boot || $(mkinstalldirs) m2/gm2-pg-boot
+ $(MCC) --suppress-noreturn -o=m2/gm2-pg-boot/$(SRC_PREFIX)M2RTS.c $(srcdir)/m2/gm2-libs/M2RTS.mod
+ $(CXX) -I. -I$(srcdir)/../include -I$(srcdir) -Im2/gm2-pg-boot -I$(srcdir)/m2/mc-boot \
+ -I$(srcdir)/m2/mc-boot-ch \
+ -Im2/gm2-libs-boot $(INCLUDES) \
+ -g -c m2/gm2-pg-boot/$(SRC_PREFIX)M2RTS.c -o $@
+
m2/gm2-pg-boot/$(SRC_PREFIX)%.o: $(srcdir)/m2/gm2-libs/%.mod $(MCDEPS) $(BUILD-BOOT-PG-H)
-test -d m2/gm2-pg-boot || $(mkinstalldirs) m2/gm2-pg-boot
$(MCC) -o=m2/gm2-pg-boot/$(SRC_PREFIX)$*.c $(srcdir)/m2/gm2-libs/$*.mod
m2/gm2-pg-boot/$(SRC_PREFIX)%.o: $(srcdir)/m2/gm2-compiler/%.mod $(MCDEPS) $(BUILD-BOOT-PG-H)
-test -d m2/gm2-pg-boot || $(mkinstalldirs) m2/gm2-pg-boot
$(MCC) -o=m2/gm2-pg-boot/$(SRC_PREFIX)$*.c $(srcdir)/m2/gm2-compiler/$*.mod
- $(CXX) -I. -I$(srcdir)/../include -I$(srcdir) -Im2/mc-boot -Im2/gm2-compiler-boot -Im2/gm2-libs-boot \
+ $(CXX) -I. -I$(srcdir)/../include -I$(srcdir) -I$(srcdir)/m2/mc-boot -Im2/gm2-compiler-boot -Im2/gm2-libs-boot \
-I$(srcdir)/m2/mc-boot-ch $(INCLUDES) -g -c m2/gm2-pg-boot/$(SRC_PREFIX)$*.c -o $@
m2/gm2-pg-boot/$(SRC_PREFIX)pg.o: m2/gm2-auto/pg.mod $(MCDEPS) $(BUILD-BOOT-PG-H)
-test -d m2/gm2-pg-boot || $(mkinstalldirs) m2/gm2-pg-boot
$(MCC) -o=m2/gm2-pg-boot/$(SRC_PREFIX)pg.c m2/gm2-auto/pg.mod
- $(CXX) -I. -I$(srcdir)/../include -I$(srcdir) -Im2/mc-boot -Im2/gm2-compiler-boot -Im2/gm2-libs-boot \
+ $(CXX) -I. -I$(srcdir)/../include -I$(srcdir) -I$(srcdir)/m2/mc-boot -Im2/gm2-compiler-boot -Im2/gm2-libs-boot \
-I$(srcdir)/m2/mc-boot-ch $(INCLUDES) -g -c m2/gm2-pg-boot/$(SRC_PREFIX)pg.c -o $@
m2/pg$(exeext): m2/boot-bin/mc \
-test -d m2/gm2-pge-boot || $(mkinstalldirs) m2/gm2-pge-boot
$(CXX) -I. -I$(srcdir)/../include -I$(srcdir) -I$(srcdir)/m2/mc-boot-ch $(INCLUDES) -g -c $< -o $@
+m2/gm2-pge-boot/$(SRC_PREFIX)M2RTS.o: $(srcdir)/m2/gm2-libs/M2RTS.mod $(MCDEPS) $(BUILD-BOOT-PGE-H)
+ -test -d m2/gm2-pge-boot || $(mkinstalldirs) m2/gm2-pge-boot
+ $(MCC) --suppress-noreturn -o=m2/gm2-pge-boot/$(SRC_PREFIX)M2RTS.c $(srcdir)/m2/gm2-libs/M2RTS.mod
+ $(CXX) -I. -I$(srcdir)/../include -I$(srcdir) -I$(srcdir)/m2/gm2-pge-boot -I$(srcdir)/m2/mc-boot \
+ -I$(srcdir)/m2/mc-boot-ch -Im2/gm2-libs-boot \
+ $(INCLUDES) -g -c m2/gm2-pge-boot/$(SRC_PREFIX)M2RTS.c -o $@
+
m2/gm2-pge-boot/$(SRC_PREFIX)%.o: $(srcdir)/m2/gm2-libs/%.mod $(MCDEPS) $(BUILD-BOOT-PGE-H)
-test -d m2/gm2-pge-boot || $(mkinstalldirs) m2/gm2-pge-boot
$(MCC) -o=m2/gm2-pge-boot/$(SRC_PREFIX)$*.c $(srcdir)/m2/gm2-libs/$*.mod
- $(CXX) -I. -I$(srcdir)/../include -I$(srcdir) -Im2/gm2-pge-boot -I$(srcdir)/m2/mc-boot \
+ $(CXX) -I. -I$(srcdir)/../include -I$(srcdir) -I$(srcdir)/m2/gm2-pge-boot -I$(srcdir)/m2/mc-boot \
-I$(srcdir)/m2/mc-boot-ch -Im2/gm2-libs-boot \
$(INCLUDES) -g -c m2/gm2-pge-boot/$(SRC_PREFIX)$*.c -o $@
m2/gm2-pge-boot/$(SRC_PREFIX)%.o: $(srcdir)/m2/gm2-compiler/%.mod $(MCDEPS) $(BUILD-BOOT-PGE-H)
-test -d m2/gm2-pge-boot || $(mkinstalldirs) m2/gm2-pge-boot
$(MCC) -o=m2/gm2-pge-boot/$(SRC_PREFIX)$*.c $(srcdir)/m2/gm2-compiler/$*.mod
- $(CXX) -I. -I$(srcdir)/../include -I$(srcdir) -Im2/mc-boot -Im2/gm2-compiler-boot \
+ $(CXX) -I. -I$(srcdir)/../include -I$(srcdir) -I$(srcdir)/m2/mc-boot -Im2/gm2-compiler-boot \
-Im2/gm2-libs-boot \
-I$(srcdir)/m2/mc-boot-ch $(INCLUDES) -g -c m2/gm2-pge-boot/$(SRC_PREFIX)$*.c -o $@
-test -d m2/gm2-pge-boot || $(mkinstalldirs) m2/gm2-pge-boot
$(MCC) -o=m2/gm2-pge-boot/$(SRC_PREFIX)pge.c m2/gm2-auto/pge.mod
$(CXX) -I. -I$(srcdir)/../include -I$(srcdir) \
- -Im2/mc-boot -Im2/gm2-compiler-boot -Im2/gm2-libs-boot \
+ -I$(srcdir)/m2/mc-boot -Im2/gm2-compiler-boot -Im2/gm2-libs-boot \
-I$(srcdir)/m2/mc-boot-ch $(INCLUDES) -g -c m2/gm2-pge-boot/$(SRC_PREFIX)pge.c -o $@
m2/pge$(exeext): m2/boot-bin/mc \
#include <config.h>
#include "m2rts.h"
+#define LIBNAME "m2pim"
extern "C" int UnixArgs_GetArgC (void);
extern "C" char **UnixArgs_GetArgV (void);
extern "C" void __attribute__((__constructor__))
_M2_UnixArgs_ctor (void)
{
- M2RTS_RegisterModule ("UnixArgs", _M2_UnixArgs_init, _M2_UnixArgs_finish,
+ M2RTS_RegisterModule ("UnixArgs", LIBNAME, _M2_UnixArgs_init, _M2_UnixArgs_finish,
_M2_UnixArgs_dep);
}
#include "gm2-libs-host.h"
#include "m2rts.h"
+#define LIBNAME "m2pim"
+
#ifdef __cplusplus
extern "C" {
#endif
extern "C" void __attribute__((__constructor__))
_M2_dtoa_ctor (void)
{
- M2RTS_RegisterModule ("dtoa", _M2_dtoa_init, _M2_dtoa_finish,
+ M2RTS_RegisterModule ("dtoa", LIBNAME, _M2_dtoa_init, _M2_dtoa_finish,
_M2_dtoa_dep);
}
#include "system.h"
#include "ansidecl.h"
+#define LIBNAME "m2pim"
+
#include "gm2-libs-host.h"
#include "m2rts.h"
extern "C" void __attribute__((__constructor__))
_M2_ldtoa_ctor (void)
{
- M2RTS_RegisterModule ("ldtoa", _M2_ldtoa_init, _M2_ldtoa_finish,
+ M2RTS_RegisterModule ("ldtoa", LIBNAME, _M2_ldtoa_init, _M2_ldtoa_finish,
_M2_ldtoa_dep);
}
typedef void (*proc_dep) (void);
extern "C" void M2RTS_RequestDependant (const char *modulename, const char *dependancy);
-extern "C" void M2RTS_RegisterModule (const char *modulename,
+extern "C" void M2RTS_RegisterModule (const char *modulename, const char *libname,
proc_con init, proc_con fini, proc_dep dependencies);
extern "C" void _M2_M2RTS_init (void);
vector.
*)
-PROCEDURE AttachVector (vec: CARDINAL; p: ADDRESS) : ADDRESS ;
+PROCEDURE AttachVector (vec: CARDINAL; ptr: ADDRESS) : ADDRESS ;
(*
_M2_UnixArgs_dep (void)
{
}
-
-#if 0
-struct _M2_UnixArgs_ctor { _M2_UnixArgs_ctor (); } _M2_UnixArgs_ctor;
-
-_M2_UnixArgs_ctor::_M2_UnixArgs_ctor (void)
-{
- M2RTS_RegisterModule ("UnixArgs", _M2_UnixArgs_init, _M2_UnixArgs_fini,
- _M2_UnixArgs_dep);
-}
-#endif
(*c).next->contents.next = NULL;
ConcatContents (&(*c).next->contents, (const char *) a, _a_high, h, o);
AddDebugInfo ((*c).next);
- (*c).next = AssignDebug ((*c).next, (const char *) "../../gcc/m2/gm2-libs/DynamicStrings.mod", 40, 722, (const char *) "ConcatContents", 14);
+ (*c).next = AssignDebug ((*c).next, (const char *) "../../gcc-read-write/gcc/m2/gm2-libs/DynamicStrings.mod", 55, 722, (const char *) "ConcatContents", 14);
}
else
{
AddDebugInfo ((*c).next);
if (TraceOn)
{
- (*c).next = AssignDebug ((*c).next, (const char *) "../../gcc/m2/gm2-libs/DynamicStrings.mod", 40, 917, (const char *) "ConcatContentsAddress", 21);
+ (*c).next = AssignDebug ((*c).next, (const char *) "../../gcc-read-write/gcc/m2/gm2-libs/DynamicStrings.mod", 55, 917, (const char *) "ConcatContentsAddress", 21);
}
}
else
AddDebugInfo (s);
if (TraceOn)
{
- s = AssignDebug (s, (const char *) "../../gcc/m2/gm2-libs/DynamicStrings.mod", 40, 758, (const char *) "InitString", 10);
+ s = AssignDebug (s, (const char *) "../../gcc-read-write/gcc/m2/gm2-libs/DynamicStrings.mod", 55, 758, (const char *) "InitString", 10);
}
return s;
/* static analysis guarentees a RETURN statement will be used before here. */
AddDebugInfo (s);
if (TraceOn)
{
- s = AssignDebug (s, (const char *) "../../gcc/m2/gm2-libs/DynamicStrings.mod", 40, 957, (const char *) "InitStringCharStar", 18);
+ s = AssignDebug (s, (const char *) "../../gcc-read-write/gcc/m2/gm2-libs/DynamicStrings.mod", 55, 957, (const char *) "InitStringCharStar", 18);
}
return s;
/* static analysis guarentees a RETURN statement will be used before here. */
s = DynamicStrings_InitString ((const char *) &a.array[0], 1);
if (TraceOn)
{
- s = AssignDebug (s, (const char *) "../../gcc/m2/gm2-libs/DynamicStrings.mod", 40, 977, (const char *) "InitStringChar", 14);
+ s = AssignDebug (s, (const char *) "../../gcc-read-write/gcc/m2/gm2-libs/DynamicStrings.mod", 55, 977, (const char *) "InitStringChar", 14);
}
return s;
/* static analysis guarentees a RETURN statement will be used before here. */
s = DynamicStrings_Assign (DynamicStrings_InitString ((const char *) "", 0), s);
if (TraceOn)
{
- s = AssignDebug (s, (const char *) "../../gcc/m2/gm2-libs/DynamicStrings.mod", 40, 1173, (const char *) "Dup", 3);
+ s = AssignDebug (s, (const char *) "../../gcc-read-write/gcc/m2/gm2-libs/DynamicStrings.mod", 55, 1173, (const char *) "Dup", 3);
}
return s;
/* static analysis guarentees a RETURN statement will be used before here. */
a = DynamicStrings_ConCat (DynamicStrings_ConCat (DynamicStrings_InitString ((const char *) "", 0), a), b);
if (TraceOn)
{
- a = AssignDebug (a, (const char *) "../../gcc/m2/gm2-libs/DynamicStrings.mod", 40, 1193, (const char *) "Add", 3);
+ a = AssignDebug (a, (const char *) "../../gcc-read-write/gcc/m2/gm2-libs/DynamicStrings.mod", 55, 1193, (const char *) "Add", 3);
}
return a;
/* static analysis guarentees a RETURN statement will be used before here. */
t = DynamicStrings_InitStringCharStar (a);
if (TraceOn)
{
- t = AssignDebug (t, (const char *) "../../gcc/m2/gm2-libs/DynamicStrings.mod", 40, 1250, (const char *) "EqualCharStar", 13);
+ t = AssignDebug (t, (const char *) "../../gcc-read-write/gcc/m2/gm2-libs/DynamicStrings.mod", 55, 1250, (const char *) "EqualCharStar", 13);
}
t = AddToGarbage (t, s);
if (DynamicStrings_Equal (t, s))
t = DynamicStrings_InitString ((const char *) a, _a_high);
if (TraceOn)
{
- t = AssignDebug (t, (const char *) "../../gcc/m2/gm2-libs/DynamicStrings.mod", 40, 1280, (const char *) "EqualArray", 10);
+ t = AssignDebug (t, (const char *) "../../gcc-read-write/gcc/m2/gm2-libs/DynamicStrings.mod", 55, 1280, (const char *) "EqualArray", 10);
}
t = AddToGarbage (t, s);
if (DynamicStrings_Equal (t, s))
}
if (TraceOn)
{
- s = AssignDebug (s, (const char *) "../../gcc/m2/gm2-libs/DynamicStrings.mod", 40, 1312, (const char *) "Mult", 4);
+ s = AssignDebug (s, (const char *) "../../gcc-read-write/gcc/m2/gm2-libs/DynamicStrings.mod", 55, 1312, (const char *) "Mult", 4);
}
return s;
/* static analysis guarentees a RETURN statement will be used before here. */
AddDebugInfo (t->contents.next);
if (TraceOn)
{
- t->contents.next = AssignDebug (t->contents.next, (const char *) "../../gcc/m2/gm2-libs/DynamicStrings.mod", 40, 1380, (const char *) "Slice", 5);
+ t->contents.next = AssignDebug (t->contents.next, (const char *) "../../gcc-read-write/gcc/m2/gm2-libs/DynamicStrings.mod", 55, 1380, (const char *) "Slice", 5);
}
}
t = t->contents.next;
}
if (TraceOn)
{
- d = AssignDebug (d, (const char *) "../../gcc/m2/gm2-libs/DynamicStrings.mod", 40, 1397, (const char *) "Slice", 5);
+ d = AssignDebug (d, (const char *) "../../gcc-read-write/gcc/m2/gm2-libs/DynamicStrings.mod", 55, 1397, (const char *) "Slice", 5);
}
return d;
/* static analysis guarentees a RETURN statement will be used before here. */
}
if (TraceOn)
{
- s = AssignDebug (s, (const char *) "../../gcc/m2/gm2-libs/DynamicStrings.mod", 40, 1509, (const char *) "RemoveComment", 13);
+ s = AssignDebug (s, (const char *) "../../gcc-read-write/gcc/m2/gm2-libs/DynamicStrings.mod", 55, 1509, (const char *) "RemoveComment", 13);
}
return s;
/* static analysis guarentees a RETURN statement will be used before here. */
s = DynamicStrings_Slice (s, (int ) (i), 0);
if (TraceOn)
{
- s = AssignDebug (s, (const char *) "../../gcc/m2/gm2-libs/DynamicStrings.mod", 40, 1621, (const char *) "RemoveWhitePrefix", 17);
+ s = AssignDebug (s, (const char *) "../../gcc-read-write/gcc/m2/gm2-libs/DynamicStrings.mod", 55, 1621, (const char *) "RemoveWhitePrefix", 17);
}
return s;
/* static analysis guarentees a RETURN statement will be used before here. */
s = DynamicStrings_Slice (s, 0, i+1);
if (TraceOn)
{
- s = AssignDebug (s, (const char *) "../../gcc/m2/gm2-libs/DynamicStrings.mod", 40, 1643, (const char *) "RemoveWhitePostfix", 18);
+ s = AssignDebug (s, (const char *) "../../gcc-read-write/gcc/m2/gm2-libs/DynamicStrings.mod", 55, 1643, (const char *) "RemoveWhitePostfix", 18);
}
return s;
/* static analysis guarentees a RETURN statement will be used before here. */
{
stop ();
/* writeString ("mismatched number of PopAllocation's compared to PushAllocation's") */
- M2RTS_Halt ((const char *) "../../gcc/m2/gm2-libs/DynamicStrings.mod", 40, 176, (const char *) "PopAllocationExemption", 22, (const char *) "mismatched number of PopAllocation's compared to PushAllocation's", 65);
+ M2RTS_Halt ((const char *) "../../gcc-read-write/gcc/m2/gm2-libs/DynamicStrings.mod", 55, 176, (const char *) "PopAllocationExemption", 22, (const char *) "mismatched number of PopAllocation's compared to PushAllocation's", 65);
}
else
{
return f; /* create new slot */
}
}
- ReturnException ("../../gcc/m2/gm2-libs/FIO.def", 25, 1);
+ ReturnException ("../../gcc-read-write/gcc/m2/gm2-libs/FIO.def", 25, 1);
__builtin_unreachable ();
}
{
return (n >= i->Low) && (n <= i->High);
}
- ReturnException ("../../gcc/m2/mc/Indexing.def", 20, 1);
+ ReturnException ("../../gcc-read-write/gcc/m2/mc/Indexing.def", 20, 1);
__builtin_unreachable ();
}
{
return i->High;
}
- ReturnException ("../../gcc/m2/mc/Indexing.def", 20, 1);
+ ReturnException ("../../gcc-read-write/gcc/m2/mc/Indexing.def", 20, 1);
__builtin_unreachable ();
}
{
return i->Low;
}
- ReturnException ("../../gcc/m2/mc/Indexing.def", 20, 1);
+ ReturnException ("../../gcc-read-write/gcc/m2/mc/Indexing.def", 20, 1);
__builtin_unreachable ();
}
n = RTExceptions_GetNumber (e);
if (n == (UINT_MAX))
{
- RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_exException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc/m2/gm2-libs/M2EXCEPTION.mod")), 47, 6, const_cast<void*> (reinterpret_cast<const void*>("M2Exception")), const_cast<void*> (reinterpret_cast<const void*>("current coroutine is not in the exceptional execution state")));
+ RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_exException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc-read-write/gcc/m2/gm2-libs/M2EXCEPTION.mod")), 47, 6, const_cast<void*> (reinterpret_cast<const void*>("M2Exception")), const_cast<void*> (reinterpret_cast<const void*>("current coroutine is not in the exceptional execution state")));
}
else
{
return (M2EXCEPTION_M2Exceptions) (n);
}
- ReturnException ("../../gcc/m2/gm2-libs/M2EXCEPTION.def", 25, 1);
+ ReturnException ("../../gcc-read-write/gcc/m2/gm2-libs/M2EXCEPTION.def", 25, 1);
__builtin_unreachable ();
}
}
else
{
- Debug_Halt ((const char *) "max push back stack exceeded, increase MaxPushBackStack", 55, 150, (const char *) "../../gcc/m2/gm2-libs/PushBackInput.mod", 39);
+ Debug_Halt ((const char *) "max push back stack exceeded, increase MaxPushBackStack", 55, 150, (const char *) "../../gcc-read-write/gcc/m2/gm2-libs/PushBackInput.mod", 54);
}
return ch;
/* static analysis guarentees a RETURN statement will be used before here. */
l -= 1;
if ((PushBackInput_PutCh (a[l])) != a[l])
{
- Debug_Halt ((const char *) "assert failed", 13, 132, (const char *) "../../gcc/m2/gm2-libs/PushBackInput.mod", 39);
+ Debug_Halt ((const char *) "assert failed", 13, 132, (const char *) "../../gcc-read-write/gcc/m2/gm2-libs/PushBackInput.mod", 54);
}
}
}
i -= 1;
if ((PushBackInput_PutCh (DynamicStrings_char (s, static_cast<int> (i)))) != (DynamicStrings_char (s, static_cast<int> (i))))
{
- Debug_Halt ((const char *) "assert failed", 13, 113, (const char *) "../../gcc/m2/gm2-libs/PushBackInput.mod", 39);
+ Debug_Halt ((const char *) "assert failed", 13, 113, (const char *) "../../gcc-read-write/gcc/m2/gm2-libs/PushBackInput.mod", 54);
}
}
}
static void indexf (void * a)
{
- RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_indexException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc/m2/gm2-libs/RTExceptions.mod")), 613, 9, const_cast<void*> (reinterpret_cast<const void*>("indexf")), const_cast<void*> (reinterpret_cast<const void*>("array index out of bounds")));
+ RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_indexException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 613, 9, const_cast<void*> (reinterpret_cast<const void*>("indexf")), const_cast<void*> (reinterpret_cast<const void*>("array index out of bounds")));
}
static void range (void * a)
{
- RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_rangeException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc/m2/gm2-libs/RTExceptions.mod")), 625, 9, const_cast<void*> (reinterpret_cast<const void*>("range")), const_cast<void*> (reinterpret_cast<const void*>("assignment out of range")));
+ RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_rangeException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 625, 9, const_cast<void*> (reinterpret_cast<const void*>("range")), const_cast<void*> (reinterpret_cast<const void*>("assignment out of range")));
}
static void casef (void * a)
{
- RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_caseSelectException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc/m2/gm2-libs/RTExceptions.mod")), 637, 9, const_cast<void*> (reinterpret_cast<const void*>("casef")), const_cast<void*> (reinterpret_cast<const void*>("case selector out of range")));
+ RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_caseSelectException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 637, 9, const_cast<void*> (reinterpret_cast<const void*>("casef")), const_cast<void*> (reinterpret_cast<const void*>("case selector out of range")));
}
static void invalidloc (void * a)
{
- RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_invalidLocation)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc/m2/gm2-libs/RTExceptions.mod")), 649, 9, const_cast<void*> (reinterpret_cast<const void*>("invalidloc")), const_cast<void*> (reinterpret_cast<const void*>("invalid address referenced")));
+ RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_invalidLocation)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 649, 9, const_cast<void*> (reinterpret_cast<const void*>("invalidloc")), const_cast<void*> (reinterpret_cast<const void*>("invalid address referenced")));
}
static void function (void * a)
{
- RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_functionException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc/m2/gm2-libs/RTExceptions.mod")), 661, 9, const_cast<void*> (reinterpret_cast<const void*>("function")), const_cast<void*> (reinterpret_cast<const void*>("... function ... "))); /* --fixme-- what has happened ? */
+ RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_functionException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 661, 9, const_cast<void*> (reinterpret_cast<const void*>("function")), const_cast<void*> (reinterpret_cast<const void*>("... function ... "))); /* --fixme-- what has happened ? */
}
static void wholevalue (void * a)
{
- RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_wholeValueException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc/m2/gm2-libs/RTExceptions.mod")), 673, 9, const_cast<void*> (reinterpret_cast<const void*>("wholevalue")), const_cast<void*> (reinterpret_cast<const void*>("illegal whole value exception")));
+ RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_wholeValueException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 673, 9, const_cast<void*> (reinterpret_cast<const void*>("wholevalue")), const_cast<void*> (reinterpret_cast<const void*>("illegal whole value exception")));
}
static void wholediv (void * a)
{
- RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_wholeDivException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc/m2/gm2-libs/RTExceptions.mod")), 685, 9, const_cast<void*> (reinterpret_cast<const void*>("wholediv")), const_cast<void*> (reinterpret_cast<const void*>("illegal whole value exception")));
+ RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_wholeDivException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 685, 9, const_cast<void*> (reinterpret_cast<const void*>("wholediv")), const_cast<void*> (reinterpret_cast<const void*>("illegal whole value exception")));
}
static void realvalue (void * a)
{
- RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_realValueException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc/m2/gm2-libs/RTExceptions.mod")), 697, 9, const_cast<void*> (reinterpret_cast<const void*>("realvalue")), const_cast<void*> (reinterpret_cast<const void*>("illegal real value exception")));
+ RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_realValueException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 697, 9, const_cast<void*> (reinterpret_cast<const void*>("realvalue")), const_cast<void*> (reinterpret_cast<const void*>("illegal real value exception")));
}
static void realdiv (void * a)
{
- RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_realDivException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc/m2/gm2-libs/RTExceptions.mod")), 709, 9, const_cast<void*> (reinterpret_cast<const void*>("realdiv")), const_cast<void*> (reinterpret_cast<const void*>("real number division by zero exception")));
+ RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_realDivException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 709, 9, const_cast<void*> (reinterpret_cast<const void*>("realdiv")), const_cast<void*> (reinterpret_cast<const void*>("real number division by zero exception")));
}
static void complexvalue (void * a)
{
- RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_complexValueException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc/m2/gm2-libs/RTExceptions.mod")), 721, 9, const_cast<void*> (reinterpret_cast<const void*>("complexvalue")), const_cast<void*> (reinterpret_cast<const void*>("illegal complex value exception")));
+ RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_complexValueException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 721, 9, const_cast<void*> (reinterpret_cast<const void*>("complexvalue")), const_cast<void*> (reinterpret_cast<const void*>("illegal complex value exception")));
}
static void complexdiv (void * a)
{
- RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_complexDivException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc/m2/gm2-libs/RTExceptions.mod")), 733, 9, const_cast<void*> (reinterpret_cast<const void*>("complexdiv")), const_cast<void*> (reinterpret_cast<const void*>("complex number division by zero exception")));
+ RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_complexDivException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 733, 9, const_cast<void*> (reinterpret_cast<const void*>("complexdiv")), const_cast<void*> (reinterpret_cast<const void*>("complex number division by zero exception")));
}
static void protection (void * a)
{
- RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_protException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc/m2/gm2-libs/RTExceptions.mod")), 745, 9, const_cast<void*> (reinterpret_cast<const void*>("protection")), const_cast<void*> (reinterpret_cast<const void*>("protection exception")));
+ RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_protException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 745, 9, const_cast<void*> (reinterpret_cast<const void*>("protection")), const_cast<void*> (reinterpret_cast<const void*>("protection exception")));
}
static void systemf (void * a)
{
- RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_sysException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc/m2/gm2-libs/RTExceptions.mod")), 757, 9, const_cast<void*> (reinterpret_cast<const void*>("systemf")), const_cast<void*> (reinterpret_cast<const void*>("system exception")));
+ RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_sysException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 757, 9, const_cast<void*> (reinterpret_cast<const void*>("systemf")), const_cast<void*> (reinterpret_cast<const void*>("system exception")));
}
static void coroutine (void * a)
{
- RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_coException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc/m2/gm2-libs/RTExceptions.mod")), 769, 9, const_cast<void*> (reinterpret_cast<const void*>("coroutine")), const_cast<void*> (reinterpret_cast<const void*>("coroutine exception")));
+ RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_coException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 769, 9, const_cast<void*> (reinterpret_cast<const void*>("coroutine")), const_cast<void*> (reinterpret_cast<const void*>("coroutine exception")));
}
static void exception (void * a)
{
- RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_exException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc/m2/gm2-libs/RTExceptions.mod")), 781, 9, const_cast<void*> (reinterpret_cast<const void*>("exception")), const_cast<void*> (reinterpret_cast<const void*>("exception exception")));
+ RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_exException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 781, 9, const_cast<void*> (reinterpret_cast<const void*>("exception")), const_cast<void*> (reinterpret_cast<const void*>("exception exception")));
}
{
if (currentEHB == NULL)
{
- M2RTS_Halt ((const char *) "../../gcc/m2/gm2-libs/RTExceptions.mod", 38, 599, (const char *) "GetBaseExceptionBlock", 21, (const char *) "currentEHB has not been initialized yet", 39);
+ M2RTS_Halt ((const char *) "../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod", 53, 599, (const char *) "GetBaseExceptionBlock", 21, (const char *) "currentEHB has not been initialized yet", 39);
}
else
{
return currentEHB;
}
- ReturnException ("../../gcc/m2/gm2-libs/RTExceptions.def", 25, 1);
+ ReturnException ("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.def", 25, 1);
__builtin_unreachable ();
}
extern "C" void RTint_GetTimeVector (unsigned int vec, unsigned int *micro, unsigned int *secs);
/*
- AttachVector - adds the pointer, p, to be associated with the interrupt
+ AttachVector - adds the pointer ptr to be associated with the interrupt
vector. It returns the previous value attached to this
vector.
*/
-extern "C" void * RTint_AttachVector (unsigned int vec, void * p);
+extern "C" void * RTint_AttachVector (unsigned int vec, void * ptr);
/*
IncludeVector - includes, vec, into the dispatcher list of
static int Min (int i, int j);
/*
- FindVector - searches the exists list for a vector of type, t,
+ FindVector - searches the exists list for a vector of type
which is associated with file descriptor, fd.
*/
-static RTint_Vector FindVector (int fd, RTint_VectorType t);
+static RTint_Vector FindVector (int fd, RTint_VectorType type);
/*
- FindVectorNo - searches the Exists list for vector, vec.
+ FindVectorNo - searches the Exists list for vector vec.
*/
static RTint_Vector FindVectorNo (unsigned int vec);
static RTint_Vector FindPendingVector (unsigned int vec);
/*
- AddFd - adds the file descriptor, fd, to set, s, updating, max.
+ AddFd - adds the file descriptor fd to set updating max.
*/
-static void AddFd (Selective_SetOfFd *s, int *max, int fd);
+static void AddFd (Selective_SetOfFd *set, int *max, int fd);
/*
DumpPendingQueue - displays the pending queue.
static void DumpPendingQueue (void);
-/*
- DumpPendingQueue - displays the pending queue.
-*/
-
-static void stop (void);
-
/*
AddTime - t1 := t1 + t2
*/
activatePending - activates the first interrupt pending and clears it.
*/
-static unsigned int activatePending (unsigned int untilInterrupt, RTint_DispatchVector call, unsigned int pri, int maxFd, Selective_SetOfFd *i, Selective_SetOfFd *o, Selective_Timeval *t, Selective_Timeval b4, Selective_Timeval after);
+static unsigned int activatePending (unsigned int untilInterrupt, RTint_DispatchVector call, unsigned int pri, int maxFd, Selective_SetOfFd *inSet, Selective_SetOfFd *outSet, Selective_Timeval *timeval, Selective_Timeval b4, Selective_Timeval after);
/*
init -
/*
- FindVector - searches the exists list for a vector of type, t,
+ FindVector - searches the exists list for a vector of type
which is associated with file descriptor, fd.
*/
-static RTint_Vector FindVector (int fd, RTint_VectorType t)
+static RTint_Vector FindVector (int fd, RTint_VectorType type)
{
- RTint_Vector v;
+ RTint_Vector vec;
- v = Exists;
- while (v != NULL)
+ vec = Exists;
+ while (vec != NULL)
{
- if ((v->type == t) && (v->File == fd))
+ if ((vec->type == type) && (vec->File == fd))
{
- return v;
+ return vec;
}
- v = v->exists;
+ vec = vec->exists;
}
return NULL;
/* static analysis guarentees a RETURN statement will be used before here. */
/*
- FindVectorNo - searches the Exists list for vector, vec.
+ FindVectorNo - searches the Exists list for vector vec.
*/
static RTint_Vector FindVectorNo (unsigned int vec)
{
- RTint_Vector v;
+ RTint_Vector vptr;
- v = Exists;
- while ((v != NULL) && (v->no != vec))
+ vptr = Exists;
+ while ((vptr != NULL) && (vptr->no != vec))
{
- v = v->exists;
+ vptr = vptr->exists;
}
- return v;
+ return vptr;
/* static analysis guarentees a RETURN statement will be used before here. */
__builtin_unreachable ();
}
static RTint_Vector FindPendingVector (unsigned int vec)
{
- unsigned int i;
- RTint_Vector v;
+ unsigned int pri;
+ RTint_Vector vptr;
- for (i=COROUTINES_UnassignedPriority; i<=7; i++)
+ for (pri=COROUTINES_UnassignedPriority; pri<=7; pri++)
{
- v = Pending.array[i-(COROUTINES_UnassignedPriority)];
- while ((v != NULL) && (v->no != vec))
+ vptr = Pending.array[pri-(COROUTINES_UnassignedPriority)];
+ while ((vptr != NULL) && (vptr->no != vec))
{
- v = v->pending;
+ vptr = vptr->pending;
}
- if ((v != NULL) && (v->no == vec))
+ if ((vptr != NULL) && (vptr->no == vec))
{
- return v;
+ return vptr;
}
}
return NULL;
/*
- AddFd - adds the file descriptor, fd, to set, s, updating, max.
+ AddFd - adds the file descriptor fd to set updating max.
*/
-static void AddFd (Selective_SetOfFd *s, int *max, int fd)
+static void AddFd (Selective_SetOfFd *set, int *max, int fd)
{
(*max) = Max (fd, (*max));
- if ((*s) == NULL)
+ if ((*set) == NULL)
{
- (*s) = Selective_InitSet ();
- Selective_FdZero ((*s));
+ (*set) = Selective_InitSet ();
+ Selective_FdZero ((*set));
}
/* printf('%d, ', fd) */
- Selective_FdSet (fd, (*s));
+ Selective_FdSet (fd, (*set));
}
static void DumpPendingQueue (void)
{
- COROUTINES_PROTECTION p;
- RTint_Vector v;
- unsigned int s;
- unsigned int m;
+ COROUTINES_PROTECTION pri;
+ RTint_Vector vptr;
+ unsigned int sec;
+ unsigned int micro;
libc_printf ((const char *) "Pending queue\\n", 15);
- for (p=COROUTINES_UnassignedPriority; p<=7; p++)
+ for (pri=COROUTINES_UnassignedPriority; pri<=7; pri++)
{
- libc_printf ((const char *) "[%d] ", 6, p);
- v = Pending.array[p-(COROUTINES_UnassignedPriority)];
- while (v != NULL)
+ libc_printf ((const char *) "[%d] ", 6, pri);
+ vptr = Pending.array[pri-(COROUTINES_UnassignedPriority)];
+ while (vptr != NULL)
{
- if ((v->type == RTint_input) || (v->type == RTint_output))
+ if ((vptr->type == RTint_input) || (vptr->type == RTint_output))
{
- libc_printf ((const char *) "(fd=%d) (vec=%d)", 16, v->File, v->no);
+ libc_printf ((const char *) "(fd=%d) (vec=%d)", 16, vptr->File, vptr->no);
}
- else if (v->type == RTint_time)
+ else if (vptr->type == RTint_time)
{
/* avoid dangling else. */
- Selective_GetTime (v->rel, &s, &m);
- Assertion_Assert (m < Microseconds);
- libc_printf ((const char *) "time (%u.%06u secs) (arg = 0x%x)\\n", 34, s, m, v->arg);
+ Selective_GetTime (vptr->rel, &sec, µ);
+ Assertion_Assert (micro < Microseconds);
+ libc_printf ((const char *) "time (%u.%06u secs) (arg = %p)\\n", 32, sec, micro, vptr->arg);
}
- v = v->pending;
+ vptr = vptr->pending;
}
libc_printf ((const char *) " \\n", 3);
}
}
-/*
- DumpPendingQueue - displays the pending queue.
-*/
-
-static void stop (void)
-{
-}
-
-
/*
AddTime - t1 := t1 + t2
*/
activatePending - activates the first interrupt pending and clears it.
*/
-static unsigned int activatePending (unsigned int untilInterrupt, RTint_DispatchVector call, unsigned int pri, int maxFd, Selective_SetOfFd *i, Selective_SetOfFd *o, Selective_Timeval *t, Selective_Timeval b4, Selective_Timeval after)
+static unsigned int activatePending (unsigned int untilInterrupt, RTint_DispatchVector call, unsigned int pri, int maxFd, Selective_SetOfFd *inSet, Selective_SetOfFd *outSet, Selective_Timeval *timeval, Selective_Timeval b4, Selective_Timeval after)
{
- int r;
+ int result;
unsigned int p;
- RTint_Vector v;
+ RTint_Vector vec;
unsigned int b4s;
unsigned int b4m;
unsigned int afs;
unsigned int afm;
- unsigned int s;
- unsigned int m;
+ unsigned int sec;
+ unsigned int micro;
RTco_wait (lock);
p = static_cast<unsigned int> (7);
while (p > pri)
{
- v = Pending.array[p-(COROUTINES_UnassignedPriority)];
- while (v != NULL)
+ vec = Pending.array[p-(COROUTINES_UnassignedPriority)];
+ while (vec != NULL)
{
- switch (v->type)
+ switch (vec->type)
{
case RTint_input:
- if (((v->File < maxFd) && ((*i) != NULL)) && (Selective_FdIsSet (v->File, (*i))))
+ if (((vec->File < maxFd) && ((*inSet) != NULL)) && (Selective_FdIsSet (vec->File, (*inSet))))
{
if (Debugging)
{
- libc_printf ((const char *) "read (fd=%d) is ready (vec=%d)\\n", 32, v->File, v->no);
+ libc_printf ((const char *) "read (fd=%d) is ready (vec=%d)\\n", 32, vec->File, vec->no);
DumpPendingQueue ();
}
- Selective_FdClr (v->File, (*i)); /* so we dont activate this again from our select. */
+ Selective_FdClr (vec->File, (*inSet)); /* so we dont activate this again from our select. */
RTco_signal (lock); /* so we dont activate this again from our select. */
- (*call.proc) (v->no, v->priority, v->arg);
+ (*call.proc) (vec->no, vec->priority, vec->arg);
return TRUE;
}
break;
case RTint_output:
- if (((v->File < maxFd) && ((*o) != NULL)) && (Selective_FdIsSet (v->File, (*o))))
+ if (((vec->File < maxFd) && ((*outSet) != NULL)) && (Selective_FdIsSet (vec->File, (*outSet))))
{
if (Debugging)
{
- libc_printf ((const char *) "write (fd=%d) is ready (vec=%d)\\n", 33, v->File, v->no);
+ libc_printf ((const char *) "write (fd=%d) is ready (vec=%d)\\n", 33, vec->File, vec->no);
DumpPendingQueue ();
}
- Selective_FdClr (v->File, (*o)); /* so we dont activate this again from our select. */
+ Selective_FdClr (vec->File, (*outSet)); /* so we dont activate this again from our select. */
RTco_signal (lock); /* so we dont activate this again from our select. */
- (*call.proc) (v->no, v->priority, v->arg);
+ (*call.proc) (vec->no, vec->priority, vec->arg);
return TRUE;
}
break;
case RTint_time:
- if (untilInterrupt && ((*t) != NULL))
+ if (untilInterrupt && ((*timeval) != NULL))
{
- r = Selective_GetTimeOfDay (after);
- Assertion_Assert (r == 0);
+ result = Selective_GetTimeOfDay (after);
+ Assertion_Assert (result == 0);
if (Debugging)
{
- Selective_GetTime ((*t), &s, &m);
- Assertion_Assert (m < Microseconds);
+ Selective_GetTime ((*timeval), &sec, µ);
+ Assertion_Assert (micro < Microseconds);
Selective_GetTime (after, &afs, &afm);
Assertion_Assert (afm < Microseconds);
Selective_GetTime (b4, &b4s, &b4m);
Assertion_Assert (b4m < Microseconds);
- libc_printf ((const char *) "waited %u.%06u + %u.%06u now is %u.%06u\\n", 41, s, m, b4s, b4m, afs, afm);
+ libc_printf ((const char *) "waited %u.%06u + %u.%06u now is %u.%06u\\n", 41, sec, micro, b4s, b4m, afs, afm);
}
- if (IsGreaterEqual (after, v->abs_))
+ if (IsGreaterEqual (after, vec->abs_))
{
if (Debugging)
{
DumpPendingQueue ();
libc_printf ((const char *) "time has expired calling dispatcher\\n", 37);
}
- (*t) = Selective_KillTime ((*t)); /* so we dont activate this again from our select. */
+ (*timeval) = Selective_KillTime ((*timeval)); /* so we dont activate this again from our select. */
RTco_signal (lock); /* so we dont activate this again from our select. */
if (Debugging)
{
- libc_printf ((const char *) "call (%d, %d, 0x%x)\\n", 21, v->no, v->priority, v->arg);
+ libc_printf ((const char *) "call (%d, %d, 0x%x)\\n", 21, vec->no, vec->priority, vec->arg);
}
- (*call.proc) (v->no, v->priority, v->arg);
+ (*call.proc) (vec->no, vec->priority, vec->arg);
return TRUE;
}
else if (Debugging)
default:
- CaseException ("../../gcc/m2/gm2-libs/RTint.def", 25, 1);
+ CaseException ("../../gcc-read-write/gcc/m2/gm2-libs/RTint.def", 25, 1);
__builtin_unreachable ();
}
- v = v->pending;
+ vec = vec->pending;
}
p -= 1;
}
extern "C" unsigned int RTint_InitInputVector (int fd, unsigned int pri)
{
- RTint_Vector v;
+ RTint_Vector vptr;
if (Debugging)
{
libc_printf ((const char *) "InitInputVector fd = %d priority = %d\\n", 39, fd, pri);
}
RTco_wait (lock);
- v = FindVector (fd, RTint_input);
- if (v == NULL)
+ vptr = FindVector (fd, RTint_input);
+ if (vptr == NULL)
{
- Storage_ALLOCATE ((void **) &v, sizeof (RTint__T1));
+ Storage_ALLOCATE ((void **) &vptr, sizeof (RTint__T1));
VecNo += 1;
- v->type = RTint_input;
- v->priority = pri;
- v->arg = NULL;
- v->pending = NULL;
- v->exists = Exists;
- v->no = VecNo;
- v->File = fd;
- Exists = v;
+ vptr->type = RTint_input;
+ vptr->priority = pri;
+ vptr->arg = NULL;
+ vptr->pending = NULL;
+ vptr->exists = Exists;
+ vptr->no = VecNo;
+ vptr->File = fd;
+ Exists = vptr;
RTco_signal (lock);
return VecNo;
}
else
{
RTco_signal (lock);
- return v->no;
+ return vptr->no;
}
/* static analysis guarentees a RETURN statement will be used before here. */
__builtin_unreachable ();
extern "C" unsigned int RTint_InitOutputVector (int fd, unsigned int pri)
{
- RTint_Vector v;
+ RTint_Vector vptr;
RTco_wait (lock);
- v = FindVector (fd, RTint_output);
- if (v == NULL)
+ vptr = FindVector (fd, RTint_output);
+ if (vptr == NULL)
{
- Storage_ALLOCATE ((void **) &v, sizeof (RTint__T1));
- if (v == NULL)
+ Storage_ALLOCATE ((void **) &vptr, sizeof (RTint__T1));
+ if (vptr == NULL)
{
M2RTS_HALT (-1);
__builtin_unreachable ();
else
{
VecNo += 1;
- v->type = RTint_output;
- v->priority = pri;
- v->arg = NULL;
- v->pending = NULL;
- v->exists = Exists;
- v->no = VecNo;
- v->File = fd;
- Exists = v;
+ vptr->type = RTint_output;
+ vptr->priority = pri;
+ vptr->arg = NULL;
+ vptr->pending = NULL;
+ vptr->exists = Exists;
+ vptr->no = VecNo;
+ vptr->File = fd;
+ Exists = vptr;
RTco_signal (lock);
return VecNo;
}
else
{
RTco_signal (lock);
- return v->no;
+ return vptr->no;
}
- ReturnException ("../../gcc/m2/gm2-libs/RTint.def", 25, 1);
+ ReturnException ("../../gcc-read-write/gcc/m2/gm2-libs/RTint.def", 25, 1);
__builtin_unreachable ();
}
extern "C" unsigned int RTint_InitTimeVector (unsigned int micro, unsigned int secs, unsigned int pri)
{
- RTint_Vector v;
+ RTint_Vector vptr;
RTco_wait (lock);
- Storage_ALLOCATE ((void **) &v, sizeof (RTint__T1));
- if (v == NULL)
+ Storage_ALLOCATE ((void **) &vptr, sizeof (RTint__T1));
+ if (vptr == NULL)
{
M2RTS_HALT (-1);
__builtin_unreachable ();
{
VecNo += 1;
Assertion_Assert (micro < Microseconds);
- v->type = RTint_time;
- v->priority = pri;
- v->arg = NULL;
- v->pending = NULL;
- v->exists = Exists;
- v->no = VecNo;
- v->rel = Selective_InitTime (secs+DebugTime, micro);
- v->abs_ = Selective_InitTime (0, 0);
- v->queued = FALSE;
- Exists = v;
+ vptr->type = RTint_time;
+ vptr->priority = pri;
+ vptr->arg = NULL;
+ vptr->pending = NULL;
+ vptr->exists = Exists;
+ vptr->no = VecNo;
+ vptr->rel = Selective_InitTime (secs+DebugTime, micro);
+ vptr->abs_ = Selective_InitTime (0, 0);
+ vptr->queued = FALSE;
+ Exists = vptr;
}
RTco_signal (lock);
return VecNo;
extern "C" void RTint_ReArmTimeVector (unsigned int vec, unsigned int micro, unsigned int secs)
{
- RTint_Vector v;
+ RTint_Vector vptr;
Assertion_Assert (micro < Microseconds);
RTco_wait (lock);
- v = FindVectorNo (vec);
- if (v == NULL)
+ vptr = FindVectorNo (vec);
+ if (vptr == NULL)
{
- M2RTS_Halt ((const char *) "../../gcc/m2/gm2-libs/RTint.mod", 31, 286, (const char *) "ReArmTimeVector", 15, (const char *) "cannot find vector supplied", 27);
+ M2RTS_Halt ((const char *) "../../gcc-read-write/gcc/m2/gm2-libs/RTint.mod", 46, 286, (const char *) "ReArmTimeVector", 15, (const char *) "cannot find vector supplied", 27);
}
else
{
- Selective_SetTime (v->rel, secs+DebugTime, micro);
+ Selective_SetTime (vptr->rel, secs+DebugTime, micro);
}
RTco_signal (lock);
}
extern "C" void RTint_GetTimeVector (unsigned int vec, unsigned int *micro, unsigned int *secs)
{
- RTint_Vector v;
+ RTint_Vector vptr;
RTco_wait (lock);
- v = FindVectorNo (vec);
- if (v == NULL)
+ vptr = FindVectorNo (vec);
+ if (vptr == NULL)
{
- M2RTS_Halt ((const char *) "../../gcc/m2/gm2-libs/RTint.mod", 31, 312, (const char *) "GetTimeVector", 13, (const char *) "cannot find vector supplied", 27);
+ M2RTS_Halt ((const char *) "../../gcc-read-write/gcc/m2/gm2-libs/RTint.mod", 46, 312, (const char *) "GetTimeVector", 13, (const char *) "cannot find vector supplied", 27);
}
else
{
- Selective_GetTime (v->rel, secs, micro);
+ Selective_GetTime (vptr->rel, secs, micro);
Assertion_Assert ((*micro) < Microseconds);
}
RTco_signal (lock);
/*
- AttachVector - adds the pointer, p, to be associated with the interrupt
+ AttachVector - adds the pointer ptr to be associated with the interrupt
vector. It returns the previous value attached to this
vector.
*/
-extern "C" void * RTint_AttachVector (unsigned int vec, void * p)
+extern "C" void * RTint_AttachVector (unsigned int vec, void * ptr)
{
- RTint_Vector v;
- void * l;
+ RTint_Vector vptr;
+ void * prevArg;
RTco_wait (lock);
- v = FindVectorNo (vec);
- if (v == NULL)
+ vptr = FindVectorNo (vec);
+ if (vptr == NULL)
{
- M2RTS_Halt ((const char *) "../../gcc/m2/gm2-libs/RTint.mod", 31, 339, (const char *) "AttachVector", 12, (const char *) "cannot find vector supplied", 27);
+ M2RTS_Halt ((const char *) "../../gcc-read-write/gcc/m2/gm2-libs/RTint.mod", 46, 339, (const char *) "AttachVector", 12, (const char *) "cannot find vector supplied", 27);
}
else
{
- l = v->arg;
- v->arg = p;
+ prevArg = vptr->arg;
+ vptr->arg = ptr;
if (Debugging)
{
- libc_printf ((const char *) "AttachVector %d with 0x%x\\n", 27, vec, p);
+ libc_printf ((const char *) "AttachVector %d with %p\\n", 25, vec, ptr);
DumpPendingQueue ();
}
RTco_signal (lock);
- return l;
+ return prevArg;
}
- ReturnException ("../../gcc/m2/gm2-libs/RTint.def", 25, 1);
+ ReturnException ("../../gcc-read-write/gcc/m2/gm2-libs/RTint.def", 25, 1);
__builtin_unreachable ();
}
extern "C" void RTint_IncludeVector (unsigned int vec)
{
- RTint_Vector v;
- unsigned int m;
- unsigned int s;
- int r;
+ RTint_Vector vptr;
+ unsigned int micro;
+ unsigned int sec;
+ int result;
RTco_wait (lock);
- v = FindPendingVector (vec);
- if (v == NULL)
+ vptr = FindPendingVector (vec);
+ if (vptr == NULL)
{
/* avoid dangling else. */
- v = FindVectorNo (vec);
- if (v == NULL)
+ vptr = FindVectorNo (vec);
+ if (vptr == NULL)
{
- M2RTS_Halt ((const char *) "../../gcc/m2/gm2-libs/RTint.mod", 31, 372, (const char *) "IncludeVector", 13, (const char *) "cannot find vector supplied", 27);
+ M2RTS_Halt ((const char *) "../../gcc-read-write/gcc/m2/gm2-libs/RTint.mod", 46, 372, (const char *) "IncludeVector", 13, (const char *) "cannot find vector supplied", 27);
}
else
{
/* printf('including vector %d (fd = %d)
', vec, v^.File) ; */
- v->pending = Pending.array[v->priority-(COROUTINES_UnassignedPriority)];
- Pending.array[v->priority-(COROUTINES_UnassignedPriority)] = v;
- if ((v->type == RTint_time) && ! v->queued)
+ vptr->pending = Pending.array[vptr->priority-(COROUTINES_UnassignedPriority)];
+ Pending.array[vptr->priority-(COROUTINES_UnassignedPriority)] = vptr;
+ if ((vptr->type == RTint_time) && ! vptr->queued)
{
- v->queued = TRUE;
- r = Selective_GetTimeOfDay (v->abs_);
- Assertion_Assert (r == 0);
- Selective_GetTime (v->abs_, &s, &m);
- Assertion_Assert (m < Microseconds);
- AddTime (v->abs_, v->rel);
- Selective_GetTime (v->abs_, &s, &m);
- Assertion_Assert (m < Microseconds);
+ vptr->queued = TRUE;
+ result = Selective_GetTimeOfDay (vptr->abs_);
+ Assertion_Assert (result == 0);
+ Selective_GetTime (vptr->abs_, &sec, µ);
+ Assertion_Assert (micro < Microseconds);
+ AddTime (vptr->abs_, vptr->rel);
+ Selective_GetTime (vptr->abs_, &sec, µ);
+ Assertion_Assert (micro < Microseconds);
}
}
}
{
if (Debugging)
{
- libc_printf ((const char *) "odd vector (%d) type (%d) arg (0x%x) is already attached to the pending queue\\n", 79, vec, v->type, v->arg);
+ libc_printf ((const char *) "odd vector (%d) type (%d) arg (%p) is already attached to the pending queue\\n", 77, vec, vptr->type, vptr->arg);
}
- stop ();
}
RTco_signal (lock);
}
extern "C" void RTint_ExcludeVector (unsigned int vec)
{
- RTint_Vector v;
- RTint_Vector u;
+ RTint_Vector vptr;
+ RTint_Vector uptr;
RTco_wait (lock);
- v = FindPendingVector (vec);
- if (v == NULL)
+ vptr = FindPendingVector (vec);
+ if (vptr == NULL)
{
- M2RTS_Halt ((const char *) "../../gcc/m2/gm2-libs/RTint.mod", 31, 415, (const char *) "ExcludeVector", 13, (const char *) "cannot find pending vector supplied", 35);
+ M2RTS_Halt ((const char *) "../../gcc-read-write/gcc/m2/gm2-libs/RTint.mod", 46, 414, (const char *) "ExcludeVector", 13, (const char *) "cannot find pending vector supplied", 35);
}
else
{
/* printf('excluding vector %d
', vec) ; */
- if (Pending.array[v->priority-(COROUTINES_UnassignedPriority)] == v)
+ if (Pending.array[vptr->priority-(COROUTINES_UnassignedPriority)] == vptr)
{
- Pending.array[v->priority-(COROUTINES_UnassignedPriority)] = Pending.array[v->priority-(COROUTINES_UnassignedPriority)]->pending;
+ Pending.array[vptr->priority-(COROUTINES_UnassignedPriority)] = Pending.array[vptr->priority-(COROUTINES_UnassignedPriority)]->pending;
}
else
{
- u = Pending.array[v->priority-(COROUTINES_UnassignedPriority)];
- while (u->pending != v)
+ uptr = Pending.array[vptr->priority-(COROUTINES_UnassignedPriority)];
+ while (uptr->pending != vptr)
{
- u = u->pending;
+ uptr = uptr->pending;
}
- u->pending = v->pending;
+ uptr->pending = vptr->pending;
}
- if (v->type == RTint_time)
+ if (vptr->type == RTint_time)
{
- v->queued = FALSE;
+ vptr->queued = FALSE;
}
}
RTco_signal (lock);
extern "C" void RTint_Listen (unsigned int untilInterrupt, RTint_DispatchVector call, unsigned int pri)
{
unsigned int found;
- int r;
+ int result;
Selective_Timeval after;
Selective_Timeval b4;
- Selective_Timeval t;
- RTint_Vector v;
- Selective_SetOfFd i;
- Selective_SetOfFd o;
+ Selective_Timeval timeval;
+ RTint_Vector vec;
+ Selective_SetOfFd inSet;
+ Selective_SetOfFd outSet;
unsigned int b4s;
unsigned int b4m;
unsigned int afs;
unsigned int afm;
- unsigned int s;
- unsigned int m;
+ unsigned int sec;
+ unsigned int micro;
int maxFd;
unsigned int p;
DumpPendingQueue ();
}
maxFd = -1;
- t = NULL;
- i = NULL;
- o = NULL;
- t = Selective_InitTime (static_cast<unsigned int> (INT_MAX), 0);
+ timeval = NULL;
+ inSet = NULL;
+ outSet = NULL;
+ timeval = Selective_InitTime (static_cast<unsigned int> (INT_MAX), 0);
p = static_cast<unsigned int> (7);
found = FALSE;
while (p > pri)
{
- v = Pending.array[p-(COROUTINES_UnassignedPriority)];
- while (v != NULL)
+ vec = Pending.array[p-(COROUTINES_UnassignedPriority)];
+ while (vec != NULL)
{
- switch (v->type)
+ switch (vec->type)
{
case RTint_input:
- AddFd (&i, &maxFd, v->File);
+ AddFd (&inSet, &maxFd, vec->File);
break;
case RTint_output:
- AddFd (&o, &maxFd, v->File);
+ AddFd (&outSet, &maxFd, vec->File);
break;
case RTint_time:
- if (IsGreaterEqual (t, v->abs_))
+ if (IsGreaterEqual (timeval, vec->abs_))
{
- Selective_GetTime (v->abs_, &s, &m);
- Assertion_Assert (m < Microseconds);
+ Selective_GetTime (vec->abs_, &sec, µ);
+ Assertion_Assert (micro < Microseconds);
if (Debugging)
{
- libc_printf ((const char *) "shortest delay is %u.%06u\\n", 27, s, m);
+ libc_printf ((const char *) "shortest delay is %u.%06u\\n", 27, sec, micro);
}
- Selective_SetTime (t, s, m);
+ Selective_SetTime (timeval, sec, micro);
found = TRUE;
}
break;
default:
- CaseException ("../../gcc/m2/gm2-libs/RTint.def", 25, 1);
+ CaseException ("../../gcc-read-write/gcc/m2/gm2-libs/RTint.def", 25, 1);
__builtin_unreachable ();
}
- v = v->pending;
+ vec = vec->pending;
}
p -= 1;
}
if (! untilInterrupt)
{
- Selective_SetTime (t, 0, 0);
+ Selective_SetTime (timeval, 0, 0);
}
- if (((untilInterrupt && (i == NULL)) && (o == NULL)) && ! found)
+ if (((untilInterrupt && (inSet == NULL)) && (outSet == NULL)) && ! found)
{
- M2RTS_Halt ((const char *) "../../gcc/m2/gm2-libs/RTint.mod", 31, 731, (const char *) "Listen", 6, (const char *) "deadlock found, no more processes to run and no interrupts active", 65);
+ M2RTS_Halt ((const char *) "../../gcc-read-write/gcc/m2/gm2-libs/RTint.mod", 46, 730, (const char *) "Listen", 6, (const char *) "deadlock found, no more processes to run and no interrupts active", 65);
}
/* printf('}
') ; */
- if (((! found && (maxFd == -1)) && (i == NULL)) && (o == NULL))
+ if (((! found && (maxFd == -1)) && (inSet == NULL)) && (outSet == NULL))
{
/* no file descriptors to be selected upon. */
- t = Selective_KillTime (t);
+ timeval = Selective_KillTime (timeval);
RTco_signal (lock);
return ;
}
else
{
- Selective_GetTime (t, &s, &m);
- Assertion_Assert (m < Microseconds);
+ Selective_GetTime (timeval, &sec, µ);
+ Assertion_Assert (micro < Microseconds);
b4 = Selective_InitTime (0, 0);
after = Selective_InitTime (0, 0);
- r = Selective_GetTimeOfDay (b4);
- Assertion_Assert (r == 0);
- SubTime (&s, &m, t, b4);
- Selective_SetTime (t, s, m);
+ result = Selective_GetTimeOfDay (b4);
+ Assertion_Assert (result == 0);
+ SubTime (&sec, µ, timeval, b4);
+ Selective_SetTime (timeval, sec, micro);
if (Debugging)
{
- libc_printf ((const char *) "select waiting for %u.%06u seconds\\n", 36, s, m);
+ libc_printf ((const char *) "select waiting for %u.%06u seconds\\n", 36, sec, micro);
}
RTco_signal (lock);
do {
if (Debugging)
{
- libc_printf ((const char *) "select (.., .., .., %u.%06u)\\n", 30, s, m);
+ libc_printf ((const char *) "select (.., .., .., %u.%06u)\\n", 30, sec, micro);
}
- r = RTco_select (maxFd+1, i, o, NULL, t);
- if (r == -1)
+ result = RTco_select (maxFd+1, inSet, outSet, NULL, timeval);
+ if (result == -1)
{
libc_perror ((const char *) "select", 6);
- r = RTco_select (maxFd+1, i, o, NULL, NULL);
- if (r == -1)
+ result = RTco_select (maxFd+1, inSet, outSet, NULL, NULL);
+ if (result == -1)
{
libc_perror ((const char *) "select timeout argument is faulty", 33);
}
- r = RTco_select (maxFd+1, i, NULL, NULL, t);
- if (r == -1)
+ result = RTco_select (maxFd+1, inSet, NULL, NULL, timeval);
+ if (result == -1)
{
libc_perror ((const char *) "select output fd argument is faulty", 35);
}
- r = RTco_select (maxFd+1, NULL, o, NULL, t);
- if (r == -1)
+ result = RTco_select (maxFd+1, NULL, outSet, NULL, timeval);
+ if (result == -1)
{
libc_perror ((const char *) "select input fd argument is faulty", 34);
}
libc_perror ((const char *) "select maxFD+1 argument is faulty", 33);
}
}
- } while (! (r != -1));
+ } while (! (result != -1));
}
- while (activatePending (untilInterrupt, call, pri, maxFd+1, &i, &o, &t, b4, after))
+ while (activatePending (untilInterrupt, call, pri, maxFd+1, &inSet, &outSet, &timeval, b4, after))
{} /* empty. */
- if (t != NULL)
+ if (timeval != NULL)
{
- t = Selective_KillTime (t);
+ timeval = Selective_KillTime (timeval);
}
if (after != NULL)
{
- t = Selective_KillTime (after);
+ after = Selective_KillTime (after);
}
if (b4 != NULL)
{
- t = Selective_KillTime (b4);
+ b4 = Selective_KillTime (b4);
}
- if (i != NULL)
+ if (inSet != NULL)
{
- i = Selective_KillSet (i);
+ inSet = Selective_KillSet (inSet);
}
- if (o != NULL)
+ if (outSet != NULL)
{
- o = Selective_KillSet (o);
+ outSet = Selective_KillSet (outSet);
}
}
RTco_signal (lock);
vector.
*/
-EXTERN void * RTint_AttachVector (unsigned int vec, void * p);
+EXTERN void * RTint_AttachVector (unsigned int vec, void * ptr);
/*
IncludeVector - includes, vec, into the dispatcher list of
M2RTS_HALT (-1);
__builtin_unreachable ();
}
- ReturnException ("../../gcc/m2/gm2-libs/StdIO.def", 25, 1);
+ ReturnException ("../../gcc-read-write/gcc/m2/gm2-libs/StdIO.def", 25, 1);
__builtin_unreachable ();
}
M2RTS_HALT (-1);
__builtin_unreachable ();
}
- ReturnException ("../../gcc/m2/gm2-libs/StdIO.def", 25, 1);
+ ReturnException ("../../gcc-read-write/gcc/m2/gm2-libs/StdIO.def", 25, 1);
__builtin_unreachable ();
}
int point;
unsigned int poTen;
- Assert ((IsDigit (DynamicStrings_char (s, 0))) || ((DynamicStrings_char (s, 0)) == '.'), (const char *) "../../gcc/m2/gm2-libs/StringConvert.mod", 39, 1222, (const char *) "ToSigFig", 8);
+ Assert ((IsDigit (DynamicStrings_char (s, 0))) || ((DynamicStrings_char (s, 0)) == '.'), (const char *) "../../gcc-read-write/gcc/m2/gm2-libs/StringConvert.mod", 54, 1222, (const char *) "ToSigFig", 8);
point = DynamicStrings_Index (s, '.', 0);
if (point < 0)
{
{
int point;
- Assert ((IsDigit (DynamicStrings_char (s, 0))) || ((DynamicStrings_char (s, 0)) == '.'), (const char *) "../../gcc/m2/gm2-libs/StringConvert.mod", 39, 1069, (const char *) "ToDecimalPlaces", 15);
+ Assert ((IsDigit (DynamicStrings_char (s, 0))) || ((DynamicStrings_char (s, 0)) == '.'), (const char *) "../../gcc-read-write/gcc/m2/gm2-libs/StringConvert.mod", 54, 1069, (const char *) "ToDecimalPlaces", 15);
point = DynamicStrings_Index (s, '.', 0);
if (point < 0)
{
(*a) = libc_malloc (static_cast<size_t> (size));
if ((*a) == NULL)
{
- Debug_Halt ((const char *) "out of memory error", 19, 50, (const char *) "../../gcc/m2/gm2-libs/SysStorage.mod", 36);
+ Debug_Halt ((const char *) "out of memory error", 19, 50, (const char *) "../../gcc-read-write/gcc/m2/gm2-libs/SysStorage.mod", 51);
}
if (enableTrace && trace)
{
}
if ((libc_memset ((*a), 0, static_cast<size_t> (size))) != (*a))
{
- Debug_Halt ((const char *) "memset should have returned the first parameter", 47, 76, (const char *) "../../gcc/m2/gm2-libs/SysStorage.mod", 36);
+ Debug_Halt ((const char *) "memset should have returned the first parameter", 47, 76, (const char *) "../../gcc-read-write/gcc/m2/gm2-libs/SysStorage.mod", 51);
}
}
if (enableDeallocation)
(*a) = libc_realloc ((*a), static_cast<size_t> (size));
if ((*a) == NULL)
{
- Debug_Halt ((const char *) "out of memory error", 19, 119, (const char *) "../../gcc/m2/gm2-libs/SysStorage.mod", 36);
+ Debug_Halt ((const char *) "out of memory error", 19, 119, (const char *) "../../gcc-read-write/gcc/m2/gm2-libs/SysStorage.mod", 51);
}
if (enableTrace && trace)
{
extern "C" unsigned int mcOptions_getScaffoldDynamic (void);
extern "C" unsigned int mcOptions_getScaffoldMain (void);
extern "C" void mcOptions_writeGPLheader (FIO_File f);
+extern "C" void mcOptions_setSuppressNoReturn (unsigned int value);
+extern "C" unsigned int mcOptions_getSuppressNoReturn (void);
extern "C" DynamicStrings_String FormatStrings_Sprintf0 (DynamicStrings_String fmt);
extern "C" DynamicStrings_String FormatStrings_Sprintf1 (DynamicStrings_String fmt, const unsigned char *w_, unsigned int _w_high);
extern "C" DynamicStrings_String FormatStrings_Sprintf2 (DynamicStrings_String fmt, const unsigned char *w1_, unsigned int _w1_high, const unsigned char *w2_, unsigned int _w2_high);
d->at.firstUsed = 0;
return d;
}
- ReturnException ("../../gcc/m2/mc/decl.def", 20, 1);
+ ReturnException ("../../gcc-read-write/gcc/m2/mc/decl.def", 20, 1);
__builtin_unreachable ();
}
}
M2RTS_HALT (-1);
__builtin_unreachable ();
- ReturnException ("../../gcc/m2/mc/decl.def", 20, 1);
+ ReturnException ("../../gcc-read-write/gcc/m2/mc/decl.def", 20, 1);
__builtin_unreachable ();
}
default:
- CaseException ("../../gcc/m2/mc/decl.def", 20, 1);
+ CaseException ("../../gcc-read-write/gcc/m2/mc/decl.def", 20, 1);
__builtin_unreachable ();
}
}
default:
- CaseException ("../../gcc/m2/mc/decl.def", 20, 1);
+ CaseException ("../../gcc-read-write/gcc/m2/mc/decl.def", 20, 1);
__builtin_unreachable ();
}
switch (f->kind)
default:
- CaseException ("../../gcc/m2/mc/decl.def", 20, 1);
+ CaseException ("../../gcc-read-write/gcc/m2/mc/decl.def", 20, 1);
__builtin_unreachable ();
}
}
default:
- CaseException ("../../gcc/m2/mc/decl.def", 20, 1);
+ CaseException ("../../gcc-read-write/gcc/m2/mc/decl.def", 20, 1);
__builtin_unreachable ();
}
/* fill in, n. */
default:
- CaseException ("../../gcc/m2/mc/decl.def", 20, 1);
+ CaseException ("../../gcc-read-write/gcc/m2/mc/decl.def", 20, 1);
__builtin_unreachable ();
}
}
default:
- CaseException ("../../gcc/m2/mc/decl.def", 20, 1);
+ CaseException ("../../gcc-read-write/gcc/m2/mc/decl.def", 20, 1);
__builtin_unreachable ();
}
/* static analysis guarentees a RETURN statement will be used before here. */
default:
- CaseException ("../../gcc/m2/mc/decl.def", 20, 1);
+ CaseException ("../../gcc-read-write/gcc/m2/mc/decl.def", 20, 1);
__builtin_unreachable ();
}
/* static analysis guarentees a RETURN statement will be used before here. */
default:
- CaseException ("../../gcc/m2/mc/decl.def", 20, 1);
+ CaseException ("../../gcc-read-write/gcc/m2/mc/decl.def", 20, 1);
__builtin_unreachable ();
}
/* static analysis guarentees a RETURN statement will be used before here. */
M2RTS_HALT (-1);
__builtin_unreachable ();
}
- ReturnException ("../../gcc/m2/mc/decl.def", 20, 1);
+ ReturnException ("../../gcc-read-write/gcc/m2/mc/decl.def", 20, 1);
__builtin_unreachable ();
}
M2RTS_HALT (-1);
__builtin_unreachable ();
}
- ReturnException ("../../gcc/m2/mc/decl.def", 20, 1);
+ ReturnException ("../../gcc-read-write/gcc/m2/mc/decl.def", 20, 1);
__builtin_unreachable ();
}
default:
- CaseException ("../../gcc/m2/mc/decl.def", 20, 1);
+ CaseException ("../../gcc-read-write/gcc/m2/mc/decl.def", 20, 1);
__builtin_unreachable ();
}
}
}
M2RTS_HALT (-1);
__builtin_unreachable ();
- ReturnException ("../../gcc/m2/mc/decl.def", 20, 1);
+ ReturnException ("../../gcc-read-write/gcc/m2/mc/decl.def", 20, 1);
__builtin_unreachable ();
}
default:
- CaseException ("../../gcc/m2/mc/decl.def", 20, 1);
+ CaseException ("../../gcc-read-write/gcc/m2/mc/decl.def", 20, 1);
__builtin_unreachable ();
}
return n;
default:
- CaseException ("../../gcc/m2/mc/decl.def", 20, 1);
+ CaseException ("../../gcc-read-write/gcc/m2/mc/decl.def", 20, 1);
__builtin_unreachable ();
}
M2RTS_HALT (-1);
__builtin_unreachable ();
- ReturnException ("../../gcc/m2/mc/decl.def", 20, 1);
+ ReturnException ("../../gcc-read-write/gcc/m2/mc/decl.def", 20, 1);
__builtin_unreachable ();
}
default:
- CaseException ("../../gcc/m2/mc/decl.def", 20, 1);
+ CaseException ("../../gcc-read-write/gcc/m2/mc/decl.def", 20, 1);
__builtin_unreachable ();
}
M2RTS_HALT (-1);
__builtin_unreachable ();
- ReturnException ("../../gcc/m2/mc/decl.def", 20, 1);
+ ReturnException ("../../gcc-read-write/gcc/m2/mc/decl.def", 20, 1);
__builtin_unreachable ();
}
default:
- CaseException ("../../gcc/m2/mc/decl.def", 20, 1);
+ CaseException ("../../gcc-read-write/gcc/m2/mc/decl.def", 20, 1);
__builtin_unreachable ();
}
return TRUE;
default:
- CaseException ("../../gcc/m2/mc/decl.def", 20, 1);
+ CaseException ("../../gcc-read-write/gcc/m2/mc/decl.def", 20, 1);
__builtin_unreachable ();
}
}
default:
- CaseException ("../../gcc/m2/mc/decl.def", 20, 1);
+ CaseException ("../../gcc-read-write/gcc/m2/mc/decl.def", 20, 1);
__builtin_unreachable ();
}
}
default:
- CaseException ("../../gcc/m2/mc/decl.def", 20, 1);
+ CaseException ("../../gcc-read-write/gcc/m2/mc/decl.def", 20, 1);
__builtin_unreachable ();
}
/* static analysis guarentees a RETURN statement will be used before here. */
default:
- CaseException ("../../gcc/m2/mc/decl.def", 20, 1);
+ CaseException ("../../gcc-read-write/gcc/m2/mc/decl.def", 20, 1);
__builtin_unreachable ();
}
}
default:
- CaseException ("../../gcc/m2/mc/decl.def", 20, 1);
+ CaseException ("../../gcc-read-write/gcc/m2/mc/decl.def", 20, 1);
__builtin_unreachable ();
}
}
return s;
}
}
- ReturnException ("../../gcc/m2/mc/decl.def", 20, 1);
+ ReturnException ("../../gcc-read-write/gcc/m2/mc/decl.def", 20, 1);
__builtin_unreachable ();
}
return c;
}
}
- ReturnException ("../../gcc/m2/mc/decl.def", 20, 1);
+ ReturnException ("../../gcc-read-write/gcc/m2/mc/decl.def", 20, 1);
__builtin_unreachable ();
}
M2RTS_HALT (-1); /* finish the cacading elsif statement. */
__builtin_unreachable ();
}
- ReturnException ("../../gcc/m2/mc/decl.def", 20, 1);
+ ReturnException ("../../gcc-read-write/gcc/m2/mc/decl.def", 20, 1);
__builtin_unreachable ();
}
M2RTS_HALT (-1); /* finish the cacading elsif statement. */
__builtin_unreachable ();
}
- ReturnException ("../../gcc/m2/mc/decl.def", 20, 1);
+ ReturnException ("../../gcc-read-write/gcc/m2/mc/decl.def", 20, 1);
__builtin_unreachable ();
}
default:
- CaseException ("../../gcc/m2/mc/decl.def", 20, 1);
+ CaseException ("../../gcc-read-write/gcc/m2/mc/decl.def", 20, 1);
__builtin_unreachable ();
}
mcPretty_setNeedSpace (p);
default:
- CaseException ("../../gcc/m2/mc/decl.def", 20, 1);
+ CaseException ("../../gcc-read-write/gcc/m2/mc/decl.def", 20, 1);
__builtin_unreachable ();
}
}
outText (doP, (const char *) "void", 4);
}
mcPretty_print (doP, (const char *) ")", 1);
- if (n->procedureF.noreturn && prototype)
+ if ((n->procedureF.noreturn && prototype) && (! (mcOptions_getSuppressNoReturn ())))
{
mcPretty_setNeedSpace (doP);
outText (doP, (const char *) "__attribute__ ((noreturn))", 26);
default:
- CaseException ("../../gcc/m2/mc/decl.def", 20, 1);
+ CaseException ("../../gcc-read-write/gcc/m2/mc/decl.def", 20, 1);
__builtin_unreachable ();
}
}
default:
- CaseException ("../../gcc/m2/mc/decl.def", 20, 1);
+ CaseException ("../../gcc-read-write/gcc/m2/mc/decl.def", 20, 1);
__builtin_unreachable ();
}
}
default:
- CaseException ("../../gcc/m2/mc/decl.def", 20, 1);
+ CaseException ("../../gcc-read-write/gcc/m2/mc/decl.def", 20, 1);
__builtin_unreachable ();
}
outText (p, (const char *) ";", 1);
default:
- CaseException ("../../gcc/m2/mc/decl.def", 20, 1);
+ CaseException ("../../gcc-read-write/gcc/m2/mc/decl.def", 20, 1);
__builtin_unreachable ();
}
if (n != NULL)
default:
- CaseException ("../../gcc/m2/mc/decl.def", 20, 1);
+ CaseException ("../../gcc-read-write/gcc/m2/mc/decl.def", 20, 1);
__builtin_unreachable ();
}
- ReturnException ("../../gcc/m2/mc/decl.def", 20, 1);
+ ReturnException ("../../gcc-read-write/gcc/m2/mc/decl.def", 20, 1);
__builtin_unreachable ();
}
default:
- CaseException ("../../gcc/m2/mc/decl.def", 20, 1);
+ CaseException ("../../gcc-read-write/gcc/m2/mc/decl.def", 20, 1);
__builtin_unreachable ();
}
}
default:
- CaseException ("../../gcc/m2/mc/decl.def", 20, 1);
+ CaseException ("../../gcc-read-write/gcc/m2/mc/decl.def", 20, 1);
__builtin_unreachable ();
}
}
default:
- CaseException ("../../gcc/m2/mc/decl.def", 20, 1);
+ CaseException ("../../gcc-read-write/gcc/m2/mc/decl.def", 20, 1);
__builtin_unreachable ();
}
M2RTS_HALT (-1);
__builtin_unreachable ();
- ReturnException ("../../gcc/m2/mc/decl.def", 20, 1);
+ ReturnException ("../../gcc-read-write/gcc/m2/mc/decl.def", 20, 1);
__builtin_unreachable ();
}
default:
- CaseException ("../../gcc/m2/mc/decl.def", 20, 1);
+ CaseException ("../../gcc-read-write/gcc/m2/mc/decl.def", 20, 1);
__builtin_unreachable ();
}
mcPretty_setNeedSpace (p);
default:
- CaseException ("../../gcc/m2/mc/decl.def", 20, 1);
+ CaseException ("../../gcc-read-write/gcc/m2/mc/decl.def", 20, 1);
__builtin_unreachable ();
}
}
default:
- CaseException ("../../gcc/m2/mc/decl.def", 20, 1);
+ CaseException ("../../gcc-read-write/gcc/m2/mc/decl.def", 20, 1);
__builtin_unreachable ();
}
- ReturnException ("../../gcc/m2/mc/decl.def", 20, 1);
+ ReturnException ("../../gcc-read-write/gcc/m2/mc/decl.def", 20, 1);
__builtin_unreachable ();
}
default:
- CaseException ("../../gcc/m2/mc/decl.def", 20, 1);
+ CaseException ("../../gcc-read-write/gcc/m2/mc/decl.def", 20, 1);
__builtin_unreachable ();
}
/* static analysis guarentees a RETURN statement will be used before here. */
default:
- CaseException ("../../gcc/m2/mc/decl.def", 20, 1);
+ CaseException ("../../gcc-read-write/gcc/m2/mc/decl.def", 20, 1);
__builtin_unreachable ();
}
}
default:
- CaseException ("../../gcc/m2/mc/decl.def", 20, 1);
+ CaseException ("../../gcc-read-write/gcc/m2/mc/decl.def", 20, 1);
__builtin_unreachable ();
}
}
default:
- CaseException ("../../gcc/m2/mc/decl.def", 20, 1);
+ CaseException ("../../gcc-read-write/gcc/m2/mc/decl.def", 20, 1);
__builtin_unreachable ();
}
}
default:
- CaseException ("../../gcc/m2/mc/decl.def", 20, 1);
+ CaseException ("../../gcc-read-write/gcc/m2/mc/decl.def", 20, 1);
__builtin_unreachable ();
}
/* static analysis guarentees a RETURN statement will be used before here. */
default:
- CaseException ("../../gcc/m2/mc/decl.def", 20, 1);
+ CaseException ("../../gcc-read-write/gcc/m2/mc/decl.def", 20, 1);
__builtin_unreachable ();
}
/* static analysis guarentees a RETURN statement will be used before here. */
default:
- CaseException ("../../gcc/m2/mc/decl.def", 20, 1);
+ CaseException ("../../gcc-read-write/gcc/m2/mc/decl.def", 20, 1);
__builtin_unreachable ();
}
M2RTS_HALT (-1);
__builtin_unreachable ();
- ReturnException ("../../gcc/m2/mc/decl.def", 20, 1);
+ ReturnException ("../../gcc-read-write/gcc/m2/mc/decl.def", 20, 1);
__builtin_unreachable ();
}
default:
- CaseException ("../../gcc/m2/mc/decl.def", 20, 1);
+ CaseException ("../../gcc-read-write/gcc/m2/mc/decl.def", 20, 1);
__builtin_unreachable ();
}
/* static analysis guarentees a RETURN statement will be used before here. */
default:
- CaseException ("../../gcc/m2/mc/decl.def", 20, 1);
+ CaseException ("../../gcc-read-write/gcc/m2/mc/decl.def", 20, 1);
__builtin_unreachable ();
}
return n;
__builtin_unreachable ();
break;
}
- ReturnException ("../../gcc/m2/mc/decl.def", 20, 1);
+ ReturnException ("../../gcc-read-write/gcc/m2/mc/decl.def", 20, 1);
__builtin_unreachable ();
}
default:
- CaseException ("../../gcc/m2/mc/decl.def", 20, 1);
+ CaseException ("../../gcc-read-write/gcc/m2/mc/decl.def", 20, 1);
__builtin_unreachable ();
}
importEnumFields (m, n);
default:
- CaseException ("../../gcc/m2/mc/decl.def", 20, 1);
+ CaseException ("../../gcc-read-write/gcc/m2/mc/decl.def", 20, 1);
__builtin_unreachable ();
}
}
default:
- CaseException ("../../gcc/m2/mc/decl.def", 20, 1);
+ CaseException ("../../gcc-read-write/gcc/m2/mc/decl.def", 20, 1);
__builtin_unreachable ();
}
/* static analysis guarentees a RETURN statement will be used before here. */
default:
- CaseException ("../../gcc/m2/mc/decl.def", 20, 1);
+ CaseException ("../../gcc-read-write/gcc/m2/mc/decl.def", 20, 1);
__builtin_unreachable ();
}
}
M2RTS_HALT (-1); /* most likely op needs a clause as above. */
__builtin_unreachable ();
}
- ReturnException ("../../gcc/m2/mc/decl.def", 20, 1);
+ ReturnException ("../../gcc-read-write/gcc/m2/mc/decl.def", 20, 1);
__builtin_unreachable ();
}
M2RTS_HALT (-1); /* most likely op needs a clause as above. */
__builtin_unreachable ();
}
- ReturnException ("../../gcc/m2/mc/decl.def", 20, 1);
+ ReturnException ("../../gcc-read-write/gcc/m2/mc/decl.def", 20, 1);
__builtin_unreachable ();
}
default:
- CaseException ("../../gcc/m2/mc/decl.def", 20, 1);
+ CaseException ("../../gcc-read-write/gcc/m2/mc/decl.def", 20, 1);
__builtin_unreachable ();
}
}
default:
- CaseException ("../../gcc/m2/mc/decl.def", 20, 1);
+ CaseException ("../../gcc-read-write/gcc/m2/mc/decl.def", 20, 1);
__builtin_unreachable ();
}
}
default:
- CaseException ("../../gcc/m2/mc/decl.def", 20, 1);
+ CaseException ("../../gcc-read-write/gcc/m2/mc/decl.def", 20, 1);
__builtin_unreachable ();
}
}
default:
- CaseException ("../../gcc/m2/mc/decl.def", 20, 1);
+ CaseException ("../../gcc-read-write/gcc/m2/mc/decl.def", 20, 1);
__builtin_unreachable ();
}
closeOutput ();
return TRUE;
}
}
- ReturnException ("../../gcc/m2/mc/keyc.def", 20, 1);
+ ReturnException ("../../gcc-read-write/gcc/m2/mc/keyc.def", 20, 1);
__builtin_unreachable ();
}
default:
- CaseException ("../../gcc/m2/mc/mcComment.def", 20, 1);
+ CaseException ("../../gcc-read-write/gcc/m2/mc/mcComment.def", 20, 1);
__builtin_unreachable ();
}
if (cd->used)
}
mcflex_mcError (DynamicStrings_string (DynamicStrings_InitString ((const char *) "failed to find module name", 26)));
libc_exit (1);
- ReturnException ("../../gcc/m2/mc/mcComp.def", 20, 1);
+ ReturnException ("../../gcc-read-write/gcc/m2/mc/mcComp.def", 20, 1);
__builtin_unreachable ();
}
mcPrintf_fprintf1 (FIO_StdErr, (const char *) "failed to open %s\\n", 19, (const unsigned char *) &s, (sizeof (s)-1));
libc_exit (1);
}
- ReturnException ("../../gcc/m2/mc/mcComp.def", 20, 1);
+ ReturnException ("../../gcc-read-write/gcc/m2/mc/mcComp.def", 20, 1);
__builtin_unreachable ();
}
{
if (! q)
{
- mcError_internalError ((const char *) "assert failed", 13, (const char *) "../../gcc/m2/mc/mcDebug.mod", 27, 35);
+ mcError_internalError ((const char *) "assert failed", 13, (const char *) "../../gcc-read-write/gcc/m2/mc/mcDebug.mod", 42, 35);
}
}
s = DynamicStrings_ConCatChar (s, '^');
s = SFIO_WriteS (FIO_StdOut, s);
FIO_WriteLine (FIO_StdOut);
- mcError_internalError ((const char *) m, _m_high, (const char *) "../../gcc/m2/mc/mcMetaError.mod", 31, 97);
+ mcError_internalError ((const char *) m, _m_high, (const char *) "../../gcc-read-write/gcc/m2/mc/mcMetaError.mod", 46, 97);
}
{
if (a != b)
{
- mcError_internalError ((const char *) "different string returned", 25, (const char *) "../../gcc/m2/mc/mcMetaError.mod", 31, 109);
+ mcError_internalError ((const char *) "different string returned", 25, (const char *) "../../gcc-read-write/gcc/m2/mc/mcMetaError.mod", 46, 109);
}
return a;
/* static analysis guarentees a RETURN statement will be used before here. */
case mcMetaError_chained:
if (e == NULL)
{
- mcError_internalError ((const char *) "should not be chaining an error onto an empty error note", 56, (const char *) "../../gcc/m2/mc/mcMetaError.mod", 31, 355);
+ mcError_internalError ((const char *) "should not be chaining an error onto an empty error note", 56, (const char *) "../../gcc-read-write/gcc/m2/mc/mcMetaError.mod", 46, 355);
}
else
{
default:
- mcError_internalError ((const char *) "unexpected enumeration value", 28, (const char *) "../../gcc/m2/mc/mcMetaError.mod", 31, 369);
+ mcError_internalError ((const char *) "unexpected enumeration value", 28, (const char *) "../../gcc-read-write/gcc/m2/mc/mcMetaError.mod", 46, 369);
break;
}
return e;
static unsigned int caseRuntime;
static unsigned int arrayRuntime;
static unsigned int returnRuntime;
+static unsigned int suppressNoReturn;
static unsigned int gccConfigSystem;
static unsigned int ignoreFQ;
static unsigned int debugTopological;
extern "C" void mcOptions_writeGPLheader (FIO_File f);
+/*
+ setSuppressNoReturn - set suppressNoReturn to value.
+*/
+
+extern "C" void mcOptions_setSuppressNoReturn (unsigned int value);
+
+/*
+ getSuppressNoReturn - return the suppressNoReturn value.
+*/
+
+extern "C" unsigned int mcOptions_getSuppressNoReturn (void);
+
/*
getYear - return the year.
*/
mcPrintf_printf0 ((const char *) " --automatic generate a comment at the start of the file warning not to edit as it was automatically generated\\n", 121);
mcPrintf_printf0 ((const char *) " --scaffold-dynamic generate dynamic module initialization code for C++\\n", 75);
mcPrintf_printf0 ((const char *) " --scaffold-main generate main function which calls upon the dynamic initialization support in M2RTS\\n", 107);
+ mcPrintf_printf0 ((const char *) " --suppress-noreturn suppress the emission of any attribute noreturn\\n", 71);
mcPrintf_printf0 ((const char *) " filename the source file must be the last option\\n", 63);
libc_exit (0);
}
/* avoid dangling else. */
scaffoldDynamic = TRUE;
}
+ else if (optionIs ((const char *) "--suppress-noreturn", 19, arg))
+ {
+ /* avoid dangling else. */
+ suppressNoReturn = TRUE;
+ }
}
issueGPL (f);
}
+
+/*
+ setSuppressNoReturn - set suppressNoReturn to value.
+*/
+
+extern "C" void mcOptions_setSuppressNoReturn (unsigned int value)
+{
+ suppressNoReturn = value;
+}
+
+
+/*
+ getSuppressNoReturn - return the suppressNoReturn value.
+*/
+
+extern "C" unsigned int mcOptions_getSuppressNoReturn (void)
+{
+ return suppressNoReturn;
+ /* static analysis guarentees a RETURN statement will be used before here. */
+ __builtin_unreachable ();
+}
+
extern "C" void _M2_mcOptions_init (__attribute__((unused)) int argc,__attribute__((unused)) char *argv[],__attribute__((unused)) char *envp[])
{
langC = TRUE;
gccConfigSystem = FALSE;
scaffoldMain = FALSE;
scaffoldDynamic = FALSE;
+ suppressNoReturn = FALSE;
hPrefix = DynamicStrings_InitString ((const char *) "", 0);
cppArgs = DynamicStrings_InitString ((const char *) "", 0);
cppProgram = DynamicStrings_InitString ((const char *) "", 0);
*/
EXTERN void mcOptions_writeGPLheader (FIO_File f);
+
+/*
+ setSuppressNoReturn - set suppressNoReturn to value.
+*/
+
+EXTERN void mcOptions_setSuppressNoReturn (unsigned int value);
+
+/*
+ getSuppressNoReturn - return the suppressNoReturn value.
+*/
+
+EXTERN unsigned int mcOptions_getSuppressNoReturn (void);
# ifdef __cplusplus
}
# endif
Indexing_DeleteIndice (s->list, Indexing_HighIndice (s->list));
return a;
}
- ReturnException ("../../gcc/m2/mc/mcStack.def", 20, 1);
+ ReturnException ("../../gcc-read-write/gcc/m2/mc/mcStack.def", 20, 1);
__builtin_unreachable ();
}
{
return Indexing_GetIndice (s->list, i);
}
- ReturnException ("../../gcc/m2/mc/mcStack.def", 20, 1);
+ ReturnException ("../../gcc-read-write/gcc/m2/mc/mcStack.def", 20, 1);
__builtin_unreachable ();
}
(*p) = ASCII_nul;
return doMakeKey (n, higha);
}
- ReturnException ("../../gcc/m2/mc/nameKey.def", 20, 1);
+ ReturnException ("../../gcc-read-write/gcc/m2/mc/nameKey.def", 20, 1);
__builtin_unreachable ();
}
return doMakeKey (n, higha);
}
}
- ReturnException ("../../gcc/m2/mc/nameKey.def", 20, 1);
+ ReturnException ("../../gcc-read-write/gcc/m2/mc/nameKey.def", 20, 1);
__builtin_unreachable ();
}
(*father) = t;
if (t == NULL)
{
- Debug_Halt ((const char *) "parameter t should never be NIL", 31, 203, (const char *) "../../gcc/m2/mc/symbolKey.mod", 29);
+ Debug_Halt ((const char *) "parameter t should never be NIL", 31, 203, (const char *) "../../gcc-read-write/gcc/m2/mc/symbolKey.mod", 44);
}
(*child) = t->left;
if ((*child) != NULL)
}
else
{
- Debug_Halt ((const char *) "symbol already stored", 21, 119, (const char *) "../../gcc/m2/mc/symbolKey.mod", 29);
+ Debug_Halt ((const char *) "symbol already stored", 21, 119, (const char *) "../../gcc-read-write/gcc/m2/mc/symbolKey.mod", 44);
}
}
}
else
{
- Debug_Halt ((const char *) "trying to delete a symbol that is not in the tree - the compiler never expects this to occur", 92, 186, (const char *) "../../gcc/m2/mc/symbolKey.mod", 29);
+ Debug_Halt ((const char *) "trying to delete a symbol that is not in the tree - the compiler never expects this to occur", 92, 186, (const char *) "../../gcc-read-write/gcc/m2/mc/symbolKey.mod", 44);
}
}
FROM FIO IMPORT File, Close, FlushBuffer, StdOut, WriteLine, WriteChar ;
FROM DynamicStrings IMPORT String, InitString, EqualArray, InitStringCharStar, KillString, ConCat, Mark, RemoveWhitePostfix, RemoveWhitePrefix ;
FROM StringConvert IMPORT CardinalToString, ostoc ;
-FROM mcOptions IMPORT getOutputFile, getDebugTopological, getHPrefix, getIgnoreFQ, getExtendedOpaque, writeGPLheader, getGccConfigSystem, getScaffoldDynamic, getScaffoldMain ;
+
+FROM mcOptions IMPORT getOutputFile, getDebugTopological, getHPrefix, getIgnoreFQ,
+ getExtendedOpaque, writeGPLheader, getGccConfigSystem,
+ getScaffoldDynamic, getScaffoldMain, getSuppressNoReturn ;
+
FROM FormatStrings IMPORT Sprintf0, Sprintf1, Sprintf2, Sprintf3 ;
FROM libc IMPORT printf, memset ;
FROM mcMetaError IMPORT metaError1, metaError2, metaError3, metaErrors1, metaErrors2 ;
outText (doP, "void")
END ;
print (doP, ")") ;
- IF n^.procedureF.noreturn AND prototype
+ IF n^.procedureF.noreturn AND prototype AND (NOT getSuppressNoReturn ())
THEN
setNeedSpace (doP) ;
outText (doP, "__attribute__ ((noreturn))")
PROCEDURE writeGPLheader (f: File) ;
+(*
+ setSuppressNoReturn - set suppressNoReturn to value.
+*)
+
+PROCEDURE setSuppressNoReturn (value: BOOLEAN) ;
+
+
+(*
+ getSuppressNoReturn - return the suppressNoReturn value.
+*)
+
+PROCEDURE getSuppressNoReturn () : BOOLEAN ;
+
+
END mcOptions.
caseRuntime,
arrayRuntime,
returnRuntime,
+ suppressNoReturn,
gccConfigSystem,
ignoreFQ,
debugTopological,
printf0 (' --automatic generate a comment at the start of the file warning not to edit as it was automatically generated\n') ;
printf0 (' --scaffold-dynamic generate dynamic module initialization code for C++\n') ;
printf0 (' --scaffold-main generate main function which calls upon the dynamic initialization support in M2RTS\n') ;
- printf0 (" filename the source file must be the last option\n") ;
+ printf0 (' --suppress-noreturn suppress the emission of any attribute noreturn\n');
+ printf0 (' filename the source file must be the last option\n') ;
exit (0)
END displayHelp ;
END getExtendedOpaque ;
+(*
+ setSuppressNoReturn - set suppressNoReturn to value.
+*)
+
+PROCEDURE setSuppressNoReturn (value: BOOLEAN) ;
+BEGIN
+ suppressNoReturn := value
+END setSuppressNoReturn;
+
+
+(*
+ getSuppressNoReturn - return the suppressNoReturn value.
+*)
+
+PROCEDURE getSuppressNoReturn () : BOOLEAN ;
+BEGIN
+ RETURN suppressNoReturn
+END getSuppressNoReturn ;
+
+
(*
setSearchPath - set the search path for the module sources.
*)
ELSIF optionIs ('--scaffold-dynamic', arg)
THEN
scaffoldDynamic := TRUE
+ ELSIF optionIs ('--suppress-noreturn', arg)
+ THEN
+ suppressNoReturn := TRUE
END
END handleOption ;
gccConfigSystem := FALSE ;
scaffoldMain := FALSE ;
scaffoldDynamic := FALSE ;
+ suppressNoReturn := FALSE ;
hPrefix := InitString ('') ;
cppArgs := InitString ('') ;
cppProgram := InitString ('') ;
(*c).next->contents.next = NULL;
ConcatContents (&(*c).next->contents, (const char *) a, _a_high, h, o);
AddDebugInfo ((*c).next);
- (*c).next = AssignDebug ((*c).next, (const char *) "../../gcc/m2/gm2-libs/DynamicStrings.mod", 40, 722, (const char *) "ConcatContents", 14);
+ (*c).next = AssignDebug ((*c).next, (const char *) "../../gcc-read-write/gcc/m2/gm2-libs/DynamicStrings.mod", 55, 722, (const char *) "ConcatContents", 14);
}
else
{
AddDebugInfo ((*c).next);
if (TraceOn)
{
- (*c).next = AssignDebug ((*c).next, (const char *) "../../gcc/m2/gm2-libs/DynamicStrings.mod", 40, 917, (const char *) "ConcatContentsAddress", 21);
+ (*c).next = AssignDebug ((*c).next, (const char *) "../../gcc-read-write/gcc/m2/gm2-libs/DynamicStrings.mod", 55, 917, (const char *) "ConcatContentsAddress", 21);
}
}
else
AddDebugInfo (s);
if (TraceOn)
{
- s = AssignDebug (s, (const char *) "../../gcc/m2/gm2-libs/DynamicStrings.mod", 40, 758, (const char *) "InitString", 10);
+ s = AssignDebug (s, (const char *) "../../gcc-read-write/gcc/m2/gm2-libs/DynamicStrings.mod", 55, 758, (const char *) "InitString", 10);
}
return s;
/* static analysis guarentees a RETURN statement will be used before here. */
AddDebugInfo (s);
if (TraceOn)
{
- s = AssignDebug (s, (const char *) "../../gcc/m2/gm2-libs/DynamicStrings.mod", 40, 957, (const char *) "InitStringCharStar", 18);
+ s = AssignDebug (s, (const char *) "../../gcc-read-write/gcc/m2/gm2-libs/DynamicStrings.mod", 55, 957, (const char *) "InitStringCharStar", 18);
}
return s;
/* static analysis guarentees a RETURN statement will be used before here. */
s = DynamicStrings_InitString ((const char *) &a.array[0], 1);
if (TraceOn)
{
- s = AssignDebug (s, (const char *) "../../gcc/m2/gm2-libs/DynamicStrings.mod", 40, 977, (const char *) "InitStringChar", 14);
+ s = AssignDebug (s, (const char *) "../../gcc-read-write/gcc/m2/gm2-libs/DynamicStrings.mod", 55, 977, (const char *) "InitStringChar", 14);
}
return s;
/* static analysis guarentees a RETURN statement will be used before here. */
s = DynamicStrings_Assign (DynamicStrings_InitString ((const char *) "", 0), s);
if (TraceOn)
{
- s = AssignDebug (s, (const char *) "../../gcc/m2/gm2-libs/DynamicStrings.mod", 40, 1173, (const char *) "Dup", 3);
+ s = AssignDebug (s, (const char *) "../../gcc-read-write/gcc/m2/gm2-libs/DynamicStrings.mod", 55, 1173, (const char *) "Dup", 3);
}
return s;
/* static analysis guarentees a RETURN statement will be used before here. */
a = DynamicStrings_ConCat (DynamicStrings_ConCat (DynamicStrings_InitString ((const char *) "", 0), a), b);
if (TraceOn)
{
- a = AssignDebug (a, (const char *) "../../gcc/m2/gm2-libs/DynamicStrings.mod", 40, 1193, (const char *) "Add", 3);
+ a = AssignDebug (a, (const char *) "../../gcc-read-write/gcc/m2/gm2-libs/DynamicStrings.mod", 55, 1193, (const char *) "Add", 3);
}
return a;
/* static analysis guarentees a RETURN statement will be used before here. */
t = DynamicStrings_InitStringCharStar (a);
if (TraceOn)
{
- t = AssignDebug (t, (const char *) "../../gcc/m2/gm2-libs/DynamicStrings.mod", 40, 1250, (const char *) "EqualCharStar", 13);
+ t = AssignDebug (t, (const char *) "../../gcc-read-write/gcc/m2/gm2-libs/DynamicStrings.mod", 55, 1250, (const char *) "EqualCharStar", 13);
}
t = AddToGarbage (t, s);
if (DynamicStrings_Equal (t, s))
t = DynamicStrings_InitString ((const char *) a, _a_high);
if (TraceOn)
{
- t = AssignDebug (t, (const char *) "../../gcc/m2/gm2-libs/DynamicStrings.mod", 40, 1280, (const char *) "EqualArray", 10);
+ t = AssignDebug (t, (const char *) "../../gcc-read-write/gcc/m2/gm2-libs/DynamicStrings.mod", 55, 1280, (const char *) "EqualArray", 10);
}
t = AddToGarbage (t, s);
if (DynamicStrings_Equal (t, s))
}
if (TraceOn)
{
- s = AssignDebug (s, (const char *) "../../gcc/m2/gm2-libs/DynamicStrings.mod", 40, 1312, (const char *) "Mult", 4);
+ s = AssignDebug (s, (const char *) "../../gcc-read-write/gcc/m2/gm2-libs/DynamicStrings.mod", 55, 1312, (const char *) "Mult", 4);
}
return s;
/* static analysis guarentees a RETURN statement will be used before here. */
AddDebugInfo (t->contents.next);
if (TraceOn)
{
- t->contents.next = AssignDebug (t->contents.next, (const char *) "../../gcc/m2/gm2-libs/DynamicStrings.mod", 40, 1380, (const char *) "Slice", 5);
+ t->contents.next = AssignDebug (t->contents.next, (const char *) "../../gcc-read-write/gcc/m2/gm2-libs/DynamicStrings.mod", 55, 1380, (const char *) "Slice", 5);
}
}
t = t->contents.next;
}
if (TraceOn)
{
- d = AssignDebug (d, (const char *) "../../gcc/m2/gm2-libs/DynamicStrings.mod", 40, 1397, (const char *) "Slice", 5);
+ d = AssignDebug (d, (const char *) "../../gcc-read-write/gcc/m2/gm2-libs/DynamicStrings.mod", 55, 1397, (const char *) "Slice", 5);
}
return d;
/* static analysis guarentees a RETURN statement will be used before here. */
}
if (TraceOn)
{
- s = AssignDebug (s, (const char *) "../../gcc/m2/gm2-libs/DynamicStrings.mod", 40, 1509, (const char *) "RemoveComment", 13);
+ s = AssignDebug (s, (const char *) "../../gcc-read-write/gcc/m2/gm2-libs/DynamicStrings.mod", 55, 1509, (const char *) "RemoveComment", 13);
}
return s;
/* static analysis guarentees a RETURN statement will be used before here. */
s = DynamicStrings_Slice (s, (int ) (i), 0);
if (TraceOn)
{
- s = AssignDebug (s, (const char *) "../../gcc/m2/gm2-libs/DynamicStrings.mod", 40, 1621, (const char *) "RemoveWhitePrefix", 17);
+ s = AssignDebug (s, (const char *) "../../gcc-read-write/gcc/m2/gm2-libs/DynamicStrings.mod", 55, 1621, (const char *) "RemoveWhitePrefix", 17);
}
return s;
/* static analysis guarentees a RETURN statement will be used before here. */
s = DynamicStrings_Slice (s, 0, i+1);
if (TraceOn)
{
- s = AssignDebug (s, (const char *) "../../gcc/m2/gm2-libs/DynamicStrings.mod", 40, 1643, (const char *) "RemoveWhitePostfix", 18);
+ s = AssignDebug (s, (const char *) "../../gcc-read-write/gcc/m2/gm2-libs/DynamicStrings.mod", 55, 1643, (const char *) "RemoveWhitePostfix", 18);
}
return s;
/* static analysis guarentees a RETURN statement will be used before here. */
{
stop ();
/* writeString ("mismatched number of PopAllocation's compared to PushAllocation's") */
- M2RTS_Halt ((const char *) "../../gcc/m2/gm2-libs/DynamicStrings.mod", 40, 176, (const char *) "PopAllocationExemption", 22, (const char *) "mismatched number of PopAllocation's compared to PushAllocation's", 65);
+ M2RTS_Halt ((const char *) "../../gcc-read-write/gcc/m2/gm2-libs/DynamicStrings.mod", 55, 176, (const char *) "PopAllocationExemption", 22, (const char *) "mismatched number of PopAllocation's compared to PushAllocation's", 65);
}
else
{
return f; /* create new slot */
}
}
- ReturnException ("../../gcc/m2/gm2-libs/FIO.def", 25, 1);
+ ReturnException ("../../gcc-read-write/gcc/m2/gm2-libs/FIO.def", 25, 1);
__builtin_unreachable ();
}
{
return (n >= i->Low) && (n <= i->High);
}
- ReturnException ("../../gcc/m2/gm2-libs/Indexing.def", 25, 1);
+ ReturnException ("../../gcc-read-write/gcc/m2/gm2-libs/Indexing.def", 25, 1);
__builtin_unreachable ();
}
{
return i->High;
}
- ReturnException ("../../gcc/m2/gm2-libs/Indexing.def", 25, 1);
+ ReturnException ("../../gcc-read-write/gcc/m2/gm2-libs/Indexing.def", 25, 1);
__builtin_unreachable ();
}
{
return i->Low;
}
- ReturnException ("../../gcc/m2/gm2-libs/Indexing.def", 25, 1);
+ ReturnException ("../../gcc-read-write/gcc/m2/gm2-libs/Indexing.def", 25, 1);
__builtin_unreachable ();
}
n = RTExceptions_GetNumber (e);
if (n == (UINT_MAX))
{
- RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_exException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc/m2/gm2-libs/M2EXCEPTION.mod")), 47, 6, const_cast<void*> (reinterpret_cast<const void*>("M2Exception")), const_cast<void*> (reinterpret_cast<const void*>("current coroutine is not in the exceptional execution state")));
+ RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_exException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc-read-write/gcc/m2/gm2-libs/M2EXCEPTION.mod")), 47, 6, const_cast<void*> (reinterpret_cast<const void*>("M2Exception")), const_cast<void*> (reinterpret_cast<const void*>("current coroutine is not in the exceptional execution state")));
}
else
{
return (M2EXCEPTION_M2Exceptions) (n);
}
- ReturnException ("../../gcc/m2/gm2-libs/M2EXCEPTION.def", 25, 1);
+ ReturnException ("../../gcc-read-write/gcc/m2/gm2-libs/M2EXCEPTION.def", 25, 1);
__builtin_unreachable ();
}
not call ExecuteTerminationProcedures.
*/
-extern "C" void M2RTS_Terminate (void) __attribute__ ((noreturn));
+extern "C" void M2RTS_Terminate (void);
/*
HALT - terminate the current program. The procedure
then calling HALT with no parameter.
*/
-extern "C" void M2RTS_HALT (int exitcode) __attribute__ ((noreturn));
+extern "C" void M2RTS_HALT (int exitcode);
/*
Halt - provides a more user friendly version of HALT, which takes
to stderr and calls exit (1).
*/
-extern "C" void M2RTS_Halt (const char *filename_, unsigned int _filename_high, unsigned int line, const char *function_, unsigned int _function_high, const char *description_, unsigned int _description_high) __attribute__ ((noreturn));
+extern "C" void M2RTS_Halt (const char *filename_, unsigned int _filename_high, unsigned int line, const char *function_, unsigned int _function_high, const char *description_, unsigned int _description_high);
/*
HaltC - provides a more user friendly version of HALT, which takes
to stderr and calls exit (1).
*/
-extern "C" void M2RTS_HaltC (void * filename, unsigned int line, void * function, void * description) __attribute__ ((noreturn));
+extern "C" void M2RTS_HaltC (void * filename, unsigned int line, void * function, void * description);
/*
ExitOnHalt - if HALT is executed then call exit with the exit code, e.
ErrorMessage - emits an error message to stderr and then calls exit (1).
*/
-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));
+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);
/*
Length - returns the length of a string, a. This is called whenever
*/
extern "C" unsigned int M2RTS_Length (const char *a_, unsigned int _a_high);
-extern "C" void M2RTS_AssignmentException (void * filename, unsigned int line, unsigned int column, void * scope, void * message) __attribute__ ((noreturn));
-extern "C" void M2RTS_ReturnException (void * filename, unsigned int line, unsigned int column, void * scope, void * message) __attribute__ ((noreturn));
-extern "C" void M2RTS_IncException (void * filename, unsigned int line, unsigned int column, void * scope, void * message) __attribute__ ((noreturn));
-extern "C" void M2RTS_DecException (void * filename, unsigned int line, unsigned int column, void * scope, void * message) __attribute__ ((noreturn));
-extern "C" void M2RTS_InclException (void * filename, unsigned int line, unsigned int column, void * scope, void * message) __attribute__ ((noreturn));
-extern "C" void M2RTS_ExclException (void * filename, unsigned int line, unsigned int column, void * scope, void * message) __attribute__ ((noreturn));
-extern "C" void M2RTS_ShiftException (void * filename, unsigned int line, unsigned int column, void * scope, void * message) __attribute__ ((noreturn));
-extern "C" void M2RTS_RotateException (void * filename, unsigned int line, unsigned int column, void * scope, void * message) __attribute__ ((noreturn));
-extern "C" void M2RTS_StaticArraySubscriptException (void * filename, unsigned int line, unsigned int column, void * scope, void * message) __attribute__ ((noreturn));
-extern "C" void M2RTS_DynamicArraySubscriptException (void * filename, unsigned int line, unsigned int column, void * scope, void * message) __attribute__ ((noreturn));
-extern "C" void M2RTS_ForLoopBeginException (void * filename, unsigned int line, unsigned int column, void * scope, void * message) __attribute__ ((noreturn));
-extern "C" void M2RTS_ForLoopToException (void * filename, unsigned int line, unsigned int column, void * scope, void * message) __attribute__ ((noreturn));
-extern "C" void M2RTS_ForLoopEndException (void * filename, unsigned int line, unsigned int column, void * scope, void * message) __attribute__ ((noreturn));
-extern "C" void M2RTS_PointerNilException (void * filename, unsigned int line, unsigned int column, void * scope, void * message) __attribute__ ((noreturn));
-extern "C" void M2RTS_NoReturnException (void * filename, unsigned int line, unsigned int column, void * scope, void * message) __attribute__ ((noreturn));
-extern "C" void M2RTS_CaseException (void * filename, unsigned int line, unsigned int column, void * scope, void * message) __attribute__ ((noreturn));
-extern "C" void M2RTS_WholeNonPosDivException (void * filename, unsigned int line, unsigned int column, void * scope, void * message) __attribute__ ((noreturn));
-extern "C" void M2RTS_WholeNonPosModException (void * filename, unsigned int line, unsigned int column, void * scope, void * message) __attribute__ ((noreturn));
-extern "C" void M2RTS_WholeZeroDivException (void * filename, unsigned int line, unsigned int column, void * scope, void * message) __attribute__ ((noreturn));
-extern "C" void M2RTS_WholeZeroRemException (void * filename, unsigned int line, unsigned int column, void * scope, void * message) __attribute__ ((noreturn));
-extern "C" void M2RTS_WholeValueException (void * filename, unsigned int line, unsigned int column, void * scope, void * message) __attribute__ ((noreturn));
-extern "C" void M2RTS_RealValueException (void * filename, unsigned int line, unsigned int column, void * scope, void * message) __attribute__ ((noreturn));
-extern "C" void M2RTS_ParameterException (void * filename, unsigned int line, unsigned int column, void * scope, void * message) __attribute__ ((noreturn));
-extern "C" void M2RTS_NoException (void * filename, unsigned int line, unsigned int column, void * scope, void * message) __attribute__ ((noreturn));
+extern "C" void M2RTS_AssignmentException (void * filename, unsigned int line, unsigned int column, void * scope, void * message);
+extern "C" void M2RTS_ReturnException (void * filename, unsigned int line, unsigned int column, void * scope, void * message);
+extern "C" void M2RTS_IncException (void * filename, unsigned int line, unsigned int column, void * scope, void * message);
+extern "C" void M2RTS_DecException (void * filename, unsigned int line, unsigned int column, void * scope, void * message);
+extern "C" void M2RTS_InclException (void * filename, unsigned int line, unsigned int column, void * scope, void * message);
+extern "C" void M2RTS_ExclException (void * filename, unsigned int line, unsigned int column, void * scope, void * message);
+extern "C" void M2RTS_ShiftException (void * filename, unsigned int line, unsigned int column, void * scope, void * message);
+extern "C" void M2RTS_RotateException (void * filename, unsigned int line, unsigned int column, void * scope, void * message);
+extern "C" void M2RTS_StaticArraySubscriptException (void * filename, unsigned int line, unsigned int column, void * scope, void * message);
+extern "C" void M2RTS_DynamicArraySubscriptException (void * filename, unsigned int line, unsigned int column, void * scope, void * message);
+extern "C" void M2RTS_ForLoopBeginException (void * filename, unsigned int line, unsigned int column, void * scope, void * message);
+extern "C" void M2RTS_ForLoopToException (void * filename, unsigned int line, unsigned int column, void * scope, void * message);
+extern "C" void M2RTS_ForLoopEndException (void * filename, unsigned int line, unsigned int column, void * scope, void * message);
+extern "C" void M2RTS_PointerNilException (void * filename, unsigned int line, unsigned int column, void * scope, void * message);
+extern "C" void M2RTS_NoReturnException (void * filename, unsigned int line, unsigned int column, void * scope, void * message);
+extern "C" void M2RTS_CaseException (void * filename, unsigned int line, unsigned int column, void * scope, void * message);
+extern "C" void M2RTS_WholeNonPosDivException (void * filename, unsigned int line, unsigned int column, void * scope, void * message);
+extern "C" void M2RTS_WholeNonPosModException (void * filename, unsigned int line, unsigned int column, void * scope, void * message);
+extern "C" void M2RTS_WholeZeroDivException (void * filename, unsigned int line, unsigned int column, void * scope, void * message);
+extern "C" void M2RTS_WholeZeroRemException (void * filename, unsigned int line, unsigned int column, void * scope, void * message);
+extern "C" void M2RTS_WholeValueException (void * filename, unsigned int line, unsigned int column, void * scope, void * message);
+extern "C" void M2RTS_RealValueException (void * filename, unsigned int line, unsigned int column, void * scope, void * message);
+extern "C" void M2RTS_ParameterException (void * filename, unsigned int line, unsigned int column, void * scope, void * message);
+extern "C" void M2RTS_NoException (void * filename, unsigned int line, unsigned int column, void * scope, void * message);
/*
ExecuteReverse - execute the procedure associated with procptr
ErrorMessageC - emits an error message to stderr and then calls exit (1).
*/
-static void ErrorMessageC (void * message, void * filename, unsigned int line, void * function) __attribute__ ((noreturn));
+static void ErrorMessageC (void * message, void * filename, unsigned int line, void * function);
/*
InitProcList - initialize the head and tail pointers to NIL.
(*p) = ASCII_nul;
return DoMakeKey (n, higha);
}
- ReturnException ("../../gcc/m2/gm2-compiler/NameKey.def", 20, 1);
+ ReturnException ("../../gcc-read-write/gcc/m2/gm2-compiler/NameKey.def", 20, 1);
__builtin_unreachable ();
}
return DoMakeKey (n, higha);
}
}
- ReturnException ("../../gcc/m2/gm2-compiler/NameKey.def", 20, 1);
+ ReturnException ("../../gcc-read-write/gcc/m2/gm2-compiler/NameKey.def", 20, 1);
__builtin_unreachable ();
}
}
else
{
- Debug_Halt ((const char *) "max push back stack exceeded, increase MaxPushBackStack", 55, 150, (const char *) "../../gcc/m2/gm2-libs/PushBackInput.mod", 39);
+ Debug_Halt ((const char *) "max push back stack exceeded, increase MaxPushBackStack", 55, 150, (const char *) "../../gcc-read-write/gcc/m2/gm2-libs/PushBackInput.mod", 54);
}
return ch;
/* static analysis guarentees a RETURN statement will be used before here. */
l -= 1;
if ((PushBackInput_PutCh (a[l])) != a[l])
{
- Debug_Halt ((const char *) "assert failed", 13, 132, (const char *) "../../gcc/m2/gm2-libs/PushBackInput.mod", 39);
+ Debug_Halt ((const char *) "assert failed", 13, 132, (const char *) "../../gcc-read-write/gcc/m2/gm2-libs/PushBackInput.mod", 54);
}
}
}
i -= 1;
if ((PushBackInput_PutCh (DynamicStrings_char (s, static_cast<int> (i)))) != (DynamicStrings_char (s, static_cast<int> (i))))
{
- Debug_Halt ((const char *) "assert failed", 13, 113, (const char *) "../../gcc/m2/gm2-libs/PushBackInput.mod", 39);
+ Debug_Halt ((const char *) "assert failed", 13, 113, (const char *) "../../gcc-read-write/gcc/m2/gm2-libs/PushBackInput.mod", 54);
}
}
}
static void indexf (void * a)
{
- RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_indexException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc/m2/gm2-libs/RTExceptions.mod")), 613, 9, const_cast<void*> (reinterpret_cast<const void*>("indexf")), const_cast<void*> (reinterpret_cast<const void*>("array index out of bounds")));
+ RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_indexException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 613, 9, const_cast<void*> (reinterpret_cast<const void*>("indexf")), const_cast<void*> (reinterpret_cast<const void*>("array index out of bounds")));
}
static void range (void * a)
{
- RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_rangeException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc/m2/gm2-libs/RTExceptions.mod")), 625, 9, const_cast<void*> (reinterpret_cast<const void*>("range")), const_cast<void*> (reinterpret_cast<const void*>("assignment out of range")));
+ RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_rangeException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 625, 9, const_cast<void*> (reinterpret_cast<const void*>("range")), const_cast<void*> (reinterpret_cast<const void*>("assignment out of range")));
}
static void casef (void * a)
{
- RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_caseSelectException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc/m2/gm2-libs/RTExceptions.mod")), 637, 9, const_cast<void*> (reinterpret_cast<const void*>("casef")), const_cast<void*> (reinterpret_cast<const void*>("case selector out of range")));
+ RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_caseSelectException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 637, 9, const_cast<void*> (reinterpret_cast<const void*>("casef")), const_cast<void*> (reinterpret_cast<const void*>("case selector out of range")));
}
static void invalidloc (void * a)
{
- RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_invalidLocation)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc/m2/gm2-libs/RTExceptions.mod")), 649, 9, const_cast<void*> (reinterpret_cast<const void*>("invalidloc")), const_cast<void*> (reinterpret_cast<const void*>("invalid address referenced")));
+ RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_invalidLocation)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 649, 9, const_cast<void*> (reinterpret_cast<const void*>("invalidloc")), const_cast<void*> (reinterpret_cast<const void*>("invalid address referenced")));
}
static void function (void * a)
{
- RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_functionException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc/m2/gm2-libs/RTExceptions.mod")), 661, 9, const_cast<void*> (reinterpret_cast<const void*>("function")), const_cast<void*> (reinterpret_cast<const void*>("... function ... "))); /* --fixme-- what has happened ? */
+ RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_functionException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 661, 9, const_cast<void*> (reinterpret_cast<const void*>("function")), const_cast<void*> (reinterpret_cast<const void*>("... function ... "))); /* --fixme-- what has happened ? */
}
static void wholevalue (void * a)
{
- RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_wholeValueException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc/m2/gm2-libs/RTExceptions.mod")), 673, 9, const_cast<void*> (reinterpret_cast<const void*>("wholevalue")), const_cast<void*> (reinterpret_cast<const void*>("illegal whole value exception")));
+ RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_wholeValueException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 673, 9, const_cast<void*> (reinterpret_cast<const void*>("wholevalue")), const_cast<void*> (reinterpret_cast<const void*>("illegal whole value exception")));
}
static void wholediv (void * a)
{
- RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_wholeDivException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc/m2/gm2-libs/RTExceptions.mod")), 685, 9, const_cast<void*> (reinterpret_cast<const void*>("wholediv")), const_cast<void*> (reinterpret_cast<const void*>("illegal whole value exception")));
+ RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_wholeDivException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 685, 9, const_cast<void*> (reinterpret_cast<const void*>("wholediv")), const_cast<void*> (reinterpret_cast<const void*>("illegal whole value exception")));
}
static void realvalue (void * a)
{
- RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_realValueException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc/m2/gm2-libs/RTExceptions.mod")), 697, 9, const_cast<void*> (reinterpret_cast<const void*>("realvalue")), const_cast<void*> (reinterpret_cast<const void*>("illegal real value exception")));
+ RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_realValueException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 697, 9, const_cast<void*> (reinterpret_cast<const void*>("realvalue")), const_cast<void*> (reinterpret_cast<const void*>("illegal real value exception")));
}
static void realdiv (void * a)
{
- RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_realDivException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc/m2/gm2-libs/RTExceptions.mod")), 709, 9, const_cast<void*> (reinterpret_cast<const void*>("realdiv")), const_cast<void*> (reinterpret_cast<const void*>("real number division by zero exception")));
+ RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_realDivException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 709, 9, const_cast<void*> (reinterpret_cast<const void*>("realdiv")), const_cast<void*> (reinterpret_cast<const void*>("real number division by zero exception")));
}
static void complexvalue (void * a)
{
- RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_complexValueException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc/m2/gm2-libs/RTExceptions.mod")), 721, 9, const_cast<void*> (reinterpret_cast<const void*>("complexvalue")), const_cast<void*> (reinterpret_cast<const void*>("illegal complex value exception")));
+ RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_complexValueException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 721, 9, const_cast<void*> (reinterpret_cast<const void*>("complexvalue")), const_cast<void*> (reinterpret_cast<const void*>("illegal complex value exception")));
}
static void complexdiv (void * a)
{
- RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_complexDivException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc/m2/gm2-libs/RTExceptions.mod")), 733, 9, const_cast<void*> (reinterpret_cast<const void*>("complexdiv")), const_cast<void*> (reinterpret_cast<const void*>("complex number division by zero exception")));
+ RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_complexDivException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 733, 9, const_cast<void*> (reinterpret_cast<const void*>("complexdiv")), const_cast<void*> (reinterpret_cast<const void*>("complex number division by zero exception")));
}
static void protection (void * a)
{
- RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_protException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc/m2/gm2-libs/RTExceptions.mod")), 745, 9, const_cast<void*> (reinterpret_cast<const void*>("protection")), const_cast<void*> (reinterpret_cast<const void*>("protection exception")));
+ RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_protException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 745, 9, const_cast<void*> (reinterpret_cast<const void*>("protection")), const_cast<void*> (reinterpret_cast<const void*>("protection exception")));
}
static void systemf (void * a)
{
- RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_sysException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc/m2/gm2-libs/RTExceptions.mod")), 757, 9, const_cast<void*> (reinterpret_cast<const void*>("systemf")), const_cast<void*> (reinterpret_cast<const void*>("system exception")));
+ RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_sysException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 757, 9, const_cast<void*> (reinterpret_cast<const void*>("systemf")), const_cast<void*> (reinterpret_cast<const void*>("system exception")));
}
static void coroutine (void * a)
{
- RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_coException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc/m2/gm2-libs/RTExceptions.mod")), 769, 9, const_cast<void*> (reinterpret_cast<const void*>("coroutine")), const_cast<void*> (reinterpret_cast<const void*>("coroutine exception")));
+ RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_coException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 769, 9, const_cast<void*> (reinterpret_cast<const void*>("coroutine")), const_cast<void*> (reinterpret_cast<const void*>("coroutine exception")));
}
static void exception (void * a)
{
- RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_exException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc/m2/gm2-libs/RTExceptions.mod")), 781, 9, const_cast<void*> (reinterpret_cast<const void*>("exception")), const_cast<void*> (reinterpret_cast<const void*>("exception exception")));
+ RTExceptions_Raise ( ((unsigned int) (M2EXCEPTION_exException)), const_cast<void*> (reinterpret_cast<const void*>("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod")), 781, 9, const_cast<void*> (reinterpret_cast<const void*>("exception")), const_cast<void*> (reinterpret_cast<const void*>("exception exception")));
}
{
if (currentEHB == NULL)
{
- M2RTS_Halt ((const char *) "../../gcc/m2/gm2-libs/RTExceptions.mod", 38, 599, (const char *) "GetBaseExceptionBlock", 21, (const char *) "currentEHB has not been initialized yet", 39);
+ M2RTS_Halt ((const char *) "../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.mod", 53, 599, (const char *) "GetBaseExceptionBlock", 21, (const char *) "currentEHB has not been initialized yet", 39);
}
else
{
return currentEHB;
}
- ReturnException ("../../gcc/m2/gm2-libs/RTExceptions.def", 25, 1);
+ ReturnException ("../../gcc-read-write/gcc/m2/gm2-libs/RTExceptions.def", 25, 1);
__builtin_unreachable ();
}
M2RTS_HALT (-1);
__builtin_unreachable ();
}
- ReturnException ("../../gcc/m2/gm2-libs/StdIO.def", 25, 1);
+ ReturnException ("../../gcc-read-write/gcc/m2/gm2-libs/StdIO.def", 25, 1);
__builtin_unreachable ();
}
M2RTS_HALT (-1);
__builtin_unreachable ();
}
- ReturnException ("../../gcc/m2/gm2-libs/StdIO.def", 25, 1);
+ ReturnException ("../../gcc-read-write/gcc/m2/gm2-libs/StdIO.def", 25, 1);
__builtin_unreachable ();
}
(*parent) = t;
if (t == NULL)
{
- Debug_Halt ((const char *) "parameter t should never be NIL", 31, 240, (const char *) "../../gcc/m2/gm2-compiler/SymbolKey.mod", 39);
+ Debug_Halt ((const char *) "parameter t should never be NIL", 31, 240, (const char *) "../../gcc-read-write/gcc/m2/gm2-compiler/SymbolKey.mod", 54);
}
Assertion_Assert (t->Right == NULL);
(*child) = t->Left;
}
else
{
- Debug_Halt ((const char *) "symbol already stored", 21, 156, (const char *) "../../gcc/m2/gm2-compiler/SymbolKey.mod", 39);
+ Debug_Halt ((const char *) "symbol already stored", 21, 156, (const char *) "../../gcc-read-write/gcc/m2/gm2-compiler/SymbolKey.mod", 54);
}
}
}
else
{
- Debug_Halt ((const char *) "trying to delete a symbol that is not in the tree - the compiler never expects this to occur", 92, 223, (const char *) "../../gcc/m2/gm2-compiler/SymbolKey.mod", 39);
+ Debug_Halt ((const char *) "trying to delete a symbol that is not in the tree - the compiler never expects this to occur", 92, 223, (const char *) "../../gcc-read-write/gcc/m2/gm2-compiler/SymbolKey.mod", 54);
}
}
(*a) = libc_malloc (static_cast<size_t> (size));
if ((*a) == NULL)
{
- Debug_Halt ((const char *) "out of memory error", 19, 50, (const char *) "../../gcc/m2/gm2-libs/SysStorage.mod", 36);
+ Debug_Halt ((const char *) "out of memory error", 19, 50, (const char *) "../../gcc-read-write/gcc/m2/gm2-libs/SysStorage.mod", 51);
}
if (enableTrace && trace)
{
}
if ((libc_memset ((*a), 0, static_cast<size_t> (size))) != (*a))
{
- Debug_Halt ((const char *) "memset should have returned the first parameter", 47, 76, (const char *) "../../gcc/m2/gm2-libs/SysStorage.mod", 36);
+ Debug_Halt ((const char *) "memset should have returned the first parameter", 47, 76, (const char *) "../../gcc-read-write/gcc/m2/gm2-libs/SysStorage.mod", 51);
}
}
if (enableDeallocation)
(*a) = libc_realloc ((*a), static_cast<size_t> (size));
if ((*a) == NULL)
{
- Debug_Halt ((const char *) "out of memory error", 19, 119, (const char *) "../../gcc/m2/gm2-libs/SysStorage.mod", 36);
+ Debug_Halt ((const char *) "out of memory error", 19, 119, (const char *) "../../gcc-read-write/gcc/m2/gm2-libs/SysStorage.mod", 51);
}
if (enableTrace && trace)
{
static char **UnixArgs_ArgV;
static char **UnixArgs_EnvV;
+#define LIBNAME "m2pim"
+
/* GetArgC returns argc. */
_M2_UnixArgs_ctor::_M2_UnixArgs_ctor (void)
{
- M2RTS_RegisterModule ("UnixArgs", _M2_UnixArgs_init, _M2_UnixArgs_fini,
+ M2RTS_RegisterModule ("UnixArgs", LIBNAME, _M2_UnixArgs_init, _M2_UnixArgs_fini,
_M2_UnixArgs_dep);
}
typedef void (*proc_dep) (void);
extern "C" void M2RTS_RequestDependant (const char *modulename, const char *dependancy);
-extern "C" void M2RTS_RegisterModule (const char *modulename,
+extern "C" void M2RTS_RegisterModule (const char *modulename, const char *libname,
proc_con init, proc_con fini, proc_dep dependencies);
extern "C" void _M2_M2RTS_init (void);