X-Git-Url: http://nitlanguage.org diff --git a/c_src/poset.sep.1.c b/c_src/poset.sep.1.c index ec3f4d8..597559e 100644 --- a/c_src/poset.sep.1.c +++ b/c_src/poset.sep.1.c @@ -1,1250 +1,2139 @@ #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___core__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)) { +if(catchStack.cursor >= 0){ +longjmp(catchStack.envs[catchStack.cursor], 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); -show_backtrace(1); +PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _elements"); +PRINT_ERROR(" (%s:%d)\n", FILE_poset, 86); +fatal_exit(1); } -var = var1; +var1 = var3; +RET_LABEL2:(void)0; +} +} +{ +var4 = core___core__HashMap___core__abstract_collection__MapRead__keys(var1); +} +{ +var5 = ((val*(*)(val* self))((((long)var4&3)?class_info[((long)var4&3)]:var4->class)->vft[COLOR_core__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)) { +if(catchStack.cursor >= 0){ +longjmp(catchStack.envs[catchStack.cursor], 1); +} +PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _elements"); +PRINT_ERROR(" (%s:%d)\n", FILE_poset, 86); +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___core__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; +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)) { +if(catchStack.cursor >= 0){ +longjmp(catchStack.envs[catchStack.cursor], 1); } -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); -show_backtrace(1); +PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _elements"); +PRINT_ERROR(" (%s:%d)\n", FILE_poset, 86); +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 = core___core__HashMap___core__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); -show_backtrace(1); +{ +var5 = ((short int(*)(val* self, val* p0))((((long)var4&3)?class_info[((long)var4&3)]:var4->class)->vft[COLOR_core__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); -show_backtrace(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, 91); +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)) { +if(catchStack.cursor >= 0){ +longjmp(catchStack.envs[catchStack.cursor], 1); +} +PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _elements"); +PRINT_ERROR(" (%s:%d)\n", FILE_poset, 86); +fatal_exit(1); +} +var2 = var4; +RET_LABEL3:(void)0; +} +} +{ +var5 = core___core__HashMap___core__abstract_collection__MapRead__keys(var2); +} +{ +var6 = ((short int(*)(val* self, val* p0))((((long)var5&3)?class_info[((long)var5&3)]:var5->class)->vft[COLOR_core__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)) { +if(catchStack.cursor >= 0){ +longjmp(catchStack.envs[catchStack.cursor], 1); +} +PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _elements"); +PRINT_ERROR(" (%s:%d)\n", FILE_poset, 86); +fatal_exit(1); +} +var7 = var9; +RET_LABEL8:(void)0; +} +} +{ +var10 = core___core__HashMap___core__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 */; -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)) { +if(catchStack.cursor >= 0){ +longjmp(catchStack.envs[catchStack.cursor], 1); +} +PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _elements"); +PRINT_ERROR(" (%s:%d)\n", FILE_poset, 86); +fatal_exit(1); +} +var12 = var14; +RET_LABEL13:(void)0; +} +} +{ +var15 = core___core__HashMap___core__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_core__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)) { +if(catchStack.cursor >= 0){ +longjmp(catchStack.envs[catchStack.cursor], 1); +} +PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _tos"); +PRINT_ERROR(" (%s:%d)\n", FILE_poset, 532); +fatal_exit(1); +} +var16 = var18; +RET_LABEL17:(void)0; +} +} +{ +core___core__HashSet___core__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)) { +if(catchStack.cursor >= 0){ +longjmp(catchStack.envs[catchStack.cursor], 1); +} +PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _froms"); +PRINT_ERROR(" (%s:%d)\n", FILE_poset, 533); +fatal_exit(1); +} +var19 = var21; +RET_LABEL20:(void)0; +} +} +{ +core___core__HashSet___core__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)) { +if(catchStack.cursor >= 0){ +longjmp(catchStack.envs[catchStack.cursor], 1); +} +PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _elements"); +PRINT_ERROR(" (%s:%d)\n", FILE_poset, 86); +fatal_exit(1); +} +var22 = var24; +RET_LABEL23:(void)0; +} +} +{ +core___core__HashMap___core__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); -show_backtrace(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, 105); +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); -show_backtrace(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)) { +if(catchStack.cursor >= 0){ +longjmp(catchStack.envs[catchStack.cursor], 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; +PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _elements"); +PRINT_ERROR(" (%s:%d)\n", FILE_poset, 86); +fatal_exit(1); +} +var2 = var4; +RET_LABEL3:(void)0; +} +} +{ +var5 = core___core__HashMap___core__abstract_collection__MapRead__keys(var2); +} +{ +var6 = ((short int(*)(val* self, val* p0))((((long)var5&3)?class_info[((long)var5&3)]:var5->class)->vft[COLOR_core__abstract_collection__Collection__has]))(var5, var_e); /* has on */ +} +if (unlikely(!var6)) { +if(catchStack.cursor >= 0){ +longjmp(catchStack.envs[catchStack.cursor], 1); +} +PRINT_ERROR("Runtime error: %s", "Assert failed"); +PRINT_ERROR(" (%s:%d)\n", FILE_poset, 119); +fatal_exit(1); +} +{ +{ /* Inline poset$POSet$elements (self) on */ +var9 = self->attrs[COLOR_poset__POSet___elements].val; /* _elements on */ +if (unlikely(var9 == NULL)) { +if(catchStack.cursor >= 0){ +longjmp(catchStack.envs[catchStack.cursor], 1); +} +PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _elements"); +PRINT_ERROR(" (%s:%d)\n", FILE_poset, 86); +fatal_exit(1); +} +var7 = var9; +RET_LABEL8:(void)0; +} +} +{ +var10 = core___core__HashMap___core__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* var32 /* : nullable Object */; +val* var_tt /* var tt: nullable Object */; +val* var33 /* : HashMap[nullable Object, POSetElement[nullable Object]] */; +val* var35 /* : HashMap[nullable Object, POSetElement[nullable Object]] */; +val* var36 /* : nullable Object */; +val* var_tte /* var tte: POSetElement[nullable Object] */; +val* var37 /* : HashSet[nullable Object] */; +val* var39 /* : HashSet[nullable Object] */; +val* var40 /* : HashSet[nullable Object] */; +val* var42 /* : 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* var55 /* : nullable Object */; +val* var_x /* var x: nullable Object */; +val* var56 /* : HashMap[nullable Object, POSetElement[nullable Object]] */; +val* var58 /* : HashMap[nullable Object, POSetElement[nullable Object]] */; +val* var59 /* : nullable Object */; +val* var_xe /* var xe: POSetElement[nullable Object] */; +val* var60 /* : HashSet[nullable Object] */; +val* var62 /* : HashSet[nullable Object] */; +short int var63 /* : Bool */; +short int var64 /* : Bool */; +short int var65 /* : Bool */; +val* var66 /* : Array[nullable Object] */; +val* var67 /* : HashSet[nullable Object] */; +val* var69 /* : 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 /* : IndexedIterator[nullable Object] */; +val* var_77 /* var : IndexedIterator[nullable Object] */; +short int var78 /* : Bool */; +val* var80 /* : nullable Object */; +val* var_x81 /* var x: nullable Object */; +val* var82 /* : HashSet[nullable Object] */; +val* var84 /* : 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* var93 /* : nullable Object */; +val* var_x94 /* var x: nullable Object */; +val* var95 /* : HashMap[nullable Object, POSetElement[nullable Object]] */; +val* var97 /* : HashMap[nullable Object, POSetElement[nullable Object]] */; +val* var98 /* : nullable Object */; +val* var_xe99 /* var xe: POSetElement[nullable Object] */; +val* var100 /* : HashSet[nullable Object] */; +val* var102 /* : HashSet[nullable Object] */; +short int var103 /* : Bool */; +val* var104 /* : HashSet[nullable Object] */; +val* var106 /* : HashSet[nullable Object] */; +short int var107 /* : Bool */; +short int var108 /* : Bool */; +val* var109 /* : 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 /* : IndexedIterator[nullable Object] */; +val* var_117 /* var : IndexedIterator[nullable Object] */; +short int var118 /* : Bool */; +val* var120 /* : nullable Object */; +val* var_x121 /* var x: nullable Object */; +val* var122 /* : HashSet[nullable Object] */; +val* var124 /* : 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); -show_backtrace(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, 123); +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); -show_backtrace(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, 123); +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){ -goto RET_LABEL; -} else { +{ +var7 = poset___poset__POSet___add_node(self, var_f); } -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 */; -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 */; -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 */; +var_fe = var7; +{ +var8 = poset___poset__POSet___add_node(self, var_t); } -BREAK_label: (void)0; -CONTINUE_label24: (void)0; -((void (*)(val*))(var11->class->vft[COLOR_abstract_collection__Iterator__next]))(var11) /* next on */; +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)) { +if(catchStack.cursor >= 0){ +longjmp(catchStack.envs[catchStack.cursor], 1); +} +PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _tos"); +PRINT_ERROR(" (%s:%d)\n", FILE_poset, 532); +fatal_exit(1); } -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){ +var9 = var11; +RET_LABEL10:(void)0; +} +} +{ +var12 = core___core__HashSet___core__abstract_collection__Collection__has(var9, var_t); +} +if (var12){ 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 */; +{ +{ /* Inline poset$POSetElement$froms (var_fe) on */ +var15 = var_fe->attrs[COLOR_poset__POSetElement___froms].val; /* _froms on */ +if (unlikely(var15 == NULL)) { +if(catchStack.cursor >= 0){ +longjmp(catchStack.envs[catchStack.cursor], 1); +} +PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _froms"); +PRINT_ERROR(" (%s:%d)\n", FILE_poset, 533); +fatal_exit(1); +} +var13 = var15; +RET_LABEL14:(void)0; +} +} +var_ = var13; +{ +var16 = core___core__HashSet___core__abstract_collection__Collection__iterator(var_); +} +var_17 = var16; 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 */; +{ +var18 = ((short int(*)(val* self))((((long)var_17&3)?class_info[((long)var_17&3)]:var_17->class)->vft[COLOR_core__abstract_collection__Iterator__is_ok]))(var_17); /* is_ok on */ +} +if (var18){ } else { +goto BREAK_label; +} +{ +var19 = ((val*(*)(val* self))((((long)var_17&3)?class_info[((long)var_17&3)]:var_17->class)->vft[COLOR_core__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)) { +if(catchStack.cursor >= 0){ +longjmp(catchStack.envs[catchStack.cursor], 1); +} +PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _elements"); +PRINT_ERROR(" (%s:%d)\n", FILE_poset, 86); +fatal_exit(1); +} +var20 = var22; +RET_LABEL21:(void)0; +} +} +{ +var23 = core___core__HashMap___core__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)) { +if(catchStack.cursor >= 0){ +longjmp(catchStack.envs[catchStack.cursor], 1); } -CONTINUE_label38: (void)0; -((void (*)(val*))(var29->class->vft[COLOR_abstract_collection__Iterator__next]))(var29) /* next on */; +PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _tos"); +PRINT_ERROR(" (%s:%d)\n", FILE_poset, 532); +fatal_exit(1); } -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 */; +var24 = var26; +RET_LABEL25:(void)0; +} +} +var_27 = var24; +{ +var28 = core___core__HashSet___core__abstract_collection__Collection__iterator(var_27); +} +var_29 = var28; 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 */; +{ +var30 = ((short int(*)(val* self))((((long)var_29&3)?class_info[((long)var_29&3)]:var_29->class)->vft[COLOR_core__abstract_collection__Iterator__is_ok]))(var_29); /* is_ok on */ +} +if (var30){ } else { +goto BREAK_label31; } -CONTINUE_label52: (void)0; -((void (*)(val*))(var41->class->vft[COLOR_abstract_collection__Iterator__next]))(var41) /* next on */; +{ +var32 = ((val*(*)(val* self))((((long)var_29&3)?class_info[((long)var_29&3)]:var_29->class)->vft[COLOR_core__abstract_collection__Iterator__item]))(var_29); /* item 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:; +var_tt = var32; +{ +{ /* Inline poset$POSet$elements (self) on */ +var35 = self->attrs[COLOR_poset__POSet___elements].val; /* _elements on */ +if (unlikely(var35 == NULL)) { +if(catchStack.cursor >= 0){ +longjmp(catchStack.envs[catchStack.cursor], 1); } -/* 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:; +PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _elements"); +PRINT_ERROR(" (%s:%d)\n", FILE_poset, 86); +fatal_exit(1); } -/* 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; +var33 = var35; +RET_LABEL34:(void)0; } -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); -show_backtrace(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; -} else { -var2 = p1->type->type_table[cltype3] == idtype4; +{ +var36 = core___core__HashMap___core__abstract_collection__MapRead___91d_93d(var33, var_tt); } -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); -show_backtrace(1); +var_tte = var36; +{ +{ /* Inline poset$POSetElement$froms (var_tte) on */ +var39 = var_tte->attrs[COLOR_poset__POSetElement___froms].val; /* _froms on */ +if (unlikely(var39 == NULL)) { +if(catchStack.cursor >= 0){ +longjmp(catchStack.envs[catchStack.cursor], 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; -goto RET_LABEL; -} else { +PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _froms"); +PRINT_ERROR(" (%s:%d)\n", FILE_poset, 533); +fatal_exit(1); } -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; +var37 = var39; +RET_LABEL38:(void)0; } -/* 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) { -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; +{ +core___core__HashSet___core__abstract_collection__SimpleCollection__add(var37, var_ff); /* Direct call hash_collection$HashSet$add on */ } -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); -show_backtrace(1); +{ +{ /* Inline poset$POSetElement$tos (var_ffe) on */ +var42 = var_ffe->attrs[COLOR_poset__POSetElement___tos].val; /* _tos on */ +if (unlikely(var42 == NULL)) { +if(catchStack.cursor >= 0){ +longjmp(catchStack.envs[catchStack.cursor], 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; -} else { -var2 = p1->type->type_table[cltype3] == idtype4; +PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _tos"); +PRINT_ERROR(" (%s:%d)\n", FILE_poset, 532); +fatal_exit(1); } -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); -show_backtrace(1); +var40 = var42; +RET_LABEL41:(void)0; } -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; -} 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; +{ +core___core__HashSet___core__abstract_collection__SimpleCollection__add(var40, var_tt); /* Direct call hash_collection$HashSet$add on */ } -/* 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; +{ +((void(*)(val* self))((((long)var_29&3)?class_info[((long)var_29&3)]:var_29->class)->vft[COLOR_core__abstract_collection__Iterator__next]))(var_29); /* next on */ } -/* 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 */; -} -((void (*)(val*, val*, val*))(var->class->vft[COLOR_exec__OProcess__init]))(var, var1, var10) /* init on */; -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 */; -} -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 */; -} -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 */; -} -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 */; +BREAK_label31: (void)0; +{ +((void(*)(val* self))((((long)var_29&3)?class_info[((long)var_29&3)]:var_29->class)->vft[COLOR_core__abstract_collection__Iterator__finish]))(var_29); /* finish on */ } -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; +{ +((void(*)(val* self))((((long)var_17&3)?class_info[((long)var_17&3)]:var_17->class)->vft[COLOR_core__abstract_collection__Iterator__next]))(var_17); /* next on */ } -((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); -RET_LABEL:; +BREAK_label: (void)0; +{ +((void(*)(val* self))((((long)var_17&3)?class_info[((long)var_17&3)]:var_17->class)->vft[COLOR_core__abstract_collection__Iterator__finish]))(var_17); /* finish on */ } -/* method poset#POSet#compare for (self: POSet[Object], Object, Object): Int */ -long poset__POSet__compare(val* self, val* p0, val* p1) { +{ +{ /* Inline poset$POSetElement$tos (var_te) on */ +var45 = var_te->attrs[COLOR_poset__POSetElement___tos].val; /* _tos on */ +if (unlikely(var45 == NULL)) { +if(catchStack.cursor >= 0){ +longjmp(catchStack.envs[catchStack.cursor], 1); +} +PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _tos"); +PRINT_ERROR(" (%s:%d)\n", FILE_poset, 532); +fatal_exit(1); +} +var43 = var45; +RET_LABEL44:(void)0; +} +} +{ +var46 = core___core__HashSet___core__abstract_collection__Collection__has(var43, var_f); +} +if (var46){ +goto RET_LABEL; +} else { +} +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)) { +if(catchStack.cursor >= 0){ +longjmp(catchStack.envs[catchStack.cursor], 1); +} +PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _dfroms"); +PRINT_ERROR(" (%s:%d)\n", FILE_poset, 535); +fatal_exit(1); +} +var47 = var49; +RET_LABEL48:(void)0; +} +} +var_50 = var47; +{ +var51 = core___core__HashSet___core__abstract_collection__Collection__iterator(var_50); +} +var_52 = var51; +for(;;) { +{ +var53 = ((short int(*)(val* self))((((long)var_52&3)?class_info[((long)var_52&3)]:var_52->class)->vft[COLOR_core__abstract_collection__Iterator__is_ok]))(var_52); /* is_ok on */ +} +if (var53){ +} else { +goto BREAK_label54; +} +{ +var55 = ((val*(*)(val* self))((((long)var_52&3)?class_info[((long)var_52&3)]:var_52->class)->vft[COLOR_core__abstract_collection__Iterator__item]))(var_52); /* item on */ +} +var_x = var55; +{ +{ /* Inline poset$POSet$elements (self) on */ +var58 = self->attrs[COLOR_poset__POSet___elements].val; /* _elements on */ +if (unlikely(var58 == NULL)) { +if(catchStack.cursor >= 0){ +longjmp(catchStack.envs[catchStack.cursor], 1); +} +PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _elements"); +PRINT_ERROR(" (%s:%d)\n", FILE_poset, 86); +fatal_exit(1); +} +var56 = var58; +RET_LABEL57:(void)0; +} +} +{ +var59 = core___core__HashMap___core__abstract_collection__MapRead___91d_93d(var56, var_x); +} +var_xe = var59; +{ +{ /* Inline poset$POSetElement$tos (var_xe) on */ +var62 = var_xe->attrs[COLOR_poset__POSetElement___tos].val; /* _tos on */ +if (unlikely(var62 == NULL)) { +if(catchStack.cursor >= 0){ +longjmp(catchStack.envs[catchStack.cursor], 1); +} +PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _tos"); +PRINT_ERROR(" (%s:%d)\n", FILE_poset, 532); +fatal_exit(1); +} +var60 = var62; +RET_LABEL61:(void)0; +} +} +{ +var63 = core___core__HashSet___core__abstract_collection__Collection__has(var60, var_f); +} +if (var63){ +if (var_to_remove == NULL) { +var64 = 1; /* is null */ +} else { +var64 = 0; /* arg is null but recv is not */ +} +if (0) { +var65 = core___core__Array___core__kernel__Object___61d_61d(var_to_remove, ((val*)NULL)); +var64 = var65; +} +if (var64){ +var66 = NEW_core__Array(self->type->resolution_table->types[COLOR_core__Array__poset__POSet___35dE]); +{ +core___core__Array___core__kernel__Object__init(var66); /* Direct call array$Array$init on */ +} +var_to_remove = var66; +} else { +} +{ +core___core__Array___core__abstract_collection__SimpleCollection__add(var_to_remove, var_x); /* Direct call array$Array$add on */ +} +{ +{ /* Inline poset$POSetElement$dtos (var_xe) on */ +var69 = var_xe->attrs[COLOR_poset__POSetElement___dtos].val; /* _dtos on */ +if (unlikely(var69 == NULL)) { +if(catchStack.cursor >= 0){ +longjmp(catchStack.envs[catchStack.cursor], 1); +} +PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _dtos"); +PRINT_ERROR(" (%s:%d)\n", FILE_poset, 534); +fatal_exit(1); +} +var67 = var69; +RET_LABEL68:(void)0; +} +} +{ +core___core__HashSet___core__abstract_collection__RemovableCollection__remove(var67, 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_core__abstract_collection__Iterator__next]))(var_52); /* next on */ +} +} +BREAK_label54: (void)0; +{ +((void(*)(val* self))((((long)var_52&3)?class_info[((long)var_52&3)]:var_52->class)->vft[COLOR_core__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_core__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 = core___core__AbstractArrayRead___core__abstract_collection__Collection__iterator(var_75); +} +var_77 = var76; +for(;;) { +{ +var78 = ((short int(*)(val* self))((((long)var_77&3)?class_info[((long)var_77&3)]:var_77->class)->vft[COLOR_core__abstract_collection__Iterator__is_ok]))(var_77); /* is_ok on */ +} +if (var78){ +} else { +goto BREAK_label79; +} +{ +var80 = ((val*(*)(val* self))((((long)var_77&3)?class_info[((long)var_77&3)]:var_77->class)->vft[COLOR_core__abstract_collection__Iterator__item]))(var_77); /* item on */ +} +var_x81 = var80; +{ +{ /* Inline poset$POSetElement$dfroms (var_te) on */ +var84 = var_te->attrs[COLOR_poset__POSetElement___dfroms].val; /* _dfroms on */ +if (unlikely(var84 == NULL)) { +if(catchStack.cursor >= 0){ +longjmp(catchStack.envs[catchStack.cursor], 1); +} +PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _dfroms"); +PRINT_ERROR(" (%s:%d)\n", FILE_poset, 535); +fatal_exit(1); +} +var82 = var84; +RET_LABEL83:(void)0; +} +} +{ +core___core__HashSet___core__abstract_collection__RemovableCollection__remove(var82, var_x81); /* Direct call hash_collection$HashSet$remove on */ +} +{ +((void(*)(val* self))((((long)var_77&3)?class_info[((long)var_77&3)]:var_77->class)->vft[COLOR_core__abstract_collection__Iterator__next]))(var_77); /* next on */ +} +} +BREAK_label79: (void)0; +{ +((void(*)(val* self))((((long)var_77&3)?class_info[((long)var_77&3)]:var_77->class)->vft[COLOR_core__abstract_collection__Iterator__finish]))(var_77); /* finish on */ +} +{ +core___core__AbstractArray___core__abstract_collection__RemovableCollection__clear(var_to_remove); /* Direct call array$AbstractArray$clear on */ +} +} else { +} +{ +{ /* Inline poset$POSetElement$dtos (var_fe) on */ +var87 = var_fe->attrs[COLOR_poset__POSetElement___dtos].val; /* _dtos on */ +if (unlikely(var87 == NULL)) { +if(catchStack.cursor >= 0){ +longjmp(catchStack.envs[catchStack.cursor], 1); +} +PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _dtos"); +PRINT_ERROR(" (%s:%d)\n", FILE_poset, 534); +fatal_exit(1); +} +var85 = var87; +RET_LABEL86:(void)0; +} +} +var_88 = var85; +{ +var89 = core___core__HashSet___core__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_core__abstract_collection__Iterator__is_ok]))(var_90); /* is_ok on */ +} +if (var91){ +} else { +goto BREAK_label92; +} +{ +var93 = ((val*(*)(val* self))((((long)var_90&3)?class_info[((long)var_90&3)]:var_90->class)->vft[COLOR_core__abstract_collection__Iterator__item]))(var_90); /* item on */ +} +var_x94 = var93; +{ +{ /* Inline poset$POSet$elements (self) on */ +var97 = self->attrs[COLOR_poset__POSet___elements].val; /* _elements on */ +if (unlikely(var97 == NULL)) { +if(catchStack.cursor >= 0){ +longjmp(catchStack.envs[catchStack.cursor], 1); +} +PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _elements"); +PRINT_ERROR(" (%s:%d)\n", FILE_poset, 86); +fatal_exit(1); +} +var95 = var97; +RET_LABEL96:(void)0; +} +} +{ +var98 = core___core__HashMap___core__abstract_collection__MapRead___91d_93d(var95, var_x94); +} +var_xe99 = var98; +{ +{ /* Inline poset$POSetElement$froms (var_xe99) on */ +var102 = var_xe99->attrs[COLOR_poset__POSetElement___froms].val; /* _froms on */ +if (unlikely(var102 == NULL)) { +if(catchStack.cursor >= 0){ +longjmp(catchStack.envs[catchStack.cursor], 1); +} +PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _froms"); +PRINT_ERROR(" (%s:%d)\n", FILE_poset, 533); +fatal_exit(1); +} +var100 = var102; +RET_LABEL101:(void)0; +} +} +{ +var103 = core___core__HashSet___core__abstract_collection__Collection__has(var100, var_t); +} +if (var103){ +{ +{ /* Inline poset$POSetElement$dfroms (var_xe99) on */ +var106 = var_xe99->attrs[COLOR_poset__POSetElement___dfroms].val; /* _dfroms on */ +if (unlikely(var106 == NULL)) { +if(catchStack.cursor >= 0){ +longjmp(catchStack.envs[catchStack.cursor], 1); +} +PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _dfroms"); +PRINT_ERROR(" (%s:%d)\n", FILE_poset, 535); +fatal_exit(1); +} +var104 = var106; +RET_LABEL105:(void)0; +} +} +{ +core___core__HashSet___core__abstract_collection__RemovableCollection__remove(var104, var_f); /* Direct call hash_collection$HashSet$remove on */ +} +if (var_to_remove == NULL) { +var107 = 1; /* is null */ +} else { +var107 = 0; /* arg is null but recv is not */ +} +if (0) { +var108 = core___core__Array___core__kernel__Object___61d_61d(var_to_remove, ((val*)NULL)); +var107 = var108; +} +if (var107){ +var109 = NEW_core__Array(self->type->resolution_table->types[COLOR_core__Array__poset__POSet___35dE]); +{ +core___core__Array___core__kernel__Object__init(var109); /* Direct call array$Array$init on */ +} +var_to_remove = var109; +} else { +} +{ +core___core__Array___core__abstract_collection__SimpleCollection__add(var_to_remove, var_x94); /* 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_core__abstract_collection__Iterator__next]))(var_90); /* next on */ +} +} +BREAK_label92: (void)0; +{ +((void(*)(val* self))((((long)var_90&3)?class_info[((long)var_90&3)]:var_90->class)->vft[COLOR_core__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_core__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 = core___core__AbstractArrayRead___core__abstract_collection__Collection__iterator(var_115); +} +var_117 = var116; +for(;;) { +{ +var118 = ((short int(*)(val* self))((((long)var_117&3)?class_info[((long)var_117&3)]:var_117->class)->vft[COLOR_core__abstract_collection__Iterator__is_ok]))(var_117); /* is_ok on */ +} +if (var118){ +} else { +goto BREAK_label119; +} +{ +var120 = ((val*(*)(val* self))((((long)var_117&3)?class_info[((long)var_117&3)]:var_117->class)->vft[COLOR_core__abstract_collection__Iterator__item]))(var_117); /* item on */ +} +var_x121 = var120; +{ +{ /* Inline poset$POSetElement$dtos (var_fe) on */ +var124 = var_fe->attrs[COLOR_poset__POSetElement___dtos].val; /* _dtos on */ +if (unlikely(var124 == NULL)) { +if(catchStack.cursor >= 0){ +longjmp(catchStack.envs[catchStack.cursor], 1); +} +PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _dtos"); +PRINT_ERROR(" (%s:%d)\n", FILE_poset, 534); +fatal_exit(1); +} +var122 = var124; +RET_LABEL123:(void)0; +} +} +{ +core___core__HashSet___core__abstract_collection__RemovableCollection__remove(var122, var_x121); /* Direct call hash_collection$HashSet$remove on */ +} +{ +((void(*)(val* self))((((long)var_117&3)?class_info[((long)var_117&3)]:var_117->class)->vft[COLOR_core__abstract_collection__Iterator__next]))(var_117); /* next on */ +} +} +BREAK_label119: (void)0; +{ +((void(*)(val* self))((((long)var_117&3)?class_info[((long)var_117&3)]:var_117->class)->vft[COLOR_core__abstract_collection__Iterator__finish]))(var_117); /* 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)) { +if(catchStack.cursor >= 0){ +longjmp(catchStack.envs[catchStack.cursor], 1); +} +PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _dtos"); +PRINT_ERROR(" (%s:%d)\n", FILE_poset, 534); +fatal_exit(1); +} +var125 = var127; +RET_LABEL126:(void)0; +} +} +{ +core___core__HashSet___core__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)) { +if(catchStack.cursor >= 0){ +longjmp(catchStack.envs[catchStack.cursor], 1); +} +PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _dfroms"); +PRINT_ERROR(" (%s:%d)\n", FILE_poset, 535); +fatal_exit(1); +} +var128 = var130; +RET_LABEL129:(void)0; +} +} +{ +core___core__HashSet___core__abstract_collection__SimpleCollection__add(var128, var_f); /* Direct call hash_collection$HashSet$add on */ +} +RET_LABEL:; +} +/* 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; +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; +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 = (((long)p0&3)?type_info[((long)p0&3)]:p0->type)->type_table[cltype] == idtype; +} +} +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, 212); +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; +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 = (((long)p1&3)?type_info[((long)p1&3)]:p1->type)->type_table[cltype3] == idtype4; +} +} +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, 212); +fatal_exit(1); +} +var_f = p0; +var_t = p1; +{ +{ /* Inline poset$POSet$elements (self) on */ +var10 = self->attrs[COLOR_poset__POSet___elements].val; /* _elements on */ +if (unlikely(var10 == NULL)) { +if(catchStack.cursor >= 0){ +longjmp(catchStack.envs[catchStack.cursor], 1); +} +PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _elements"); +PRINT_ERROR(" (%s:%d)\n", FILE_poset, 86); +fatal_exit(1); +} +var8 = var10; +RET_LABEL9:(void)0; +} +} +{ +var11 = core___core__HashMap___core__abstract_collection__MapRead__keys(var8); +} +{ +var12 = ((short int(*)(val* self, val* p0))((((long)var11&3)?class_info[((long)var11&3)]:var11->class)->vft[COLOR_core__abstract_collection__Collection__has]))(var11, var_f); /* has on */ +} +var13 = !var12; +if (var13){ +var = 0; +goto RET_LABEL; +} else { +} +{ +{ /* Inline poset$POSet$elements (self) on */ +var16 = self->attrs[COLOR_poset__POSet___elements].val; /* _elements on */ +if (unlikely(var16 == NULL)) { +if(catchStack.cursor >= 0){ +longjmp(catchStack.envs[catchStack.cursor], 1); +} +PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _elements"); +PRINT_ERROR(" (%s:%d)\n", FILE_poset, 86); +fatal_exit(1); +} +var14 = var16; +RET_LABEL15:(void)0; +} +} +{ +var17 = core___core__HashMap___core__abstract_collection__MapRead___91d_93d(var14, var_f); +} +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)) { +if(catchStack.cursor >= 0){ +longjmp(catchStack.envs[catchStack.cursor], 1); +} +PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _tos"); +PRINT_ERROR(" (%s:%d)\n", FILE_poset, 532); +fatal_exit(1); +} +var18 = var20; +RET_LABEL19:(void)0; +} +} +{ +var21 = core___core__HashSet___core__abstract_collection__Collection__has(var18, var_t); +} +var = var21; +goto RET_LABEL; +RET_LABEL:; +return var; +} +/* method poset$POSet$compare for (self: POSet[nullable Object], nullable Object, nullable Object): Int */ +long poset___poset__POSet___core__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 COMPARED */ +/* isa COMPARED */ +type_struct = self->type->resolution_table->types[COLOR_core__sorter__Comparator__COMPARED]; 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 (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`", "COMPARED", var_class_name); +PRINT_ERROR(" (%s:%d)\n", FILE_poset, 288); +fatal_exit(1); +} +/* Covariant cast for argument 1 (b) isa COMPARED */ +/* isa COMPARED */ +type_struct5 = self->type->resolution_table->types[COLOR_core__sorter__Comparator__COMPARED]; +cltype3 = type_struct5->color; +idtype4 = type_struct5->id; +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 = (((long)p1&3)?type_info[((long)p1&3)]:p1->type)->type_table[cltype3] == idtype4; +} +} +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`", "COMPARED", var_class_name7); +PRINT_ERROR(" (%s:%d)\n", FILE_poset, 288); +fatal_exit(1); +} +var_a = p0; +var_b = p1; +{ +{ /* Inline poset$POSet$elements (self) on */ +var10 = self->attrs[COLOR_poset__POSet___elements].val; /* _elements on */ +if (unlikely(var10 == NULL)) { +if(catchStack.cursor >= 0){ +longjmp(catchStack.envs[catchStack.cursor], 1); +} +PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _elements"); +PRINT_ERROR(" (%s:%d)\n", FILE_poset, 86); +fatal_exit(1); +} +var8 = var10; +RET_LABEL9:(void)0; +} +} +{ +var11 = core___core__HashMap___core__abstract_collection__MapRead___91d_93d(var8, var_a); +} +var_ae = var11; +{ +{ /* Inline poset$POSet$elements (self) on */ +var14 = self->attrs[COLOR_poset__POSet___elements].val; /* _elements on */ +if (unlikely(var14 == NULL)) { +if(catchStack.cursor >= 0){ +longjmp(catchStack.envs[catchStack.cursor], 1); +} +PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _elements"); +PRINT_ERROR(" (%s:%d)\n", FILE_poset, 86); +fatal_exit(1); +} +var12 = var14; +RET_LABEL13:(void)0; +} +} +{ +var15 = core___core__HashMap___core__abstract_collection__MapRead___91d_93d(var12, var_b); +} +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)) { +if(catchStack.cursor >= 0){ +longjmp(catchStack.envs[catchStack.cursor], 1); +} +PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _tos"); +PRINT_ERROR(" (%s:%d)\n", FILE_poset, 532); +fatal_exit(1); +} +var16 = var18; +RET_LABEL17:(void)0; +} +} +{ +var19 = core___core__HashSet___core__abstract_collection__Collection__length(var16); +} +{ +{ /* Inline poset$POSetElement$tos (var_be) on */ +var22 = var_be->attrs[COLOR_poset__POSetElement___tos].val; /* _tos on */ +if (unlikely(var22 == NULL)) { +if(catchStack.cursor >= 0){ +longjmp(catchStack.envs[catchStack.cursor], 1); +} +PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _tos"); +PRINT_ERROR(" (%s:%d)\n", FILE_poset, 532); +fatal_exit(1); +} +var20 = var22; +RET_LABEL21:(void)0; +} +} +{ +var23 = core___core__HashSet___core__abstract_collection__Collection__length(var20); +} +{ +var24 = core___core__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 { +} +{ +{ /* Inline poset$POSet$elements (self) on */ +var31 = self->attrs[COLOR_poset__POSet___elements].val; /* _elements on */ +if (unlikely(var31 == NULL)) { +if(catchStack.cursor >= 0){ +longjmp(catchStack.envs[catchStack.cursor], 1); +} +PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _elements"); +PRINT_ERROR(" (%s:%d)\n", FILE_poset, 86); +fatal_exit(1); +} +var29 = var31; +RET_LABEL30:(void)0; +} +} +{ +var32 = core___core__HashMap___core__abstract_collection__MapRead___91d_93d(var29, var_a); +} +{ +{ /* Inline poset$POSetElement$count (var32) on */ +var35 = var32->attrs[COLOR_poset__POSetElement___count].l; /* _count on */ +var33 = var35; +RET_LABEL34:(void)0; +} +} +{ +{ /* Inline poset$POSet$elements (self) on */ +var38 = self->attrs[COLOR_poset__POSet___elements].val; /* _elements on */ +if (unlikely(var38 == NULL)) { +if(catchStack.cursor >= 0){ +longjmp(catchStack.envs[catchStack.cursor], 1); +} +PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _elements"); +PRINT_ERROR(" (%s:%d)\n", FILE_poset, 86); +fatal_exit(1); +} +var36 = var38; +RET_LABEL37:(void)0; +} +} +{ +var39 = core___core__HashMap___core__abstract_collection__MapRead___91d_93d(var36, var_b); +} +{ +{ /* Inline poset$POSetElement$count (var39) on */ +var42 = var39->attrs[COLOR_poset__POSetElement___count].l; /* _count on */ +var40 = var42; +RET_LABEL41:(void)0; +} +} +{ +var43 = core___core__Int___Comparable___60d_61d_62d(var33, var40); +} +var = var43; +goto RET_LABEL; +RET_LABEL:; +return var; +} +/* 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; +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_core__Collection__poset__POSet___35dE]; +cltype = type_struct->color; +idtype = type_struct->id; +if(cltype >= (((long)p0&3)?type_info[((long)p0&3)]:p0->type)->table_size) { +var1 = 0; +} else { +var1 = (((long)p0&3)?type_info[((long)p0&3)]:p0->type)->type_table[cltype] == idtype; +} +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, 374); +fatal_exit(1); +} +var_elements = p0; +{ +var2 = ((val*(*)(val* self))((((long)var_elements&3)?class_info[((long)var_elements&3)]:var_elements->class)->vft[COLOR_core__array__Collection__to_a]))(var_elements); /* to_a on */ +} +var_lin = var2; +{ +core___core__Comparator___sort(self, var_lin); /* Direct call sorter$Comparator$sort on */ +} +var = var_lin; +goto RET_LABEL; +RET_LABEL:; +return var; +} +/* method poset$POSet$clone for (self: POSet[nullable Object]): POSet[nullable Object] */ +val* poset___poset__POSet___core__kernel__Cloneable__clone(val* self) { +val* var /* : POSet[nullable Object] */; +val* var1 /* : POSet[nullable Object] */; +short int var2 /* : Bool */; +int cltype; +int idtype; +const struct type* type_struct; +const char* var_class_name; +{ +var1 = poset___poset__POSet___sub(self, self); +} +/* isa SELF */ +type_struct = self->type->resolution_table->types[COLOR_core__kernel__Object__SELF]; +cltype = type_struct->color; +idtype = type_struct->id; +if(cltype >= var1->type->table_size) { +var2 = 0; +} else { +var2 = var1->type->type_table[cltype] == idtype; +} +if (unlikely(!var2)) { +var_class_name = var1 == NULL ? "null" : var1->type->name; +PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "SELF", var_class_name); +PRINT_ERROR(" (%s:%d)\n", FILE_poset, 388); +fatal_exit(1); +} +var = var1; +goto RET_LABEL; +RET_LABEL:; +return var; +} +/* method poset$POSet$sub for (self: POSet[nullable Object], Collection[nullable Object]): POSet[nullable Object] */ +val* poset___poset__POSet___sub(val* self, val* p0) { +val* var /* : POSet[nullable Object] */; +short int var1 /* : Bool */; +int cltype; +int idtype; +const struct type* type_struct; +const char* var_class_name; +val* var_elements /* var elements: Collection[nullable Object] */; +val* var2 /* : POSet[nullable Object] */; +val* var_res /* var res: POSet[nullable Object] */; +val* var_ /* var : POSet[nullable Object] */; +val* var4 /* : Iterator[nullable Object] */; +val* var_5 /* var : Iterator[nullable Object] */; +short int var6 /* : Bool */; +val* var7 /* : nullable Object */; +val* var_e /* var e: nullable Object */; +short int var8 /* : Bool */; +short int var9 /* : Bool */; +val* var11 /* : POSetElement[nullable Object] */; +val* var_12 /* var : POSet[nullable Object] */; +val* var13 /* : Iterator[nullable Object] */; +val* var_14 /* var : Iterator[nullable Object] */; +short int var15 /* : Bool */; +val* var17 /* : nullable Object */; +val* var_e18 /* var e: nullable Object */; +val* var19 /* : POSetElement[nullable Object] */; +val* var20 /* : Collection[nullable Object] */; +val* var_21 /* var : Collection[nullable Object] */; +val* var22 /* : Iterator[nullable Object] */; +val* var_23 /* var : Iterator[nullable Object] */; +short int var24 /* : Bool */; +val* var26 /* : nullable Object */; +val* var_f /* var f: nullable Object */; +short int var27 /* : Bool */; +short int var28 /* : Bool */; +/* Covariant cast for argument 0 (elements) isa Collection[E] */ +/* isa Collection[E] */ +type_struct = self->type->resolution_table->types[COLOR_core__Collection__poset__POSet___35dE]; +cltype = type_struct->color; +idtype = type_struct->id; +if(cltype >= (((long)p0&3)?type_info[((long)p0&3)]:p0->type)->table_size) { +var1 = 0; +} else { +var1 = (((long)p0&3)?type_info[((long)p0&3)]:p0->type)->type_table[cltype] == idtype; +} +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, 390); +fatal_exit(1); +} +var_elements = p0; +var2 = NEW_poset__POSet(self->type->resolution_table->types[COLOR_poset__POSet__poset__POSet___35dE]); +{ +{ /* Inline kernel$Object$init (var2) on */ +RET_LABEL3:(void)0; +} +} +var_res = var2; +var_ = self; +{ +var4 = poset___poset__POSet___core__abstract_collection__Collection__iterator(var_); +} +var_5 = var4; +for(;;) { +{ +var6 = ((short int(*)(val* self))((((long)var_5&3)?class_info[((long)var_5&3)]:var_5->class)->vft[COLOR_core__abstract_collection__Iterator__is_ok]))(var_5); /* is_ok on */ +} +if (var6){ +} else { +goto BREAK_label; +} +{ +var7 = ((val*(*)(val* self))((((long)var_5&3)?class_info[((long)var_5&3)]:var_5->class)->vft[COLOR_core__abstract_collection__Iterator__item]))(var_5); /* item on */ +} +var_e = var7; +{ +var8 = ((short int(*)(val* self, val* p0))((((long)var_elements&3)?class_info[((long)var_elements&3)]:var_elements->class)->vft[COLOR_core__abstract_collection__Collection__has]))(var_elements, var_e); /* has on */ +} +var9 = !var8; +if (var9){ +goto BREAK_label10; +} else { +} +{ +var11 = poset___poset__POSet___add_node(var_res, var_e); +} +BREAK_label10: (void)0; +{ +((void(*)(val* self))((((long)var_5&3)?class_info[((long)var_5&3)]:var_5->class)->vft[COLOR_core__abstract_collection__Iterator__next]))(var_5); /* next on */ +} +} +BREAK_label: (void)0; +{ +((void(*)(val* self))((((long)var_5&3)?class_info[((long)var_5&3)]:var_5->class)->vft[COLOR_core__abstract_collection__Iterator__finish]))(var_5); /* finish on */ +} +var_12 = var_res; +{ +var13 = poset___poset__POSet___core__abstract_collection__Collection__iterator(var_12); +} +var_14 = var13; +for(;;) { +{ +var15 = ((short int(*)(val* self))((((long)var_14&3)?class_info[((long)var_14&3)]:var_14->class)->vft[COLOR_core__abstract_collection__Iterator__is_ok]))(var_14); /* is_ok on */ +} +if (var15){ +} else { +goto BREAK_label16; +} +{ +var17 = ((val*(*)(val* self))((((long)var_14&3)?class_info[((long)var_14&3)]:var_14->class)->vft[COLOR_core__abstract_collection__Iterator__item]))(var_14); /* item on */ +} +var_e18 = var17; +{ +var19 = poset___poset__POSet____91d_93d(self, var_e18); +} +{ +var20 = poset___poset__POSetElement___greaters(var19); +} +var_21 = var20; +{ +var22 = ((val*(*)(val* self))((((long)var_21&3)?class_info[((long)var_21&3)]:var_21->class)->vft[COLOR_core__abstract_collection__Collection__iterator]))(var_21); /* iterator on */ +} +var_23 = var22; +for(;;) { +{ +var24 = ((short int(*)(val* self))((((long)var_23&3)?class_info[((long)var_23&3)]:var_23->class)->vft[COLOR_core__abstract_collection__Iterator__is_ok]))(var_23); /* is_ok on */ +} +if (var24){ +} else { +goto BREAK_label25; +} +{ +var26 = ((val*(*)(val* self))((((long)var_23&3)?class_info[((long)var_23&3)]:var_23->class)->vft[COLOR_core__abstract_collection__Iterator__item]))(var_23); /* item on */ +} +var_f = var26; +{ +var27 = ((short int(*)(val* self, val* p0))((((long)var_elements&3)?class_info[((long)var_elements&3)]:var_elements->class)->vft[COLOR_core__abstract_collection__Collection__has]))(var_elements, var_f); /* has on */ +} +var28 = !var27; +if (var28){ +goto BREAK_label29; +} else { +} +{ +poset___poset__POSet___add_edge(var_res, var_e18, var_f); /* Direct call poset$POSet$add_edge on */ +} +BREAK_label29: (void)0; +{ +((void(*)(val* self))((((long)var_23&3)?class_info[((long)var_23&3)]:var_23->class)->vft[COLOR_core__abstract_collection__Iterator__next]))(var_23); /* next on */ +} +} +BREAK_label25: (void)0; +{ +((void(*)(val* self))((((long)var_23&3)?class_info[((long)var_23&3)]:var_23->class)->vft[COLOR_core__abstract_collection__Iterator__finish]))(var_23); /* finish on */ +} +{ +((void(*)(val* self))((((long)var_14&3)?class_info[((long)var_14&3)]:var_14->class)->vft[COLOR_core__abstract_collection__Iterator__next]))(var_14); /* next on */ +} +} +BREAK_label16: (void)0; +{ +((void(*)(val* self))((((long)var_14&3)?class_info[((long)var_14&3)]:var_14->class)->vft[COLOR_core__abstract_collection__Iterator__finish]))(var_14); /* finish on */ +} +var = var_res; +goto RET_LABEL; +RET_LABEL:; +return var; +} +/* method poset$POSet$== for (self: POSet[nullable Object], nullable Object): Bool */ +short int poset___poset__POSet___core__kernel__Object___61d_61d(val* self, val* p0) { +short int var /* : Bool */; +val* var_other /* var other: nullable Object */; +short int var1 /* : Bool */; +int cltype; +int idtype; +short int var2 /* : Bool */; +val* var3 /* : HashMap[nullable Object, POSetElement[nullable Object]] */; +val* var5 /* : HashMap[nullable Object, POSetElement[nullable Object]] */; +val* var6 /* : RemovableCollection[nullable Object] */; +val* var7 /* : HashMap[nullable Object, POSetElement[nullable Object]] */; +val* var9 /* : HashMap[nullable Object, POSetElement[nullable Object]] */; +val* var10 /* : RemovableCollection[nullable Object] */; +short int var11 /* : Bool */; +short int var12 /* : Bool */; +val* var13 /* : HashMap[nullable Object, POSetElement[nullable Object]] */; +val* var15 /* : HashMap[nullable Object, POSetElement[nullable Object]] */; +val* var_ /* var : HashMap[nullable Object, POSetElement[nullable Object]] */; +val* var16 /* : MapIterator[nullable Object, nullable Object] */; +val* var_17 /* var : MapIterator[nullable Object, POSetElement[nullable Object]] */; +short int var18 /* : Bool */; +val* var19 /* : nullable Object */; +val* var_e /* var e: nullable Object */; +val* var20 /* : nullable Object */; +val* var_ee /* var ee: POSetElement[nullable Object] */; +val* var21 /* : Collection[nullable Object] */; +val* var22 /* : POSetElement[nullable Object] */; +val* var23 /* : Collection[nullable Object] */; +short int var24 /* : Bool */; +val* var_other26 /* var other: nullable Object */; +short int var27 /* : Bool */; +short int var28 /* : Bool */; +long var30 /* : Int */; +long var31 /* : Int */; +short int var32 /* : Bool */; +short int var34 /* : Bool */; +var_other = p0; +/* isa POSet[nullable Object] */ +cltype = type_poset__POSet__nullable__core__Object.color; +idtype = type_poset__POSet__nullable__core__Object.id; +if(var_other == NULL) { +var1 = 0; +} else { +if(cltype >= (((long)var_other&3)?type_info[((long)var_other&3)]:var_other->type)->table_size) { +var1 = 0; +} else { +var1 = (((long)var_other&3)?type_info[((long)var_other&3)]:var_other->type)->type_table[cltype] == idtype; +} +} +var2 = !var1; +if (var2){ +var = 0; +goto RET_LABEL; +} else { +} +{ +{ /* Inline poset$POSet$elements (self) on */ +var5 = self->attrs[COLOR_poset__POSet___elements].val; /* _elements on */ +if (unlikely(var5 == NULL)) { +if(catchStack.cursor >= 0){ +longjmp(catchStack.envs[catchStack.cursor], 1); +} +PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _elements"); +PRINT_ERROR(" (%s:%d)\n", FILE_poset, 86); +fatal_exit(1); +} +var3 = var5; +RET_LABEL4:(void)0; +} +} +{ +var6 = core___core__HashMap___core__abstract_collection__MapRead__keys(var3); +} +{ +{ /* Inline poset$POSet$elements (var_other) on */ +var9 = var_other->attrs[COLOR_poset__POSet___elements].val; /* _elements on */ +if (unlikely(var9 == NULL)) { +if(catchStack.cursor >= 0){ +longjmp(catchStack.envs[catchStack.cursor], 1); +} +PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _elements"); +PRINT_ERROR(" (%s:%d)\n", FILE_poset, 86); +fatal_exit(1); +} +var7 = var9; +RET_LABEL8:(void)0; +} +} +{ +var10 = core___core__HashMap___core__abstract_collection__MapRead__keys(var7); +} +{ +var11 = core___core__Collection___has_exactly(var6, var10); +} +var12 = !var11; +if (var12){ +var = 0; +goto RET_LABEL; +} else { +} +{ +{ /* Inline poset$POSet$elements (self) on */ +var15 = self->attrs[COLOR_poset__POSet___elements].val; /* _elements on */ +if (unlikely(var15 == NULL)) { +if(catchStack.cursor >= 0){ +longjmp(catchStack.envs[catchStack.cursor], 1); +} +PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _elements"); +PRINT_ERROR(" (%s:%d)\n", FILE_poset, 86); +fatal_exit(1); +} +var13 = var15; +RET_LABEL14:(void)0; +} +} +var_ = var13; +{ +var16 = core___core__HashMap___core__abstract_collection__MapRead__iterator(var_); +} +var_17 = var16; +for(;;) { +{ +var18 = ((short int(*)(val* self))((((long)var_17&3)?class_info[((long)var_17&3)]:var_17->class)->vft[COLOR_core__abstract_collection__MapIterator__is_ok]))(var_17); /* is_ok on */ +} +if (var18){ +} else { +goto BREAK_label; +} +{ +var19 = ((val*(*)(val* self))((((long)var_17&3)?class_info[((long)var_17&3)]:var_17->class)->vft[COLOR_core__abstract_collection__MapIterator__key]))(var_17); /* key on */ +} +var_e = var19; +{ +var20 = ((val*(*)(val* self))((((long)var_17&3)?class_info[((long)var_17&3)]:var_17->class)->vft[COLOR_core__abstract_collection__MapIterator__item]))(var_17); /* item on */ +} +var_ee = var20; +{ +var21 = poset___poset__POSetElement___direct_greaters(var_ee); +} +{ +var22 = poset___poset__POSet____91d_93d(var_other, var_e); +} +{ +var23 = poset___poset__POSetElement___direct_greaters(var22); +} +{ +{ /* Inline kernel$Object$!= (var21,var23) on */ +var_other26 = var23; +{ +var27 = ((short int(*)(val* self, val* p0))((((long)var21&3)?class_info[((long)var21&3)]:var21->class)->vft[COLOR_core__kernel__Object___61d_61d]))(var21, var_other26); /* == on */ +} +var28 = !var27; +var24 = var28; +goto RET_LABEL25; +RET_LABEL25:(void)0; } -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); -show_backtrace(1); } -/* Covariant cast for argument 1 (b) 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; +if (var24){ +var = 0; +goto RET_LABEL; } else { -var2 = 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); -show_backtrace(1); +{ +((void(*)(val* self))((((long)var_17&3)?class_info[((long)var_17&3)]:var_17->class)->vft[COLOR_core__abstract_collection__MapIterator__next]))(var_17); /* next on */ } -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 { } -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; +BREAK_label: (void)0; +{ +{ /* Inline abstract_collection$MapIterator$finish (var_17) on */ +RET_LABEL29:(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:; +{ +var30 = poset___poset__POSet___core__kernel__Object__hash(self); } -/* method poset#POSet#init for (self: Object) */ -void VIRTUAL_poset__POSet__init(val* self) { -poset__POSet__init(self); -RET_LABEL:; +{ +var31 = poset___poset__POSet___core__kernel__Object__hash(var_other); } -/* 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); -show_backtrace(1); +{ +{ /* Inline kernel$Int$== (var30,var31) on */ +var34 = var30 == var31; +var32 = var34; +goto RET_LABEL33; +RET_LABEL33:(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; +if (unlikely(!var32)) { +if(catchStack.cursor >= 0){ +longjmp(catchStack.envs[catchStack.cursor], 1); +} +PRINT_ERROR("Runtime error: %s", "Assert failed"); +PRINT_ERROR(" (%s:%d)\n", FILE_poset, 476); +fatal_exit(1); +} +var = 1; +goto RET_LABEL; RET_LABEL:; return var; } -/* method poset#POSetElement#poset= for (self: POSetElement[Object], POSet[Object]) */ -void poset__POSetElement__poset_61d(val* self, val* p0) { -short int var /* : Bool */; +/* method poset$POSet$hash for (self: POSet[nullable Object]): Int */ +long poset___poset__POSet___core__kernel__Object__hash(val* self) { +long var /* : Int */; +long var_res /* var res: Int */; +val* var1 /* : HashMap[nullable Object, POSetElement[nullable Object]] */; +val* var3 /* : HashMap[nullable Object, POSetElement[nullable Object]] */; +val* var_ /* var : HashMap[nullable Object, POSetElement[nullable Object]] */; +val* var4 /* : MapIterator[nullable Object, nullable Object] */; +val* var_5 /* var : MapIterator[nullable Object, POSetElement[nullable Object]] */; +short int var6 /* : Bool */; +val* var7 /* : nullable Object */; +val* var_e /* var e: nullable Object */; +val* var8 /* : nullable Object */; +val* var_ee /* var ee: POSetElement[nullable Object] */; +short int var9 /* : Bool */; +short int var10 /* : Bool */; +long var12 /* : Int */; +long var13 /* : Int */; +short int var15 /* : 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; +long var16 /* : Int */; +val* var17 /* : Collection[nullable Object] */; +long var18 /* : Int */; +long var19 /* : Int */; +short int var21 /* : Bool */; +int cltype22; +int idtype23; +const char* var_class_name24; +long var25 /* : Int */; +var_res = 0l; +{ +{ /* Inline poset$POSet$elements (self) on */ +var3 = self->attrs[COLOR_poset__POSet___elements].val; /* _elements on */ +if (unlikely(var3 == NULL)) { +if(catchStack.cursor >= 0){ +longjmp(catchStack.envs[catchStack.cursor], 1); +} +PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _elements"); +PRINT_ERROR(" (%s:%d)\n", FILE_poset, 86); +fatal_exit(1); +} +var1 = var3; +RET_LABEL2:(void)0; +} +} +var_ = var1; +{ +var4 = core___core__HashMap___core__abstract_collection__MapRead__iterator(var_); +} +var_5 = var4; +for(;;) { +{ +var6 = ((short int(*)(val* self))((((long)var_5&3)?class_info[((long)var_5&3)]:var_5->class)->vft[COLOR_core__abstract_collection__MapIterator__is_ok]))(var_5); /* is_ok on */ +} +if (var6){ } else { -var = p0->type->type_table[cltype] == idtype; +goto BREAK_label; } -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); -show_backtrace(1); +{ +var7 = ((val*(*)(val* self))((((long)var_5&3)?class_info[((long)var_5&3)]:var_5->class)->vft[COLOR_core__abstract_collection__MapIterator__key]))(var_5); /* key on */ } -self->attrs[COLOR_poset__POSetElement___64dposet].val = p0; /* @poset on */ -RET_LABEL:; +var_e = var7; +{ +var8 = ((val*(*)(val* self))((((long)var_5&3)?class_info[((long)var_5&3)]:var_5->class)->vft[COLOR_core__abstract_collection__MapIterator__item]))(var_5); /* item on */ } -/* 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:; +var_ee = var8; +if (var_e == NULL) { +var9 = 1; /* is null */ +} else { +var9 = 0; /* arg is null but recv is not */ } -/* 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); -show_backtrace(1); +if (0) { +var10 = ((short int(*)(val* self, val* p0))((((long)var_e&3)?class_info[((long)var_e&3)]:var_e->class)->vft[COLOR_core__kernel__Object___61d_61d]))(var_e, ((val*)NULL)); /* == on */ +var9 = var10; } -var = var1; -RET_LABEL:; -return var; +if (var9){ +goto BREAK_label11; +} else { } -/* 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; +{ +var12 = ((long(*)(val* self))((((long)var_e&3)?class_info[((long)var_e&3)]:var_e->class)->vft[COLOR_core__kernel__Object__hash]))(var_e); /* hash on */ } -/* 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; -} else { -var = p0->type->type_table[cltype] == idtype; +{ +{ /* Inline kernel$Int$+ (var_res,var12) on */ +/* Covariant cast for argument 0 (i) isa OTHER */ +/* isa OTHER */ +var15 = 1; /* easy isa OTHER*/ +if (unlikely(!var15)) { +var_class_name = type_core__Int.name; +PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name); +PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 728); +fatal_exit(1); } -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); -show_backtrace(1); +var16 = var_res + var12; +var13 = var16; +goto RET_LABEL14; +RET_LABEL14:(void)0; } -self->attrs[COLOR_poset__POSetElement___64delement].val = p0; /* @element on */ -RET_LABEL:; } -/* 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:; +var_res = var13; +{ +var17 = poset___poset__POSetElement___direct_greaters(var_ee); } -/* 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); -show_backtrace(1); +{ +var18 = ((long(*)(val* self))((((long)var17&3)?class_info[((long)var17&3)]:var17->class)->vft[COLOR_core__abstract_collection__Collection__length]))(var17); /* length on */ } -var = var1; -RET_LABEL:; -return var; +{ +{ /* Inline kernel$Int$+ (var_res,var18) on */ +/* Covariant cast for argument 0 (i) isa OTHER */ +/* isa OTHER */ +var21 = 1; /* easy isa OTHER*/ +if (unlikely(!var21)) { +var_class_name24 = type_core__Int.name; +PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name24); +PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 728); +fatal_exit(1); } -/* 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; +var25 = var_res + var18; +var19 = var25; +goto RET_LABEL20; +RET_LABEL20:(void)0; } -/* 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; } -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); -show_backtrace(1); +var_res = var19; +BREAK_label11: (void)0; +{ +((void(*)(val* self))((((long)var_5&3)?class_info[((long)var_5&3)]:var_5->class)->vft[COLOR_core__abstract_collection__MapIterator__next]))(var_5); /* next on */ } -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:; +BREAK_label: (void)0; +{ +{ /* Inline abstract_collection$MapIterator$finish (var_5) on */ +RET_LABEL26:(void)0; } -/* 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); -show_backtrace(1); } -var = var1; +var = var_res; +goto RET_LABEL; 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); +/* 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)) { +if(catchStack.cursor >= 0){ +longjmp(catchStack.envs[catchStack.cursor], 1); +} +PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _poset"); +PRINT_ERROR(" (%s:%d)\n", FILE_poset, 526); +fatal_exit(1); +} var = var1; RET_LABEL:; return var; } -/* method poset#POSetElement#froms= for (self: POSetElement[Object], HashSet[Object]) */ -void poset__POSetElement__froms_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 (froms) 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) { @@ -1252,508 +2141,383 @@ 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", 188); -show_backtrace(1); -} -self->attrs[COLOR_poset__POSetElement___64dfroms].val = p0; /* @froms 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, 526); +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); +self->attrs[COLOR_poset__POSetElement___poset].val = p0; /* _poset on */ RET_LABEL:; } -/* 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); -show_backtrace(1); -} -var = var1; -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$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#dtos= for (self: POSetElement[Object], HashSet[Object]) */ -void poset__POSetElement__dtos_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 (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 (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", 189); -show_backtrace(1); } -self->attrs[COLOR_poset__POSetElement___64ddtos].val = p0; /* @dtos 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, 529); +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___element].val = p0; /* _element 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); -show_backtrace(1); +/* 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)) { +if(catchStack.cursor >= 0){ +longjmp(catchStack.envs[catchStack.cursor], 1); +} +PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _tos"); +PRINT_ERROR(" (%s:%d)\n", FILE_poset, 532); +fatal_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$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)) { +if(catchStack.cursor >= 0){ +longjmp(catchStack.envs[catchStack.cursor], 1); +} +PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _froms"); +PRINT_ERROR(" (%s:%d)\n", FILE_poset, 533); +fatal_exit(1); +} 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) { -short int var /* : Bool */; -int cltype; -int idtype; -const struct type* type_struct; -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]; -cltype = type_struct->color; -idtype = type_struct->id; -if(cltype >= p0->type->table_size) { -var = 0; -} else { -var = p0->type->type_table[cltype] == idtype; +/* 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)) { +if(catchStack.cursor >= 0){ +longjmp(catchStack.envs[catchStack.cursor], 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", 190); -show_backtrace(1); +PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _dtos"); +PRINT_ERROR(" (%s:%d)\n", FILE_poset, 534); +fatal_exit(1); } -self->attrs[COLOR_poset__POSetElement___64ddfroms].val = p0; /* @dfroms on */ +var = var1; RET_LABEL:; +return var; } -/* 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); -RET_LABEL:; +/* 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)) { +if(catchStack.cursor >= 0){ +longjmp(catchStack.envs[catchStack.cursor], 1); +} +PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _dfroms"); +PRINT_ERROR(" (%s:%d)\n", FILE_poset, 535); +fatal_exit(1); } -/* 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 */ var = var1; RET_LABEL:; return var; } -/* method poset#POSetElement#count for (self: Object): Int */ -long VIRTUAL_poset__POSetElement__count(val* self) { +/* method poset$POSetElement$count for (self: POSetElement[nullable Object]): Int */ +long poset___poset__POSetElement___count(val* self) { long var /* : Int */; long var1 /* : Int */; -var1 = poset__POSetElement__count(self); +var1 = self->attrs[COLOR_poset__POSetElement___count].l; /* _count on */ 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 */ +/* 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:; } -/* 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$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)) { +if(catchStack.cursor >= 0){ +longjmp(catchStack.envs[catchStack.cursor], 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; +PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _tos"); +PRINT_ERROR(" (%s:%d)\n", FILE_poset, 532); +fatal_exit(1); +} +var1 = var3; +RET_LABEL2:(void)0; } -/* 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); -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 */; 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; -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)) { +if(catchStack.cursor >= 0){ +longjmp(catchStack.envs[catchStack.cursor], 1); +} +PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _dtos"); +PRINT_ERROR(" (%s:%d)\n", FILE_poset, 534); +fatal_exit(1); +} +var1 = var3; +RET_LABEL2:(void)0; +} } -/* 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 */; 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$smallers for (self: POSetElement[nullable Object]): Collection[nullable Object] */ +val* poset___poset__POSetElement___smallers(val* self) { +val* var /* : Collection[nullable Object] */; +val* var1 /* : HashSet[nullable Object] */; +val* var3 /* : HashSet[nullable Object] */; +{ +{ /* Inline poset$POSetElement$froms (self) on */ +var3 = self->attrs[COLOR_poset__POSetElement___froms].val; /* _froms on */ +if (unlikely(var3 == NULL)) { +if(catchStack.cursor >= 0){ +longjmp(catchStack.envs[catchStack.cursor], 1); +} +PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _froms"); +PRINT_ERROR(" (%s:%d)\n", FILE_poset, 533); +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)) { +if(catchStack.cursor >= 0){ +longjmp(catchStack.envs[catchStack.cursor], 1); +} +PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _dfroms"); +PRINT_ERROR(" (%s:%d)\n", FILE_poset, 535); +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); -show_backtrace(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, 591); +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)) { +if(catchStack.cursor >= 0){ +longjmp(catchStack.envs[catchStack.cursor], 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; +PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _tos"); +PRINT_ERROR(" (%s:%d)\n", FILE_poset, 532); +fatal_exit(1); +} +var2 = var4; +RET_LABEL3:(void)0; +} +} +{ +var5 = core___core__HashSet___core__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); -show_backtrace(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; -} else { -var2 = var_; +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, 606); +fatal_exit(1); } -var = var2; -goto RET_LABEL; -RET_LABEL:; -return var; +var_t = p0; +{ +{ /* Inline poset$POSetElement$element (self) on */ +var5 = self->attrs[COLOR_poset__POSetElement___element].val; /* _element on */ +var3 = var5; +RET_LABEL4:(void)0; } -/* 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; } -/* method poset#POSetElement#depth for (self: POSetElement[Object]): Int */ -long poset__POSetElement__depth(val* self) { -long var /* : Int */; -val* var1 /* : Collection[Object] */; -short int var2 /* : Bool */; -long var3 /* : Int */; -long var4 /* : Int */; -long var5 /* : Int */; -long var7 /* : Int */; -long var_min /* var min: Int */; -val* var8 /* : Collection[Object] */; -val* var9 /* : Iterator[nullable Object] */; -short int var10 /* : Bool */; -val* var11 /* : nullable Object */; -val* var_p /* var p: Object */; -val* var12 /* : POSet[Object] */; -val* var13 /* : POSetElement[Object] */; -long var14 /* : Int */; -long var15 /* : Int */; -long var16 /* : Int */; -long var18 /* : Int */; -long var_d /* var d: Int */; -short int var19 /* : Bool */; -long var20 /* : Int */; -long var21 /* : Int */; -long var23 /* : Int */; -short int var24 /* : Bool */; -short int var26 /* : Bool */; -short int var_ /* var : Bool */; -short int var27 /* : Bool */; -short int var29 /* : Bool */; -int cltype; -int idtype; -const char* var_class_name; -short int var30 /* : Bool */; -var1 = ((val* (*)(val*))(self->class->vft[COLOR_poset__POSetElement__direct_greaters]))(self) /* direct_greaters on */; -var2 = ((short int (*)(val*))(var1->class->vft[COLOR_abstract_collection__Collection__is_empty]))(var1) /* is_empty on */; -if (var2){ -var3 = 0; -var = var3; -goto RET_LABEL; +if (var_t == NULL) { +var6 = (var3 != NULL); } else { +var7 = ((short int(*)(val* self, val* p0))((((long)var_t&3)?class_info[((long)var_t&3)]:var_t->class)->vft[COLOR_core__kernel__Object___33d_61d]))(var_t, var3); /* != on */ +var6 = var7; } -var4 = 1; -{ /* Inline kernel#Int#unary - (var4) */ -var7 = -var4; -var5 = var7; -goto RET_LABEL6; -RET_LABEL6:(void)0; +var_ = var6; +if (var6){ +{ +{ /* Inline poset$POSetElement$tos (self) on */ +var10 = self->attrs[COLOR_poset__POSetElement___tos].val; /* _tos on */ +if (unlikely(var10 == NULL)) { +if(catchStack.cursor >= 0){ +longjmp(catchStack.envs[catchStack.cursor], 1); } -var_min = var5; -var8 = ((val* (*)(val*))(self->class->vft[COLOR_poset__POSetElement__direct_greaters]))(self) /* direct_greaters on */; -var9 = ((val* (*)(val*))(var8->class->vft[COLOR_abstract_collection__Collection__iterator]))(var8) /* iterator on */; -for(;;) { -var10 = ((short int (*)(val*))(var9->class->vft[COLOR_abstract_collection__Iterator__is_ok]))(var9) /* is_ok on */; -if(!var10) break; -var11 = ((val* (*)(val*))(var9->class->vft[COLOR_abstract_collection__Iterator__item]))(var9) /* item on */; -var_p = var11; -var12 = ((val* (*)(val*))(self->class->vft[COLOR_poset__POSetElement__poset]))(self) /* poset on */; -var13 = ((val* (*)(val*, val*))(var12->class->vft[COLOR_poset__POSet___91d_93d]))(var12, var_p) /* [] on */; -var14 = ((long (*)(val*))(var13->class->vft[COLOR_poset__POSetElement__depth]))(var13) /* depth on */; -var15 = 1; -{ /* Inline kernel#Int#+ (var14,var15) */ -var18 = var14 + var15; -var16 = var18; -goto RET_LABEL17; -RET_LABEL17:(void)0; +PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _tos"); +PRINT_ERROR(" (%s:%d)\n", FILE_poset, 532); +fatal_exit(1); } -var_d = var16; -var20 = 1; -{ /* Inline kernel#Int#unary - (var20) */ -var23 = -var20; -var21 = var23; -goto RET_LABEL22; -RET_LABEL22:(void)0; +var8 = var10; +RET_LABEL9:(void)0; } -{ /* Inline kernel#Int#== (var_min,var21) */ -var26 = var_min == var21; -var24 = var26; -goto RET_LABEL25; -RET_LABEL25:(void)0; } -var_ = var24; -if (var24){ -var19 = var_; -} else { -{ /* Inline kernel#Int#< (var_d,var_min) */ -/* Covariant cast for argument 0 (i) isa OTHER */ -/* isa OTHER */ -var29 = 1; /* easy isa OTHER*/ -if (!var29) { -var_class_name = type_kernel__Int.name; -fprintf(stderr, "Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name); -fprintf(stderr, " (%s:%d)\n", "lib/standard/kernel.nit", 265); -show_backtrace(1); -} -var30 = var_d < var_min; -var27 = var30; -goto RET_LABEL28; -RET_LABEL28:(void)0; -} -var19 = var27; -} -if (var19){ -var_min = var_d; -} else { +{ +var11 = core___core__HashSet___core__abstract_collection__Collection__has(var8, var_t); } -CONTINUE_label: (void)0; -((void (*)(val*))(var9->class->vft[COLOR_abstract_collection__Iterator__next]))(var9) /* next on */; +var2 = var11; +} else { +var2 = var_; } -BREAK_label: (void)0; -var = var_min; +var = var2; goto RET_LABEL; RET_LABEL:; return var; } -/* method poset#POSetElement#depth for (self: Object): Int */ -long VIRTUAL_poset__POSetElement__depth(val* self) { -long var /* : Int */; -long var1 /* : Int */; -var1 = poset__POSetElement__depth(self); -var = var1; -RET_LABEL:; -return var; -} -/* 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); -show_backtrace(1); -} -/* 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; -} 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); -show_backtrace(1); -} -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 */ -RET_LABEL:; +/* method poset$POSetElement$init for (self: POSetElement[nullable Object]) */ +void poset___poset__POSetElement___core__kernel__Object__init(val* self) { +{ +((void(*)(val* self))(self->class->vft[COLOR_poset___poset__POSetElement___core__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:; }