X-Git-Url: http://nitlanguage.org diff --git a/c_src/poset.sep.1.c b/c_src/poset.sep.1.c index a4ae105..27deac3 100644 --- a/c_src/poset.sep.1.c +++ b/c_src/poset.sep.1.c @@ -1,1310 +1,1469 @@ #include "poset.sep.0.h" -/* method poset#POSet#iterator for (self: POSet[Object]): Iterator[Object] */ -val* poset__POSet__iterator(val* self) { -val* var /* : Iterator[Object] */; -val* var1 /* : HashMap[Object, POSetElement[Object]] */; -val* var2 /* : Collection[Object] */; -val* var3 /* : Iterator[nullable Object] */; -var1 = ((val* (*)(val*))(self->class->vft[COLOR_poset__POSet__elements]))(self) /* elements on */; -var2 = ((val* (*)(val*))(var1->class->vft[COLOR_abstract_collection__MapRead__keys]))(var1) /* keys on */; -var3 = ((val* (*)(val*))(var2->class->vft[COLOR_abstract_collection__Collection__iterator]))(var2) /* iterator on */; -var = var3; -goto RET_LABEL; -RET_LABEL:; -return var; -} -/* method poset#POSet#iterator for (self: Object): Iterator[nullable Object] */ -val* VIRTUAL_poset__POSet__iterator(val* self) { +/* method poset#POSet#iterator for (self: POSet[nullable Object]): Iterator[nullable Object] */ +val* poset___poset__POSet___standard__abstract_collection__Collection__iterator(val* self) { val* var /* : Iterator[nullable Object] */; -val* var1 /* : Iterator[Object] */; -var1 = poset__POSet__iterator(self); -var = var1; -RET_LABEL:; -return var; +val* var1 /* : HashMap[nullable Object, POSetElement[nullable Object]] */; +val* var3 /* : HashMap[nullable Object, POSetElement[nullable Object]] */; +val* var4 /* : RemovableCollection[nullable Object] */; +val* var5 /* : Iterator[nullable Object] */; +{ +{ /* Inline poset#POSet#elements (self) on */ +var3 = self->attrs[COLOR_poset__POSet___elements].val; /* _elements on */ +if (unlikely(var3 == NULL)) { +PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _elements"); +PRINT_ERROR(" (%s:%d)\n", FILE_poset, 82); +fatal_exit(1); } -/* method poset#POSet#elements for (self: POSet[Object]): HashMap[Object, POSetElement[Object]] */ -val* poset__POSet__elements(val* self) { -val* var /* : HashMap[Object, POSetElement[Object]] */; -val* var1 /* : HashMap[Object, POSetElement[Object]] */; -var1 = self->attrs[COLOR_poset__POSet___64delements].val; /* @elements on */ -if (var1 == NULL) { -fprintf(stderr, "Runtime error: %s", "Uninitialized attribute @elements"); -fprintf(stderr, " (%s:%d)\n", "lib/poset.nit", 31); -exit(1); +var1 = var3; +RET_LABEL2:(void)0; } -var = var1; +} +{ +var4 = standard___standard__HashMap___standard__abstract_collection__MapRead__keys(var1); +} +{ +var5 = ((val*(*)(val* self))((((long)var4&3)?class_info[((long)var4&3)]:var4->class)->vft[COLOR_standard__abstract_collection__Collection__iterator]))(var4); /* iterator on */ +} +var = var5; +goto RET_LABEL; RET_LABEL:; return var; } -/* method poset#POSet#elements for (self: Object): HashMap[Object, POSetElement[Object]] */ -val* VIRTUAL_poset__POSet__elements(val* self) { -val* var /* : HashMap[Object, POSetElement[Object]] */; -val* var1 /* : HashMap[Object, POSetElement[Object]] */; -var1 = poset__POSet__elements(self); +/* method poset#POSet#elements for (self: POSet[nullable Object]): HashMap[nullable Object, POSetElement[nullable Object]] */ +val* poset___poset__POSet___elements(val* self) { +val* var /* : HashMap[nullable Object, POSetElement[nullable Object]] */; +val* var1 /* : HashMap[nullable Object, POSetElement[nullable Object]] */; +var1 = self->attrs[COLOR_poset__POSet___elements].val; /* _elements on */ +if (unlikely(var1 == NULL)) { +PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _elements"); +PRINT_ERROR(" (%s:%d)\n", FILE_poset, 82); +fatal_exit(1); +} var = var1; RET_LABEL:; return var; } -/* method poset#POSet#elements= for (self: POSet[Object], HashMap[Object, POSetElement[Object]]) */ -void poset__POSet__elements_61d(val* self, val* p0) { +/* method poset#POSet#has for (self: POSet[nullable Object], nullable Object): Bool */ +short int poset___poset__POSet___standard__abstract_collection__Collection__has(val* self, val* p0) { short int var /* : Bool */; -int cltype; -int idtype; -const struct type* type_struct; -const char* var_class_name; -/* Covariant cast for argument 0 (elements) isa HashMap[POSet#0, POSetElement[POSet#0]] */ -/* isa HashMap[POSet#0, POSetElement[POSet#0]] */ -type_struct = self->type->resolution_table->types[COLOR_hash_collection__HashMapposet__POSet_FT0poset__POSetElementposet__POSet_FT0]; -cltype = type_struct->color; -idtype = type_struct->id; -if(cltype >= p0->type->table_size) { -var = 0; -} else { -var = p0->type->type_table[cltype] == idtype; -} -if (!var) { -var_class_name = p0 == NULL ? "null" : p0->type->name; -fprintf(stderr, "Runtime error: Cast failed. Expected `%s`, got `%s`", "HashMap[POSet#0, POSetElement[POSet#0]]", var_class_name); -fprintf(stderr, " (%s:%d)\n", "lib/poset.nit", 31); -exit(1); +val* var_e /* var e: nullable Object */; +val* var1 /* : HashMap[nullable Object, POSetElement[nullable Object]] */; +val* var3 /* : HashMap[nullable Object, POSetElement[nullable Object]] */; +val* var4 /* : RemovableCollection[nullable Object] */; +short int var5 /* : Bool */; +var_e = p0; +{ +{ /* Inline poset#POSet#elements (self) on */ +var3 = self->attrs[COLOR_poset__POSet___elements].val; /* _elements on */ +if (unlikely(var3 == NULL)) { +PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _elements"); +PRINT_ERROR(" (%s:%d)\n", FILE_poset, 82); +fatal_exit(1); } -self->attrs[COLOR_poset__POSet___64delements].val = p0; /* @elements on */ -RET_LABEL:; +var1 = var3; +RET_LABEL2:(void)0; } -/* method poset#POSet#elements= for (self: Object, HashMap[Object, POSetElement[Object]]) */ -void VIRTUAL_poset__POSet__elements_61d(val* self, val* p0) { -poset__POSet__elements_61d(self, p0); -RET_LABEL:; } -/* method poset#POSet#has for (self: POSet[Object], Object): Bool */ -short int poset__POSet__has(val* self, val* p0) { -short int var /* : Bool */; -short int var1 /* : Bool */; -int cltype; -int idtype; -const struct type* type_struct; -const char* var_class_name; -val* var_e /* var e: Object */; -val* var2 /* : HashMap[Object, POSetElement[Object]] */; -val* var3 /* : Collection[Object] */; -short int var4 /* : Bool */; -/* Covariant cast for argument 0 (e) isa Collection#0 */ -/* isa Collection#0 */ -type_struct = self->type->resolution_table->types[COLOR_abstract_collection__Collection_FT0]; -cltype = type_struct->color; -idtype = type_struct->id; -if(cltype >= p0->type->table_size) { -var1 = 0; -} else { -var1 = p0->type->type_table[cltype] == idtype; +{ +var4 = standard___standard__HashMap___standard__abstract_collection__MapRead__keys(var1); } -if (!var1) { -var_class_name = p0 == NULL ? "null" : p0->type->name; -fprintf(stderr, "Runtime error: Cast failed. Expected `%s`, got `%s`", "Collection#0", var_class_name); -fprintf(stderr, " (%s:%d)\n", "lib/poset.nit", 34); -exit(1); +{ +var5 = ((short int(*)(val* self, val* p0))((((long)var4&3)?class_info[((long)var4&3)]:var4->class)->vft[COLOR_standard__abstract_collection__Collection__has]))(var4, var_e); /* has on */ } -var_e = p0; -var2 = ((val* (*)(val*))(self->class->vft[COLOR_poset__POSet__elements]))(self) /* elements on */; -var3 = ((val* (*)(val*))(var2->class->vft[COLOR_abstract_collection__MapRead__keys]))(var2) /* keys on */; -var4 = ((short int (*)(val*, val*))(var3->class->vft[COLOR_abstract_collection__Collection__has]))(var3, var_e) /* has on */; -var = var4; +var = var5; goto RET_LABEL; RET_LABEL:; return var; } -/* method poset#POSet#has for (self: Object, nullable Object): Bool */ -short int VIRTUAL_poset__POSet__has(val* self, val* p0) { -short int var /* : Bool */; -short int var1 /* : Bool */; -var1 = poset__POSet__has(self, p0); -var = var1; -RET_LABEL:; -return var; -} -/* method poset#POSet#add_node for (self: POSet[Object], Object): POSetElement[Object] */ -val* poset__POSet__add_node(val* self, val* p0) { -val* var /* : POSetElement[Object] */; +/* method poset#POSet#add_node for (self: POSet[nullable Object], nullable Object): POSetElement[nullable Object] */ +val* poset___poset__POSet___add_node(val* self, val* p0) { +val* var /* : POSetElement[nullable Object] */; short int var1 /* : Bool */; int cltype; int idtype; const struct type* type_struct; +short int is_nullable; const char* var_class_name; -val* var_e /* var e: Object */; -val* var2 /* : HashMap[Object, POSetElement[Object]] */; -val* var3 /* : Collection[Object] */; -short int var4 /* : Bool */; -val* var5 /* : HashMap[Object, POSetElement[Object]] */; -val* var6 /* : nullable Object */; -val* var7 /* : POSetElement[Object] */; -val* var8 /* : HashMap[Object, POSetElement[Object]] */; -long var9 /* : Int */; -val* var_poe /* var poe: POSetElement[Object] */; -val* var10 /* : HashSet[Object] */; -val* var11 /* : HashSet[Object] */; -val* var12 /* : HashMap[Object, POSetElement[Object]] */; -/* Covariant cast for argument 0 (e) isa POSet#0 */ -/* isa POSet#0 */ -type_struct = self->type->resolution_table->types[COLOR_poset__POSet_FT0]; +val* var_e /* var e: nullable Object */; +val* var2 /* : HashMap[nullable Object, POSetElement[nullable Object]] */; +val* var4 /* : HashMap[nullable Object, POSetElement[nullable Object]] */; +val* var5 /* : RemovableCollection[nullable Object] */; +short int var6 /* : Bool */; +val* var7 /* : HashMap[nullable Object, POSetElement[nullable Object]] */; +val* var9 /* : HashMap[nullable Object, POSetElement[nullable Object]] */; +val* var10 /* : nullable Object */; +val* var11 /* : POSetElement[nullable Object] */; +val* var12 /* : HashMap[nullable Object, POSetElement[nullable Object]] */; +val* var14 /* : HashMap[nullable Object, POSetElement[nullable Object]] */; +long var15 /* : Int */; +val* var_poe /* var poe: POSetElement[nullable Object] */; +val* var16 /* : HashSet[nullable Object] */; +val* var18 /* : HashSet[nullable Object] */; +val* var19 /* : HashSet[nullable Object] */; +val* var21 /* : HashSet[nullable Object] */; +val* var22 /* : HashMap[nullable Object, POSetElement[nullable Object]] */; +val* var24 /* : HashMap[nullable Object, POSetElement[nullable Object]] */; +/* Covariant cast for argument 0 (e) isa E */ +/* isa E */ +type_struct = self->type->resolution_table->types[COLOR_poset__POSet___35dE]; cltype = type_struct->color; idtype = type_struct->id; -if(cltype >= p0->type->table_size) { +is_nullable = type_struct->is_nullable; +if(p0 == NULL) { +var1 = is_nullable; +} else { +if(cltype >= (((long)p0&3)?type_info[((long)p0&3)]:p0->type)->table_size) { var1 = 0; } else { -var1 = p0->type->type_table[cltype] == idtype; +var1 = (((long)p0&3)?type_info[((long)p0&3)]:p0->type)->type_table[cltype] == idtype; } -if (!var1) { -var_class_name = p0 == NULL ? "null" : p0->type->name; -fprintf(stderr, "Runtime error: Cast failed. Expected `%s`, got `%s`", "POSet#0", var_class_name); -fprintf(stderr, " (%s:%d)\n", "lib/poset.nit", 36); -exit(1); +} +if (unlikely(!var1)) { +var_class_name = p0 == NULL ? "null" : (((long)p0&3)?type_info[((long)p0&3)]:p0->type)->name; +PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "E", var_class_name); +PRINT_ERROR(" (%s:%d)\n", FILE_poset, 87); +fatal_exit(1); } var_e = p0; -var2 = ((val* (*)(val*))(self->class->vft[COLOR_poset__POSet__elements]))(self) /* elements on */; -var3 = ((val* (*)(val*))(var2->class->vft[COLOR_abstract_collection__MapRead__keys]))(var2) /* keys on */; -var4 = ((short int (*)(val*, val*))(var3->class->vft[COLOR_abstract_collection__Collection__has]))(var3, var_e) /* has on */; -if (var4){ -var5 = ((val* (*)(val*))(self->class->vft[COLOR_poset__POSet__elements]))(self) /* elements on */; -var6 = ((val* (*)(val*, val*))(var5->class->vft[COLOR_abstract_collection__MapRead___91d_93d]))(var5, var_e) /* [] on */; -var = var6; +{ +{ /* Inline poset#POSet#elements (self) on */ +var4 = self->attrs[COLOR_poset__POSet___elements].val; /* _elements on */ +if (unlikely(var4 == NULL)) { +PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _elements"); +PRINT_ERROR(" (%s:%d)\n", FILE_poset, 82); +fatal_exit(1); +} +var2 = var4; +RET_LABEL3:(void)0; +} +} +{ +var5 = standard___standard__HashMap___standard__abstract_collection__MapRead__keys(var2); +} +{ +var6 = ((short int(*)(val* self, val* p0))((((long)var5&3)?class_info[((long)var5&3)]:var5->class)->vft[COLOR_standard__abstract_collection__Collection__has]))(var5, var_e); /* has on */ +} +if (var6){ +{ +{ /* Inline poset#POSet#elements (self) on */ +var9 = self->attrs[COLOR_poset__POSet___elements].val; /* _elements on */ +if (unlikely(var9 == NULL)) { +PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _elements"); +PRINT_ERROR(" (%s:%d)\n", FILE_poset, 82); +fatal_exit(1); +} +var7 = var9; +RET_LABEL8:(void)0; +} +} +{ +var10 = standard___standard__HashMap___standard__abstract_collection__MapRead___91d_93d(var7, var_e); +} +var = var10; goto RET_LABEL; } else { } -var7 = NEW_poset__POSetElement(self->type->resolution_table->types[COLOR_poset__POSetElementposet__POSet_FT0]); -var8 = ((val* (*)(val*))(self->class->vft[COLOR_poset__POSet__elements]))(self) /* elements on */; -var9 = ((long (*)(val*))(var8->class->vft[COLOR_abstract_collection__MapRead__length]))(var8) /* length on */; -((void (*)(val*, val*, val*, long))(var7->class->vft[COLOR_poset__POSetElement__init]))(var7, self, var_e, var9) /* init on */; -CHECK_NEW_poset__POSetElement(var7); -var_poe = var7; -var10 = ((val* (*)(val*))(var_poe->class->vft[COLOR_poset__POSetElement__tos]))(var_poe) /* tos on */; -((void (*)(val*, val*))(var10->class->vft[COLOR_abstract_collection__SimpleCollection__add]))(var10, var_e) /* add on */; -var11 = ((val* (*)(val*))(var_poe->class->vft[COLOR_poset__POSetElement__froms]))(var_poe) /* froms on */; -((void (*)(val*, val*))(var11->class->vft[COLOR_abstract_collection__SimpleCollection__add]))(var11, var_e) /* add on */; -var12 = ((val* (*)(val*))(self->class->vft[COLOR_poset__POSet__elements]))(self) /* elements on */; -((void (*)(val*, val*, val*))(var12->class->vft[COLOR_abstract_collection__Map___91d_93d_61d]))(var12, var_e, var_poe) /* []= on */; +var11 = NEW_poset__POSetElement(self->type->resolution_table->types[COLOR_poset__POSetElement__poset__POSet___35dE]); +{ +{ /* Inline poset#POSet#elements (self) on */ +var14 = self->attrs[COLOR_poset__POSet___elements].val; /* _elements on */ +if (unlikely(var14 == NULL)) { +PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _elements"); +PRINT_ERROR(" (%s:%d)\n", FILE_poset, 82); +fatal_exit(1); +} +var12 = var14; +RET_LABEL13:(void)0; +} +} +{ +var15 = standard___standard__HashMap___standard__abstract_collection__MapRead__length(var12); +} +{ +((void(*)(val* self, val* p0))(var11->class->vft[COLOR_poset__POSetElement__poset_61d]))(var11, self); /* poset= on */ +} +{ +((void(*)(val* self, val* p0))(var11->class->vft[COLOR_poset__POSetElement__element_61d]))(var11, var_e); /* element= on */ +} +{ +((void(*)(val* self, long p0))(var11->class->vft[COLOR_poset__POSetElement__count_61d]))(var11, var15); /* count= on */ +} +{ +((void(*)(val* self))(var11->class->vft[COLOR_standard__kernel__Object__init]))(var11); /* init on */ +} +var_poe = var11; +{ +{ /* Inline poset#POSetElement#tos (var_poe) on */ +var18 = var_poe->attrs[COLOR_poset__POSetElement___tos].val; /* _tos on */ +if (unlikely(var18 == NULL)) { +PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _tos"); +PRINT_ERROR(" (%s:%d)\n", FILE_poset, 406); +fatal_exit(1); +} +var16 = var18; +RET_LABEL17:(void)0; +} +} +{ +standard___standard__HashSet___standard__abstract_collection__SimpleCollection__add(var16, var_e); /* Direct call hash_collection#HashSet#add on */ +} +{ +{ /* Inline poset#POSetElement#froms (var_poe) on */ +var21 = var_poe->attrs[COLOR_poset__POSetElement___froms].val; /* _froms on */ +if (unlikely(var21 == NULL)) { +PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _froms"); +PRINT_ERROR(" (%s:%d)\n", FILE_poset, 407); +fatal_exit(1); +} +var19 = var21; +RET_LABEL20:(void)0; +} +} +{ +standard___standard__HashSet___standard__abstract_collection__SimpleCollection__add(var19, var_e); /* Direct call hash_collection#HashSet#add on */ +} +{ +{ /* Inline poset#POSet#elements (self) on */ +var24 = self->attrs[COLOR_poset__POSet___elements].val; /* _elements on */ +if (unlikely(var24 == NULL)) { +PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _elements"); +PRINT_ERROR(" (%s:%d)\n", FILE_poset, 82); +fatal_exit(1); +} +var22 = var24; +RET_LABEL23:(void)0; +} +} +{ +standard___standard__HashMap___standard__abstract_collection__Map___91d_93d_61d(var22, var_e, var_poe); /* Direct call hash_collection#HashMap#[]= on */ +} var = var_poe; goto RET_LABEL; RET_LABEL:; return var; } -/* method poset#POSet#add_node for (self: Object, Object): POSetElement[Object] */ -val* VIRTUAL_poset__POSet__add_node(val* self, val* p0) { -val* var /* : POSetElement[Object] */; -val* var1 /* : POSetElement[Object] */; -var1 = poset__POSet__add_node(self, p0); -var = var1; -RET_LABEL:; -return var; -} -/* method poset#POSet#[] for (self: POSet[Object], Object): POSetElement[Object] */ -val* poset__POSet___91d_93d(val* self, val* p0) { -val* var /* : POSetElement[Object] */; +/* method poset#POSet#[] for (self: POSet[nullable Object], nullable Object): POSetElement[nullable Object] */ +val* poset___poset__POSet____91d_93d(val* self, val* p0) { +val* var /* : POSetElement[nullable Object] */; short int var1 /* : Bool */; int cltype; int idtype; const struct type* type_struct; +short int is_nullable; const char* var_class_name; -val* var_e /* var e: Object */; -val* var2 /* : HashMap[Object, POSetElement[Object]] */; -val* var3 /* : Collection[Object] */; -short int var4 /* : Bool */; -val* var5 /* : HashMap[Object, POSetElement[Object]] */; -val* var6 /* : nullable Object */; -/* Covariant cast for argument 0 (e) isa POSet#0 */ -/* isa POSet#0 */ -type_struct = self->type->resolution_table->types[COLOR_poset__POSet_FT0]; +val* var_e /* var e: nullable Object */; +val* var2 /* : HashMap[nullable Object, POSetElement[nullable Object]] */; +val* var4 /* : HashMap[nullable Object, POSetElement[nullable Object]] */; +val* var5 /* : RemovableCollection[nullable Object] */; +short int var6 /* : Bool */; +val* var7 /* : HashMap[nullable Object, POSetElement[nullable Object]] */; +val* var9 /* : HashMap[nullable Object, POSetElement[nullable Object]] */; +val* var10 /* : nullable Object */; +/* Covariant cast for argument 0 (e) isa E */ +/* isa E */ +type_struct = self->type->resolution_table->types[COLOR_poset__POSet___35dE]; cltype = type_struct->color; idtype = type_struct->id; -if(cltype >= p0->type->table_size) { +is_nullable = type_struct->is_nullable; +if(p0 == NULL) { +var1 = is_nullable; +} else { +if(cltype >= (((long)p0&3)?type_info[((long)p0&3)]:p0->type)->table_size) { var1 = 0; } else { -var1 = p0->type->type_table[cltype] == idtype; +var1 = (((long)p0&3)?type_info[((long)p0&3)]:p0->type)->type_table[cltype] == idtype; } -if (!var1) { -var_class_name = p0 == NULL ? "null" : p0->type->name; -fprintf(stderr, "Runtime error: Cast failed. Expected `%s`, got `%s`", "POSet#0", var_class_name); -fprintf(stderr, " (%s:%d)\n", "lib/poset.nit", 50); -exit(1); +} +if (unlikely(!var1)) { +var_class_name = p0 == NULL ? "null" : (((long)p0&3)?type_info[((long)p0&3)]:p0->type)->name; +PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "E", var_class_name); +PRINT_ERROR(" (%s:%d)\n", FILE_poset, 101); +fatal_exit(1); } var_e = p0; -var2 = ((val* (*)(val*))(self->class->vft[COLOR_poset__POSet__elements]))(self) /* elements on */; -var3 = ((val* (*)(val*))(var2->class->vft[COLOR_abstract_collection__MapRead__keys]))(var2) /* keys on */; -var4 = ((short int (*)(val*, val*))(var3->class->vft[COLOR_abstract_collection__Collection__has]))(var3, var_e) /* has on */; -if (!var4) { -fprintf(stderr, "Runtime error: %s", "Assert failed"); -fprintf(stderr, " (%s:%d)\n", "lib/poset.nit", 63); -exit(1); -} -var5 = ((val* (*)(val*))(self->class->vft[COLOR_poset__POSet__elements]))(self) /* elements on */; -var6 = ((val* (*)(val*, val*))(var5->class->vft[COLOR_abstract_collection__MapRead___91d_93d]))(var5, var_e) /* [] on */; -var = var6; -goto RET_LABEL; -RET_LABEL:; -return var; +{ +{ /* Inline poset#POSet#elements (self) on */ +var4 = self->attrs[COLOR_poset__POSet___elements].val; /* _elements on */ +if (unlikely(var4 == NULL)) { +PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _elements"); +PRINT_ERROR(" (%s:%d)\n", FILE_poset, 82); +fatal_exit(1); } -/* method poset#POSet#[] for (self: Object, Object): POSetElement[Object] */ -val* VIRTUAL_poset__POSet___91d_93d(val* self, val* p0) { -val* var /* : POSetElement[Object] */; -val* var1 /* : POSetElement[Object] */; -var1 = poset__POSet___91d_93d(self, p0); -var = var1; +var2 = var4; +RET_LABEL3:(void)0; +} +} +{ +var5 = standard___standard__HashMap___standard__abstract_collection__MapRead__keys(var2); +} +{ +var6 = ((short int(*)(val* self, val* p0))((((long)var5&3)?class_info[((long)var5&3)]:var5->class)->vft[COLOR_standard__abstract_collection__Collection__has]))(var5, var_e); /* has on */ +} +if (unlikely(!var6)) { +PRINT_ERROR("Runtime error: %s", "Assert failed"); +PRINT_ERROR(" (%s:%d)\n", FILE_poset, 115); +fatal_exit(1); +} +{ +{ /* Inline poset#POSet#elements (self) on */ +var9 = self->attrs[COLOR_poset__POSet___elements].val; /* _elements on */ +if (unlikely(var9 == NULL)) { +PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _elements"); +PRINT_ERROR(" (%s:%d)\n", FILE_poset, 82); +fatal_exit(1); +} +var7 = var9; +RET_LABEL8:(void)0; +} +} +{ +var10 = standard___standard__HashMap___standard__abstract_collection__MapRead___91d_93d(var7, var_e); +} +var = var10; +goto RET_LABEL; RET_LABEL:; return var; } -/* method poset#POSet#add_edge for (self: POSet[Object], Object, Object) */ -void poset__POSet__add_edge(val* self, val* p0, val* p1) { +/* method poset#POSet#add_edge for (self: POSet[nullable Object], nullable Object, nullable Object) */ +void poset___poset__POSet___add_edge(val* self, val* p0, val* p1) { short int var /* : Bool */; int cltype; int idtype; const struct type* type_struct; +short int is_nullable; const char* var_class_name; short int var1 /* : Bool */; int cltype2; int idtype3; const struct type* type_struct4; -const char* var_class_name5; -val* var_f /* var f: Object */; -val* var_t /* var t: Object */; -val* var6 /* : POSetElement[Object] */; -val* var_fe /* var fe: POSetElement[Object] */; -val* var7 /* : POSetElement[Object] */; -val* var_te /* var te: POSetElement[Object] */; -val* var8 /* : HashSet[Object] */; -short int var9 /* : Bool */; -val* var10 /* : HashSet[Object] */; -val* var11 /* : Iterator[nullable Object] */; +short int is_nullable5; +const char* var_class_name6; +val* var_f /* var f: nullable Object */; +val* var_t /* var t: nullable Object */; +val* var7 /* : POSetElement[nullable Object] */; +val* var_fe /* var fe: POSetElement[nullable Object] */; +val* var8 /* : POSetElement[nullable Object] */; +val* var_te /* var te: POSetElement[nullable Object] */; +val* var9 /* : HashSet[nullable Object] */; +val* var11 /* : HashSet[nullable Object] */; short int var12 /* : Bool */; -val* var13 /* : nullable Object */; -val* var_ff /* var ff: Object */; -val* var14 /* : HashMap[Object, POSetElement[Object]] */; -val* var15 /* : nullable Object */; -val* var_ffe /* var ffe: POSetElement[Object] */; -val* var16 /* : HashSet[Object] */; -val* var17 /* : Iterator[nullable Object] */; +val* var13 /* : HashSet[nullable Object] */; +val* var15 /* : HashSet[nullable Object] */; +val* var_ /* var : HashSet[nullable Object] */; +val* var16 /* : Iterator[nullable Object] */; +val* var_17 /* var : Iterator[nullable Object] */; short int var18 /* : Bool */; val* var19 /* : nullable Object */; -val* var_tt /* var tt: Object */; -val* var20 /* : HashMap[Object, POSetElement[Object]] */; -val* var21 /* : nullable Object */; -val* var_tte /* var tte: POSetElement[Object] */; -val* var22 /* : HashSet[Object] */; -val* var23 /* : HashSet[Object] */; -val* var25 /* : HashSet[Object] */; -short int var26 /* : Bool */; -val* var27 /* : HashSet[Object] */; -val* var28 /* : Array[nullable Object] */; -val* var29 /* : Iterator[nullable Object] */; +val* var_ff /* var ff: nullable Object */; +val* var20 /* : HashMap[nullable Object, POSetElement[nullable Object]] */; +val* var22 /* : HashMap[nullable Object, POSetElement[nullable Object]] */; +val* var23 /* : nullable Object */; +val* var_ffe /* var ffe: POSetElement[nullable Object] */; +val* var24 /* : HashSet[nullable Object] */; +val* var26 /* : HashSet[nullable Object] */; +val* var_27 /* var : HashSet[nullable Object] */; +val* var28 /* : Iterator[nullable Object] */; +val* var_29 /* var : Iterator[nullable Object] */; short int var30 /* : Bool */; val* var31 /* : nullable Object */; -val* var_x /* var x: Object */; -val* var32 /* : HashMap[Object, POSetElement[Object]] */; -val* var33 /* : nullable Object */; -val* var_xe /* var xe: POSetElement[Object] */; -val* var34 /* : HashSet[Object] */; -short int var35 /* : Bool */; -val* var36 /* : HashSet[Object] */; -val* var37 /* : HashSet[Object] */; -val* var39 /* : HashSet[Object] */; -val* var40 /* : Array[nullable Object] */; -val* var41 /* : Iterator[nullable Object] */; -short int var42 /* : Bool */; -val* var43 /* : nullable Object */; -val* var_x44 /* var x: Object */; -val* var45 /* : HashMap[Object, POSetElement[Object]] */; -val* var46 /* : nullable Object */; -val* var_xe47 /* var xe: POSetElement[Object] */; -val* var48 /* : HashSet[Object] */; -short int var49 /* : Bool */; -val* var50 /* : HashSet[Object] */; -val* var51 /* : HashSet[Object] */; -val* var53 /* : HashSet[Object] */; -val* var54 /* : HashSet[Object] */; -/* Covariant cast for argument 0 (f) isa POSet#0 */ -/* isa POSet#0 */ -type_struct = self->type->resolution_table->types[COLOR_poset__POSet_FT0]; +val* var_tt /* var tt: nullable Object */; +val* var32 /* : HashMap[nullable Object, POSetElement[nullable Object]] */; +val* var34 /* : HashMap[nullable Object, POSetElement[nullable Object]] */; +val* var35 /* : nullable Object */; +val* var_tte /* var tte: POSetElement[nullable Object] */; +val* var36 /* : HashSet[nullable Object] */; +val* var38 /* : HashSet[nullable Object] */; +val* var39 /* : HashSet[nullable Object] */; +val* var41 /* : HashSet[nullable Object] */; +val* var43 /* : HashSet[nullable Object] */; +val* var45 /* : HashSet[nullable Object] */; +short int var46 /* : Bool */; +val* var_to_remove /* var to_remove: nullable Array[nullable Object] */; +val* var47 /* : HashSet[nullable Object] */; +val* var49 /* : HashSet[nullable Object] */; +val* var_50 /* var : HashSet[nullable Object] */; +val* var51 /* : Iterator[nullable Object] */; +val* var_52 /* var : Iterator[nullable Object] */; +short int var53 /* : Bool */; +val* var54 /* : nullable Object */; +val* var_x /* var x: nullable Object */; +val* var55 /* : HashMap[nullable Object, POSetElement[nullable Object]] */; +val* var57 /* : HashMap[nullable Object, POSetElement[nullable Object]] */; +val* var58 /* : nullable Object */; +val* var_xe /* var xe: POSetElement[nullable Object] */; +val* var59 /* : HashSet[nullable Object] */; +val* var61 /* : HashSet[nullable Object] */; +short int var62 /* : Bool */; +short int var63 /* : Bool */; +short int var64 /* : Bool */; +val* var65 /* : Array[nullable Object] */; +val* var66 /* : HashSet[nullable Object] */; +val* var68 /* : HashSet[nullable Object] */; +short int var70 /* : Bool */; +short int var71 /* : Bool */; +val* var_other /* var other: nullable Object */; +short int var73 /* : Bool */; +short int var74 /* : Bool */; +val* var_75 /* var : Array[nullable Object] */; +val* var76 /* : ArrayIterator[nullable Object] */; +val* var_77 /* var : ArrayIterator[nullable Object] */; +short int var78 /* : Bool */; +val* var79 /* : nullable Object */; +val* var_x80 /* var x: nullable Object */; +val* var81 /* : HashSet[nullable Object] */; +val* var83 /* : HashSet[nullable Object] */; +val* var85 /* : HashSet[nullable Object] */; +val* var87 /* : HashSet[nullable Object] */; +val* var_88 /* var : HashSet[nullable Object] */; +val* var89 /* : Iterator[nullable Object] */; +val* var_90 /* var : Iterator[nullable Object] */; +short int var91 /* : Bool */; +val* var92 /* : nullable Object */; +val* var_x93 /* var x: nullable Object */; +val* var94 /* : HashMap[nullable Object, POSetElement[nullable Object]] */; +val* var96 /* : HashMap[nullable Object, POSetElement[nullable Object]] */; +val* var97 /* : nullable Object */; +val* var_xe98 /* var xe: POSetElement[nullable Object] */; +val* var99 /* : HashSet[nullable Object] */; +val* var101 /* : HashSet[nullable Object] */; +short int var102 /* : Bool */; +val* var103 /* : HashSet[nullable Object] */; +val* var105 /* : HashSet[nullable Object] */; +short int var106 /* : Bool */; +short int var107 /* : Bool */; +val* var108 /* : Array[nullable Object] */; +short int var110 /* : Bool */; +short int var111 /* : Bool */; +short int var113 /* : Bool */; +short int var114 /* : Bool */; +val* var_115 /* var : Array[nullable Object] */; +val* var116 /* : ArrayIterator[nullable Object] */; +val* var_117 /* var : ArrayIterator[nullable Object] */; +short int var118 /* : Bool */; +val* var119 /* : nullable Object */; +val* var_x120 /* var x: nullable Object */; +val* var121 /* : HashSet[nullable Object] */; +val* var123 /* : HashSet[nullable Object] */; +val* var125 /* : HashSet[nullable Object] */; +val* var127 /* : HashSet[nullable Object] */; +val* var128 /* : HashSet[nullable Object] */; +val* var130 /* : HashSet[nullable Object] */; +/* Covariant cast for argument 0 (f) isa E */ +/* isa E */ +type_struct = self->type->resolution_table->types[COLOR_poset__POSet___35dE]; cltype = type_struct->color; idtype = type_struct->id; -if(cltype >= p0->type->table_size) { +is_nullable = type_struct->is_nullable; +if(p0 == NULL) { +var = is_nullable; +} else { +if(cltype >= (((long)p0&3)?type_info[((long)p0&3)]:p0->type)->table_size) { var = 0; } else { -var = p0->type->type_table[cltype] == idtype; +var = (((long)p0&3)?type_info[((long)p0&3)]:p0->type)->type_table[cltype] == idtype; } -if (!var) { -var_class_name = p0 == NULL ? "null" : p0->type->name; -fprintf(stderr, "Runtime error: Cast failed. Expected `%s`, got `%s`", "POSet#0", var_class_name); -fprintf(stderr, " (%s:%d)\n", "lib/poset.nit", 67); -exit(1); } -/* Covariant cast for argument 1 (t) isa POSet#0 */ -/* isa POSet#0 */ -type_struct4 = self->type->resolution_table->types[COLOR_poset__POSet_FT0]; +if (unlikely(!var)) { +var_class_name = p0 == NULL ? "null" : (((long)p0&3)?type_info[((long)p0&3)]:p0->type)->name; +PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "E", var_class_name); +PRINT_ERROR(" (%s:%d)\n", FILE_poset, 119); +fatal_exit(1); +} +/* Covariant cast for argument 1 (t) isa E */ +/* isa E */ +type_struct4 = self->type->resolution_table->types[COLOR_poset__POSet___35dE]; cltype2 = type_struct4->color; idtype3 = type_struct4->id; -if(cltype2 >= p1->type->table_size) { +is_nullable5 = type_struct4->is_nullable; +if(p1 == NULL) { +var1 = is_nullable5; +} else { +if(cltype2 >= (((long)p1&3)?type_info[((long)p1&3)]:p1->type)->table_size) { var1 = 0; } else { -var1 = p1->type->type_table[cltype2] == idtype3; +var1 = (((long)p1&3)?type_info[((long)p1&3)]:p1->type)->type_table[cltype2] == idtype3; } -if (!var1) { -var_class_name5 = p1 == NULL ? "null" : p1->type->name; -fprintf(stderr, "Runtime error: Cast failed. Expected `%s`, got `%s`", "POSet#0", var_class_name5); -fprintf(stderr, " (%s:%d)\n", "lib/poset.nit", 67); -exit(1); +} +if (unlikely(!var1)) { +var_class_name6 = p1 == NULL ? "null" : (((long)p1&3)?type_info[((long)p1&3)]:p1->type)->name; +PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "E", var_class_name6); +PRINT_ERROR(" (%s:%d)\n", FILE_poset, 119); +fatal_exit(1); } var_f = p0; var_t = p1; -var6 = ((val* (*)(val*, val*))(self->class->vft[COLOR_poset__POSet__add_node]))(self, var_f) /* add_node on */; -var_fe = var6; -var7 = ((val* (*)(val*, val*))(self->class->vft[COLOR_poset__POSet__add_node]))(self, var_t) /* add_node on */; -var_te = var7; -var8 = ((val* (*)(val*))(var_fe->class->vft[COLOR_poset__POSetElement__tos]))(var_fe) /* tos on */; -var9 = ((short int (*)(val*, val*))(var8->class->vft[COLOR_abstract_collection__Collection__has]))(var8, var_t) /* has on */; -if (var9){ +{ +var7 = poset___poset__POSet___add_node(self, var_f); +} +var_fe = var7; +{ +var8 = poset___poset__POSet___add_node(self, var_t); +} +var_te = var8; +{ +{ /* Inline poset#POSetElement#tos (var_fe) on */ +var11 = var_fe->attrs[COLOR_poset__POSetElement___tos].val; /* _tos on */ +if (unlikely(var11 == NULL)) { +PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _tos"); +PRINT_ERROR(" (%s:%d)\n", FILE_poset, 406); +fatal_exit(1); +} +var9 = var11; +RET_LABEL10:(void)0; +} +} +{ +var12 = standard___standard__HashSet___standard__abstract_collection__Collection__has(var9, var_t); +} +if (var12){ goto RET_LABEL; } else { } -var10 = ((val* (*)(val*))(var_fe->class->vft[COLOR_poset__POSetElement__froms]))(var_fe) /* froms on */; -var11 = ((val* (*)(val*))(var10->class->vft[COLOR_abstract_collection__Collection__iterator]))(var10) /* iterator on */; +{ +{ /* Inline poset#POSetElement#froms (var_fe) on */ +var15 = var_fe->attrs[COLOR_poset__POSetElement___froms].val; /* _froms on */ +if (unlikely(var15 == NULL)) { +PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _froms"); +PRINT_ERROR(" (%s:%d)\n", FILE_poset, 407); +fatal_exit(1); +} +var13 = var15; +RET_LABEL14:(void)0; +} +} +var_ = var13; +{ +var16 = standard___standard__HashSet___standard__abstract_collection__Collection__iterator(var_); +} +var_17 = var16; for(;;) { -var12 = ((short int (*)(val*))(var11->class->vft[COLOR_abstract_collection__Iterator__is_ok]))(var11) /* is_ok on */; -if(!var12) break; -var13 = ((val* (*)(val*))(var11->class->vft[COLOR_abstract_collection__Iterator__item]))(var11) /* item on */; -var_ff = var13; -var14 = ((val* (*)(val*))(self->class->vft[COLOR_poset__POSet__elements]))(self) /* elements on */; -var15 = ((val* (*)(val*, val*))(var14->class->vft[COLOR_abstract_collection__MapRead___91d_93d]))(var14, var_ff) /* [] on */; -var_ffe = var15; -var16 = ((val* (*)(val*))(var_te->class->vft[COLOR_poset__POSetElement__tos]))(var_te) /* tos on */; -var17 = ((val* (*)(val*))(var16->class->vft[COLOR_abstract_collection__Collection__iterator]))(var16) /* iterator on */; +{ +var18 = ((short int(*)(val* self))((((long)var_17&3)?class_info[((long)var_17&3)]:var_17->class)->vft[COLOR_standard__abstract_collection__Iterator__is_ok]))(var_17); /* is_ok on */ +} +if (var18){ +{ +var19 = ((val*(*)(val* self))((((long)var_17&3)?class_info[((long)var_17&3)]:var_17->class)->vft[COLOR_standard__abstract_collection__Iterator__item]))(var_17); /* item on */ +} +var_ff = var19; +{ +{ /* Inline poset#POSet#elements (self) on */ +var22 = self->attrs[COLOR_poset__POSet___elements].val; /* _elements on */ +if (unlikely(var22 == NULL)) { +PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _elements"); +PRINT_ERROR(" (%s:%d)\n", FILE_poset, 82); +fatal_exit(1); +} +var20 = var22; +RET_LABEL21:(void)0; +} +} +{ +var23 = standard___standard__HashMap___standard__abstract_collection__MapRead___91d_93d(var20, var_ff); +} +var_ffe = var23; +{ +{ /* Inline poset#POSetElement#tos (var_te) on */ +var26 = var_te->attrs[COLOR_poset__POSetElement___tos].val; /* _tos on */ +if (unlikely(var26 == NULL)) { +PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _tos"); +PRINT_ERROR(" (%s:%d)\n", FILE_poset, 406); +fatal_exit(1); +} +var24 = var26; +RET_LABEL25:(void)0; +} +} +var_27 = var24; +{ +var28 = standard___standard__HashSet___standard__abstract_collection__Collection__iterator(var_27); +} +var_29 = var28; for(;;) { -var18 = ((short int (*)(val*))(var17->class->vft[COLOR_abstract_collection__Iterator__is_ok]))(var17) /* is_ok on */; -if(!var18) break; -var19 = ((val* (*)(val*))(var17->class->vft[COLOR_abstract_collection__Iterator__item]))(var17) /* item on */; -var_tt = var19; -var20 = ((val* (*)(val*))(self->class->vft[COLOR_poset__POSet__elements]))(self) /* elements on */; -var21 = ((val* (*)(val*, val*))(var20->class->vft[COLOR_abstract_collection__MapRead___91d_93d]))(var20, var_tt) /* [] on */; -var_tte = var21; -var22 = ((val* (*)(val*))(var_tte->class->vft[COLOR_poset__POSetElement__froms]))(var_tte) /* froms on */; -((void (*)(val*, val*))(var22->class->vft[COLOR_abstract_collection__SimpleCollection__add]))(var22, var_ff) /* add on */; -var23 = ((val* (*)(val*))(var_ffe->class->vft[COLOR_poset__POSetElement__tos]))(var_ffe) /* tos on */; -((void (*)(val*, val*))(var23->class->vft[COLOR_abstract_collection__SimpleCollection__add]))(var23, var_tt) /* add on */; -CONTINUE_label: (void)0; -((void (*)(val*))(var17->class->vft[COLOR_abstract_collection__Iterator__next]))(var17) /* next on */; +{ +var30 = ((short int(*)(val* self))((((long)var_29&3)?class_info[((long)var_29&3)]:var_29->class)->vft[COLOR_standard__abstract_collection__Iterator__is_ok]))(var_29); /* is_ok on */ +} +if (var30){ +{ +var31 = ((val*(*)(val* self))((((long)var_29&3)?class_info[((long)var_29&3)]:var_29->class)->vft[COLOR_standard__abstract_collection__Iterator__item]))(var_29); /* item on */ +} +var_tt = var31; +{ +{ /* Inline poset#POSet#elements (self) on */ +var34 = self->attrs[COLOR_poset__POSet___elements].val; /* _elements on */ +if (unlikely(var34 == NULL)) { +PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _elements"); +PRINT_ERROR(" (%s:%d)\n", FILE_poset, 82); +fatal_exit(1); +} +var32 = var34; +RET_LABEL33:(void)0; +} +} +{ +var35 = standard___standard__HashMap___standard__abstract_collection__MapRead___91d_93d(var32, var_tt); +} +var_tte = var35; +{ +{ /* Inline poset#POSetElement#froms (var_tte) on */ +var38 = var_tte->attrs[COLOR_poset__POSetElement___froms].val; /* _froms on */ +if (unlikely(var38 == NULL)) { +PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _froms"); +PRINT_ERROR(" (%s:%d)\n", FILE_poset, 407); +fatal_exit(1); +} +var36 = var38; +RET_LABEL37:(void)0; +} +} +{ +standard___standard__HashSet___standard__abstract_collection__SimpleCollection__add(var36, var_ff); /* Direct call hash_collection#HashSet#add on */ +} +{ +{ /* Inline poset#POSetElement#tos (var_ffe) on */ +var41 = var_ffe->attrs[COLOR_poset__POSetElement___tos].val; /* _tos on */ +if (unlikely(var41 == NULL)) { +PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _tos"); +PRINT_ERROR(" (%s:%d)\n", FILE_poset, 406); +fatal_exit(1); +} +var39 = var41; +RET_LABEL40:(void)0; +} +} +{ +standard___standard__HashSet___standard__abstract_collection__SimpleCollection__add(var39, var_tt); /* Direct call hash_collection#HashSet#add on */ +} +{ +((void(*)(val* self))((((long)var_29&3)?class_info[((long)var_29&3)]:var_29->class)->vft[COLOR_standard__abstract_collection__Iterator__next]))(var_29); /* next on */ +} +} else { +goto BREAK_label; +} } BREAK_label: (void)0; -CONTINUE_label24: (void)0; -((void (*)(val*))(var11->class->vft[COLOR_abstract_collection__Iterator__next]))(var11) /* next on */; +{ +((void(*)(val* self))((((long)var_29&3)?class_info[((long)var_29&3)]:var_29->class)->vft[COLOR_standard__abstract_collection__Iterator__finish]))(var_29); /* finish on */ +} +{ +((void(*)(val* self))((((long)var_17&3)?class_info[((long)var_17&3)]:var_17->class)->vft[COLOR_standard__abstract_collection__Iterator__next]))(var_17); /* next on */ +} +} else { +goto BREAK_label42; +} +} +BREAK_label42: (void)0; +{ +((void(*)(val* self))((((long)var_17&3)?class_info[((long)var_17&3)]:var_17->class)->vft[COLOR_standard__abstract_collection__Iterator__finish]))(var_17); /* finish on */ +} +{ +{ /* Inline poset#POSetElement#tos (var_te) on */ +var45 = var_te->attrs[COLOR_poset__POSetElement___tos].val; /* _tos on */ +if (unlikely(var45 == NULL)) { +PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _tos"); +PRINT_ERROR(" (%s:%d)\n", FILE_poset, 406); +fatal_exit(1); +} +var43 = var45; +RET_LABEL44:(void)0; +} +} +{ +var46 = standard___standard__HashSet___standard__abstract_collection__Collection__has(var43, var_f); } -BREAK_label24: (void)0; -var25 = ((val* (*)(val*))(var_te->class->vft[COLOR_poset__POSetElement__tos]))(var_te) /* tos on */; -var26 = ((short int (*)(val*, val*))(var25->class->vft[COLOR_abstract_collection__Collection__has]))(var25, var_f) /* has on */; -if (var26){ +if (var46){ goto RET_LABEL; } else { } -var27 = ((val* (*)(val*))(var_te->class->vft[COLOR_poset__POSetElement__dfroms]))(var_te) /* dfroms on */; -var28 = ((val* (*)(val*))(var27->class->vft[COLOR_array__Collection__to_a]))(var27) /* to_a on */; -var29 = ((val* (*)(val*))(var28->class->vft[COLOR_abstract_collection__Collection__iterator]))(var28) /* iterator on */; +var_to_remove = ((val*)NULL); +{ +{ /* Inline poset#POSetElement#dfroms (var_te) on */ +var49 = var_te->attrs[COLOR_poset__POSetElement___dfroms].val; /* _dfroms on */ +if (unlikely(var49 == NULL)) { +PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _dfroms"); +PRINT_ERROR(" (%s:%d)\n", FILE_poset, 409); +fatal_exit(1); +} +var47 = var49; +RET_LABEL48:(void)0; +} +} +var_50 = var47; +{ +var51 = standard___standard__HashSet___standard__abstract_collection__Collection__iterator(var_50); +} +var_52 = var51; for(;;) { -var30 = ((short int (*)(val*))(var29->class->vft[COLOR_abstract_collection__Iterator__is_ok]))(var29) /* is_ok on */; -if(!var30) break; -var31 = ((val* (*)(val*))(var29->class->vft[COLOR_abstract_collection__Iterator__item]))(var29) /* item on */; -var_x = var31; -var32 = ((val* (*)(val*))(self->class->vft[COLOR_poset__POSet__elements]))(self) /* elements on */; -var33 = ((val* (*)(val*, val*))(var32->class->vft[COLOR_abstract_collection__MapRead___91d_93d]))(var32, var_x) /* [] on */; -var_xe = var33; -var34 = ((val* (*)(val*))(var_xe->class->vft[COLOR_poset__POSetElement__tos]))(var_xe) /* tos on */; -var35 = ((short int (*)(val*, val*))(var34->class->vft[COLOR_abstract_collection__Collection__has]))(var34, var_f) /* has on */; -if (var35){ -var36 = ((val* (*)(val*))(var_te->class->vft[COLOR_poset__POSetElement__dfroms]))(var_te) /* dfroms on */; -((void (*)(val*, val*))(var36->class->vft[COLOR_abstract_collection__RemovableCollection__remove]))(var36, var_x) /* remove on */; -var37 = ((val* (*)(val*))(var_xe->class->vft[COLOR_poset__POSetElement__dtos]))(var_xe) /* dtos on */; -((void (*)(val*, val*))(var37->class->vft[COLOR_abstract_collection__RemovableCollection__remove]))(var37, var_t) /* remove on */; +{ +var53 = ((short int(*)(val* self))((((long)var_52&3)?class_info[((long)var_52&3)]:var_52->class)->vft[COLOR_standard__abstract_collection__Iterator__is_ok]))(var_52); /* is_ok on */ +} +if (var53){ +{ +var54 = ((val*(*)(val* self))((((long)var_52&3)?class_info[((long)var_52&3)]:var_52->class)->vft[COLOR_standard__abstract_collection__Iterator__item]))(var_52); /* item on */ +} +var_x = var54; +{ +{ /* Inline poset#POSet#elements (self) on */ +var57 = self->attrs[COLOR_poset__POSet___elements].val; /* _elements on */ +if (unlikely(var57 == NULL)) { +PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _elements"); +PRINT_ERROR(" (%s:%d)\n", FILE_poset, 82); +fatal_exit(1); +} +var55 = var57; +RET_LABEL56:(void)0; +} +} +{ +var58 = standard___standard__HashMap___standard__abstract_collection__MapRead___91d_93d(var55, var_x); +} +var_xe = var58; +{ +{ /* Inline poset#POSetElement#tos (var_xe) on */ +var61 = var_xe->attrs[COLOR_poset__POSetElement___tos].val; /* _tos on */ +if (unlikely(var61 == NULL)) { +PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _tos"); +PRINT_ERROR(" (%s:%d)\n", FILE_poset, 406); +fatal_exit(1); +} +var59 = var61; +RET_LABEL60:(void)0; +} +} +{ +var62 = standard___standard__HashSet___standard__abstract_collection__Collection__has(var59, var_f); +} +if (var62){ +if (var_to_remove == NULL) { +var63 = 1; /* is null */ +} else { +var63 = 0; /* arg is null but recv is not */ +} +if (0) { +var64 = standard___standard__Array___standard__kernel__Object___61d_61d(var_to_remove, ((val*)NULL)); +var63 = var64; +} +if (var63){ +var65 = NEW_standard__Array(self->type->resolution_table->types[COLOR_standard__Array__poset__POSet___35dE]); +{ +standard___standard__Array___standard__kernel__Object__init(var65); /* Direct call array#Array#init on */ +} +var_to_remove = var65; } else { } -CONTINUE_label38: (void)0; -((void (*)(val*))(var29->class->vft[COLOR_abstract_collection__Iterator__next]))(var29) /* next on */; +{ +standard___standard__Array___standard__abstract_collection__SimpleCollection__add(var_to_remove, var_x); /* Direct call array#Array#add on */ } -BREAK_label38: (void)0; -var39 = ((val* (*)(val*))(var_fe->class->vft[COLOR_poset__POSetElement__dtos]))(var_fe) /* dtos on */; -var40 = ((val* (*)(val*))(var39->class->vft[COLOR_array__Collection__to_a]))(var39) /* to_a on */; -var41 = ((val* (*)(val*))(var40->class->vft[COLOR_abstract_collection__Collection__iterator]))(var40) /* iterator on */; +{ +{ /* Inline poset#POSetElement#dtos (var_xe) on */ +var68 = var_xe->attrs[COLOR_poset__POSetElement___dtos].val; /* _dtos on */ +if (unlikely(var68 == NULL)) { +PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _dtos"); +PRINT_ERROR(" (%s:%d)\n", FILE_poset, 408); +fatal_exit(1); +} +var66 = var68; +RET_LABEL67:(void)0; +} +} +{ +standard___standard__HashSet___standard__abstract_collection__RemovableCollection__remove(var66, var_t); /* Direct call hash_collection#HashSet#remove on */ +} +} else { +} +{ +((void(*)(val* self))((((long)var_52&3)?class_info[((long)var_52&3)]:var_52->class)->vft[COLOR_standard__abstract_collection__Iterator__next]))(var_52); /* next on */ +} +} else { +goto BREAK_label69; +} +} +BREAK_label69: (void)0; +{ +((void(*)(val* self))((((long)var_52&3)?class_info[((long)var_52&3)]:var_52->class)->vft[COLOR_standard__abstract_collection__Iterator__finish]))(var_52); /* finish on */ +} +if (var_to_remove == NULL) { +var70 = 0; /* is null */ +} else { +var70 = 1; /* arg is null and recv is not */ +} +if (0) { +{ /* Inline kernel#Object#!= (var_to_remove,((val*)NULL)) on */ +var_other = ((val*)NULL); +{ +var73 = ((short int(*)(val* self, val* p0))(var_to_remove->class->vft[COLOR_standard__kernel__Object___61d_61d]))(var_to_remove, var_other); /* == on */ +} +var74 = !var73; +var71 = var74; +goto RET_LABEL72; +RET_LABEL72:(void)0; +} +var70 = var71; +} +if (var70){ +var_75 = var_to_remove; +{ +var76 = standard___standard__AbstractArrayRead___standard__abstract_collection__Collection__iterator(var_75); +} +var_77 = var76; for(;;) { -var42 = ((short int (*)(val*))(var41->class->vft[COLOR_abstract_collection__Iterator__is_ok]))(var41) /* is_ok on */; -if(!var42) break; -var43 = ((val* (*)(val*))(var41->class->vft[COLOR_abstract_collection__Iterator__item]))(var41) /* item on */; -var_x44 = var43; -var45 = ((val* (*)(val*))(self->class->vft[COLOR_poset__POSet__elements]))(self) /* elements on */; -var46 = ((val* (*)(val*, val*))(var45->class->vft[COLOR_abstract_collection__MapRead___91d_93d]))(var45, var_x44) /* [] on */; -var_xe47 = var46; -var48 = ((val* (*)(val*))(var_xe47->class->vft[COLOR_poset__POSetElement__froms]))(var_xe47) /* froms on */; -var49 = ((short int (*)(val*, val*))(var48->class->vft[COLOR_abstract_collection__Collection__has]))(var48, var_t) /* has on */; -if (var49){ -var50 = ((val* (*)(val*))(var_xe47->class->vft[COLOR_poset__POSetElement__dfroms]))(var_xe47) /* dfroms on */; -((void (*)(val*, val*))(var50->class->vft[COLOR_abstract_collection__RemovableCollection__remove]))(var50, var_f) /* remove on */; -var51 = ((val* (*)(val*))(var_fe->class->vft[COLOR_poset__POSetElement__dtos]))(var_fe) /* dtos on */; -((void (*)(val*, val*))(var51->class->vft[COLOR_abstract_collection__RemovableCollection__remove]))(var51, var_x44) /* remove on */; +{ +var78 = standard__array___standard__array__ArrayIterator___standard__abstract_collection__Iterator__is_ok(var_77); +} +if (var78){ +{ +var79 = standard__array___standard__array__ArrayIterator___standard__abstract_collection__Iterator__item(var_77); +} +var_x80 = var79; +{ +{ /* Inline poset#POSetElement#dfroms (var_te) on */ +var83 = var_te->attrs[COLOR_poset__POSetElement___dfroms].val; /* _dfroms on */ +if (unlikely(var83 == NULL)) { +PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _dfroms"); +PRINT_ERROR(" (%s:%d)\n", FILE_poset, 409); +fatal_exit(1); +} +var81 = var83; +RET_LABEL82:(void)0; +} +} +{ +standard___standard__HashSet___standard__abstract_collection__RemovableCollection__remove(var81, var_x80); /* Direct call hash_collection#HashSet#remove on */ +} +{ +standard__array___standard__array__ArrayIterator___standard__abstract_collection__Iterator__next(var_77); /* Direct call array#ArrayIterator#next on */ +} } else { +goto BREAK_label84; } -CONTINUE_label52: (void)0; -((void (*)(val*))(var41->class->vft[COLOR_abstract_collection__Iterator__next]))(var41) /* next on */; } -BREAK_label52: (void)0; -var53 = ((val* (*)(val*))(var_fe->class->vft[COLOR_poset__POSetElement__dtos]))(var_fe) /* dtos on */; -((void (*)(val*, val*))(var53->class->vft[COLOR_abstract_collection__SimpleCollection__add]))(var53, var_t) /* add on */; -var54 = ((val* (*)(val*))(var_te->class->vft[COLOR_poset__POSetElement__dfroms]))(var_te) /* dfroms on */; -((void (*)(val*, val*))(var54->class->vft[COLOR_abstract_collection__SimpleCollection__add]))(var54, var_f) /* add on */; -RET_LABEL:; +BREAK_label84: (void)0; +{ +standard__array___standard__array__ArrayIterator___standard__abstract_collection__Iterator__finish(var_77); /* Direct call array#ArrayIterator#finish on */ } -/* method poset#POSet#add_edge for (self: Object, Object, Object) */ -void VIRTUAL_poset__POSet__add_edge(val* self, val* p0, val* p1) { -poset__POSet__add_edge(self, p0, p1); -RET_LABEL:; +{ +standard___standard__AbstractArray___standard__abstract_collection__RemovableCollection__clear(var_to_remove); /* Direct call array#AbstractArray#clear on */ } -/* method poset#POSet#has_edge for (self: POSet[Object], Object, Object): Bool */ -short int poset__POSet__has_edge(val* self, val* p0, val* p1) { -short int var /* : Bool */; -short int var1 /* : Bool */; -int cltype; -int idtype; -const struct type* type_struct; -const char* var_class_name; -short int var2 /* : Bool */; -int cltype3; -int idtype4; -const struct type* type_struct5; -const char* var_class_name6; -val* var_f /* var f: Object */; -val* var_t /* var t: Object */; -val* var7 /* : HashMap[Object, POSetElement[Object]] */; -val* var8 /* : Collection[Object] */; -short int var9 /* : Bool */; -short int var10 /* : Bool */; -short int var11 /* : Bool */; -val* var12 /* : HashMap[Object, POSetElement[Object]] */; -val* var13 /* : nullable Object */; -val* var_fe /* var fe: POSetElement[Object] */; -val* var14 /* : HashSet[Object] */; -short int var15 /* : Bool */; -/* Covariant cast for argument 0 (f) isa POSet#0 */ -/* isa POSet#0 */ -type_struct = self->type->resolution_table->types[COLOR_poset__POSet_FT0]; -cltype = type_struct->color; -idtype = type_struct->id; -if(cltype >= p0->type->table_size) { -var1 = 0; } else { -var1 = p0->type->type_table[cltype] == idtype; } -if (!var1) { -var_class_name = p0 == NULL ? "null" : p0->type->name; -fprintf(stderr, "Runtime error: Cast failed. Expected `%s`, got `%s`", "POSet#0", var_class_name); -fprintf(stderr, " (%s:%d)\n", "lib/poset.nit", 109); -exit(1); +{ +{ /* Inline poset#POSetElement#dtos (var_fe) on */ +var87 = var_fe->attrs[COLOR_poset__POSetElement___dtos].val; /* _dtos on */ +if (unlikely(var87 == NULL)) { +PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _dtos"); +PRINT_ERROR(" (%s:%d)\n", FILE_poset, 408); +fatal_exit(1); } -/* Covariant cast for argument 1 (t) isa POSet#0 */ -/* isa POSet#0 */ -type_struct5 = self->type->resolution_table->types[COLOR_poset__POSet_FT0]; -cltype3 = type_struct5->color; -idtype4 = type_struct5->id; -if(cltype3 >= p1->type->table_size) { -var2 = 0; +var85 = var87; +RET_LABEL86:(void)0; +} +} +var_88 = var85; +{ +var89 = standard___standard__HashSet___standard__abstract_collection__Collection__iterator(var_88); +} +var_90 = var89; +for(;;) { +{ +var91 = ((short int(*)(val* self))((((long)var_90&3)?class_info[((long)var_90&3)]:var_90->class)->vft[COLOR_standard__abstract_collection__Iterator__is_ok]))(var_90); /* is_ok on */ +} +if (var91){ +{ +var92 = ((val*(*)(val* self))((((long)var_90&3)?class_info[((long)var_90&3)]:var_90->class)->vft[COLOR_standard__abstract_collection__Iterator__item]))(var_90); /* item on */ +} +var_x93 = var92; +{ +{ /* Inline poset#POSet#elements (self) on */ +var96 = self->attrs[COLOR_poset__POSet___elements].val; /* _elements on */ +if (unlikely(var96 == NULL)) { +PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _elements"); +PRINT_ERROR(" (%s:%d)\n", FILE_poset, 82); +fatal_exit(1); +} +var94 = var96; +RET_LABEL95:(void)0; +} +} +{ +var97 = standard___standard__HashMap___standard__abstract_collection__MapRead___91d_93d(var94, var_x93); +} +var_xe98 = var97; +{ +{ /* Inline poset#POSetElement#froms (var_xe98) on */ +var101 = var_xe98->attrs[COLOR_poset__POSetElement___froms].val; /* _froms on */ +if (unlikely(var101 == NULL)) { +PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _froms"); +PRINT_ERROR(" (%s:%d)\n", FILE_poset, 407); +fatal_exit(1); +} +var99 = var101; +RET_LABEL100:(void)0; +} +} +{ +var102 = standard___standard__HashSet___standard__abstract_collection__Collection__has(var99, var_t); +} +if (var102){ +{ +{ /* Inline poset#POSetElement#dfroms (var_xe98) on */ +var105 = var_xe98->attrs[COLOR_poset__POSetElement___dfroms].val; /* _dfroms on */ +if (unlikely(var105 == NULL)) { +PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _dfroms"); +PRINT_ERROR(" (%s:%d)\n", FILE_poset, 409); +fatal_exit(1); +} +var103 = var105; +RET_LABEL104:(void)0; +} +} +{ +standard___standard__HashSet___standard__abstract_collection__RemovableCollection__remove(var103, var_f); /* Direct call hash_collection#HashSet#remove on */ +} +if (var_to_remove == NULL) { +var106 = 1; /* is null */ } else { -var2 = p1->type->type_table[cltype3] == idtype4; +var106 = 0; /* arg is null but recv is not */ } -if (!var2) { -var_class_name6 = p1 == NULL ? "null" : p1->type->name; -fprintf(stderr, "Runtime error: Cast failed. Expected `%s`, got `%s`", "POSet#0", var_class_name6); -fprintf(stderr, " (%s:%d)\n", "lib/poset.nit", 109); -exit(1); +if (0) { +var107 = standard___standard__Array___standard__kernel__Object___61d_61d(var_to_remove, ((val*)NULL)); +var106 = var107; } -var_f = p0; -var_t = p1; -var7 = ((val* (*)(val*))(self->class->vft[COLOR_poset__POSet__elements]))(self) /* elements on */; -var8 = ((val* (*)(val*))(var7->class->vft[COLOR_abstract_collection__MapRead__keys]))(var7) /* keys on */; -var9 = ((short int (*)(val*, val*))(var8->class->vft[COLOR_abstract_collection__Collection__has]))(var8, var_f) /* has on */; -var10 = !var9; -if (var10){ -var11 = 0; -var = var11; -goto RET_LABEL; +if (var106){ +var108 = NEW_standard__Array(self->type->resolution_table->types[COLOR_standard__Array__poset__POSet___35dE]); +{ +standard___standard__Array___standard__kernel__Object__init(var108); /* Direct call array#Array#init on */ +} +var_to_remove = var108; } else { } -var12 = ((val* (*)(val*))(self->class->vft[COLOR_poset__POSet__elements]))(self) /* elements on */; -var13 = ((val* (*)(val*, val*))(var12->class->vft[COLOR_abstract_collection__MapRead___91d_93d]))(var12, var_f) /* [] on */; -var_fe = var13; -var14 = ((val* (*)(val*))(var_fe->class->vft[COLOR_poset__POSetElement__tos]))(var_fe) /* tos on */; -var15 = ((short int (*)(val*, val*))(var14->class->vft[COLOR_abstract_collection__Collection__has]))(var14, var_t) /* has on */; -var = var15; -goto RET_LABEL; -RET_LABEL:; -return var; +{ +standard___standard__Array___standard__abstract_collection__SimpleCollection__add(var_to_remove, var_x93); /* Direct call array#Array#add on */ +} +} else { +} +{ +((void(*)(val* self))((((long)var_90&3)?class_info[((long)var_90&3)]:var_90->class)->vft[COLOR_standard__abstract_collection__Iterator__next]))(var_90); /* next on */ +} +} else { +goto BREAK_label109; +} +} +BREAK_label109: (void)0; +{ +((void(*)(val* self))((((long)var_90&3)?class_info[((long)var_90&3)]:var_90->class)->vft[COLOR_standard__abstract_collection__Iterator__finish]))(var_90); /* finish on */ +} +if (var_to_remove == NULL) { +var110 = 0; /* is null */ +} else { +var110 = 1; /* arg is null and recv is not */ +} +if (0) { +{ /* Inline kernel#Object#!= (var_to_remove,((val*)NULL)) on */ +var_other = ((val*)NULL); +{ +var113 = ((short int(*)(val* self, val* p0))(var_to_remove->class->vft[COLOR_standard__kernel__Object___61d_61d]))(var_to_remove, var_other); /* == on */ +} +var114 = !var113; +var111 = var114; +goto RET_LABEL112; +RET_LABEL112:(void)0; +} +var110 = var111; +} +if (var110){ +var_115 = var_to_remove; +{ +var116 = standard___standard__AbstractArrayRead___standard__abstract_collection__Collection__iterator(var_115); +} +var_117 = var116; +for(;;) { +{ +var118 = standard__array___standard__array__ArrayIterator___standard__abstract_collection__Iterator__is_ok(var_117); +} +if (var118){ +{ +var119 = standard__array___standard__array__ArrayIterator___standard__abstract_collection__Iterator__item(var_117); +} +var_x120 = var119; +{ +{ /* Inline poset#POSetElement#dtos (var_fe) on */ +var123 = var_fe->attrs[COLOR_poset__POSetElement___dtos].val; /* _dtos on */ +if (unlikely(var123 == NULL)) { +PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _dtos"); +PRINT_ERROR(" (%s:%d)\n", FILE_poset, 408); +fatal_exit(1); +} +var121 = var123; +RET_LABEL122:(void)0; +} +} +{ +standard___standard__HashSet___standard__abstract_collection__RemovableCollection__remove(var121, var_x120); /* Direct call hash_collection#HashSet#remove on */ +} +{ +standard__array___standard__array__ArrayIterator___standard__abstract_collection__Iterator__next(var_117); /* Direct call array#ArrayIterator#next on */ +} +} else { +goto BREAK_label124; +} +} +BREAK_label124: (void)0; +{ +standard__array___standard__array__ArrayIterator___standard__abstract_collection__Iterator__finish(var_117); /* Direct call array#ArrayIterator#finish on */ +} +} else { +} +{ +{ /* Inline poset#POSetElement#dtos (var_fe) on */ +var127 = var_fe->attrs[COLOR_poset__POSetElement___dtos].val; /* _dtos on */ +if (unlikely(var127 == NULL)) { +PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _dtos"); +PRINT_ERROR(" (%s:%d)\n", FILE_poset, 408); +fatal_exit(1); +} +var125 = var127; +RET_LABEL126:(void)0; +} +} +{ +standard___standard__HashSet___standard__abstract_collection__SimpleCollection__add(var125, var_t); /* Direct call hash_collection#HashSet#add on */ +} +{ +{ /* Inline poset#POSetElement#dfroms (var_te) on */ +var130 = var_te->attrs[COLOR_poset__POSetElement___dfroms].val; /* _dfroms on */ +if (unlikely(var130 == NULL)) { +PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _dfroms"); +PRINT_ERROR(" (%s:%d)\n", FILE_poset, 409); +fatal_exit(1); +} +var128 = var130; +RET_LABEL129:(void)0; +} +} +{ +standard___standard__HashSet___standard__abstract_collection__SimpleCollection__add(var128, var_f); /* Direct call hash_collection#HashSet#add on */ } -/* method poset#POSet#has_edge for (self: Object, Object, Object): Bool */ -short int VIRTUAL_poset__POSet__has_edge(val* self, val* p0, val* p1) { -short int var /* : Bool */; -short int var1 /* : Bool */; -var1 = poset__POSet__has_edge(self, p0, p1); -var = var1; RET_LABEL:; -return var; } -/* method poset#POSet#has_direct_edge for (self: POSet[Object], Object, Object): Bool */ -short int poset__POSet__has_direct_edge(val* self, val* p0, val* p1) { +/* method poset#POSet#has_edge for (self: POSet[nullable Object], nullable Object, nullable Object): Bool */ +short int poset___poset__POSet___has_edge(val* self, val* p0, val* p1) { short int var /* : Bool */; short int var1 /* : Bool */; int cltype; int idtype; const struct type* type_struct; +short int is_nullable; const char* var_class_name; short int var2 /* : Bool */; int cltype3; int idtype4; const struct type* type_struct5; -const char* var_class_name6; -val* var_f /* var f: Object */; -val* var_t /* var t: Object */; -val* var7 /* : HashMap[Object, POSetElement[Object]] */; -val* var8 /* : Collection[Object] */; -short int var9 /* : Bool */; -short int var10 /* : Bool */; -short int var11 /* : Bool */; -val* var12 /* : HashMap[Object, POSetElement[Object]] */; -val* var13 /* : nullable Object */; -val* var_fe /* var fe: POSetElement[Object] */; -val* var14 /* : HashSet[Object] */; -short int var15 /* : Bool */; -/* Covariant cast for argument 0 (f) isa POSet#0 */ -/* isa POSet#0 */ -type_struct = self->type->resolution_table->types[COLOR_poset__POSet_FT0]; +short int is_nullable6; +const char* var_class_name7; +val* var_f /* var f: nullable Object */; +val* var_t /* var t: nullable Object */; +val* var8 /* : HashMap[nullable Object, POSetElement[nullable Object]] */; +val* var10 /* : HashMap[nullable Object, POSetElement[nullable Object]] */; +val* var11 /* : RemovableCollection[nullable Object] */; +short int var12 /* : Bool */; +short int var13 /* : Bool */; +val* var14 /* : HashMap[nullable Object, POSetElement[nullable Object]] */; +val* var16 /* : HashMap[nullable Object, POSetElement[nullable Object]] */; +val* var17 /* : nullable Object */; +val* var_fe /* var fe: POSetElement[nullable Object] */; +val* var18 /* : HashSet[nullable Object] */; +val* var20 /* : HashSet[nullable Object] */; +short int var21 /* : Bool */; +/* Covariant cast for argument 0 (f) isa E */ +/* isa E */ +type_struct = self->type->resolution_table->types[COLOR_poset__POSet___35dE]; cltype = type_struct->color; idtype = type_struct->id; -if(cltype >= p0->type->table_size) { +is_nullable = type_struct->is_nullable; +if(p0 == NULL) { +var1 = is_nullable; +} else { +if(cltype >= (((long)p0&3)?type_info[((long)p0&3)]:p0->type)->table_size) { var1 = 0; } else { -var1 = p0->type->type_table[cltype] == idtype; +var1 = (((long)p0&3)?type_info[((long)p0&3)]:p0->type)->type_table[cltype] == idtype; } -if (!var1) { -var_class_name = p0 == NULL ? "null" : p0->type->name; -fprintf(stderr, "Runtime error: Cast failed. Expected `%s`, got `%s`", "POSet#0", var_class_name); -fprintf(stderr, " (%s:%d)\n", "lib/poset.nit", 118); -exit(1); } -/* Covariant cast for argument 1 (t) isa POSet#0 */ -/* isa POSet#0 */ -type_struct5 = self->type->resolution_table->types[COLOR_poset__POSet_FT0]; +if (unlikely(!var1)) { +var_class_name = p0 == NULL ? "null" : (((long)p0&3)?type_info[((long)p0&3)]:p0->type)->name; +PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "E", var_class_name); +PRINT_ERROR(" (%s:%d)\n", FILE_poset, 208); +fatal_exit(1); +} +/* Covariant cast for argument 1 (t) isa E */ +/* isa E */ +type_struct5 = self->type->resolution_table->types[COLOR_poset__POSet___35dE]; cltype3 = type_struct5->color; idtype4 = type_struct5->id; -if(cltype3 >= p1->type->table_size) { +is_nullable6 = type_struct5->is_nullable; +if(p1 == NULL) { +var2 = is_nullable6; +} else { +if(cltype3 >= (((long)p1&3)?type_info[((long)p1&3)]:p1->type)->table_size) { var2 = 0; } else { -var2 = p1->type->type_table[cltype3] == idtype4; +var2 = (((long)p1&3)?type_info[((long)p1&3)]:p1->type)->type_table[cltype3] == idtype4; } -if (!var2) { -var_class_name6 = p1 == NULL ? "null" : p1->type->name; -fprintf(stderr, "Runtime error: Cast failed. Expected `%s`, got `%s`", "POSet#0", var_class_name6); -fprintf(stderr, " (%s:%d)\n", "lib/poset.nit", 118); -exit(1); +} +if (unlikely(!var2)) { +var_class_name7 = p1 == NULL ? "null" : (((long)p1&3)?type_info[((long)p1&3)]:p1->type)->name; +PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "E", var_class_name7); +PRINT_ERROR(" (%s:%d)\n", FILE_poset, 208); +fatal_exit(1); } var_f = p0; var_t = p1; -var7 = ((val* (*)(val*))(self->class->vft[COLOR_poset__POSet__elements]))(self) /* elements on */; -var8 = ((val* (*)(val*))(var7->class->vft[COLOR_abstract_collection__MapRead__keys]))(var7) /* keys on */; -var9 = ((short int (*)(val*, val*))(var8->class->vft[COLOR_abstract_collection__Collection__has]))(var8, var_f) /* has on */; -var10 = !var9; -if (var10){ -var11 = 0; -var = var11; +{ +{ /* Inline poset#POSet#elements (self) on */ +var10 = self->attrs[COLOR_poset__POSet___elements].val; /* _elements on */ +if (unlikely(var10 == NULL)) { +PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _elements"); +PRINT_ERROR(" (%s:%d)\n", FILE_poset, 82); +fatal_exit(1); +} +var8 = var10; +RET_LABEL9:(void)0; +} +} +{ +var11 = standard___standard__HashMap___standard__abstract_collection__MapRead__keys(var8); +} +{ +var12 = ((short int(*)(val* self, val* p0))((((long)var11&3)?class_info[((long)var11&3)]:var11->class)->vft[COLOR_standard__abstract_collection__Collection__has]))(var11, var_f); /* has on */ +} +var13 = !var12; +if (var13){ +var = 0; goto RET_LABEL; } else { } -var12 = ((val* (*)(val*))(self->class->vft[COLOR_poset__POSet__elements]))(self) /* elements on */; -var13 = ((val* (*)(val*, val*))(var12->class->vft[COLOR_abstract_collection__MapRead___91d_93d]))(var12, var_f) /* [] on */; -var_fe = var13; -var14 = ((val* (*)(val*))(var_fe->class->vft[COLOR_poset__POSetElement__dtos]))(var_fe) /* dtos on */; -var15 = ((short int (*)(val*, val*))(var14->class->vft[COLOR_abstract_collection__Collection__has]))(var14, var_t) /* has on */; -var = var15; -goto RET_LABEL; -RET_LABEL:; -return var; +{ +{ /* Inline poset#POSet#elements (self) on */ +var16 = self->attrs[COLOR_poset__POSet___elements].val; /* _elements on */ +if (unlikely(var16 == NULL)) { +PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _elements"); +PRINT_ERROR(" (%s:%d)\n", FILE_poset, 82); +fatal_exit(1); } -/* method poset#POSet#has_direct_edge for (self: Object, Object, Object): Bool */ -short int VIRTUAL_poset__POSet__has_direct_edge(val* self, val* p0, val* p1) { -short int var /* : Bool */; -short int var1 /* : Bool */; -var1 = poset__POSet__has_direct_edge(self, p0, p1); -var = var1; -RET_LABEL:; -return var; +var14 = var16; +RET_LABEL15:(void)0; } -/* method poset#POSet#show_dot for (self: POSet[Object]) */ -void poset__POSet__show_dot(val* self) { -val* var /* : OProcess */; -static val* varonce; -val* var1 /* : String */; -char* var2 /* : NativeString */; -long var3 /* : Int */; -val* var4 /* : String */; -static val* varonce5; -val* var6 /* : String */; -char* var7 /* : NativeString */; -long var8 /* : Int */; -val* var9 /* : String */; -val* var10 /* : Array[String] */; -long var11 /* : Int */; -val* var12 /* : NativeArray[String] */; -val* var_f /* var f: OProcess */; -static val* varonce13; -val* var14 /* : String */; -char* var15 /* : NativeString */; -long var16 /* : Int */; -val* var17 /* : String */; -val* var18 /* : HashMap[Object, POSetElement[Object]] */; -val* var19 /* : Collection[Object] */; -val* var20 /* : Iterator[nullable Object] */; -short int var21 /* : Bool */; -val* var22 /* : nullable Object */; -val* var_x /* var x: Object */; -static val* varonce23; -val* var24 /* : String */; -char* var25 /* : NativeString */; -long var26 /* : Int */; -val* var27 /* : String */; -static val* varonce28; -val* var29 /* : String */; -char* var30 /* : NativeString */; -long var31 /* : Int */; -val* var32 /* : String */; -val* var33 /* : Array[Object] */; -long var34 /* : Int */; -val* var35 /* : NativeArray[Object] */; -val* var36 /* : String */; -val* var37 /* : HashMap[Object, POSetElement[Object]] */; -val* var38 /* : nullable Object */; -val* var_xe /* var xe: POSetElement[Object] */; -val* var39 /* : HashSet[Object] */; -val* var40 /* : Iterator[nullable Object] */; -short int var41 /* : Bool */; -val* var42 /* : nullable Object */; -val* var_y /* var y: Object */; -short int var43 /* : Bool */; -static val* varonce44; -val* var45 /* : String */; -char* var46 /* : NativeString */; -long var47 /* : Int */; -val* var48 /* : String */; -static val* varonce49; -val* var50 /* : String */; -char* var51 /* : NativeString */; -long var52 /* : Int */; -val* var53 /* : String */; -static val* varonce54; -val* var55 /* : String */; -char* var56 /* : NativeString */; -long var57 /* : Int */; -val* var58 /* : String */; -val* var59 /* : Array[Object] */; -long var60 /* : Int */; -val* var61 /* : NativeArray[Object] */; -val* var62 /* : String */; -static val* varonce63; -val* var64 /* : String */; -char* var65 /* : NativeString */; -long var66 /* : Int */; -val* var67 /* : String */; -static val* varonce68; -val* var69 /* : String */; -char* var70 /* : NativeString */; -long var71 /* : Int */; -val* var72 /* : String */; -static val* varonce73; -val* var74 /* : String */; -char* var75 /* : NativeString */; -long var76 /* : Int */; -val* var77 /* : String */; -val* var78 /* : Array[Object] */; -long var79 /* : Int */; -val* var80 /* : NativeArray[Object] */; -val* var81 /* : String */; -static val* varonce83; -val* var84 /* : String */; -char* var85 /* : NativeString */; -long var86 /* : Int */; -val* var87 /* : String */; -var = NEW_exec__OProcess(&type_exec__OProcess); -if (varonce) { -var1 = varonce; -} else { -var2 = "dot"; -var3 = 3; -var4 = string__NativeString__to_s_with_length(var2, var3); -var1 = var4; -varonce = var1; -} -if (varonce5) { -var6 = varonce5; -} else { -var7 = "-Txlib"; -var8 = 6; -var9 = string__NativeString__to_s_with_length(var7, var8); -var6 = var9; -varonce5 = var6; -} -var10 = NEW_array__Array(&type_array__Arraystring__String); -{ /* var10 = array_instance Array[String] */ -var11 = 1; -var12 = NEW_array__NativeArray(var11, &type_array__NativeArraystring__String); -((struct instance_array__NativeArray*)var12)->values[0] = (val*) var6; -((void (*)(val*, val*, long))(var10->class->vft[COLOR_array__Array__with_native]))(var10, var12, var11) /* with_native on */; -CHECK_NEW_array__Array(var10); -} -((void (*)(val*, val*, val*))(var->class->vft[COLOR_exec__OProcess__init]))(var, var1, var10) /* init on */; -CHECK_NEW_exec__OProcess(var); -var_f = var; -if (varonce13) { -var14 = varonce13; -} else { -var15 = "digraph {\n"; -var16 = 10; -var17 = string__NativeString__to_s_with_length(var15, var16); -var14 = var17; -varonce13 = var14; -} -((void (*)(val*, val*))(var_f->class->vft[COLOR_stream__OStream__write]))(var_f, var14) /* write on */; -var18 = ((val* (*)(val*))(self->class->vft[COLOR_poset__POSet__elements]))(self) /* elements on */; -var19 = ((val* (*)(val*))(var18->class->vft[COLOR_abstract_collection__MapRead__keys]))(var18) /* keys on */; -var20 = ((val* (*)(val*))(var19->class->vft[COLOR_abstract_collection__Collection__iterator]))(var19) /* iterator on */; -for(;;) { -var21 = ((short int (*)(val*))(var20->class->vft[COLOR_abstract_collection__Iterator__is_ok]))(var20) /* is_ok on */; -if(!var21) break; -var22 = ((val* (*)(val*))(var20->class->vft[COLOR_abstract_collection__Iterator__item]))(var20) /* item on */; -var_x = var22; -if (varonce23) { -var24 = varonce23; -} else { -var25 = "\""; -var26 = 1; -var27 = string__NativeString__to_s_with_length(var25, var26); -var24 = var27; -varonce23 = var24; -} -if (varonce28) { -var29 = varonce28; -} else { -var30 = "\";\n"; -var31 = 3; -var32 = string__NativeString__to_s_with_length(var30, var31); -var29 = var32; -varonce28 = var29; -} -var33 = NEW_array__Array(&type_array__Arraykernel__Object); -{ /* var33 = array_instance Array[Object] */ -var34 = 3; -var35 = NEW_array__NativeArray(var34, &type_array__NativeArraykernel__Object); -((struct instance_array__NativeArray*)var35)->values[0] = (val*) var24; -((struct instance_array__NativeArray*)var35)->values[1] = (val*) var_x; -((struct instance_array__NativeArray*)var35)->values[2] = (val*) var29; -((void (*)(val*, val*, long))(var33->class->vft[COLOR_array__Array__with_native]))(var33, var35, var34) /* with_native on */; -CHECK_NEW_array__Array(var33); -} -var36 = ((val* (*)(val*))(var33->class->vft[COLOR_string__Object__to_s]))(var33) /* to_s on */; -((void (*)(val*, val*))(var_f->class->vft[COLOR_stream__OStream__write]))(var_f, var36) /* write on */; -var37 = ((val* (*)(val*))(self->class->vft[COLOR_poset__POSet__elements]))(self) /* elements on */; -var38 = ((val* (*)(val*, val*))(var37->class->vft[COLOR_abstract_collection__MapRead___91d_93d]))(var37, var_x) /* [] on */; -var_xe = var38; -var39 = ((val* (*)(val*))(var_xe->class->vft[COLOR_poset__POSetElement__dtos]))(var_xe) /* dtos on */; -var40 = ((val* (*)(val*))(var39->class->vft[COLOR_abstract_collection__Collection__iterator]))(var39) /* iterator on */; -for(;;) { -var41 = ((short int (*)(val*))(var40->class->vft[COLOR_abstract_collection__Iterator__is_ok]))(var40) /* is_ok on */; -if(!var41) break; -var42 = ((val* (*)(val*))(var40->class->vft[COLOR_abstract_collection__Iterator__item]))(var40) /* item on */; -var_y = var42; -var43 = ((short int (*)(val*, val*, val*))(self->class->vft[COLOR_poset__POSet__has_edge]))(self, var_y, var_x) /* has_edge on */; -if (var43){ -if (varonce44) { -var45 = varonce44; -} else { -var46 = "\""; -var47 = 1; -var48 = string__NativeString__to_s_with_length(var46, var47); -var45 = var48; -varonce44 = var45; -} -if (varonce49) { -var50 = varonce49; -} else { -var51 = "\" -> \""; -var52 = 6; -var53 = string__NativeString__to_s_with_length(var51, var52); -var50 = var53; -varonce49 = var50; -} -if (varonce54) { -var55 = varonce54; -} else { -var56 = "\"[dir=both];\n"; -var57 = 13; -var58 = string__NativeString__to_s_with_length(var56, var57); -var55 = var58; -varonce54 = var55; -} -var59 = NEW_array__Array(&type_array__Arraykernel__Object); -{ /* var59 = array_instance Array[Object] */ -var60 = 5; -var61 = NEW_array__NativeArray(var60, &type_array__NativeArraykernel__Object); -((struct instance_array__NativeArray*)var61)->values[0] = (val*) var45; -((struct instance_array__NativeArray*)var61)->values[1] = (val*) var_x; -((struct instance_array__NativeArray*)var61)->values[2] = (val*) var50; -((struct instance_array__NativeArray*)var61)->values[3] = (val*) var_y; -((struct instance_array__NativeArray*)var61)->values[4] = (val*) var55; -((void (*)(val*, val*, long))(var59->class->vft[COLOR_array__Array__with_native]))(var59, var61, var60) /* with_native on */; -CHECK_NEW_array__Array(var59); -} -var62 = ((val* (*)(val*))(var59->class->vft[COLOR_string__Object__to_s]))(var59) /* to_s on */; -((void (*)(val*, val*))(var_f->class->vft[COLOR_stream__OStream__write]))(var_f, var62) /* write on */; -} else { -if (varonce63) { -var64 = varonce63; -} else { -var65 = "\""; -var66 = 1; -var67 = string__NativeString__to_s_with_length(var65, var66); -var64 = var67; -varonce63 = var64; -} -if (varonce68) { -var69 = varonce68; -} else { -var70 = "\" -> \""; -var71 = 6; -var72 = string__NativeString__to_s_with_length(var70, var71); -var69 = var72; -varonce68 = var69; -} -if (varonce73) { -var74 = varonce73; -} else { -var75 = "\";\n"; -var76 = 3; -var77 = string__NativeString__to_s_with_length(var75, var76); -var74 = var77; -varonce73 = var74; -} -var78 = NEW_array__Array(&type_array__Arraykernel__Object); -{ /* var78 = array_instance Array[Object] */ -var79 = 5; -var80 = NEW_array__NativeArray(var79, &type_array__NativeArraykernel__Object); -((struct instance_array__NativeArray*)var80)->values[0] = (val*) var64; -((struct instance_array__NativeArray*)var80)->values[1] = (val*) var_x; -((struct instance_array__NativeArray*)var80)->values[2] = (val*) var69; -((struct instance_array__NativeArray*)var80)->values[3] = (val*) var_y; -((struct instance_array__NativeArray*)var80)->values[4] = (val*) var74; -((void (*)(val*, val*, long))(var78->class->vft[COLOR_array__Array__with_native]))(var78, var80, var79) /* with_native on */; -CHECK_NEW_array__Array(var78); -} -var81 = ((val* (*)(val*))(var78->class->vft[COLOR_string__Object__to_s]))(var78) /* to_s on */; -((void (*)(val*, val*))(var_f->class->vft[COLOR_stream__OStream__write]))(var_f, var81) /* write on */; -} -CONTINUE_label: (void)0; -((void (*)(val*))(var40->class->vft[COLOR_abstract_collection__Iterator__next]))(var40) /* next on */; } -BREAK_label: (void)0; -CONTINUE_label82: (void)0; -((void (*)(val*))(var20->class->vft[COLOR_abstract_collection__Iterator__next]))(var20) /* next on */; +{ +var17 = standard___standard__HashMap___standard__abstract_collection__MapRead___91d_93d(var14, var_f); } -BREAK_label82: (void)0; -if (varonce83) { -var84 = varonce83; -} else { -var85 = "}\n"; -var86 = 2; -var87 = string__NativeString__to_s_with_length(var85, var86); -var84 = var87; -varonce83 = var84; +var_fe = var17; +{ +{ /* Inline poset#POSetElement#tos (var_fe) on */ +var20 = var_fe->attrs[COLOR_poset__POSetElement___tos].val; /* _tos on */ +if (unlikely(var20 == NULL)) { +PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _tos"); +PRINT_ERROR(" (%s:%d)\n", FILE_poset, 406); +fatal_exit(1); +} +var18 = var20; +RET_LABEL19:(void)0; } -((void (*)(val*, val*))(var_f->class->vft[COLOR_stream__OStream__write]))(var_f, var84) /* write on */; -RET_LABEL:; } -/* method poset#POSet#show_dot for (self: Object) */ -void VIRTUAL_poset__POSet__show_dot(val* self) { -poset__POSet__show_dot(self); +{ +var21 = standard___standard__HashSet___standard__abstract_collection__Collection__has(var18, var_t); +} +var = var21; +goto RET_LABEL; RET_LABEL:; +return var; } -/* method poset#POSet#compare for (self: POSet[Object], Object, Object): Int */ -long poset__POSet__compare(val* self, val* p0, val* p1) { +/* method poset#POSet#compare for (self: POSet[nullable Object], nullable Object, nullable Object): Int */ +long poset___poset__POSet___standard__sorter__Comparator__compare(val* self, val* p0, val* p1) { long var /* : Int */; short int var1 /* : Bool */; int cltype; int idtype; const struct type* type_struct; +short int is_nullable; const char* var_class_name; short int var2 /* : Bool */; int cltype3; int idtype4; const struct type* type_struct5; -const char* var_class_name6; -val* var_a /* var a: Object */; -val* var_b /* var b: Object */; -val* var7 /* : HashMap[Object, POSetElement[Object]] */; -val* var8 /* : nullable Object */; -val* var_ae /* var ae: POSetElement[Object] */; -val* var9 /* : HashMap[Object, POSetElement[Object]] */; -val* var10 /* : nullable Object */; -val* var_be /* var be: POSetElement[Object] */; -val* var11 /* : HashSet[Object] */; -long var12 /* : Int */; -val* var13 /* : HashSet[Object] */; -long var14 /* : Int */; -long var15 /* : Int */; -long var_res /* var res: Int */; -long var16 /* : Int */; -short int var17 /* : Bool */; -short int var19 /* : Bool */; -short int var20 /* : Bool */; -val* var21 /* : HashMap[Object, POSetElement[Object]] */; -val* var22 /* : nullable Object */; +short int is_nullable6; +const char* var_class_name7; +val* var_a /* var a: nullable Object */; +val* var_b /* var b: nullable Object */; +val* var8 /* : HashMap[nullable Object, POSetElement[nullable Object]] */; +val* var10 /* : HashMap[nullable Object, POSetElement[nullable Object]] */; +val* var11 /* : nullable Object */; +val* var_ae /* var ae: POSetElement[nullable Object] */; +val* var12 /* : HashMap[nullable Object, POSetElement[nullable Object]] */; +val* var14 /* : HashMap[nullable Object, POSetElement[nullable Object]] */; +val* var15 /* : nullable Object */; +val* var_be /* var be: POSetElement[nullable Object] */; +val* var16 /* : HashSet[nullable Object] */; +val* var18 /* : HashSet[nullable Object] */; +long var19 /* : Int */; +val* var20 /* : HashSet[nullable Object] */; +val* var22 /* : HashSet[nullable Object] */; long var23 /* : Int */; -val* var24 /* : HashMap[Object, POSetElement[Object]] */; -val* var25 /* : nullable Object */; -long var26 /* : Int */; -long var27 /* : Int */; -/* Covariant cast for argument 0 (a) isa POSet#0 */ -/* isa POSet#0 */ -type_struct = self->type->resolution_table->types[COLOR_poset__POSet_FT0]; +long var24 /* : Int */; +long var_res /* var res: Int */; +short int var25 /* : Bool */; +short int var27 /* : Bool */; +short int var28 /* : Bool */; +val* var29 /* : HashMap[nullable Object, POSetElement[nullable Object]] */; +val* var31 /* : HashMap[nullable Object, POSetElement[nullable Object]] */; +val* var32 /* : nullable Object */; +long var33 /* : Int */; +long var35 /* : Int */; +val* var36 /* : HashMap[nullable Object, POSetElement[nullable Object]] */; +val* var38 /* : HashMap[nullable Object, POSetElement[nullable Object]] */; +val* var39 /* : nullable Object */; +long var40 /* : Int */; +long var42 /* : Int */; +long var43 /* : Int */; +/* Covariant cast for argument 0 (a) isa E */ +/* isa E */ +type_struct = self->type->resolution_table->types[COLOR_poset__POSet___35dE]; cltype = type_struct->color; idtype = type_struct->id; -if(cltype >= p0->type->table_size) { +is_nullable = type_struct->is_nullable; +if(p0 == NULL) { +var1 = is_nullable; +} else { +if(cltype >= (((long)p0&3)?type_info[((long)p0&3)]:p0->type)->table_size) { var1 = 0; } else { -var1 = p0->type->type_table[cltype] == idtype; +var1 = (((long)p0&3)?type_info[((long)p0&3)]:p0->type)->type_table[cltype] == idtype; } -if (!var1) { -var_class_name = p0 == NULL ? "null" : p0->type->name; -fprintf(stderr, "Runtime error: Cast failed. Expected `%s`, got `%s`", "POSet#0", var_class_name); -fprintf(stderr, " (%s:%d)\n", "lib/poset.nit", 151); -exit(1); } -/* Covariant cast for argument 1 (b) isa POSet#0 */ -/* isa POSet#0 */ -type_struct5 = self->type->resolution_table->types[COLOR_poset__POSet_FT0]; +if (unlikely(!var1)) { +var_class_name = p0 == NULL ? "null" : (((long)p0&3)?type_info[((long)p0&3)]:p0->type)->name; +PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "E", var_class_name); +PRINT_ERROR(" (%s:%d)\n", FILE_poset, 284); +fatal_exit(1); +} +/* Covariant cast for argument 1 (b) isa E */ +/* isa E */ +type_struct5 = self->type->resolution_table->types[COLOR_poset__POSet___35dE]; cltype3 = type_struct5->color; idtype4 = type_struct5->id; -if(cltype3 >= p1->type->table_size) { +is_nullable6 = type_struct5->is_nullable; +if(p1 == NULL) { +var2 = is_nullable6; +} else { +if(cltype3 >= (((long)p1&3)?type_info[((long)p1&3)]:p1->type)->table_size) { var2 = 0; } else { -var2 = p1->type->type_table[cltype3] == idtype4; +var2 = (((long)p1&3)?type_info[((long)p1&3)]:p1->type)->type_table[cltype3] == idtype4; } -if (!var2) { -var_class_name6 = p1 == NULL ? "null" : p1->type->name; -fprintf(stderr, "Runtime error: Cast failed. Expected `%s`, got `%s`", "POSet#0", var_class_name6); -fprintf(stderr, " (%s:%d)\n", "lib/poset.nit", 151); -exit(1); +} +if (unlikely(!var2)) { +var_class_name7 = p1 == NULL ? "null" : (((long)p1&3)?type_info[((long)p1&3)]:p1->type)->name; +PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "E", var_class_name7); +PRINT_ERROR(" (%s:%d)\n", FILE_poset, 284); +fatal_exit(1); } var_a = p0; var_b = p1; -var7 = ((val* (*)(val*))(self->class->vft[COLOR_poset__POSet__elements]))(self) /* elements on */; -var8 = ((val* (*)(val*, val*))(var7->class->vft[COLOR_abstract_collection__MapRead___91d_93d]))(var7, var_a) /* [] on */; -var_ae = var8; -var9 = ((val* (*)(val*))(self->class->vft[COLOR_poset__POSet__elements]))(self) /* elements on */; -var10 = ((val* (*)(val*, val*))(var9->class->vft[COLOR_abstract_collection__MapRead___91d_93d]))(var9, var_b) /* [] on */; -var_be = var10; -var11 = ((val* (*)(val*))(var_ae->class->vft[COLOR_poset__POSetElement__tos]))(var_ae) /* tos on */; -var12 = ((long (*)(val*))(var11->class->vft[COLOR_abstract_collection__Collection__length]))(var11) /* length on */; -var13 = ((val* (*)(val*))(var_be->class->vft[COLOR_poset__POSetElement__tos]))(var_be) /* tos on */; -var14 = ((long (*)(val*))(var13->class->vft[COLOR_abstract_collection__Collection__length]))(var13) /* length on */; -var15 = kernel__Int___60d_61d_62d(var12, var14); -var_res = var15; -var16 = 0; -{ /* Inline kernel#Int#!= (var_res,var16) */ -var19 = var_res == var16; -var20 = !var19; -var17 = var20; -goto RET_LABEL18; -RET_LABEL18:(void)0; -} -if (var17){ -var = var_res; -goto RET_LABEL; -} else { +{ +{ /* Inline poset#POSet#elements (self) on */ +var10 = self->attrs[COLOR_poset__POSet___elements].val; /* _elements on */ +if (unlikely(var10 == NULL)) { +PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _elements"); +PRINT_ERROR(" (%s:%d)\n", FILE_poset, 82); +fatal_exit(1); } -var21 = ((val* (*)(val*))(self->class->vft[COLOR_poset__POSet__elements]))(self) /* elements on */; -var22 = ((val* (*)(val*, val*))(var21->class->vft[COLOR_abstract_collection__MapRead___91d_93d]))(var21, var_a) /* [] on */; -var23 = ((long (*)(val*))(var22->class->vft[COLOR_poset__POSetElement__count]))(var22) /* count on */; -var24 = ((val* (*)(val*))(self->class->vft[COLOR_poset__POSet__elements]))(self) /* elements on */; -var25 = ((val* (*)(val*, val*))(var24->class->vft[COLOR_abstract_collection__MapRead___91d_93d]))(var24, var_b) /* [] on */; -var26 = ((long (*)(val*))(var25->class->vft[COLOR_poset__POSetElement__count]))(var25) /* count on */; -var27 = kernel__Int___60d_61d_62d(var23, var26); -var = var27; -goto RET_LABEL; -RET_LABEL:; -return var; +var8 = var10; +RET_LABEL9:(void)0; } -/* method poset#POSet#compare for (self: Object, nullable Object, nullable Object): Int */ -long VIRTUAL_poset__POSet__compare(val* self, val* p0, val* p1) { -long var /* : Int */; -long var1 /* : Int */; -var1 = poset__POSet__compare(self, p0, p1); -var = var1; -RET_LABEL:; -return var; } -/* method poset#POSet#init for (self: POSet[Object]) */ -void poset__POSet__init(val* self) { -RET_LABEL:; +{ +var11 = standard___standard__HashMap___standard__abstract_collection__MapRead___91d_93d(var8, var_a); } -/* method poset#POSet#init for (self: Object) */ -void VIRTUAL_poset__POSet__init(val* self) { -poset__POSet__init(self); -RET_LABEL:; +var_ae = var11; +{ +{ /* Inline poset#POSet#elements (self) on */ +var14 = self->attrs[COLOR_poset__POSet___elements].val; /* _elements on */ +if (unlikely(var14 == NULL)) { +PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _elements"); +PRINT_ERROR(" (%s:%d)\n", FILE_poset, 82); +fatal_exit(1); } -/* method poset#POSetElement#poset for (self: POSetElement[Object]): POSet[Object] */ -val* poset__POSetElement__poset(val* self) { -val* var /* : POSet[Object] */; -val* var1 /* : POSet[Object] */; -var1 = self->attrs[COLOR_poset__POSetElement___64dposet].val; /* @poset on */ -if (var1 == NULL) { -fprintf(stderr, "Runtime error: %s", "Uninitialized attribute @poset"); -fprintf(stderr, " (%s:%d)\n", "lib/poset.nit", 181); -exit(1); +var12 = var14; +RET_LABEL13:(void)0; } -var = var1; -RET_LABEL:; -return var; } -/* method poset#POSetElement#poset for (self: Object): POSet[Object] */ -val* VIRTUAL_poset__POSetElement__poset(val* self) { -val* var /* : POSet[Object] */; -val* var1 /* : POSet[Object] */; -var1 = poset__POSetElement__poset(self); -var = var1; -RET_LABEL:; -return var; +{ +var15 = standard___standard__HashMap___standard__abstract_collection__MapRead___91d_93d(var12, var_b); } -/* method poset#POSetElement#poset= for (self: POSetElement[Object], POSet[Object]) */ -void poset__POSetElement__poset_61d(val* self, val* p0) { -short int var /* : Bool */; -int cltype; -int idtype; -const struct type* type_struct; -const char* var_class_name; -/* Covariant cast for argument 0 (poset) isa POSet[POSetElement#0] */ -/* isa POSet[POSetElement#0] */ -type_struct = self->type->resolution_table->types[COLOR_poset__POSetposet__POSetElement_FT0]; -cltype = type_struct->color; -idtype = type_struct->id; -if(cltype >= p0->type->table_size) { -var = 0; -} else { -var = p0->type->type_table[cltype] == idtype; +var_be = var15; +{ +{ /* Inline poset#POSetElement#tos (var_ae) on */ +var18 = var_ae->attrs[COLOR_poset__POSetElement___tos].val; /* _tos on */ +if (unlikely(var18 == NULL)) { +PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _tos"); +PRINT_ERROR(" (%s:%d)\n", FILE_poset, 406); +fatal_exit(1); } -if (!var) { -var_class_name = p0 == NULL ? "null" : p0->type->name; -fprintf(stderr, "Runtime error: Cast failed. Expected `%s`, got `%s`", "POSet[POSetElement#0]", var_class_name); -fprintf(stderr, " (%s:%d)\n", "lib/poset.nit", 181); -exit(1); +var16 = var18; +RET_LABEL17:(void)0; } -self->attrs[COLOR_poset__POSetElement___64dposet].val = p0; /* @poset on */ -RET_LABEL:; } -/* method poset#POSetElement#poset= for (self: Object, POSet[Object]) */ -void VIRTUAL_poset__POSetElement__poset_61d(val* self, val* p0) { -poset__POSetElement__poset_61d(self, p0); -RET_LABEL:; +{ +var19 = standard___standard__HashSet___standard__abstract_collection__Collection__length(var16); } -/* method poset#POSetElement#element for (self: POSetElement[Object]): Object */ -val* poset__POSetElement__element(val* self) { -val* var /* : Object */; -val* var1 /* : Object */; -var1 = self->attrs[COLOR_poset__POSetElement___64delement].val; /* @element on */ -if (var1 == NULL) { -fprintf(stderr, "Runtime error: %s", "Uninitialized attribute @element"); -fprintf(stderr, " (%s:%d)\n", "lib/poset.nit", 184); -exit(1); +{ +{ /* Inline poset#POSetElement#tos (var_be) on */ +var22 = var_be->attrs[COLOR_poset__POSetElement___tos].val; /* _tos on */ +if (unlikely(var22 == NULL)) { +PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _tos"); +PRINT_ERROR(" (%s:%d)\n", FILE_poset, 406); +fatal_exit(1); } -var = var1; -RET_LABEL:; -return var; +var20 = var22; +RET_LABEL21:(void)0; } -/* method poset#POSetElement#element for (self: Object): Object */ -val* VIRTUAL_poset__POSetElement__element(val* self) { -val* var /* : Object */; -val* var1 /* : Object */; -var1 = poset__POSetElement__element(self); -var = var1; -RET_LABEL:; -return var; } -/* method poset#POSetElement#element= for (self: POSetElement[Object], Object) */ -void poset__POSetElement__element_61d(val* self, val* p0) { -short int var /* : Bool */; -int cltype; -int idtype; -const struct type* type_struct; -const char* var_class_name; -/* Covariant cast for argument 0 (element) isa POSetElement#0 */ -/* isa POSetElement#0 */ -type_struct = self->type->resolution_table->types[COLOR_poset__POSetElement_FT0]; -cltype = type_struct->color; -idtype = type_struct->id; -if(cltype >= p0->type->table_size) { -var = 0; +{ +var23 = standard___standard__HashSet___standard__abstract_collection__Collection__length(var20); +} +{ +var24 = standard___standard__Int___Comparable___60d_61d_62d(var19, var23); +} +var_res = var24; +{ +{ /* Inline kernel#Int#!= (var_res,0l) on */ +var27 = var_res == 0l; +var28 = !var27; +var25 = var28; +goto RET_LABEL26; +RET_LABEL26:(void)0; +} +} +if (var25){ +var = var_res; +goto RET_LABEL; } else { -var = p0->type->type_table[cltype] == idtype; } -if (!var) { -var_class_name = p0 == NULL ? "null" : p0->type->name; -fprintf(stderr, "Runtime error: Cast failed. Expected `%s`, got `%s`", "POSetElement#0", var_class_name); -fprintf(stderr, " (%s:%d)\n", "lib/poset.nit", 184); -exit(1); +{ +{ /* Inline poset#POSet#elements (self) on */ +var31 = self->attrs[COLOR_poset__POSet___elements].val; /* _elements on */ +if (unlikely(var31 == NULL)) { +PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _elements"); +PRINT_ERROR(" (%s:%d)\n", FILE_poset, 82); +fatal_exit(1); } -self->attrs[COLOR_poset__POSetElement___64delement].val = p0; /* @element on */ -RET_LABEL:; +var29 = var31; +RET_LABEL30:(void)0; } -/* method poset#POSetElement#element= for (self: Object, Object) */ -void VIRTUAL_poset__POSetElement__element_61d(val* self, val* p0) { -poset__POSetElement__element_61d(self, p0); -RET_LABEL:; } -/* method poset#POSetElement#tos for (self: POSetElement[Object]): HashSet[Object] */ -val* poset__POSetElement__tos(val* self) { -val* var /* : HashSet[Object] */; -val* var1 /* : HashSet[Object] */; -var1 = self->attrs[COLOR_poset__POSetElement___64dtos].val; /* @tos on */ -if (var1 == NULL) { -fprintf(stderr, "Runtime error: %s", "Uninitialized attribute @tos"); -fprintf(stderr, " (%s:%d)\n", "lib/poset.nit", 187); -exit(1); +{ +var32 = standard___standard__HashMap___standard__abstract_collection__MapRead___91d_93d(var29, var_a); } -var = var1; -RET_LABEL:; -return var; +{ +{ /* Inline poset#POSetElement#count (var32) on */ +var35 = var32->attrs[COLOR_poset__POSetElement___count].l; /* _count on */ +var33 = var35; +RET_LABEL34:(void)0; } -/* method poset#POSetElement#tos for (self: Object): HashSet[Object] */ -val* VIRTUAL_poset__POSetElement__tos(val* self) { -val* var /* : HashSet[Object] */; -val* var1 /* : HashSet[Object] */; -var1 = poset__POSetElement__tos(self); -var = var1; -RET_LABEL:; -return var; } -/* method poset#POSetElement#tos= for (self: POSetElement[Object], HashSet[Object]) */ -void poset__POSetElement__tos_61d(val* self, val* p0) { -short int var /* : Bool */; -int cltype; -int idtype; -const struct type* type_struct; -const char* var_class_name; -/* Covariant cast for argument 0 (tos) isa HashSet[POSetElement#0] */ -/* isa HashSet[POSetElement#0] */ -type_struct = self->type->resolution_table->types[COLOR_hash_collection__HashSetposet__POSetElement_FT0]; -cltype = type_struct->color; -idtype = type_struct->id; -if(cltype >= p0->type->table_size) { -var = 0; -} else { -var = p0->type->type_table[cltype] == idtype; +{ +{ /* Inline poset#POSet#elements (self) on */ +var38 = self->attrs[COLOR_poset__POSet___elements].val; /* _elements on */ +if (unlikely(var38 == NULL)) { +PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _elements"); +PRINT_ERROR(" (%s:%d)\n", FILE_poset, 82); +fatal_exit(1); } -if (!var) { -var_class_name = p0 == NULL ? "null" : p0->type->name; -fprintf(stderr, "Runtime error: Cast failed. Expected `%s`, got `%s`", "HashSet[POSetElement#0]", var_class_name); -fprintf(stderr, " (%s:%d)\n", "lib/poset.nit", 187); -exit(1); +var36 = var38; +RET_LABEL37:(void)0; } -self->attrs[COLOR_poset__POSetElement___64dtos].val = p0; /* @tos on */ -RET_LABEL:; } -/* method poset#POSetElement#tos= for (self: Object, HashSet[Object]) */ -void VIRTUAL_poset__POSetElement__tos_61d(val* self, val* p0) { -poset__POSetElement__tos_61d(self, p0); -RET_LABEL:; +{ +var39 = standard___standard__HashMap___standard__abstract_collection__MapRead___91d_93d(var36, var_b); } -/* method poset#POSetElement#froms for (self: POSetElement[Object]): HashSet[Object] */ -val* poset__POSetElement__froms(val* self) { -val* var /* : HashSet[Object] */; -val* var1 /* : HashSet[Object] */; -var1 = self->attrs[COLOR_poset__POSetElement___64dfroms].val; /* @froms on */ -if (var1 == NULL) { -fprintf(stderr, "Runtime error: %s", "Uninitialized attribute @froms"); -fprintf(stderr, " (%s:%d)\n", "lib/poset.nit", 188); -exit(1); +{ +{ /* Inline poset#POSetElement#count (var39) on */ +var42 = var39->attrs[COLOR_poset__POSetElement___count].l; /* _count on */ +var40 = var42; +RET_LABEL41:(void)0; } -var = var1; -RET_LABEL:; -return var; } -/* method poset#POSetElement#froms for (self: Object): HashSet[Object] */ -val* VIRTUAL_poset__POSetElement__froms(val* self) { -val* var /* : HashSet[Object] */; -val* var1 /* : HashSet[Object] */; -var1 = poset__POSetElement__froms(self); -var = var1; +{ +var43 = standard___standard__Int___Comparable___60d_61d_62d(var33, var40); +} +var = var43; +goto RET_LABEL; RET_LABEL:; return var; } -/* method poset#POSetElement#froms= for (self: POSetElement[Object], HashSet[Object]) */ -void poset__POSetElement__froms_61d(val* self, val* p0) { -short int var /* : Bool */; +/* method poset#POSet#linearize for (self: POSet[nullable Object], Collection[nullable Object]): Array[nullable Object] */ +val* poset___poset__POSet___linearize(val* self, val* p0) { +val* var /* : Array[nullable Object] */; +short int var1 /* : Bool */; int cltype; int idtype; const struct type* type_struct; const char* var_class_name; -/* Covariant cast for argument 0 (froms) isa HashSet[POSetElement#0] */ -/* isa HashSet[POSetElement#0] */ -type_struct = self->type->resolution_table->types[COLOR_hash_collection__HashSetposet__POSetElement_FT0]; +val* var_elements /* var elements: Collection[nullable Object] */; +val* var2 /* : Array[nullable Object] */; +val* var_lin /* var lin: Array[nullable Object] */; +/* Covariant cast for argument 0 (elements) isa Collection[E] */ +/* isa Collection[E] */ +type_struct = self->type->resolution_table->types[COLOR_standard__Collection__poset__POSet___35dE]; cltype = type_struct->color; idtype = type_struct->id; -if(cltype >= p0->type->table_size) { -var = 0; +if(cltype >= (((long)p0&3)?type_info[((long)p0&3)]:p0->type)->table_size) { +var1 = 0; } else { -var = p0->type->type_table[cltype] == idtype; -} -if (!var) { -var_class_name = p0 == NULL ? "null" : p0->type->name; -fprintf(stderr, "Runtime error: Cast failed. Expected `%s`, got `%s`", "HashSet[POSetElement#0]", var_class_name); -fprintf(stderr, " (%s:%d)\n", "lib/poset.nit", 188); -exit(1); +var1 = (((long)p0&3)?type_info[((long)p0&3)]:p0->type)->type_table[cltype] == idtype; } -self->attrs[COLOR_poset__POSetElement___64dfroms].val = p0; /* @froms on */ -RET_LABEL:; +if (unlikely(!var1)) { +var_class_name = p0 == NULL ? "null" : (((long)p0&3)?type_info[((long)p0&3)]:p0->type)->name; +PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "Collection[E]", var_class_name); +PRINT_ERROR(" (%s:%d)\n", FILE_poset, 370); +fatal_exit(1); } -/* method poset#POSetElement#froms= for (self: Object, HashSet[Object]) */ -void VIRTUAL_poset__POSetElement__froms_61d(val* self, val* p0) { -poset__POSetElement__froms_61d(self, p0); -RET_LABEL:; +var_elements = p0; +{ +var2 = ((val*(*)(val* self))((((long)var_elements&3)?class_info[((long)var_elements&3)]:var_elements->class)->vft[COLOR_standard__array__Collection__to_a]))(var_elements); /* to_a on */ } -/* method poset#POSetElement#dtos for (self: POSetElement[Object]): HashSet[Object] */ -val* poset__POSetElement__dtos(val* self) { -val* var /* : HashSet[Object] */; -val* var1 /* : HashSet[Object] */; -var1 = self->attrs[COLOR_poset__POSetElement___64ddtos].val; /* @dtos on */ -if (var1 == NULL) { -fprintf(stderr, "Runtime error: %s", "Uninitialized attribute @dtos"); -fprintf(stderr, " (%s:%d)\n", "lib/poset.nit", 189); -exit(1); +var_lin = var2; +{ +standard___standard__Comparator___sort(self, var_lin); /* Direct call sorter#Comparator#sort on */ } -var = var1; +var = var_lin; +goto RET_LABEL; RET_LABEL:; return var; } -/* method poset#POSetElement#dtos for (self: Object): HashSet[Object] */ -val* VIRTUAL_poset__POSetElement__dtos(val* self) { -val* var /* : HashSet[Object] */; -val* var1 /* : HashSet[Object] */; -var1 = poset__POSetElement__dtos(self); +/* method poset#POSetElement#poset for (self: POSetElement[nullable Object]): POSet[nullable Object] */ +val* poset___poset__POSetElement___poset(val* self) { +val* var /* : POSet[nullable Object] */; +val* var1 /* : POSet[nullable Object] */; +var1 = self->attrs[COLOR_poset__POSetElement___poset].val; /* _poset on */ +if (unlikely(var1 == NULL)) { +PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _poset"); +PRINT_ERROR(" (%s:%d)\n", FILE_poset, 400); +fatal_exit(1); +} var = var1; RET_LABEL:; return var; } -/* method poset#POSetElement#dtos= for (self: POSetElement[Object], HashSet[Object]) */ -void poset__POSetElement__dtos_61d(val* self, val* p0) { +/* method poset#POSetElement#poset= for (self: POSetElement[nullable Object], POSet[nullable Object]) */ +void poset___poset__POSetElement___poset_61d(val* self, val* p0) { short int var /* : Bool */; int cltype; int idtype; const struct type* type_struct; const char* var_class_name; -/* Covariant cast for argument 0 (dtos) isa HashSet[POSetElement#0] */ -/* isa HashSet[POSetElement#0] */ -type_struct = self->type->resolution_table->types[COLOR_hash_collection__HashSetposet__POSetElement_FT0]; +/* Covariant cast for argument 0 (poset) isa POSet[E] */ +/* isa POSet[E] */ +type_struct = self->type->resolution_table->types[COLOR_poset__POSet__poset__POSetElement___35dE]; cltype = type_struct->color; idtype = type_struct->id; if(cltype >= p0->type->table_size) { @@ -1312,329 +1471,331 @@ var = 0; } else { var = p0->type->type_table[cltype] == idtype; } -if (!var) { +if (unlikely(!var)) { var_class_name = p0 == NULL ? "null" : p0->type->name; -fprintf(stderr, "Runtime error: Cast failed. Expected `%s`, got `%s`", "HashSet[POSetElement#0]", var_class_name); -fprintf(stderr, " (%s:%d)\n", "lib/poset.nit", 189); -exit(1); -} -self->attrs[COLOR_poset__POSetElement___64ddtos].val = p0; /* @dtos on */ -RET_LABEL:; +PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "POSet[E]", var_class_name); +PRINT_ERROR(" (%s:%d)\n", FILE_poset, 400); +fatal_exit(1); } -/* method poset#POSetElement#dtos= for (self: Object, HashSet[Object]) */ -void VIRTUAL_poset__POSetElement__dtos_61d(val* self, val* p0) { -poset__POSetElement__dtos_61d(self, p0); +self->attrs[COLOR_poset__POSetElement___poset].val = p0; /* _poset on */ RET_LABEL:; } -/* method poset#POSetElement#dfroms for (self: POSetElement[Object]): HashSet[Object] */ -val* poset__POSetElement__dfroms(val* self) { -val* var /* : HashSet[Object] */; -val* var1 /* : HashSet[Object] */; -var1 = self->attrs[COLOR_poset__POSetElement___64ddfroms].val; /* @dfroms on */ -if (var1 == NULL) { -fprintf(stderr, "Runtime error: %s", "Uninitialized attribute @dfroms"); -fprintf(stderr, " (%s:%d)\n", "lib/poset.nit", 190); -exit(1); -} -var = var1; -RET_LABEL:; -return var; -} -/* method poset#POSetElement#dfroms for (self: Object): HashSet[Object] */ -val* VIRTUAL_poset__POSetElement__dfroms(val* self) { -val* var /* : HashSet[Object] */; -val* var1 /* : HashSet[Object] */; -var1 = poset__POSetElement__dfroms(self); +/* method poset#POSetElement#element for (self: POSetElement[nullable Object]): nullable Object */ +val* poset___poset__POSetElement___element(val* self) { +val* var /* : nullable Object */; +val* var1 /* : nullable Object */; +var1 = self->attrs[COLOR_poset__POSetElement___element].val; /* _element on */ var = var1; RET_LABEL:; return var; } -/* method poset#POSetElement#dfroms= for (self: POSetElement[Object], HashSet[Object]) */ -void poset__POSetElement__dfroms_61d(val* self, val* p0) { +/* method poset#POSetElement#element= for (self: POSetElement[nullable Object], nullable Object) */ +void poset___poset__POSetElement___element_61d(val* self, val* p0) { short int var /* : Bool */; int cltype; int idtype; const struct type* type_struct; +short int is_nullable; const char* var_class_name; -/* Covariant cast for argument 0 (dfroms) isa HashSet[POSetElement#0] */ -/* isa HashSet[POSetElement#0] */ -type_struct = self->type->resolution_table->types[COLOR_hash_collection__HashSetposet__POSetElement_FT0]; +/* Covariant cast for argument 0 (element) isa E */ +/* isa E */ +type_struct = self->type->resolution_table->types[COLOR_poset__POSetElement___35dE]; cltype = type_struct->color; idtype = type_struct->id; -if(cltype >= p0->type->table_size) { +is_nullable = type_struct->is_nullable; +if(p0 == NULL) { +var = is_nullable; +} else { +if(cltype >= (((long)p0&3)?type_info[((long)p0&3)]:p0->type)->table_size) { var = 0; } else { -var = p0->type->type_table[cltype] == idtype; +var = (((long)p0&3)?type_info[((long)p0&3)]:p0->type)->type_table[cltype] == idtype; } -if (!var) { -var_class_name = p0 == NULL ? "null" : p0->type->name; -fprintf(stderr, "Runtime error: Cast failed. Expected `%s`, got `%s`", "HashSet[POSetElement#0]", var_class_name); -fprintf(stderr, " (%s:%d)\n", "lib/poset.nit", 190); -exit(1); } -self->attrs[COLOR_poset__POSetElement___64ddfroms].val = p0; /* @dfroms on */ -RET_LABEL:; +if (unlikely(!var)) { +var_class_name = p0 == NULL ? "null" : (((long)p0&3)?type_info[((long)p0&3)]:p0->type)->name; +PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "E", var_class_name); +PRINT_ERROR(" (%s:%d)\n", FILE_poset, 403); +fatal_exit(1); } -/* method poset#POSetElement#dfroms= for (self: Object, HashSet[Object]) */ -void VIRTUAL_poset__POSetElement__dfroms_61d(val* self, val* p0) { -poset__POSetElement__dfroms_61d(self, p0); +self->attrs[COLOR_poset__POSetElement___element].val = p0; /* _element on */ RET_LABEL:; } -/* method poset#POSetElement#count for (self: POSetElement[Object]): Int */ -long poset__POSetElement__count(val* self) { -long var /* : Int */; -long var1 /* : Int */; -var1 = self->attrs[COLOR_poset__POSetElement___64dcount].l; /* @count on */ +/* method poset#POSetElement#tos for (self: POSetElement[nullable Object]): HashSet[nullable Object] */ +val* poset___poset__POSetElement___tos(val* self) { +val* var /* : HashSet[nullable Object] */; +val* var1 /* : HashSet[nullable Object] */; +var1 = self->attrs[COLOR_poset__POSetElement___tos].val; /* _tos on */ +if (unlikely(var1 == NULL)) { +PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _tos"); +PRINT_ERROR(" (%s:%d)\n", FILE_poset, 406); +fatal_exit(1); +} var = var1; RET_LABEL:; return var; } -/* method poset#POSetElement#count for (self: Object): Int */ -long VIRTUAL_poset__POSetElement__count(val* self) { -long var /* : Int */; -long var1 /* : Int */; -var1 = poset__POSetElement__count(self); +/* method poset#POSetElement#froms for (self: POSetElement[nullable Object]): HashSet[nullable Object] */ +val* poset___poset__POSetElement___froms(val* self) { +val* var /* : HashSet[nullable Object] */; +val* var1 /* : HashSet[nullable Object] */; +var1 = self->attrs[COLOR_poset__POSetElement___froms].val; /* _froms on */ +if (unlikely(var1 == NULL)) { +PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _froms"); +PRINT_ERROR(" (%s:%d)\n", FILE_poset, 407); +fatal_exit(1); +} var = var1; RET_LABEL:; return var; } -/* method poset#POSetElement#count= for (self: POSetElement[Object], Int) */ -void poset__POSetElement__count_61d(val* self, long p0) { -self->attrs[COLOR_poset__POSetElement___64dcount].l = p0; /* @count on */ -RET_LABEL:; -} -/* method poset#POSetElement#count= for (self: Object, Int) */ -void VIRTUAL_poset__POSetElement__count_61d(val* self, long p0) { -poset__POSetElement__count_61d(self, p0); -RET_LABEL:; +/* method poset#POSetElement#dtos for (self: POSetElement[nullable Object]): HashSet[nullable Object] */ +val* poset___poset__POSetElement___dtos(val* self) { +val* var /* : HashSet[nullable Object] */; +val* var1 /* : HashSet[nullable Object] */; +var1 = self->attrs[COLOR_poset__POSetElement___dtos].val; /* _dtos on */ +if (unlikely(var1 == NULL)) { +PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _dtos"); +PRINT_ERROR(" (%s:%d)\n", FILE_poset, 408); +fatal_exit(1); } -/* method poset#POSetElement#greaters for (self: POSetElement[Object]): Collection[Object] */ -val* poset__POSetElement__greaters(val* self) { -val* var /* : Collection[Object] */; -val* var1 /* : HashSet[Object] */; -var1 = ((val* (*)(val*))(self->class->vft[COLOR_poset__POSetElement__tos]))(self) /* tos on */; var = var1; -goto RET_LABEL; RET_LABEL:; return var; } -/* method poset#POSetElement#greaters for (self: Object): Collection[Object] */ -val* VIRTUAL_poset__POSetElement__greaters(val* self) { -val* var /* : Collection[Object] */; -val* var1 /* : Collection[Object] */; -var1 = poset__POSetElement__greaters(self); +/* method poset#POSetElement#dfroms for (self: POSetElement[nullable Object]): HashSet[nullable Object] */ +val* poset___poset__POSetElement___dfroms(val* self) { +val* var /* : HashSet[nullable Object] */; +val* var1 /* : HashSet[nullable Object] */; +var1 = self->attrs[COLOR_poset__POSetElement___dfroms].val; /* _dfroms on */ +if (unlikely(var1 == NULL)) { +PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _dfroms"); +PRINT_ERROR(" (%s:%d)\n", FILE_poset, 409); +fatal_exit(1); +} var = var1; RET_LABEL:; return var; } -/* method poset#POSetElement#direct_greaters for (self: POSetElement[Object]): Collection[Object] */ -val* poset__POSetElement__direct_greaters(val* self) { -val* var /* : Collection[Object] */; -val* var1 /* : HashSet[Object] */; -var1 = ((val* (*)(val*))(self->class->vft[COLOR_poset__POSetElement__dtos]))(self) /* dtos on */; +/* method poset#POSetElement#count for (self: POSetElement[nullable Object]): Int */ +long poset___poset__POSetElement___count(val* self) { +long var /* : Int */; +long var1 /* : Int */; +var1 = self->attrs[COLOR_poset__POSetElement___count].l; /* _count on */ var = var1; -goto RET_LABEL; RET_LABEL:; return var; } -/* method poset#POSetElement#direct_greaters for (self: Object): Collection[Object] */ -val* VIRTUAL_poset__POSetElement__direct_greaters(val* self) { -val* var /* : Collection[Object] */; -val* var1 /* : Collection[Object] */; -var1 = poset__POSetElement__direct_greaters(self); -var = var1; +/* method poset#POSetElement#count= for (self: POSetElement[nullable Object], Int) */ +void poset___poset__POSetElement___count_61d(val* self, long p0) { +self->attrs[COLOR_poset__POSetElement___count].l = p0; /* _count on */ RET_LABEL:; -return var; } -/* method poset#POSetElement#smallers for (self: POSetElement[Object]): Collection[Object] */ -val* poset__POSetElement__smallers(val* self) { -val* var /* : Collection[Object] */; -val* var1 /* : HashSet[Object] */; -var1 = ((val* (*)(val*))(self->class->vft[COLOR_poset__POSetElement__froms]))(self) /* froms on */; +/* method poset#POSetElement#greaters for (self: POSetElement[nullable Object]): Collection[nullable Object] */ +val* poset___poset__POSetElement___greaters(val* self) { +val* var /* : Collection[nullable Object] */; +val* var1 /* : HashSet[nullable Object] */; +val* var3 /* : HashSet[nullable Object] */; +{ +{ /* Inline poset#POSetElement#tos (self) on */ +var3 = self->attrs[COLOR_poset__POSetElement___tos].val; /* _tos on */ +if (unlikely(var3 == NULL)) { +PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _tos"); +PRINT_ERROR(" (%s:%d)\n", FILE_poset, 406); +fatal_exit(1); +} +var1 = var3; +RET_LABEL2:(void)0; +} +} var = var1; goto RET_LABEL; RET_LABEL:; return var; } -/* method poset#POSetElement#smallers for (self: Object): Collection[Object] */ -val* VIRTUAL_poset__POSetElement__smallers(val* self) { -val* var /* : Collection[Object] */; -val* var1 /* : Collection[Object] */; -var1 = poset__POSetElement__smallers(self); -var = var1; -RET_LABEL:; -return var; +/* method poset#POSetElement#direct_greaters for (self: POSetElement[nullable Object]): Collection[nullable Object] */ +val* poset___poset__POSetElement___direct_greaters(val* self) { +val* var /* : Collection[nullable Object] */; +val* var1 /* : HashSet[nullable Object] */; +val* var3 /* : HashSet[nullable Object] */; +{ +{ /* Inline poset#POSetElement#dtos (self) on */ +var3 = self->attrs[COLOR_poset__POSetElement___dtos].val; /* _dtos on */ +if (unlikely(var3 == NULL)) { +PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _dtos"); +PRINT_ERROR(" (%s:%d)\n", FILE_poset, 408); +fatal_exit(1); +} +var1 = var3; +RET_LABEL2:(void)0; +} } -/* method poset#POSetElement#direct_smallers for (self: POSetElement[Object]): Collection[Object] */ -val* poset__POSetElement__direct_smallers(val* self) { -val* var /* : Collection[Object] */; -val* var1 /* : HashSet[Object] */; -var1 = ((val* (*)(val*))(self->class->vft[COLOR_poset__POSetElement__dfroms]))(self) /* dfroms on */; var = var1; goto RET_LABEL; RET_LABEL:; return var; } -/* method poset#POSetElement#direct_smallers for (self: Object): Collection[Object] */ -val* VIRTUAL_poset__POSetElement__direct_smallers(val* self) { -val* var /* : Collection[Object] */; -val* var1 /* : Collection[Object] */; -var1 = poset__POSetElement__direct_smallers(self); +/* method poset#POSetElement#direct_smallers for (self: POSetElement[nullable Object]): Collection[nullable Object] */ +val* poset___poset__POSetElement___direct_smallers(val* self) { +val* var /* : Collection[nullable Object] */; +val* var1 /* : HashSet[nullable Object] */; +val* var3 /* : HashSet[nullable Object] */; +{ +{ /* Inline poset#POSetElement#dfroms (self) on */ +var3 = self->attrs[COLOR_poset__POSetElement___dfroms].val; /* _dfroms on */ +if (unlikely(var3 == NULL)) { +PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _dfroms"); +PRINT_ERROR(" (%s:%d)\n", FILE_poset, 409); +fatal_exit(1); +} +var1 = var3; +RET_LABEL2:(void)0; +} +} var = var1; +goto RET_LABEL; RET_LABEL:; return var; } -/* method poset#POSetElement#<= for (self: POSetElement[Object], Object): Bool */ -short int poset__POSetElement___60d_61d(val* self, val* p0) { +/* method poset#POSetElement#<= for (self: POSetElement[nullable Object], nullable Object): Bool */ +short int poset___poset__POSetElement____60d_61d(val* self, val* p0) { short int var /* : Bool */; short int var1 /* : Bool */; int cltype; int idtype; const struct type* type_struct; +short int is_nullable; const char* var_class_name; -val* var_t /* var t: Object */; -val* var2 /* : HashSet[Object] */; -short int var3 /* : Bool */; -/* Covariant cast for argument 0 (t) isa POSetElement#0 */ -/* isa POSetElement#0 */ -type_struct = self->type->resolution_table->types[COLOR_poset__POSetElement_FT0]; +val* var_t /* var t: nullable Object */; +val* var2 /* : HashSet[nullable Object] */; +val* var4 /* : HashSet[nullable Object] */; +short int var5 /* : Bool */; +/* Covariant cast for argument 0 (t) isa E */ +/* isa E */ +type_struct = self->type->resolution_table->types[COLOR_poset__POSetElement___35dE]; cltype = type_struct->color; idtype = type_struct->id; -if(cltype >= p0->type->table_size) { +is_nullable = type_struct->is_nullable; +if(p0 == NULL) { +var1 = is_nullable; +} else { +if(cltype >= (((long)p0&3)?type_info[((long)p0&3)]:p0->type)->table_size) { var1 = 0; } else { -var1 = p0->type->type_table[cltype] == idtype; +var1 = (((long)p0&3)?type_info[((long)p0&3)]:p0->type)->type_table[cltype] == idtype; } -if (!var1) { -var_class_name = p0 == NULL ? "null" : p0->type->name; -fprintf(stderr, "Runtime error: Cast failed. Expected `%s`, got `%s`", "POSetElement#0", var_class_name); -fprintf(stderr, " (%s:%d)\n", "lib/poset.nit", 222); -exit(1); +} +if (unlikely(!var1)) { +var_class_name = p0 == NULL ? "null" : (((long)p0&3)?type_info[((long)p0&3)]:p0->type)->name; +PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "E", var_class_name); +PRINT_ERROR(" (%s:%d)\n", FILE_poset, 465); +fatal_exit(1); } var_t = p0; -var2 = ((val* (*)(val*))(self->class->vft[COLOR_poset__POSetElement__tos]))(self) /* tos on */; -var3 = ((short int (*)(val*, val*))(var2->class->vft[COLOR_abstract_collection__Collection__has]))(var2, var_t) /* has on */; -var = var3; -goto RET_LABEL; -RET_LABEL:; -return var; +{ +{ /* Inline poset#POSetElement#tos (self) on */ +var4 = self->attrs[COLOR_poset__POSetElement___tos].val; /* _tos on */ +if (unlikely(var4 == NULL)) { +PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _tos"); +PRINT_ERROR(" (%s:%d)\n", FILE_poset, 406); +fatal_exit(1); } -/* method poset#POSetElement#<= for (self: Object, Object): Bool */ -short int VIRTUAL_poset__POSetElement___60d_61d(val* self, val* p0) { -short int var /* : Bool */; -short int var1 /* : Bool */; -var1 = poset__POSetElement___60d_61d(self, p0); -var = var1; +var2 = var4; +RET_LABEL3:(void)0; +} +} +{ +var5 = standard___standard__HashSet___standard__abstract_collection__Collection__has(var2, var_t); +} +var = var5; +goto RET_LABEL; RET_LABEL:; return var; } -/* method poset#POSetElement#< for (self: POSetElement[Object], Object): Bool */ -short int poset__POSetElement___60d(val* self, val* p0) { +/* method poset#POSetElement#< for (self: POSetElement[nullable Object], nullable Object): Bool */ +short int poset___poset__POSetElement____60d(val* self, val* p0) { short int var /* : Bool */; short int var1 /* : Bool */; int cltype; int idtype; const struct type* type_struct; +short int is_nullable; const char* var_class_name; -val* var_t /* var t: Object */; +val* var_t /* var t: nullable Object */; short int var2 /* : Bool */; -val* var3 /* : Object */; -short int var4 /* : Bool */; -short int var_ /* var : Bool */; -val* var5 /* : HashSet[Object] */; +val* var3 /* : nullable Object */; +val* var5 /* : nullable Object */; short int var6 /* : Bool */; -/* Covariant cast for argument 0 (t) isa POSetElement#0 */ -/* isa POSetElement#0 */ -type_struct = self->type->resolution_table->types[COLOR_poset__POSetElement_FT0]; +short int var7 /* : Bool */; +short int var_ /* var : Bool */; +val* var8 /* : HashSet[nullable Object] */; +val* var10 /* : HashSet[nullable Object] */; +short int var11 /* : Bool */; +/* Covariant cast for argument 0 (t) isa E */ +/* isa E */ +type_struct = self->type->resolution_table->types[COLOR_poset__POSetElement___35dE]; cltype = type_struct->color; idtype = type_struct->id; -if(cltype >= p0->type->table_size) { +is_nullable = type_struct->is_nullable; +if(p0 == NULL) { +var1 = is_nullable; +} else { +if(cltype >= (((long)p0&3)?type_info[((long)p0&3)]:p0->type)->table_size) { var1 = 0; } else { -var1 = p0->type->type_table[cltype] == idtype; +var1 = (((long)p0&3)?type_info[((long)p0&3)]:p0->type)->type_table[cltype] == idtype; } -if (!var1) { -var_class_name = p0 == NULL ? "null" : p0->type->name; -fprintf(stderr, "Runtime error: Cast failed. Expected `%s`, got `%s`", "POSetElement#0", var_class_name); -fprintf(stderr, " (%s:%d)\n", "lib/poset.nit", 228); -exit(1); +} +if (unlikely(!var1)) { +var_class_name = p0 == NULL ? "null" : (((long)p0&3)?type_info[((long)p0&3)]:p0->type)->name; +PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "E", var_class_name); +PRINT_ERROR(" (%s:%d)\n", FILE_poset, 480); +fatal_exit(1); } var_t = p0; -var3 = ((val* (*)(val*))(self->class->vft[COLOR_poset__POSetElement__element]))(self) /* element on */; -var4 = ((short int (*)(val*, val*))(var_t->class->vft[COLOR_kernel__Object___33d_61d]))(var_t, var3) /* != on */; -var_ = var4; -if (var4){ -var5 = ((val* (*)(val*))(self->class->vft[COLOR_poset__POSetElement__tos]))(self) /* tos on */; -var6 = ((short int (*)(val*, val*))(var5->class->vft[COLOR_abstract_collection__Collection__has]))(var5, var_t) /* has on */; -var2 = var6; +{ +{ /* Inline poset#POSetElement#element (self) on */ +var5 = self->attrs[COLOR_poset__POSetElement___element].val; /* _element on */ +var3 = var5; +RET_LABEL4:(void)0; +} +} +if (var_t == NULL) { +var6 = (var3 != NULL); } else { -var2 = var_; +var7 = ((short int(*)(val* self, val* p0))((((long)var_t&3)?class_info[((long)var_t&3)]:var_t->class)->vft[COLOR_standard__kernel__Object___33d_61d]))(var_t, var3); /* != on */ +var6 = var7; } -var = var2; -goto RET_LABEL; -RET_LABEL:; -return var; +var_ = var6; +if (var6){ +{ +{ /* Inline poset#POSetElement#tos (self) on */ +var10 = self->attrs[COLOR_poset__POSetElement___tos].val; /* _tos on */ +if (unlikely(var10 == NULL)) { +PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _tos"); +PRINT_ERROR(" (%s:%d)\n", FILE_poset, 406); +fatal_exit(1); } -/* method poset#POSetElement#< for (self: Object, Object): Bool */ -short int VIRTUAL_poset__POSetElement___60d(val* self, val* p0) { -short int var /* : Bool */; -short int var1 /* : Bool */; -var1 = poset__POSetElement___60d(self, p0); -var = var1; -RET_LABEL:; -return var; +var8 = var10; +RET_LABEL9:(void)0; } -/* method poset#POSetElement#init for (self: POSetElement[Object], POSet[Object], Object, Int) */ -void poset__POSetElement__init(val* self, val* p0, val* p1, long p2) { -short int var /* : Bool */; -int cltype; -int idtype; -const struct type* type_struct; -const char* var_class_name; -short int var1 /* : Bool */; -int cltype2; -int idtype3; -const struct type* type_struct4; -const char* var_class_name5; -/* Covariant cast for argument 0 (poset) isa POSet[POSetElement#0] */ -/* isa POSet[POSetElement#0] */ -type_struct = self->type->resolution_table->types[COLOR_poset__POSetposet__POSetElement_FT0]; -cltype = type_struct->color; -idtype = type_struct->id; -if(cltype >= p0->type->table_size) { -var = 0; -} else { -var = p0->type->type_table[cltype] == idtype; } -if (!var) { -var_class_name = p0 == NULL ? "null" : p0->type->name; -fprintf(stderr, "Runtime error: Cast failed. Expected `%s`, got `%s`", "POSet[POSetElement#0]", var_class_name); -fprintf(stderr, " (%s:%d)\n", "lib/poset.nit", 168); -exit(1); +{ +var11 = standard___standard__HashSet___standard__abstract_collection__Collection__has(var8, var_t); } -/* Covariant cast for argument 1 (element) isa POSetElement#0 */ -/* isa POSetElement#0 */ -type_struct4 = self->type->resolution_table->types[COLOR_poset__POSetElement_FT0]; -cltype2 = type_struct4->color; -idtype3 = type_struct4->id; -if(cltype2 >= p1->type->table_size) { -var1 = 0; +var2 = var11; } else { -var1 = p1->type->type_table[cltype2] == idtype3; -} -if (!var1) { -var_class_name5 = p1 == NULL ? "null" : p1->type->name; -fprintf(stderr, "Runtime error: Cast failed. Expected `%s`, got `%s`", "POSetElement#0", var_class_name5); -fprintf(stderr, " (%s:%d)\n", "lib/poset.nit", 168); -exit(1); +var2 = var_; } -self->attrs[COLOR_poset__POSetElement___64dposet].val = p0; /* @poset on */ -self->attrs[COLOR_poset__POSetElement___64delement].val = p1; /* @element on */ -self->attrs[COLOR_poset__POSetElement___64dcount].l = p2; /* @count on */ +var = var2; +goto RET_LABEL; RET_LABEL:; +return var; +} +/* method poset#POSetElement#init for (self: POSetElement[nullable Object]) */ +void poset___poset__POSetElement___standard__kernel__Object__init(val* self) { +{ +((void(*)(val* self))(self->class->vft[COLOR_poset___poset__POSetElement___standard__kernel__Object__init]))(self); /* init on */ } -/* method poset#POSetElement#init for (self: Object, POSet[Object], Object, Int) */ -void VIRTUAL_poset__POSetElement__init(val* self, val* p0, val* p1, long p2) { -poset__POSetElement__init(self, p0, p1, p2); RET_LABEL:; }