summaryrefslogtreecommitdiff
path: root/compiler_and_linker/unsorted/IroUtil.c
diff options
context:
space:
mode:
authorAsh Wolf <ninji@wuffs.org>2022-12-29 12:32:55 +0000
committerAsh Wolf <ninji@wuffs.org>2022-12-29 12:32:55 +0000
commitfcfbafff31869ed808bff0639532db1828660e92 (patch)
tree7425b346b031c4cb47a06250b3f6f950374d44ae /compiler_and_linker/unsorted/IroUtil.c
parentbc1321735c15104ffad195e1509cab5f3a044260 (diff)
downloadMWCC-fcfbafff31869ed808bff0639532db1828660e92.tar.gz
MWCC-fcfbafff31869ed808bff0639532db1828660e92.zip
dump lots more code
Diffstat (limited to 'compiler_and_linker/unsorted/IroUtil.c')
-rw-r--r--compiler_and_linker/unsorted/IroUtil.c51
1 files changed, 17 insertions, 34 deletions
diff --git a/compiler_and_linker/unsorted/IroUtil.c b/compiler_and_linker/unsorted/IroUtil.c
index 37a6be9..67edd4b 100644
--- a/compiler_and_linker/unsorted/IroUtil.c
+++ b/compiler_and_linker/unsorted/IroUtil.c
@@ -149,14 +149,12 @@ Type *IRO_UnsignedType(Type *type) {
return TYPE(&stunsignedlong);
if (type->size == stunsignedlonglong.size)
return TYPE(&stunsignedlonglong);
-#line 281
- CError_FATAL();
+ CError_FATAL(281);
return NULL;
}
if (!IS_TYPE_INT(type)) {
-#line 287
- CError_FATAL();
+ CError_FATAL(287);
return NULL;
}
@@ -174,8 +172,7 @@ Type *IRO_UnsignedType(Type *type) {
if (type == TYPE(&stsignedlonglong) || type == TYPE(&stunsignedlonglong))
return TYPE(&stunsignedlonglong);
-#line 319
- CError_FATAL();
+ CError_FATAL(319);
return NULL;
}
@@ -191,14 +188,12 @@ Type *IRO_SignedType(Type *type) {
return TYPE(&stsignedlong);
if (type->size == stsignedlonglong.size)
return TYPE(&stsignedlonglong);
-#line 357
- CError_FATAL();
+ CError_FATAL(357);
return NULL;
}
if (!IS_TYPE_INT(type)) {
-#line 363
- CError_FATAL();
+ CError_FATAL(363);
return NULL;
}
@@ -219,8 +214,7 @@ Type *IRO_SignedType(Type *type) {
if (type == TYPE(&stsignedlonglong) || type == TYPE(&stunsignedlonglong))
return TYPE(&stsignedlonglong);
-#line 399
- CError_FATAL();
+ CError_FATAL(399);
return NULL;
}
@@ -371,8 +365,7 @@ IROLinear *IRO_FindFirst(IROLinear *linear) {
i = linear->u.funccall.argCount - 1;
return IRO_FindFirst(linear->u.funccall.args[i]);
default:
-#line 641
- CError_FATAL();
+ CError_FATAL(641);
return NULL;
}
}
@@ -562,8 +555,7 @@ void IRO_Cut(IROLinear *a, IROLinear *b) {
for (scan = IRO_FirstLinear; scan && scan != a; scan = scan->next)
prev = scan;
-#line 951
- CError_ASSERT(scan);
+ CError_ASSERT(951, scan);
for (node = IRO_FirstNode; node; node = node->nextnode) {
if (node->first == a) {
@@ -591,15 +583,13 @@ void IRO_Paste(IROLinear *a, IROLinear *b, IROLinear *c) {
IROLinear *scan;
IRONode *node;
-#line 1002
- CError_ASSERT(c && c->type != IROLinearLabel);
+ CError_ASSERT(1002, c && c->type != IROLinearLabel);
prev = NULL;
for (scan = IRO_FirstLinear; scan && scan != c; scan = scan->next)
prev = scan;
-#line 1016
- CError_ASSERT(scan);
+ CError_ASSERT(1016, scan);
for (node = IRO_FirstNode; node; node = node->nextnode) {
if (node->first == c) {
@@ -623,8 +613,7 @@ void IRO_PasteAfter(IROLinear *a, IROLinear *b, IROLinear *c) {
case IROLinearIf:
case IROLinearIfNot:
case IROLinearSwitch:
-#line 1060
- CError_FATAL();
+ CError_FATAL(1060);
}
for (node = IRO_FirstNode; node; node = node->nextnode) {
@@ -719,8 +708,7 @@ IROLinear *IRO_FindLabelNode(CLabel *label, IROLinear *linear) {
break;
}
-#line 1244
- CError_ASSERT(scan);
+ CError_ASSERT(1244, scan);
return scan;
}
@@ -901,8 +889,7 @@ inline IROLinear *LocateFatherHelper(IROLinear *linear, Boolean a, IROLinear ***
case IROLinearEnd:
break;
default:
-#line 1536
- CError_FATAL();
+ CError_FATAL(1536);
}
scan = scan->next;
}
@@ -923,8 +910,7 @@ IROLinear *IRO_LocateFather_Cut_And_Paste(IROLinear *a, IROLinear *b) {
IROLinear **p;
IROLinear *l = LocateFatherHelper(a, 0, &p);
if (l) {
-#line 1568
- CError_ASSERT(p && *p);
+ CError_ASSERT(1568, p && *p);
IRO_NopOut(a);
*p = b;
}
@@ -935,8 +921,7 @@ IROLinear *IRO_LocateFather_Cut_And_Paste_Without_Nopping(IROLinear *a, IROLinea
IROLinear **p;
IROLinear *l = LocateFatherHelper(a, 0, &p);
if (l) {
-#line 1585
- CError_ASSERT(p && *p);
+ CError_ASSERT(1585, p && *p);
*p = b;
}
return l;
@@ -947,8 +932,7 @@ void IRO_ReplaceReference(IROLinear *a, Object *obj, IROLinear *b) {
IROList list;
if (LocateFatherHelper(a, 1, &ptr)) {
-#line 1605
- CError_ASSERT(ptr && *ptr);
+ CError_ASSERT(1605, ptr && *ptr);
IRO_InitList(&list);
*ptr = IRO_TempReference(obj, &list);
IRO_PasteAfter(list.head, list.tail, b);
@@ -964,8 +948,7 @@ void IRO_ReplaceReferenceWithNode(IROLinear *a, IROLinear *b) {
IROList list;
if (LocateFatherHelper(a, 1, &ptr)) {
-#line 1664
- CError_ASSERT(ptr && *ptr);
+ CError_ASSERT(1664, ptr && *ptr);
*ptr = b;
b->flags |= IROLF_Reffed;
} else {