X-Git-Url: http://nitlanguage.org diff --git a/c_src/core__array.sep.1.c b/c_src/core__array.sep.1.c index f643b05..138bc76 100644 --- a/c_src/core__array.sep.1.c +++ b/c_src/core__array.sep.1.c @@ -1,5 +1,5 @@ #include "core__array.sep.0.h" -/* method array#AbstractArrayRead#length for (self: AbstractArrayRead[nullable Object]): Int */ +/* method array$AbstractArrayRead$length for (self: AbstractArrayRead[nullable Object]): Int */ long core___core__AbstractArrayRead___core__abstract_collection__Collection__length(val* self) { long var /* : Int */; long var1 /* : Int */; @@ -8,12 +8,12 @@ var = var1; RET_LABEL:; return var; } -/* method array#AbstractArrayRead#length= for (self: AbstractArrayRead[nullable Object], Int) */ +/* method array$AbstractArrayRead$length= for (self: AbstractArrayRead[nullable Object], Int) */ void core___core__AbstractArrayRead___length_61d(val* self, long p0) { self->attrs[COLOR_core__array__AbstractArrayRead___length].l = p0; /* _length on */ RET_LABEL:; } -/* method array#AbstractArrayRead#is_empty for (self: AbstractArrayRead[nullable Object]): Bool */ +/* method array$AbstractArrayRead$is_empty for (self: AbstractArrayRead[nullable Object]): Bool */ short int core___core__AbstractArrayRead___core__abstract_collection__Collection__is_empty(val* self) { short int var /* : Bool */; long var1 /* : Int */; @@ -21,7 +21,7 @@ short int var2 /* : Bool */; short int var4 /* : Bool */; var1 = self->attrs[COLOR_core__array__AbstractArrayRead___length].l; /* _length on */ { -{ /* Inline kernel#Int#== (var1,0l) on */ +{ /* Inline kernel$Int$== (var1,0l) on */ var4 = var1 == 0l; var2 = var4; goto RET_LABEL3; @@ -33,7 +33,7 @@ goto RET_LABEL; RET_LABEL:; return var; } -/* method array#AbstractArrayRead#has for (self: AbstractArrayRead[nullable Object], nullable Object): Bool */ +/* method array$AbstractArrayRead$has for (self: AbstractArrayRead[nullable Object], nullable Object): Bool */ short int core___core__AbstractArrayRead___core__abstract_collection__Collection__has(val* self, val* p0) { short int var /* : Bool */; val* var_item /* var item: nullable Object */; @@ -63,14 +63,14 @@ var1 = ((long(*)(val* self))(self->class->vft[COLOR_core__abstract_collection__C var_l = var1; for(;;) { { -{ /* Inline kernel#Int#< (var_i,var_l) on */ +{ /* Inline kernel$Int$< (var_i,var_l) on */ /* Covariant cast for argument 0 (i) isa OTHER */ /* isa OTHER */ var4 = 1; /* easy isa OTHER*/ if (unlikely(!var4)) { 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); +PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 725); fatal_exit(1); } var5 = var_i < var_l; @@ -95,14 +95,14 @@ goto RET_LABEL; } else { } { -{ /* Inline kernel#Int#+ (var_i,1l) on */ +{ /* Inline kernel$Int$+ (var_i,1l) on */ /* Covariant cast for argument 0 (i) <1l:Int> isa OTHER */ /* <1l:Int> isa OTHER */ var11 = 1; /* easy <1l:Int> isa OTHER*/ if (unlikely(!var11)) { var_class_name14 = type_core__Int.name; PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name14); -PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 731); +PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 728); fatal_exit(1); } var15 = var_i + 1l; @@ -122,7 +122,120 @@ goto RET_LABEL; RET_LABEL:; return var; } -/* method array#AbstractArrayRead#index_of for (self: AbstractArrayRead[nullable Object], nullable Object): Int */ +/* method array$AbstractArrayRead$count for (self: AbstractArrayRead[nullable Object], nullable Object): Int */ +long core___core__AbstractArrayRead___core__abstract_collection__Collection__count(val* self, val* p0) { +long var /* : Int */; +val* var_item /* var item: nullable Object */; +long var_res /* var res: Int */; +long var_i /* var i: Int */; +long var1 /* : Int */; +long var_l /* var l: Int */; +short int var2 /* : Bool */; +short int var4 /* : Bool */; +int cltype; +int idtype; +const char* var_class_name; +short int var5 /* : Bool */; +val* var6 /* : nullable Object */; +short int var7 /* : Bool */; +short int var8 /* : Bool */; +long var9 /* : Int */; +short int var11 /* : Bool */; +int cltype12; +int idtype13; +const char* var_class_name14; +long var15 /* : Int */; +long var16 /* : Int */; +short int var18 /* : Bool */; +int cltype19; +int idtype20; +const char* var_class_name21; +long var22 /* : Int */; +var_item = p0; +var_res = 0l; +var_i = 0l; +{ +var1 = ((long(*)(val* self))(self->class->vft[COLOR_core__abstract_collection__Collection__length]))(self); /* length on */ +} +var_l = var1; +for(;;) { +{ +{ /* Inline kernel$Int$< (var_i,var_l) on */ +/* Covariant cast for argument 0 (i) isa OTHER */ +/* isa OTHER */ +var4 = 1; /* easy isa OTHER*/ +if (unlikely(!var4)) { +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, 725); +fatal_exit(1); +} +var5 = var_i < var_l; +var2 = var5; +goto RET_LABEL3; +RET_LABEL3:(void)0; +} +} +if (var2){ +{ +var6 = ((val*(*)(val* self, long p0))(self->class->vft[COLOR_core__abstract_collection__SequenceRead___91d_93d]))(self, var_i); /* [] on */ +} +if (var6 == NULL) { +var7 = (var_item == NULL); +} else { +var8 = ((short int(*)(val* self, val* p0))((((long)var6&3)?class_info[((long)var6&3)]:var6->class)->vft[COLOR_core__kernel__Object___61d_61d]))(var6, var_item); /* == on */ +var7 = var8; +} +if (var7){ +{ +{ /* Inline kernel$Int$+ (var_res,1l) on */ +/* Covariant cast for argument 0 (i) <1l:Int> isa OTHER */ +/* <1l:Int> isa OTHER */ +var11 = 1; /* easy <1l:Int> isa OTHER*/ +if (unlikely(!var11)) { +var_class_name14 = type_core__Int.name; +PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name14); +PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 728); +fatal_exit(1); +} +var15 = var_res + 1l; +var9 = var15; +goto RET_LABEL10; +RET_LABEL10:(void)0; +} +} +var_res = var9; +} else { +} +{ +{ /* Inline kernel$Int$+ (var_i,1l) on */ +/* Covariant cast for argument 0 (i) <1l:Int> isa OTHER */ +/* <1l:Int> isa OTHER */ +var18 = 1; /* easy <1l:Int> isa OTHER*/ +if (unlikely(!var18)) { +var_class_name21 = type_core__Int.name; +PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name21); +PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 728); +fatal_exit(1); +} +var22 = var_i + 1l; +var16 = var22; +goto RET_LABEL17; +RET_LABEL17:(void)0; +} +} +var_i = var16; +} else { +goto BREAK_label; +} +} +BREAK_label: (void)0; +var = var_res; +goto RET_LABEL; +RET_LABEL:; +return var; +} +/* method array$AbstractArrayRead$index_of for (self: AbstractArrayRead[nullable Object], nullable Object): Int */ long core___core__AbstractArrayRead___core__abstract_collection__SequenceRead__index_of(val* self, val* p0) { long var /* : Int */; val* var_item /* var item: nullable Object */; @@ -136,7 +249,7 @@ goto RET_LABEL; RET_LABEL:; return var; } -/* method array#AbstractArrayRead#last_index_of for (self: AbstractArrayRead[nullable Object], nullable Object): Int */ +/* method array$AbstractArrayRead$last_index_of for (self: AbstractArrayRead[nullable Object], nullable Object): Int */ long core___core__AbstractArrayRead___core__abstract_collection__SequenceRead__last_index_of(val* self, val* p0) { long var /* : Int */; val* var_item /* var item: nullable Object */; @@ -153,14 +266,14 @@ var_item = p0; var1 = ((long(*)(val* self))(self->class->vft[COLOR_core__abstract_collection__Collection__length]))(self); /* length on */ } { -{ /* Inline kernel#Int#- (var1,1l) on */ +{ /* Inline kernel$Int$- (var1,1l) on */ /* Covariant cast for argument 0 (i) <1l:Int> isa OTHER */ /* <1l:Int> isa OTHER */ var4 = 1; /* easy <1l:Int> isa OTHER*/ if (unlikely(!var4)) { 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, 734); +PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 731); fatal_exit(1); } var5 = var1 - 1l; @@ -177,7 +290,7 @@ goto RET_LABEL; RET_LABEL:; return var; } -/* method array#AbstractArrayRead#index_of_from for (self: AbstractArrayRead[nullable Object], nullable Object, Int): Int */ +/* method array$AbstractArrayRead$index_of_from for (self: AbstractArrayRead[nullable Object], nullable Object, Int): Int */ long core___core__AbstractArrayRead___core__abstract_collection__SequenceRead__index_of_from(val* self, val* p0, long p1) { long var /* : Int */; val* var_item /* var item: nullable Object */; @@ -211,14 +324,14 @@ var1 = ((long(*)(val* self))(self->class->vft[COLOR_core__abstract_collection__C var_len = var1; for(;;) { { -{ /* Inline kernel#Int#< (var_i,var_len) on */ +{ /* Inline kernel$Int$< (var_i,var_len) on */ /* Covariant cast for argument 0 (i) isa OTHER */ /* isa OTHER */ var4 = 1; /* easy isa OTHER*/ if (unlikely(!var4)) { 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); +PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 725); fatal_exit(1); } var5 = var_i < var_len; @@ -243,14 +356,14 @@ goto RET_LABEL; } else { } { -{ /* Inline kernel#Int#+ (var_i,1l) on */ +{ /* Inline kernel$Int$+ (var_i,1l) on */ /* Covariant cast for argument 0 (i) <1l:Int> isa OTHER */ /* <1l:Int> isa OTHER */ var11 = 1; /* easy <1l:Int> isa OTHER*/ if (unlikely(!var11)) { var_class_name14 = type_core__Int.name; PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name14); -PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 731); +PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 728); fatal_exit(1); } var15 = var_i + 1l; @@ -266,7 +379,7 @@ goto BREAK_label; } BREAK_label: (void)0; { -{ /* Inline kernel#Int#unary - (1l) on <1l:Int> */ +{ /* Inline kernel$Int$unary - (1l) on <1l:Int> */ var18 = -1l; var16 = var18; goto RET_LABEL17; @@ -278,7 +391,7 @@ goto RET_LABEL; RET_LABEL:; return var; } -/* method array#AbstractArrayRead#last_index_of_from for (self: AbstractArrayRead[nullable Object], nullable Object, Int): Int */ +/* method array$AbstractArrayRead$last_index_of_from for (self: AbstractArrayRead[nullable Object], nullable Object, Int): Int */ long core___core__AbstractArrayRead___core__abstract_collection__SequenceRead__last_index_of_from(val* self, val* p0, long p1) { long var /* : Int */; val* var_item /* var item: nullable Object */; @@ -306,14 +419,14 @@ var_pos = p1; var_i = var_pos; for(;;) { { -{ /* Inline kernel#Int#>= (var_i,0l) on */ +{ /* Inline kernel$Int$>= (var_i,0l) on */ /* Covariant cast for argument 0 (i) <0l:Int> isa OTHER */ /* <0l:Int> isa OTHER */ var3 = 1; /* easy <0l:Int> isa OTHER*/ if (unlikely(!var3)) { 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, 729); +PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 726); fatal_exit(1); } var4 = var_i >= 0l; @@ -337,14 +450,14 @@ var = var_i; goto RET_LABEL; } else { { -{ /* Inline kernel#Int#- (var_i,1l) on */ +{ /* Inline kernel$Int$- (var_i,1l) on */ /* Covariant cast for argument 0 (i) <1l:Int> isa OTHER */ /* <1l:Int> isa OTHER */ var10 = 1; /* easy <1l:Int> isa OTHER*/ if (unlikely(!var10)) { var_class_name13 = type_core__Int.name; PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name13); -PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 734); +PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 731); fatal_exit(1); } var14 = var_i - 1l; @@ -361,7 +474,7 @@ goto BREAK_label; } BREAK_label: (void)0; { -{ /* Inline kernel#Int#unary - (1l) on <1l:Int> */ +{ /* Inline kernel$Int$unary - (1l) on <1l:Int> */ var17 = -1l; var15 = var17; goto RET_LABEL16; @@ -373,7 +486,7 @@ goto RET_LABEL; RET_LABEL:; return var; } -/* method array#AbstractArrayRead#reversed for (self: AbstractArrayRead[nullable Object]): Array[nullable Object] */ +/* method array$AbstractArrayRead$reversed for (self: AbstractArrayRead[nullable Object]): Array[nullable Object] */ val* core___core__AbstractArrayRead___reversed(val* self) { val* var /* : Array[nullable Object] */; long var1 /* : Int */; @@ -397,19 +510,19 @@ var1 = self->attrs[COLOR_core__array__AbstractArrayRead___length].l; /* _length var_cmp = var1; var2 = NEW_core__Array(self->type->resolution_table->types[COLOR_core__Array__core__AbstractArrayRead___35dE]); { -core___core__Array___with_capacity(var2, var_cmp); /* Direct call array#Array#with_capacity on */ +core___core__Array___with_capacity(var2, var_cmp); /* Direct call array$Array$with_capacity on */ } var_result = var2; for(;;) { { -{ /* Inline kernel#Int#> (var_cmp,0l) on */ +{ /* Inline kernel$Int$> (var_cmp,0l) on */ /* Covariant cast for argument 0 (i) <0l:Int> isa OTHER */ /* <0l:Int> isa OTHER */ var5 = 1; /* easy <0l:Int> isa OTHER*/ if (unlikely(!var5)) { 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, 730); +PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 727); fatal_exit(1); } var6 = var_cmp > 0l; @@ -420,14 +533,14 @@ RET_LABEL4:(void)0; } if (var3){ { -{ /* Inline kernel#Int#- (var_cmp,1l) on */ +{ /* Inline kernel$Int$- (var_cmp,1l) on */ /* Covariant cast for argument 0 (i) <1l:Int> isa OTHER */ /* <1l:Int> isa OTHER */ var9 = 1; /* easy <1l:Int> isa OTHER*/ if (unlikely(!var9)) { var_class_name12 = type_core__Int.name; PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name12); -PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 734); +PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 731); fatal_exit(1); } var13 = var_cmp - 1l; @@ -441,7 +554,7 @@ var_cmp = var7; var14 = ((val*(*)(val* self, long p0))(self->class->vft[COLOR_core__abstract_collection__SequenceRead___91d_93d]))(self, var_cmp); /* [] on */ } { -core___core__Array___core__abstract_collection__SimpleCollection__add(var_result, var14); /* Direct call array#Array#add on */ +core___core__Array___core__abstract_collection__SimpleCollection__add(var_result, var14); /* Direct call array$Array$add on */ } } else { goto BREAK_label; @@ -453,7 +566,7 @@ goto RET_LABEL; RET_LABEL:; return var; } -/* method array#AbstractArrayRead#copy_to for (self: AbstractArrayRead[nullable Object], Int, Int, AbstractArray[nullable Object], Int) */ +/* method array$AbstractArrayRead$copy_to for (self: AbstractArrayRead[nullable Object], Int, Int, AbstractArray[nullable Object], Int) */ void core___core__AbstractArrayRead___copy_to(val* self, long p0, long p1, val* p2, long p3) { short int var /* : Bool */; int cltype; @@ -543,14 +656,14 @@ var_len = p1; var_dest = p2; var_new_start = p3; { -{ /* Inline kernel#Int#< (var_start,var_new_start) on */ +{ /* Inline kernel$Int$< (var_start,var_new_start) on */ /* Covariant cast for argument 0 (i) isa OTHER */ /* isa OTHER */ var3 = 1; /* easy isa OTHER*/ if (unlikely(!var3)) { var_class_name6 = type_core__Int.name; PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name6); -PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 728); +PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 725); fatal_exit(1); } var7 = var_start < var_new_start; @@ -563,14 +676,14 @@ if (var1){ var_i = var_len; for(;;) { { -{ /* Inline kernel#Int#> (var_i,0l) on */ +{ /* Inline kernel$Int$> (var_i,0l) on */ /* Covariant cast for argument 0 (i) <0l:Int> isa OTHER */ /* <0l:Int> isa OTHER */ var10 = 1; /* easy <0l:Int> isa OTHER*/ if (unlikely(!var10)) { var_class_name13 = type_core__Int.name; PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name13); -PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 730); +PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 727); fatal_exit(1); } var14 = var_i > 0l; @@ -581,14 +694,14 @@ RET_LABEL9:(void)0; } if (var8){ { -{ /* Inline kernel#Int#- (var_i,1l) on */ +{ /* Inline kernel$Int$- (var_i,1l) on */ /* Covariant cast for argument 0 (i) <1l:Int> isa OTHER */ /* <1l:Int> isa OTHER */ var17 = 1; /* easy <1l:Int> isa OTHER*/ if (unlikely(!var17)) { var_class_name20 = type_core__Int.name; PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name20); -PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 734); +PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 731); fatal_exit(1); } var21 = var_i - 1l; @@ -599,14 +712,14 @@ RET_LABEL16:(void)0; } var_i = var15; { -{ /* Inline kernel#Int#+ (var_new_start,var_i) on */ +{ /* Inline kernel$Int$+ (var_new_start,var_i) on */ /* Covariant cast for argument 0 (i) isa OTHER */ /* isa OTHER */ var24 = 1; /* easy isa OTHER*/ if (unlikely(!var24)) { var_class_name27 = type_core__Int.name; PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name27); -PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 731); +PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 728); fatal_exit(1); } var28 = var_new_start + var_i; @@ -616,14 +729,14 @@ RET_LABEL23:(void)0; } } { -{ /* Inline kernel#Int#+ (var_start,var_i) on */ +{ /* Inline kernel$Int$+ (var_start,var_i) on */ /* Covariant cast for argument 0 (i) isa OTHER */ /* isa OTHER */ var31 = 1; /* easy isa OTHER*/ if (unlikely(!var31)) { var_class_name34 = type_core__Int.name; PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name34); -PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 731); +PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 728); fatal_exit(1); } var35 = var_start + var_i; @@ -647,14 +760,14 @@ BREAK_label: (void)0; var_i37 = 0l; for(;;) { { -{ /* Inline kernel#Int#< (var_i37,var_len) on */ +{ /* Inline kernel$Int$< (var_i37,var_len) on */ /* Covariant cast for argument 0 (i) isa OTHER */ /* isa OTHER */ var40 = 1; /* easy isa OTHER*/ if (unlikely(!var40)) { var_class_name43 = type_core__Int.name; PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name43); -PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 728); +PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 725); fatal_exit(1); } var44 = var_i37 < var_len; @@ -665,14 +778,14 @@ RET_LABEL39:(void)0; } if (var38){ { -{ /* Inline kernel#Int#+ (var_new_start,var_i37) on */ +{ /* Inline kernel$Int$+ (var_new_start,var_i37) on */ /* Covariant cast for argument 0 (i) isa OTHER */ /* isa OTHER */ var47 = 1; /* easy isa OTHER*/ if (unlikely(!var47)) { var_class_name50 = type_core__Int.name; PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name50); -PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 731); +PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 728); fatal_exit(1); } var51 = var_new_start + var_i37; @@ -682,14 +795,14 @@ RET_LABEL46:(void)0; } } { -{ /* Inline kernel#Int#+ (var_start,var_i37) on */ +{ /* Inline kernel$Int$+ (var_start,var_i37) on */ /* Covariant cast for argument 0 (i) isa OTHER */ /* isa OTHER */ var54 = 1; /* easy isa OTHER*/ if (unlikely(!var54)) { var_class_name57 = type_core__Int.name; PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name57); -PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 731); +PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 728); fatal_exit(1); } var58 = var_start + var_i37; @@ -705,14 +818,14 @@ var59 = ((val*(*)(val* self, long p0))(self->class->vft[COLOR_core__abstract_col ((void(*)(val* self, long p0, val* p1))(var_dest->class->vft[COLOR_core__abstract_collection__Sequence___91d_93d_61d]))(var_dest, var45, var59); /* []= on */ } { -{ /* Inline kernel#Int#+ (var_i37,1l) on */ +{ /* Inline kernel$Int$+ (var_i37,1l) on */ /* Covariant cast for argument 0 (i) <1l:Int> isa OTHER */ /* <1l:Int> isa OTHER */ var62 = 1; /* easy <1l:Int> isa OTHER*/ if (unlikely(!var62)) { var_class_name65 = type_core__Int.name; PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name65); -PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 731); +PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 728); fatal_exit(1); } var66 = var_i37 + 1l; @@ -730,7 +843,7 @@ BREAK_label67: (void)0; } RET_LABEL:; } -/* method array#AbstractArrayRead#iterator for (self: AbstractArrayRead[nullable Object]): IndexedIterator[nullable Object] */ +/* method array$AbstractArrayRead$iterator for (self: AbstractArrayRead[nullable Object]): IndexedIterator[nullable Object] */ val* core___core__AbstractArrayRead___core__abstract_collection__Collection__iterator(val* self) { val* var /* : IndexedIterator[nullable Object] */; val* var1 /* : nullable ArrayIterator[nullable Object] */; @@ -749,10 +862,10 @@ var2 = 1; /* is null */ var2 = 0; /* arg is null but recv is not */ } if (0) { -{ /* Inline kernel#Object#== (var_res,((val*)NULL)) on */ +{ /* Inline kernel$Object$== (var_res,((val*)NULL)) on */ var_other = ((val*)NULL); { -{ /* Inline kernel#Object#is_same_instance (var_res,var_other) on */ +{ /* Inline kernel$Object$is_same_instance (var_res,var_other) on */ var7 = var_res == var_other; var5 = var7; goto RET_LABEL6; @@ -784,7 +897,7 @@ goto RET_LABEL; RET_LABEL:; return var; } -/* method array#AbstractArrayRead#reverse_iterator for (self: AbstractArrayRead[nullable Object]): IndexedIterator[nullable Object] */ +/* method array$AbstractArrayRead$reverse_iterator for (self: AbstractArrayRead[nullable Object]): IndexedIterator[nullable Object] */ val* core___core__AbstractArrayRead___core__abstract_collection__SequenceRead__reverse_iterator(val* self) { val* var /* : IndexedIterator[nullable Object] */; val* var1 /* : ArrayReverseIterator[nullable Object] */; @@ -800,7 +913,7 @@ goto RET_LABEL; RET_LABEL:; return var; } -/* method array#AbstractArrayRead#sub for (self: AbstractArrayRead[nullable Object], Int, Int): Array[nullable Object] */ +/* method array$AbstractArrayRead$sub for (self: AbstractArrayRead[nullable Object], Int, Int): Array[nullable Object] */ val* core___core__AbstractArrayRead___sub(val* self, long p0, long p1) { val* var /* : Array[nullable Object] */; long var_from /* var from: Int */; @@ -862,14 +975,14 @@ long var57 /* : Int */; var_from = p0; var_count = p1; { -{ /* Inline kernel#Int#< (var_from,0l) on */ +{ /* Inline kernel$Int$< (var_from,0l) on */ /* Covariant cast for argument 0 (i) <0l:Int> isa OTHER */ /* <0l:Int> isa OTHER */ var3 = 1; /* easy <0l:Int> isa OTHER*/ if (unlikely(!var3)) { 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); +PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 725); fatal_exit(1); } var4 = var_from < 0l; @@ -880,14 +993,14 @@ RET_LABEL2:(void)0; } if (var1){ { -{ /* Inline kernel#Int#+ (var_count,var_from) on */ +{ /* Inline kernel$Int$+ (var_count,var_from) on */ /* Covariant cast for argument 0 (i) isa OTHER */ /* isa OTHER */ var7 = 1; /* easy isa OTHER*/ if (unlikely(!var7)) { var_class_name10 = type_core__Int.name; PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name10); -PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 731); +PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 728); fatal_exit(1); } var11 = var_count + var_from; @@ -901,14 +1014,14 @@ var_from = 0l; } else { } { -{ /* Inline kernel#Int#< (var_count,0l) on */ +{ /* Inline kernel$Int$< (var_count,0l) on */ /* Covariant cast for argument 0 (i) <0l:Int> isa OTHER */ /* <0l:Int> isa OTHER */ var14 = 1; /* easy <0l:Int> isa OTHER*/ if (unlikely(!var14)) { var_class_name17 = type_core__Int.name; PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name17); -PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 728); +PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 725); fatal_exit(1); } var18 = var_count < 0l; @@ -922,14 +1035,14 @@ var_count = 0l; } else { } { -{ /* Inline kernel#Int#+ (var_from,var_count) on */ +{ /* Inline kernel$Int$+ (var_from,var_count) 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, 731); +PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 728); fatal_exit(1); } var25 = var_from + var_count; @@ -943,14 +1056,14 @@ var_to = var19; var26 = ((long(*)(val* self))(self->class->vft[COLOR_core__abstract_collection__Collection__length]))(self); /* length on */ } { -{ /* Inline kernel#Int#> (var_to,var26) on */ +{ /* Inline kernel$Int$> (var_to,var26) on */ /* Covariant cast for argument 0 (i) isa OTHER */ /* isa OTHER */ var29 = 1; /* easy isa OTHER*/ if (unlikely(!var29)) { var_class_name32 = type_core__Int.name; PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name32); -PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 730); +PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 727); fatal_exit(1); } var33 = var_to > var26; @@ -968,14 +1081,14 @@ var_to = var34; } var35 = NEW_core__Array(self->type->resolution_table->types[COLOR_core__Array__core__AbstractArrayRead___35dE]); { -{ /* Inline kernel#Int#- (var_to,var_from) on */ +{ /* Inline kernel$Int$- (var_to,var_from) on */ /* Covariant cast for argument 0 (i) isa OTHER */ /* isa OTHER */ var38 = 1; /* easy isa OTHER*/ if (unlikely(!var38)) { var_class_name41 = type_core__Int.name; PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name41); -PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 734); +PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 731); fatal_exit(1); } var42 = var_to - var_from; @@ -985,19 +1098,19 @@ RET_LABEL37:(void)0; } } { -core___core__Array___with_capacity(var35, var36); /* Direct call array#Array#with_capacity on */ +core___core__Array___with_capacity(var35, var36); /* Direct call array$Array$with_capacity on */ } var_res = var35; for(;;) { { -{ /* Inline kernel#Int#< (var_from,var_to) on */ +{ /* Inline kernel$Int$< (var_from,var_to) on */ /* Covariant cast for argument 0 (i) isa OTHER */ /* isa OTHER */ var45 = 1; /* easy isa OTHER*/ if (unlikely(!var45)) { var_class_name48 = type_core__Int.name; PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name48); -PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 728); +PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 725); fatal_exit(1); } var49 = var_from < var_to; @@ -1011,17 +1124,17 @@ if (var43){ var50 = ((val*(*)(val* self, long p0))(self->class->vft[COLOR_core__abstract_collection__SequenceRead___91d_93d]))(self, var_from); /* [] on */ } { -core___core__Array___core__abstract_collection__SimpleCollection__add(var_res, var50); /* Direct call array#Array#add on */ +core___core__Array___core__abstract_collection__SimpleCollection__add(var_res, var50); /* Direct call array$Array$add on */ } { -{ /* Inline kernel#Int#+ (var_from,1l) on */ +{ /* Inline kernel$Int$+ (var_from,1l) on */ /* Covariant cast for argument 0 (i) <1l:Int> isa OTHER */ /* <1l:Int> isa OTHER */ var53 = 1; /* easy <1l:Int> isa OTHER*/ if (unlikely(!var53)) { var_class_name56 = type_core__Int.name; PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name56); -PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 731); +PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 728); fatal_exit(1); } var57 = var_from + 1l; @@ -1041,7 +1154,7 @@ goto RET_LABEL; RET_LABEL:; return var; } -/* method array#AbstractArray#push for (self: AbstractArray[nullable Object], nullable Object) */ +/* method array$AbstractArray$push for (self: AbstractArray[nullable Object], nullable Object) */ void core___core__AbstractArray___core__abstract_collection__Sequence__push(val* self, val* p0) { short int var /* : Bool */; int cltype; @@ -1077,7 +1190,7 @@ var_item = p0; } RET_LABEL:; } -/* method array#AbstractArray#pop for (self: AbstractArray[nullable Object]): nullable Object */ +/* method array$AbstractArray$pop for (self: AbstractArray[nullable Object]): nullable Object */ val* core___core__AbstractArray___core__abstract_collection__Sequence__pop(val* self) { val* var /* : nullable Object */; short int var1 /* : Bool */; @@ -1097,6 +1210,9 @@ var1 = ((short int(*)(val* self))(self->class->vft[COLOR_core__abstract_collecti } var2 = !var1; if (unlikely(!var2)) { +if(catchStack.cursor >= 0){ +longjmp(catchStack.envs[catchStack.cursor], 1); +} PRINT_ERROR("Runtime error: %s", "Assert \'not_empty\' failed"); PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 220); fatal_exit(1); @@ -1108,14 +1224,14 @@ var_r = var3; var_ = self; var4 = var_->attrs[COLOR_core__array__AbstractArrayRead___length].l; /* _length on */ { -{ /* Inline kernel#Int#- (var4,1l) on */ +{ /* Inline kernel$Int$- (var4,1l) on */ /* Covariant cast for argument 0 (i) <1l:Int> isa OTHER */ /* <1l:Int> isa OTHER */ var7 = 1; /* easy <1l:Int> isa OTHER*/ if (unlikely(!var7)) { 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, 734); +PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 731); fatal_exit(1); } var8 = var4 - 1l; @@ -1130,7 +1246,7 @@ goto RET_LABEL; RET_LABEL:; return var; } -/* method array#AbstractArray#shift for (self: AbstractArray[nullable Object]): nullable Object */ +/* method array$AbstractArray$shift for (self: AbstractArray[nullable Object]): nullable Object */ val* core___core__AbstractArray___core__abstract_collection__Sequence__shift(val* self) { val* var /* : nullable Object */; short int var1 /* : Bool */; @@ -1150,6 +1266,9 @@ var1 = ((short int(*)(val* self))(self->class->vft[COLOR_core__abstract_collecti } var2 = !var1; if (unlikely(!var2)) { +if(catchStack.cursor >= 0){ +longjmp(catchStack.envs[catchStack.cursor], 1); +} PRINT_ERROR("Runtime error: %s", "Assert \'not_empty\' failed"); PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 228); fatal_exit(1); @@ -1162,14 +1281,14 @@ var_r = var3; var4 = ((long(*)(val* self))(self->class->vft[COLOR_core__abstract_collection__Collection__length]))(self); /* length on */ } { -{ /* Inline kernel#Int#- (var4,1l) on */ +{ /* Inline kernel$Int$- (var4,1l) on */ /* Covariant cast for argument 0 (i) <1l:Int> isa OTHER */ /* <1l:Int> isa OTHER */ var7 = 1; /* easy <1l:Int> isa OTHER*/ if (unlikely(!var7)) { 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, 734); +PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 731); fatal_exit(1); } var8 = var4 - 1l; @@ -1188,7 +1307,7 @@ goto RET_LABEL; RET_LABEL:; return var; } -/* method array#AbstractArray#unshift for (self: AbstractArray[nullable Object], nullable Object) */ +/* method array$AbstractArray$unshift for (self: AbstractArray[nullable Object], nullable Object) */ void core___core__AbstractArray___core__abstract_collection__Sequence__unshift(val* self, val* p0) { short int var /* : Bool */; int cltype; @@ -1238,14 +1357,14 @@ var1 = ((long(*)(val* self))(self->class->vft[COLOR_core__abstract_collection__C } var_l = var1; { -{ /* Inline kernel#Int#> (var_l,0l) on */ +{ /* Inline kernel$Int$> (var_l,0l) on */ /* Covariant cast for argument 0 (i) <0l:Int> isa OTHER */ /* <0l:Int> isa OTHER */ var4 = 1; /* easy <0l:Int> isa OTHER*/ if (unlikely(!var4)) { var_class_name7 = type_core__Int.name; PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name7); -PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 730); +PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 727); fatal_exit(1); } var8 = var_l > 0l; @@ -1256,14 +1375,14 @@ RET_LABEL3:(void)0; } if (var2){ { -{ /* Inline kernel#Int#+ (var_l,1l) on */ +{ /* Inline kernel$Int$+ (var_l,1l) on */ /* Covariant cast for argument 0 (i) <1l:Int> isa OTHER */ /* <1l:Int> isa OTHER */ var11 = 1; /* easy <1l:Int> isa OTHER*/ if (unlikely(!var11)) { var_class_name14 = type_core__Int.name; PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name14); -PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 731); +PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 728); fatal_exit(1); } var15 = var_l + 1l; @@ -1285,7 +1404,7 @@ RET_LABEL10:(void)0; } RET_LABEL:; } -/* method array#AbstractArray#insert for (self: AbstractArray[nullable Object], nullable Object, Int) */ +/* method array$AbstractArray$insert for (self: AbstractArray[nullable Object], nullable Object, Int) */ void core___core__AbstractArray___core__abstract_collection__Sequence__insert(val* self, val* p0, long p1) { short int var /* : Bool */; int cltype; @@ -1342,14 +1461,14 @@ var_pos = p1; var1 = ((long(*)(val* self))(self->class->vft[COLOR_core__abstract_collection__Collection__length]))(self); /* length on */ } { -{ /* Inline kernel#Int#+ (var1,1l) on */ +{ /* Inline kernel$Int$+ (var1,1l) on */ /* Covariant cast for argument 0 (i) <1l:Int> isa OTHER */ /* <1l:Int> isa OTHER */ var4 = 1; /* easy <1l:Int> isa OTHER*/ if (unlikely(!var4)) { var_class_name7 = type_core__Int.name; PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name7); -PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 731); +PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 728); fatal_exit(1); } var8 = var1 + 1l; @@ -1365,14 +1484,14 @@ RET_LABEL3:(void)0; var9 = ((long(*)(val* self))(self->class->vft[COLOR_core__abstract_collection__Collection__length]))(self); /* length on */ } { -{ /* Inline kernel#Int#- (var9,var_pos) on */ +{ /* Inline kernel$Int$- (var9,var_pos) on */ /* Covariant cast for argument 0 (i) isa OTHER */ /* isa OTHER */ var12 = 1; /* easy isa OTHER*/ if (unlikely(!var12)) { var_class_name15 = type_core__Int.name; PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name15); -PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 734); +PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 731); fatal_exit(1); } var16 = var9 - var_pos; @@ -1382,14 +1501,14 @@ RET_LABEL11:(void)0; } } { -{ /* Inline kernel#Int#+ (var_pos,1l) on */ +{ /* Inline kernel$Int$+ (var_pos,1l) on */ /* Covariant cast for argument 0 (i) <1l:Int> isa OTHER */ /* <1l:Int> isa OTHER */ var19 = 1; /* easy <1l:Int> isa OTHER*/ if (unlikely(!var19)) { var_class_name22 = type_core__Int.name; PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name22); -PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 731); +PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 728); fatal_exit(1); } var23 = var_pos + 1l; @@ -1406,7 +1525,7 @@ RET_LABEL18:(void)0; } RET_LABEL:; } -/* method array#AbstractArray#insert_all for (self: AbstractArray[nullable Object], Collection[nullable Object], Int) */ +/* method array$AbstractArray$insert_all for (self: AbstractArray[nullable Object], Collection[nullable Object], Int) */ void core___core__AbstractArray___core__abstract_collection__Sequence__insert_all(val* self, val* p0, long p1) { short int var /* : Bool */; int cltype; @@ -1488,7 +1607,7 @@ var1 = ((long(*)(val* self))((((long)var_coll&3)?class_info[((long)var_coll&3)]: } var_l = var1; { -{ /* Inline kernel#Int#== (var_l,0l) on */ +{ /* Inline kernel$Int$== (var_l,0l) on */ var4 = var_l == 0l; var2 = var4; goto RET_LABEL3; @@ -1503,14 +1622,14 @@ goto RET_LABEL; var5 = ((long(*)(val* self))(self->class->vft[COLOR_core__abstract_collection__Collection__length]))(self); /* length on */ } { -{ /* Inline kernel#Int#+ (var5,var_l) on */ +{ /* Inline kernel$Int$+ (var5,var_l) on */ /* Covariant cast for argument 0 (i) isa OTHER */ /* isa OTHER */ var8 = 1; /* easy isa OTHER*/ if (unlikely(!var8)) { var_class_name11 = type_core__Int.name; PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name11); -PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 731); +PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 728); fatal_exit(1); } var12 = var5 + var_l; @@ -1525,14 +1644,14 @@ RET_LABEL7:(void)0; var_ = self; var13 = var_->attrs[COLOR_core__array__AbstractArrayRead___length].l; /* _length on */ { -{ /* Inline kernel#Int#+ (var13,var_l) on */ +{ /* Inline kernel$Int$+ (var13,var_l) on */ /* Covariant cast for argument 0 (i) isa OTHER */ /* isa OTHER */ var16 = 1; /* easy isa OTHER*/ if (unlikely(!var16)) { var_class_name19 = type_core__Int.name; PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name19); -PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 731); +PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 728); fatal_exit(1); } var20 = var13 + var_l; @@ -1546,14 +1665,14 @@ var_->attrs[COLOR_core__array__AbstractArrayRead___length].l = var14; /* _length var21 = ((long(*)(val* self))(self->class->vft[COLOR_core__abstract_collection__Collection__length]))(self); /* length on */ } { -{ /* Inline kernel#Int#- (var21,var_pos) on */ +{ /* Inline kernel$Int$- (var21,var_pos) on */ /* Covariant cast for argument 0 (i) isa OTHER */ /* isa OTHER */ var24 = 1; /* easy isa OTHER*/ if (unlikely(!var24)) { var_class_name27 = type_core__Int.name; PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name27); -PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 734); +PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 731); fatal_exit(1); } var28 = var21 - var_pos; @@ -1563,14 +1682,14 @@ RET_LABEL23:(void)0; } } { -{ /* Inline kernel#Int#- (var22,var_l) on */ +{ /* Inline kernel$Int$- (var22,var_l) on */ /* Covariant cast for argument 0 (i) isa OTHER */ /* isa OTHER */ var31 = 1; /* easy isa OTHER*/ if (unlikely(!var31)) { var_class_name34 = type_core__Int.name; PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name34); -PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 734); +PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 731); fatal_exit(1); } var35 = var22 - var_l; @@ -1580,14 +1699,14 @@ RET_LABEL30:(void)0; } } { -{ /* Inline kernel#Int#+ (var_pos,var_l) on */ +{ /* Inline kernel$Int$+ (var_pos,var_l) on */ /* Covariant cast for argument 0 (i) isa OTHER */ /* isa OTHER */ var38 = 1; /* easy isa OTHER*/ if (unlikely(!var38)) { var_class_name41 = type_core__Int.name; PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name41); -PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 731); +PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 728); fatal_exit(1); } var42 = var_pos + var_l; @@ -1620,14 +1739,14 @@ var_c = var47; ((void(*)(val* self, long p0, val* p1))(self->class->vft[COLOR_core__abstract_collection__Sequence___91d_93d_61d]))(self, var_pos, var_c); /* []= on */ } { -{ /* Inline kernel#Int#+ (var_pos,1l) on */ +{ /* Inline kernel$Int$+ (var_pos,1l) on */ /* Covariant cast for argument 0 (i) <1l:Int> isa OTHER */ /* <1l:Int> isa OTHER */ var50 = 1; /* easy <1l:Int> isa OTHER*/ if (unlikely(!var50)) { var_class_name53 = type_core__Int.name; PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name53); -PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 731); +PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 728); fatal_exit(1); } var54 = var_pos + 1l; @@ -1647,12 +1766,12 @@ BREAK_label: (void)0; } RET_LABEL:; } -/* method array#AbstractArray#clear for (self: AbstractArray[nullable Object]) */ +/* method array$AbstractArray$clear for (self: AbstractArray[nullable Object]) */ void core___core__AbstractArray___core__abstract_collection__RemovableCollection__clear(val* self) { self->attrs[COLOR_core__array__AbstractArrayRead___length].l = 0l; /* _length on */ RET_LABEL:; } -/* method array#AbstractArray#remove for (self: AbstractArray[nullable Object], nullable Object) */ +/* method array$AbstractArray$remove for (self: AbstractArray[nullable Object], nullable Object) */ void core___core__AbstractArray___core__abstract_collection__RemovableCollection__remove(val* self, val* p0) { val* var_item /* var item: nullable Object */; long var /* : Int */; @@ -1661,11 +1780,11 @@ var_item = p0; var = core___core__AbstractArrayRead___core__abstract_collection__SequenceRead__index_of(self, var_item); } { -core___core__AbstractArray___core__abstract_collection__Sequence__remove_at(self, var); /* Direct call array#AbstractArray#remove_at on */ +core___core__AbstractArray___core__abstract_collection__Sequence__remove_at(self, var); /* Direct call array$AbstractArray$remove_at on */ } RET_LABEL:; } -/* method array#AbstractArray#remove_at for (self: AbstractArray[nullable Object], Int) */ +/* method array$AbstractArray$remove_at for (self: AbstractArray[nullable Object], Int) */ void core___core__AbstractArray___core__abstract_collection__Sequence__remove_at(val* self, long p0) { long var_i /* var i: Int */; long var /* : Int */; @@ -1722,14 +1841,14 @@ var = ((long(*)(val* self))(self->class->vft[COLOR_core__abstract_collection__Co } var_l = var; { -{ /* Inline kernel#Int#>= (var_i,0l) on */ +{ /* Inline kernel$Int$>= (var_i,0l) on */ /* Covariant cast for argument 0 (i) <0l:Int> isa OTHER */ /* <0l:Int> isa OTHER */ var4 = 1; /* easy <0l:Int> isa OTHER*/ if (unlikely(!var4)) { 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, 729); +PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 726); fatal_exit(1); } var5 = var_i >= 0l; @@ -1741,14 +1860,14 @@ RET_LABEL3:(void)0; var_ = var2; if (var2){ { -{ /* Inline kernel#Int#< (var_i,var_l) on */ +{ /* Inline kernel$Int$< (var_i,var_l) on */ /* Covariant cast for argument 0 (i) isa OTHER */ /* isa OTHER */ var8 = 1; /* easy isa OTHER*/ if (unlikely(!var8)) { var_class_name11 = type_core__Int.name; PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name11); -PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 728); +PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 725); fatal_exit(1); } var12 = var_i < var_l; @@ -1763,14 +1882,14 @@ var1 = var_; } if (var1){ { -{ /* Inline kernel#Int#+ (var_i,1l) on */ +{ /* Inline kernel$Int$+ (var_i,1l) on */ /* Covariant cast for argument 0 (i) <1l:Int> isa OTHER */ /* <1l:Int> isa OTHER */ var15 = 1; /* easy <1l:Int> isa OTHER*/ if (unlikely(!var15)) { var_class_name18 = type_core__Int.name; PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name18); -PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 731); +PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 728); fatal_exit(1); } var19 = var_i + 1l; @@ -1782,14 +1901,14 @@ RET_LABEL14:(void)0; var_j = var13; for(;;) { { -{ /* Inline kernel#Int#< (var_j,var_l) on */ +{ /* Inline kernel$Int$< (var_j,var_l) on */ /* Covariant cast for argument 0 (i) isa OTHER */ /* isa OTHER */ var22 = 1; /* easy isa OTHER*/ if (unlikely(!var22)) { var_class_name25 = type_core__Int.name; PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name25); -PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 728); +PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 725); fatal_exit(1); } var26 = var_j < var_l; @@ -1800,14 +1919,14 @@ RET_LABEL21:(void)0; } if (var20){ { -{ /* Inline kernel#Int#- (var_j,1l) on */ +{ /* Inline kernel$Int$- (var_j,1l) on */ /* Covariant cast for argument 0 (i) <1l:Int> isa OTHER */ /* <1l:Int> isa OTHER */ var29 = 1; /* easy <1l:Int> isa OTHER*/ if (unlikely(!var29)) { var_class_name32 = type_core__Int.name; PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name32); -PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 734); +PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 731); fatal_exit(1); } var33 = var_j - 1l; @@ -1823,14 +1942,14 @@ var34 = ((val*(*)(val* self, long p0))(self->class->vft[COLOR_core__abstract_col ((void(*)(val* self, long p0, val* p1))(self->class->vft[COLOR_core__abstract_collection__Sequence___91d_93d_61d]))(self, var27, var34); /* []= on */ } { -{ /* Inline kernel#Int#+ (var_j,1l) on */ +{ /* Inline kernel$Int$+ (var_j,1l) on */ /* Covariant cast for argument 0 (i) <1l:Int> isa OTHER */ /* <1l:Int> isa OTHER */ var37 = 1; /* easy <1l:Int> isa OTHER*/ if (unlikely(!var37)) { var_class_name40 = type_core__Int.name; PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name40); -PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 731); +PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 728); fatal_exit(1); } var41 = var_j + 1l; @@ -1846,14 +1965,14 @@ goto BREAK_label; } BREAK_label: (void)0; { -{ /* Inline kernel#Int#- (var_l,1l) on */ +{ /* Inline kernel$Int$- (var_l,1l) on */ /* Covariant cast for argument 0 (i) <1l:Int> isa OTHER */ /* <1l:Int> isa OTHER */ var44 = 1; /* easy <1l:Int> isa OTHER*/ if (unlikely(!var44)) { var_class_name47 = type_core__Int.name; PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name47); -PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 734); +PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 731); fatal_exit(1); } var48 = var_l - 1l; @@ -1867,7 +1986,7 @@ self->attrs[COLOR_core__array__AbstractArrayRead___length].l = var42; /* _length } RET_LABEL:; } -/* method array#Array#[] for (self: Array[nullable Object], Int): nullable Object */ +/* method array$Array$[] for (self: Array[nullable Object], Int): nullable Object */ val* core___core__Array___core__abstract_collection__SequenceRead___91d_93d(val* self, long p0) { val* var /* : nullable Object */; long var_index /* var index: Int */; @@ -1891,14 +2010,14 @@ val* var15 /* : nullable Object */; val* var17 /* : Object */; var_index = p0; { -{ /* Inline kernel#Int#>= (var_index,0l) on */ +{ /* Inline kernel$Int$>= (var_index,0l) on */ /* Covariant cast for argument 0 (i) <0l:Int> isa OTHER */ /* <0l:Int> isa OTHER */ var4 = 1; /* easy <0l:Int> isa OTHER*/ if (unlikely(!var4)) { 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, 729); +PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 726); fatal_exit(1); } var5 = var_index >= 0l; @@ -1911,14 +2030,14 @@ var_ = var2; if (var2){ var6 = self->attrs[COLOR_core__array__AbstractArrayRead___length].l; /* _length on */ { -{ /* Inline kernel#Int#< (var_index,var6) on */ +{ /* Inline kernel$Int$< (var_index,var6) on */ /* Covariant cast for argument 0 (i) isa OTHER */ /* isa OTHER */ var9 = 1; /* easy isa OTHER*/ if (unlikely(!var9)) { var_class_name12 = type_core__Int.name; PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name12); -PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 728); +PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 725); fatal_exit(1); } var13 = var_index < var6; @@ -1932,17 +2051,24 @@ var1 = var7; var1 = var_; } if (unlikely(!var1)) { +if(catchStack.cursor >= 0){ +longjmp(catchStack.envs[catchStack.cursor], 1); +} PRINT_ERROR("Runtime error: %s", "Assert \'index\' failed"); PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 323); fatal_exit(1); } var14 = self->attrs[COLOR_core__array__Array___items].val; /* _items on */ -if (var14 == NULL) { -PRINT_ERROR("Runtime error: %s", "Receiver is null"); +if (unlikely(var14 == NULL)) { +if(catchStack.cursor >= 0){ +longjmp(catchStack.envs[catchStack.cursor], 1); +} +PRINT_ERROR("Runtime error: %s", "Cast failed"); PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 324); fatal_exit(1); -} else { -{ /* Inline array#NativeArray#[] (var14,var_index) on */ +} +{ +{ /* Inline array$NativeArray$[] (var14,var_index) on */ var17 = ((struct instance_core__NativeArray*)var14)->values[var_index]; var15 = var17; goto RET_LABEL16; @@ -1954,7 +2080,7 @@ goto RET_LABEL; RET_LABEL:; return var; } -/* method array#Array#[]= for (self: Array[nullable Object], Int, nullable Object) */ +/* method array$Array$[]= for (self: Array[nullable Object], Int, nullable Object) */ void core___core__Array___core__abstract_collection__Sequence___91d_93d_61d(val* self, long p0, val* p1) { short int var /* : Bool */; int cltype; @@ -2042,14 +2168,14 @@ fatal_exit(1); var_index = p0; var_item = p1; { -{ /* Inline kernel#Int#>= (var_index,0l) on */ +{ /* Inline kernel$Int$>= (var_index,0l) on */ /* Covariant cast for argument 0 (i) <0l:Int> isa OTHER */ /* <0l:Int> isa OTHER */ var4 = 1; /* easy <0l:Int> isa OTHER*/ if (unlikely(!var4)) { var_class_name7 = type_core__Int.name; PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name7); -PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 729); +PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 726); fatal_exit(1); } var8 = var_index >= 0l; @@ -2062,14 +2188,14 @@ var_ = var2; if (var2){ var9 = self->attrs[COLOR_core__array__AbstractArrayRead___length].l; /* _length on */ { -{ /* Inline kernel#Int#+ (var9,1l) on */ +{ /* Inline kernel$Int$+ (var9,1l) on */ /* Covariant cast for argument 0 (i) <1l:Int> isa OTHER */ /* <1l:Int> isa OTHER */ var12 = 1; /* easy <1l:Int> isa OTHER*/ if (unlikely(!var12)) { var_class_name15 = type_core__Int.name; PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name15); -PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 731); +PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 728); fatal_exit(1); } var16 = var9 + 1l; @@ -2079,14 +2205,14 @@ RET_LABEL11:(void)0; } } { -{ /* Inline kernel#Int#< (var_index,var10) on */ +{ /* Inline kernel$Int$< (var_index,var10) on */ /* Covariant cast for argument 0 (i) isa OTHER */ /* isa OTHER */ var19 = 1; /* easy isa OTHER*/ if (unlikely(!var19)) { var_class_name22 = type_core__Int.name; PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name22); -PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 728); +PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 725); fatal_exit(1); } var23 = var_index < var10; @@ -2100,20 +2226,23 @@ var1 = var17; var1 = var_; } if (unlikely(!var1)) { +if(catchStack.cursor >= 0){ +longjmp(catchStack.envs[catchStack.cursor], 1); +} PRINT_ERROR("Runtime error: %s", "Assert \'index\' failed"); PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 329); fatal_exit(1); } var24 = self->attrs[COLOR_core__array__Array___capacity].l; /* _capacity on */ { -{ /* Inline kernel#Int#<= (var24,var_index) on */ +{ /* Inline kernel$Int$<= (var24,var_index) on */ /* Covariant cast for argument 0 (i) isa OTHER */ /* isa OTHER */ var27 = 1; /* easy isa OTHER*/ if (unlikely(!var27)) { var_class_name30 = type_core__Int.name; PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name30); -PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 727); +PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 724); fatal_exit(1); } var31 = var24 <= var_index; @@ -2124,14 +2253,14 @@ RET_LABEL26:(void)0; } if (var25){ { -{ /* Inline kernel#Int#+ (var_index,1l) on */ +{ /* Inline kernel$Int$+ (var_index,1l) on */ /* Covariant cast for argument 0 (i) <1l:Int> isa OTHER */ /* <1l:Int> isa OTHER */ var34 = 1; /* easy <1l:Int> isa OTHER*/ if (unlikely(!var34)) { var_class_name37 = type_core__Int.name; PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name37); -PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 731); +PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 728); fatal_exit(1); } var38 = var_index + 1l; @@ -2141,20 +2270,20 @@ RET_LABEL33:(void)0; } } { -core___core__Array___AbstractArray__enlarge(self, var32); /* Direct call array#Array#enlarge on */ +core___core__Array___AbstractArray__enlarge(self, var32); /* Direct call array$Array$enlarge on */ } } else { } var39 = self->attrs[COLOR_core__array__AbstractArrayRead___length].l; /* _length on */ { -{ /* Inline kernel#Int#<= (var39,var_index) on */ +{ /* Inline kernel$Int$<= (var39,var_index) on */ /* Covariant cast for argument 0 (i) isa OTHER */ /* isa OTHER */ var42 = 1; /* easy isa OTHER*/ if (unlikely(!var42)) { var_class_name45 = type_core__Int.name; PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name45); -PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 727); +PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 724); fatal_exit(1); } var46 = var39 <= var_index; @@ -2165,14 +2294,14 @@ RET_LABEL41:(void)0; } if (var40){ { -{ /* Inline kernel#Int#+ (var_index,1l) on */ +{ /* Inline kernel$Int$+ (var_index,1l) on */ /* Covariant cast for argument 0 (i) <1l:Int> isa OTHER */ /* <1l:Int> isa OTHER */ var49 = 1; /* easy <1l:Int> isa OTHER*/ if (unlikely(!var49)) { var_class_name52 = type_core__Int.name; PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name52); -PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 731); +PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 728); fatal_exit(1); } var53 = var_index + 1l; @@ -2185,12 +2314,16 @@ self->attrs[COLOR_core__array__AbstractArrayRead___length].l = var47; /* _length } else { } var54 = self->attrs[COLOR_core__array__Array___items].val; /* _items on */ -if (var54 == NULL) { -PRINT_ERROR("Runtime error: %s", "Receiver is null"); +if (unlikely(var54 == NULL)) { +if(catchStack.cursor >= 0){ +longjmp(catchStack.envs[catchStack.cursor], 1); +} +PRINT_ERROR("Runtime error: %s", "Cast failed"); PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 336); fatal_exit(1); -} else { -{ /* Inline array#NativeArray#[]= (var54,var_index,var_item) on */ +} +{ +{ /* Inline array$NativeArray$[]= (var54,var_index,var_item) on */ /* Covariant cast for argument 1 (item) isa E */ /* isa E */ type_struct59 = var54->type->resolution_table->types[COLOR_core__NativeArray___35dE]; @@ -2209,7 +2342,7 @@ var56 = (((long)var_item&3)?type_info[((long)var_item&3)]:var_item->type)->type_ if (unlikely(!var56)) { var_class_name61 = var_item == NULL ? "null" : (((long)var_item&3)?type_info[((long)var_item&3)]:var_item->type)->name; PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "E", var_class_name61); -PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 988); +PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 991); fatal_exit(1); } ((struct instance_core__NativeArray*)var54)->values[var_index]=var_item; @@ -2218,7 +2351,7 @@ RET_LABEL55:(void)0; } RET_LABEL:; } -/* method array#Array#add for (self: Array[nullable Object], nullable Object) */ +/* method array$Array$add for (self: Array[nullable Object], nullable Object) */ void core___core__Array___core__abstract_collection__SimpleCollection__add(val* self, val* p0) { short int var /* : Bool */; int cltype; @@ -2281,14 +2414,14 @@ var1 = self->attrs[COLOR_core__array__AbstractArrayRead___length].l; /* _length var_l = var1; var2 = self->attrs[COLOR_core__array__Array___capacity].l; /* _capacity on */ { -{ /* Inline kernel#Int#<= (var2,var_l) on */ +{ /* Inline kernel$Int$<= (var2,var_l) on */ /* Covariant cast for argument 0 (i) isa OTHER */ /* isa OTHER */ var5 = 1; /* easy isa OTHER*/ if (unlikely(!var5)) { var_class_name8 = type_core__Int.name; PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name8); -PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 727); +PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 724); fatal_exit(1); } var9 = var2 <= var_l; @@ -2299,14 +2432,14 @@ RET_LABEL4:(void)0; } if (var3){ { -{ /* Inline kernel#Int#+ (var_l,1l) on */ +{ /* Inline kernel$Int$+ (var_l,1l) on */ /* Covariant cast for argument 0 (i) <1l:Int> isa OTHER */ /* <1l:Int> isa OTHER */ var12 = 1; /* easy <1l:Int> isa OTHER*/ if (unlikely(!var12)) { var_class_name15 = type_core__Int.name; PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name15); -PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 731); +PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 728); fatal_exit(1); } var16 = var_l + 1l; @@ -2316,19 +2449,19 @@ RET_LABEL11:(void)0; } } { -core___core__Array___AbstractArray__enlarge(self, var10); /* Direct call array#Array#enlarge on */ +core___core__Array___AbstractArray__enlarge(self, var10); /* Direct call array$Array$enlarge on */ } } else { } { -{ /* Inline kernel#Int#+ (var_l,1l) on */ +{ /* Inline kernel$Int$+ (var_l,1l) on */ /* Covariant cast for argument 0 (i) <1l:Int> isa OTHER */ /* <1l:Int> isa OTHER */ var19 = 1; /* easy <1l:Int> isa OTHER*/ if (unlikely(!var19)) { var_class_name22 = type_core__Int.name; PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name22); -PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 731); +PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 728); fatal_exit(1); } var23 = var_l + 1l; @@ -2339,12 +2472,16 @@ RET_LABEL18:(void)0; } self->attrs[COLOR_core__array__AbstractArrayRead___length].l = var17; /* _length on */ var24 = self->attrs[COLOR_core__array__Array___items].val; /* _items on */ -if (var24 == NULL) { -PRINT_ERROR("Runtime error: %s", "Receiver is null"); +if (unlikely(var24 == NULL)) { +if(catchStack.cursor >= 0){ +longjmp(catchStack.envs[catchStack.cursor], 1); +} +PRINT_ERROR("Runtime error: %s", "Cast failed"); PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 346); fatal_exit(1); -} else { -{ /* Inline array#NativeArray#[]= (var24,var_l,var_item) on */ +} +{ +{ /* Inline array$NativeArray$[]= (var24,var_l,var_item) on */ /* Covariant cast for argument 1 (item) isa E */ /* isa E */ type_struct29 = var24->type->resolution_table->types[COLOR_core__NativeArray___35dE]; @@ -2363,7 +2500,7 @@ var26 = (((long)var_item&3)?type_info[((long)var_item&3)]:var_item->type)->type_ if (unlikely(!var26)) { var_class_name31 = var_item == NULL ? "null" : (((long)var_item&3)?type_info[((long)var_item&3)]:var_item->type)->name; PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "E", var_class_name31); -PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 988); +PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 991); fatal_exit(1); } ((struct instance_core__NativeArray*)var24)->values[var_l]=var_item; @@ -2372,7 +2509,7 @@ RET_LABEL25:(void)0; } RET_LABEL:; } -/* method array#Array#add_all for (self: Array[nullable Object], Collection[nullable Object]) */ +/* method array$Array$add_all for (self: Array[nullable Object], Collection[nullable Object]) */ void core___core__Array___core__abstract_collection__SimpleCollection__add_all(val* self, val* p0) { short int var /* : Bool */; int cltype; @@ -2472,14 +2609,14 @@ var_l = var1; var2 = ((long(*)(val* self))((((long)var_items&3)?class_info[((long)var_items&3)]:var_items->class)->vft[COLOR_core__abstract_collection__Collection__length]))(var_items); /* length on */ } { -{ /* Inline kernel#Int#+ (var_l,var2) on */ +{ /* Inline kernel$Int$+ (var_l,var2) on */ /* Covariant cast for argument 0 (i) isa OTHER */ /* isa OTHER */ var5 = 1; /* easy isa OTHER*/ if (unlikely(!var5)) { var_class_name8 = type_core__Int.name; PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name8); -PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 731); +PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 728); fatal_exit(1); } var9 = var_l + var2; @@ -2491,14 +2628,14 @@ RET_LABEL4:(void)0; var_nl = var3; var10 = self->attrs[COLOR_core__array__Array___capacity].l; /* _capacity on */ { -{ /* Inline kernel#Int#< (var10,var_nl) on */ +{ /* Inline kernel$Int$< (var10,var_nl) on */ /* Covariant cast for argument 0 (i) isa OTHER */ /* isa OTHER */ var13 = 1; /* easy isa OTHER*/ if (unlikely(!var13)) { var_class_name16 = type_core__Int.name; PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name16); -PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 728); +PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 725); fatal_exit(1); } var17 = var10 < var_nl; @@ -2509,7 +2646,7 @@ RET_LABEL12:(void)0; } if (var11){ { -core___core__Array___AbstractArray__enlarge(self, var_nl); /* Direct call array#Array#enlarge on */ +core___core__Array___AbstractArray__enlarge(self, var_nl); /* Direct call array$Array$enlarge on */ } } else { } @@ -2526,14 +2663,14 @@ if (var18){ var_k = 0l; for(;;) { { -{ /* Inline kernel#Int#< (var_l,var_nl) on */ +{ /* Inline kernel$Int$< (var_l,var_nl) on */ /* Covariant cast for argument 0 (i) isa OTHER */ /* isa OTHER */ var24 = 1; /* easy isa OTHER*/ if (unlikely(!var24)) { var_class_name27 = type_core__Int.name; PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name27); -PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 728); +PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 725); fatal_exit(1); } var28 = var_l < var_nl; @@ -2544,25 +2681,33 @@ RET_LABEL23:(void)0; } if (var22){ var29 = self->attrs[COLOR_core__array__Array___items].val; /* _items on */ +if (unlikely(var29 == NULL)) { +if(catchStack.cursor >= 0){ +longjmp(catchStack.envs[catchStack.cursor], 1); +} +PRINT_ERROR("Runtime error: %s", "Cast failed"); +PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 361); +fatal_exit(1); +} var30 = var_items->attrs[COLOR_core__array__Array___items].val; /* _items on */ -if (var30 == NULL) { -PRINT_ERROR("Runtime error: %s", "Receiver is null"); +if (unlikely(var30 == NULL)) { +if(catchStack.cursor >= 0){ +longjmp(catchStack.envs[catchStack.cursor], 1); +} +PRINT_ERROR("Runtime error: %s", "Cast failed"); PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 361); fatal_exit(1); -} else { -{ /* Inline array#NativeArray#[] (var30,var_k) on */ +} +{ +{ /* Inline array$NativeArray$[] (var30,var_k) on */ var33 = ((struct instance_core__NativeArray*)var30)->values[var_k]; var31 = var33; goto RET_LABEL32; RET_LABEL32:(void)0; } } -if (var29 == NULL) { -PRINT_ERROR("Runtime error: %s", "Receiver is null"); -PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 361); -fatal_exit(1); -} else { -{ /* Inline array#NativeArray#[]= (var29,var_l,var31) on */ +{ +{ /* Inline array$NativeArray$[]= (var29,var_l,var31) on */ /* Covariant cast for argument 1 (item) isa E */ /* isa E */ type_struct38 = var29->type->resolution_table->types[COLOR_core__NativeArray___35dE]; @@ -2581,7 +2726,7 @@ var35 = (((long)var31&3)?type_info[((long)var31&3)]:var31->type)->type_table[clt if (unlikely(!var35)) { var_class_name39 = var31 == NULL ? "null" : (((long)var31&3)?type_info[((long)var31&3)]:var31->type)->name; PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "E", var_class_name39); -PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 988); +PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 991); fatal_exit(1); } ((struct instance_core__NativeArray*)var29)->values[var_l]=var31; @@ -2589,14 +2734,14 @@ RET_LABEL34:(void)0; } } { -{ /* Inline kernel#Int#+ (var_l,1l) on */ +{ /* Inline kernel$Int$+ (var_l,1l) on */ /* Covariant cast for argument 0 (i) <1l:Int> isa OTHER */ /* <1l:Int> isa OTHER */ var42 = 1; /* easy <1l:Int> isa OTHER*/ if (unlikely(!var42)) { var_class_name45 = type_core__Int.name; PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name45); -PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 731); +PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 728); fatal_exit(1); } var46 = var_l + 1l; @@ -2607,14 +2752,14 @@ RET_LABEL41:(void)0; } var_l = var40; { -{ /* Inline kernel#Int#+ (var_k,1l) on */ +{ /* Inline kernel$Int$+ (var_k,1l) on */ /* Covariant cast for argument 0 (i) <1l:Int> isa OTHER */ /* <1l:Int> isa OTHER */ var49 = 1; /* easy <1l:Int> isa OTHER*/ if (unlikely(!var49)) { var_class_name52 = type_core__Int.name; PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name52); -PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 731); +PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 728); fatal_exit(1); } var53 = var_k + 1l; @@ -2648,12 +2793,16 @@ var58 = ((val*(*)(val* self))((((long)var_55&3)?class_info[((long)var_55&3)]:var } var_item = var58; var59 = self->attrs[COLOR_core__array__Array___items].val; /* _items on */ -if (var59 == NULL) { -PRINT_ERROR("Runtime error: %s", "Receiver is null"); +if (unlikely(var59 == NULL)) { +if(catchStack.cursor >= 0){ +longjmp(catchStack.envs[catchStack.cursor], 1); +} +PRINT_ERROR("Runtime error: %s", "Cast failed"); PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 367); fatal_exit(1); -} else { -{ /* Inline array#NativeArray#[]= (var59,var_l,var_item) on */ +} +{ +{ /* Inline array$NativeArray$[]= (var59,var_l,var_item) on */ /* Covariant cast for argument 1 (item) isa E */ /* isa E */ type_struct64 = var59->type->resolution_table->types[COLOR_core__NativeArray___35dE]; @@ -2672,7 +2821,7 @@ var61 = (((long)var_item&3)?type_info[((long)var_item&3)]:var_item->type)->type_ if (unlikely(!var61)) { var_class_name66 = var_item == NULL ? "null" : (((long)var_item&3)?type_info[((long)var_item&3)]:var_item->type)->name; PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "E", var_class_name66); -PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 988); +PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 991); fatal_exit(1); } ((struct instance_core__NativeArray*)var59)->values[var_l]=var_item; @@ -2680,14 +2829,14 @@ RET_LABEL60:(void)0; } } { -{ /* Inline kernel#Int#+ (var_l,1l) on */ +{ /* Inline kernel$Int$+ (var_l,1l) on */ /* Covariant cast for argument 0 (i) <1l:Int> isa OTHER */ /* <1l:Int> isa OTHER */ var69 = 1; /* easy <1l:Int> isa OTHER*/ if (unlikely(!var69)) { var_class_name72 = type_core__Int.name; PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name72); -PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 731); +PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 728); fatal_exit(1); } var73 = var_l + 1l; @@ -2709,7 +2858,7 @@ BREAK_label57: (void)0; self->attrs[COLOR_core__array__AbstractArrayRead___length].l = var_nl; /* _length on */ RET_LABEL:; } -/* method array#Array#copy_to for (self: Array[nullable Object], Int, Int, AbstractArray[nullable Object], Int) */ +/* method array$Array$copy_to for (self: Array[nullable Object], Int, Int, AbstractArray[nullable Object], Int) */ void core___core__Array___AbstractArrayRead__copy_to(val* self, long p0, long p1, val* p2, long p3) { short int var /* : Bool */; int cltype; @@ -2756,6 +2905,11 @@ short int var37 /* : Bool */; val* var_other39 /* var other: nullable Object */; short int var40 /* : Bool */; short int var41 /* : Bool */; +short int var43 /* : Bool */; +int cltype44; +int idtype45; +const struct type* type_struct46; +const char* var_class_name47; /* Covariant cast for argument 2 (dest) isa AbstractArray[E] */ /* isa AbstractArray[E] */ type_struct = self->type->resolution_table->types[COLOR_core__AbstractArray__core__Array___35dE]; @@ -2794,14 +2948,14 @@ goto RET_LABEL; } else { } { -{ /* Inline kernel#Int#+ (var_new_start,var_len) on */ +{ /* Inline kernel$Int$+ (var_new_start,var_len) on */ /* Covariant cast for argument 0 (i) isa OTHER */ /* isa OTHER */ var8 = 1; /* easy isa OTHER*/ if (unlikely(!var8)) { var_class_name11 = type_core__Int.name; PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name11); -PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 731); +PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 728); fatal_exit(1); } var12 = var_new_start + var_len; @@ -2812,21 +2966,21 @@ RET_LABEL7:(void)0; } var_dest_len = var6; { -{ /* Inline array#AbstractArrayRead#length (var_dest) on */ +{ /* Inline array$AbstractArrayRead$length (var_dest) on */ var15 = var_dest->attrs[COLOR_core__array__AbstractArrayRead___length].l; /* _length on */ var13 = var15; RET_LABEL14:(void)0; } } { -{ /* Inline kernel#Int#> (var_dest_len,var13) on */ +{ /* Inline kernel$Int$> (var_dest_len,var13) on */ /* Covariant cast for argument 0 (i) isa OTHER */ /* isa OTHER */ var18 = 1; /* easy isa OTHER*/ if (unlikely(!var18)) { var_class_name21 = type_core__Int.name; PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name21); -PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 730); +PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 727); fatal_exit(1); } var22 = var_dest_len > var13; @@ -2837,10 +2991,10 @@ RET_LABEL17:(void)0; } if (var16){ { -core___core__Array___AbstractArray__enlarge(var_dest, var_dest_len); /* Direct call array#Array#enlarge on */ +core___core__Array___AbstractArray__enlarge(var_dest, var_dest_len); /* Direct call array$Array$enlarge on */ } { -{ /* Inline array#AbstractArrayRead#length= (var_dest,var_dest_len) on */ +{ /* Inline array$AbstractArrayRead$length= (var_dest,var_dest_len) on */ var_dest->attrs[COLOR_core__array__AbstractArrayRead___length].l = var_dest_len; /* _length on */ RET_LABEL23:(void)0; } @@ -2848,7 +3002,7 @@ RET_LABEL23:(void)0; } else { } { -{ /* Inline array#Array#items (self) on */ +{ /* Inline array$Array$items (self) on */ var26 = self->attrs[COLOR_core__array__Array___items].val; /* _items on */ var24 = var26; RET_LABEL25:(void)0; @@ -2861,10 +3015,10 @@ var27 = 1; /* is null */ var27 = 0; /* arg is null but recv is not */ } if (0) { -{ /* Inline kernel#Object#== (var_items,((val*)NULL)) on */ +{ /* Inline kernel$Object$== (var_items,((val*)NULL)) on */ var_other = ((val*)NULL); { -{ /* Inline kernel#Object#is_same_instance (var_items,var_other) on */ +{ /* Inline kernel$Object$is_same_instance (var_items,var_other) on */ var32 = var_items == var_other; var30 = var32; goto RET_LABEL31; @@ -2882,7 +3036,7 @@ goto RET_LABEL; } else { } { -{ /* Inline array#Array#items (var_dest) on */ +{ /* Inline array$Array$items (var_dest) on */ var35 = var_dest->attrs[COLOR_core__array__Array___items].val; /* _items on */ var33 = var35; RET_LABEL34:(void)0; @@ -2895,7 +3049,7 @@ var36 = 0; /* is null */ var36 = 1; /* arg is null and recv is not */ } if (0) { -{ /* Inline kernel#Object#!= (var_dest_items,((val*)NULL)) on */ +{ /* Inline kernel$Object$!= (var_dest_items,((val*)NULL)) on */ var_other39 = ((val*)NULL); { var40 = ((short int(*)(val* self, val* p0))(var_dest_items->class->vft[COLOR_core__kernel__Object___61d_61d]))(var_dest_items, var_other39); /* == on */ @@ -2908,16 +3062,38 @@ RET_LABEL38:(void)0; var36 = var37; } if (unlikely(!var36)) { +if(catchStack.cursor >= 0){ +longjmp(catchStack.envs[catchStack.cursor], 1); +} PRINT_ERROR("Runtime error: %s", "Assert failed"); PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 395); fatal_exit(1); } { -core___core__NativeArray___memmove(var_items, var_start, var_len, var_dest_items, var_new_start); /* Direct call array#NativeArray#memmove on */ +{ /* Inline array$NativeArray$memmove (var_items,var_start,var_len,var_dest_items,var_new_start) on */ +/* Covariant cast for argument 2 (dest) isa NativeArray[E] */ +/* isa NativeArray[E] */ +type_struct46 = var_items->type->resolution_table->types[COLOR_core__NativeArray__core__NativeArray___35dE]; +cltype44 = type_struct46->color; +idtype45 = type_struct46->id; +if(cltype44 >= var_dest_items->type->table_size) { +var43 = 0; +} else { +var43 = var_dest_items->type->type_table[cltype44] == idtype45; +} +if (unlikely(!var43)) { +var_class_name47 = var_dest_items == NULL ? "null" : var_dest_items->type->name; +PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "NativeArray[E]", var_class_name47); +PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 997); +fatal_exit(1); +} +memmove(((struct instance_core__NativeArray*)var_dest_items)->values+var_new_start, ((struct instance_core__NativeArray*)var_items)->values+var_start, var_len*sizeof(val*)); +RET_LABEL42:(void)0; +} } RET_LABEL:; } -/* method array#Array#enlarge for (self: Array[nullable Object], Int) */ +/* method array$Array$enlarge for (self: Array[nullable Object], Int) */ void core___core__Array___AbstractArray__enlarge(val* self, long p0) { long var_cap /* var cap: Int */; long var /* : Int */; @@ -2966,14 +3142,14 @@ var_cap = p0; var = self->attrs[COLOR_core__array__Array___capacity].l; /* _capacity on */ var_c = var; { -{ /* Inline kernel#Int#<= (var_cap,var_c) on */ +{ /* Inline kernel$Int$<= (var_cap,var_c) on */ /* Covariant cast for argument 0 (i) isa OTHER */ /* isa OTHER */ var3 = 1; /* easy isa OTHER*/ if (unlikely(!var3)) { 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, 727); +PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 724); fatal_exit(1); } var4 = var_cap <= var_c; @@ -2988,14 +3164,14 @@ goto RET_LABEL; } for(;;) { { -{ /* Inline kernel#Int#<= (var_c,var_cap) on */ +{ /* Inline kernel$Int$<= (var_c,var_cap) on */ /* Covariant cast for argument 0 (i) isa OTHER */ /* isa OTHER */ var7 = 1; /* easy isa OTHER*/ if (unlikely(!var7)) { var_class_name10 = type_core__Int.name; PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name10); -PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 727); +PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 724); fatal_exit(1); } var11 = var_c <= var_cap; @@ -3006,14 +3182,14 @@ RET_LABEL6:(void)0; } if (var5){ { -{ /* Inline kernel#Int#* (var_c,2l) on */ +{ /* Inline kernel$Int$* (var_c,2l) on */ /* Covariant cast for argument 0 (i) <2l:Int> isa OTHER */ /* <2l:Int> isa OTHER */ var14 = 1; /* easy <2l:Int> isa OTHER*/ if (unlikely(!var14)) { var_class_name17 = type_core__Int.name; PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name17); -PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 735); +PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 732); fatal_exit(1); } var18 = var_c * 2l; @@ -3023,14 +3199,14 @@ RET_LABEL13:(void)0; } } { -{ /* Inline kernel#Int#+ (var12,2l) on */ +{ /* Inline kernel$Int$+ (var12,2l) on */ /* Covariant cast for argument 0 (i) <2l:Int> isa OTHER */ /* <2l:Int> isa OTHER */ var21 = 1; /* easy <2l:Int> 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, 731); +PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 728); fatal_exit(1); } var25 = var12 + 2l; @@ -3045,18 +3221,18 @@ goto BREAK_label; } } BREAK_label: (void)0; -var26 = NEW_core__NativeArray(var_c, self->type->resolution_table->types[COLOR_core__NativeArray__core__Array___35dE]); +var26 = NEW_core__NativeArray((int)var_c, self->type->resolution_table->types[COLOR_core__NativeArray__core__Array___35dE]); var_a = var26; var27 = self->attrs[COLOR_core__array__Array___capacity].l; /* _capacity on */ { -{ /* Inline kernel#Int#> (var27,0l) on */ +{ /* Inline kernel$Int$> (var27,0l) on */ /* Covariant cast for argument 0 (i) <0l:Int> isa OTHER */ /* <0l:Int> isa OTHER */ var30 = 1; /* easy <0l:Int> isa OTHER*/ if (unlikely(!var30)) { var_class_name33 = type_core__Int.name; PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name33); -PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 730); +PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 727); fatal_exit(1); } var34 = var27 > 0l; @@ -3067,13 +3243,17 @@ RET_LABEL29:(void)0; } if (var28){ var35 = self->attrs[COLOR_core__array__Array___items].val; /* _items on */ -var36 = self->attrs[COLOR_core__array__AbstractArrayRead___length].l; /* _length on */ -if (var35 == NULL) { -PRINT_ERROR("Runtime error: %s", "Receiver is null"); +if (unlikely(var35 == NULL)) { +if(catchStack.cursor >= 0){ +longjmp(catchStack.envs[catchStack.cursor], 1); +} +PRINT_ERROR("Runtime error: %s", "Cast failed"); PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 407); fatal_exit(1); -} else { -{ /* Inline array#NativeArray#copy_to (var35,var_a,var36) on */ +} +var36 = self->attrs[COLOR_core__array__AbstractArrayRead___length].l; /* _length on */ +{ +{ /* Inline array$NativeArray$copy_to (var35,var_a,var36) on */ /* Covariant cast for argument 0 (dest) isa NativeArray[E] */ /* isa NativeArray[E] */ type_struct = var35->type->resolution_table->types[COLOR_core__NativeArray__core__NativeArray___35dE]; @@ -3087,7 +3267,7 @@ var38 = var_a->type->type_table[cltype39] == idtype40; if (unlikely(!var38)) { var_class_name41 = var_a == NULL ? "null" : var_a->type->name; PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "NativeArray[E]", var_class_name41); -PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 991); +PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 994); fatal_exit(1); } memmove(((struct instance_core__NativeArray*)var_a)->values, ((struct instance_core__NativeArray*)var35)->values, var36*sizeof(val*)); @@ -3100,7 +3280,7 @@ self->attrs[COLOR_core__array__Array___items].val = var_a; /* _items on attrs[COLOR_core__array__Array___capacity].l = var_c; /* _capacity on */ RET_LABEL:; } -/* method array#Array#init for (self: Array[nullable Object]) */ +/* method array$Array$init for (self: Array[nullable Object]) */ void core___core__Array___core__kernel__Object__init(val* self) { { ((void(*)(val* self))(self->class->vft[COLOR_core___core__Array___core__kernel__Object__init]))(self); /* init on */ @@ -3109,7 +3289,7 @@ self->attrs[COLOR_core__array__Array___capacity].l = 0l; /* _capacity on attrs[COLOR_core__array__AbstractArrayRead___length].l = 0l; /* _length on */ RET_LABEL:; } -/* method array#Array#with_capacity for (self: Array[nullable Object], Int) */ +/* method array$Array$with_capacity for (self: Array[nullable Object], Int) */ void core___core__Array___with_capacity(val* self, long p0) { long var_cap /* var cap: Int */; short int var /* : Bool */; @@ -3120,18 +3300,18 @@ const char* var_class_name; short int var3 /* : Bool */; val* var4 /* : NativeArray[nullable Object] */; { -core___core__Array___core__kernel__Object__init(self); /* Direct call array#Array#init on */ +core___core__Array___core__kernel__Object__init(self); /* Direct call array$Array$init on */ } var_cap = p0; { -{ /* Inline kernel#Int#>= (var_cap,0l) on */ +{ /* Inline kernel$Int$>= (var_cap,0l) on */ /* Covariant cast for argument 0 (i) <0l:Int> isa OTHER */ /* <0l:Int> isa OTHER */ var2 = 1; /* easy <0l:Int> isa OTHER*/ if (unlikely(!var2)) { 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, 729); +PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 726); fatal_exit(1); } var3 = var_cap >= 0l; @@ -3141,17 +3321,20 @@ RET_LABEL1:(void)0; } } if (unlikely(!var)) { +if(catchStack.cursor >= 0){ +longjmp(catchStack.envs[catchStack.cursor], 1); +} PRINT_ERROR("Runtime error: %s", "Assert \'positive\' failed"); PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 436); fatal_exit(1); } -var4 = NEW_core__NativeArray(var_cap, self->type->resolution_table->types[COLOR_core__NativeArray__core__Array___35dE]); +var4 = NEW_core__NativeArray((int)var_cap, self->type->resolution_table->types[COLOR_core__NativeArray__core__Array___35dE]); self->attrs[COLOR_core__array__Array___items].val = var4; /* _items on */ self->attrs[COLOR_core__array__Array___capacity].l = var_cap; /* _capacity on */ self->attrs[COLOR_core__array__AbstractArrayRead___length].l = 0l; /* _length on */ RET_LABEL:; } -/* method array#Array#filled_with for (self: Array[nullable Object], nullable Object, Int) */ +/* method array$Array$filled_with for (self: Array[nullable Object], nullable Object, Int) */ void core___core__Array___filled_with(val* self, val* p0, long p1) { short int var /* : Bool */; int cltype; @@ -3203,19 +3386,19 @@ PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 442); fatal_exit(1); } { -core___core__Array___core__kernel__Object__init(self); /* Direct call array#Array#init on */ +core___core__Array___core__kernel__Object__init(self); /* Direct call array$Array$init on */ } var_value = p0; var_count = p1; { -{ /* Inline kernel#Int#>= (var_count,0l) on */ +{ /* Inline kernel$Int$>= (var_count,0l) on */ /* Covariant cast for argument 0 (i) <0l:Int> isa OTHER */ /* <0l:Int> isa OTHER */ var3 = 1; /* easy <0l:Int> isa OTHER*/ if (unlikely(!var3)) { var_class_name6 = type_core__Int.name; PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name6); -PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 729); +PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 726); fatal_exit(1); } var7 = var_count >= 0l; @@ -3225,25 +3408,28 @@ RET_LABEL2:(void)0; } } if (unlikely(!var1)) { +if(catchStack.cursor >= 0){ +longjmp(catchStack.envs[catchStack.cursor], 1); +} PRINT_ERROR("Runtime error: %s", "Assert \'positive\' failed"); PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 445); fatal_exit(1); } -var8 = NEW_core__NativeArray(var_count, self->type->resolution_table->types[COLOR_core__NativeArray__core__Array___35dE]); +var8 = NEW_core__NativeArray((int)var_count, self->type->resolution_table->types[COLOR_core__NativeArray__core__Array___35dE]); self->attrs[COLOR_core__array__Array___items].val = var8; /* _items on */ self->attrs[COLOR_core__array__Array___capacity].l = var_count; /* _capacity on */ self->attrs[COLOR_core__array__AbstractArrayRead___length].l = var_count; /* _length on */ var_i = 0l; for(;;) { { -{ /* Inline kernel#Int#< (var_i,var_count) on */ +{ /* Inline kernel$Int$< (var_i,var_count) on */ /* Covariant cast for argument 0 (i) isa OTHER */ /* isa OTHER */ var11 = 1; /* easy isa OTHER*/ if (unlikely(!var11)) { var_class_name14 = type_core__Int.name; PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name14); -PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 728); +PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 725); fatal_exit(1); } var15 = var_i < var_count; @@ -3254,17 +3440,17 @@ RET_LABEL10:(void)0; } if (var9){ { -core___core__Array___core__abstract_collection__Sequence___91d_93d_61d(self, var_i, var_value); /* Direct call array#Array#[]= on */ +core___core__Array___core__abstract_collection__Sequence___91d_93d_61d(self, var_i, var_value); /* Direct call array$Array$[]= on */ } { -{ /* Inline kernel#Int#+ (var_i,1l) on */ +{ /* Inline kernel$Int$+ (var_i,1l) on */ /* Covariant cast for argument 0 (i) <1l:Int> isa OTHER */ /* <1l:Int> isa OTHER */ var18 = 1; /* easy <1l:Int> isa OTHER*/ if (unlikely(!var18)) { var_class_name21 = type_core__Int.name; PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name21); -PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 731); +PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 728); fatal_exit(1); } var22 = var_i + 1l; @@ -3281,7 +3467,7 @@ goto BREAK_label; BREAK_label: (void)0; RET_LABEL:; } -/* method array#Array#with_native for (self: Array[nullable Object], NativeArray[nullable Object], Int) */ +/* method array$Array$with_native for (self: Array[nullable Object], NativeArray[nullable Object], Int) */ void core___core__Array___with_native(val* self, val* p0, long p1) { short int var /* : Bool */; int cltype; @@ -3313,19 +3499,19 @@ PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 456); fatal_exit(1); } { -core___core__Array___core__kernel__Object__init(self); /* Direct call array#Array#init on */ +core___core__Array___core__kernel__Object__init(self); /* Direct call array$Array$init on */ } var_nat = p0; var_size = p1; { -{ /* Inline kernel#Int#>= (var_size,0l) on */ +{ /* Inline kernel$Int$>= (var_size,0l) on */ /* Covariant cast for argument 0 (i) <0l:Int> isa OTHER */ /* <0l:Int> isa OTHER */ var3 = 1; /* easy <0l:Int> isa OTHER*/ if (unlikely(!var3)) { var_class_name6 = type_core__Int.name; PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name6); -PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 729); +PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 726); fatal_exit(1); } var7 = var_size >= 0l; @@ -3335,6 +3521,9 @@ RET_LABEL2:(void)0; } } if (unlikely(!var1)) { +if(catchStack.cursor >= 0){ +longjmp(catchStack.envs[catchStack.cursor], 1); +} PRINT_ERROR("Runtime error: %s", "Assert \'positive\' failed"); PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 459); fatal_exit(1); @@ -3344,7 +3533,7 @@ self->attrs[COLOR_core__array__Array___capacity].l = var_size; /* _capacity on < self->attrs[COLOR_core__array__AbstractArrayRead___length].l = var_size; /* _length on */ RET_LABEL:; } -/* method array#Array#items for (self: Array[nullable Object]): nullable NativeArray[nullable Object] */ +/* method array$Array$items for (self: Array[nullable Object]): nullable NativeArray[nullable Object] */ val* core___core__Array___items(val* self) { val* var /* : nullable NativeArray[nullable Object] */; val* var1 /* : nullable NativeArray[nullable Object] */; @@ -3353,7 +3542,7 @@ var = var1; RET_LABEL:; return var; } -/* method array#Array#== for (self: Array[nullable Object], nullable Object): Bool */ +/* method array$Array$== for (self: Array[nullable Object], nullable Object): Bool */ short int core___core__Array___core__kernel__Object___61d_61d(val* self, val* p0) { short int var /* : Bool */; val* var_o /* var o: nullable Object */; @@ -3370,29 +3559,31 @@ long var9 /* : Int */; short int var10 /* : Bool */; short int var12 /* : Bool */; short int var13 /* : Bool */; -long var_i /* var i: Int */; -val* var14 /* : nullable NativeArray[nullable Object] */; -val* var_it /* var it: nullable NativeArray[nullable Object] */; -val* var15 /* : nullable NativeArray[nullable Object] */; -val* var_oit /* var oit: nullable NativeArray[nullable Object] */; +short int var14 /* : Bool */; short int var16 /* : Bool */; -short int var18 /* : Bool */; -int cltype19; -int idtype20; -const char* var_class_name; +long var_i /* var i: Int */; +val* var17 /* : nullable NativeArray[nullable Object] */; +val* var_it /* var it: NativeArray[nullable Object] */; +val* var18 /* : nullable NativeArray[nullable Object] */; +val* var_oit /* var oit: NativeArray[nullable Object] */; +short int var19 /* : Bool */; short int var21 /* : Bool */; -val* var22 /* : nullable Object */; -val* var24 /* : Object */; +int cltype22; +int idtype23; +const char* var_class_name; +short int var24 /* : Bool */; val* var25 /* : nullable Object */; val* var27 /* : Object */; -short int var28 /* : Bool */; -short int var29 /* : Bool */; -long var30 /* : Int */; +val* var28 /* : nullable Object */; +val* var30 /* : Object */; +short int var31 /* : Bool */; short int var32 /* : Bool */; -int cltype33; -int idtype34; -const char* var_class_name35; -long var36 /* : Int */; +long var33 /* : Int */; +short int var35 /* : Bool */; +int cltype36; +int idtype37; +const char* var_class_name38; +long var39 /* : Int */; var_o = p0; /* isa Array[nullable Object] */ cltype = type_core__Array__nullable__core__Object.color; @@ -3416,7 +3607,7 @@ goto RET_LABEL; } else { } { -{ /* Inline array#AbstractArrayRead#length (self) on */ +{ /* Inline array$AbstractArrayRead$length (self) on */ var6 = self->attrs[COLOR_core__array__AbstractArrayRead___length].l; /* _length on */ var4 = var6; RET_LABEL5:(void)0; @@ -3424,14 +3615,14 @@ RET_LABEL5:(void)0; } var_l = var4; { -{ /* Inline array#AbstractArrayRead#length (var_o) on */ +{ /* Inline array$AbstractArrayRead$length (var_o) on */ var9 = var_o->attrs[COLOR_core__array__AbstractArrayRead___length].l; /* _length on */ var7 = var9; RET_LABEL8:(void)0; } } { -{ /* Inline kernel#Int#!= (var_l,var7) on */ +{ /* Inline kernel$Int$!= (var_l,var7) on */ var12 = var_l == var7; var13 = !var12; var10 = var13; @@ -3444,83 +3635,104 @@ var = 0; goto RET_LABEL; } else { } +{ +{ /* Inline kernel$Int$== (var_l,0l) on */ +var16 = var_l == 0l; +var14 = var16; +goto RET_LABEL15; +RET_LABEL15:(void)0; +} +} +if (var14){ +var = 1; +goto RET_LABEL; +} else { +} var_i = 0l; -var14 = self->attrs[COLOR_core__array__Array___items].val; /* _items on */ -var_it = var14; -var15 = var_o->attrs[COLOR_core__array__Array___items].val; /* _items on */ -var_oit = var15; +var17 = self->attrs[COLOR_core__array__Array___items].val; /* _items on */ +if (unlikely(var17 == NULL)) { +if(catchStack.cursor >= 0){ +longjmp(catchStack.envs[catchStack.cursor], 1); +} +PRINT_ERROR("Runtime error: %s", "Cast failed"); +PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 479); +fatal_exit(1); +} +var_it = var17; +var18 = var_o->attrs[COLOR_core__array__Array___items].val; /* _items on */ +if (unlikely(var18 == NULL)) { +if(catchStack.cursor >= 0){ +longjmp(catchStack.envs[catchStack.cursor], 1); +} +PRINT_ERROR("Runtime error: %s", "Cast failed"); +PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 480); +fatal_exit(1); +} +var_oit = var18; for(;;) { { -{ /* Inline kernel#Int#< (var_i,var_l) on */ +{ /* Inline kernel$Int$< (var_i,var_l) on */ /* Covariant cast for argument 0 (i) isa OTHER */ /* isa OTHER */ -var18 = 1; /* easy isa OTHER*/ -if (unlikely(!var18)) { +var21 = 1; /* easy isa OTHER*/ +if (unlikely(!var21)) { 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); +PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 725); fatal_exit(1); } -var21 = var_i < var_l; -var16 = var21; -goto RET_LABEL17; -RET_LABEL17:(void)0; -} -} -if (var16){ -if (var_it == NULL) { -PRINT_ERROR("Runtime error: %s", "Receiver is null"); -PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 481); -fatal_exit(1); -} else { -{ /* Inline array#NativeArray#[] (var_it,var_i) on */ -var24 = ((struct instance_core__NativeArray*)var_it)->values[var_i]; -var22 = var24; -goto RET_LABEL23; -RET_LABEL23:(void)0; +var24 = var_i < var_l; +var19 = var24; +goto RET_LABEL20; +RET_LABEL20:(void)0; } } -if (var_oit == NULL) { -PRINT_ERROR("Runtime error: %s", "Receiver is null"); -PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 481); -fatal_exit(1); -} else { -{ /* Inline array#NativeArray#[] (var_oit,var_i) on */ -var27 = ((struct instance_core__NativeArray*)var_oit)->values[var_i]; +if (var19){ +{ +{ /* Inline array$NativeArray$[] (var_it,var_i) on */ +var27 = ((struct instance_core__NativeArray*)var_it)->values[var_i]; var25 = var27; goto RET_LABEL26; RET_LABEL26:(void)0; } } -if (var22 == NULL) { -var28 = (var25 != NULL); +{ +{ /* Inline array$NativeArray$[] (var_oit,var_i) on */ +var30 = ((struct instance_core__NativeArray*)var_oit)->values[var_i]; +var28 = var30; +goto RET_LABEL29; +RET_LABEL29:(void)0; +} +} +if (var25 == NULL) { +var31 = (var28 != NULL); } else { -var29 = ((short int(*)(val* self, val* p0))((((long)var22&3)?class_info[((long)var22&3)]:var22->class)->vft[COLOR_core__kernel__Object___33d_61d]))(var22, var25); /* != on */ -var28 = var29; +var32 = ((short int(*)(val* self, val* p0))((((long)var25&3)?class_info[((long)var25&3)]:var25->class)->vft[COLOR_core__kernel__Object___33d_61d]))(var25, var28); /* != on */ +var31 = var32; } -if (var28){ +if (var31){ var = 0; goto RET_LABEL; } else { } { -{ /* Inline kernel#Int#+ (var_i,1l) on */ +{ /* Inline kernel$Int$+ (var_i,1l) on */ /* Covariant cast for argument 0 (i) <1l:Int> isa OTHER */ /* <1l:Int> isa OTHER */ -var32 = 1; /* easy <1l:Int> isa OTHER*/ -if (unlikely(!var32)) { -var_class_name35 = type_core__Int.name; -PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name35); -PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 731); +var35 = 1; /* easy <1l:Int> isa OTHER*/ +if (unlikely(!var35)) { +var_class_name38 = type_core__Int.name; +PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name38); +PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 728); fatal_exit(1); } -var36 = var_i + 1l; -var30 = var36; -goto RET_LABEL31; -RET_LABEL31:(void)0; +var39 = var_i + 1l; +var33 = var39; +goto RET_LABEL34; +RET_LABEL34:(void)0; } } -var_i = var30; +var_i = var33; } else { goto BREAK_label; } @@ -3531,7 +3743,39 @@ goto RET_LABEL; RET_LABEL:; return var; } -/* method array#ArrayIterator#item for (self: ArrayIterator[nullable Object]): nullable Object */ +/* method array$Array$clone for (self: Array[nullable Object]): Array[nullable Object] */ +val* core___core__Array___core__kernel__Cloneable__clone(val* self) { +val* var /* : Array[nullable Object] */; +val* var1 /* : Array[nullable Object] */; +short int var2 /* : Bool */; +int cltype; +int idtype; +const struct type* type_struct; +const char* var_class_name; +{ +var1 = core__array___Collection___to_a(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_core__array, 509); +fatal_exit(1); +} +var = var1; +goto RET_LABEL; +RET_LABEL:; +return var; +} +/* method array$ArrayIterator$item for (self: ArrayIterator[nullable Object]): nullable Object */ val* core__array___core__array__ArrayIterator___core__abstract_collection__Iterator__item(val* self) { val* var /* : nullable Object */; val* var1 /* : AbstractArrayRead[nullable Object] */; @@ -3539,8 +3783,11 @@ long var2 /* : Int */; val* var3 /* : nullable Object */; var1 = self->attrs[COLOR_core__array__ArrayIterator___array].val; /* _array on */ if (unlikely(var1 == NULL)) { +if(catchStack.cursor >= 0){ +longjmp(catchStack.envs[catchStack.cursor], 1); +} PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _array"); -PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 559); +PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 560); fatal_exit(1); } var2 = self->attrs[COLOR_core__array__ArrayIterator___index].l; /* _index on */ @@ -3552,7 +3799,7 @@ goto RET_LABEL; RET_LABEL:; return var; } -/* method array#ArrayIterator#is_ok for (self: ArrayIterator[nullable Object]): Bool */ +/* method array$ArrayIterator$is_ok for (self: ArrayIterator[nullable Object]): Bool */ short int core__array___core__array__ArrayIterator___core__abstract_collection__Iterator__is_ok(val* self) { short int var /* : Bool */; long var1 /* : Int */; @@ -3567,22 +3814,25 @@ short int var7 /* : Bool */; var1 = self->attrs[COLOR_core__array__ArrayIterator___index].l; /* _index on */ var2 = self->attrs[COLOR_core__array__ArrayIterator___array].val; /* _array on */ if (unlikely(var2 == NULL)) { +if(catchStack.cursor >= 0){ +longjmp(catchStack.envs[catchStack.cursor], 1); +} PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _array"); -PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 563); +PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 564); fatal_exit(1); } { var3 = ((long(*)(val* self))(var2->class->vft[COLOR_core__abstract_collection__Collection__length]))(var2); /* length on */ } { -{ /* Inline kernel#Int#< (var1,var3) on */ +{ /* Inline kernel$Int$< (var1,var3) on */ /* Covariant cast for argument 0 (i) isa OTHER */ /* isa OTHER */ var6 = 1; /* easy isa OTHER*/ if (unlikely(!var6)) { 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); +PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 725); fatal_exit(1); } var7 = var1 < var3; @@ -3596,7 +3846,7 @@ goto RET_LABEL; RET_LABEL:; return var; } -/* method array#ArrayIterator#next for (self: ArrayIterator[nullable Object]) */ +/* method array$ArrayIterator$next for (self: ArrayIterator[nullable Object]) */ void core__array___core__array__ArrayIterator___core__abstract_collection__Iterator__next(val* self) { val* var_ /* var : ArrayIterator[nullable Object] */; long var /* : Int */; @@ -3609,14 +3859,14 @@ long var4 /* : Int */; var_ = self; var = var_->attrs[COLOR_core__array__ArrayIterator___index].l; /* _index on */ { -{ /* Inline kernel#Int#+ (var,1l) on */ +{ /* Inline kernel$Int$+ (var,1l) on */ /* Covariant cast for argument 0 (i) <1l:Int> isa OTHER */ /* <1l:Int> isa OTHER */ var3 = 1; /* easy <1l:Int> isa OTHER*/ if (unlikely(!var3)) { 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, 731); +PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 728); fatal_exit(1); } var4 = var + 1l; @@ -3628,7 +3878,7 @@ RET_LABEL2:(void)0; var_->attrs[COLOR_core__array__ArrayIterator___index].l = var1; /* _index on */ RET_LABEL:; } -/* method array#ArrayIterator#index for (self: ArrayIterator[nullable Object]): Int */ +/* method array$ArrayIterator$index for (self: ArrayIterator[nullable Object]): Int */ long core__array___core__array__ArrayIterator___core__abstract_collection__IndexedIterator__index(val* self) { long var /* : Int */; long var1 /* : Int */; @@ -3637,7 +3887,7 @@ var = var1; RET_LABEL:; return var; } -/* method array#ArrayIterator#array= for (self: ArrayIterator[nullable Object], AbstractArrayRead[nullable Object]) */ +/* method array$ArrayIterator$array= for (self: ArrayIterator[nullable Object], AbstractArrayRead[nullable Object]) */ void core__array___core__array__ArrayIterator___array_61d(val* self, val* p0) { short int var /* : Bool */; int cltype; @@ -3657,32 +3907,35 @@ var = p0->type->type_table[cltype] == idtype; if (unlikely(!var)) { var_class_name = p0 == NULL ? "null" : p0->type->name; PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "AbstractArrayRead[E]", var_class_name); -PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 569); +PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 570); fatal_exit(1); } self->attrs[COLOR_core__array__ArrayIterator___array].val = p0; /* _array on */ RET_LABEL:; } -/* method array#ArrayIterator#finish for (self: ArrayIterator[nullable Object]) */ +/* method array$ArrayIterator$finish for (self: ArrayIterator[nullable Object]) */ void core__array___core__array__ArrayIterator___core__abstract_collection__Iterator__finish(val* self) { val* var /* : AbstractArrayRead[nullable Object] */; var = self->attrs[COLOR_core__array__ArrayIterator___array].val; /* _array on */ if (unlikely(var == NULL)) { +if(catchStack.cursor >= 0){ +longjmp(catchStack.envs[catchStack.cursor], 1); +} PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _array"); -PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 571); +PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 572); fatal_exit(1); } var->attrs[COLOR_core__array__AbstractArrayRead___free_iterator].val = self; /* _free_iterator on */ RET_LABEL:; } -/* method array#ArrayIterator#init for (self: ArrayIterator[nullable Object]) */ +/* method array$ArrayIterator$init for (self: ArrayIterator[nullable Object]) */ void core__array___core__array__ArrayIterator___core__kernel__Object__init(val* self) { { ((void(*)(val* self))(self->class->vft[COLOR_core__array___core__array__ArrayIterator___core__kernel__Object__init]))(self); /* init on */ } RET_LABEL:; } -/* method array#ArrayReverseIterator#is_ok for (self: ArrayReverseIterator[nullable Object]): Bool */ +/* method array$ArrayReverseIterator$is_ok for (self: ArrayReverseIterator[nullable Object]): Bool */ short int core__array___core__array__ArrayReverseIterator___core__abstract_collection__Iterator__is_ok(val* self) { short int var /* : Bool */; long var1 /* : Int */; @@ -3694,14 +3947,14 @@ const char* var_class_name; short int var5 /* : Bool */; var1 = self->attrs[COLOR_core__array__ArrayIterator___index].l; /* _index on */ { -{ /* Inline kernel#Int#>= (var1,0l) on */ +{ /* Inline kernel$Int$>= (var1,0l) on */ /* Covariant cast for argument 0 (i) <0l:Int> isa OTHER */ /* <0l:Int> isa OTHER */ var4 = 1; /* easy <0l:Int> isa OTHER*/ if (unlikely(!var4)) { 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, 729); +PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 726); fatal_exit(1); } var5 = var1 >= 0l; @@ -3715,7 +3968,7 @@ goto RET_LABEL; RET_LABEL:; return var; } -/* method array#ArrayReverseIterator#next for (self: ArrayReverseIterator[nullable Object]) */ +/* method array$ArrayReverseIterator$next for (self: ArrayReverseIterator[nullable Object]) */ void core__array___core__array__ArrayReverseIterator___core__abstract_collection__Iterator__next(val* self) { val* var_ /* var : ArrayReverseIterator[nullable Object] */; long var /* : Int */; @@ -3728,14 +3981,14 @@ long var4 /* : Int */; var_ = self; var = var_->attrs[COLOR_core__array__ArrayIterator___index].l; /* _index on */ { -{ /* Inline kernel#Int#- (var,1l) on */ +{ /* Inline kernel$Int$- (var,1l) on */ /* Covariant cast for argument 0 (i) <1l:Int> isa OTHER */ /* <1l:Int> isa OTHER */ var3 = 1; /* easy <1l:Int> isa OTHER*/ if (unlikely(!var3)) { 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, 734); +PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 731); fatal_exit(1); } var4 = var - 1l; @@ -3747,7 +4000,7 @@ RET_LABEL2:(void)0; var_->attrs[COLOR_core__array__ArrayIterator___index].l = var1; /* _index on */ RET_LABEL:; } -/* method array#ArrayReverseIterator#init for (self: ArrayReverseIterator[nullable Object]) */ +/* method array$ArrayReverseIterator$init for (self: ArrayReverseIterator[nullable Object]) */ void core__array___core__array__ArrayReverseIterator___core__kernel__Object__init(val* self) { val* var /* : AbstractArrayRead[nullable Object] */; long var1 /* : Int */; @@ -3762,22 +4015,25 @@ long var5 /* : Int */; } var = self->attrs[COLOR_core__array__ArrayIterator___array].val; /* _array on */ if (unlikely(var == NULL)) { +if(catchStack.cursor >= 0){ +longjmp(catchStack.envs[catchStack.cursor], 1); +} PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _array"); -PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 583); +PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 584); fatal_exit(1); } { var1 = ((long(*)(val* self))(var->class->vft[COLOR_core__abstract_collection__Collection__length]))(var); /* length on */ } { -{ /* Inline kernel#Int#- (var1,1l) on */ +{ /* Inline kernel$Int$- (var1,1l) on */ /* Covariant cast for argument 0 (i) <1l:Int> isa OTHER */ /* <1l:Int> isa OTHER */ var4 = 1; /* easy <1l:Int> isa OTHER*/ if (unlikely(!var4)) { 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, 734); +PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 731); fatal_exit(1); } var5 = var1 - 1l; @@ -3789,11 +4045,11 @@ RET_LABEL3:(void)0; self->attrs[COLOR_core__array__ArrayIterator___index].l = var2; /* _index on */ RET_LABEL:; } -/* method array#ArrayReverseIterator#finish for (self: ArrayReverseIterator[nullable Object]) */ +/* method array$ArrayReverseIterator$finish for (self: ArrayReverseIterator[nullable Object]) */ void core__array___core__array__ArrayReverseIterator___core__abstract_collection__Iterator__finish(val* self) { RET_LABEL:; } -/* method array#ArraySet#has for (self: ArraySet[nullable Object], nullable Object): Bool */ +/* method array$ArraySet$has for (self: ArraySet[nullable Object], nullable Object): Bool */ short int core___core__ArraySet___core__abstract_collection__Collection__has(val* self, val* p0) { short int var /* : Bool */; val* var_e /* var e: nullable Object */; @@ -3802,8 +4058,11 @@ short int var2 /* : Bool */; var_e = p0; var1 = self->attrs[COLOR_core__array__ArraySet___array].val; /* _array on */ if (unlikely(var1 == NULL)) { +if(catchStack.cursor >= 0){ +longjmp(catchStack.envs[catchStack.cursor], 1); +} PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _array"); -PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 599); +PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 600); fatal_exit(1); } { @@ -3814,7 +4073,7 @@ goto RET_LABEL; RET_LABEL:; return var; } -/* method array#ArraySet#add for (self: ArraySet[nullable Object], nullable Object) */ +/* method array$ArraySet$add for (self: ArraySet[nullable Object], nullable Object) */ void core___core__ArraySet___core__abstract_collection__SimpleCollection__add(val* self, val* p0) { short int var /* : Bool */; int cltype; @@ -3845,14 +4104,17 @@ var = (((long)p0&3)?type_info[((long)p0&3)]:p0->type)->type_table[cltype] == idt 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_core__array, 601); +PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 602); fatal_exit(1); } var_e = p0; var1 = self->attrs[COLOR_core__array__ArraySet___array].val; /* _array on */ if (unlikely(var1 == NULL)) { +if(catchStack.cursor >= 0){ +longjmp(catchStack.envs[catchStack.cursor], 1); +} PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _array"); -PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 601); +PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 602); fatal_exit(1); } { @@ -3862,26 +4124,32 @@ var3 = !var2; if (var3){ var4 = self->attrs[COLOR_core__array__ArraySet___array].val; /* _array on */ if (unlikely(var4 == NULL)) { +if(catchStack.cursor >= 0){ +longjmp(catchStack.envs[catchStack.cursor], 1); +} PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _array"); -PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 601); +PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 602); fatal_exit(1); } { -core___core__Array___core__abstract_collection__SimpleCollection__add(var4, var_e); /* Direct call array#Array#add on */ +core___core__Array___core__abstract_collection__SimpleCollection__add(var4, var_e); /* Direct call array$Array$add on */ } } else { } RET_LABEL:; } -/* method array#ArraySet#is_empty for (self: ArraySet[nullable Object]): Bool */ +/* method array$ArraySet$is_empty for (self: ArraySet[nullable Object]): Bool */ short int core___core__ArraySet___core__abstract_collection__Collection__is_empty(val* self) { short int var /* : Bool */; val* var1 /* : Array[nullable Object] */; short int var2 /* : Bool */; var1 = self->attrs[COLOR_core__array__ArraySet___array].val; /* _array on */ if (unlikely(var1 == NULL)) { +if(catchStack.cursor >= 0){ +longjmp(catchStack.envs[catchStack.cursor], 1); +} PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _array"); -PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 603); +PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 604); fatal_exit(1); } { @@ -3892,7 +4160,7 @@ goto RET_LABEL; RET_LABEL:; return var; } -/* method array#ArraySet#length for (self: ArraySet[nullable Object]): Int */ +/* method array$ArraySet$length for (self: ArraySet[nullable Object]): Int */ long core___core__ArraySet___core__abstract_collection__Collection__length(val* self) { long var /* : Int */; val* var1 /* : Array[nullable Object] */; @@ -3900,12 +4168,15 @@ long var2 /* : Int */; long var4 /* : Int */; var1 = self->attrs[COLOR_core__array__ArraySet___array].val; /* _array on */ if (unlikely(var1 == NULL)) { +if(catchStack.cursor >= 0){ +longjmp(catchStack.envs[catchStack.cursor], 1); +} PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _array"); -PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 605); +PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 606); fatal_exit(1); } { -{ /* Inline array#AbstractArrayRead#length (var1) on */ +{ /* Inline array$AbstractArrayRead$length (var1) on */ var4 = var1->attrs[COLOR_core__array__AbstractArrayRead___length].l; /* _length on */ var2 = var4; RET_LABEL3:(void)0; @@ -3916,7 +4187,7 @@ goto RET_LABEL; RET_LABEL:; return var; } -/* method array#ArraySet#first for (self: ArraySet[nullable Object]): nullable Object */ +/* method array$ArraySet$first for (self: ArraySet[nullable Object]): nullable Object */ val* core___core__ArraySet___core__abstract_collection__Collection__first(val* self) { val* var /* : nullable Object */; val* var1 /* : Array[nullable Object] */; @@ -3932,26 +4203,29 @@ val* var9 /* : Array[nullable Object] */; val* var10 /* : nullable Object */; var1 = self->attrs[COLOR_core__array__ArraySet___array].val; /* _array on */ if (unlikely(var1 == NULL)) { +if(catchStack.cursor >= 0){ +longjmp(catchStack.envs[catchStack.cursor], 1); +} PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _array"); -PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 609); +PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 610); fatal_exit(1); } { -{ /* Inline array#AbstractArrayRead#length (var1) on */ +{ /* Inline array$AbstractArrayRead$length (var1) on */ var4 = var1->attrs[COLOR_core__array__AbstractArrayRead___length].l; /* _length on */ var2 = var4; RET_LABEL3:(void)0; } } { -{ /* Inline kernel#Int#> (var2,0l) on */ +{ /* Inline kernel$Int$> (var2,0l) on */ /* Covariant cast for argument 0 (i) <0l:Int> isa OTHER */ /* <0l:Int> isa OTHER */ var7 = 1; /* easy <0l:Int> isa OTHER*/ if (unlikely(!var7)) { 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, 730); +PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 727); fatal_exit(1); } var8 = var2 > 0l; @@ -3961,14 +4235,20 @@ RET_LABEL6:(void)0; } } if (unlikely(!var5)) { +if(catchStack.cursor >= 0){ +longjmp(catchStack.envs[catchStack.cursor], 1); +} PRINT_ERROR("Runtime error: %s", "Assert failed"); -PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 609); +PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 610); fatal_exit(1); } var9 = self->attrs[COLOR_core__array__ArraySet___array].val; /* _array on */ if (unlikely(var9 == NULL)) { +if(catchStack.cursor >= 0){ +longjmp(catchStack.envs[catchStack.cursor], 1); +} PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _array"); -PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 610); +PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 611); fatal_exit(1); } { @@ -3979,7 +4259,7 @@ goto RET_LABEL; RET_LABEL:; return var; } -/* method array#ArraySet#remove for (self: ArraySet[nullable Object], nullable Object) */ +/* method array$ArraySet$remove for (self: ArraySet[nullable Object], nullable Object) */ void core___core__ArraySet___core__abstract_collection__RemovableCollection__remove(val* self, val* p0) { val* var_item /* var item: nullable Object */; val* var /* : Array[nullable Object] */; @@ -3994,8 +4274,11 @@ short int var5 /* : Bool */; var_item = p0; var = self->attrs[COLOR_core__array__ArraySet___array].val; /* _array on */ if (unlikely(var == NULL)) { +if(catchStack.cursor >= 0){ +longjmp(catchStack.envs[catchStack.cursor], 1); +} PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _array"); -PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 615); +PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 616); fatal_exit(1); } { @@ -4003,14 +4286,14 @@ var1 = core___core__AbstractArrayRead___core__abstract_collection__SequenceRead_ } var_i = var1; { -{ /* Inline kernel#Int#>= (var_i,0l) on */ +{ /* Inline kernel$Int$>= (var_i,0l) on */ /* Covariant cast for argument 0 (i) <0l:Int> isa OTHER */ /* <0l:Int> isa OTHER */ var4 = 1; /* easy <0l:Int> isa OTHER*/ if (unlikely(!var4)) { 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, 729); +PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 726); fatal_exit(1); } var5 = var_i >= 0l; @@ -4021,27 +4304,30 @@ RET_LABEL3:(void)0; } if (var2){ { -core___core__ArraySet___remove_at(self, var_i); /* Direct call array#ArraySet#remove_at on */ +core___core__ArraySet___remove_at(self, var_i); /* Direct call array$ArraySet$remove_at on */ } } else { } RET_LABEL:; } -/* method array#ArraySet#clear for (self: ArraySet[nullable Object]) */ +/* method array$ArraySet$clear for (self: ArraySet[nullable Object]) */ void core___core__ArraySet___core__abstract_collection__RemovableCollection__clear(val* self) { val* var /* : Array[nullable Object] */; var = self->attrs[COLOR_core__array__ArraySet___array].val; /* _array on */ if (unlikely(var == NULL)) { +if(catchStack.cursor >= 0){ +longjmp(catchStack.envs[catchStack.cursor], 1); +} PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _array"); -PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 621); +PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 622); fatal_exit(1); } { -core___core__AbstractArray___core__abstract_collection__RemovableCollection__clear(var); /* Direct call array#AbstractArray#clear on */ +core___core__AbstractArray___core__abstract_collection__RemovableCollection__clear(var); /* Direct call array$AbstractArray$clear on */ } RET_LABEL:; } -/* method array#ArraySet#iterator for (self: ArraySet[nullable Object]): Iterator[nullable Object] */ +/* method array$ArraySet$iterator for (self: ArraySet[nullable Object]): Iterator[nullable Object] */ val* core___core__ArraySet___core__abstract_collection__Collection__iterator(val* self) { val* var /* : Iterator[nullable Object] */; val* var1 /* : ArraySetIterator[nullable Object] */; @@ -4050,8 +4336,11 @@ val* var3 /* : IndexedIterator[nullable Object] */; var1 = NEW_core__array__ArraySetIterator(self->type->resolution_table->types[COLOR_core__array__ArraySetIterator__core__ArraySet___35dE]); var2 = self->attrs[COLOR_core__array__ArraySet___array].val; /* _array on */ if (unlikely(var2 == NULL)) { +if(catchStack.cursor >= 0){ +longjmp(catchStack.envs[catchStack.cursor], 1); +} PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _array"); -PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 623); +PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 624); fatal_exit(1); } { @@ -4068,7 +4357,7 @@ goto RET_LABEL; RET_LABEL:; return var; } -/* method array#ArraySet#remove_at for (self: ArraySet[nullable Object], Int) */ +/* method array$ArraySet$remove_at for (self: ArraySet[nullable Object], Int) */ void core___core__ArraySet___remove_at(val* self, long p0) { long var_i /* var i: Int */; val* var /* : Array[nullable Object] */; @@ -4079,26 +4368,35 @@ val* var4 /* : nullable Object */; var_i = p0; var = self->attrs[COLOR_core__array__ArraySet___array].val; /* _array on */ if (unlikely(var == NULL)) { +if(catchStack.cursor >= 0){ +longjmp(catchStack.envs[catchStack.cursor], 1); +} PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _array"); -PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 630); +PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 631); fatal_exit(1); } var1 = self->attrs[COLOR_core__array__ArraySet___array].val; /* _array on */ if (unlikely(var1 == NULL)) { +if(catchStack.cursor >= 0){ +longjmp(catchStack.envs[catchStack.cursor], 1); +} PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _array"); -PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 630); +PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 631); fatal_exit(1); } { var2 = core___core__SequenceRead___last(var1); } { -core___core__Array___core__abstract_collection__Sequence___91d_93d_61d(var, var_i, var2); /* Direct call array#Array#[]= on */ +core___core__Array___core__abstract_collection__Sequence___91d_93d_61d(var, var_i, var2); /* Direct call array$Array$[]= on */ } var3 = self->attrs[COLOR_core__array__ArraySet___array].val; /* _array on */ if (unlikely(var3 == NULL)) { +if(catchStack.cursor >= 0){ +longjmp(catchStack.envs[catchStack.cursor], 1); +} PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _array"); -PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 631); +PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 632); fatal_exit(1); } { @@ -4106,7 +4404,7 @@ var4 = core___core__AbstractArray___core__abstract_collection__Sequence__pop(var } RET_LABEL:; } -/* method array#ArraySet#init for (self: ArraySet[nullable Object]) */ +/* method array$ArraySet$init for (self: ArraySet[nullable Object]) */ void core___core__ArraySet___core__kernel__Object__init(val* self) { val* var /* : Array[nullable Object] */; { @@ -4114,20 +4412,74 @@ val* var /* : Array[nullable Object] */; } var = NEW_core__Array(self->type->resolution_table->types[COLOR_core__Array__core__ArraySet___35dE]); { -core___core__Array___core__kernel__Object__init(var); /* Direct call array#Array#init on */ +core___core__Array___core__kernel__Object__init(var); /* Direct call array$Array$init on */ } self->attrs[COLOR_core__array__ArraySet___array].val = var; /* _array on */ RET_LABEL:; } -/* method array#ArraySetIterator#is_ok for (self: ArraySetIterator[nullable Object]): Bool */ +/* method array$ArraySet$new_set for (self: ArraySet[nullable Object]): Set[nullable Object] */ +val* core___core__ArraySet___core__abstract_collection__Set__new_set(val* self) { +val* var /* : Set[nullable Object] */; +val* var1 /* : ArraySet[nullable Object] */; +var1 = NEW_core__ArraySet(self->type->resolution_table->types[COLOR_core__ArraySet__core__ArraySet___35dE]); +{ +core___core__ArraySet___core__kernel__Object__init(var1); /* Direct call array$ArraySet$init on */ +} +var = var1; +goto RET_LABEL; +RET_LABEL:; +return var; +} +/* method array$ArraySet$clone for (self: ArraySet[nullable Object]): ArraySet[nullable Object] */ +val* core___core__ArraySet___core__kernel__Cloneable__clone(val* self) { +val* var /* : ArraySet[nullable Object] */; +val* var1 /* : ArraySet[nullable Object] */; +val* var_res /* var res: ArraySet[nullable Object] */; +short int var2 /* : Bool */; +int cltype; +int idtype; +const struct type* type_struct; +const char* var_class_name; +var1 = NEW_core__ArraySet(self->type->resolution_table->types[COLOR_core__ArraySet__core__ArraySet___35dE]); +{ +core___core__ArraySet___core__kernel__Object__init(var1); /* Direct call array$ArraySet$init on */ +} +var_res = var1; +{ +core___core__SimpleCollection___add_all(var_res, self); /* Direct call abstract_collection$SimpleCollection$add_all on */ +} +/* isa SELF */ +type_struct = self->type->resolution_table->types[COLOR_core__kernel__Object__SELF]; +cltype = type_struct->color; +idtype = type_struct->id; +if(cltype >= var_res->type->table_size) { +var2 = 0; +} else { +var2 = var_res->type->type_table[cltype] == idtype; +} +if (unlikely(!var2)) { +var_class_name = var_res == NULL ? "null" : var_res->type->name; +PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "SELF", var_class_name); +PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 671); +fatal_exit(1); +} +var = var_res; +goto RET_LABEL; +RET_LABEL:; +return var; +} +/* method array$ArraySetIterator$is_ok for (self: ArraySetIterator[nullable Object]): Bool */ short int core__array___core__array__ArraySetIterator___core__abstract_collection__Iterator__is_ok(val* self) { short int var /* : Bool */; val* var1 /* : Iterator[nullable Object] */; short int var2 /* : Bool */; var1 = self->attrs[COLOR_core__array__ArraySetIterator___iter].val; /* _iter on */ if (unlikely(var1 == NULL)) { +if(catchStack.cursor >= 0){ +longjmp(catchStack.envs[catchStack.cursor], 1); +} PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _iter"); -PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 678); +PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 679); fatal_exit(1); } { @@ -4138,13 +4490,16 @@ goto RET_LABEL; RET_LABEL:; return var; } -/* method array#ArraySetIterator#next for (self: ArraySetIterator[nullable Object]) */ +/* method array$ArraySetIterator$next for (self: ArraySetIterator[nullable Object]) */ void core__array___core__array__ArraySetIterator___core__abstract_collection__Iterator__next(val* self) { val* var /* : Iterator[nullable Object] */; var = self->attrs[COLOR_core__array__ArraySetIterator___iter].val; /* _iter on */ if (unlikely(var == NULL)) { +if(catchStack.cursor >= 0){ +longjmp(catchStack.envs[catchStack.cursor], 1); +} PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _iter"); -PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 680); +PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 681); fatal_exit(1); } { @@ -4152,15 +4507,18 @@ fatal_exit(1); } RET_LABEL:; } -/* method array#ArraySetIterator#item for (self: ArraySetIterator[nullable Object]): nullable Object */ +/* method array$ArraySetIterator$item for (self: ArraySetIterator[nullable Object]): nullable Object */ val* core__array___core__array__ArraySetIterator___core__abstract_collection__Iterator__item(val* self) { val* var /* : nullable Object */; val* var1 /* : Iterator[nullable Object] */; val* var2 /* : nullable Object */; var1 = self->attrs[COLOR_core__array__ArraySetIterator___iter].val; /* _iter on */ if (unlikely(var1 == NULL)) { +if(catchStack.cursor >= 0){ +longjmp(catchStack.envs[catchStack.cursor], 1); +} PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _iter"); -PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 682); +PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 683); fatal_exit(1); } { @@ -4171,7 +4529,7 @@ goto RET_LABEL; RET_LABEL:; return var; } -/* method array#ArraySetIterator#iter= for (self: ArraySetIterator[nullable Object], Iterator[nullable Object]) */ +/* method array$ArraySetIterator$iter= for (self: ArraySetIterator[nullable Object], Iterator[nullable Object]) */ void core__array___core__array__ArraySetIterator___iter_61d(val* self, val* p0) { short int var /* : Bool */; int cltype; @@ -4191,20 +4549,20 @@ var = (((long)p0&3)?type_info[((long)p0&3)]:p0->type)->type_table[cltype] == idt 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`", "Iterator[E]", var_class_name); -PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 684); +PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 685); fatal_exit(1); } self->attrs[COLOR_core__array__ArraySetIterator___iter].val = p0; /* _iter on */ RET_LABEL:; } -/* method array#ArraySetIterator#init for (self: ArraySetIterator[nullable Object]) */ +/* method array$ArraySetIterator$init for (self: ArraySetIterator[nullable Object]) */ void core__array___core__array__ArraySetIterator___core__kernel__Object__init(val* self) { { ((void(*)(val* self))(self->class->vft[COLOR_core__array___core__array__ArraySetIterator___core__kernel__Object__init]))(self); /* init on */ } RET_LABEL:; } -/* method array#ArrayMap#[] for (self: ArrayMap[nullable Object, nullable Object], nullable Object): nullable Object */ +/* method array$ArrayMap$[] for (self: ArrayMap[nullable Object, nullable Object], nullable Object): nullable Object */ val* core___core__ArrayMap___core__abstract_collection__MapRead___91d_93d(val* self, val* p0) { val* var /* : nullable Object */; val* var_key /* var key: nullable Object */; @@ -4245,7 +4603,7 @@ var1 = (((long)var_key&3)?type_info[((long)var_key&3)]:var_key->type)->type_tabl if (unlikely(!var1)) { var_class_name = var_key == NULL ? "null" : (((long)var_key&3)?type_info[((long)var_key&3)]:var_key->type)->name; PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "K", var_class_name); -PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 696); +PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 697); fatal_exit(1); } { @@ -4253,14 +4611,14 @@ var2 = core___core__ArrayMap___index(self, var_key); } var_i = var2; { -{ /* Inline kernel#Int#>= (var_i,0l) on */ +{ /* Inline kernel$Int$>= (var_i,0l) on */ /* Covariant cast for argument 0 (i) <0l:Int> isa OTHER */ /* <0l:Int> isa OTHER */ var5 = 1; /* easy <0l:Int> isa OTHER*/ if (unlikely(!var5)) { var_class_name8 = type_core__Int.name; PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name8); -PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 729); +PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 726); fatal_exit(1); } var9 = var_i >= 0l; @@ -4272,15 +4630,18 @@ RET_LABEL4:(void)0; if (var3){ var10 = self->attrs[COLOR_core__array__ArrayMap___items].val; /* _items on */ if (unlikely(var10 == NULL)) { +if(catchStack.cursor >= 0){ +longjmp(catchStack.envs[catchStack.cursor], 1); +} PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _items"); -PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 698); +PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 699); fatal_exit(1); } { var11 = core___core__Array___core__abstract_collection__SequenceRead___91d_93d(var10, var_i); } { -{ /* Inline abstract_collection#Couple#second (var11) on */ +{ /* Inline abstract_collection$Couple$second (var11) on */ var14 = var11->attrs[COLOR_core__abstract_collection__Couple___second].val; /* _second on */ var12 = var14; RET_LABEL13:(void)0; @@ -4298,7 +4659,7 @@ goto RET_LABEL; RET_LABEL:; return var; } -/* method array#ArrayMap#[]= for (self: ArrayMap[nullable Object, nullable Object], nullable Object, nullable Object) */ +/* method array$ArrayMap$[]= for (self: ArrayMap[nullable Object, nullable Object], nullable Object, nullable Object) */ void core___core__ArrayMap___core__abstract_collection__Map___91d_93d_61d(val* self, val* p0, val* p1) { short int var /* : Bool */; int cltype; @@ -4350,7 +4711,7 @@ var = (((long)p0&3)?type_info[((long)p0&3)]:p0->type)->type_table[cltype] == idt 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`", "K", var_class_name); -PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 704); +PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 705); fatal_exit(1); } /* Covariant cast for argument 1 (item) isa E */ @@ -4371,7 +4732,7 @@ var1 = (((long)p1&3)?type_info[((long)p1&3)]:p1->type)->type_table[cltype2] == i 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_core__array, 704); +PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 705); fatal_exit(1); } var_key = p0; @@ -4381,14 +4742,14 @@ var7 = core___core__ArrayMap___index(self, var_key); } var_i = var7; { -{ /* Inline kernel#Int#>= (var_i,0l) on */ +{ /* Inline kernel$Int$>= (var_i,0l) on */ /* Covariant cast for argument 0 (i) <0l:Int> isa OTHER */ /* <0l:Int> isa OTHER */ var10 = 1; /* easy <0l:Int> isa OTHER*/ if (unlikely(!var10)) { var_class_name13 = type_core__Int.name; PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name13); -PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 729); +PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 726); fatal_exit(1); } var14 = var_i >= 0l; @@ -4400,15 +4761,18 @@ RET_LABEL9:(void)0; if (var8){ var15 = self->attrs[COLOR_core__array__ArrayMap___items].val; /* _items on */ if (unlikely(var15 == NULL)) { +if(catchStack.cursor >= 0){ +longjmp(catchStack.envs[catchStack.cursor], 1); +} PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _items"); -PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 709); +PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 710); fatal_exit(1); } { var16 = core___core__Array___core__abstract_collection__SequenceRead___91d_93d(var15, var_i); } { -{ /* Inline abstract_collection#Couple#second= (var16,var_item) on */ +{ /* Inline abstract_collection$Couple$second= (var16,var_item) on */ /* Covariant cast for argument 0 (second) isa S */ /* isa S */ type_struct21 = var16->type->resolution_table->types[COLOR_core__Couple___35dS]; @@ -4427,7 +4791,7 @@ var18 = (((long)var_item&3)?type_info[((long)var_item&3)]:var_item->type)->type_ if (unlikely(!var18)) { var_class_name23 = var_item == NULL ? "null" : (((long)var_item&3)?type_info[((long)var_item&3)]:var_item->type)->name; PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "S", var_class_name23); -PRINT_ERROR(" (%s:%d)\n", FILE_core__abstract_collection, 1225); +PRINT_ERROR(" (%s:%d)\n", FILE_core__abstract_collection, 1258); fatal_exit(1); } var16->attrs[COLOR_core__abstract_collection__Couple___second].val = var_item; /* _second on */ @@ -4437,8 +4801,11 @@ RET_LABEL17:(void)0; } else { var24 = self->attrs[COLOR_core__array__ArrayMap___items].val; /* _items on */ if (unlikely(var24 == NULL)) { +if(catchStack.cursor >= 0){ +longjmp(catchStack.envs[catchStack.cursor], 1); +} PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _items"); -PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 711); +PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 712); fatal_exit(1); } var25 = NEW_core__Couple(self->type->resolution_table->types[COLOR_core__Couple__core__ArrayMap___35dK__core__ArrayMap___35dE]); @@ -4452,12 +4819,12 @@ var25 = NEW_core__Couple(self->type->resolution_table->types[COLOR_core__Couple_ ((void(*)(val* self))(var25->class->vft[COLOR_core__kernel__Object__init]))(var25); /* init on */ } { -core___core__AbstractArray___core__abstract_collection__Sequence__push(var24, var25); /* Direct call array#AbstractArray#push on */ +core___core__AbstractArray___core__abstract_collection__Sequence__push(var24, var25); /* Direct call array$AbstractArray$push on */ } } RET_LABEL:; } -/* method array#ArrayMap#keys for (self: ArrayMap[nullable Object, nullable Object]): RemovableCollection[nullable Object] */ +/* method array$ArrayMap$keys for (self: ArrayMap[nullable Object, nullable Object]): RemovableCollection[nullable Object] */ val* core___core__ArrayMap___core__abstract_collection__MapRead__keys(val* self) { val* var /* : RemovableCollection[nullable Object] */; short int var1 /* : Bool */; @@ -4467,8 +4834,11 @@ var1 = self->attrs[COLOR_core__array__ArrayMap___keys].val != NULL; /* _keys on if(likely(var1)) { var2 = self->attrs[COLOR_core__array__ArrayMap___keys].val; /* _keys on */ if (unlikely(var2 == NULL)) { +if(catchStack.cursor >= 0){ +longjmp(catchStack.envs[catchStack.cursor], 1); +} PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _keys"); -PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 715); +PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 716); fatal_exit(1); } } else { @@ -4486,7 +4856,7 @@ var = var2; RET_LABEL:; return var; } -/* method array#ArrayMap#values for (self: ArrayMap[nullable Object, nullable Object]): RemovableCollection[nullable Object] */ +/* method array$ArrayMap$values for (self: ArrayMap[nullable Object, nullable Object]): RemovableCollection[nullable Object] */ val* core___core__ArrayMap___core__abstract_collection__MapRead__values(val* self) { val* var /* : RemovableCollection[nullable Object] */; short int var1 /* : Bool */; @@ -4496,8 +4866,11 @@ var1 = self->attrs[COLOR_core__array__ArrayMap___values].val != NULL; /* _values if(likely(var1)) { var2 = self->attrs[COLOR_core__array__ArrayMap___values].val; /* _values on */ if (unlikely(var2 == NULL)) { +if(catchStack.cursor >= 0){ +longjmp(catchStack.envs[catchStack.cursor], 1); +} PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _values"); -PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 716); +PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 717); fatal_exit(1); } } else { @@ -4515,7 +4888,7 @@ var = var2; RET_LABEL:; return var; } -/* method array#ArrayMap#length for (self: ArrayMap[nullable Object, nullable Object]): Int */ +/* method array$ArrayMap$length for (self: ArrayMap[nullable Object, nullable Object]): Int */ long core___core__ArrayMap___core__abstract_collection__MapRead__length(val* self) { long var /* : Int */; val* var1 /* : Array[Couple[nullable Object, nullable Object]] */; @@ -4523,12 +4896,15 @@ long var2 /* : Int */; long var4 /* : Int */; var1 = self->attrs[COLOR_core__array__ArrayMap___items].val; /* _items on */ if (unlikely(var1 == NULL)) { +if(catchStack.cursor >= 0){ +longjmp(catchStack.envs[catchStack.cursor], 1); +} PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _items"); -PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 719); +PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 720); fatal_exit(1); } { -{ /* Inline array#AbstractArrayRead#length (var1) on */ +{ /* Inline array$AbstractArrayRead$length (var1) on */ var4 = var1->attrs[COLOR_core__array__AbstractArrayRead___length].l; /* _length on */ var2 = var4; RET_LABEL3:(void)0; @@ -4539,15 +4915,18 @@ goto RET_LABEL; RET_LABEL:; return var; } -/* method array#ArrayMap#couple_iterator for (self: ArrayMap[nullable Object, nullable Object]): Iterator[Couple[nullable Object, nullable Object]] */ +/* method array$ArrayMap$couple_iterator for (self: ArrayMap[nullable Object, nullable Object]): Iterator[Couple[nullable Object, nullable Object]] */ val* core___core__ArrayMap___core__abstract_collection__CoupleMap__couple_iterator(val* self) { val* var /* : Iterator[Couple[nullable Object, nullable Object]] */; val* var1 /* : Array[Couple[nullable Object, nullable Object]] */; val* var2 /* : IndexedIterator[nullable Object] */; var1 = self->attrs[COLOR_core__array__ArrayMap___items].val; /* _items on */ if (unlikely(var1 == NULL)) { +if(catchStack.cursor >= 0){ +longjmp(catchStack.envs[catchStack.cursor], 1); +} PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _items"); -PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 721); +PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 722); fatal_exit(1); } { @@ -4558,15 +4937,18 @@ goto RET_LABEL; RET_LABEL:; return var; } -/* method array#ArrayMap#is_empty for (self: ArrayMap[nullable Object, nullable Object]): Bool */ +/* method array$ArrayMap$is_empty for (self: ArrayMap[nullable Object, nullable Object]): Bool */ short int core___core__ArrayMap___core__abstract_collection__MapRead__is_empty(val* self) { short int var /* : Bool */; val* var1 /* : Array[Couple[nullable Object, nullable Object]] */; short int var2 /* : Bool */; var1 = self->attrs[COLOR_core__array__ArrayMap___items].val; /* _items on */ if (unlikely(var1 == NULL)) { +if(catchStack.cursor >= 0){ +longjmp(catchStack.envs[catchStack.cursor], 1); +} PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _items"); -PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 723); +PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 724); fatal_exit(1); } { @@ -4577,21 +4959,24 @@ goto RET_LABEL; RET_LABEL:; return var; } -/* method array#ArrayMap#clear for (self: ArrayMap[nullable Object, nullable Object]) */ +/* method array$ArrayMap$clear for (self: ArrayMap[nullable Object, nullable Object]) */ void core___core__ArrayMap___core__abstract_collection__Map__clear(val* self) { val* var /* : Array[Couple[nullable Object, nullable Object]] */; var = self->attrs[COLOR_core__array__ArrayMap___items].val; /* _items on */ if (unlikely(var == NULL)) { +if(catchStack.cursor >= 0){ +longjmp(catchStack.envs[catchStack.cursor], 1); +} PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _items"); -PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 725); +PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 726); fatal_exit(1); } { -core___core__AbstractArray___core__abstract_collection__RemovableCollection__clear(var); /* Direct call array#AbstractArray#clear on */ +core___core__AbstractArray___core__abstract_collection__RemovableCollection__clear(var); /* Direct call array$AbstractArray$clear on */ } RET_LABEL:; } -/* method array#ArrayMap#couple_at for (self: ArrayMap[nullable Object, nullable Object], nullable Object): nullable Couple[nullable Object, nullable Object] */ +/* method array$ArrayMap$couple_at for (self: ArrayMap[nullable Object, nullable Object], nullable Object): nullable Couple[nullable Object, nullable Object] */ val* core___core__ArrayMap___core__abstract_collection__CoupleMap__couple_at(val* self, val* p0) { val* var /* : nullable Couple[nullable Object, nullable Object] */; val* var_key /* var key: nullable Object */; @@ -4629,7 +5014,7 @@ var1 = (((long)var_key&3)?type_info[((long)var_key&3)]:var_key->type)->type_tabl if (unlikely(!var1)) { var_class_name = var_key == NULL ? "null" : (((long)var_key&3)?type_info[((long)var_key&3)]:var_key->type)->name; PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "K", var_class_name); -PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 732); +PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 733); fatal_exit(1); } { @@ -4637,14 +5022,14 @@ var2 = core___core__ArrayMap___index(self, var_key); } var_i = var2; { -{ /* Inline kernel#Int#>= (var_i,0l) on */ +{ /* Inline kernel$Int$>= (var_i,0l) on */ /* Covariant cast for argument 0 (i) <0l:Int> isa OTHER */ /* <0l:Int> isa OTHER */ var5 = 1; /* easy <0l:Int> isa OTHER*/ if (unlikely(!var5)) { var_class_name8 = type_core__Int.name; PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name8); -PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 729); +PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 726); fatal_exit(1); } var9 = var_i >= 0l; @@ -4656,8 +5041,11 @@ RET_LABEL4:(void)0; if (var3){ var10 = self->attrs[COLOR_core__array__ArrayMap___items].val; /* _items on */ if (unlikely(var10 == NULL)) { +if(catchStack.cursor >= 0){ +longjmp(catchStack.envs[catchStack.cursor], 1); +} PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _items"); -PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 734); +PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 735); fatal_exit(1); } { @@ -4672,7 +5060,7 @@ goto RET_LABEL; RET_LABEL:; return var; } -/* method array#ArrayMap#remove_at_index for (self: ArrayMap[nullable Object, nullable Object], Int) */ +/* method array$ArrayMap$remove_at_index for (self: ArrayMap[nullable Object, nullable Object], Int) */ void core___core__ArrayMap___remove_at_index(val* self, long p0) { long var_i /* var i: Int */; val* var /* : Array[Couple[nullable Object, nullable Object]] */; @@ -4683,26 +5071,35 @@ val* var4 /* : nullable Object */; var_i = p0; var = self->attrs[COLOR_core__array__ArrayMap___items].val; /* _items on */ if (unlikely(var == NULL)) { +if(catchStack.cursor >= 0){ +longjmp(catchStack.envs[catchStack.cursor], 1); +} PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _items"); -PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 746); +PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 747); fatal_exit(1); } var1 = self->attrs[COLOR_core__array__ArrayMap___items].val; /* _items on */ if (unlikely(var1 == NULL)) { +if(catchStack.cursor >= 0){ +longjmp(catchStack.envs[catchStack.cursor], 1); +} PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _items"); -PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 746); +PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 747); fatal_exit(1); } { var2 = core___core__SequenceRead___last(var1); } { -core___core__Array___core__abstract_collection__Sequence___91d_93d_61d(var, var_i, var2); /* Direct call array#Array#[]= on */ +core___core__Array___core__abstract_collection__Sequence___91d_93d_61d(var, var_i, var2); /* Direct call array$Array$[]= on */ } var3 = self->attrs[COLOR_core__array__ArrayMap___items].val; /* _items on */ if (unlikely(var3 == NULL)) { +if(catchStack.cursor >= 0){ +longjmp(catchStack.envs[catchStack.cursor], 1); +} PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _items"); -PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 747); +PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 748); fatal_exit(1); } { @@ -4710,7 +5107,7 @@ var4 = core___core__AbstractArray___core__abstract_collection__Sequence__pop(var } RET_LABEL:; } -/* method array#ArrayMap#index for (self: ArrayMap[nullable Object, nullable Object], nullable Object): Int */ +/* method array$ArrayMap$index for (self: ArrayMap[nullable Object, nullable Object], nullable Object): Int */ long core___core__ArrayMap___index(val* self, val* p0) { long var /* : Int */; short int var1 /* : Bool */; @@ -4781,7 +5178,7 @@ var1 = (((long)p0&3)?type_info[((long)p0&3)]:p0->type)->type_table[cltype] == id 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`", "K", var_class_name); -PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 753); +PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 754); fatal_exit(1); } var_key = p0; @@ -4789,26 +5186,29 @@ var2 = self->attrs[COLOR_core__array__ArrayMap___last_index].l; /* _last_index o var_l = var2; var4 = self->attrs[COLOR_core__array__ArrayMap___items].val; /* _items on */ if (unlikely(var4 == NULL)) { +if(catchStack.cursor >= 0){ +longjmp(catchStack.envs[catchStack.cursor], 1); +} PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _items"); -PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 758); +PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 759); fatal_exit(1); } { -{ /* Inline array#AbstractArrayRead#length (var4) on */ +{ /* Inline array$AbstractArrayRead$length (var4) on */ var7 = var4->attrs[COLOR_core__array__AbstractArrayRead___length].l; /* _length on */ var5 = var7; RET_LABEL6:(void)0; } } { -{ /* Inline kernel#Int#< (var_l,var5) on */ +{ /* Inline kernel$Int$< (var_l,var5) on */ /* Covariant cast for argument 0 (i) isa OTHER */ /* isa OTHER */ var10 = 1; /* easy isa OTHER*/ if (unlikely(!var10)) { var_class_name13 = type_core__Int.name; PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name13); -PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 728); +PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 725); fatal_exit(1); } var14 = var_l < var5; @@ -4821,15 +5221,18 @@ var_ = var8; if (var8){ var15 = self->attrs[COLOR_core__array__ArrayMap___items].val; /* _items on */ if (unlikely(var15 == NULL)) { +if(catchStack.cursor >= 0){ +longjmp(catchStack.envs[catchStack.cursor], 1); +} PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _items"); -PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 758); +PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 759); fatal_exit(1); } { var16 = core___core__Array___core__abstract_collection__SequenceRead___91d_93d(var15, var_l); } { -{ /* Inline abstract_collection#Couple#first (var16) on */ +{ /* Inline abstract_collection$Couple$first (var16) on */ var19 = var16->attrs[COLOR_core__abstract_collection__Couple___first].val; /* _first on */ var17 = var19; RET_LABEL18:(void)0; @@ -4854,26 +5257,29 @@ var_i = 0l; for(;;) { var22 = self->attrs[COLOR_core__array__ArrayMap___items].val; /* _items on */ if (unlikely(var22 == NULL)) { +if(catchStack.cursor >= 0){ +longjmp(catchStack.envs[catchStack.cursor], 1); +} PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _items"); -PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 761); +PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 762); fatal_exit(1); } { -{ /* Inline array#AbstractArrayRead#length (var22) on */ +{ /* Inline array$AbstractArrayRead$length (var22) on */ var25 = var22->attrs[COLOR_core__array__AbstractArrayRead___length].l; /* _length on */ var23 = var25; RET_LABEL24:(void)0; } } { -{ /* Inline kernel#Int#< (var_i,var23) on */ +{ /* Inline kernel$Int$< (var_i,var23) on */ /* Covariant cast for argument 0 (i) isa OTHER */ /* isa OTHER */ var28 = 1; /* easy isa OTHER*/ if (unlikely(!var28)) { var_class_name31 = type_core__Int.name; PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name31); -PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 728); +PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 725); fatal_exit(1); } var32 = var_i < var23; @@ -4885,15 +5291,18 @@ RET_LABEL27:(void)0; if (var26){ var33 = self->attrs[COLOR_core__array__ArrayMap___items].val; /* _items on */ if (unlikely(var33 == NULL)) { +if(catchStack.cursor >= 0){ +longjmp(catchStack.envs[catchStack.cursor], 1); +} PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _items"); -PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 762); +PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 763); fatal_exit(1); } { var34 = core___core__Array___core__abstract_collection__SequenceRead___91d_93d(var33, var_i); } { -{ /* Inline abstract_collection#Couple#first (var34) on */ +{ /* Inline abstract_collection$Couple$first (var34) on */ var37 = var34->attrs[COLOR_core__abstract_collection__Couple___first].val; /* _first on */ var35 = var37; RET_LABEL36:(void)0; @@ -4912,14 +5321,14 @@ goto RET_LABEL; } else { } { -{ /* Inline kernel#Int#+ (var_i,1l) on */ +{ /* Inline kernel$Int$+ (var_i,1l) on */ /* Covariant cast for argument 0 (i) <1l:Int> isa OTHER */ /* <1l:Int> isa OTHER */ var42 = 1; /* easy <1l:Int> isa OTHER*/ if (unlikely(!var42)) { var_class_name45 = type_core__Int.name; PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name45); -PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 731); +PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 728); fatal_exit(1); } var46 = var_i + 1l; @@ -4935,7 +5344,7 @@ goto BREAK_label; } BREAK_label: (void)0; { -{ /* Inline kernel#Int#unary - (1l) on <1l:Int> */ +{ /* Inline kernel$Int$unary - (1l) on <1l:Int> */ var49 = -1l; var47 = var49; goto RET_LABEL48; @@ -4947,21 +5356,64 @@ goto RET_LABEL; RET_LABEL:; return var; } -/* method array#ArrayMapKeys#map for (self: ArrayMapKeys[nullable Object, nullable Object]): ArrayMap[nullable Object, nullable Object] */ +/* method array$ArrayMap$clone for (self: ArrayMap[nullable Object, nullable Object]): ArrayMap[nullable Object, nullable Object] */ +val* core___core__ArrayMap___core__kernel__Cloneable__clone(val* self) { +val* var /* : ArrayMap[nullable Object, nullable Object] */; +val* var1 /* : ArrayMap[nullable Object, nullable Object] */; +val* var_res /* var res: ArrayMap[nullable Object, nullable Object] */; +short int var3 /* : Bool */; +int cltype; +int idtype; +const struct type* type_struct; +const char* var_class_name; +var1 = NEW_core__ArrayMap(self->type->resolution_table->types[COLOR_core__ArrayMap__core__ArrayMap___35dK__core__ArrayMap___35dE]); +{ +{ /* Inline kernel$Object$init (var1) on */ +RET_LABEL2:(void)0; +} +} +var_res = var1; +{ +core___core__Map___add_all(var_res, self); /* Direct call abstract_collection$Map$add_all on */ +} +/* isa SELF */ +type_struct = self->type->resolution_table->types[COLOR_core__kernel__Object__SELF]; +cltype = type_struct->color; +idtype = type_struct->id; +if(cltype >= var_res->type->table_size) { +var3 = 0; +} else { +var3 = var_res->type->type_table[cltype] == idtype; +} +if (unlikely(!var3)) { +var_class_name = var_res == NULL ? "null" : var_res->type->name; +PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "SELF", var_class_name); +PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 798); +fatal_exit(1); +} +var = var_res; +goto RET_LABEL; +RET_LABEL:; +return var; +} +/* method array$ArrayMapKeys$map for (self: ArrayMapKeys[nullable Object, nullable Object]): ArrayMap[nullable Object, nullable Object] */ val* core__array___core__array__ArrayMapKeys___map(val* self) { val* var /* : ArrayMap[nullable Object, nullable Object] */; val* var1 /* : ArrayMap[nullable Object, nullable Object] */; var1 = self->attrs[COLOR_core__array__ArrayMapKeys___map].val; /* _map on */ if (unlikely(var1 == NULL)) { +if(catchStack.cursor >= 0){ +longjmp(catchStack.envs[catchStack.cursor], 1); +} PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _map"); -PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 803); +PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 804); fatal_exit(1); } var = var1; RET_LABEL:; return var; } -/* method array#ArrayMapKeys#map= for (self: ArrayMapKeys[nullable Object, nullable Object], ArrayMap[nullable Object, nullable Object]) */ +/* method array$ArrayMapKeys$map= for (self: ArrayMapKeys[nullable Object, nullable Object], ArrayMap[nullable Object, nullable Object]) */ void core__array___core__array__ArrayMapKeys___map_61d(val* self, val* p0) { short int var /* : Bool */; int cltype; @@ -4981,13 +5433,32 @@ var = p0->type->type_table[cltype] == idtype; if (unlikely(!var)) { var_class_name = p0 == NULL ? "null" : p0->type->name; PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "ArrayMap[K, E]", var_class_name); -PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 803); +PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 804); fatal_exit(1); } self->attrs[COLOR_core__array__ArrayMapKeys___map].val = p0; /* _map on */ RET_LABEL:; } -/* method array#ArrayMapKeys#first for (self: ArrayMapKeys[nullable Object, nullable Object]): nullable Object */ +/* method array$ArrayMapKeys$count for (self: ArrayMapKeys[nullable Object, nullable Object], nullable Object): Int */ +long core__array___core__array__ArrayMapKeys___core__abstract_collection__Collection__count(val* self, val* p0) { +long var /* : Int */; +val* var_k /* var k: nullable Object */; +short int var1 /* : Bool */; +var_k = p0; +{ +var1 = core__array___core__array__ArrayMapKeys___core__abstract_collection__Collection__has(self, var_k); +} +if (var1){ +var = 1l; +goto RET_LABEL; +} else { +var = 0l; +goto RET_LABEL; +} +RET_LABEL:; +return var; +} +/* method array$ArrayMapKeys$first for (self: ArrayMapKeys[nullable Object, nullable Object]): nullable Object */ val* core__array___core__array__ArrayMapKeys___core__abstract_collection__Collection__first(val* self) { val* var /* : nullable Object */; val* var1 /* : ArrayMap[nullable Object, nullable Object] */; @@ -4997,11 +5468,14 @@ val* var5 /* : nullable Object */; val* var6 /* : nullable Object */; val* var8 /* : nullable Object */; { -{ /* Inline array#ArrayMapKeys#map (self) on */ +{ /* Inline array$ArrayMapKeys$map (self) on */ var3 = self->attrs[COLOR_core__array__ArrayMapKeys___map].val; /* _map on */ if (unlikely(var3 == NULL)) { +if(catchStack.cursor >= 0){ +longjmp(catchStack.envs[catchStack.cursor], 1); +} PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _map"); -PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 803); +PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 804); fatal_exit(1); } var1 = var3; @@ -5010,15 +5484,18 @@ RET_LABEL2:(void)0; } var4 = var1->attrs[COLOR_core__array__ArrayMap___items].val; /* _items on */ if (unlikely(var4 == NULL)) { +if(catchStack.cursor >= 0){ +longjmp(catchStack.envs[catchStack.cursor], 1); +} PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _items"); -PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 806); +PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 807); fatal_exit(1); } { var5 = core___core__SequenceRead___Collection__first(var4); } { -{ /* Inline abstract_collection#Couple#first (var5) on */ +{ /* Inline abstract_collection$Couple$first (var5) on */ var8 = var5->attrs[COLOR_core__abstract_collection__Couple___first].val; /* _first on */ var6 = var8; RET_LABEL7:(void)0; @@ -5029,7 +5506,7 @@ goto RET_LABEL; RET_LABEL:; return var; } -/* method array#ArrayMapKeys#has for (self: ArrayMapKeys[nullable Object, nullable Object], nullable Object): Bool */ +/* method array$ArrayMapKeys$has for (self: ArrayMapKeys[nullable Object, nullable Object], nullable Object): Bool */ short int core__array___core__array__ArrayMapKeys___core__abstract_collection__Collection__has(val* self, val* p0) { short int var /* : Bool */; val* var_k /* var k: nullable Object */; @@ -5050,11 +5527,14 @@ const char* var_class_name11; short int var12 /* : Bool */; var_k = p0; { -{ /* Inline array#ArrayMapKeys#map (self) on */ +{ /* Inline array$ArrayMapKeys$map (self) on */ var3 = self->attrs[COLOR_core__array__ArrayMapKeys___map].val; /* _map on */ if (unlikely(var3 == NULL)) { +if(catchStack.cursor >= 0){ +longjmp(catchStack.envs[catchStack.cursor], 1); +} PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _map"); -PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 803); +PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 804); fatal_exit(1); } var1 = var3; @@ -5078,21 +5558,21 @@ var4 = (((long)var_k&3)?type_info[((long)var_k&3)]:var_k->type)->type_table[clty if (unlikely(!var4)) { var_class_name = var_k == NULL ? "null" : (((long)var_k&3)?type_info[((long)var_k&3)]:var_k->type)->name; PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "K", var_class_name); -PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 807); +PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 808); fatal_exit(1); } { var5 = core___core__ArrayMap___index(var1, var_k); } { -{ /* Inline kernel#Int#>= (var5,0l) on */ +{ /* Inline kernel$Int$>= (var5,0l) on */ /* Covariant cast for argument 0 (i) <0l:Int> isa OTHER */ /* <0l:Int> isa OTHER */ var8 = 1; /* easy <0l:Int> isa OTHER*/ if (unlikely(!var8)) { var_class_name11 = type_core__Int.name; PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name11); -PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 729); +PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 726); fatal_exit(1); } var12 = var5 >= 0l; @@ -5106,18 +5586,21 @@ goto RET_LABEL; RET_LABEL:; return var; } -/* method array#ArrayMapKeys#is_empty for (self: ArrayMapKeys[nullable Object, nullable Object]): Bool */ +/* method array$ArrayMapKeys$is_empty for (self: ArrayMapKeys[nullable Object, nullable Object]): Bool */ short int core__array___core__array__ArrayMapKeys___core__abstract_collection__Collection__is_empty(val* self) { short int var /* : Bool */; val* var1 /* : ArrayMap[nullable Object, nullable Object] */; val* var3 /* : ArrayMap[nullable Object, nullable Object] */; short int var4 /* : Bool */; { -{ /* Inline array#ArrayMapKeys#map (self) on */ +{ /* Inline array$ArrayMapKeys$map (self) on */ var3 = self->attrs[COLOR_core__array__ArrayMapKeys___map].val; /* _map on */ if (unlikely(var3 == NULL)) { +if(catchStack.cursor >= 0){ +longjmp(catchStack.envs[catchStack.cursor], 1); +} PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _map"); -PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 803); +PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 804); fatal_exit(1); } var1 = var3; @@ -5132,18 +5615,21 @@ goto RET_LABEL; RET_LABEL:; return var; } -/* method array#ArrayMapKeys#length for (self: ArrayMapKeys[nullable Object, nullable Object]): Int */ +/* method array$ArrayMapKeys$length for (self: ArrayMapKeys[nullable Object, nullable Object]): Int */ long core__array___core__array__ArrayMapKeys___core__abstract_collection__Collection__length(val* self) { long var /* : Int */; val* var1 /* : ArrayMap[nullable Object, nullable Object] */; val* var3 /* : ArrayMap[nullable Object, nullable Object] */; long var4 /* : Int */; { -{ /* Inline array#ArrayMapKeys#map (self) on */ +{ /* Inline array$ArrayMapKeys$map (self) on */ var3 = self->attrs[COLOR_core__array__ArrayMapKeys___map].val; /* _map on */ if (unlikely(var3 == NULL)) { +if(catchStack.cursor >= 0){ +longjmp(catchStack.envs[catchStack.cursor], 1); +} PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _map"); -PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 803); +PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 804); fatal_exit(1); } var1 = var3; @@ -5158,7 +5644,7 @@ goto RET_LABEL; RET_LABEL:; return var; } -/* method array#ArrayMapKeys#iterator for (self: ArrayMapKeys[nullable Object, nullable Object]): Iterator[nullable Object] */ +/* method array$ArrayMapKeys$iterator for (self: ArrayMapKeys[nullable Object, nullable Object]): Iterator[nullable Object] */ val* core__array___core__array__ArrayMapKeys___core__abstract_collection__Collection__iterator(val* self) { val* var /* : Iterator[nullable Object] */; val* var1 /* : MapKeysIterator[nullable Object, nullable Object] */; @@ -5167,11 +5653,14 @@ val* var4 /* : ArrayMap[nullable Object, nullable Object] */; val* var5 /* : MapIterator[nullable Object, nullable Object] */; var1 = NEW_core__MapKeysIterator(self->type->resolution_table->types[COLOR_core__MapKeysIterator__core__array__ArrayMapKeys___35dK__core__array__ArrayMapKeys___35dE]); { -{ /* Inline array#ArrayMapKeys#map (self) on */ +{ /* Inline array$ArrayMapKeys$map (self) on */ var4 = self->attrs[COLOR_core__array__ArrayMapKeys___map].val; /* _map on */ if (unlikely(var4 == NULL)) { +if(catchStack.cursor >= 0){ +longjmp(catchStack.envs[catchStack.cursor], 1); +} PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _map"); -PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 803); +PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 804); fatal_exit(1); } var2 = var4; @@ -5192,16 +5681,19 @@ goto RET_LABEL; RET_LABEL:; return var; } -/* method array#ArrayMapKeys#clear for (self: ArrayMapKeys[nullable Object, nullable Object]) */ +/* method array$ArrayMapKeys$clear for (self: ArrayMapKeys[nullable Object, nullable Object]) */ void core__array___core__array__ArrayMapKeys___core__abstract_collection__RemovableCollection__clear(val* self) { val* var /* : ArrayMap[nullable Object, nullable Object] */; val* var2 /* : ArrayMap[nullable Object, nullable Object] */; { -{ /* Inline array#ArrayMapKeys#map (self) on */ +{ /* Inline array$ArrayMapKeys$map (self) on */ var2 = self->attrs[COLOR_core__array__ArrayMapKeys___map].val; /* _map on */ if (unlikely(var2 == NULL)) { +if(catchStack.cursor >= 0){ +longjmp(catchStack.envs[catchStack.cursor], 1); +} PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _map"); -PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 803); +PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 804); fatal_exit(1); } var = var2; @@ -5209,11 +5701,11 @@ RET_LABEL1:(void)0; } } { -core___core__ArrayMap___core__abstract_collection__Map__clear(var); /* Direct call array#ArrayMap#clear on */ +core___core__ArrayMap___core__abstract_collection__Map__clear(var); /* Direct call array$ArrayMap$clear on */ } RET_LABEL:; } -/* method array#ArrayMapKeys#remove for (self: ArrayMapKeys[nullable Object, nullable Object], nullable Object) */ +/* method array$ArrayMapKeys$remove for (self: ArrayMapKeys[nullable Object, nullable Object], nullable Object) */ void core__array___core__array__ArrayMapKeys___core__abstract_collection__RemovableCollection__remove(val* self, val* p0) { val* var_key /* var key: nullable Object */; val* var /* : ArrayMap[nullable Object, nullable Object] */; @@ -5236,11 +5728,14 @@ val* var12 /* : ArrayMap[nullable Object, nullable Object] */; val* var14 /* : ArrayMap[nullable Object, nullable Object] */; var_key = p0; { -{ /* Inline array#ArrayMapKeys#map (self) on */ +{ /* Inline array$ArrayMapKeys$map (self) on */ var2 = self->attrs[COLOR_core__array__ArrayMapKeys___map].val; /* _map on */ if (unlikely(var2 == NULL)) { +if(catchStack.cursor >= 0){ +longjmp(catchStack.envs[catchStack.cursor], 1); +} PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _map"); -PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 803); +PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 804); fatal_exit(1); } var = var2; @@ -5264,7 +5759,7 @@ var3 = (((long)var_key&3)?type_info[((long)var_key&3)]:var_key->type)->type_tabl if (unlikely(!var3)) { var_class_name = var_key == NULL ? "null" : (((long)var_key&3)?type_info[((long)var_key&3)]:var_key->type)->name; PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "K", var_class_name); -PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 815); +PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 816); fatal_exit(1); } { @@ -5272,14 +5767,14 @@ var4 = core___core__ArrayMap___index(var, var_key); } var_i = var4; { -{ /* Inline kernel#Int#>= (var_i,0l) on */ +{ /* Inline kernel$Int$>= (var_i,0l) on */ /* Covariant cast for argument 0 (i) <0l:Int> isa OTHER */ /* <0l:Int> isa OTHER */ var7 = 1; /* easy <0l:Int> isa OTHER*/ if (unlikely(!var7)) { var_class_name10 = type_core__Int.name; PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name10); -PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 729); +PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 726); fatal_exit(1); } var11 = var_i >= 0l; @@ -5290,11 +5785,14 @@ RET_LABEL6:(void)0; } if (var5){ { -{ /* Inline array#ArrayMapKeys#map (self) on */ +{ /* Inline array$ArrayMapKeys$map (self) on */ var14 = self->attrs[COLOR_core__array__ArrayMapKeys___map].val; /* _map on */ if (unlikely(var14 == NULL)) { +if(catchStack.cursor >= 0){ +longjmp(catchStack.envs[catchStack.cursor], 1); +} PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _map"); -PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 803); +PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 804); fatal_exit(1); } var12 = var14; @@ -5302,34 +5800,37 @@ RET_LABEL13:(void)0; } } { -core___core__ArrayMap___remove_at_index(var12, var_i); /* Direct call array#ArrayMap#remove_at_index on */ +core___core__ArrayMap___remove_at_index(var12, var_i); /* Direct call array$ArrayMap$remove_at_index on */ } } else { } RET_LABEL:; } -/* method array#ArrayMapKeys#init for (self: ArrayMapKeys[nullable Object, nullable Object]) */ +/* method array$ArrayMapKeys$init for (self: ArrayMapKeys[nullable Object, nullable Object]) */ void core__array___core__array__ArrayMapKeys___core__kernel__Object__init(val* self) { { ((void(*)(val* self))(self->class->vft[COLOR_core__array___core__array__ArrayMapKeys___core__kernel__Object__init]))(self); /* init on */ } RET_LABEL:; } -/* method array#ArrayMapValues#map for (self: ArrayMapValues[nullable Object, nullable Object]): ArrayMap[nullable Object, nullable Object] */ +/* method array$ArrayMapValues$map for (self: ArrayMapValues[nullable Object, nullable Object]): ArrayMap[nullable Object, nullable Object] */ val* core__array___core__array__ArrayMapValues___map(val* self) { val* var /* : ArrayMap[nullable Object, nullable Object] */; val* var1 /* : ArrayMap[nullable Object, nullable Object] */; var1 = self->attrs[COLOR_core__array__ArrayMapValues___map].val; /* _map on */ if (unlikely(var1 == NULL)) { +if(catchStack.cursor >= 0){ +longjmp(catchStack.envs[catchStack.cursor], 1); +} PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _map"); -PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 823); +PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 824); fatal_exit(1); } var = var1; RET_LABEL:; return var; } -/* method array#ArrayMapValues#map= for (self: ArrayMapValues[nullable Object, nullable Object], ArrayMap[nullable Object, nullable Object]) */ +/* method array$ArrayMapValues$map= for (self: ArrayMapValues[nullable Object, nullable Object], ArrayMap[nullable Object, nullable Object]) */ void core__array___core__array__ArrayMapValues___map_61d(val* self, val* p0) { short int var /* : Bool */; int cltype; @@ -5349,13 +5850,13 @@ var = p0->type->type_table[cltype] == idtype; if (unlikely(!var)) { var_class_name = p0 == NULL ? "null" : p0->type->name; PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "ArrayMap[K, E]", var_class_name); -PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 823); +PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 824); fatal_exit(1); } self->attrs[COLOR_core__array__ArrayMapValues___map].val = p0; /* _map on */ RET_LABEL:; } -/* method array#ArrayMapValues#first for (self: ArrayMapValues[nullable Object, nullable Object]): nullable Object */ +/* method array$ArrayMapValues$first for (self: ArrayMapValues[nullable Object, nullable Object]): nullable Object */ val* core__array___core__array__ArrayMapValues___core__abstract_collection__Collection__first(val* self) { val* var /* : nullable Object */; val* var1 /* : ArrayMap[nullable Object, nullable Object] */; @@ -5365,11 +5866,14 @@ val* var5 /* : nullable Object */; val* var6 /* : nullable Object */; val* var8 /* : nullable Object */; { -{ /* Inline array#ArrayMapValues#map (self) on */ +{ /* Inline array$ArrayMapValues$map (self) on */ var3 = self->attrs[COLOR_core__array__ArrayMapValues___map].val; /* _map on */ if (unlikely(var3 == NULL)) { +if(catchStack.cursor >= 0){ +longjmp(catchStack.envs[catchStack.cursor], 1); +} PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _map"); -PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 823); +PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 824); fatal_exit(1); } var1 = var3; @@ -5378,15 +5882,18 @@ RET_LABEL2:(void)0; } var4 = var1->attrs[COLOR_core__array__ArrayMap___items].val; /* _items on */ if (unlikely(var4 == NULL)) { +if(catchStack.cursor >= 0){ +longjmp(catchStack.envs[catchStack.cursor], 1); +} PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _items"); -PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 825); +PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 826); fatal_exit(1); } { var5 = core___core__SequenceRead___Collection__first(var4); } { -{ /* Inline abstract_collection#Couple#second (var5) on */ +{ /* Inline abstract_collection$Couple$second (var5) on */ var8 = var5->attrs[COLOR_core__abstract_collection__Couple___second].val; /* _second on */ var6 = var8; RET_LABEL7:(void)0; @@ -5397,18 +5904,21 @@ goto RET_LABEL; RET_LABEL:; return var; } -/* method array#ArrayMapValues#is_empty for (self: ArrayMapValues[nullable Object, nullable Object]): Bool */ +/* method array$ArrayMapValues$is_empty for (self: ArrayMapValues[nullable Object, nullable Object]): Bool */ short int core__array___core__array__ArrayMapValues___core__abstract_collection__Collection__is_empty(val* self) { short int var /* : Bool */; val* var1 /* : ArrayMap[nullable Object, nullable Object] */; val* var3 /* : ArrayMap[nullable Object, nullable Object] */; short int var4 /* : Bool */; { -{ /* Inline array#ArrayMapValues#map (self) on */ +{ /* Inline array$ArrayMapValues$map (self) on */ var3 = self->attrs[COLOR_core__array__ArrayMapValues___map].val; /* _map on */ if (unlikely(var3 == NULL)) { +if(catchStack.cursor >= 0){ +longjmp(catchStack.envs[catchStack.cursor], 1); +} PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _map"); -PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 823); +PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 824); fatal_exit(1); } var1 = var3; @@ -5423,18 +5933,21 @@ goto RET_LABEL; RET_LABEL:; return var; } -/* method array#ArrayMapValues#length for (self: ArrayMapValues[nullable Object, nullable Object]): Int */ +/* method array$ArrayMapValues$length for (self: ArrayMapValues[nullable Object, nullable Object]): Int */ long core__array___core__array__ArrayMapValues___core__abstract_collection__Collection__length(val* self) { long var /* : Int */; val* var1 /* : ArrayMap[nullable Object, nullable Object] */; val* var3 /* : ArrayMap[nullable Object, nullable Object] */; long var4 /* : Int */; { -{ /* Inline array#ArrayMapValues#map (self) on */ +{ /* Inline array$ArrayMapValues$map (self) on */ var3 = self->attrs[COLOR_core__array__ArrayMapValues___map].val; /* _map on */ if (unlikely(var3 == NULL)) { +if(catchStack.cursor >= 0){ +longjmp(catchStack.envs[catchStack.cursor], 1); +} PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _map"); -PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 823); +PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 824); fatal_exit(1); } var1 = var3; @@ -5449,7 +5962,7 @@ goto RET_LABEL; RET_LABEL:; return var; } -/* method array#ArrayMapValues#iterator for (self: ArrayMapValues[nullable Object, nullable Object]): Iterator[nullable Object] */ +/* method array$ArrayMapValues$iterator for (self: ArrayMapValues[nullable Object, nullable Object]): Iterator[nullable Object] */ val* core__array___core__array__ArrayMapValues___core__abstract_collection__Collection__iterator(val* self) { val* var /* : Iterator[nullable Object] */; val* var1 /* : MapValuesIterator[nullable Object, nullable Object] */; @@ -5458,11 +5971,14 @@ val* var4 /* : ArrayMap[nullable Object, nullable Object] */; val* var5 /* : MapIterator[nullable Object, nullable Object] */; var1 = NEW_core__MapValuesIterator(self->type->resolution_table->types[COLOR_core__MapValuesIterator__core__array__ArrayMapValues___35dK__core__array__ArrayMapValues___35dE]); { -{ /* Inline array#ArrayMapValues#map (self) on */ +{ /* Inline array$ArrayMapValues$map (self) on */ var4 = self->attrs[COLOR_core__array__ArrayMapValues___map].val; /* _map on */ if (unlikely(var4 == NULL)) { +if(catchStack.cursor >= 0){ +longjmp(catchStack.envs[catchStack.cursor], 1); +} PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _map"); -PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 823); +PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 824); fatal_exit(1); } var2 = var4; @@ -5483,7 +5999,7 @@ goto RET_LABEL; RET_LABEL:; return var; } -/* method array#ArrayMapValues#has for (self: ArrayMapValues[nullable Object, nullable Object], nullable Object): Bool */ +/* method array$ArrayMapValues$has for (self: ArrayMapValues[nullable Object, nullable Object], nullable Object): Bool */ short int core__array___core__array__ArrayMapValues___core__abstract_collection__Collection__has(val* self, val* p0) { short int var /* : Bool */; val* var_item /* var item: nullable Object */; @@ -5502,11 +6018,14 @@ short int var12 /* : Bool */; short int var13 /* : Bool */; var_item = p0; { -{ /* Inline array#ArrayMapValues#map (self) on */ +{ /* Inline array$ArrayMapValues$map (self) on */ var3 = self->attrs[COLOR_core__array__ArrayMapValues___map].val; /* _map on */ if (unlikely(var3 == NULL)) { +if(catchStack.cursor >= 0){ +longjmp(catchStack.envs[catchStack.cursor], 1); +} PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _map"); -PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 823); +PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 824); fatal_exit(1); } var1 = var3; @@ -5515,8 +6034,11 @@ RET_LABEL2:(void)0; } var4 = var1->attrs[COLOR_core__array__ArrayMap___items].val; /* _items on */ if (unlikely(var4 == NULL)) { +if(catchStack.cursor >= 0){ +longjmp(catchStack.envs[catchStack.cursor], 1); +} PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _items"); -PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 833); +PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 834); fatal_exit(1); } var_ = var4; @@ -5537,7 +6059,7 @@ var8 = ((val*(*)(val* self))((((long)var_6&3)?class_info[((long)var_6&3)]:var_6- } var_i = var8; { -{ /* Inline abstract_collection#Couple#second (var_i) on */ +{ /* Inline abstract_collection$Couple$second (var_i) on */ var11 = var_i->attrs[COLOR_core__abstract_collection__Couple___second].val; /* _second on */ var9 = var11; RET_LABEL10:(void)0; @@ -5567,28 +6089,145 @@ goto RET_LABEL; RET_LABEL:; return var; } -/* method array#ArrayMapValues#clear for (self: ArrayMapValues[nullable Object, nullable Object]) */ -void core__array___core__array__ArrayMapValues___core__abstract_collection__RemovableCollection__clear(val* self) { -val* var /* : ArrayMap[nullable Object, nullable Object] */; -val* var2 /* : ArrayMap[nullable Object, nullable Object] */; -{ -{ /* Inline array#ArrayMapValues#map (self) on */ -var2 = self->attrs[COLOR_core__array__ArrayMapValues___map].val; /* _map on */ -if (unlikely(var2 == NULL)) { -PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _map"); -PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 823); -fatal_exit(1); -} -var = var2; +/* method array$ArrayMapValues$count for (self: ArrayMapValues[nullable Object, nullable Object], nullable Object): Int */ +long core__array___core__array__ArrayMapValues___core__abstract_collection__Collection__count(val* self, val* p0) { +long var /* : Int */; +val* var_item /* var item: nullable Object */; +long var_nb /* var nb: Int */; +val* var1 /* : ArrayMap[nullable Object, nullable Object] */; +val* var3 /* : ArrayMap[nullable Object, nullable Object] */; +val* var4 /* : Array[Couple[nullable Object, nullable Object]] */; +val* var_ /* var : Array[Couple[nullable Object, nullable Object]] */; +val* var5 /* : IndexedIterator[nullable Object] */; +val* var_6 /* var : IndexedIterator[Couple[nullable Object, nullable Object]] */; +short int var7 /* : Bool */; +val* var8 /* : nullable Object */; +val* var_i /* var i: Couple[nullable Object, nullable Object] */; +val* var9 /* : nullable Object */; +val* var11 /* : nullable Object */; +short int var12 /* : Bool */; +short int var13 /* : Bool */; +long var14 /* : Int */; +short int var16 /* : Bool */; +int cltype; +int idtype; +const char* var_class_name; +long var17 /* : Int */; +var_item = p0; +var_nb = 0l; +{ +{ /* Inline array$ArrayMapValues$map (self) on */ +var3 = self->attrs[COLOR_core__array__ArrayMapValues___map].val; /* _map on */ +if (unlikely(var3 == NULL)) { +if(catchStack.cursor >= 0){ +longjmp(catchStack.envs[catchStack.cursor], 1); +} +PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _map"); +PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 824); +fatal_exit(1); +} +var1 = var3; +RET_LABEL2:(void)0; +} +} +var4 = var1->attrs[COLOR_core__array__ArrayMap___items].val; /* _items on */ +if (unlikely(var4 == NULL)) { +if(catchStack.cursor >= 0){ +longjmp(catchStack.envs[catchStack.cursor], 1); +} +PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _items"); +PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 849); +fatal_exit(1); +} +var_ = var4; +{ +var5 = core___core__AbstractArrayRead___core__abstract_collection__Collection__iterator(var_); +} +var_6 = var5; +for(;;) { +{ +var7 = ((short int(*)(val* self))((((long)var_6&3)?class_info[((long)var_6&3)]:var_6->class)->vft[COLOR_core__abstract_collection__Iterator__is_ok]))(var_6); /* is_ok on */ +} +if (var7){ +} else { +goto BREAK_label; +} +{ +var8 = ((val*(*)(val* self))((((long)var_6&3)?class_info[((long)var_6&3)]:var_6->class)->vft[COLOR_core__abstract_collection__Iterator__item]))(var_6); /* item on */ +} +var_i = var8; +{ +{ /* Inline abstract_collection$Couple$second (var_i) on */ +var11 = var_i->attrs[COLOR_core__abstract_collection__Couple___second].val; /* _second on */ +var9 = var11; +RET_LABEL10:(void)0; +} +} +if (var9 == NULL) { +var12 = (var_item == NULL); +} else { +var13 = ((short int(*)(val* self, val* p0))((((long)var9&3)?class_info[((long)var9&3)]:var9->class)->vft[COLOR_core__kernel__Object___61d_61d]))(var9, var_item); /* == on */ +var12 = var13; +} +if (var12){ +{ +{ /* Inline kernel$Int$+ (var_nb,1l) on */ +/* Covariant cast for argument 0 (i) <1l:Int> isa OTHER */ +/* <1l:Int> isa OTHER */ +var16 = 1; /* easy <1l:Int> isa OTHER*/ +if (unlikely(!var16)) { +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); +} +var17 = var_nb + 1l; +var14 = var17; +goto RET_LABEL15; +RET_LABEL15:(void)0; +} +} +var_nb = var14; +} else { +} +{ +((void(*)(val* self))((((long)var_6&3)?class_info[((long)var_6&3)]:var_6->class)->vft[COLOR_core__abstract_collection__Iterator__next]))(var_6); /* next on */ +} +} +BREAK_label: (void)0; +{ +((void(*)(val* self))((((long)var_6&3)?class_info[((long)var_6&3)]:var_6->class)->vft[COLOR_core__abstract_collection__Iterator__finish]))(var_6); /* finish on */ +} +var = var_nb; +goto RET_LABEL; +RET_LABEL:; +return var; +} +/* method array$ArrayMapValues$clear for (self: ArrayMapValues[nullable Object, nullable Object]) */ +void core__array___core__array__ArrayMapValues___core__abstract_collection__RemovableCollection__clear(val* self) { +val* var /* : ArrayMap[nullable Object, nullable Object] */; +val* var2 /* : ArrayMap[nullable Object, nullable Object] */; +{ +{ /* Inline array$ArrayMapValues$map (self) on */ +var2 = self->attrs[COLOR_core__array__ArrayMapValues___map].val; /* _map on */ +if (unlikely(var2 == NULL)) { +if(catchStack.cursor >= 0){ +longjmp(catchStack.envs[catchStack.cursor], 1); +} +PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _map"); +PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 824); +fatal_exit(1); +} +var = var2; RET_LABEL1:(void)0; } } { -core___core__ArrayMap___core__abstract_collection__Map__clear(var); /* Direct call array#ArrayMap#clear on */ +core___core__ArrayMap___core__abstract_collection__Map__clear(var); /* Direct call array$ArrayMap$clear on */ } RET_LABEL:; } -/* method array#ArrayMapValues#remove for (self: ArrayMapValues[nullable Object, nullable Object], nullable Object) */ +/* method array$ArrayMapValues$remove for (self: ArrayMapValues[nullable Object, nullable Object], nullable Object) */ void core__array___core__array__ArrayMapValues___core__abstract_collection__RemovableCollection__remove(val* self, val* p0) { val* var_item /* var item: nullable Object */; val* var /* : ArrayMap[nullable Object, nullable Object] */; @@ -5624,11 +6263,14 @@ const char* var_class_name30; long var31 /* : Int */; var_item = p0; { -{ /* Inline array#ArrayMapValues#map (self) on */ +{ /* Inline array$ArrayMapValues$map (self) on */ var2 = self->attrs[COLOR_core__array__ArrayMapValues___map].val; /* _map on */ if (unlikely(var2 == NULL)) { +if(catchStack.cursor >= 0){ +longjmp(catchStack.envs[catchStack.cursor], 1); +} PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _map"); -PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 823); +PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 824); fatal_exit(1); } var = var2; @@ -5638,26 +6280,29 @@ RET_LABEL1:(void)0; var_map = var; var3 = var_map->attrs[COLOR_core__array__ArrayMap___items].val; /* _items on */ if (unlikely(var3 == NULL)) { +if(catchStack.cursor >= 0){ +longjmp(catchStack.envs[catchStack.cursor], 1); +} PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _items"); -PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 857); +PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 858); fatal_exit(1); } { -{ /* Inline array#AbstractArrayRead#length (var3) on */ +{ /* Inline array$AbstractArrayRead$length (var3) on */ var6 = var3->attrs[COLOR_core__array__AbstractArrayRead___length].l; /* _length on */ var4 = var6; RET_LABEL5:(void)0; } } { -{ /* Inline kernel#Int#- (var4,1l) on */ +{ /* Inline kernel$Int$- (var4,1l) on */ /* Covariant cast for argument 0 (i) <1l:Int> isa OTHER */ /* <1l:Int> isa OTHER */ var9 = 1; /* easy <1l:Int> isa OTHER*/ if (unlikely(!var9)) { 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, 734); +PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 731); fatal_exit(1); } var10 = var4 - 1l; @@ -5669,14 +6314,14 @@ RET_LABEL8:(void)0; var_i = var7; for(;;) { { -{ /* Inline kernel#Int#>= (var_i,0l) on */ +{ /* Inline kernel$Int$>= (var_i,0l) on */ /* Covariant cast for argument 0 (i) <0l:Int> isa OTHER */ /* <0l:Int> isa OTHER */ var13 = 1; /* easy <0l:Int> isa OTHER*/ if (unlikely(!var13)) { var_class_name16 = type_core__Int.name; PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name16); -PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 729); +PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 726); fatal_exit(1); } var17 = var_i >= 0l; @@ -5688,15 +6333,18 @@ RET_LABEL12:(void)0; if (var11){ var18 = var_map->attrs[COLOR_core__array__ArrayMap___items].val; /* _items on */ if (unlikely(var18 == NULL)) { +if(catchStack.cursor >= 0){ +longjmp(catchStack.envs[catchStack.cursor], 1); +} PRINT_ERROR("Runtime error: %s", "Uninitialized attribute _items"); -PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 859); +PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 860); fatal_exit(1); } { var19 = core___core__Array___core__abstract_collection__SequenceRead___91d_93d(var18, var_i); } { -{ /* Inline abstract_collection#Couple#second (var19) on */ +{ /* Inline abstract_collection$Couple$second (var19) on */ var22 = var19->attrs[COLOR_core__abstract_collection__Couple___second].val; /* _second on */ var20 = var22; RET_LABEL21:(void)0; @@ -5710,20 +6358,20 @@ var23 = var24; } if (var23){ { -core___core__ArrayMap___remove_at_index(var_map, var_i); /* Direct call array#ArrayMap#remove_at_index on */ +core___core__ArrayMap___remove_at_index(var_map, var_i); /* Direct call array$ArrayMap$remove_at_index on */ } goto RET_LABEL; } else { } { -{ /* Inline kernel#Int#- (var_i,1l) on */ +{ /* Inline kernel$Int$- (var_i,1l) on */ /* Covariant cast for argument 0 (i) <1l:Int> isa OTHER */ /* <1l:Int> isa OTHER */ var27 = 1; /* easy <1l:Int> isa OTHER*/ if (unlikely(!var27)) { var_class_name30 = type_core__Int.name; PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name30); -PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 734); +PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 731); fatal_exit(1); } var31 = var_i - 1l; @@ -5740,14 +6388,14 @@ goto BREAK_label; BREAK_label: (void)0; RET_LABEL:; } -/* method array#ArrayMapValues#init for (self: ArrayMapValues[nullable Object, nullable Object]) */ +/* method array$ArrayMapValues$init for (self: ArrayMapValues[nullable Object, nullable Object]) */ void core__array___core__array__ArrayMapValues___core__kernel__Object__init(val* self) { { ((void(*)(val* self))(self->class->vft[COLOR_core__array___core__array__ArrayMapValues___core__kernel__Object__init]))(self); /* init on */ } RET_LABEL:; } -/* method array#Iterator#to_a for (self: Iterator[nullable Object]): Array[nullable Object] */ +/* method array$Iterator$to_a for (self: Iterator[nullable Object]): Array[nullable Object] */ val* core__array___Iterator___to_a(val* self) { val* var /* : Array[nullable Object] */; val* var1 /* : Array[nullable Object] */; @@ -5756,7 +6404,7 @@ short int var2 /* : Bool */; val* var3 /* : nullable Object */; var1 = NEW_core__Array((((long)self&3)?type_info[((long)self&3)]:self->type)->resolution_table->types[COLOR_core__Array__core__Iterator___35dE]); { -core___core__Array___core__kernel__Object__init(var1); /* Direct call array#Array#init on */ +core___core__Array___core__kernel__Object__init(var1); /* Direct call array$Array$init on */ } var_res = var1; for(;;) { @@ -5768,7 +6416,7 @@ if (var2){ var3 = ((val*(*)(val* self))((((long)self&3)?class_info[((long)self&3)]:self->class)->vft[COLOR_core__abstract_collection__Iterator__item]))(self); /* item on */ } { -core___core__Array___core__abstract_collection__SimpleCollection__add(var_res, var3); /* Direct call array#Array#add on */ +core___core__Array___core__abstract_collection__SimpleCollection__add(var_res, var3); /* Direct call array$Array$add on */ } { ((void(*)(val* self))((((long)self&3)?class_info[((long)self&3)]:self->class)->vft[COLOR_core__abstract_collection__Iterator__next]))(self); /* next on */ @@ -5778,12 +6426,15 @@ goto BREAK_label; } } BREAK_label: (void)0; +{ +((void(*)(val* self))((((long)self&3)?class_info[((long)self&3)]:self->class)->vft[COLOR_core__abstract_collection__Iterator__finish]))(self); /* finish on */ +} var = var_res; goto RET_LABEL; RET_LABEL:; return var; } -/* method array#Collection#to_a for (self: Collection[nullable Object]): Array[nullable Object] */ +/* method array$Collection$to_a for (self: Collection[nullable Object]): Array[nullable Object] */ val* core__array___Collection___to_a(val* self) { val* var /* : Array[nullable Object] */; val* var1 /* : Array[nullable Object] */; @@ -5794,29 +6445,29 @@ var1 = NEW_core__Array((((long)self&3)?type_info[((long)self&3)]:self->type)->re var2 = ((long(*)(val* self))((((long)self&3)?class_info[((long)self&3)]:self->class)->vft[COLOR_core__abstract_collection__Collection__length]))(self); /* length on */ } { -core___core__Array___with_capacity(var1, var2); /* Direct call array#Array#with_capacity on */ +core___core__Array___with_capacity(var1, var2); /* Direct call array$Array$with_capacity on */ } var_res = var1; { -core___core__Array___core__abstract_collection__SimpleCollection__add_all(var_res, self); /* Direct call array#Array#add_all on */ +core___core__Array___core__abstract_collection__SimpleCollection__add_all(var_res, self); /* Direct call array$Array$add_all on */ } var = var_res; goto RET_LABEL; RET_LABEL:; return var; } -/* method array#NativeArray#new for (self: NativeArray[nullable Object], Int): NativeArray[nullable Object] */ +/* method array$NativeArray$new for (self: NativeArray[nullable Object], Int): NativeArray[nullable Object] */ val* core___core__NativeArray___new(val* self, long p0) { val* var /* : NativeArray[nullable Object] */; const char* var_class_name; var_class_name = self == NULL ? "null" : self->type->name; PRINT_ERROR("Runtime error: uncompiled method `%s` called on `%s`. NOT YET IMPLEMENTED", "new", var_class_name); -PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 978); +PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 981); fatal_exit(1); RET_LABEL:; return var; } -/* method array#NativeArray#length for (self: NativeArray[nullable Object]): Int */ +/* method array$NativeArray$length for (self: NativeArray[nullable Object]): Int */ long core___core__NativeArray___length(val* self) { long var /* : Int */; long var1 /* : Int */; @@ -5826,7 +6477,7 @@ goto RET_LABEL; RET_LABEL:; return var; } -/* method array#NativeArray#[] for (self: NativeArray[nullable Object], Int): nullable Object */ +/* method array$NativeArray$[] for (self: NativeArray[nullable Object], Int): nullable Object */ val* core___core__NativeArray____91d_93d(val* self, long p0) { val* var /* : nullable Object */; val* var1 /* : Object */; @@ -5836,7 +6487,7 @@ goto RET_LABEL; RET_LABEL:; return var; } -/* method array#NativeArray#[]= for (self: NativeArray[nullable Object], Int, nullable Object) */ +/* method array$NativeArray$[]= for (self: NativeArray[nullable Object], Int, nullable Object) */ void core___core__NativeArray____91d_93d_61d(val* self, long p0, val* p1) { short int var /* : Bool */; int cltype; @@ -5862,13 +6513,13 @@ var = (((long)p1&3)?type_info[((long)p1&3)]:p1->type)->type_table[cltype] == idt if (unlikely(!var)) { var_class_name = 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_name); -PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 988); +PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 991); fatal_exit(1); } ((struct instance_core__NativeArray*)self)->values[p0]=p1; RET_LABEL:; } -/* method array#NativeArray#copy_to for (self: NativeArray[nullable Object], NativeArray[nullable Object], Int) */ +/* method array$NativeArray$copy_to for (self: NativeArray[nullable Object], NativeArray[nullable Object], Int) */ void core___core__NativeArray___copy_to(val* self, val* p0, long p1) { short int var /* : Bool */; int cltype; @@ -5888,95 +6539,19 @@ var = p0->type->type_table[cltype] == idtype; if (unlikely(!var)) { var_class_name = p0 == NULL ? "null" : p0->type->name; PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "NativeArray[E]", var_class_name); -PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 991); +PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 994); fatal_exit(1); } memmove(((struct instance_core__NativeArray*)p0)->values, ((struct instance_core__NativeArray*)self)->values, p1*sizeof(val*)); RET_LABEL:; } -/* method array#NativeArray#memmove for (self: NativeArray[nullable Object], Int, Int, NativeArray[nullable Object], Int) */ +/* method array$NativeArray$memmove for (self: NativeArray[nullable Object], Int, Int, NativeArray[nullable Object], Int) */ void core___core__NativeArray___memmove(val* self, long p0, long p1, val* p2, long p3) { short int var /* : Bool */; int cltype; int idtype; const struct type* type_struct; const char* var_class_name; -long var_start /* var start: Int */; -long var_length /* var length: Int */; -val* var_dest /* var dest: NativeArray[nullable Object] */; -long var_dest_start /* var dest_start: Int */; -short int var1 /* : Bool */; -short int var3 /* : Bool */; -int cltype4; -int idtype5; -const char* var_class_name6; -short int var7 /* : Bool */; -long var_i /* var i: Int */; -short int var8 /* : Bool */; -short int var10 /* : Bool */; -int cltype11; -int idtype12; -const char* var_class_name13; -short int var14 /* : Bool */; -long var15 /* : Int */; -short int var17 /* : Bool */; -int cltype18; -int idtype19; -const char* var_class_name20; -long var21 /* : Int */; -long var22 /* : Int */; -short int var24 /* : Bool */; -int cltype25; -int idtype26; -const char* var_class_name27; -long var28 /* : Int */; -long var29 /* : Int */; -short int var31 /* : Bool */; -int cltype32; -int idtype33; -const char* var_class_name34; -long var35 /* : Int */; -val* var36 /* : nullable Object */; -val* var38 /* : Object */; -short int var40 /* : Bool */; -int cltype41; -int idtype42; -const struct type* type_struct43; -short int is_nullable; -const char* var_class_name44; -long var_i45 /* var i: Int */; -short int var46 /* : Bool */; -short int var48 /* : Bool */; -int cltype49; -int idtype50; -const char* var_class_name51; -short int var52 /* : Bool */; -long var53 /* : Int */; -short int var55 /* : Bool */; -int cltype56; -int idtype57; -const char* var_class_name58; -long var59 /* : Int */; -long var60 /* : Int */; -short int var62 /* : Bool */; -int cltype63; -int idtype64; -const char* var_class_name65; -long var66 /* : Int */; -val* var67 /* : nullable Object */; -val* var69 /* : Object */; -short int var71 /* : Bool */; -int cltype72; -int idtype73; -const struct type* type_struct74; -short int is_nullable75; -const char* var_class_name76; -long var77 /* : Int */; -short int var79 /* : Bool */; -int cltype80; -int idtype81; -const char* var_class_name82; -long var83 /* : Int */; /* Covariant cast for argument 2 (dest) isa NativeArray[E] */ /* isa NativeArray[E] */ type_struct = self->type->resolution_table->types[COLOR_core__NativeArray__core__NativeArray___35dE]; @@ -5990,256 +6565,9 @@ var = p2->type->type_table[cltype] == idtype; if (unlikely(!var)) { var_class_name = p2 == NULL ? "null" : p2->type->name; PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "NativeArray[E]", var_class_name); -PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 994); -fatal_exit(1); -} -var_start = p0; -var_length = p1; -var_dest = p2; -var_dest_start = p3; -{ -{ /* Inline kernel#Int#< (var_start,var_dest_start) on */ -/* Covariant cast for argument 0 (i) isa OTHER */ -/* isa OTHER */ -var3 = 1; /* easy isa OTHER*/ -if (unlikely(!var3)) { -var_class_name6 = type_core__Int.name; -PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name6); -PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 728); -fatal_exit(1); -} -var7 = var_start < var_dest_start; -var1 = var7; -goto RET_LABEL2; -RET_LABEL2:(void)0; -} -} -if (var1){ -var_i = var_length; -for(;;) { -{ -{ /* Inline kernel#Int#> (var_i,0l) on */ -/* Covariant cast for argument 0 (i) <0l:Int> isa OTHER */ -/* <0l:Int> isa OTHER */ -var10 = 1; /* easy <0l:Int> isa OTHER*/ -if (unlikely(!var10)) { -var_class_name13 = type_core__Int.name; -PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name13); -PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 730); -fatal_exit(1); -} -var14 = var_i > 0l; -var8 = var14; -goto RET_LABEL9; -RET_LABEL9:(void)0; -} -} -if (var8){ -{ -{ /* Inline kernel#Int#- (var_i,1l) on */ -/* Covariant cast for argument 0 (i) <1l:Int> isa OTHER */ -/* <1l:Int> isa OTHER */ -var17 = 1; /* easy <1l:Int> isa OTHER*/ -if (unlikely(!var17)) { -var_class_name20 = type_core__Int.name; -PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name20); -PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 734); -fatal_exit(1); -} -var21 = var_i - 1l; -var15 = var21; -goto RET_LABEL16; -RET_LABEL16:(void)0; -} -} -var_i = var15; -{ -{ /* Inline kernel#Int#+ (var_dest_start,var_i) on */ -/* Covariant cast for argument 0 (i) isa OTHER */ -/* isa OTHER */ -var24 = 1; /* easy isa OTHER*/ -if (unlikely(!var24)) { -var_class_name27 = type_core__Int.name; -PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name27); -PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 731); -fatal_exit(1); -} -var28 = var_dest_start + var_i; -var22 = var28; -goto RET_LABEL23; -RET_LABEL23:(void)0; -} -} -{ -{ /* Inline kernel#Int#+ (var_start,var_i) on */ -/* Covariant cast for argument 0 (i) isa OTHER */ -/* isa OTHER */ -var31 = 1; /* easy isa OTHER*/ -if (unlikely(!var31)) { -var_class_name34 = type_core__Int.name; -PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name34); -PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 731); -fatal_exit(1); -} -var35 = var_start + var_i; -var29 = var35; -goto RET_LABEL30; -RET_LABEL30:(void)0; -} -} -{ -{ /* Inline array#NativeArray#[] (self,var29) on */ -var38 = ((struct instance_core__NativeArray*)self)->values[var29]; -var36 = var38; -goto RET_LABEL37; -RET_LABEL37:(void)0; -} -} -{ -{ /* Inline array#NativeArray#[]= (var_dest,var22,var36) on */ -/* Covariant cast for argument 1 (item) isa E */ -/* isa E */ -type_struct43 = var_dest->type->resolution_table->types[COLOR_core__NativeArray___35dE]; -cltype41 = type_struct43->color; -idtype42 = type_struct43->id; -is_nullable = type_struct43->is_nullable; -if(var36 == NULL) { -var40 = is_nullable; -} else { -if(cltype41 >= (((long)var36&3)?type_info[((long)var36&3)]:var36->type)->table_size) { -var40 = 0; -} else { -var40 = (((long)var36&3)?type_info[((long)var36&3)]:var36->type)->type_table[cltype41] == idtype42; -} -} -if (unlikely(!var40)) { -var_class_name44 = var36 == NULL ? "null" : (((long)var36&3)?type_info[((long)var36&3)]:var36->type)->name; -PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "E", var_class_name44); -PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 988); -fatal_exit(1); -} -((struct instance_core__NativeArray*)var_dest)->values[var22]=var36; -RET_LABEL39:(void)0; -} -} -} else { -goto BREAK_label; -} -} -BREAK_label: (void)0; -} else { -var_i45 = 0l; -for(;;) { -{ -{ /* Inline kernel#Int#< (var_i45,var_length) on */ -/* Covariant cast for argument 0 (i) isa OTHER */ -/* isa OTHER */ -var48 = 1; /* easy isa OTHER*/ -if (unlikely(!var48)) { -var_class_name51 = type_core__Int.name; -PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name51); -PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 728); -fatal_exit(1); -} -var52 = var_i45 < var_length; -var46 = var52; -goto RET_LABEL47; -RET_LABEL47:(void)0; -} -} -if (var46){ -{ -{ /* Inline kernel#Int#+ (var_dest_start,var_i45) on */ -/* Covariant cast for argument 0 (i) isa OTHER */ -/* isa OTHER */ -var55 = 1; /* easy isa OTHER*/ -if (unlikely(!var55)) { -var_class_name58 = type_core__Int.name; -PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name58); -PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 731); +PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 997); fatal_exit(1); } -var59 = var_dest_start + var_i45; -var53 = var59; -goto RET_LABEL54; -RET_LABEL54:(void)0; -} -} -{ -{ /* Inline kernel#Int#+ (var_start,var_i45) on */ -/* Covariant cast for argument 0 (i) isa OTHER */ -/* isa OTHER */ -var62 = 1; /* easy isa OTHER*/ -if (unlikely(!var62)) { -var_class_name65 = type_core__Int.name; -PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name65); -PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 731); -fatal_exit(1); -} -var66 = var_start + var_i45; -var60 = var66; -goto RET_LABEL61; -RET_LABEL61:(void)0; -} -} -{ -{ /* Inline array#NativeArray#[] (self,var60) on */ -var69 = ((struct instance_core__NativeArray*)self)->values[var60]; -var67 = var69; -goto RET_LABEL68; -RET_LABEL68:(void)0; -} -} -{ -{ /* Inline array#NativeArray#[]= (var_dest,var53,var67) on */ -/* Covariant cast for argument 1 (item) isa E */ -/* isa E */ -type_struct74 = var_dest->type->resolution_table->types[COLOR_core__NativeArray___35dE]; -cltype72 = type_struct74->color; -idtype73 = type_struct74->id; -is_nullable75 = type_struct74->is_nullable; -if(var67 == NULL) { -var71 = is_nullable75; -} else { -if(cltype72 >= (((long)var67&3)?type_info[((long)var67&3)]:var67->type)->table_size) { -var71 = 0; -} else { -var71 = (((long)var67&3)?type_info[((long)var67&3)]:var67->type)->type_table[cltype72] == idtype73; -} -} -if (unlikely(!var71)) { -var_class_name76 = var67 == NULL ? "null" : (((long)var67&3)?type_info[((long)var67&3)]:var67->type)->name; -PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "E", var_class_name76); -PRINT_ERROR(" (%s:%d)\n", FILE_core__array, 988); -fatal_exit(1); -} -((struct instance_core__NativeArray*)var_dest)->values[var53]=var67; -RET_LABEL70:(void)0; -} -} -{ -{ /* Inline kernel#Int#+ (var_i45,1l) on */ -/* Covariant cast for argument 0 (i) <1l:Int> isa OTHER */ -/* <1l:Int> isa OTHER */ -var79 = 1; /* easy <1l:Int> isa OTHER*/ -if (unlikely(!var79)) { -var_class_name82 = type_core__Int.name; -PRINT_ERROR("Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name82); -PRINT_ERROR(" (%s:%d)\n", FILE_core__kernel, 731); -fatal_exit(1); -} -var83 = var_i45 + 1l; -var77 = var83; -goto RET_LABEL78; -RET_LABEL78:(void)0; -} -} -var_i45 = var77; -} else { -goto BREAK_label84; -} -} -BREAK_label84: (void)0; -} +memmove(((struct instance_core__NativeArray*)p2)->values+p3, ((struct instance_core__NativeArray*)self)->values+p0, p1*sizeof(val*)); RET_LABEL:; }