mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 15:48:51 +00:00
Remove unnecessary Wait_Signal checks
This commit is contained in:
@@ -1445,8 +1445,6 @@ gb_internal bool check_type_specialization_to(CheckerContext *ctx, Type *special
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
wait_for_record_polymorphic_params(s);
|
|
||||||
wait_for_record_polymorphic_params(t);
|
|
||||||
if (t->Struct.polymorphic_parent == s->Struct.polymorphic_parent &&
|
if (t->Struct.polymorphic_parent == s->Struct.polymorphic_parent &&
|
||||||
s->Struct.polymorphic_params != nullptr &&
|
s->Struct.polymorphic_params != nullptr &&
|
||||||
t->Struct.polymorphic_params != nullptr) {
|
t->Struct.polymorphic_params != nullptr) {
|
||||||
@@ -1500,8 +1498,6 @@ gb_internal bool check_type_specialization_to(CheckerContext *ctx, Type *special
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
wait_for_record_polymorphic_params(s);
|
|
||||||
wait_for_record_polymorphic_params(t);
|
|
||||||
if (t->Union.polymorphic_parent == s->Union.polymorphic_parent &&
|
if (t->Union.polymorphic_parent == s->Union.polymorphic_parent &&
|
||||||
s->Union.polymorphic_params != nullptr &&
|
s->Union.polymorphic_params != nullptr &&
|
||||||
t->Union.polymorphic_params != nullptr) {
|
t->Union.polymorphic_params != nullptr) {
|
||||||
|
|||||||
@@ -2031,7 +2031,6 @@ gb_internal void add_type_info_type_internal(CheckerContext *c, Type *t) {
|
|||||||
} else {
|
} else {
|
||||||
add_type_info_type_internal(c, t_type_info_ptr);
|
add_type_info_type_internal(c, t_type_info_ptr);
|
||||||
}
|
}
|
||||||
wait_for_record_polymorphic_params(bt);
|
|
||||||
add_type_info_type_internal(c, bt->Union.polymorphic_params);
|
add_type_info_type_internal(c, bt->Union.polymorphic_params);
|
||||||
for_array(i, bt->Union.variants) {
|
for_array(i, bt->Union.variants) {
|
||||||
add_type_info_type_internal(c, bt->Union.variants[i]);
|
add_type_info_type_internal(c, bt->Union.variants[i]);
|
||||||
@@ -2064,7 +2063,6 @@ gb_internal void add_type_info_type_internal(CheckerContext *c, Type *t) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
wait_for_record_polymorphic_params(bt);
|
|
||||||
add_type_info_type_internal(c, bt->Struct.polymorphic_params);
|
add_type_info_type_internal(c, bt->Struct.polymorphic_params);
|
||||||
for_array(i, bt->Struct.fields) {
|
for_array(i, bt->Struct.fields) {
|
||||||
Entity *f = bt->Struct.fields[i];
|
Entity *f = bt->Struct.fields[i];
|
||||||
@@ -2294,7 +2292,6 @@ gb_internal void add_min_dep_type_info(Checker *c, Type *t) {
|
|||||||
} else {
|
} else {
|
||||||
add_min_dep_type_info(c, t_type_info_ptr);
|
add_min_dep_type_info(c, t_type_info_ptr);
|
||||||
}
|
}
|
||||||
wait_for_record_polymorphic_params(bt);
|
|
||||||
add_min_dep_type_info(c, bt->Union.polymorphic_params);
|
add_min_dep_type_info(c, bt->Union.polymorphic_params);
|
||||||
for_array(i, bt->Union.variants) {
|
for_array(i, bt->Union.variants) {
|
||||||
add_min_dep_type_info(c, bt->Union.variants[i]);
|
add_min_dep_type_info(c, bt->Union.variants[i]);
|
||||||
@@ -2324,7 +2321,6 @@ gb_internal void add_min_dep_type_info(Checker *c, Type *t) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
wait_for_record_polymorphic_params(bt);
|
|
||||||
add_min_dep_type_info(c, bt->Struct.polymorphic_params);
|
add_min_dep_type_info(c, bt->Struct.polymorphic_params);
|
||||||
for_array(i, bt->Struct.fields) {
|
for_array(i, bt->Struct.fields) {
|
||||||
Entity *f = bt->Struct.fields[i];
|
Entity *f = bt->Struct.fields[i];
|
||||||
|
|||||||
@@ -2139,18 +2139,6 @@ gb_internal bool is_type_polymorphic_record_unspecialized(Type *t) {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
gb_internal void wait_for_record_polymorphic_params(Type *t) {
|
|
||||||
t = base_type(t);
|
|
||||||
switch (t->kind) {
|
|
||||||
case Type_Struct:
|
|
||||||
wait_signal_until_available(&t->Struct.polymorphic_wait_signal);
|
|
||||||
break;
|
|
||||||
case Type_Union:
|
|
||||||
wait_signal_until_available(&t->Union.polymorphic_wait_signal);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
gb_internal TypeTuple *get_record_polymorphic_params(Type *t) {
|
gb_internal TypeTuple *get_record_polymorphic_params(Type *t) {
|
||||||
t = base_type(t);
|
t = base_type(t);
|
||||||
|
|||||||
Reference in New Issue
Block a user