1 #include "ropes.sep.0.h"
2 /* method ropes#TupleLeafNodePos#curr_node for (self: TupleLeafNodePos): LeafNode */
3 val
* ropes__TupleLeafNodePos__curr_node(val
* self
) {
4 val
* var
/* : LeafNode */;
5 val
* var1
/* : LeafNode */;
6 var1
= self
->attrs
[COLOR_ropes__TupleLeafNodePos___64dcurr_node
].val
; /* @curr_node on <self:TupleLeafNodePos> */
8 fprintf(stderr
, "Runtime error: %s", "Uninitialized attribute @curr_node");
9 fprintf(stderr
, " (%s:%d)\n", "lib/standard/ropes.nit", 24);
16 /* method ropes#TupleLeafNodePos#curr_node for (self: Object): LeafNode */
17 val
* VIRTUAL_ropes__TupleLeafNodePos__curr_node(val
* self
) {
18 val
* var
/* : LeafNode */;
19 val
* var1
/* : LeafNode */;
20 var1
= ropes__TupleLeafNodePos__curr_node(self
);
25 /* method ropes#TupleLeafNodePos#curr_node= for (self: TupleLeafNodePos, LeafNode) */
26 void ropes__TupleLeafNodePos__curr_node_61d(val
* self
, val
* p0
) {
27 self
->attrs
[COLOR_ropes__TupleLeafNodePos___64dcurr_node
].val
= p0
; /* @curr_node on <self:TupleLeafNodePos> */
30 /* method ropes#TupleLeafNodePos#curr_node= for (self: Object, LeafNode) */
31 void VIRTUAL_ropes__TupleLeafNodePos__curr_node_61d(val
* self
, val
* p0
) {
32 ropes__TupleLeafNodePos__curr_node_61d(self
, p0
);
35 /* method ropes#TupleLeafNodePos#corrected_pos for (self: TupleLeafNodePos): Int */
36 long ropes__TupleLeafNodePos__corrected_pos(val
* self
) {
38 long var1
/* : Int */;
39 var1
= self
->attrs
[COLOR_ropes__TupleLeafNodePos___64dcorrected_pos
].l
; /* @corrected_pos on <self:TupleLeafNodePos> */
44 /* method ropes#TupleLeafNodePos#corrected_pos for (self: Object): Int */
45 long VIRTUAL_ropes__TupleLeafNodePos__corrected_pos(val
* self
) {
47 long var1
/* : Int */;
48 var1
= ropes__TupleLeafNodePos__corrected_pos(self
);
53 /* method ropes#TupleLeafNodePos#corrected_pos= for (self: TupleLeafNodePos, Int) */
54 void ropes__TupleLeafNodePos__corrected_pos_61d(val
* self
, long p0
) {
55 self
->attrs
[COLOR_ropes__TupleLeafNodePos___64dcorrected_pos
].l
= p0
; /* @corrected_pos on <self:TupleLeafNodePos> */
58 /* method ropes#TupleLeafNodePos#corrected_pos= for (self: Object, Int) */
59 void VIRTUAL_ropes__TupleLeafNodePos__corrected_pos_61d(val
* self
, long p0
) {
60 ropes__TupleLeafNodePos__corrected_pos_61d(self
, p0
);
63 /* method ropes#TupleLeafNodePos#visit_stack for (self: TupleLeafNodePos): List[TupleVisitNode] */
64 val
* ropes__TupleLeafNodePos__visit_stack(val
* self
) {
65 val
* var
/* : List[TupleVisitNode] */;
66 val
* var1
/* : List[TupleVisitNode] */;
67 var1
= self
->attrs
[COLOR_ropes__TupleLeafNodePos___64dvisit_stack
].val
; /* @visit_stack on <self:TupleLeafNodePos> */
69 fprintf(stderr
, "Runtime error: %s", "Uninitialized attribute @visit_stack");
70 fprintf(stderr
, " (%s:%d)\n", "lib/standard/ropes.nit", 26);
77 /* method ropes#TupleLeafNodePos#visit_stack for (self: Object): List[TupleVisitNode] */
78 val
* VIRTUAL_ropes__TupleLeafNodePos__visit_stack(val
* self
) {
79 val
* var
/* : List[TupleVisitNode] */;
80 val
* var1
/* : List[TupleVisitNode] */;
81 var1
= ropes__TupleLeafNodePos__visit_stack(self
);
86 /* method ropes#TupleLeafNodePos#visit_stack= for (self: TupleLeafNodePos, List[TupleVisitNode]) */
87 void ropes__TupleLeafNodePos__visit_stack_61d(val
* self
, val
* p0
) {
88 self
->attrs
[COLOR_ropes__TupleLeafNodePos___64dvisit_stack
].val
= p0
; /* @visit_stack on <self:TupleLeafNodePos> */
91 /* method ropes#TupleLeafNodePos#visit_stack= for (self: Object, List[TupleVisitNode]) */
92 void VIRTUAL_ropes__TupleLeafNodePos__visit_stack_61d(val
* self
, val
* p0
) {
93 ropes__TupleLeafNodePos__visit_stack_61d(self
, p0
);
96 /* method ropes#TupleLeafNodePos#init for (self: TupleLeafNodePos, LeafNode, Int, List[TupleVisitNode]) */
97 void ropes__TupleLeafNodePos__init(val
* self
, val
* p0
, long p1
, val
* p2
) {
98 self
->attrs
[COLOR_ropes__TupleLeafNodePos___64dcurr_node
].val
= p0
; /* @curr_node on <self:TupleLeafNodePos> */
99 self
->attrs
[COLOR_ropes__TupleLeafNodePos___64dcorrected_pos
].l
= p1
; /* @corrected_pos on <self:TupleLeafNodePos> */
100 self
->attrs
[COLOR_ropes__TupleLeafNodePos___64dvisit_stack
].val
= p2
; /* @visit_stack on <self:TupleLeafNodePos> */
103 /* method ropes#TupleLeafNodePos#init for (self: Object, LeafNode, Int, List[TupleVisitNode]) */
104 void VIRTUAL_ropes__TupleLeafNodePos__init(val
* self
, val
* p0
, long p1
, val
* p2
) {
105 ropes__TupleLeafNodePos__init(self
, p0
, p1
, p2
);
108 /* method ropes#Rope#str_representation for (self: Rope): nullable String */
109 val
* ropes__Rope__str_representation(val
* self
) {
110 val
* var
/* : nullable String */;
111 val
* var1
/* : nullable String */;
112 var1
= self
->attrs
[COLOR_ropes__Rope___64dstr_representation
].val
; /* @str_representation on <self:Rope> */
117 /* method ropes#Rope#str_representation for (self: Object): nullable String */
118 val
* VIRTUAL_ropes__Rope__str_representation(val
* self
) {
119 val
* var
/* : nullable String */;
120 val
* var1
/* : nullable String */;
121 var1
= ropes__Rope__str_representation(self
);
126 /* method ropes#Rope#str_representation= for (self: Rope, nullable String) */
127 void ropes__Rope__str_representation_61d(val
* self
, val
* p0
) {
128 self
->attrs
[COLOR_ropes__Rope___64dstr_representation
].val
= p0
; /* @str_representation on <self:Rope> */
131 /* method ropes#Rope#str_representation= for (self: Object, nullable String) */
132 void VIRTUAL_ropes__Rope__str_representation_61d(val
* self
, val
* p0
) {
133 ropes__Rope__str_representation_61d(self
, p0
);
136 /* method ropes#Rope#parent_node for (self: Rope): RopeNode */
137 val
* ropes__Rope__parent_node(val
* self
) {
138 val
* var
/* : RopeNode */;
139 val
* var1
/* : RopeNode */;
140 var1
= self
->attrs
[COLOR_ropes__Rope___64dparent_node
].val
; /* @parent_node on <self:Rope> */
142 fprintf(stderr
, "Runtime error: %s", "Uninitialized attribute @parent_node");
143 fprintf(stderr
, " (%s:%d)\n", "lib/standard/ropes.nit", 39);
150 /* method ropes#Rope#parent_node for (self: Object): RopeNode */
151 val
* VIRTUAL_ropes__Rope__parent_node(val
* self
) {
152 val
* var
/* : RopeNode */;
153 val
* var1
/* : RopeNode */;
154 var1
= ropes__Rope__parent_node(self
);
159 /* method ropes#Rope#parent_node= for (self: Rope, RopeNode) */
160 void ropes__Rope__parent_node_61d(val
* self
, val
* p0
) {
161 self
->attrs
[COLOR_ropes__Rope___64dparent_node
].val
= p0
; /* @parent_node on <self:Rope> */
164 /* method ropes#Rope#parent_node= for (self: Object, RopeNode) */
165 void VIRTUAL_ropes__Rope__parent_node_61d(val
* self
, val
* p0
) {
166 ropes__Rope__parent_node_61d(self
, p0
);
169 /* method ropes#Rope#init for (self: Rope) */
170 void ropes__Rope__init(val
* self
) {
171 val
* var
/* : ConcatNode */;
172 var
= NEW_ropes__ConcatNode(&type_ropes__ConcatNode
);
173 ((void (*)(val
*))(var
->class->vft
[COLOR_ropes__ConcatNode__init
]))(var
) /* init on <var:ConcatNode>*/;
174 ((void (*)(val
*, val
*))(self
->class->vft
[COLOR_ropes__Rope__parent_node_61d
]))(self
, var
) /* parent_node= on <self:Rope>*/;
177 /* method ropes#Rope#init for (self: Object) */
178 void VIRTUAL_ropes__Rope__init(val
* self
) {
179 ropes__Rope__init(self
);
182 /* method ropes#Rope#with_string for (self: Rope, AbstractString) */
183 void ropes__Rope__with_string(val
* self
, val
* p0
) {
184 val
* var_str
/* var str: AbstractString */;
185 val
* var
/* : ConcatNode */;
186 val
* var1
/* : RopeNode */;
187 short int var2
/* : Bool */;
190 const char* var_class_name
;
191 val
* var3
/* : LeafNode */;
192 val
* var4
/* : RopeNode */;
193 short int var5
/* : Bool */;
196 const char* var_class_name8
;
198 var
= NEW_ropes__ConcatNode(&type_ropes__ConcatNode
);
199 ((void (*)(val
*))(var
->class->vft
[COLOR_ropes__ConcatNode__init
]))(var
) /* init on <var:ConcatNode>*/;
200 ((void (*)(val
*, val
*))(self
->class->vft
[COLOR_ropes__Rope__parent_node_61d
]))(self
, var
) /* parent_node= on <self:Rope>*/;
201 var1
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_ropes__Rope__parent_node
]))(self
) /* parent_node on <self:Rope>*/;
202 /* <var1:RopeNode> isa ConcatNode */
203 cltype
= type_ropes__ConcatNode
.color
;
204 idtype
= type_ropes__ConcatNode
.id
;
205 if(cltype
>= var1
->type
->table_size
) {
208 var2
= var1
->type
->type_table
[cltype
] == idtype
;
211 var_class_name
= var1
== NULL ?
"null" : var1
->type
->name
;
212 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "ConcatNode", var_class_name
);
213 fprintf(stderr
, " (%s:%d)\n", "lib/standard/ropes.nit", 50);
216 var3
= NEW_ropes__LeafNode(&type_ropes__LeafNode
);
217 ((void (*)(val
*, val
*))(var3
->class->vft
[COLOR_ropes__LeafNode__init
]))(var3
, var_str
) /* init on <var3:LeafNode>*/;
218 ((void (*)(val
*, val
*))(var1
->class->vft
[COLOR_ropes__ConcatNode__right_child_61d
]))(var1
, var3
) /* right_child= on <var1:RopeNode(ConcatNode)>*/;
219 var4
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_ropes__Rope__parent_node
]))(self
) /* parent_node on <self:Rope>*/;
220 /* <var4:RopeNode> isa ConcatNode */
221 cltype6
= type_ropes__ConcatNode
.color
;
222 idtype7
= type_ropes__ConcatNode
.id
;
223 if(cltype6
>= var4
->type
->table_size
) {
226 var5
= var4
->type
->type_table
[cltype6
] == idtype7
;
229 var_class_name8
= var4
== NULL ?
"null" : var4
->type
->name
;
230 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "ConcatNode", var_class_name8
);
231 fprintf(stderr
, " (%s:%d)\n", "lib/standard/ropes.nit", 51);
234 ((void (*)(val
*))(var4
->class->vft
[COLOR_ropes__ConcatNode__update_data
]))(var4
) /* update_data on <var4:RopeNode(ConcatNode)>*/;
237 /* method ropes#Rope#with_string for (self: Object, AbstractString) */
238 void VIRTUAL_ropes__Rope__with_string(val
* self
, val
* p0
) {
239 ropes__Rope__with_string(self
, p0
);
242 /* method ropes#Rope#chars for (self: Rope): SequenceRead[Char] */
243 val
* ropes__Rope__chars(val
* self
) {
244 val
* var
/* : SequenceRead[Char] */;
245 val
* var1
/* : CharRopeView */;
246 var1
= NEW_ropes__CharRopeView(&type_ropes__CharRopeView
);
247 ((void (*)(val
*, val
*))(var1
->class->vft
[COLOR_ropes__CharRopeView__init
]))(var1
, self
) /* init on <var1:CharRopeView>*/;
253 /* method ropes#Rope#chars for (self: Object): SequenceRead[Char] */
254 val
* VIRTUAL_ropes__Rope__chars(val
* self
) {
255 val
* var
/* : SequenceRead[Char] */;
256 val
* var1
/* : SequenceRead[Char] */;
257 var1
= ropes__Rope__chars(self
);
262 /* method ropes#Rope#length for (self: Rope): Int */
263 long ropes__Rope__length(val
* self
) {
264 long var
/* : Int */;
265 val
* var1
/* : RopeNode */;
266 long var2
/* : Int */;
267 var1
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_ropes__Rope__parent_node
]))(self
) /* parent_node on <self:Rope>*/;
268 var2
= ((long (*)(val
*))(var1
->class->vft
[COLOR_ropes__RopeNode__length
]))(var1
) /* length on <var1:RopeNode>*/;
274 /* method ropes#Rope#length for (self: Object): Int */
275 long VIRTUAL_ropes__Rope__length(val
* self
) {
276 long var
/* : Int */;
277 long var1
/* : Int */;
278 var1
= ropes__Rope__length(self
);
283 /* method ropes#Rope#to_s for (self: Rope): String */
284 val
* ropes__Rope__to_s(val
* self
) {
285 val
* var
/* : String */;
286 val
* var1
/* : nullable String */;
287 val
* var2
/* : null */;
288 short int var3
/* : Bool */;
289 val
* var4
/* : String */;
290 val
* var5
/* : nullable String */;
291 var1
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_ropes__Rope__str_representation
]))(self
) /* str_representation on <self:Rope>*/;
294 var3
= 1; /* is null */
296 var3
= 0; /* arg is null but recv is not */
299 var4
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_ropes__Rope__flatten
]))(self
) /* flatten on <self:Rope>*/;
303 var5
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_ropes__Rope__str_representation
]))(self
) /* str_representation on <self:Rope>*/;
305 fprintf(stderr
, "Runtime error: %s", "Cast failed");
306 fprintf(stderr
, " (%s:%d)\n", "lib/standard/ropes.nit", 70);
314 /* method ropes#Rope#to_s for (self: Object): String */
315 val
* VIRTUAL_ropes__Rope__to_s(val
* self
) {
316 val
* var
/* : String */;
317 val
* var1
/* : String */;
318 var1
= ropes__Rope__to_s(self
);
323 /* method ropes#Rope#flatten for (self: Rope): String */
324 val
* ropes__Rope__flatten(val
* self
) {
325 val
* var
/* : String */;
326 long var1
/* : Int */;
327 long var2
/* : Int */;
328 long var3
/* : Int */;
329 long var5
/* : Int */;
330 char* var6
/* : NativeString */;
331 char* var_native_final_str
/* var native_final_str: NativeString */;
332 long var7
/* : Int */;
333 char var8
/* : Char */;
334 long var10
/* : Int */;
335 long var_offset
/* var offset: Int */;
336 val
* var11
/* : DFSRopeLeafIterator */;
337 val
* var_iter
/* var iter: DFSRopeLeafIterator */;
338 short int var12
/* : Bool */;
339 val
* var13
/* : nullable Object */;
340 val
* var14
/* : String */;
341 char* var15
/* : NativeString */;
342 val
* var16
/* : nullable Object */;
343 val
* var17
/* : String */;
344 long var18
/* : Int */;
345 long var19
/* : Int */;
346 val
* var21
/* : nullable Object */;
347 val
* var22
/* : String */;
348 long var23
/* : Int */;
349 long var24
/* : Int */;
350 long var26
/* : Int */;
351 long var27
/* : Int */;
352 val
* var28
/* : String */;
353 var1
= ((long (*)(val
*))(self
->class->vft
[COLOR_ropes__Rope__length
]))(self
) /* length on <self:Rope>*/;
355 { /* Inline kernel#Int#+ (var1,var2) */
361 var6
= ((char* (*)(val
*, long))(self
->class->vft
[COLOR_string__StringCapable__calloc_string
]))(self
, var3
) /* calloc_string on <self:Rope>*/;
362 var_native_final_str
= var6
;
363 var7
= ((long (*)(val
*))(self
->class->vft
[COLOR_ropes__Rope__length
]))(self
) /* length on <self:Rope>*/;
365 { /* Inline string#NativeString#[]= (var_native_final_str,var7,var8) */
366 var_native_final_str
[var7
]=var8
;
371 var11
= NEW_ropes__DFSRopeLeafIterator(&type_ropes__DFSRopeLeafIterator
);
372 ((void (*)(val
*, val
*))(var11
->class->vft
[COLOR_ropes__DFSRopeLeafIterator__init
]))(var11
, self
) /* init on <var11:DFSRopeLeafIterator>*/;
375 var12
= ((short int (*)(val
*))(var_iter
->class->vft
[COLOR_abstract_collection__Iterator__is_ok
]))(var_iter
) /* is_ok on <var_iter:DFSRopeLeafIterator>*/;
377 var13
= ((val
* (*)(val
*))(var_iter
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var_iter
) /* item on <var_iter:DFSRopeLeafIterator>*/;
378 var14
= ((val
* (*)(val
*))(var13
->class->vft
[COLOR_ropes__LeafNode__value
]))(var13
) /* value on <var13:nullable Object(LeafNode)>*/;
379 var15
= var14
->attrs
[COLOR_string__AbstractString___items
].str
; /* _items on <var14:String> */
380 var16
= ((val
* (*)(val
*))(var_iter
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var_iter
) /* item on <var_iter:DFSRopeLeafIterator>*/;
381 var17
= ((val
* (*)(val
*))(var16
->class->vft
[COLOR_ropes__LeafNode__value
]))(var16
) /* value on <var16:nullable Object(LeafNode)>*/;
382 var18
= ((long (*)(val
*))(var17
->class->vft
[COLOR_abstract_collection__Collection__length
]))(var17
) /* length on <var17:String>*/;
384 { /* Inline string#NativeString#copy_to (var15,var_native_final_str,var18,var19,var_offset) */
385 memcpy(var_native_final_str
+var_offset
,var15
+var19
,var18
);
388 var21
= ((val
* (*)(val
*))(var_iter
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var_iter
) /* item on <var_iter:DFSRopeLeafIterator>*/;
389 var22
= ((val
* (*)(val
*))(var21
->class->vft
[COLOR_ropes__LeafNode__value
]))(var21
) /* value on <var21:nullable Object(LeafNode)>*/;
390 var23
= ((long (*)(val
*))(var22
->class->vft
[COLOR_abstract_collection__Collection__length
]))(var22
) /* length on <var22:String>*/;
391 { /* Inline kernel#Int#+ (var_offset,var23) */
392 var26
= var_offset
+ var23
;
398 ((void (*)(val
*))(var_iter
->class->vft
[COLOR_abstract_collection__Iterator__next
]))(var_iter
) /* next on <var_iter:DFSRopeLeafIterator>*/;
399 CONTINUE_label
: (void)0;
401 BREAK_label
: (void)0;
402 var27
= ((long (*)(val
*))(self
->class->vft
[COLOR_ropes__Rope__length
]))(self
) /* length on <self:Rope>*/;
403 var28
= string__NativeString__to_s_with_length(var_native_final_str
, var27
);
409 /* method ropes#Rope#flatten for (self: Object): String */
410 val
* VIRTUAL_ropes__Rope__flatten(val
* self
) {
411 val
* var
/* : String */;
412 val
* var1
/* : String */;
413 var1
= ropes__Rope__flatten(self
);
418 /* method ropes#Rope#get_node_for_pos for (self: Rope, Int): TupleLeafNodePos */
419 val
* ropes__Rope__get_node_for_pos(val
* self
, long p0
) {
420 val
* var
/* : TupleLeafNodePos */;
421 long var_position
/* var position: Int */;
422 short int var1
/* : Bool */;
423 long var2
/* : Int */;
424 short int var3
/* : Bool */;
425 short int var5
/* : Bool */;
428 const char* var_class_name
;
429 short int var6
/* : Bool */;
430 short int var_
/* var : Bool */;
431 long var7
/* : Int */;
432 short int var8
/* : Bool */;
433 short int var10
/* : Bool */;
436 const char* var_class_name13
;
437 short int var14
/* : Bool */;
438 val
* var15
/* : RopeNode */;
439 val
* var_curr_node
/* var curr_node: nullable RopeNode */;
440 val
* var16
/* : List[TupleVisitNode] */;
441 val
* var_visit_stack
/* var visit_stack: List[TupleVisitNode] */;
442 short int var17
/* : Bool */;
445 val
* var20
/* : TupleVisitNode */;
446 val
* var_curr_visit_tuple
/* var curr_visit_tuple: TupleVisitNode */;
447 short int var21
/* : Bool */;
448 val
* var22
/* : nullable RopeNode */;
449 val
* var23
/* : null */;
450 short int var24
/* : Bool */;
451 val
* var25
/* : nullable RopeNode */;
452 long var26
/* : Int */;
453 short int var27
/* : Bool */;
454 short int var29
/* : Bool */;
457 const char* var_class_name32
;
458 short int var33
/* : Bool */;
459 short int var34
/* : Bool */;
460 val
* var35
/* : nullable RopeNode */;
461 val
* var36
/* : nullable RopeNode */;
462 val
* var37
/* : null */;
463 short int var38
/* : Bool */;
464 short int var39
/* : Bool */;
465 short int var40
/* : Bool */;
466 val
* var41
/* : nullable RopeNode */;
467 val
* var42
/* : null */;
468 short int var43
/* : Bool */;
469 val
* var44
/* : nullable RopeNode */;
470 long var45
/* : Int */;
471 long var46
/* : Int */;
472 long var48
/* : Int */;
473 val
* var49
/* : nullable RopeNode */;
475 val
* var50
/* : String */;
476 char* var51
/* : NativeString */;
477 long var52
/* : Int */;
478 val
* var53
/* : String */;
479 short int var54
/* : Bool */;
482 val
* var57
/* : TupleLeafNodePos */;
485 { /* Inline kernel#Int#>= (var_position,var2) */
486 /* Covariant cast for argument 0 (i) <var2:Int> isa OTHER */
487 /* <var2:Int> isa OTHER */
488 var5
= 1; /* easy <var2:Int> isa OTHER*/
490 var_class_name
= type_kernel__Int
.name
;
491 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name
);
492 fprintf(stderr
, " (%s:%d)\n", "lib/standard/kernel.nit", 262);
495 var6
= var_position
>= var2
;
502 var7
= ((long (*)(val
*))(self
->class->vft
[COLOR_ropes__Rope__length
]))(self
) /* length on <self:Rope>*/;
503 { /* Inline kernel#Int#< (var_position,var7) */
504 /* Covariant cast for argument 0 (i) <var7:Int> isa OTHER */
505 /* <var7:Int> isa OTHER */
506 var10
= 1; /* easy <var7:Int> isa OTHER*/
508 var_class_name13
= type_kernel__Int
.name
;
509 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name13
);
510 fprintf(stderr
, " (%s:%d)\n", "lib/standard/kernel.nit", 261);
513 var14
= var_position
< var7
;
523 fprintf(stderr
, "Runtime error: %s", "Assert failed");
524 fprintf(stderr
, " (%s:%d)\n", "lib/standard/ropes.nit", 96);
527 var15
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_ropes__Rope__parent_node
]))(self
) /* parent_node on <self:Rope>*/;
528 var_curr_node
= var15
;
529 var16
= NEW_list__List(&type_list__Listropes__TupleVisitNode
);
530 ((void (*)(val
*))(var16
->class->vft
[COLOR_list__List__init
]))(var16
) /* init on <var16:List[TupleVisitNode]>*/;
531 var_visit_stack
= var16
;
533 /* <var_curr_node:nullable RopeNode> isa ConcatNode */
534 cltype18
= type_ropes__ConcatNode
.color
;
535 idtype19
= type_ropes__ConcatNode
.id
;
536 if(var_curr_node
== NULL
) {
539 if(cltype18
>= var_curr_node
->type
->table_size
) {
542 var17
= var_curr_node
->type
->type_table
[cltype18
] == idtype19
;
546 var20
= NEW_ropes__TupleVisitNode(&type_ropes__TupleVisitNode
);
547 ((void (*)(val
*, val
*))(var20
->class->vft
[COLOR_ropes__TupleVisitNode__init
]))(var20
, var_curr_node
) /* init on <var20:TupleVisitNode>*/;
548 var_curr_visit_tuple
= var20
;
549 var22
= ((val
* (*)(val
*))(var_curr_node
->class->vft
[COLOR_ropes__ConcatNode__left_child
]))(var_curr_node
) /* left_child on <var_curr_node:nullable RopeNode(ConcatNode)>*/;
552 var24
= 0; /* is null */
554 var24
= 1; /* arg is null and recv is not */
559 var25
= ((val
* (*)(val
*))(var_curr_node
->class->vft
[COLOR_ropes__ConcatNode__left_child
]))(var_curr_node
) /* left_child on <var_curr_node:nullable RopeNode(ConcatNode)>*/;
561 fprintf(stderr
, "Runtime error: %s", "Reciever is null");
562 fprintf(stderr
, " (%s:%d)\n", "lib/standard/ropes.nit", 107);
565 var26
= ((long (*)(val
*))(var25
->class->vft
[COLOR_ropes__RopeNode__length
]))(var25
) /* length on <var25:nullable RopeNode>*/;
567 { /* Inline kernel#Int#< (var_position,var26) */
568 /* Covariant cast for argument 0 (i) <var26:Int> isa OTHER */
569 /* <var26:Int> isa OTHER */
570 var29
= 1; /* easy <var26:Int> isa OTHER*/
572 var_class_name32
= type_kernel__Int
.name
;
573 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name32
);
574 fprintf(stderr
, " (%s:%d)\n", "lib/standard/kernel.nit", 261);
577 var33
= var_position
< var26
;
586 ((void (*)(val
*, short int))(var_curr_visit_tuple
->class->vft
[COLOR_ropes__TupleVisitNode__left_visited_61d
]))(var_curr_visit_tuple
, var34
) /* left_visited= on <var_curr_visit_tuple:TupleVisitNode>*/;
587 var35
= ((val
* (*)(val
*))(var_curr_node
->class->vft
[COLOR_ropes__ConcatNode__left_child
]))(var_curr_node
) /* left_child on <var_curr_node:nullable RopeNode(ConcatNode)>*/;
588 var_curr_node
= var35
;
590 var36
= ((val
* (*)(val
*))(var_curr_node
->class->vft
[COLOR_ropes__ConcatNode__right_child
]))(var_curr_node
) /* right_child on <var_curr_node:nullable RopeNode(ConcatNode)>*/;
593 var38
= 0; /* is null */
595 var38
= 1; /* arg is null and recv is not */
599 ((void (*)(val
*, short int))(var_curr_visit_tuple
->class->vft
[COLOR_ropes__TupleVisitNode__left_visited_61d
]))(var_curr_visit_tuple
, var39
) /* left_visited= on <var_curr_visit_tuple:TupleVisitNode>*/;
601 ((void (*)(val
*, short int))(var_curr_visit_tuple
->class->vft
[COLOR_ropes__TupleVisitNode__right_visited_61d
]))(var_curr_visit_tuple
, var40
) /* right_visited= on <var_curr_visit_tuple:TupleVisitNode>*/;
602 var41
= ((val
* (*)(val
*))(var_curr_node
->class->vft
[COLOR_ropes__ConcatNode__left_child
]))(var_curr_node
) /* left_child on <var_curr_node:nullable RopeNode(ConcatNode)>*/;
605 var43
= 0; /* is null */
607 var43
= 1; /* arg is null and recv is not */
610 var44
= ((val
* (*)(val
*))(var_curr_node
->class->vft
[COLOR_ropes__ConcatNode__left_child
]))(var_curr_node
) /* left_child on <var_curr_node:nullable RopeNode(ConcatNode)>*/;
612 fprintf(stderr
, "Runtime error: %s", "Reciever is null");
613 fprintf(stderr
, " (%s:%d)\n", "lib/standard/ropes.nit", 113);
616 var45
= ((long (*)(val
*))(var44
->class->vft
[COLOR_ropes__RopeNode__length
]))(var44
) /* length on <var44:nullable RopeNode>*/;
618 { /* Inline kernel#Int#- (var_position,var45) */
619 var48
= var_position
- var45
;
624 var_position
= var46
;
627 var49
= ((val
* (*)(val
*))(var_curr_node
->class->vft
[COLOR_ropes__ConcatNode__right_child
]))(var_curr_node
) /* right_child on <var_curr_node:nullable RopeNode(ConcatNode)>*/;
628 var_curr_node
= var49
;
633 var51
= "Fatal Error";
635 var53
= string__NativeString__to_s_with_length(var51
, var52
);
639 ((void (*)(val
*, val
*))(self
->class->vft
[COLOR_file__Object__print
]))(self
, var50
) /* print on <self:Rope>*/;
640 fprintf(stderr
, "Runtime error: %s", "Aborted");
641 fprintf(stderr
, " (%s:%d)\n", "lib/standard/ropes.nit", 117);
645 ((void (*)(val
*, val
*))(var_visit_stack
->class->vft
[COLOR_abstract_collection__Sequence__push
]))(var_visit_stack
, var_curr_visit_tuple
) /* push on <var_visit_stack:List[TupleVisitNode]>*/;
647 /* <var_curr_node:nullable RopeNode> isa LeafNode */
648 cltype55
= type_ropes__LeafNode
.color
;
649 idtype56
= type_ropes__LeafNode
.id
;
650 if(var_curr_node
== NULL
) {
653 if(cltype55
>= var_curr_node
->type
->table_size
) {
656 var54
= var_curr_node
->type
->type_table
[cltype55
] == idtype56
;
660 var57
= NEW_ropes__TupleLeafNodePos(&type_ropes__TupleLeafNodePos
);
661 ((void (*)(val
*, val
*, long, val
*))(var57
->class->vft
[COLOR_ropes__TupleLeafNodePos__init
]))(var57
, var_curr_node
, var_position
, var_visit_stack
) /* init on <var57:TupleLeafNodePos>*/;
667 CONTINUE_label
: (void)0;
669 BREAK_label
: (void)0;
673 /* method ropes#Rope#get_node_for_pos for (self: Object, Int): TupleLeafNodePos */
674 val
* VIRTUAL_ropes__Rope__get_node_for_pos(val
* self
, long p0
) {
675 val
* var
/* : TupleLeafNodePos */;
676 val
* var1
/* : TupleLeafNodePos */;
677 var1
= ropes__Rope__get_node_for_pos(self
, p0
);
682 /* method ropes#Rope#+ for (self: Rope, Rope): Rope */
683 val
* ropes__Rope___43d(val
* self
, val
* p0
) {
684 val
* var
/* : Rope */;
685 val
* var_other
/* var other: Rope */;
686 val
* var1
/* : BufferRope */;
687 val
* var_new_rope
/* var new_rope: BufferRope */;
688 val
* var2
/* : DFSRopeLeafIterator */;
689 val
* var_first_iter
/* var first_iter: DFSRopeLeafIterator */;
690 short int var3
/* : Bool */;
691 val
* var4
/* : nullable Object */;
692 val
* var5
/* : String */;
693 val
* var6
/* : BufferRope */;
694 val
* var7
/* : DFSRopeLeafIterator */;
695 val
* var_second_iter
/* var second_iter: DFSRopeLeafIterator */;
696 short int var8
/* : Bool */;
697 val
* var9
/* : nullable Object */;
698 val
* var10
/* : String */;
699 val
* var11
/* : BufferRope */;
701 var1
= NEW_ropes__BufferRope(&type_ropes__BufferRope
);
702 ((void (*)(val
*))(var1
->class->vft
[COLOR_ropes__BufferRope__init
]))(var1
) /* init on <var1:BufferRope>*/;
704 var2
= NEW_ropes__DFSRopeLeafIterator(&type_ropes__DFSRopeLeafIterator
);
705 ((void (*)(val
*, val
*))(var2
->class->vft
[COLOR_ropes__DFSRopeLeafIterator__init
]))(var2
, self
) /* init on <var2:DFSRopeLeafIterator>*/;
706 var_first_iter
= var2
;
708 var3
= ((short int (*)(val
*))(var_first_iter
->class->vft
[COLOR_abstract_collection__Iterator__is_ok
]))(var_first_iter
) /* is_ok on <var_first_iter:DFSRopeLeafIterator>*/;
710 var4
= ((val
* (*)(val
*))(var_first_iter
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var_first_iter
) /* item on <var_first_iter:DFSRopeLeafIterator>*/;
711 var5
= ((val
* (*)(val
*))(var4
->class->vft
[COLOR_ropes__LeafNode__value
]))(var4
) /* value on <var4:nullable Object(LeafNode)>*/;
712 var6
= ((val
* (*)(val
*, val
*))(var_new_rope
->class->vft
[COLOR_ropes__BufferRope__append
]))(var_new_rope
, var5
) /* append on <var_new_rope:BufferRope>*/;
714 ((void (*)(val
*))(var_first_iter
->class->vft
[COLOR_abstract_collection__Iterator__next
]))(var_first_iter
) /* next on <var_first_iter:DFSRopeLeafIterator>*/;
715 CONTINUE_label
: (void)0;
717 BREAK_label
: (void)0;
718 var7
= NEW_ropes__DFSRopeLeafIterator(&type_ropes__DFSRopeLeafIterator
);
719 ((void (*)(val
*, val
*))(var7
->class->vft
[COLOR_ropes__DFSRopeLeafIterator__init
]))(var7
, var_other
) /* init on <var7:DFSRopeLeafIterator>*/;
720 var_second_iter
= var7
;
722 var8
= ((short int (*)(val
*))(var_second_iter
->class->vft
[COLOR_abstract_collection__Iterator__is_ok
]))(var_second_iter
) /* is_ok on <var_second_iter:DFSRopeLeafIterator>*/;
724 var9
= ((val
* (*)(val
*))(var_second_iter
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var_second_iter
) /* item on <var_second_iter:DFSRopeLeafIterator>*/;
725 var10
= ((val
* (*)(val
*))(var9
->class->vft
[COLOR_ropes__LeafNode__value
]))(var9
) /* value on <var9:nullable Object(LeafNode)>*/;
726 var11
= ((val
* (*)(val
*, val
*))(var_new_rope
->class->vft
[COLOR_ropes__BufferRope__append
]))(var_new_rope
, var10
) /* append on <var_new_rope:BufferRope>*/;
728 ((void (*)(val
*))(var_second_iter
->class->vft
[COLOR_abstract_collection__Iterator__next
]))(var_second_iter
) /* next on <var_second_iter:DFSRopeLeafIterator>*/;
729 CONTINUE_label12
: (void)0;
731 BREAK_label12
: (void)0;
737 /* method ropes#Rope#+ for (self: Object, Rope): Rope */
738 val
* VIRTUAL_ropes__Rope___43d(val
* self
, val
* p0
) {
739 val
* var
/* : Rope */;
740 val
* var1
/* : Rope */;
741 var1
= ropes__Rope___43d(self
, p0
);
746 /* method ropes#Rope#multi_concat for (self: Rope, Array[Rope]): Rope */
747 val
* ropes__Rope__multi_concat(val
* self
, val
* p0
) {
748 val
* var
/* : Rope */;
749 val
* var_ropes
/* var ropes: Array[Rope] */;
750 val
* var1
/* : BufferRope */;
751 val
* var_new_rope
/* var new_rope: BufferRope */;
752 val
* var2
/* : Iterator[LeafNode] */;
753 val
* var_self_iter
/* var self_iter: Iterator[LeafNode] */;
754 short int var3
/* : Bool */;
755 val
* var4
/* : nullable Object */;
756 val
* var5
/* : String */;
757 val
* var6
/* : BufferRope */;
758 val
* var7
/* : Iterator[nullable Object] */;
759 short int var8
/* : Bool */;
760 val
* var9
/* : nullable Object */;
761 val
* var_i
/* var i: Rope */;
762 val
* var10
/* : Iterator[LeafNode] */;
763 val
* var_iter
/* var iter: Iterator[LeafNode] */;
764 short int var11
/* : Bool */;
765 val
* var12
/* : nullable Object */;
766 val
* var13
/* : String */;
767 val
* var14
/* : BufferRope */;
769 var1
= NEW_ropes__BufferRope(&type_ropes__BufferRope
);
770 ((void (*)(val
*))(var1
->class->vft
[COLOR_ropes__BufferRope__init
]))(var1
) /* init on <var1:BufferRope>*/;
772 var2
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_ropes__Rope__iterator
]))(self
) /* iterator on <self:Rope>*/;
773 var_self_iter
= var2
;
775 var3
= ((short int (*)(val
*))(var_self_iter
->class->vft
[COLOR_abstract_collection__Iterator__is_ok
]))(var_self_iter
) /* is_ok on <var_self_iter:Iterator[LeafNode]>*/;
777 var4
= ((val
* (*)(val
*))(var_self_iter
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var_self_iter
) /* item on <var_self_iter:Iterator[LeafNode]>*/;
778 var5
= ((val
* (*)(val
*))(var4
->class->vft
[COLOR_ropes__LeafNode__value
]))(var4
) /* value on <var4:nullable Object(LeafNode)>*/;
779 var6
= ((val
* (*)(val
*, val
*))(var_new_rope
->class->vft
[COLOR_ropes__BufferRope__append
]))(var_new_rope
, var5
) /* append on <var_new_rope:BufferRope>*/;
781 ((void (*)(val
*))(var_self_iter
->class->vft
[COLOR_abstract_collection__Iterator__next
]))(var_self_iter
) /* next on <var_self_iter:Iterator[LeafNode]>*/;
782 CONTINUE_label
: (void)0;
784 BREAK_label
: (void)0;
785 var7
= ((val
* (*)(val
*))(var_ropes
->class->vft
[COLOR_abstract_collection__Collection__iterator
]))(var_ropes
) /* iterator on <var_ropes:Array[Rope]>*/;
787 var8
= ((short int (*)(val
*))(var7
->class->vft
[COLOR_abstract_collection__Iterator__is_ok
]))(var7
) /* is_ok on <var7:Iterator[nullable Object]>*/;
789 var9
= ((val
* (*)(val
*))(var7
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var7
) /* item on <var7:Iterator[nullable Object]>*/;
791 var10
= ((val
* (*)(val
*))(var_i
->class->vft
[COLOR_ropes__Rope__iterator
]))(var_i
) /* iterator on <var_i:Rope>*/;
794 var11
= ((short int (*)(val
*))(var_iter
->class->vft
[COLOR_abstract_collection__Iterator__is_ok
]))(var_iter
) /* is_ok on <var_iter:Iterator[LeafNode]>*/;
796 var12
= ((val
* (*)(val
*))(var_iter
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var_iter
) /* item on <var_iter:Iterator[LeafNode]>*/;
797 var13
= ((val
* (*)(val
*))(var12
->class->vft
[COLOR_ropes__LeafNode__value
]))(var12
) /* value on <var12:nullable Object(LeafNode)>*/;
798 var14
= ((val
* (*)(val
*, val
*))(var_new_rope
->class->vft
[COLOR_ropes__BufferRope__append
]))(var_new_rope
, var13
) /* append on <var_new_rope:BufferRope>*/;
800 ((void (*)(val
*))(var_iter
->class->vft
[COLOR_abstract_collection__Iterator__next
]))(var_iter
) /* next on <var_iter:Iterator[LeafNode]>*/;
801 CONTINUE_label15
: (void)0;
803 BREAK_label15
: (void)0;
804 CONTINUE_label16
: (void)0;
805 ((void (*)(val
*))(var7
->class->vft
[COLOR_abstract_collection__Iterator__next
]))(var7
) /* next on <var7:Iterator[nullable Object]>*/;
807 BREAK_label16
: (void)0;
813 /* method ropes#Rope#multi_concat for (self: Object, Array[Rope]): Rope */
814 val
* VIRTUAL_ropes__Rope__multi_concat(val
* self
, val
* p0
) {
815 val
* var
/* : Rope */;
816 val
* var1
/* : Rope */;
817 var1
= ropes__Rope__multi_concat(self
, p0
);
822 /* method ropes#Rope#* for (self: Rope, Int): Rope */
823 val
* ropes__Rope___42d(val
* self
, long p0
) {
824 val
* var
/* : Rope */;
825 long var_repeats
/* var repeats: Int */;
826 val
* var1
/* : BufferRope */;
827 val
* var_new_rope
/* var new_rope: BufferRope */;
828 val
* var2
/* : String */;
829 val
* var_str
/* var str: String */;
830 val
* var3
/* : Range[Int] */;
831 long var4
/* : Int */;
832 val
* var5
/* : Discrete */;
833 val
* var6
/* : Discrete */;
834 val
* var7
/* : Iterator[nullable Object] */;
835 short int var8
/* : Bool */;
836 val
* var9
/* : nullable Object */;
837 long var_i
/* var i: Int */;
838 long var10
/* : Int */;
839 val
* var11
/* : BufferRope */;
841 var1
= NEW_ropes__BufferRope(&type_ropes__BufferRope
);
842 ((void (*)(val
*))(var1
->class->vft
[COLOR_ropes__BufferRope__init
]))(var1
) /* init on <var1:BufferRope>*/;
844 var2
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_string__Object__to_s
]))(self
) /* to_s on <self:Rope>*/;
846 var3
= NEW_range__Range(&type_range__Rangekernel__Int
);
848 var5
= BOX_kernel__Int(var4
); /* autobox from Int to Discrete */
849 var6
= BOX_kernel__Int(var_repeats
); /* autobox from Int to Discrete */
850 ((void (*)(val
*, val
*, val
*))(var3
->class->vft
[COLOR_range__Range__init
]))(var3
, var5
, var6
) /* init on <var3:Range[Int]>*/;
851 var7
= ((val
* (*)(val
*))(var3
->class->vft
[COLOR_abstract_collection__Collection__iterator
]))(var3
) /* iterator on <var3:Range[Int]>*/;
853 var8
= ((short int (*)(val
*))(var7
->class->vft
[COLOR_abstract_collection__Iterator__is_ok
]))(var7
) /* is_ok on <var7:Iterator[nullable Object]>*/;
855 var9
= ((val
* (*)(val
*))(var7
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var7
) /* item on <var7:Iterator[nullable Object]>*/;
856 var10
= ((struct instance_kernel__Int
*)var9
)->value
; /* autounbox from nullable Object to Int */;
858 var11
= ((val
* (*)(val
*, val
*))(var_new_rope
->class->vft
[COLOR_ropes__BufferRope__append
]))(var_new_rope
, var_str
) /* append on <var_new_rope:BufferRope>*/;
860 CONTINUE_label
: (void)0;
861 ((void (*)(val
*))(var7
->class->vft
[COLOR_abstract_collection__Iterator__next
]))(var7
) /* next on <var7:Iterator[nullable Object]>*/;
863 BREAK_label
: (void)0;
869 /* method ropes#Rope#* for (self: Object, Int): Rope */
870 val
* VIRTUAL_ropes__Rope___42d(val
* self
, long p0
) {
871 val
* var
/* : Rope */;
872 val
* var1
/* : Rope */;
873 var1
= ropes__Rope___42d(self
, p0
);
878 /* method ropes#Rope#iterator for (self: Rope): Iterator[LeafNode] */
879 val
* ropes__Rope__iterator(val
* self
) {
880 val
* var
/* : Iterator[LeafNode] */;
881 val
* var1
/* : DFSRopeLeafIterator */;
882 var1
= NEW_ropes__DFSRopeLeafIterator(&type_ropes__DFSRopeLeafIterator
);
883 ((void (*)(val
*, val
*))(var1
->class->vft
[COLOR_ropes__DFSRopeLeafIterator__init
]))(var1
, self
) /* init on <var1:DFSRopeLeafIterator>*/;
889 /* method ropes#Rope#iterator for (self: Object): Iterator[LeafNode] */
890 val
* VIRTUAL_ropes__Rope__iterator(val
* self
) {
891 val
* var
/* : Iterator[LeafNode] */;
892 val
* var1
/* : Iterator[LeafNode] */;
893 var1
= ropes__Rope__iterator(self
);
898 /* method ropes#Rope#subrope for (self: Rope, Int, Int): Rope */
899 val
* ropes__Rope__subrope(val
* self
, long p0
, long p1
) {
900 val
* var
/* : Rope */;
901 long var_index_from
/* var index_from: Int */;
902 long var_count
/* var count: Int */;
903 long var1
/* : Int */;
904 short int var2
/* : Bool */;
905 short int var4
/* : Bool */;
908 const char* var_class_name
;
909 short int var5
/* : Bool */;
910 long var6
/* : Int */;
911 short int var7
/* : Bool */;
912 short int var9
/* : Bool */;
915 const char* var_class_name12
;
916 short int var13
/* : Bool */;
917 long var14
/* : Int */;
918 long var16
/* : Int */;
919 long var17
/* : Int */;
920 short int var18
/* : Bool */;
921 short int var20
/* : Bool */;
924 const char* var_class_name23
;
925 short int var24
/* : Bool */;
926 long var25
/* : Int */;
927 long var26
/* : Int */;
928 long var27
/* : Int */;
929 long var29
/* : Int */;
930 long var30
/* : Int */;
931 short int var31
/* : Bool */;
932 short int var33
/* : Bool */;
935 const char* var_class_name36
;
936 short int var37
/* : Bool */;
937 long var38
/* : Int */;
938 long var39
/* : Int */;
939 long var41
/* : Int */;
940 val
* var42
/* : BufferRope */;
941 val
* var_buffer
/* var buffer: BufferRope */;
942 val
* var43
/* : DFSRopeLeafIterator */;
943 val
* var_iter
/* var iter: DFSRopeLeafIterator */;
944 long var44
/* : Int */;
945 long var45
/* : Int */;
946 long var47
/* : Int */;
947 long var_curr_subrope_index
/* var curr_subrope_index: Int */;
948 short int var48
/* : Bool */;
949 long var49
/* : Int */;
950 short int var50
/* : Bool */;
951 short int var52
/* : Bool */;
952 long var53
/* : Int */;
953 short int var54
/* : Bool */;
954 short int var56
/* : Bool */;
957 const char* var_class_name59
;
958 short int var60
/* : Bool */;
959 val
* var61
/* : nullable Object */;
960 val
* var62
/* : String */;
961 long var63
/* : Int */;
962 short int var64
/* : Bool */;
963 short int var66
/* : Bool */;
966 const char* var_class_name69
;
967 short int var70
/* : Bool */;
968 val
* var71
/* : nullable Object */;
969 val
* var72
/* : String */;
970 val
* var73
/* : String */;
971 val
* var74
/* : BufferRope */;
972 val
* var75
/* : nullable Object */;
973 val
* var76
/* : String */;
974 long var77
/* : Int */;
975 long var78
/* : Int */;
976 long var80
/* : Int */;
977 long var81
/* : Int */;
978 long var83
/* : Int */;
979 long var84
/* : Int */;
980 val
* var85
/* : nullable Object */;
981 val
* var86
/* : String */;
982 val
* var87
/* : String */;
983 val
* var88
/* : BufferRope */;
984 val
* var89
/* : nullable Object */;
985 val
* var90
/* : String */;
986 long var91
/* : Int */;
987 short int var92
/* : Bool */;
988 short int var94
/* : Bool */;
991 const char* var_class_name97
;
992 short int var98
/* : Bool */;
993 val
* var99
/* : nullable Object */;
994 val
* var100
/* : String */;
995 val
* var101
/* : BufferRope */;
996 val
* var102
/* : nullable Object */;
997 val
* var103
/* : String */;
998 long var104
/* : Int */;
999 long var105
/* : Int */;
1000 long var107
/* : Int */;
1001 val
* var108
/* : nullable Object */;
1002 val
* var109
/* : String */;
1003 long var110
/* : Int */;
1004 val
* var111
/* : String */;
1005 val
* var112
/* : BufferRope */;
1006 var_index_from
= p0
;
1009 { /* Inline kernel#Int#>= (var_count,var1) */
1010 /* Covariant cast for argument 0 (i) <var1:Int> isa OTHER */
1011 /* <var1:Int> isa OTHER */
1012 var4
= 1; /* easy <var1:Int> isa OTHER*/
1014 var_class_name
= type_kernel__Int
.name
;
1015 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name
);
1016 fprintf(stderr
, " (%s:%d)\n", "lib/standard/kernel.nit", 262);
1019 var5
= var_count
>= var1
;
1025 fprintf(stderr
, "Runtime error: %s", "Assert failed");
1026 fprintf(stderr
, " (%s:%d)\n", "lib/standard/ropes.nit", 205);
1030 { /* Inline kernel#Int#< (var_index_from,var6) */
1031 /* Covariant cast for argument 0 (i) <var6:Int> isa OTHER */
1032 /* <var6:Int> isa OTHER */
1033 var9
= 1; /* easy <var6:Int> isa OTHER*/
1035 var_class_name12
= type_kernel__Int
.name
;
1036 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name12
);
1037 fprintf(stderr
, " (%s:%d)\n", "lib/standard/kernel.nit", 261);
1040 var13
= var_index_from
< var6
;
1046 { /* Inline kernel#Int#+ (var_count,var_index_from) */
1047 var16
= var_count
+ var_index_from
;
1050 RET_LABEL15
:(void)0;
1054 { /* Inline kernel#Int#< (var_count,var17) */
1055 /* Covariant cast for argument 0 (i) <var17:Int> isa OTHER */
1056 /* <var17:Int> isa OTHER */
1057 var20
= 1; /* easy <var17:Int> isa OTHER*/
1059 var_class_name23
= type_kernel__Int
.name
;
1060 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name23
);
1061 fprintf(stderr
, " (%s:%d)\n", "lib/standard/kernel.nit", 261);
1064 var24
= var_count
< var17
;
1067 RET_LABEL19
:(void)0;
1075 var_index_from
= var26
;
1078 { /* Inline kernel#Int#- (var_count,var_index_from) */
1079 var29
= var_count
- var_index_from
;
1082 RET_LABEL28
:(void)0;
1084 var30
= ((long (*)(val
*))(self
->class->vft
[COLOR_ropes__Rope__length
]))(self
) /* length on <self:Rope>*/;
1085 { /* Inline kernel#Int#>= (var27,var30) */
1086 /* Covariant cast for argument 0 (i) <var30:Int> isa OTHER */
1087 /* <var30:Int> isa OTHER */
1088 var33
= 1; /* easy <var30:Int> isa OTHER*/
1090 var_class_name36
= type_kernel__Int
.name
;
1091 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name36
);
1092 fprintf(stderr
, " (%s:%d)\n", "lib/standard/kernel.nit", 262);
1095 var37
= var27
>= var30
;
1098 RET_LABEL32
:(void)0;
1101 var38
= ((long (*)(val
*))(self
->class->vft
[COLOR_ropes__Rope__length
]))(self
) /* length on <self:Rope>*/;
1102 { /* Inline kernel#Int#- (var38,var_index_from) */
1103 var41
= var38
- var_index_from
;
1106 RET_LABEL40
:(void)0;
1111 var42
= NEW_ropes__BufferRope(&type_ropes__BufferRope
);
1112 ((void (*)(val
*))(var42
->class->vft
[COLOR_ropes__BufferRope__init
]))(var42
) /* init on <var42:BufferRope>*/;
1114 var43
= NEW_ropes__DFSRopeLeafIterator(&type_ropes__DFSRopeLeafIterator
);
1115 ((void (*)(val
*, val
*, long))(var43
->class->vft
[COLOR_ropes__DFSRopeLeafIterator__with_index
]))(var43
, self
, var_index_from
) /* with_index on <var43:DFSRopeLeafIterator>*/;
1117 var44
= ((long (*)(val
*))(var_iter
->class->vft
[COLOR_ropes__RopeIterator__pos
]))(var_iter
) /* pos on <var_iter:DFSRopeLeafIterator>*/;
1118 { /* Inline kernel#Int#- (var_index_from,var44) */
1119 var47
= var_index_from
- var44
;
1122 RET_LABEL46
:(void)0;
1124 var_curr_subrope_index
= var45
;
1126 var48
= ((short int (*)(val
*))(var_iter
->class->vft
[COLOR_abstract_collection__Iterator__is_ok
]))(var_iter
) /* is_ok on <var_iter:DFSRopeLeafIterator>*/;
1129 { /* Inline kernel#Int#== (var_count,var49) */
1130 var52
= var_count
== var49
;
1133 RET_LABEL51
:(void)0;
1140 { /* Inline kernel#Int#> (var_curr_subrope_index,var53) */
1141 /* Covariant cast for argument 0 (i) <var53:Int> isa OTHER */
1142 /* <var53:Int> isa OTHER */
1143 var56
= 1; /* easy <var53:Int> isa OTHER*/
1145 var_class_name59
= type_kernel__Int
.name
;
1146 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name59
);
1147 fprintf(stderr
, " (%s:%d)\n", "lib/standard/kernel.nit", 263);
1150 var60
= var_curr_subrope_index
> var53
;
1153 RET_LABEL55
:(void)0;
1156 var61
= ((val
* (*)(val
*))(var_iter
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var_iter
) /* item on <var_iter:DFSRopeLeafIterator>*/;
1157 var62
= ((val
* (*)(val
*))(var61
->class->vft
[COLOR_ropes__LeafNode__value
]))(var61
) /* value on <var61:nullable Object(LeafNode)>*/;
1158 var63
= ((long (*)(val
*))(var62
->class->vft
[COLOR_abstract_collection__Collection__length
]))(var62
) /* length on <var62:String>*/;
1159 { /* Inline kernel#Int#>= (var_count,var63) */
1160 /* Covariant cast for argument 0 (i) <var63:Int> isa OTHER */
1161 /* <var63:Int> isa OTHER */
1162 var66
= 1; /* easy <var63:Int> isa OTHER*/
1164 var_class_name69
= type_kernel__Int
.name
;
1165 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name69
);
1166 fprintf(stderr
, " (%s:%d)\n", "lib/standard/kernel.nit", 262);
1169 var70
= var_count
>= var63
;
1172 RET_LABEL65
:(void)0;
1175 var71
= ((val
* (*)(val
*))(var_iter
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var_iter
) /* item on <var_iter:DFSRopeLeafIterator>*/;
1176 var72
= ((val
* (*)(val
*))(var71
->class->vft
[COLOR_ropes__LeafNode__value
]))(var71
) /* value on <var71:nullable Object(LeafNode)>*/;
1177 var73
= ((val
* (*)(val
*, long, long))(var72
->class->vft
[COLOR_string__AbstractString__substring
]))(var72
, var_curr_subrope_index
, var_count
) /* substring on <var72:String>*/;
1178 var74
= ((val
* (*)(val
*, val
*))(var_buffer
->class->vft
[COLOR_ropes__BufferRope__append
]))(var_buffer
, var73
) /* append on <var_buffer:BufferRope>*/;
1180 var75
= ((val
* (*)(val
*))(var_iter
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var_iter
) /* item on <var_iter:DFSRopeLeafIterator>*/;
1181 var76
= ((val
* (*)(val
*))(var75
->class->vft
[COLOR_ropes__LeafNode__value
]))(var75
) /* value on <var75:nullable Object(LeafNode)>*/;
1182 var77
= ((long (*)(val
*))(var76
->class->vft
[COLOR_abstract_collection__Collection__length
]))(var76
) /* length on <var76:String>*/;
1183 { /* Inline kernel#Int#- (var77,var_curr_subrope_index) */
1184 var80
= var77
- var_curr_subrope_index
;
1187 RET_LABEL79
:(void)0;
1189 { /* Inline kernel#Int#- (var_count,var78) */
1190 var83
= var_count
- var78
;
1193 RET_LABEL82
:(void)0;
1197 var_curr_subrope_index
= var84
;
1199 var85
= ((val
* (*)(val
*))(var_iter
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var_iter
) /* item on <var_iter:DFSRopeLeafIterator>*/;
1200 var86
= ((val
* (*)(val
*))(var85
->class->vft
[COLOR_ropes__LeafNode__value
]))(var85
) /* value on <var85:nullable Object(LeafNode)>*/;
1201 var87
= ((val
* (*)(val
*, long, long))(var86
->class->vft
[COLOR_string__AbstractString__substring
]))(var86
, var_curr_subrope_index
, var_count
) /* substring on <var86:String>*/;
1202 var88
= ((val
* (*)(val
*, val
*))(var_buffer
->class->vft
[COLOR_ropes__BufferRope__append
]))(var_buffer
, var87
) /* append on <var_buffer:BufferRope>*/;
1207 var89
= ((val
* (*)(val
*))(var_iter
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var_iter
) /* item on <var_iter:DFSRopeLeafIterator>*/;
1208 var90
= ((val
* (*)(val
*))(var89
->class->vft
[COLOR_ropes__LeafNode__value
]))(var89
) /* value on <var89:nullable Object(LeafNode)>*/;
1209 var91
= ((long (*)(val
*))(var90
->class->vft
[COLOR_abstract_collection__Collection__length
]))(var90
) /* length on <var90:String>*/;
1210 { /* Inline kernel#Int#>= (var_count,var91) */
1211 /* Covariant cast for argument 0 (i) <var91:Int> isa OTHER */
1212 /* <var91:Int> isa OTHER */
1213 var94
= 1; /* easy <var91:Int> isa OTHER*/
1215 var_class_name97
= type_kernel__Int
.name
;
1216 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name97
);
1217 fprintf(stderr
, " (%s:%d)\n", "lib/standard/kernel.nit", 262);
1220 var98
= var_count
>= var91
;
1223 RET_LABEL93
:(void)0;
1226 var99
= ((val
* (*)(val
*))(var_iter
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var_iter
) /* item on <var_iter:DFSRopeLeafIterator>*/;
1227 var100
= ((val
* (*)(val
*))(var99
->class->vft
[COLOR_ropes__LeafNode__value
]))(var99
) /* value on <var99:nullable Object(LeafNode)>*/;
1228 var101
= ((val
* (*)(val
*, val
*))(var_buffer
->class->vft
[COLOR_ropes__BufferRope__append
]))(var_buffer
, var100
) /* append on <var_buffer:BufferRope>*/;
1230 var102
= ((val
* (*)(val
*))(var_iter
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var_iter
) /* item on <var_iter:DFSRopeLeafIterator>*/;
1231 var103
= ((val
* (*)(val
*))(var102
->class->vft
[COLOR_ropes__LeafNode__value
]))(var102
) /* value on <var102:nullable Object(LeafNode)>*/;
1232 var104
= ((long (*)(val
*))(var103
->class->vft
[COLOR_abstract_collection__Collection__length
]))(var103
) /* length on <var103:String>*/;
1233 { /* Inline kernel#Int#- (var_count,var104) */
1234 var107
= var_count
- var104
;
1237 RET_LABEL106
:(void)0;
1241 var108
= ((val
* (*)(val
*))(var_iter
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var_iter
) /* item on <var_iter:DFSRopeLeafIterator>*/;
1242 var109
= ((val
* (*)(val
*))(var108
->class->vft
[COLOR_ropes__LeafNode__value
]))(var108
) /* value on <var108:nullable Object(LeafNode)>*/;
1244 var111
= ((val
* (*)(val
*, long, long))(var109
->class->vft
[COLOR_string__AbstractString__substring
]))(var109
, var110
, var_count
) /* substring on <var109:String>*/;
1245 var112
= ((val
* (*)(val
*, val
*))(var_buffer
->class->vft
[COLOR_ropes__BufferRope__append
]))(var_buffer
, var111
) /* append on <var_buffer:BufferRope>*/;
1250 ((void (*)(val
*))(var_iter
->class->vft
[COLOR_abstract_collection__Iterator__next
]))(var_iter
) /* next on <var_iter:DFSRopeLeafIterator>*/;
1251 CONTINUE_label
: (void)0;
1253 BREAK_label
: (void)0;
1259 /* method ropes#Rope#subrope for (self: Object, Int, Int): Rope */
1260 val
* VIRTUAL_ropes__Rope__subrope(val
* self
, long p0
, long p1
) {
1261 val
* var
/* : Rope */;
1262 val
* var1
/* : Rope */;
1263 var1
= ropes__Rope__subrope(self
, p0
, p1
);
1268 /* method ropes#Rope#to_upper for (self: Rope): Rope */
1269 val
* ropes__Rope__to_upper(val
* self
) {
1270 val
* var
/* : Rope */;
1271 val
* var1
/* : BufferRope */;
1272 val
* var_new_rope
/* var new_rope: BufferRope */;
1273 val
* var2
/* : DFSRopeLeafIterator */;
1274 val
* var_iter
/* var iter: DFSRopeLeafIterator */;
1275 short int var3
/* : Bool */;
1276 val
* var4
/* : nullable Object */;
1277 val
* var5
/* : String */;
1278 val
* var6
/* : String */;
1279 val
* var7
/* : BufferRope */;
1280 var1
= NEW_ropes__BufferRope(&type_ropes__BufferRope
);
1281 ((void (*)(val
*))(var1
->class->vft
[COLOR_ropes__BufferRope__init
]))(var1
) /* init on <var1:BufferRope>*/;
1282 var_new_rope
= var1
;
1283 var2
= NEW_ropes__DFSRopeLeafIterator(&type_ropes__DFSRopeLeafIterator
);
1284 ((void (*)(val
*, val
*))(var2
->class->vft
[COLOR_ropes__DFSRopeLeafIterator__init
]))(var2
, self
) /* init on <var2:DFSRopeLeafIterator>*/;
1287 var3
= ((short int (*)(val
*))(var_iter
->class->vft
[COLOR_abstract_collection__Iterator__is_ok
]))(var_iter
) /* is_ok on <var_iter:DFSRopeLeafIterator>*/;
1289 var4
= ((val
* (*)(val
*))(var_iter
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var_iter
) /* item on <var_iter:DFSRopeLeafIterator>*/;
1290 var5
= ((val
* (*)(val
*))(var4
->class->vft
[COLOR_ropes__LeafNode__value
]))(var4
) /* value on <var4:nullable Object(LeafNode)>*/;
1291 var6
= ((val
* (*)(val
*))(var5
->class->vft
[COLOR_string__AbstractString__to_upper
]))(var5
) /* to_upper on <var5:String>*/;
1292 var7
= ((val
* (*)(val
*, val
*))(var_new_rope
->class->vft
[COLOR_ropes__BufferRope__append
]))(var_new_rope
, var6
) /* append on <var_new_rope:BufferRope>*/;
1294 ((void (*)(val
*))(var_iter
->class->vft
[COLOR_abstract_collection__Iterator__next
]))(var_iter
) /* next on <var_iter:DFSRopeLeafIterator>*/;
1295 CONTINUE_label
: (void)0;
1297 BREAK_label
: (void)0;
1303 /* method ropes#Rope#to_upper for (self: Object): Rope */
1304 val
* VIRTUAL_ropes__Rope__to_upper(val
* self
) {
1305 val
* var
/* : Rope */;
1306 val
* var1
/* : Rope */;
1307 var1
= ropes__Rope__to_upper(self
);
1312 /* method ropes#Rope#to_lower for (self: Rope): Rope */
1313 val
* ropes__Rope__to_lower(val
* self
) {
1314 val
* var
/* : Rope */;
1315 val
* var1
/* : BufferRope */;
1316 val
* var_new_rope
/* var new_rope: BufferRope */;
1317 val
* var2
/* : DFSRopeLeafIterator */;
1318 val
* var_iter
/* var iter: DFSRopeLeafIterator */;
1319 short int var3
/* : Bool */;
1320 val
* var4
/* : nullable Object */;
1321 val
* var5
/* : String */;
1322 val
* var6
/* : String */;
1323 val
* var7
/* : BufferRope */;
1324 var1
= NEW_ropes__BufferRope(&type_ropes__BufferRope
);
1325 ((void (*)(val
*))(var1
->class->vft
[COLOR_ropes__BufferRope__init
]))(var1
) /* init on <var1:BufferRope>*/;
1326 var_new_rope
= var1
;
1327 var2
= NEW_ropes__DFSRopeLeafIterator(&type_ropes__DFSRopeLeafIterator
);
1328 ((void (*)(val
*, val
*))(var2
->class->vft
[COLOR_ropes__DFSRopeLeafIterator__init
]))(var2
, self
) /* init on <var2:DFSRopeLeafIterator>*/;
1331 var3
= ((short int (*)(val
*))(var_iter
->class->vft
[COLOR_abstract_collection__Iterator__is_ok
]))(var_iter
) /* is_ok on <var_iter:DFSRopeLeafIterator>*/;
1333 var4
= ((val
* (*)(val
*))(var_iter
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var_iter
) /* item on <var_iter:DFSRopeLeafIterator>*/;
1334 var5
= ((val
* (*)(val
*))(var4
->class->vft
[COLOR_ropes__LeafNode__value
]))(var4
) /* value on <var4:nullable Object(LeafNode)>*/;
1335 var6
= ((val
* (*)(val
*))(var5
->class->vft
[COLOR_string__AbstractString__to_lower
]))(var5
) /* to_lower on <var5:String>*/;
1336 var7
= ((val
* (*)(val
*, val
*))(var_new_rope
->class->vft
[COLOR_ropes__BufferRope__append
]))(var_new_rope
, var6
) /* append on <var_new_rope:BufferRope>*/;
1338 ((void (*)(val
*))(var_iter
->class->vft
[COLOR_abstract_collection__Iterator__next
]))(var_iter
) /* next on <var_iter:DFSRopeLeafIterator>*/;
1339 CONTINUE_label
: (void)0;
1341 BREAK_label
: (void)0;
1347 /* method ropes#Rope#to_lower for (self: Object): Rope */
1348 val
* VIRTUAL_ropes__Rope__to_lower(val
* self
) {
1349 val
* var
/* : Rope */;
1350 val
* var1
/* : Rope */;
1351 var1
= ropes__Rope__to_lower(self
);
1356 /* method ropes#Rope#== for (self: Rope, nullable Object): Bool */
1357 short int ropes__Rope___61d_61d(val
* self
, val
* p0
) {
1358 short int var
/* : Bool */;
1359 val
* var_other
/* var other: nullable Object */;
1360 short int var1
/* : Bool */;
1361 val
* var2
/* : null */;
1362 short int var3
/* : Bool */;
1363 short int var_
/* var : Bool */;
1364 short int var4
/* : Bool */;
1365 short int var5
/* : Bool */;
1368 short int var_6
/* var : Bool */;
1369 short int var7
/* : Bool */;
1372 short int var10
/* : Bool */;
1373 short int var11
/* : Bool */;
1374 val
* var12
/* : RopeCharIterator */;
1375 val
* var_self_iter
/* var self_iter: RopeCharIterator */;
1376 short int var13
/* : Bool */;
1379 long var16
/* : Int */;
1380 long var17
/* : Int */;
1381 short int var18
/* : Bool */;
1382 short int var20
/* : Bool */;
1383 short int var21
/* : Bool */;
1384 short int var22
/* : Bool */;
1385 val
* var23
/* : RopeCharIterator */;
1386 val
* var_other_iterator
/* var other_iterator: RopeCharIterator */;
1387 short int var24
/* : Bool */;
1388 val
* var25
/* : nullable Object */;
1389 val
* var26
/* : nullable Object */;
1390 short int var27
/* : Bool */;
1391 short int var29
/* : Bool */;
1392 short int var30
/* : Bool */;
1393 short int var31
/* : Bool */;
1394 short int var32
/* : Bool */;
1397 long var35
/* : Int */;
1398 long var_pos
/* var pos: Int */;
1399 long var36
/* : Int */;
1400 long var37
/* : Int */;
1401 short int var38
/* : Bool */;
1402 short int var40
/* : Bool */;
1403 short int var41
/* : Bool */;
1404 short int var42
/* : Bool */;
1405 short int var43
/* : Bool */;
1406 val
* var44
/* : nullable Object */;
1407 val
* var45
/* : nullable Object */;
1408 short int var46
/* : Bool */;
1409 short int var48
/* : Bool */;
1410 short int var49
/* : Bool */;
1411 short int var50
/* : Bool */;
1412 long var51
/* : Int */;
1413 long var52
/* : Int */;
1414 long var54
/* : Int */;
1415 short int var56
/* : Bool */;
1418 if (var_other
== NULL
) {
1419 var3
= 1; /* is null */
1421 var3
= 0; /* arg is null but recv is not */
1427 /* <var_other:nullable Object(Object)> isa Rope */
1428 cltype
= type_ropes__Rope
.color
;
1429 idtype
= type_ropes__Rope
.id
;
1430 if(cltype
>= var_other
->type
->table_size
) {
1433 var5
= var_other
->type
->type_table
[cltype
] == idtype
;
1439 /* <var_other:nullable Object(Object)> isa AbstractString */
1440 cltype8
= type_string__AbstractString
.color
;
1441 idtype9
= type_string__AbstractString
.id
;
1442 if(cltype8
>= var_other
->type
->table_size
) {
1445 var7
= var_other
->type
->type_table
[cltype8
] == idtype9
;
1458 var12
= NEW_ropes__RopeCharIterator(&type_ropes__RopeCharIterator
);
1459 ((void (*)(val
*, val
*))(var12
->class->vft
[COLOR_ropes__RopeCharIterator__init
]))(var12
, self
) /* init on <var12:RopeCharIterator>*/;
1460 var_self_iter
= var12
;
1461 /* <var_other:nullable Object> isa Rope */
1462 cltype14
= type_ropes__Rope
.color
;
1463 idtype15
= type_ropes__Rope
.id
;
1464 if(var_other
== NULL
) {
1467 if(cltype14
>= var_other
->type
->table_size
) {
1470 var13
= var_other
->type
->type_table
[cltype14
] == idtype15
;
1474 var16
= ((long (*)(val
*))(self
->class->vft
[COLOR_ropes__Rope__length
]))(self
) /* length on <self:Rope>*/;
1475 var17
= ((long (*)(val
*))(var_other
->class->vft
[COLOR_ropes__Rope__length
]))(var_other
) /* length on <var_other:nullable Object(Rope)>*/;
1476 { /* Inline kernel#Int#!= (var16,var17) */
1477 var20
= var16
== var17
;
1481 RET_LABEL19
:(void)0;
1489 var23
= NEW_ropes__RopeCharIterator(&type_ropes__RopeCharIterator
);
1490 ((void (*)(val
*, val
*))(var23
->class->vft
[COLOR_ropes__RopeCharIterator__init
]))(var23
, var_other
) /* init on <var23:RopeCharIterator>*/;
1491 var_other_iterator
= var23
;
1493 var24
= ((short int (*)(val
*))(var_self_iter
->class->vft
[COLOR_abstract_collection__Iterator__is_ok
]))(var_self_iter
) /* is_ok on <var_self_iter:RopeCharIterator>*/;
1495 var25
= ((val
* (*)(val
*))(var_self_iter
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var_self_iter
) /* item on <var_self_iter:RopeCharIterator>*/;
1496 var26
= ((val
* (*)(val
*))(var_other_iterator
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var_other_iterator
) /* item on <var_other_iterator:RopeCharIterator>*/;
1497 { /* Inline kernel#Char#!= (var25,var26) */
1498 var29
= var25
== var26
|| (((struct instance_kernel__Char
*)var25
)->value
== ((struct instance_kernel__Char
*)var26
)->value
);
1502 RET_LABEL28
:(void)0;
1510 ((void (*)(val
*))(var_self_iter
->class->vft
[COLOR_abstract_collection__Iterator__next
]))(var_self_iter
) /* next on <var_self_iter:RopeCharIterator>*/;
1511 ((void (*)(val
*))(var_other_iterator
->class->vft
[COLOR_abstract_collection__Iterator__next
]))(var_other_iterator
) /* next on <var_other_iterator:RopeCharIterator>*/;
1512 CONTINUE_label
: (void)0;
1514 BREAK_label
: (void)0;
1516 /* <var_other:nullable Object> isa AbstractString */
1517 cltype33
= type_string__AbstractString
.color
;
1518 idtype34
= type_string__AbstractString
.id
;
1519 if(var_other
== NULL
) {
1522 if(cltype33
>= var_other
->type
->table_size
) {
1525 var32
= var_other
->type
->type_table
[cltype33
] == idtype34
;
1531 var36
= ((long (*)(val
*))(self
->class->vft
[COLOR_ropes__Rope__length
]))(self
) /* length on <self:Rope>*/;
1532 var37
= ((long (*)(val
*))(var_other
->class->vft
[COLOR_abstract_collection__Collection__length
]))(var_other
) /* length on <var_other:nullable Object(AbstractString)>*/;
1533 { /* Inline kernel#Int#!= (var36,var37) */
1534 var40
= var36
== var37
;
1538 RET_LABEL39
:(void)0;
1547 var43
= ((short int (*)(val
*))(var_self_iter
->class->vft
[COLOR_abstract_collection__Iterator__is_ok
]))(var_self_iter
) /* is_ok on <var_self_iter:RopeCharIterator>*/;
1549 var44
= ((val
* (*)(val
*))(var_self_iter
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var_self_iter
) /* item on <var_self_iter:RopeCharIterator>*/;
1550 var45
= ((val
* (*)(val
*, long))(var_other
->class->vft
[COLOR_abstract_collection__SequenceRead___91d_93d
]))(var_other
, var_pos
) /* [] on <var_other:nullable Object(AbstractString)>*/;
1551 { /* Inline kernel#Char#!= (var44,var45) */
1552 var48
= var44
== var45
|| (((struct instance_kernel__Char
*)var44
)->value
== ((struct instance_kernel__Char
*)var45
)->value
);
1556 RET_LABEL47
:(void)0;
1565 { /* Inline kernel#Int#+ (var_pos,var51) */
1566 var54
= var_pos
+ var51
;
1569 RET_LABEL53
:(void)0;
1572 ((void (*)(val
*))(var_self_iter
->class->vft
[COLOR_abstract_collection__Iterator__next
]))(var_self_iter
) /* next on <var_self_iter:RopeCharIterator>*/;
1573 CONTINUE_label55
: (void)0;
1575 BREAK_label55
: (void)0;
1585 /* method ropes#Rope#== for (self: Object, nullable Object): Bool */
1586 short int VIRTUAL_ropes__Rope___61d_61d(val
* self
, val
* p0
) {
1587 short int var
/* : Bool */;
1588 short int var1
/* : Bool */;
1589 var1
= ropes__Rope___61d_61d(self
, p0
);
1594 /* method ropes#Rope#< for (self: Rope, Rope): Bool */
1595 short int ropes__Rope___60d(val
* self
, val
* p0
) {
1596 short int var
/* : Bool */;
1597 short int var1
/* : Bool */;
1600 const struct type
* type_struct
;
1601 const char* var_class_name
;
1602 val
* var_other
/* var other: Rope */;
1603 val
* var2
/* : SequenceRead[Char] */;
1604 val
* var3
/* : Iterator[nullable Object] */;
1605 val
* var_other_iter
/* var other_iter: IndexedIterator[Char] */;
1606 val
* var4
/* : SequenceRead[Char] */;
1607 val
* var5
/* : Iterator[nullable Object] */;
1608 short int var6
/* : Bool */;
1609 val
* var7
/* : nullable Object */;
1610 char var_i
/* var i: Char */;
1611 char var8
/* : Char */;
1612 short int var9
/* : Bool */;
1613 short int var10
/* : Bool */;
1614 short int var11
/* : Bool */;
1615 val
* var12
/* : nullable Object */;
1616 short int var13
/* : Bool */;
1617 short int var15
/* : Bool */;
1620 const char* var_class_name18
;
1621 char var19
/* : Char */;
1622 short int var20
/* : Bool */;
1623 short int var21
/* : Bool */;
1624 val
* var22
/* : nullable Object */;
1625 short int var23
/* : Bool */;
1626 short int var25
/* : Bool */;
1629 const char* var_class_name28
;
1630 char var29
/* : Char */;
1631 short int var30
/* : Bool */;
1632 short int var31
/* : Bool */;
1633 short int var32
/* : Bool */;
1634 short int var33
/* : Bool */;
1635 short int var34
/* : Bool */;
1636 /* Covariant cast for argument 0 (other) <p0:Rope> isa OTHER */
1637 /* <p0:Rope> isa OTHER */
1638 type_struct
= self
->type
->resolution_table
->types
[COLOR_kernel__Comparable_VTOTHER
];
1639 cltype
= type_struct
->color
;
1640 idtype
= type_struct
->id
;
1641 if(cltype
>= p0
->type
->table_size
) {
1644 var1
= p0
->type
->type_table
[cltype
] == idtype
;
1647 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
1648 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name
);
1649 fprintf(stderr
, " (%s:%d)\n", "lib/standard/ropes.nit", 301);
1653 var2
= ((val
* (*)(val
*))(var_other
->class->vft
[COLOR_ropes__Rope__chars
]))(var_other
) /* chars on <var_other:Rope>*/;
1654 var3
= ((val
* (*)(val
*))(var2
->class->vft
[COLOR_abstract_collection__Collection__iterator
]))(var2
) /* iterator on <var2:SequenceRead[Char]>*/;
1655 var_other_iter
= var3
;
1656 var4
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_ropes__Rope__chars
]))(self
) /* chars on <self:Rope>*/;
1657 var5
= ((val
* (*)(val
*))(var4
->class->vft
[COLOR_abstract_collection__Collection__iterator
]))(var4
) /* iterator on <var4:SequenceRead[Char]>*/;
1659 var6
= ((short int (*)(val
*))(var5
->class->vft
[COLOR_abstract_collection__Iterator__is_ok
]))(var5
) /* is_ok on <var5:Iterator[nullable Object]>*/;
1661 var7
= ((val
* (*)(val
*))(var5
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var5
) /* item on <var5:Iterator[nullable Object]>*/;
1662 var8
= ((struct instance_kernel__Char
*)var7
)->value
; /* autounbox from nullable Object to Char */;
1664 var9
= ((short int (*)(val
*))(var_other_iter
->class->vft
[COLOR_abstract_collection__Iterator__is_ok
]))(var_other_iter
) /* is_ok on <var_other_iter:IndexedIterator[Char]>*/;
1672 var12
= ((val
* (*)(val
*))(var_other_iter
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var_other_iter
) /* item on <var_other_iter:IndexedIterator[Char]>*/;
1673 { /* Inline kernel#Char#< (var_i,var12) */
1674 /* Covariant cast for argument 0 (i) <var12:nullable Object(Char)> isa OTHER */
1675 /* <var12:nullable Object(Char)> isa OTHER */
1676 var15
= 1; /* easy <var12:nullable Object(Char)> isa OTHER*/
1678 var_class_name18
= var12
== NULL ?
"null" : var12
->type
->name
;
1679 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name18
);
1680 fprintf(stderr
, " (%s:%d)\n", "lib/standard/kernel.nit", 437);
1683 var19
= ((struct instance_kernel__Char
*)var12
)->value
; /* autounbox from nullable Object to Char */;
1684 var20
= var_i
< var19
;
1687 RET_LABEL14
:(void)0;
1695 var22
= ((val
* (*)(val
*))(var_other_iter
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var_other_iter
) /* item on <var_other_iter:IndexedIterator[Char]>*/;
1696 { /* Inline kernel#Char#> (var_i,var22) */
1697 /* Covariant cast for argument 0 (i) <var22:nullable Object(Char)> isa OTHER */
1698 /* <var22:nullable Object(Char)> isa OTHER */
1699 var25
= 1; /* easy <var22:nullable Object(Char)> isa OTHER*/
1701 var_class_name28
= var22
== NULL ?
"null" : var22
->type
->name
;
1702 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name28
);
1703 fprintf(stderr
, " (%s:%d)\n", "lib/standard/kernel.nit", 439);
1706 var29
= ((struct instance_kernel__Char
*)var22
)->value
; /* autounbox from nullable Object to Char */;
1707 var30
= var_i
> var29
;
1710 RET_LABEL24
:(void)0;
1718 ((void (*)(val
*))(var_other_iter
->class->vft
[COLOR_abstract_collection__Iterator__next
]))(var_other_iter
) /* next on <var_other_iter:IndexedIterator[Char]>*/;
1719 CONTINUE_label
: (void)0;
1720 ((void (*)(val
*))(var5
->class->vft
[COLOR_abstract_collection__Iterator__next
]))(var5
) /* next on <var5:Iterator[nullable Object]>*/;
1722 BREAK_label
: (void)0;
1723 var32
= ((short int (*)(val
*))(var_other_iter
->class->vft
[COLOR_abstract_collection__Iterator__is_ok
]))(var_other_iter
) /* is_ok on <var_other_iter:IndexedIterator[Char]>*/;
1736 /* method ropes#Rope#< for (self: Object, Comparable): Bool */
1737 short int VIRTUAL_ropes__Rope___60d(val
* self
, val
* p0
) {
1738 short int var
/* : Bool */;
1739 short int var1
/* : Bool */;
1740 var1
= ropes__Rope___60d(self
, p0
);
1745 /* method ropes#BufferRope#is_dirty for (self: BufferRope): Bool */
1746 short int ropes__BufferRope__is_dirty(val
* self
) {
1747 short int var
/* : Bool */;
1748 short int var1
/* : Bool */;
1749 var1
= self
->attrs
[COLOR_ropes__BufferRope___64dis_dirty
].s
; /* @is_dirty on <self:BufferRope> */
1754 /* method ropes#BufferRope#is_dirty for (self: Object): Bool */
1755 short int VIRTUAL_ropes__BufferRope__is_dirty(val
* self
) {
1756 short int var
/* : Bool */;
1757 short int var1
/* : Bool */;
1758 var1
= ropes__BufferRope__is_dirty(self
);
1763 /* method ropes#BufferRope#is_dirty= for (self: BufferRope, Bool) */
1764 void ropes__BufferRope__is_dirty_61d(val
* self
, short int p0
) {
1765 self
->attrs
[COLOR_ropes__BufferRope___64dis_dirty
].s
= p0
; /* @is_dirty on <self:BufferRope> */
1768 /* method ropes#BufferRope#is_dirty= for (self: Object, Bool) */
1769 void VIRTUAL_ropes__BufferRope__is_dirty_61d(val
* self
, short int p0
) {
1770 ropes__BufferRope__is_dirty_61d(self
, p0
);
1773 /* method ropes#BufferRope#init for (self: BufferRope) */
1774 void ropes__BufferRope__init(val
* self
) {
1775 ((void (*)(val
*))(self
->class->vft
[COLOR_ropes__Rope__init
]))(self
) /* init on <self:BufferRope>*/;
1778 /* method ropes#BufferRope#init for (self: Object) */
1779 void VIRTUAL_ropes__BufferRope__init(val
* self
) {
1780 ropes__BufferRope__init(self
);
1783 /* method ropes#BufferRope#with_string for (self: BufferRope, AbstractString) */
1784 void ropes__BufferRope__with_string(val
* self
, val
* p0
) {
1785 val
* var_str
/* var str: AbstractString */;
1787 ((void (*)(val
*, val
*))(self
->class->vft
[COLOR_ropes__Rope__with_string
]))(self
, p0
) /* with_string on <self:BufferRope>*/;
1790 /* method ropes#BufferRope#with_string for (self: Object, AbstractString) */
1791 void VIRTUAL_ropes__BufferRope__with_string(val
* self
, val
* p0
) {
1792 ropes__BufferRope__with_string(self
, p0
);
1795 /* method ropes#BufferRope#rotate_right for (self: BufferRope, ConcatNode) */
1796 void ropes__BufferRope__rotate_right(val
* self
, val
* p0
) {
1797 val
* var_root
/* var root: ConcatNode */;
1798 val
* var
/* : nullable RopeNode */;
1799 val
* var1
/* : null */;
1800 short int var2
/* : Bool */;
1801 val
* var3
/* : nullable RopeNode */;
1802 short int var4
/* : Bool */;
1805 const char* var_class_name
;
1806 val
* var_pivot
/* var pivot: ConcatNode */;
1807 val
* var5
/* : nullable RopeNode */;
1808 val
* var_root_new_left
/* var root_new_left: nullable RopeNode */;
1809 val
* var6
/* : nullable ConcatNode */;
1810 val
* var_root_parent
/* var root_parent: nullable ConcatNode */;
1811 val
* var7
/* : null */;
1812 short int var8
/* : Bool */;
1813 val
* var9
/* : null */;
1814 val
* var10
/* : nullable RopeNode */;
1815 short int var11
/* : Bool */;
1817 var
= ((val
* (*)(val
*))(var_root
->class->vft
[COLOR_ropes__ConcatNode__left_child
]))(var_root
) /* left_child on <var_root:ConcatNode>*/;
1820 var2
= 0; /* is null */
1822 var2
= 1; /* arg is null and recv is not */
1825 fprintf(stderr
, "Runtime error: %s", "Assert failed");
1826 fprintf(stderr
, " (%s:%d)\n", "lib/standard/ropes.nit", 353);
1829 var3
= ((val
* (*)(val
*))(var_root
->class->vft
[COLOR_ropes__ConcatNode__left_child
]))(var_root
) /* left_child on <var_root:ConcatNode>*/;
1830 /* <var3:nullable RopeNode> isa ConcatNode */
1831 cltype
= type_ropes__ConcatNode
.color
;
1832 idtype
= type_ropes__ConcatNode
.id
;
1836 if(cltype
>= var3
->type
->table_size
) {
1839 var4
= var3
->type
->type_table
[cltype
] == idtype
;
1843 var_class_name
= var3
== NULL ?
"null" : var3
->type
->name
;
1844 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "ConcatNode", var_class_name
);
1845 fprintf(stderr
, " (%s:%d)\n", "lib/standard/ropes.nit", 354);
1849 var5
= ((val
* (*)(val
*))(var_pivot
->class->vft
[COLOR_ropes__ConcatNode__right_child
]))(var_pivot
) /* right_child on <var_pivot:ConcatNode>*/;
1850 var_root_new_left
= var5
;
1851 var6
= ((val
* (*)(val
*))(var_root
->class->vft
[COLOR_ropes__RopeNode__parent
]))(var_root
) /* parent on <var_root:ConcatNode>*/;
1852 var_root_parent
= var6
;
1853 ((void (*)(val
*, val
*))(var_root
->class->vft
[COLOR_ropes__ConcatNode__left_child_61d
]))(var_root
, var_root_new_left
) /* left_child= on <var_root:ConcatNode>*/;
1854 ((void (*)(val
*, val
*))(var_pivot
->class->vft
[COLOR_ropes__ConcatNode__right_child_61d
]))(var_pivot
, var_root
) /* right_child= on <var_pivot:ConcatNode>*/;
1856 if (var_root_parent
== NULL
) {
1857 var8
= 1; /* is null */
1859 var8
= 0; /* arg is null but recv is not */
1862 ((void (*)(val
*, val
*))(self
->class->vft
[COLOR_ropes__Rope__parent_node_61d
]))(self
, var_pivot
) /* parent_node= on <self:BufferRope>*/;
1864 ((void (*)(val
*, val
*))(var_pivot
->class->vft
[COLOR_ropes__RopeNode__parent_61d
]))(var_pivot
, var9
) /* parent= on <var_pivot:ConcatNode>*/;
1868 var10
= ((val
* (*)(val
*))(var_root_parent
->class->vft
[COLOR_ropes__ConcatNode__left_child
]))(var_root_parent
) /* left_child on <var_root_parent:nullable ConcatNode(ConcatNode)>*/;
1869 if (var10
== NULL
) {
1870 var11
= 0; /* <var_root:ConcatNode> cannot be null */
1872 var11
= ((short int (*)(val
*, val
*))(var10
->class->vft
[COLOR_kernel__Object___61d_61d
]))(var10
, var_root
) /* == on <var10:nullable RopeNode>*/;
1875 ((void (*)(val
*, val
*))(var_root_parent
->class->vft
[COLOR_ropes__ConcatNode__left_child_61d
]))(var_root_parent
, var_pivot
) /* left_child= on <var_root_parent:nullable ConcatNode(ConcatNode)>*/;
1877 ((void (*)(val
*, val
*))(var_root_parent
->class->vft
[COLOR_ropes__ConcatNode__right_child_61d
]))(var_root_parent
, var_pivot
) /* right_child= on <var_root_parent:nullable ConcatNode(ConcatNode)>*/;
1879 ((void (*)(val
*))(var_root
->class->vft
[COLOR_ropes__ConcatNode__update_data
]))(var_root
) /* update_data on <var_root:ConcatNode>*/;
1880 ((void (*)(val
*))(var_pivot
->class->vft
[COLOR_ropes__ConcatNode__update_data
]))(var_pivot
) /* update_data on <var_pivot:ConcatNode>*/;
1881 ((void (*)(val
*))(var_root_parent
->class->vft
[COLOR_ropes__ConcatNode__update_data
]))(var_root_parent
) /* update_data on <var_root_parent:nullable ConcatNode(ConcatNode)>*/;
1884 /* method ropes#BufferRope#rotate_right for (self: Object, ConcatNode) */
1885 void VIRTUAL_ropes__BufferRope__rotate_right(val
* self
, val
* p0
) {
1886 ropes__BufferRope__rotate_right(self
, p0
);
1889 /* method ropes#BufferRope#rotate_left for (self: BufferRope, ConcatNode) */
1890 void ropes__BufferRope__rotate_left(val
* self
, val
* p0
) {
1891 val
* var_root
/* var root: ConcatNode */;
1892 val
* var
/* : nullable RopeNode */;
1893 val
* var1
/* : null */;
1894 short int var2
/* : Bool */;
1895 val
* var3
/* : nullable RopeNode */;
1896 short int var4
/* : Bool */;
1899 const char* var_class_name
;
1900 val
* var_pivot
/* var pivot: ConcatNode */;
1901 val
* var5
/* : nullable RopeNode */;
1902 val
* var_root_new_right
/* var root_new_right: nullable RopeNode */;
1903 val
* var6
/* : nullable ConcatNode */;
1904 val
* var_root_parent
/* var root_parent: nullable ConcatNode */;
1905 val
* var7
/* : null */;
1906 short int var8
/* : Bool */;
1907 val
* var9
/* : null */;
1908 val
* var10
/* : nullable RopeNode */;
1909 short int var11
/* : Bool */;
1911 var
= ((val
* (*)(val
*))(var_root
->class->vft
[COLOR_ropes__ConcatNode__right_child
]))(var_root
) /* right_child on <var_root:ConcatNode>*/;
1914 var2
= 0; /* is null */
1916 var2
= 1; /* arg is null and recv is not */
1919 fprintf(stderr
, "Runtime error: %s", "Assert failed");
1920 fprintf(stderr
, " (%s:%d)\n", "lib/standard/ropes.nit", 386);
1923 var3
= ((val
* (*)(val
*))(var_root
->class->vft
[COLOR_ropes__ConcatNode__right_child
]))(var_root
) /* right_child on <var_root:ConcatNode>*/;
1924 /* <var3:nullable RopeNode> isa ConcatNode */
1925 cltype
= type_ropes__ConcatNode
.color
;
1926 idtype
= type_ropes__ConcatNode
.id
;
1930 if(cltype
>= var3
->type
->table_size
) {
1933 var4
= var3
->type
->type_table
[cltype
] == idtype
;
1937 var_class_name
= var3
== NULL ?
"null" : var3
->type
->name
;
1938 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "ConcatNode", var_class_name
);
1939 fprintf(stderr
, " (%s:%d)\n", "lib/standard/ropes.nit", 387);
1943 var5
= ((val
* (*)(val
*))(var_pivot
->class->vft
[COLOR_ropes__ConcatNode__left_child
]))(var_pivot
) /* left_child on <var_pivot:ConcatNode>*/;
1944 var_root_new_right
= var5
;
1945 var6
= ((val
* (*)(val
*))(var_root
->class->vft
[COLOR_ropes__RopeNode__parent
]))(var_root
) /* parent on <var_root:ConcatNode>*/;
1946 var_root_parent
= var6
;
1947 ((void (*)(val
*, val
*))(var_root
->class->vft
[COLOR_ropes__ConcatNode__right_child_61d
]))(var_root
, var_root_new_right
) /* right_child= on <var_root:ConcatNode>*/;
1948 ((void (*)(val
*, val
*))(var_pivot
->class->vft
[COLOR_ropes__ConcatNode__left_child_61d
]))(var_pivot
, var_root
) /* left_child= on <var_pivot:ConcatNode>*/;
1950 if (var_root_parent
== NULL
) {
1951 var8
= 1; /* is null */
1953 var8
= 0; /* arg is null but recv is not */
1956 ((void (*)(val
*, val
*))(self
->class->vft
[COLOR_ropes__Rope__parent_node_61d
]))(self
, var_pivot
) /* parent_node= on <self:BufferRope>*/;
1958 ((void (*)(val
*, val
*))(var_pivot
->class->vft
[COLOR_ropes__RopeNode__parent_61d
]))(var_pivot
, var9
) /* parent= on <var_pivot:ConcatNode>*/;
1962 var10
= ((val
* (*)(val
*))(var_root_parent
->class->vft
[COLOR_ropes__ConcatNode__left_child
]))(var_root_parent
) /* left_child on <var_root_parent:nullable ConcatNode(ConcatNode)>*/;
1963 if (var10
== NULL
) {
1964 var11
= 0; /* <var_root:ConcatNode> cannot be null */
1966 var11
= ((short int (*)(val
*, val
*))(var10
->class->vft
[COLOR_kernel__Object___61d_61d
]))(var10
, var_root
) /* == on <var10:nullable RopeNode>*/;
1969 ((void (*)(val
*, val
*))(var_root_parent
->class->vft
[COLOR_ropes__ConcatNode__left_child_61d
]))(var_root_parent
, var_pivot
) /* left_child= on <var_root_parent:nullable ConcatNode(ConcatNode)>*/;
1971 ((void (*)(val
*, val
*))(var_root_parent
->class->vft
[COLOR_ropes__ConcatNode__right_child_61d
]))(var_root_parent
, var_pivot
) /* right_child= on <var_root_parent:nullable ConcatNode(ConcatNode)>*/;
1973 ((void (*)(val
*))(var_root
->class->vft
[COLOR_ropes__ConcatNode__update_data
]))(var_root
) /* update_data on <var_root:ConcatNode>*/;
1974 ((void (*)(val
*))(var_pivot
->class->vft
[COLOR_ropes__ConcatNode__update_data
]))(var_pivot
) /* update_data on <var_pivot:ConcatNode>*/;
1975 ((void (*)(val
*))(var_root_parent
->class->vft
[COLOR_ropes__ConcatNode__update_data
]))(var_root_parent
) /* update_data on <var_root_parent:nullable ConcatNode(ConcatNode)>*/;
1978 /* method ropes#BufferRope#rotate_left for (self: Object, ConcatNode) */
1979 void VIRTUAL_ropes__BufferRope__rotate_left(val
* self
, val
* p0
) {
1980 ropes__BufferRope__rotate_left(self
, p0
);
1983 /* method ropes#BufferRope#balance_from_node for (self: BufferRope, nullable ConcatNode) */
1984 void ropes__BufferRope__balance_from_node(val
* self
, val
* p0
) {
1985 val
* var_parent_node
/* var parent_node: nullable ConcatNode */;
1986 val
* var
/* : null */;
1987 short int var1
/* : Bool */;
1988 long var2
/* : Int */;
1989 long var_node_balance
/* var node_balance: Int */;
1990 short int var3
/* : Bool */;
1991 long var4
/* : Int */;
1992 long var5
/* : Int */;
1993 long var7
/* : Int */;
1994 short int var8
/* : Bool */;
1995 short int var10
/* : Bool */;
1998 const char* var_class_name
;
1999 short int var11
/* : Bool */;
2000 short int var_
/* var : Bool */;
2001 long var12
/* : Int */;
2002 short int var13
/* : Bool */;
2003 short int var15
/* : Bool */;
2006 const char* var_class_name18
;
2007 short int var19
/* : Bool */;
2008 val
* var20
/* : nullable ConcatNode */;
2009 var_parent_node
= p0
;
2012 if (var_parent_node
== NULL
) {
2013 var1
= 0; /* is null */
2015 var1
= 1; /* arg is null and recv is not */
2018 ((void (*)(val
*))(var_parent_node
->class->vft
[COLOR_ropes__ConcatNode__update_data
]))(var_parent_node
) /* update_data on <var_parent_node:nullable ConcatNode(ConcatNode)>*/;
2019 var2
= ((long (*)(val
*))(var_parent_node
->class->vft
[COLOR_ropes__RopeNode__balance_factor
]))(var_parent_node
) /* balance_factor on <var_parent_node:nullable ConcatNode(ConcatNode)>*/;
2020 var_node_balance
= var2
;
2022 { /* Inline kernel#Int#unary - (var4) */
2028 { /* Inline kernel#Int#< (var_node_balance,var5) */
2029 /* Covariant cast for argument 0 (i) <var5:Int> isa OTHER */
2030 /* <var5:Int> isa OTHER */
2031 var10
= 1; /* easy <var5:Int> isa OTHER*/
2033 var_class_name
= type_kernel__Int
.name
;
2034 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name
);
2035 fprintf(stderr
, " (%s:%d)\n", "lib/standard/kernel.nit", 261);
2038 var11
= var_node_balance
< var5
;
2048 { /* Inline kernel#Int#> (var_node_balance,var12) */
2049 /* Covariant cast for argument 0 (i) <var12:Int> isa OTHER */
2050 /* <var12:Int> isa OTHER */
2051 var15
= 1; /* easy <var12:Int> isa OTHER*/
2053 var_class_name18
= type_kernel__Int
.name
;
2054 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name18
);
2055 fprintf(stderr
, " (%s:%d)\n", "lib/standard/kernel.nit", 263);
2058 var19
= var_node_balance
> var12
;
2061 RET_LABEL14
:(void)0;
2066 ((void (*)(val
*, val
*))(self
->class->vft
[COLOR_ropes__BufferRope__balance_node
]))(self
, var_parent_node
) /* balance_node on <self:BufferRope>*/;
2069 var20
= ((val
* (*)(val
*))(var_parent_node
->class->vft
[COLOR_ropes__RopeNode__parent
]))(var_parent_node
) /* parent on <var_parent_node:nullable ConcatNode(ConcatNode)>*/;
2070 var_parent_node
= var20
;
2071 CONTINUE_label
: (void)0;
2073 BREAK_label
: (void)0;
2076 /* method ropes#BufferRope#balance_from_node for (self: Object, nullable ConcatNode) */
2077 void VIRTUAL_ropes__BufferRope__balance_from_node(val
* self
, val
* p0
) {
2078 ropes__BufferRope__balance_from_node(self
, p0
);
2081 /* method ropes#BufferRope#balance_node for (self: BufferRope, ConcatNode) */
2082 void ropes__BufferRope__balance_node(val
* self
, val
* p0
) {
2083 val
* var_node
/* var node: ConcatNode */;
2084 long var
/* : Int */;
2085 long var_balance_factor
/* var balance_factor: Int */;
2086 long var1
/* : Int */;
2087 long var2
/* : Int */;
2088 long var4
/* : Int */;
2089 short int var5
/* : Bool */;
2090 short int var7
/* : Bool */;
2093 const char* var_class_name
;
2094 short int var8
/* : Bool */;
2095 val
* var9
/* : nullable RopeNode */;
2096 long var10
/* : Int */;
2097 long var_right_balance
/* var right_balance: Int */;
2098 long var11
/* : Int */;
2099 short int var12
/* : Bool */;
2100 short int var14
/* : Bool */;
2103 const char* var_class_name17
;
2104 short int var18
/* : Bool */;
2105 val
* var19
/* : nullable RopeNode */;
2106 short int var20
/* : Bool */;
2109 const char* var_class_name23
;
2110 val
* var24
/* : nullable RopeNode */;
2111 long var25
/* : Int */;
2112 long var_left_balance
/* var left_balance: Int */;
2113 long var26
/* : Int */;
2114 short int var27
/* : Bool */;
2115 short int var29
/* : Bool */;
2118 const char* var_class_name32
;
2119 short int var33
/* : Bool */;
2120 val
* var34
/* : nullable RopeNode */;
2121 short int var35
/* : Bool */;
2124 const char* var_class_name38
;
2126 var
= ((long (*)(val
*))(var_node
->class->vft
[COLOR_ropes__RopeNode__balance_factor
]))(var_node
) /* balance_factor on <var_node:ConcatNode>*/;
2127 var_balance_factor
= var
;
2129 { /* Inline kernel#Int#unary - (var1) */
2135 { /* Inline kernel#Int#< (var_balance_factor,var2) */
2136 /* Covariant cast for argument 0 (i) <var2:Int> isa OTHER */
2137 /* <var2:Int> isa OTHER */
2138 var7
= 1; /* easy <var2:Int> isa OTHER*/
2140 var_class_name
= type_kernel__Int
.name
;
2141 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name
);
2142 fprintf(stderr
, " (%s:%d)\n", "lib/standard/kernel.nit", 261);
2145 var8
= var_balance_factor
< var2
;
2151 var9
= ((val
* (*)(val
*))(var_node
->class->vft
[COLOR_ropes__ConcatNode__right_child
]))(var_node
) /* right_child on <var_node:ConcatNode>*/;
2153 fprintf(stderr
, "Runtime error: %s", "Reciever is null");
2154 fprintf(stderr
, " (%s:%d)\n", "lib/standard/ropes.nit", 429);
2157 var10
= ((long (*)(val
*))(var9
->class->vft
[COLOR_ropes__RopeNode__balance_factor
]))(var9
) /* balance_factor on <var9:nullable RopeNode>*/;
2159 var_right_balance
= var10
;
2161 { /* Inline kernel#Int#< (var_right_balance,var11) */
2162 /* Covariant cast for argument 0 (i) <var11:Int> isa OTHER */
2163 /* <var11:Int> isa OTHER */
2164 var14
= 1; /* easy <var11:Int> isa OTHER*/
2166 var_class_name17
= type_kernel__Int
.name
;
2167 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name17
);
2168 fprintf(stderr
, " (%s:%d)\n", "lib/standard/kernel.nit", 261);
2171 var18
= var_right_balance
< var11
;
2174 RET_LABEL13
:(void)0;
2177 ((void (*)(val
*, val
*))(self
->class->vft
[COLOR_ropes__BufferRope__rotate_left
]))(self
, var_node
) /* rotate_left on <self:BufferRope>*/;
2179 var19
= ((val
* (*)(val
*))(var_node
->class->vft
[COLOR_ropes__ConcatNode__right_child
]))(var_node
) /* right_child on <var_node:ConcatNode>*/;
2180 /* <var19:nullable RopeNode> isa ConcatNode */
2181 cltype21
= type_ropes__ConcatNode
.color
;
2182 idtype22
= type_ropes__ConcatNode
.id
;
2186 if(cltype21
>= var19
->type
->table_size
) {
2189 var20
= var19
->type
->type_table
[cltype21
] == idtype22
;
2193 var_class_name23
= var19
== NULL ?
"null" : var19
->type
->name
;
2194 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "ConcatNode", var_class_name23
);
2195 fprintf(stderr
, " (%s:%d)\n", "lib/standard/ropes.nit", 433);
2198 ((void (*)(val
*, val
*))(self
->class->vft
[COLOR_ropes__BufferRope__rotate_right
]))(self
, var19
) /* rotate_right on <self:BufferRope>*/;
2199 ((void (*)(val
*, val
*))(self
->class->vft
[COLOR_ropes__BufferRope__rotate_left
]))(self
, var_node
) /* rotate_left on <self:BufferRope>*/;
2202 var24
= ((val
* (*)(val
*))(var_node
->class->vft
[COLOR_ropes__ConcatNode__left_child
]))(var_node
) /* left_child on <var_node:ConcatNode>*/;
2203 if (var24
== NULL
) {
2204 fprintf(stderr
, "Runtime error: %s", "Reciever is null");
2205 fprintf(stderr
, " (%s:%d)\n", "lib/standard/ropes.nit", 437);
2208 var25
= ((long (*)(val
*))(var24
->class->vft
[COLOR_ropes__RopeNode__balance_factor
]))(var24
) /* balance_factor on <var24:nullable RopeNode>*/;
2210 var_left_balance
= var25
;
2212 { /* Inline kernel#Int#> (var_left_balance,var26) */
2213 /* Covariant cast for argument 0 (i) <var26:Int> isa OTHER */
2214 /* <var26:Int> isa OTHER */
2215 var29
= 1; /* easy <var26:Int> isa OTHER*/
2217 var_class_name32
= type_kernel__Int
.name
;
2218 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name32
);
2219 fprintf(stderr
, " (%s:%d)\n", "lib/standard/kernel.nit", 263);
2222 var33
= var_left_balance
> var26
;
2225 RET_LABEL28
:(void)0;
2228 ((void (*)(val
*, val
*))(self
->class->vft
[COLOR_ropes__BufferRope__rotate_right
]))(self
, var_node
) /* rotate_right on <self:BufferRope>*/;
2230 var34
= ((val
* (*)(val
*))(var_node
->class->vft
[COLOR_ropes__ConcatNode__left_child
]))(var_node
) /* left_child on <var_node:ConcatNode>*/;
2231 /* <var34:nullable RopeNode> isa ConcatNode */
2232 cltype36
= type_ropes__ConcatNode
.color
;
2233 idtype37
= type_ropes__ConcatNode
.id
;
2237 if(cltype36
>= var34
->type
->table_size
) {
2240 var35
= var34
->type
->type_table
[cltype36
] == idtype37
;
2244 var_class_name38
= var34
== NULL ?
"null" : var34
->type
->name
;
2245 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "ConcatNode", var_class_name38
);
2246 fprintf(stderr
, " (%s:%d)\n", "lib/standard/ropes.nit", 441);
2249 ((void (*)(val
*, val
*))(self
->class->vft
[COLOR_ropes__BufferRope__rotate_left
]))(self
, var34
) /* rotate_left on <self:BufferRope>*/;
2250 ((void (*)(val
*, val
*))(self
->class->vft
[COLOR_ropes__BufferRope__rotate_right
]))(self
, var_node
) /* rotate_right on <self:BufferRope>*/;
2255 /* method ropes#BufferRope#balance_node for (self: Object, ConcatNode) */
2256 void VIRTUAL_ropes__BufferRope__balance_node(val
* self
, val
* p0
) {
2257 ropes__BufferRope__balance_node(self
, p0
);
2260 /* method ropes#BufferRope#append for (self: BufferRope, Collection[Char]): BufferRope */
2261 val
* ropes__BufferRope__append(val
* self
, val
* p0
) {
2262 val
* var
/* : BufferRope */;
2263 val
* var_str
/* var str: Collection[Char] */;
2264 short int var1
/* : Bool */;
2267 val
* var2
/* : RopeNode */;
2268 val
* var_last_node
/* var last_node: RopeNode */;
2269 short int var3
/* : Bool */;
2270 short int var4
/* : Bool */;
2273 short int var_
/* var : Bool */;
2274 val
* var7
/* : nullable RopeNode */;
2275 val
* var8
/* : null */;
2276 short int var9
/* : Bool */;
2277 val
* var10
/* : nullable RopeNode */;
2278 short int var11
/* : Bool */;
2281 val
* var14
/* : LeafNode */;
2282 val
* var15
/* : String */;
2283 short int var16
/* : Bool */;
2286 val
* var19
/* : nullable ConcatNode */;
2287 val
* var_last_node_parent
/* var last_node_parent: nullable ConcatNode */;
2288 val
* var20
/* : ConcatNode */;
2289 val
* var_new_concat
/* var new_concat: ConcatNode */;
2290 val
* var21
/* : LeafNode */;
2291 val
* var22
/* : String */;
2292 static val
* varonce
;
2293 val
* var23
/* : String */;
2294 char* var24
/* : NativeString */;
2295 long var25
/* : Int */;
2296 val
* var26
/* : String */;
2297 val
* var27
/* : Buffer */;
2298 long var28
/* : Int */;
2299 val
* var_buf
/* var buf: Buffer */;
2300 val
* var29
/* : Iterator[nullable Object] */;
2301 short int var30
/* : Bool */;
2302 val
* var31
/* : nullable Object */;
2303 char var_i
/* var i: Char */;
2304 char var32
/* : Char */;
2305 val
* var33
/* : nullable Object */;
2306 val
* var35
/* : BufferRope */;
2307 short int var36
/* : Bool */;
2308 short int var37
/* : Bool */;
2309 short int var38
/* : Bool */;
2311 /* <var_str:Collection[Char]> isa AbstractString */
2312 cltype
= type_string__AbstractString
.color
;
2313 idtype
= type_string__AbstractString
.id
;
2314 if(cltype
>= var_str
->type
->table_size
) {
2317 var1
= var_str
->type
->type_table
[cltype
] == idtype
;
2320 var2
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_ropes__Rope__parent_node
]))(self
) /* parent_node on <self:BufferRope>*/;
2321 var_last_node
= var2
;
2323 /* <var_last_node:RopeNode> isa ConcatNode */
2324 cltype5
= type_ropes__ConcatNode
.color
;
2325 idtype6
= type_ropes__ConcatNode
.id
;
2326 if(cltype5
>= var_last_node
->type
->table_size
) {
2329 var4
= var_last_node
->type
->type_table
[cltype5
] == idtype6
;
2333 var7
= ((val
* (*)(val
*))(var_last_node
->class->vft
[COLOR_ropes__ConcatNode__right_child
]))(var_last_node
) /* right_child on <var_last_node:RopeNode(ConcatNode)>*/;
2336 var9
= 0; /* is null */
2338 var9
= 1; /* arg is null and recv is not */
2345 var10
= ((val
* (*)(val
*))(var_last_node
->class->vft
[COLOR_ropes__ConcatNode__right_child
]))(var_last_node
) /* right_child on <var_last_node:RopeNode(ConcatNode)>*/;
2346 if (var10
== NULL
) {
2347 fprintf(stderr
, "Runtime error: %s", "Cast failed");
2348 fprintf(stderr
, " (%s:%d)\n", "lib/standard/ropes.nit", 458);
2351 var_last_node
= var10
;
2352 CONTINUE_label
: (void)0;
2354 BREAK_label
: (void)0;
2355 /* <var_last_node:RopeNode> isa ConcatNode */
2356 cltype12
= type_ropes__ConcatNode
.color
;
2357 idtype13
= type_ropes__ConcatNode
.id
;
2358 if(cltype12
>= var_last_node
->type
->table_size
) {
2361 var11
= var_last_node
->type
->type_table
[cltype12
] == idtype13
;
2364 var14
= NEW_ropes__LeafNode(&type_ropes__LeafNode
);
2365 var15
= ((val
* (*)(val
*))(var_str
->class->vft
[COLOR_string__Object__to_s
]))(var_str
) /* to_s on <var_str:Collection[Char](AbstractString)>*/;
2366 ((void (*)(val
*, val
*))(var14
->class->vft
[COLOR_ropes__LeafNode__init
]))(var14
, var15
) /* init on <var14:LeafNode>*/;
2367 ((void (*)(val
*, val
*))(var_last_node
->class->vft
[COLOR_ropes__ConcatNode__right_child_61d
]))(var_last_node
, var14
) /* right_child= on <var_last_node:RopeNode(ConcatNode)>*/;
2369 /* <var_last_node:RopeNode> isa LeafNode */
2370 cltype17
= type_ropes__LeafNode
.color
;
2371 idtype18
= type_ropes__LeafNode
.id
;
2372 if(cltype17
>= var_last_node
->type
->table_size
) {
2375 var16
= var_last_node
->type
->type_table
[cltype17
] == idtype18
;
2378 var19
= ((val
* (*)(val
*))(var_last_node
->class->vft
[COLOR_ropes__RopeNode__parent
]))(var_last_node
) /* parent on <var_last_node:RopeNode(LeafNode)>*/;
2379 var_last_node_parent
= var19
;
2380 var20
= NEW_ropes__ConcatNode(&type_ropes__ConcatNode
);
2381 ((void (*)(val
*))(var20
->class->vft
[COLOR_ropes__ConcatNode__init
]))(var20
) /* init on <var20:ConcatNode>*/;
2382 var_new_concat
= var20
;
2383 if (var_last_node_parent
== NULL
) {
2384 fprintf(stderr
, "Runtime error: %s", "Reciever is null");
2385 fprintf(stderr
, " (%s:%d)\n", "lib/standard/ropes.nit", 466);
2388 ((void (*)(val
*, val
*))(var_last_node_parent
->class->vft
[COLOR_ropes__ConcatNode__right_child_61d
]))(var_last_node_parent
, var_new_concat
) /* right_child= on <var_last_node_parent:nullable ConcatNode>*/;
2390 ((void (*)(val
*, val
*))(var_new_concat
->class->vft
[COLOR_ropes__ConcatNode__left_child_61d
]))(var_new_concat
, var_last_node
) /* left_child= on <var_new_concat:ConcatNode>*/;
2391 var21
= NEW_ropes__LeafNode(&type_ropes__LeafNode
);
2392 var22
= ((val
* (*)(val
*))(var_str
->class->vft
[COLOR_string__Object__to_s
]))(var_str
) /* to_s on <var_str:Collection[Char](AbstractString)>*/;
2393 ((void (*)(val
*, val
*))(var21
->class->vft
[COLOR_ropes__LeafNode__init
]))(var21
, var22
) /* init on <var21:LeafNode>*/;
2394 ((void (*)(val
*, val
*))(var_new_concat
->class->vft
[COLOR_ropes__ConcatNode__right_child_61d
]))(var_new_concat
, var21
) /* right_child= on <var_new_concat:ConcatNode>*/;
2395 var_last_node
= var_new_concat
;
2400 var24
= "Fatal Error, please report to the developers for more insight.";
2402 var26
= string__NativeString__to_s_with_length(var24
, var25
);
2406 ((void (*)(val
*, val
*))(self
->class->vft
[COLOR_file__Object__print
]))(self
, var23
) /* print on <self:BufferRope>*/;
2407 fprintf(stderr
, "Runtime error: %s", "Aborted");
2408 fprintf(stderr
, " (%s:%d)\n", "lib/standard/ropes.nit", 472);
2412 ((void (*)(val
*, val
*))(self
->class->vft
[COLOR_ropes__BufferRope__balance_from_node
]))(self
, var_last_node
) /* balance_from_node on <self:BufferRope>*/;
2414 var27
= NEW_string__Buffer(&type_string__Buffer
);
2415 var28
= ((long (*)(val
*))(var_str
->class->vft
[COLOR_abstract_collection__Collection__length
]))(var_str
) /* length on <var_str:Collection[Char]>*/;
2416 ((void (*)(val
*, long))(var27
->class->vft
[COLOR_string__Buffer__with_capacity
]))(var27
, var28
) /* with_capacity on <var27:Buffer>*/;
2418 var29
= ((val
* (*)(val
*))(var_str
->class->vft
[COLOR_abstract_collection__Collection__iterator
]))(var_str
) /* iterator on <var_str:Collection[Char]>*/;
2420 var30
= ((short int (*)(val
*))(var29
->class->vft
[COLOR_abstract_collection__Iterator__is_ok
]))(var29
) /* is_ok on <var29:Iterator[nullable Object]>*/;
2422 var31
= ((val
* (*)(val
*))(var29
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var29
) /* item on <var29:Iterator[nullable Object]>*/;
2423 var32
= ((struct instance_kernel__Char
*)var31
)->value
; /* autounbox from nullable Object to Char */;
2425 var33
= BOX_kernel__Char(var_i
); /* autobox from Char to nullable Object */
2426 ((void (*)(val
*, val
*))(var_buf
->class->vft
[COLOR_abstract_collection__SimpleCollection__add
]))(var_buf
, var33
) /* add on <var_buf:Buffer>*/;
2427 CONTINUE_label34
: (void)0;
2428 ((void (*)(val
*))(var29
->class->vft
[COLOR_abstract_collection__Iterator__next
]))(var29
) /* next on <var29:Iterator[nullable Object]>*/;
2430 BREAK_label34
: (void)0;
2431 var35
= ((val
* (*)(val
*, val
*))(self
->class->vft
[COLOR_ropes__BufferRope__append
]))(self
, var_buf
) /* append on <self:BufferRope>*/;
2434 var36
= ((short int (*)(val
*))(self
->class->vft
[COLOR_ropes__BufferRope__is_dirty
]))(self
) /* is_dirty on <self:BufferRope>*/;
2438 ((void (*)(val
*, short int))(self
->class->vft
[COLOR_ropes__BufferRope__is_dirty_61d
]))(self
, var38
) /* is_dirty= on <self:BufferRope>*/;
2446 /* method ropes#BufferRope#append for (self: Object, Collection[Char]): BufferRope */
2447 val
* VIRTUAL_ropes__BufferRope__append(val
* self
, val
* p0
) {
2448 val
* var
/* : BufferRope */;
2449 val
* var1
/* : BufferRope */;
2450 var1
= ropes__BufferRope__append(self
, p0
);
2455 /* method ropes#BufferRope#append_multi for (self: BufferRope, Array[Collection[Char]]): BufferRope */
2456 val
* ropes__BufferRope__append_multi(val
* self
, val
* p0
) {
2457 val
* var
/* : BufferRope */;
2458 val
* var_strs
/* var strs: Array[Collection[Char]] */;
2459 val
* var1
/* : Iterator[nullable Object] */;
2460 short int var2
/* : Bool */;
2461 val
* var3
/* : nullable Object */;
2462 val
* var_i
/* var i: Collection[Char] */;
2463 val
* var4
/* : BufferRope */;
2465 var1
= ((val
* (*)(val
*))(var_strs
->class->vft
[COLOR_abstract_collection__Collection__iterator
]))(var_strs
) /* iterator on <var_strs:Array[Collection[Char]]>*/;
2467 var2
= ((short int (*)(val
*))(var1
->class->vft
[COLOR_abstract_collection__Iterator__is_ok
]))(var1
) /* is_ok on <var1:Iterator[nullable Object]>*/;
2469 var3
= ((val
* (*)(val
*))(var1
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var1
) /* item on <var1:Iterator[nullable Object]>*/;
2471 var4
= ((val
* (*)(val
*, val
*))(self
->class->vft
[COLOR_ropes__BufferRope__append
]))(self
, var_i
) /* append on <self:BufferRope>*/;
2473 CONTINUE_label
: (void)0;
2474 ((void (*)(val
*))(var1
->class->vft
[COLOR_abstract_collection__Iterator__next
]))(var1
) /* next on <var1:Iterator[nullable Object]>*/;
2476 BREAK_label
: (void)0;
2482 /* method ropes#BufferRope#append_multi for (self: Object, Array[Collection[Char]]): BufferRope */
2483 val
* VIRTUAL_ropes__BufferRope__append_multi(val
* self
, val
* p0
) {
2484 val
* var
/* : BufferRope */;
2485 val
* var1
/* : BufferRope */;
2486 var1
= ropes__BufferRope__append_multi(self
, p0
);
2491 /* method ropes#BufferRope#prepend for (self: BufferRope, Collection[Char]): BufferRope */
2492 val
* ropes__BufferRope__prepend(val
* self
, val
* p0
) {
2493 val
* var
/* : BufferRope */;
2494 val
* var_str
/* var str: Collection[Char] */;
2495 short int var1
/* : Bool */;
2498 val
* var2
/* : RopeNode */;
2499 val
* var_curr_node
/* var curr_node: RopeNode */;
2500 short int var3
/* : Bool */;
2501 short int var4
/* : Bool */;
2504 short int var_
/* var : Bool */;
2505 val
* var7
/* : nullable RopeNode */;
2506 val
* var8
/* : null */;
2507 short int var9
/* : Bool */;
2508 val
* var10
/* : nullable RopeNode */;
2509 short int var11
/* : Bool */;
2512 val
* var14
/* : LeafNode */;
2513 val
* var15
/* : String */;
2514 short int var16
/* : Bool */;
2517 val
* var19
/* : nullable ConcatNode */;
2518 val
* var_parent
/* var parent: nullable ConcatNode */;
2519 val
* var20
/* : ConcatNode */;
2520 val
* var_new_concat
/* var new_concat: ConcatNode */;
2521 val
* var21
/* : LeafNode */;
2522 val
* var22
/* : String */;
2523 val
* var_new_leaf
/* var new_leaf: LeafNode */;
2524 static val
* varonce
;
2525 val
* var23
/* : String */;
2526 char* var24
/* : NativeString */;
2527 long var25
/* : Int */;
2528 val
* var26
/* : String */;
2529 val
* var27
/* : Buffer */;
2530 long var28
/* : Int */;
2531 val
* var_buf
/* var buf: Buffer */;
2532 val
* var29
/* : Iterator[nullable Object] */;
2533 short int var30
/* : Bool */;
2534 val
* var31
/* : nullable Object */;
2535 char var_i
/* var i: Char */;
2536 char var32
/* : Char */;
2537 val
* var33
/* : nullable Object */;
2538 val
* var35
/* : String */;
2539 val
* var36
/* : BufferRope */;
2540 short int var37
/* : Bool */;
2541 short int var38
/* : Bool */;
2542 short int var39
/* : Bool */;
2544 /* <var_str:Collection[Char]> isa AbstractString */
2545 cltype
= type_string__AbstractString
.color
;
2546 idtype
= type_string__AbstractString
.id
;
2547 if(cltype
>= var_str
->type
->table_size
) {
2550 var1
= var_str
->type
->type_table
[cltype
] == idtype
;
2553 var2
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_ropes__Rope__parent_node
]))(self
) /* parent_node on <self:BufferRope>*/;
2554 var_curr_node
= var2
;
2556 /* <var_curr_node:RopeNode> isa ConcatNode */
2557 cltype5
= type_ropes__ConcatNode
.color
;
2558 idtype6
= type_ropes__ConcatNode
.id
;
2559 if(cltype5
>= var_curr_node
->type
->table_size
) {
2562 var4
= var_curr_node
->type
->type_table
[cltype5
] == idtype6
;
2566 var7
= ((val
* (*)(val
*))(var_curr_node
->class->vft
[COLOR_ropes__ConcatNode__left_child
]))(var_curr_node
) /* left_child on <var_curr_node:RopeNode(ConcatNode)>*/;
2569 var9
= 0; /* is null */
2571 var9
= 1; /* arg is null and recv is not */
2578 var10
= ((val
* (*)(val
*))(var_curr_node
->class->vft
[COLOR_ropes__ConcatNode__left_child
]))(var_curr_node
) /* left_child on <var_curr_node:RopeNode(ConcatNode)>*/;
2579 if (var10
== NULL
) {
2580 fprintf(stderr
, "Runtime error: %s", "Cast failed");
2581 fprintf(stderr
, " (%s:%d)\n", "lib/standard/ropes.nit", 505);
2584 var_curr_node
= var10
;
2585 CONTINUE_label
: (void)0;
2587 BREAK_label
: (void)0;
2588 /* <var_curr_node:RopeNode> isa ConcatNode */
2589 cltype12
= type_ropes__ConcatNode
.color
;
2590 idtype13
= type_ropes__ConcatNode
.id
;
2591 if(cltype12
>= var_curr_node
->type
->table_size
) {
2594 var11
= var_curr_node
->type
->type_table
[cltype12
] == idtype13
;
2597 var14
= NEW_ropes__LeafNode(&type_ropes__LeafNode
);
2598 var15
= ((val
* (*)(val
*))(var_str
->class->vft
[COLOR_string__Object__to_s
]))(var_str
) /* to_s on <var_str:Collection[Char](AbstractString)>*/;
2599 ((void (*)(val
*, val
*))(var14
->class->vft
[COLOR_ropes__LeafNode__init
]))(var14
, var15
) /* init on <var14:LeafNode>*/;
2600 ((void (*)(val
*, val
*))(var_curr_node
->class->vft
[COLOR_ropes__ConcatNode__left_child_61d
]))(var_curr_node
, var14
) /* left_child= on <var_curr_node:RopeNode(ConcatNode)>*/;
2602 /* <var_curr_node:RopeNode> isa LeafNode */
2603 cltype17
= type_ropes__LeafNode
.color
;
2604 idtype18
= type_ropes__LeafNode
.id
;
2605 if(cltype17
>= var_curr_node
->type
->table_size
) {
2608 var16
= var_curr_node
->type
->type_table
[cltype17
] == idtype18
;
2611 var19
= ((val
* (*)(val
*))(var_curr_node
->class->vft
[COLOR_ropes__RopeNode__parent
]))(var_curr_node
) /* parent on <var_curr_node:RopeNode(LeafNode)>*/;
2613 var20
= NEW_ropes__ConcatNode(&type_ropes__ConcatNode
);
2614 ((void (*)(val
*))(var20
->class->vft
[COLOR_ropes__ConcatNode__init
]))(var20
) /* init on <var20:ConcatNode>*/;
2615 var_new_concat
= var20
;
2616 var21
= NEW_ropes__LeafNode(&type_ropes__LeafNode
);
2617 var22
= ((val
* (*)(val
*))(var_str
->class->vft
[COLOR_string__Object__to_s
]))(var_str
) /* to_s on <var_str:Collection[Char](AbstractString)>*/;
2618 ((void (*)(val
*, val
*))(var21
->class->vft
[COLOR_ropes__LeafNode__init
]))(var21
, var22
) /* init on <var21:LeafNode>*/;
2619 var_new_leaf
= var21
;
2620 ((void (*)(val
*, val
*))(var_new_concat
->class->vft
[COLOR_ropes__ConcatNode__left_child_61d
]))(var_new_concat
, var_new_leaf
) /* left_child= on <var_new_concat:ConcatNode>*/;
2621 ((void (*)(val
*, val
*))(var_new_concat
->class->vft
[COLOR_ropes__ConcatNode__right_child_61d
]))(var_new_concat
, var_curr_node
) /* right_child= on <var_new_concat:ConcatNode>*/;
2622 if (var_parent
== NULL
) {
2623 fprintf(stderr
, "Runtime error: %s", "Reciever is null");
2624 fprintf(stderr
, " (%s:%d)\n", "lib/standard/ropes.nit", 516);
2627 ((void (*)(val
*, val
*))(var_parent
->class->vft
[COLOR_ropes__ConcatNode__left_child_61d
]))(var_parent
, var_new_concat
) /* left_child= on <var_parent:nullable ConcatNode>*/;
2629 var_curr_node
= var_new_concat
;
2634 var24
= "Fatal Error";
2636 var26
= string__NativeString__to_s_with_length(var24
, var25
);
2640 ((void (*)(val
*, val
*))(self
->class->vft
[COLOR_file__Object__print
]))(self
, var23
) /* print on <self:BufferRope>*/;
2641 fprintf(stderr
, "Runtime error: %s", "Aborted");
2642 fprintf(stderr
, " (%s:%d)\n", "lib/standard/ropes.nit", 520);
2646 ((void (*)(val
*, val
*))(self
->class->vft
[COLOR_ropes__BufferRope__balance_from_node
]))(self
, var_curr_node
) /* balance_from_node on <self:BufferRope>*/;
2648 var27
= NEW_string__Buffer(&type_string__Buffer
);
2649 var28
= ((long (*)(val
*))(var_str
->class->vft
[COLOR_abstract_collection__Collection__length
]))(var_str
) /* length on <var_str:Collection[Char]>*/;
2650 ((void (*)(val
*, long))(var27
->class->vft
[COLOR_string__Buffer__with_capacity
]))(var27
, var28
) /* with_capacity on <var27:Buffer>*/;
2652 var29
= ((val
* (*)(val
*))(var_str
->class->vft
[COLOR_abstract_collection__Collection__iterator
]))(var_str
) /* iterator on <var_str:Collection[Char]>*/;
2654 var30
= ((short int (*)(val
*))(var29
->class->vft
[COLOR_abstract_collection__Iterator__is_ok
]))(var29
) /* is_ok on <var29:Iterator[nullable Object]>*/;
2656 var31
= ((val
* (*)(val
*))(var29
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var29
) /* item on <var29:Iterator[nullable Object]>*/;
2657 var32
= ((struct instance_kernel__Char
*)var31
)->value
; /* autounbox from nullable Object to Char */;
2659 var33
= BOX_kernel__Char(var_i
); /* autobox from Char to nullable Object */
2660 ((void (*)(val
*, val
*))(var_buf
->class->vft
[COLOR_abstract_collection__SimpleCollection__add
]))(var_buf
, var33
) /* add on <var_buf:Buffer>*/;
2661 CONTINUE_label34
: (void)0;
2662 ((void (*)(val
*))(var29
->class->vft
[COLOR_abstract_collection__Iterator__next
]))(var29
) /* next on <var29:Iterator[nullable Object]>*/;
2664 BREAK_label34
: (void)0;
2665 var35
= ((val
* (*)(val
*))(var_buf
->class->vft
[COLOR_string__Object__to_s
]))(var_buf
) /* to_s on <var_buf:Buffer>*/;
2666 var36
= ((val
* (*)(val
*, val
*))(self
->class->vft
[COLOR_ropes__BufferRope__prepend
]))(self
, var35
) /* prepend on <self:BufferRope>*/;
2669 var37
= ((short int (*)(val
*))(self
->class->vft
[COLOR_ropes__BufferRope__is_dirty
]))(self
) /* is_dirty on <self:BufferRope>*/;
2673 ((void (*)(val
*, short int))(self
->class->vft
[COLOR_ropes__BufferRope__is_dirty_61d
]))(self
, var39
) /* is_dirty= on <self:BufferRope>*/;
2681 /* method ropes#BufferRope#prepend for (self: Object, Collection[Char]): BufferRope */
2682 val
* VIRTUAL_ropes__BufferRope__prepend(val
* self
, val
* p0
) {
2683 val
* var
/* : BufferRope */;
2684 val
* var1
/* : BufferRope */;
2685 var1
= ropes__BufferRope__prepend(self
, p0
);
2690 /* method ropes#BufferRope#prepend_multi for (self: BufferRope, Array[Collection[Char]]): BufferRope */
2691 val
* ropes__BufferRope__prepend_multi(val
* self
, val
* p0
) {
2692 val
* var
/* : BufferRope */;
2693 val
* var_strs
/* var strs: Array[Collection[Char]] */;
2694 val
* var1
/* : Iterator[nullable Object] */;
2695 short int var2
/* : Bool */;
2696 val
* var3
/* : nullable Object */;
2697 val
* var_i
/* var i: Collection[Char] */;
2698 val
* var4
/* : BufferRope */;
2700 var1
= ((val
* (*)(val
*))(var_strs
->class->vft
[COLOR_abstract_collection__Collection__iterator
]))(var_strs
) /* iterator on <var_strs:Array[Collection[Char]]>*/;
2702 var2
= ((short int (*)(val
*))(var1
->class->vft
[COLOR_abstract_collection__Iterator__is_ok
]))(var1
) /* is_ok on <var1:Iterator[nullable Object]>*/;
2704 var3
= ((val
* (*)(val
*))(var1
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var1
) /* item on <var1:Iterator[nullable Object]>*/;
2706 var4
= ((val
* (*)(val
*, val
*))(self
->class->vft
[COLOR_ropes__BufferRope__prepend
]))(self
, var_i
) /* prepend on <self:BufferRope>*/;
2708 CONTINUE_label
: (void)0;
2709 ((void (*)(val
*))(var1
->class->vft
[COLOR_abstract_collection__Iterator__next
]))(var1
) /* next on <var1:Iterator[nullable Object]>*/;
2711 BREAK_label
: (void)0;
2717 /* method ropes#BufferRope#prepend_multi for (self: Object, Array[Collection[Char]]): BufferRope */
2718 val
* VIRTUAL_ropes__BufferRope__prepend_multi(val
* self
, val
* p0
) {
2719 val
* var
/* : BufferRope */;
2720 val
* var1
/* : BufferRope */;
2721 var1
= ropes__BufferRope__prepend_multi(self
, p0
);
2726 /* method ropes#BufferRope#concat for (self: BufferRope, Rope): Rope */
2727 val
* ropes__BufferRope__concat(val
* self
, val
* p0
) {
2728 val
* var
/* : Rope */;
2729 val
* var_str
/* var str: Rope */;
2730 val
* var1
/* : DFSRopeLeafIterator */;
2731 val
* var_other_iter
/* var other_iter: DFSRopeLeafIterator */;
2732 val
* var2
/* : List[String] */;
2733 val
* var_modif_list
/* var modif_list: List[String] */;
2734 short int var3
/* : Bool */;
2735 val
* var4
/* : nullable Object */;
2736 val
* var5
/* : String */;
2737 long var6
/* : Int */;
2738 long var7
/* : Int */;
2739 short int var8
/* : Bool */;
2740 short int var10
/* : Bool */;
2743 const char* var_class_name
;
2744 short int var11
/* : Bool */;
2745 val
* var12
/* : nullable Object */;
2746 val
* var13
/* : BufferRope */;
2747 short int var15
/* : Bool */;
2748 short int var16
/* : Bool */;
2749 short int var17
/* : Bool */;
2751 var1
= NEW_ropes__DFSRopeLeafIterator(&type_ropes__DFSRopeLeafIterator
);
2752 ((void (*)(val
*, val
*))(var1
->class->vft
[COLOR_ropes__DFSRopeLeafIterator__init
]))(var1
, var_str
) /* init on <var1:DFSRopeLeafIterator>*/;
2753 var_other_iter
= var1
;
2754 var2
= NEW_list__List(&type_list__Liststring__String
);
2755 ((void (*)(val
*))(var2
->class->vft
[COLOR_list__List__init
]))(var2
) /* init on <var2:List[String]>*/;
2756 var_modif_list
= var2
;
2758 var3
= ((short int (*)(val
*))(var_other_iter
->class->vft
[COLOR_abstract_collection__Iterator__is_ok
]))(var_other_iter
) /* is_ok on <var_other_iter:DFSRopeLeafIterator>*/;
2760 var4
= ((val
* (*)(val
*))(var_other_iter
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var_other_iter
) /* item on <var_other_iter:DFSRopeLeafIterator>*/;
2761 var5
= ((val
* (*)(val
*))(var4
->class->vft
[COLOR_ropes__LeafNode__value
]))(var4
) /* value on <var4:nullable Object(LeafNode)>*/;
2762 ((void (*)(val
*, val
*))(var_modif_list
->class->vft
[COLOR_abstract_collection__Sequence__push
]))(var_modif_list
, var5
) /* push on <var_modif_list:List[String]>*/;
2763 ((void (*)(val
*))(var_other_iter
->class->vft
[COLOR_abstract_collection__Iterator__next
]))(var_other_iter
) /* next on <var_other_iter:DFSRopeLeafIterator>*/;
2764 CONTINUE_label
: (void)0;
2766 BREAK_label
: (void)0;
2768 var6
= ((long (*)(val
*))(var_modif_list
->class->vft
[COLOR_abstract_collection__Collection__length
]))(var_modif_list
) /* length on <var_modif_list:List[String]>*/;
2770 { /* Inline kernel#Int#> (var6,var7) */
2771 /* Covariant cast for argument 0 (i) <var7:Int> isa OTHER */
2772 /* <var7:Int> isa OTHER */
2773 var10
= 1; /* easy <var7:Int> isa OTHER*/
2775 var_class_name
= type_kernel__Int
.name
;
2776 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name
);
2777 fprintf(stderr
, " (%s:%d)\n", "lib/standard/kernel.nit", 263);
2780 var11
= var6
> var7
;
2786 var12
= ((val
* (*)(val
*))(var_modif_list
->class->vft
[COLOR_abstract_collection__Sequence__shift
]))(var_modif_list
) /* shift on <var_modif_list:List[String]>*/;
2787 var13
= ((val
* (*)(val
*, val
*))(self
->class->vft
[COLOR_ropes__BufferRope__append
]))(self
, var12
) /* append on <self:BufferRope>*/;
2789 CONTINUE_label14
: (void)0;
2791 BREAK_label14
: (void)0;
2792 var15
= ((short int (*)(val
*))(self
->class->vft
[COLOR_ropes__BufferRope__is_dirty
]))(self
) /* is_dirty on <self:BufferRope>*/;
2796 ((void (*)(val
*, short int))(self
->class->vft
[COLOR_ropes__BufferRope__is_dirty_61d
]))(self
, var17
) /* is_dirty= on <self:BufferRope>*/;
2804 /* method ropes#BufferRope#concat for (self: Object, Rope): Rope */
2805 val
* VIRTUAL_ropes__BufferRope__concat(val
* self
, val
* p0
) {
2806 val
* var
/* : Rope */;
2807 val
* var1
/* : Rope */;
2808 var1
= ropes__BufferRope__concat(self
, p0
);
2813 /* method ropes#BufferRope#freeze for (self: BufferRope): ImmutableRope */
2814 val
* ropes__BufferRope__freeze(val
* self
) {
2815 val
* var
/* : ImmutableRope */;
2816 val
* var1
/* : BufferRope */;
2817 val
* var_buffer_rope
/* var buffer_rope: BufferRope */;
2818 val
* var2
/* : ImmutableRope */;
2819 val
* var_new_rope
/* var new_rope: ImmutableRope */;
2820 val
* var3
/* : DFSRopeLeafIterator */;
2821 val
* var_iter
/* var iter: DFSRopeLeafIterator */;
2822 short int var4
/* : Bool */;
2823 val
* var5
/* : nullable Object */;
2824 val
* var6
/* : String */;
2825 val
* var7
/* : BufferRope */;
2826 val
* var8
/* : RopeNode */;
2827 short int var9
/* : Bool */;
2828 short int var10
/* : Bool */;
2829 val
* var11
/* : nullable String */;
2830 var1
= NEW_ropes__BufferRope(&type_ropes__BufferRope
);
2831 ((void (*)(val
*))(var1
->class->vft
[COLOR_ropes__BufferRope__init
]))(var1
) /* init on <var1:BufferRope>*/;
2832 var_buffer_rope
= var1
;
2833 var2
= NEW_ropes__ImmutableRope(&type_ropes__ImmutableRope
);
2834 ((void (*)(val
*))(var2
->class->vft
[COLOR_ropes__ImmutableRope__init
]))(var2
) /* init on <var2:ImmutableRope>*/;
2835 var_new_rope
= var2
;
2836 var3
= NEW_ropes__DFSRopeLeafIterator(&type_ropes__DFSRopeLeafIterator
);
2837 ((void (*)(val
*, val
*))(var3
->class->vft
[COLOR_ropes__DFSRopeLeafIterator__init
]))(var3
, self
) /* init on <var3:DFSRopeLeafIterator>*/;
2840 var4
= ((short int (*)(val
*))(var_iter
->class->vft
[COLOR_abstract_collection__Iterator__is_ok
]))(var_iter
) /* is_ok on <var_iter:DFSRopeLeafIterator>*/;
2842 var5
= ((val
* (*)(val
*))(var_iter
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var_iter
) /* item on <var_iter:DFSRopeLeafIterator>*/;
2843 var6
= ((val
* (*)(val
*))(var5
->class->vft
[COLOR_ropes__LeafNode__value
]))(var5
) /* value on <var5:nullable Object(LeafNode)>*/;
2844 var7
= ((val
* (*)(val
*, val
*))(var_buffer_rope
->class->vft
[COLOR_ropes__BufferRope__append
]))(var_buffer_rope
, var6
) /* append on <var_buffer_rope:BufferRope>*/;
2846 ((void (*)(val
*))(var_iter
->class->vft
[COLOR_abstract_collection__Iterator__next
]))(var_iter
) /* next on <var_iter:DFSRopeLeafIterator>*/;
2847 CONTINUE_label
: (void)0;
2849 BREAK_label
: (void)0;
2850 var8
= ((val
* (*)(val
*))(var_buffer_rope
->class->vft
[COLOR_ropes__Rope__parent_node
]))(var_buffer_rope
) /* parent_node on <var_buffer_rope:BufferRope>*/;
2851 ((void (*)(val
*, val
*))(var_new_rope
->class->vft
[COLOR_ropes__Rope__parent_node_61d
]))(var_new_rope
, var8
) /* parent_node= on <var_new_rope:ImmutableRope>*/;
2852 var9
= ((short int (*)(val
*))(self
->class->vft
[COLOR_ropes__BufferRope__is_dirty
]))(self
) /* is_dirty on <self:BufferRope>*/;
2855 var11
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_ropes__Rope__str_representation
]))(self
) /* str_representation on <self:BufferRope>*/;
2856 ((void (*)(val
*, val
*))(var_new_rope
->class->vft
[COLOR_ropes__Rope__str_representation_61d
]))(var_new_rope
, var11
) /* str_representation= on <var_new_rope:ImmutableRope>*/;
2864 /* method ropes#BufferRope#freeze for (self: Object): ImmutableRope */
2865 val
* VIRTUAL_ropes__BufferRope__freeze(val
* self
) {
2866 val
* var
/* : ImmutableRope */;
2867 val
* var1
/* : ImmutableRope */;
2868 var1
= ropes__BufferRope__freeze(self
);
2873 /* method ropes#BufferRope#to_immutable for (self: BufferRope): ImmutableRope */
2874 val
* ropes__BufferRope__to_immutable(val
* self
) {
2875 val
* var
/* : ImmutableRope */;
2876 val
* var1
/* : ImmutableRope */;
2877 val
* var_immutable_self
/* var immutable_self: ImmutableRope */;
2878 val
* var2
/* : RopeNode */;
2879 var1
= NEW_ropes__ImmutableRope(&type_ropes__ImmutableRope
);
2880 ((void (*)(val
*))(var1
->class->vft
[COLOR_ropes__ImmutableRope__init
]))(var1
) /* init on <var1:ImmutableRope>*/;
2881 var_immutable_self
= var1
;
2882 var2
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_ropes__Rope__parent_node
]))(self
) /* parent_node on <self:BufferRope>*/;
2883 ((void (*)(val
*, val
*))(var_immutable_self
->class->vft
[COLOR_ropes__Rope__parent_node_61d
]))(var_immutable_self
, var2
) /* parent_node= on <var_immutable_self:ImmutableRope>*/;
2884 var
= var_immutable_self
;
2889 /* method ropes#BufferRope#to_immutable for (self: Object): ImmutableRope */
2890 val
* VIRTUAL_ropes__BufferRope__to_immutable(val
* self
) {
2891 val
* var
/* : ImmutableRope */;
2892 val
* var1
/* : ImmutableRope */;
2893 var1
= ropes__BufferRope__to_immutable(self
);
2898 /* method ropes#BufferRope#subrope for (self: BufferRope, Int, Int): BufferRope */
2899 val
* ropes__BufferRope__subrope(val
* self
, long p0
, long p1
) {
2900 val
* var
/* : BufferRope */;
2901 long var_index_from
/* var index_from: Int */;
2902 long var_count
/* var count: Int */;
2903 val
* var1
/* : Rope */;
2904 short int var2
/* : Bool */;
2907 const char* var_class_name
;
2908 var_index_from
= p0
;
2910 var1
= ((val
* (*)(val
*, long, long))(self
->class->vft
[COLOR_ropes__BufferRope__subrope
]))(self
, p0
, p1
) /* subrope on <self:BufferRope>*/;
2911 /* <var1:Rope> isa BufferRope */
2912 cltype
= type_ropes__BufferRope
.color
;
2913 idtype
= type_ropes__BufferRope
.id
;
2914 if(cltype
>= var1
->type
->table_size
) {
2917 var2
= var1
->type
->type_table
[cltype
] == idtype
;
2920 var_class_name
= var1
== NULL ?
"null" : var1
->type
->name
;
2921 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "BufferRope", var_class_name
);
2922 fprintf(stderr
, " (%s:%d)\n", "lib/standard/ropes.nit", 603);
2930 /* method ropes#BufferRope#subrope for (self: Object, Int, Int): Rope */
2931 val
* VIRTUAL_ropes__BufferRope__subrope(val
* self
, long p0
, long p1
) {
2932 val
* var
/* : Rope */;
2933 val
* var1
/* : BufferRope */;
2934 var1
= ropes__BufferRope__subrope(self
, p0
, p1
);
2939 /* method ropes#BufferRope#* for (self: BufferRope, Int): BufferRope */
2940 val
* ropes__BufferRope___42d(val
* self
, long p0
) {
2941 val
* var
/* : BufferRope */;
2942 long var_repeats
/* var repeats: Int */;
2943 val
* var1
/* : Rope */;
2944 short int var2
/* : Bool */;
2947 const char* var_class_name
;
2949 var1
= ((val
* (*)(val
*, long))(self
->class->vft
[COLOR_ropes__BufferRope___42d
]))(self
, p0
) /* * on <self:BufferRope>*/;
2950 /* <var1:Rope> isa BufferRope */
2951 cltype
= type_ropes__BufferRope
.color
;
2952 idtype
= type_ropes__BufferRope
.id
;
2953 if(cltype
>= var1
->type
->table_size
) {
2956 var2
= var1
->type
->type_table
[cltype
] == idtype
;
2959 var_class_name
= var1
== NULL ?
"null" : var1
->type
->name
;
2960 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "BufferRope", var_class_name
);
2961 fprintf(stderr
, " (%s:%d)\n", "lib/standard/ropes.nit", 608);
2969 /* method ropes#BufferRope#* for (self: Object, Int): Rope */
2970 val
* VIRTUAL_ropes__BufferRope___42d(val
* self
, long p0
) {
2971 val
* var
/* : Rope */;
2972 val
* var1
/* : BufferRope */;
2973 var1
= ropes__BufferRope___42d(self
, p0
);
2978 /* method ropes#BufferRope#+ for (self: BufferRope, Rope): BufferRope */
2979 val
* ropes__BufferRope___43d(val
* self
, val
* p0
) {
2980 val
* var
/* : BufferRope */;
2981 val
* var_other
/* var other: Rope */;
2982 val
* var1
/* : Rope */;
2983 short int var2
/* : Bool */;
2986 const char* var_class_name
;
2988 var1
= ((val
* (*)(val
*, val
*))(self
->class->vft
[COLOR_ropes__BufferRope___43d
]))(self
, p0
) /* + on <self:BufferRope>*/;
2989 /* <var1:Rope> isa BufferRope */
2990 cltype
= type_ropes__BufferRope
.color
;
2991 idtype
= type_ropes__BufferRope
.id
;
2992 if(cltype
>= var1
->type
->table_size
) {
2995 var2
= var1
->type
->type_table
[cltype
] == idtype
;
2998 var_class_name
= var1
== NULL ?
"null" : var1
->type
->name
;
2999 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "BufferRope", var_class_name
);
3000 fprintf(stderr
, " (%s:%d)\n", "lib/standard/ropes.nit", 613);
3008 /* method ropes#BufferRope#+ for (self: Object, Rope): Rope */
3009 val
* VIRTUAL_ropes__BufferRope___43d(val
* self
, val
* p0
) {
3010 val
* var
/* : Rope */;
3011 val
* var1
/* : BufferRope */;
3012 var1
= ropes__BufferRope___43d(self
, p0
);
3017 /* method ropes#BufferRope#multi_concat for (self: BufferRope, Array[Rope]): BufferRope */
3018 val
* ropes__BufferRope__multi_concat(val
* self
, val
* p0
) {
3019 val
* var
/* : BufferRope */;
3020 val
* var_ropes
/* var ropes: Array[Rope] */;
3021 val
* var1
/* : Rope */;
3022 short int var2
/* : Bool */;
3025 const char* var_class_name
;
3027 var1
= ((val
* (*)(val
*, val
*))(self
->class->vft
[COLOR_ropes__BufferRope__multi_concat
]))(self
, p0
) /* multi_concat on <self:BufferRope>*/;
3028 /* <var1:Rope> isa BufferRope */
3029 cltype
= type_ropes__BufferRope
.color
;
3030 idtype
= type_ropes__BufferRope
.id
;
3031 if(cltype
>= var1
->type
->table_size
) {
3034 var2
= var1
->type
->type_table
[cltype
] == idtype
;
3037 var_class_name
= var1
== NULL ?
"null" : var1
->type
->name
;
3038 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "BufferRope", var_class_name
);
3039 fprintf(stderr
, " (%s:%d)\n", "lib/standard/ropes.nit", 618);
3047 /* method ropes#BufferRope#multi_concat for (self: Object, Array[Rope]): Rope */
3048 val
* VIRTUAL_ropes__BufferRope__multi_concat(val
* self
, val
* p0
) {
3049 val
* var
/* : Rope */;
3050 val
* var1
/* : BufferRope */;
3051 var1
= ropes__BufferRope__multi_concat(self
, p0
);
3056 /* method ropes#BufferRope#to_s for (self: BufferRope): String */
3057 val
* ropes__BufferRope__to_s(val
* self
) {
3058 val
* var
/* : String */;
3059 short int var1
/* : Bool */;
3060 val
* var2
/* : nullable String */;
3061 val
* var3
/* : null */;
3062 short int var4
/* : Bool */;
3063 short int var_
/* var : Bool */;
3064 short int var5
/* : Bool */;
3065 val
* var6
/* : String */;
3066 short int var7
/* : Bool */;
3067 val
* var8
/* : nullable String */;
3068 var2
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_ropes__Rope__str_representation
]))(self
) /* str_representation on <self:BufferRope>*/;
3071 var4
= 1; /* is null */
3073 var4
= 0; /* arg is null but recv is not */
3079 var5
= ((short int (*)(val
*))(self
->class->vft
[COLOR_ropes__BufferRope__is_dirty
]))(self
) /* is_dirty on <self:BufferRope>*/;
3083 var6
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_ropes__Rope__flatten
]))(self
) /* flatten on <self:BufferRope>*/;
3084 ((void (*)(val
*, val
*))(self
->class->vft
[COLOR_ropes__Rope__str_representation_61d
]))(self
, var6
) /* str_representation= on <self:BufferRope>*/;
3086 ((void (*)(val
*, short int))(self
->class->vft
[COLOR_ropes__BufferRope__is_dirty_61d
]))(self
, var7
) /* is_dirty= on <self:BufferRope>*/;
3089 var8
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_ropes__Rope__str_representation
]))(self
) /* str_representation on <self:BufferRope>*/;
3091 fprintf(stderr
, "Runtime error: %s", "Cast failed");
3092 fprintf(stderr
, " (%s:%d)\n", "lib/standard/ropes.nit", 629);
3100 /* method ropes#BufferRope#to_s for (self: Object): String */
3101 val
* VIRTUAL_ropes__BufferRope__to_s(val
* self
) {
3102 val
* var
/* : String */;
3103 val
* var1
/* : String */;
3104 var1
= ropes__BufferRope__to_s(self
);
3109 /* method ropes#ImmutableRope#init for (self: ImmutableRope) */
3110 void ropes__ImmutableRope__init(val
* self
) {
3111 ((void (*)(val
*))(self
->class->vft
[COLOR_ropes__Rope__init
]))(self
) /* init on <self:ImmutableRope>*/;
3114 /* method ropes#ImmutableRope#init for (self: Object) */
3115 void VIRTUAL_ropes__ImmutableRope__init(val
* self
) {
3116 ropes__ImmutableRope__init(self
);
3119 /* method ropes#ImmutableRope#with_string for (self: ImmutableRope, AbstractString) */
3120 void ropes__ImmutableRope__with_string(val
* self
, val
* p0
) {
3121 val
* var_str
/* var str: AbstractString */;
3123 ((void (*)(val
*, val
*))(self
->class->vft
[COLOR_ropes__Rope__with_string
]))(self
, p0
) /* with_string on <self:ImmutableRope>*/;
3126 /* method ropes#ImmutableRope#with_string for (self: Object, AbstractString) */
3127 void VIRTUAL_ropes__ImmutableRope__with_string(val
* self
, val
* p0
) {
3128 ropes__ImmutableRope__with_string(self
, p0
);
3131 /* method ropes#ImmutableRope#subrope for (self: ImmutableRope, Int, Int): ImmutableRope */
3132 val
* ropes__ImmutableRope__subrope(val
* self
, long p0
, long p1
) {
3133 val
* var
/* : ImmutableRope */;
3134 long var_index_from
/* var index_from: Int */;
3135 long var_count
/* var count: Int */;
3136 val
* var1
/* : Rope */;
3137 short int var2
/* : Bool */;
3140 const char* var_class_name
;
3141 val
* var3
/* : ImmutableRope */;
3142 var_index_from
= p0
;
3144 var1
= ((val
* (*)(val
*, long, long))(self
->class->vft
[COLOR_ropes__ImmutableRope__subrope
]))(self
, p0
, p1
) /* subrope on <self:ImmutableRope>*/;
3145 /* <var1:Rope> isa BufferRope */
3146 cltype
= type_ropes__BufferRope
.color
;
3147 idtype
= type_ropes__BufferRope
.id
;
3148 if(cltype
>= var1
->type
->table_size
) {
3151 var2
= var1
->type
->type_table
[cltype
] == idtype
;
3154 var_class_name
= var1
== NULL ?
"null" : var1
->type
->name
;
3155 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "BufferRope", var_class_name
);
3156 fprintf(stderr
, " (%s:%d)\n", "lib/standard/ropes.nit", 654);
3159 var3
= ((val
* (*)(val
*))(var1
->class->vft
[COLOR_ropes__BufferRope__to_immutable
]))(var1
) /* to_immutable on <var1:Rope(BufferRope)>*/;
3165 /* method ropes#ImmutableRope#subrope for (self: Object, Int, Int): Rope */
3166 val
* VIRTUAL_ropes__ImmutableRope__subrope(val
* self
, long p0
, long p1
) {
3167 val
* var
/* : Rope */;
3168 val
* var1
/* : ImmutableRope */;
3169 var1
= ropes__ImmutableRope__subrope(self
, p0
, p1
);
3174 /* method ropes#ImmutableRope#* for (self: ImmutableRope, Int): ImmutableRope */
3175 val
* ropes__ImmutableRope___42d(val
* self
, long p0
) {
3176 val
* var
/* : ImmutableRope */;
3177 long var_repeats
/* var repeats: Int */;
3178 val
* var1
/* : Rope */;
3179 short int var2
/* : Bool */;
3182 const char* var_class_name
;
3183 val
* var3
/* : ImmutableRope */;
3185 var1
= ((val
* (*)(val
*, long))(self
->class->vft
[COLOR_ropes__ImmutableRope___42d
]))(self
, p0
) /* * on <self:ImmutableRope>*/;
3186 /* <var1:Rope> isa BufferRope */
3187 cltype
= type_ropes__BufferRope
.color
;
3188 idtype
= type_ropes__BufferRope
.id
;
3189 if(cltype
>= var1
->type
->table_size
) {
3192 var2
= var1
->type
->type_table
[cltype
] == idtype
;
3195 var_class_name
= var1
== NULL ?
"null" : var1
->type
->name
;
3196 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "BufferRope", var_class_name
);
3197 fprintf(stderr
, " (%s:%d)\n", "lib/standard/ropes.nit", 659);
3200 var3
= ((val
* (*)(val
*))(var1
->class->vft
[COLOR_ropes__BufferRope__to_immutable
]))(var1
) /* to_immutable on <var1:Rope(BufferRope)>*/;
3206 /* method ropes#ImmutableRope#* for (self: Object, Int): Rope */
3207 val
* VIRTUAL_ropes__ImmutableRope___42d(val
* self
, long p0
) {
3208 val
* var
/* : Rope */;
3209 val
* var1
/* : ImmutableRope */;
3210 var1
= ropes__ImmutableRope___42d(self
, p0
);
3215 /* method ropes#ImmutableRope#+ for (self: ImmutableRope, Rope): ImmutableRope */
3216 val
* ropes__ImmutableRope___43d(val
* self
, val
* p0
) {
3217 val
* var
/* : ImmutableRope */;
3218 val
* var_other
/* var other: Rope */;
3219 val
* var1
/* : Rope */;
3220 short int var2
/* : Bool */;
3223 const char* var_class_name
;
3224 val
* var3
/* : ImmutableRope */;
3226 var1
= ((val
* (*)(val
*, val
*))(self
->class->vft
[COLOR_ropes__ImmutableRope___43d
]))(self
, p0
) /* + on <self:ImmutableRope>*/;
3227 /* <var1:Rope> isa BufferRope */
3228 cltype
= type_ropes__BufferRope
.color
;
3229 idtype
= type_ropes__BufferRope
.id
;
3230 if(cltype
>= var1
->type
->table_size
) {
3233 var2
= var1
->type
->type_table
[cltype
] == idtype
;
3236 var_class_name
= var1
== NULL ?
"null" : var1
->type
->name
;
3237 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "BufferRope", var_class_name
);
3238 fprintf(stderr
, " (%s:%d)\n", "lib/standard/ropes.nit", 664);
3241 var3
= ((val
* (*)(val
*))(var1
->class->vft
[COLOR_ropes__BufferRope__to_immutable
]))(var1
) /* to_immutable on <var1:Rope(BufferRope)>*/;
3247 /* method ropes#ImmutableRope#+ for (self: Object, Rope): Rope */
3248 val
* VIRTUAL_ropes__ImmutableRope___43d(val
* self
, val
* p0
) {
3249 val
* var
/* : Rope */;
3250 val
* var1
/* : ImmutableRope */;
3251 var1
= ropes__ImmutableRope___43d(self
, p0
);
3256 /* method ropes#ImmutableRope#multi_concat for (self: ImmutableRope, Array[Rope]): ImmutableRope */
3257 val
* ropes__ImmutableRope__multi_concat(val
* self
, val
* p0
) {
3258 val
* var
/* : ImmutableRope */;
3259 val
* var_ropes
/* var ropes: Array[Rope] */;
3260 val
* var1
/* : Rope */;
3261 short int var2
/* : Bool */;
3264 const char* var_class_name
;
3265 val
* var3
/* : ImmutableRope */;
3267 var1
= ((val
* (*)(val
*, val
*))(self
->class->vft
[COLOR_ropes__ImmutableRope__multi_concat
]))(self
, p0
) /* multi_concat on <self:ImmutableRope>*/;
3268 /* <var1:Rope> isa BufferRope */
3269 cltype
= type_ropes__BufferRope
.color
;
3270 idtype
= type_ropes__BufferRope
.id
;
3271 if(cltype
>= var1
->type
->table_size
) {
3274 var2
= var1
->type
->type_table
[cltype
] == idtype
;
3277 var_class_name
= var1
== NULL ?
"null" : var1
->type
->name
;
3278 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "BufferRope", var_class_name
);
3279 fprintf(stderr
, " (%s:%d)\n", "lib/standard/ropes.nit", 669);
3282 var3
= ((val
* (*)(val
*))(var1
->class->vft
[COLOR_ropes__BufferRope__to_immutable
]))(var1
) /* to_immutable on <var1:Rope(BufferRope)>*/;
3288 /* method ropes#ImmutableRope#multi_concat for (self: Object, Array[Rope]): Rope */
3289 val
* VIRTUAL_ropes__ImmutableRope__multi_concat(val
* self
, val
* p0
) {
3290 val
* var
/* : Rope */;
3291 val
* var1
/* : ImmutableRope */;
3292 var1
= ropes__ImmutableRope__multi_concat(self
, p0
);
3297 /* method ropes#CharRopeView#target for (self: CharRopeView): Rope */
3298 val
* ropes__CharRopeView__target(val
* self
) {
3299 val
* var
/* : Rope */;
3300 val
* var1
/* : Rope */;
3301 var1
= self
->attrs
[COLOR_ropes__CharRopeView___64dtarget
].val
; /* @target on <self:CharRopeView> */
3303 fprintf(stderr
, "Runtime error: %s", "Uninitialized attribute @target");
3304 fprintf(stderr
, " (%s:%d)\n", "lib/standard/ropes.nit", 681);
3311 /* method ropes#CharRopeView#target for (self: Object): Rope */
3312 val
* VIRTUAL_ropes__CharRopeView__target(val
* self
) {
3313 val
* var
/* : Rope */;
3314 val
* var1
/* : Rope */;
3315 var1
= ropes__CharRopeView__target(self
);
3320 /* method ropes#CharRopeView#target= for (self: CharRopeView, Rope) */
3321 void ropes__CharRopeView__target_61d(val
* self
, val
* p0
) {
3322 self
->attrs
[COLOR_ropes__CharRopeView___64dtarget
].val
= p0
; /* @target on <self:CharRopeView> */
3325 /* method ropes#CharRopeView#target= for (self: Object, Rope) */
3326 void VIRTUAL_ropes__CharRopeView__target_61d(val
* self
, val
* p0
) {
3327 ropes__CharRopeView__target_61d(self
, p0
);
3330 /* method ropes#CharRopeView#init for (self: CharRopeView, Rope) */
3331 void ropes__CharRopeView__init(val
* self
, val
* p0
) {
3332 val
* var_tgt
/* var tgt: Rope */;
3334 ((void (*)(val
*, val
*))(self
->class->vft
[COLOR_ropes__CharRopeView__target_61d
]))(self
, var_tgt
) /* target= on <self:CharRopeView>*/;
3337 /* method ropes#CharRopeView#init for (self: Object, Rope) */
3338 void VIRTUAL_ropes__CharRopeView__init(val
* self
, val
* p0
) {
3339 ropes__CharRopeView__init(self
, p0
);
3342 /* method ropes#CharRopeView#[] for (self: CharRopeView, Int): Char */
3343 char ropes__CharRopeView___91d_93d(val
* self
, long p0
) {
3344 char var
/* : Char */;
3345 long var_position
/* var position: Int */;
3346 val
* var1
/* : Rope */;
3347 val
* var2
/* : TupleLeafNodePos */;
3348 val
* var_tuple
/* var tuple: TupleLeafNodePos */;
3349 val
* var3
/* : LeafNode */;
3350 val
* var4
/* : String */;
3351 long var5
/* : Int */;
3352 val
* var6
/* : nullable Object */;
3353 char var7
/* : Char */;
3355 var1
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_ropes__CharRopeView__target
]))(self
) /* target on <self:CharRopeView>*/;
3356 var2
= ((val
* (*)(val
*, long))(var1
->class->vft
[COLOR_ropes__Rope__get_node_for_pos
]))(var1
, var_position
) /* get_node_for_pos on <var1:Rope>*/;
3358 var3
= ((val
* (*)(val
*))(var_tuple
->class->vft
[COLOR_ropes__TupleLeafNodePos__curr_node
]))(var_tuple
) /* curr_node on <var_tuple:TupleLeafNodePos>*/;
3359 var4
= ((val
* (*)(val
*))(var3
->class->vft
[COLOR_ropes__LeafNode__value
]))(var3
) /* value on <var3:LeafNode>*/;
3360 var5
= ((long (*)(val
*))(var_tuple
->class->vft
[COLOR_ropes__TupleLeafNodePos__corrected_pos
]))(var_tuple
) /* corrected_pos on <var_tuple:TupleLeafNodePos>*/;
3361 var6
= ((val
* (*)(val
*, long))(var4
->class->vft
[COLOR_abstract_collection__SequenceRead___91d_93d
]))(var4
, var5
) /* [] on <var4:String>*/;
3362 var7
= ((struct instance_kernel__Char
*)var6
)->value
; /* autounbox from nullable Object to Char */;
3368 /* method ropes#CharRopeView#[] for (self: Object, Int): nullable Object */
3369 val
* VIRTUAL_ropes__CharRopeView___91d_93d(val
* self
, long p0
) {
3370 val
* var
/* : nullable Object */;
3371 char var1
/* : Char */;
3372 val
* var2
/* : nullable Object */;
3373 var1
= ropes__CharRopeView___91d_93d(self
, p0
);
3374 var2
= BOX_kernel__Char(var1
); /* autobox from Char to nullable Object */
3379 /* method ropes#CharRopeView#first for (self: CharRopeView): Char */
3380 char ropes__CharRopeView__first(val
* self
) {
3381 char var
/* : Char */;
3382 long var1
/* : Int */;
3383 val
* var2
/* : nullable Object */;
3384 char var3
/* : Char */;
3386 var2
= ((val
* (*)(val
*, long))(self
->class->vft
[COLOR_abstract_collection__SequenceRead___91d_93d
]))(self
, var1
) /* [] on <self:CharRopeView>*/;
3387 var3
= ((struct instance_kernel__Char
*)var2
)->value
; /* autounbox from nullable Object to Char */;
3393 /* method ropes#CharRopeView#first for (self: Object): nullable Object */
3394 val
* VIRTUAL_ropes__CharRopeView__first(val
* self
) {
3395 val
* var
/* : nullable Object */;
3396 char var1
/* : Char */;
3397 val
* var2
/* : nullable Object */;
3398 var1
= ropes__CharRopeView__first(self
);
3399 var2
= BOX_kernel__Char(var1
); /* autobox from Char to nullable Object */
3404 /* method ropes#CharRopeView#index_of for (self: CharRopeView, Char): Int */
3405 long ropes__CharRopeView__index_of(val
* self
, char p0
) {
3406 long var
/* : Int */;
3407 short int var1
/* : Bool */;
3410 const char* var_class_name
;
3411 char var_char
/* var char: Char */;
3412 val
* var2
/* : RopeCharIterator */;
3413 val
* var3
/* : Rope */;
3414 val
* var_intern_iter
/* var intern_iter: RopeCharIterator */;
3415 short int var4
/* : Bool */;
3416 val
* var5
/* : nullable Object */;
3417 short int var6
/* : Bool */;
3418 short int var8
/* : Bool */;
3419 char var9
/* : Char */;
3420 long var10
/* : Int */;
3421 long var11
/* : Int */;
3422 long var12
/* : Int */;
3423 long var14
/* : Int */;
3424 /* Covariant cast for argument 0 (char) <p0:Char> isa SequenceRead#0 */
3425 /* <p0:Char> isa SequenceRead#0 */
3426 var1
= 1; /* easy <p0:Char> isa SequenceRead#0*/
3428 var_class_name
= type_kernel__Char
.name
;
3429 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "SequenceRead#0", var_class_name
);
3430 fprintf(stderr
, " (%s:%d)\n", "lib/standard/ropes.nit", 697);
3434 var2
= NEW_ropes__RopeCharIterator(&type_ropes__RopeCharIterator
);
3435 var3
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_ropes__CharRopeView__target
]))(self
) /* target on <self:CharRopeView>*/;
3436 ((void (*)(val
*, val
*))(var2
->class->vft
[COLOR_ropes__RopeCharIterator__init
]))(var2
, var3
) /* init on <var2:RopeCharIterator>*/;
3437 var_intern_iter
= var2
;
3439 var4
= ((short int (*)(val
*))(var_intern_iter
->class->vft
[COLOR_abstract_collection__Iterator__is_ok
]))(var_intern_iter
) /* is_ok on <var_intern_iter:RopeCharIterator>*/;
3441 var5
= ((val
* (*)(val
*))(var_intern_iter
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var_intern_iter
) /* item on <var_intern_iter:RopeCharIterator>*/;
3442 { /* Inline kernel#Char#== (var5,var_char) */
3443 var8
= (var5
!= NULL
) && (var5
->class == &class_kernel__Char
);
3445 var9
= ((struct instance_kernel__Char
*)var5
)->value
; /* autounbox from nullable Object to Char */;
3446 var8
= (var9
== var_char
);
3453 var10
= ((long (*)(val
*))(var_intern_iter
->class->vft
[COLOR_abstract_collection__IndexedIterator__index
]))(var_intern_iter
) /* index on <var_intern_iter:RopeCharIterator>*/;
3458 ((void (*)(val
*))(var_intern_iter
->class->vft
[COLOR_abstract_collection__Iterator__next
]))(var_intern_iter
) /* next on <var_intern_iter:RopeCharIterator>*/;
3459 CONTINUE_label
: (void)0;
3461 BREAK_label
: (void)0;
3463 { /* Inline kernel#Int#unary - (var11) */
3467 RET_LABEL13
:(void)0;
3474 /* method ropes#CharRopeView#index_of for (self: Object, nullable Object): Int */
3475 long VIRTUAL_ropes__CharRopeView__index_of(val
* self
, val
* p0
) {
3476 long var
/* : Int */;
3477 long var1
/* : Int */;
3478 char var2
/* : Char */;
3479 var2
= ((struct instance_kernel__Char
*)p0
)->value
; /* autounbox from nullable Object to Char */;
3480 var1
= ropes__CharRopeView__index_of(self
, var2
);
3485 /* method ropes#CharRopeView#iterator for (self: CharRopeView): Iterator[Char] */
3486 val
* ropes__CharRopeView__iterator(val
* self
) {
3487 val
* var
/* : Iterator[Char] */;
3488 val
* var1
/* : RopeCharIterator */;
3489 val
* var2
/* : Rope */;
3490 var1
= NEW_ropes__RopeCharIterator(&type_ropes__RopeCharIterator
);
3491 var2
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_ropes__CharRopeView__target
]))(self
) /* target on <self:CharRopeView>*/;
3492 ((void (*)(val
*, val
*))(var1
->class->vft
[COLOR_ropes__RopeCharIterator__init
]))(var1
, var2
) /* init on <var1:RopeCharIterator>*/;
3498 /* method ropes#CharRopeView#iterator for (self: Object): Iterator[nullable Object] */
3499 val
* VIRTUAL_ropes__CharRopeView__iterator(val
* self
) {
3500 val
* var
/* : Iterator[nullable Object] */;
3501 val
* var1
/* : Iterator[Char] */;
3502 var1
= ropes__CharRopeView__iterator(self
);
3507 /* method ropes#CharRopeView#last for (self: CharRopeView): Char */
3508 char ropes__CharRopeView__last(val
* self
) {
3509 char var
/* : Char */;
3510 long var1
/* : Int */;
3511 long var2
/* : Int */;
3512 long var3
/* : Int */;
3513 long var5
/* : Int */;
3514 val
* var6
/* : nullable Object */;
3515 char var7
/* : Char */;
3516 var1
= ((long (*)(val
*))(self
->class->vft
[COLOR_abstract_collection__Collection__length
]))(self
) /* length on <self:CharRopeView>*/;
3518 { /* Inline kernel#Int#- (var1,var2) */
3524 var6
= ((val
* (*)(val
*, long))(self
->class->vft
[COLOR_abstract_collection__SequenceRead___91d_93d
]))(self
, var3
) /* [] on <self:CharRopeView>*/;
3525 var7
= ((struct instance_kernel__Char
*)var6
)->value
; /* autounbox from nullable Object to Char */;
3531 /* method ropes#CharRopeView#last for (self: Object): nullable Object */
3532 val
* VIRTUAL_ropes__CharRopeView__last(val
* self
) {
3533 val
* var
/* : nullable Object */;
3534 char var1
/* : Char */;
3535 val
* var2
/* : nullable Object */;
3536 var1
= ropes__CharRopeView__last(self
);
3537 var2
= BOX_kernel__Char(var1
); /* autobox from Char to nullable Object */
3542 /* method ropes#CharRopeView#length for (self: CharRopeView): Int */
3543 long ropes__CharRopeView__length(val
* self
) {
3544 long var
/* : Int */;
3545 val
* var1
/* : Rope */;
3546 long var2
/* : Int */;
3547 var1
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_ropes__CharRopeView__target
]))(self
) /* target on <self:CharRopeView>*/;
3548 var2
= ((long (*)(val
*))(var1
->class->vft
[COLOR_ropes__Rope__length
]))(var1
) /* length on <var1:Rope>*/;
3554 /* method ropes#CharRopeView#length for (self: Object): Int */
3555 long VIRTUAL_ropes__CharRopeView__length(val
* self
) {
3556 long var
/* : Int */;
3557 long var1
/* : Int */;
3558 var1
= ropes__CharRopeView__length(self
);
3563 /* method ropes#CharRopeView#count for (self: CharRopeView, Char): Int */
3564 long ropes__CharRopeView__count(val
* self
, char p0
) {
3565 long var
/* : Int */;
3566 short int var1
/* : Bool */;
3569 const char* var_class_name
;
3570 char var_item
/* var item: Char */;
3571 long var2
/* : Int */;
3572 long var_count
/* var count: Int */;
3573 val
* var3
/* : Iterator[nullable Object] */;
3574 val
* var_iter
/* var iter: Iterator[Char] */;
3575 val
* var4
/* : Iterator[nullable Object] */;
3576 short int var5
/* : Bool */;
3577 val
* var6
/* : nullable Object */;
3578 char var_i
/* var i: Char */;
3579 char var7
/* : Char */;
3580 short int var8
/* : Bool */;
3581 short int var10
/* : Bool */;
3582 long var11
/* : Int */;
3583 long var12
/* : Int */;
3584 long var14
/* : Int */;
3585 /* Covariant cast for argument 0 (item) <p0:Char> isa Collection#0 */
3586 /* <p0:Char> isa Collection#0 */
3587 var1
= 1; /* easy <p0:Char> isa Collection#0*/
3589 var_class_name
= type_kernel__Char
.name
;
3590 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "Collection#0", var_class_name
);
3591 fprintf(stderr
, " (%s:%d)\n", "lib/standard/ropes.nit", 715);
3597 var3
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_abstract_collection__Collection__iterator
]))(self
) /* iterator on <self:CharRopeView>*/;
3599 var4
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_abstract_collection__Collection__iterator
]))(self
) /* iterator on <self:CharRopeView>*/;
3601 var5
= ((short int (*)(val
*))(var4
->class->vft
[COLOR_abstract_collection__Iterator__is_ok
]))(var4
) /* is_ok on <var4:Iterator[nullable Object]>*/;
3603 var6
= ((val
* (*)(val
*))(var4
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var4
) /* item on <var4:Iterator[nullable Object]>*/;
3604 var7
= ((struct instance_kernel__Char
*)var6
)->value
; /* autounbox from nullable Object to Char */;
3606 { /* Inline kernel#Char#== (var_i,var_item) */
3607 var10
= var_i
== var_item
;
3614 { /* Inline kernel#Int#+ (var_count,var11) */
3615 var14
= var_count
+ var11
;
3618 RET_LABEL13
:(void)0;
3623 CONTINUE_label
: (void)0;
3624 ((void (*)(val
*))(var4
->class->vft
[COLOR_abstract_collection__Iterator__next
]))(var4
) /* next on <var4:Iterator[nullable Object]>*/;
3626 BREAK_label
: (void)0;
3632 /* method ropes#CharRopeView#count for (self: Object, nullable Object): Int */
3633 long VIRTUAL_ropes__CharRopeView__count(val
* self
, val
* p0
) {
3634 long var
/* : Int */;
3635 long var1
/* : Int */;
3636 char var2
/* : Char */;
3637 var2
= ((struct instance_kernel__Char
*)p0
)->value
; /* autounbox from nullable Object to Char */;
3638 var1
= ropes__CharRopeView__count(self
, var2
);
3643 /* method ropes#CharRopeView#has_only for (self: CharRopeView, Char): Bool */
3644 short int ropes__CharRopeView__has_only(val
* self
, char p0
) {
3645 short int var
/* : Bool */;
3646 short int var1
/* : Bool */;
3649 const char* var_class_name
;
3650 char var_item
/* var item: Char */;
3651 val
* var2
/* : Iterator[nullable Object] */;
3652 short int var3
/* : Bool */;
3653 val
* var4
/* : nullable Object */;
3654 char var_i
/* var i: Char */;
3655 char var5
/* : Char */;
3656 short int var6
/* : Bool */;
3657 short int var8
/* : Bool */;
3658 short int var9
/* : Bool */;
3659 short int var10
/* : Bool */;
3660 short int var11
/* : Bool */;
3661 /* Covariant cast for argument 0 (item) <p0:Char> isa Collection#0 */
3662 /* <p0:Char> isa Collection#0 */
3663 var1
= 1; /* easy <p0:Char> isa Collection#0*/
3665 var_class_name
= type_kernel__Char
.name
;
3666 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "Collection#0", var_class_name
);
3667 fprintf(stderr
, " (%s:%d)\n", "lib/standard/ropes.nit", 727);
3671 var2
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_abstract_collection__Collection__iterator
]))(self
) /* iterator on <self:CharRopeView>*/;
3673 var3
= ((short int (*)(val
*))(var2
->class->vft
[COLOR_abstract_collection__Iterator__is_ok
]))(var2
) /* is_ok on <var2:Iterator[nullable Object]>*/;
3675 var4
= ((val
* (*)(val
*))(var2
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var2
) /* item on <var2:Iterator[nullable Object]>*/;
3676 var5
= ((struct instance_kernel__Char
*)var4
)->value
; /* autounbox from nullable Object to Char */;
3678 { /* Inline kernel#Char#!= (var_i,var_item) */
3679 var8
= var_i
== var_item
;
3691 CONTINUE_label
: (void)0;
3692 ((void (*)(val
*))(var2
->class->vft
[COLOR_abstract_collection__Iterator__next
]))(var2
) /* next on <var2:Iterator[nullable Object]>*/;
3694 BREAK_label
: (void)0;
3701 /* method ropes#CharRopeView#has_only for (self: Object, nullable Object): Bool */
3702 short int VIRTUAL_ropes__CharRopeView__has_only(val
* self
, val
* p0
) {
3703 short int var
/* : Bool */;
3704 short int var1
/* : Bool */;
3705 char var2
/* : Char */;
3706 var2
= ((struct instance_kernel__Char
*)p0
)->value
; /* autounbox from nullable Object to Char */;
3707 var1
= ropes__CharRopeView__has_only(self
, var2
);
3712 /* method ropes#CharRopeView#is_empty for (self: CharRopeView): Bool */
3713 short int ropes__CharRopeView__is_empty(val
* self
) {
3714 short int var
/* : Bool */;
3715 long var1
/* : Int */;
3716 long var2
/* : Int */;
3717 short int var3
/* : Bool */;
3718 short int var5
/* : Bool */;
3719 var1
= ((long (*)(val
*))(self
->class->vft
[COLOR_abstract_collection__Collection__length
]))(self
) /* length on <self:CharRopeView>*/;
3721 { /* Inline kernel#Int#== (var1,var2) */
3722 var5
= var1
== var2
;
3732 /* method ropes#CharRopeView#is_empty for (self: Object): Bool */
3733 short int VIRTUAL_ropes__CharRopeView__is_empty(val
* self
) {
3734 short int var
/* : Bool */;
3735 short int var1
/* : Bool */;
3736 var1
= ropes__CharRopeView__is_empty(self
);
3741 /* method ropes#CharRopeView#to_a for (self: CharRopeView): Array[Char] */
3742 val
* ropes__CharRopeView__to_a(val
* self
) {
3743 val
* var
/* : Array[Char] */;
3744 val
* var1
/* : String */;
3745 val
* var2
/* : Array[nullable Object] */;
3746 var1
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_string__Object__to_s
]))(self
) /* to_s on <self:CharRopeView>*/;
3747 var2
= ((val
* (*)(val
*))(var1
->class->vft
[COLOR_array__Collection__to_a
]))(var1
) /* to_a on <var1:String>*/;
3753 /* method ropes#CharRopeView#to_a for (self: Object): Array[nullable Object] */
3754 val
* VIRTUAL_ropes__CharRopeView__to_a(val
* self
) {
3755 val
* var
/* : Array[nullable Object] */;
3756 val
* var1
/* : Array[Char] */;
3757 var1
= ropes__CharRopeView__to_a(self
);
3762 /* method ropes#CharRopeView#to_s for (self: CharRopeView): String */
3763 val
* ropes__CharRopeView__to_s(val
* self
) {
3764 val
* var
/* : String */;
3765 val
* var1
/* : Rope */;
3766 val
* var2
/* : String */;
3767 var1
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_ropes__CharRopeView__target
]))(self
) /* target on <self:CharRopeView>*/;
3768 var2
= ((val
* (*)(val
*))(var1
->class->vft
[COLOR_string__Object__to_s
]))(var1
) /* to_s on <var1:Rope>*/;
3774 /* method ropes#CharRopeView#to_s for (self: Object): String */
3775 val
* VIRTUAL_ropes__CharRopeView__to_s(val
* self
) {
3776 val
* var
/* : String */;
3777 val
* var1
/* : String */;
3778 var1
= ropes__CharRopeView__to_s(self
);
3783 /* method ropes#CharRopeView#== for (self: CharRopeView, nullable Object): Bool */
3784 short int ropes__CharRopeView___61d_61d(val
* self
, val
* p0
) {
3785 short int var
/* : Bool */;
3786 val
* var_other
/* var other: nullable Object */;
3787 short int var1
/* : Bool */;
3790 short int var2
/* : Bool */;
3791 short int var3
/* : Bool */;
3792 long var4
/* : Int */;
3793 short int var5
/* : Bool */;
3794 short int var7
/* : Bool */;
3795 long var8
/* : Int */;
3796 short int var9
/* : Bool */;
3797 short int var10
/* : Bool */;
3798 val
* var11
/* : Iterator[nullable Object] */;
3799 val
* var_iter
/* var iter: IndexedIterator[Char] */;
3800 val
* var12
/* : Iterator[nullable Object] */;
3801 short int var13
/* : Bool */;
3802 val
* var14
/* : nullable Object */;
3803 char var_i
/* var i: Char */;
3804 char var15
/* : Char */;
3805 val
* var16
/* : nullable Object */;
3806 short int var17
/* : Bool */;
3807 short int var19
/* : Bool */;
3808 char var20
/* : Char */;
3809 short int var21
/* : Bool */;
3810 short int var22
/* : Bool */;
3811 short int var23
/* : Bool */;
3813 /* <var_other:nullable Object> isa SequenceRead[Char] */
3814 cltype
= type_abstract_collection__SequenceReadkernel__Char
.color
;
3815 idtype
= type_abstract_collection__SequenceReadkernel__Char
.id
;
3816 if(var_other
== NULL
) {
3819 if(cltype
>= var_other
->type
->table_size
) {
3822 var1
= var_other
->type
->type_table
[cltype
] == idtype
;
3832 var4
= ((long (*)(val
*))(self
->class->vft
[COLOR_abstract_collection__Collection__length
]))(self
) /* length on <self:CharRopeView>*/;
3833 { /* Inline kernel#Int#!= (var4,var_other) */
3834 var7
= (var_other
!= NULL
) && (var_other
->class == &class_kernel__Int
);
3836 var8
= ((struct instance_kernel__Int
*)var_other
)->value
; /* autounbox from nullable Object to Int */;
3837 var7
= (var8
== var4
);
3850 var11
= ((val
* (*)(val
*))(var_other
->class->vft
[COLOR_abstract_collection__Collection__iterator
]))(var_other
) /* iterator on <var_other:nullable Object(SequenceRead[Char])>*/;
3852 var12
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_abstract_collection__Collection__iterator
]))(self
) /* iterator on <self:CharRopeView>*/;
3854 var13
= ((short int (*)(val
*))(var12
->class->vft
[COLOR_abstract_collection__Iterator__is_ok
]))(var12
) /* is_ok on <var12:Iterator[nullable Object]>*/;
3856 var14
= ((val
* (*)(val
*))(var12
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var12
) /* item on <var12:Iterator[nullable Object]>*/;
3857 var15
= ((struct instance_kernel__Char
*)var14
)->value
; /* autounbox from nullable Object to Char */;
3859 var16
= ((val
* (*)(val
*))(var_iter
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var_iter
) /* item on <var_iter:IndexedIterator[Char]>*/;
3860 { /* Inline kernel#Char#!= (var_i,var16) */
3861 var19
= (var16
!= NULL
) && (var16
->class == &class_kernel__Char
);
3863 var20
= ((struct instance_kernel__Char
*)var16
)->value
; /* autounbox from nullable Object to Char */;
3864 var19
= (var20
== var_i
);
3869 RET_LABEL18
:(void)0;
3877 ((void (*)(val
*))(var_iter
->class->vft
[COLOR_abstract_collection__Iterator__next
]))(var_iter
) /* next on <var_iter:IndexedIterator[Char]>*/;
3878 CONTINUE_label
: (void)0;
3879 ((void (*)(val
*))(var12
->class->vft
[COLOR_abstract_collection__Iterator__next
]))(var12
) /* next on <var12:Iterator[nullable Object]>*/;
3881 BREAK_label
: (void)0;
3888 /* method ropes#CharRopeView#== for (self: Object, nullable Object): Bool */
3889 short int VIRTUAL_ropes__CharRopeView___61d_61d(val
* self
, val
* p0
) {
3890 short int var
/* : Bool */;
3891 short int var1
/* : Bool */;
3892 var1
= ropes__CharRopeView___61d_61d(self
, p0
);
3897 /* method ropes#TupleVisitNode#init for (self: TupleVisitNode, ConcatNode) */
3898 void ropes__TupleVisitNode__init(val
* self
, val
* p0
) {
3899 val
* var_tgt
/* var tgt: ConcatNode */;
3901 ((void (*)(val
*, val
*))(self
->class->vft
[COLOR_ropes__TupleVisitNode__node_61d
]))(self
, var_tgt
) /* node= on <self:TupleVisitNode>*/;
3904 /* method ropes#TupleVisitNode#init for (self: Object, ConcatNode) */
3905 void VIRTUAL_ropes__TupleVisitNode__init(val
* self
, val
* p0
) {
3906 ropes__TupleVisitNode__init(self
, p0
);
3909 /* method ropes#TupleVisitNode#node for (self: TupleVisitNode): ConcatNode */
3910 val
* ropes__TupleVisitNode__node(val
* self
) {
3911 val
* var
/* : ConcatNode */;
3912 val
* var1
/* : ConcatNode */;
3913 var1
= self
->attrs
[COLOR_ropes__TupleVisitNode___64dnode
].val
; /* @node on <self:TupleVisitNode> */
3915 fprintf(stderr
, "Runtime error: %s", "Uninitialized attribute @node");
3916 fprintf(stderr
, " (%s:%d)\n", "lib/standard/ropes.nit", 775);
3923 /* method ropes#TupleVisitNode#node for (self: Object): ConcatNode */
3924 val
* VIRTUAL_ropes__TupleVisitNode__node(val
* self
) {
3925 val
* var
/* : ConcatNode */;
3926 val
* var1
/* : ConcatNode */;
3927 var1
= ropes__TupleVisitNode__node(self
);
3932 /* method ropes#TupleVisitNode#node= for (self: TupleVisitNode, ConcatNode) */
3933 void ropes__TupleVisitNode__node_61d(val
* self
, val
* p0
) {
3934 self
->attrs
[COLOR_ropes__TupleVisitNode___64dnode
].val
= p0
; /* @node on <self:TupleVisitNode> */
3937 /* method ropes#TupleVisitNode#node= for (self: Object, ConcatNode) */
3938 void VIRTUAL_ropes__TupleVisitNode__node_61d(val
* self
, val
* p0
) {
3939 ropes__TupleVisitNode__node_61d(self
, p0
);
3942 /* method ropes#TupleVisitNode#left_visited for (self: TupleVisitNode): Bool */
3943 short int ropes__TupleVisitNode__left_visited(val
* self
) {
3944 short int var
/* : Bool */;
3945 short int var1
/* : Bool */;
3946 var1
= self
->attrs
[COLOR_ropes__TupleVisitNode___64dleft_visited
].s
; /* @left_visited on <self:TupleVisitNode> */
3951 /* method ropes#TupleVisitNode#left_visited for (self: Object): Bool */
3952 short int VIRTUAL_ropes__TupleVisitNode__left_visited(val
* self
) {
3953 short int var
/* : Bool */;
3954 short int var1
/* : Bool */;
3955 var1
= ropes__TupleVisitNode__left_visited(self
);
3960 /* method ropes#TupleVisitNode#left_visited= for (self: TupleVisitNode, Bool) */
3961 void ropes__TupleVisitNode__left_visited_61d(val
* self
, short int p0
) {
3962 self
->attrs
[COLOR_ropes__TupleVisitNode___64dleft_visited
].s
= p0
; /* @left_visited on <self:TupleVisitNode> */
3965 /* method ropes#TupleVisitNode#left_visited= for (self: Object, Bool) */
3966 void VIRTUAL_ropes__TupleVisitNode__left_visited_61d(val
* self
, short int p0
) {
3967 ropes__TupleVisitNode__left_visited_61d(self
, p0
);
3970 /* method ropes#TupleVisitNode#right_visited for (self: TupleVisitNode): Bool */
3971 short int ropes__TupleVisitNode__right_visited(val
* self
) {
3972 short int var
/* : Bool */;
3973 short int var1
/* : Bool */;
3974 var1
= self
->attrs
[COLOR_ropes__TupleVisitNode___64dright_visited
].s
; /* @right_visited on <self:TupleVisitNode> */
3979 /* method ropes#TupleVisitNode#right_visited for (self: Object): Bool */
3980 short int VIRTUAL_ropes__TupleVisitNode__right_visited(val
* self
) {
3981 short int var
/* : Bool */;
3982 short int var1
/* : Bool */;
3983 var1
= ropes__TupleVisitNode__right_visited(self
);
3988 /* method ropes#TupleVisitNode#right_visited= for (self: TupleVisitNode, Bool) */
3989 void ropes__TupleVisitNode__right_visited_61d(val
* self
, short int p0
) {
3990 self
->attrs
[COLOR_ropes__TupleVisitNode___64dright_visited
].s
= p0
; /* @right_visited on <self:TupleVisitNode> */
3993 /* method ropes#TupleVisitNode#right_visited= for (self: Object, Bool) */
3994 void VIRTUAL_ropes__TupleVisitNode__right_visited_61d(val
* self
, short int p0
) {
3995 ropes__TupleVisitNode__right_visited_61d(self
, p0
);
3998 /* method ropes#RopeIterator#target for (self: RopeIterator): Rope */
3999 val
* ropes__RopeIterator__target(val
* self
) {
4000 val
* var
/* : Rope */;
4001 val
* var1
/* : Rope */;
4002 var1
= self
->attrs
[COLOR_ropes__RopeIterator___target
].val
; /* _target on <self:RopeIterator> */
4004 fprintf(stderr
, "Runtime error: %s", "Uninitialized attribute _target");
4005 fprintf(stderr
, " (%s:%d)\n", "lib/standard/ropes.nit", 789);
4013 /* method ropes#RopeIterator#target for (self: Object): Rope */
4014 val
* VIRTUAL_ropes__RopeIterator__target(val
* self
) {
4015 val
* var
/* : Rope */;
4016 val
* var1
/* : Rope */;
4017 var1
= ropes__RopeIterator__target(self
);
4022 /* method ropes#RopeIterator#pos for (self: RopeIterator): Int */
4023 long ropes__RopeIterator__pos(val
* self
) {
4024 long var
/* : Int */;
4025 long var1
/* : Int */;
4026 var1
= self
->attrs
[COLOR_ropes__RopeIterator___64dpos
].l
; /* @pos on <self:RopeIterator> */
4031 /* method ropes#RopeIterator#pos for (self: Object): Int */
4032 long VIRTUAL_ropes__RopeIterator__pos(val
* self
) {
4033 long var
/* : Int */;
4034 long var1
/* : Int */;
4035 var1
= ropes__RopeIterator__pos(self
);
4040 /* method ropes#RopeIterator#pos= for (self: RopeIterator, Int) */
4041 void ropes__RopeIterator__pos_61d(val
* self
, long p0
) {
4042 self
->attrs
[COLOR_ropes__RopeIterator___64dpos
].l
= p0
; /* @pos on <self:RopeIterator> */
4045 /* method ropes#RopeIterator#pos= for (self: Object, Int) */
4046 void VIRTUAL_ropes__RopeIterator__pos_61d(val
* self
, long p0
) {
4047 ropes__RopeIterator__pos_61d(self
, p0
);
4050 /* method ropes#RopeIterator#init for (self: RopeIterator, Rope) */
4051 void ropes__RopeIterator__init(val
* self
, val
* p0
) {
4052 val
* var_tgt
/* var tgt: Rope */;
4054 self
->attrs
[COLOR_ropes__RopeIterator___target
].val
= var_tgt
; /* _target on <self:RopeIterator> */
4057 /* method ropes#RopeIterator#init for (self: Object, Rope) */
4058 void VIRTUAL_ropes__RopeIterator__init(val
* self
, val
* p0
) {
4059 ropes__RopeIterator__init(self
, p0
);
4062 /* method ropes#RopeIterator#with_index for (self: RopeIterator, Rope, Int) */
4063 void ropes__RopeIterator__with_index(val
* self
, val
* p0
, long p1
) {
4064 val
* var_tgt
/* var tgt: Rope */;
4065 long var_index
/* var index: Int */;
4068 self
->attrs
[COLOR_ropes__RopeIterator___target
].val
= var_tgt
; /* _target on <self:RopeIterator> */
4071 /* method ropes#RopeIterator#with_index for (self: Object, Rope, Int) */
4072 void VIRTUAL_ropes__RopeIterator__with_index(val
* self
, val
* p0
, long p1
) {
4073 ropes__RopeIterator__with_index(self
, p0
, p1
);
4076 /* method ropes#RopeCharIterator#sub_str_iter for (self: RopeCharIterator): DFSRopeLeafIterator */
4077 val
* ropes__RopeCharIterator__sub_str_iter(val
* self
) {
4078 val
* var
/* : DFSRopeLeafIterator */;
4079 val
* var1
/* : DFSRopeLeafIterator */;
4080 var1
= self
->attrs
[COLOR_ropes__RopeCharIterator___64dsub_str_iter
].val
; /* @sub_str_iter on <self:RopeCharIterator> */
4082 fprintf(stderr
, "Runtime error: %s", "Uninitialized attribute @sub_str_iter");
4083 fprintf(stderr
, " (%s:%d)\n", "lib/standard/ropes.nit", 810);
4090 /* method ropes#RopeCharIterator#sub_str_iter for (self: Object): DFSRopeLeafIterator */
4091 val
* VIRTUAL_ropes__RopeCharIterator__sub_str_iter(val
* self
) {
4092 val
* var
/* : DFSRopeLeafIterator */;
4093 val
* var1
/* : DFSRopeLeafIterator */;
4094 var1
= ropes__RopeCharIterator__sub_str_iter(self
);
4099 /* method ropes#RopeCharIterator#sub_str_iter= for (self: RopeCharIterator, DFSRopeLeafIterator) */
4100 void ropes__RopeCharIterator__sub_str_iter_61d(val
* self
, val
* p0
) {
4101 self
->attrs
[COLOR_ropes__RopeCharIterator___64dsub_str_iter
].val
= p0
; /* @sub_str_iter on <self:RopeCharIterator> */
4104 /* method ropes#RopeCharIterator#sub_str_iter= for (self: Object, DFSRopeLeafIterator) */
4105 void VIRTUAL_ropes__RopeCharIterator__sub_str_iter_61d(val
* self
, val
* p0
) {
4106 ropes__RopeCharIterator__sub_str_iter_61d(self
, p0
);
4109 /* method ropes#RopeCharIterator#abs_pos for (self: RopeCharIterator): Int */
4110 long ropes__RopeCharIterator__abs_pos(val
* self
) {
4111 long var
/* : Int */;
4112 long var1
/* : Int */;
4113 var1
= self
->attrs
[COLOR_ropes__RopeCharIterator___64dabs_pos
].l
; /* @abs_pos on <self:RopeCharIterator> */
4118 /* method ropes#RopeCharIterator#abs_pos for (self: Object): Int */
4119 long VIRTUAL_ropes__RopeCharIterator__abs_pos(val
* self
) {
4120 long var
/* : Int */;
4121 long var1
/* : Int */;
4122 var1
= ropes__RopeCharIterator__abs_pos(self
);
4127 /* method ropes#RopeCharIterator#abs_pos= for (self: RopeCharIterator, Int) */
4128 void ropes__RopeCharIterator__abs_pos_61d(val
* self
, long p0
) {
4129 self
->attrs
[COLOR_ropes__RopeCharIterator___64dabs_pos
].l
= p0
; /* @abs_pos on <self:RopeCharIterator> */
4132 /* method ropes#RopeCharIterator#abs_pos= for (self: Object, Int) */
4133 void VIRTUAL_ropes__RopeCharIterator__abs_pos_61d(val
* self
, long p0
) {
4134 ropes__RopeCharIterator__abs_pos_61d(self
, p0
);
4137 /* method ropes#RopeCharIterator#sub_pos for (self: RopeCharIterator): Int */
4138 long ropes__RopeCharIterator__sub_pos(val
* self
) {
4139 long var
/* : Int */;
4140 long var1
/* : Int */;
4141 var1
= self
->attrs
[COLOR_ropes__RopeCharIterator___64dsub_pos
].l
; /* @sub_pos on <self:RopeCharIterator> */
4146 /* method ropes#RopeCharIterator#sub_pos for (self: Object): Int */
4147 long VIRTUAL_ropes__RopeCharIterator__sub_pos(val
* self
) {
4148 long var
/* : Int */;
4149 long var1
/* : Int */;
4150 var1
= ropes__RopeCharIterator__sub_pos(self
);
4155 /* method ropes#RopeCharIterator#sub_pos= for (self: RopeCharIterator, Int) */
4156 void ropes__RopeCharIterator__sub_pos_61d(val
* self
, long p0
) {
4157 self
->attrs
[COLOR_ropes__RopeCharIterator___64dsub_pos
].l
= p0
; /* @sub_pos on <self:RopeCharIterator> */
4160 /* method ropes#RopeCharIterator#sub_pos= for (self: Object, Int) */
4161 void VIRTUAL_ropes__RopeCharIterator__sub_pos_61d(val
* self
, long p0
) {
4162 ropes__RopeCharIterator__sub_pos_61d(self
, p0
);
4165 /* method ropes#RopeCharIterator#curr_substring for (self: RopeCharIterator): nullable String */
4166 val
* ropes__RopeCharIterator__curr_substring(val
* self
) {
4167 val
* var
/* : nullable String */;
4168 val
* var1
/* : nullable String */;
4169 var1
= self
->attrs
[COLOR_ropes__RopeCharIterator___64dcurr_substring
].val
; /* @curr_substring on <self:RopeCharIterator> */
4174 /* method ropes#RopeCharIterator#curr_substring for (self: Object): nullable String */
4175 val
* VIRTUAL_ropes__RopeCharIterator__curr_substring(val
* self
) {
4176 val
* var
/* : nullable String */;
4177 val
* var1
/* : nullable String */;
4178 var1
= ropes__RopeCharIterator__curr_substring(self
);
4183 /* method ropes#RopeCharIterator#curr_substring= for (self: RopeCharIterator, nullable String) */
4184 void ropes__RopeCharIterator__curr_substring_61d(val
* self
, val
* p0
) {
4185 self
->attrs
[COLOR_ropes__RopeCharIterator___64dcurr_substring
].val
= p0
; /* @curr_substring on <self:RopeCharIterator> */
4188 /* method ropes#RopeCharIterator#curr_substring= for (self: Object, nullable String) */
4189 void VIRTUAL_ropes__RopeCharIterator__curr_substring_61d(val
* self
, val
* p0
) {
4190 ropes__RopeCharIterator__curr_substring_61d(self
, p0
);
4193 /* method ropes#RopeCharIterator#init for (self: RopeCharIterator, Rope) */
4194 void ropes__RopeCharIterator__init(val
* self
, val
* p0
) {
4195 val
* var_tgt
/* var tgt: Rope */;
4196 val
* var
/* : DFSRopeLeafIterator */;
4197 val
* var1
/* : DFSRopeLeafIterator */;
4198 short int var2
/* : Bool */;
4199 val
* var3
/* : DFSRopeLeafIterator */;
4200 val
* var4
/* : nullable Object */;
4201 val
* var5
/* : String */;
4203 var
= NEW_ropes__DFSRopeLeafIterator(&type_ropes__DFSRopeLeafIterator
);
4204 ((void (*)(val
*, val
*))(var
->class->vft
[COLOR_ropes__DFSRopeLeafIterator__init
]))(var
, var_tgt
) /* init on <var:DFSRopeLeafIterator>*/;
4205 ((void (*)(val
*, val
*))(self
->class->vft
[COLOR_ropes__RopeCharIterator__sub_str_iter_61d
]))(self
, var
) /* sub_str_iter= on <self:RopeCharIterator>*/;
4206 var1
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_ropes__RopeCharIterator__sub_str_iter
]))(self
) /* sub_str_iter on <self:RopeCharIterator>*/;
4207 var2
= ((short int (*)(val
*))(var1
->class->vft
[COLOR_abstract_collection__Iterator__is_ok
]))(var1
) /* is_ok on <var1:DFSRopeLeafIterator>*/;
4209 var3
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_ropes__RopeCharIterator__sub_str_iter
]))(self
) /* sub_str_iter on <self:RopeCharIterator>*/;
4210 var4
= ((val
* (*)(val
*))(var3
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var3
) /* item on <var3:DFSRopeLeafIterator>*/;
4211 var5
= ((val
* (*)(val
*))(var4
->class->vft
[COLOR_ropes__LeafNode__value
]))(var4
) /* value on <var4:nullable Object(LeafNode)>*/;
4212 ((void (*)(val
*, val
*))(self
->class->vft
[COLOR_ropes__RopeCharIterator__curr_substring_61d
]))(self
, var5
) /* curr_substring= on <self:RopeCharIterator>*/;
4217 /* method ropes#RopeCharIterator#init for (self: Object, Rope) */
4218 void VIRTUAL_ropes__RopeCharIterator__init(val
* self
, val
* p0
) {
4219 ropes__RopeCharIterator__init(self
, p0
);
4222 /* method ropes#RopeCharIterator#item for (self: RopeCharIterator): Char */
4223 char ropes__RopeCharIterator__item(val
* self
) {
4224 char var
/* : Char */;
4225 val
* var1
/* : nullable String */;
4226 long var2
/* : Int */;
4227 val
* var3
/* : nullable Object */;
4228 char var4
/* : Char */;
4229 var1
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_ropes__RopeCharIterator__curr_substring
]))(self
) /* curr_substring on <self:RopeCharIterator>*/;
4230 var2
= ((long (*)(val
*))(self
->class->vft
[COLOR_ropes__RopeCharIterator__sub_pos
]))(self
) /* sub_pos on <self:RopeCharIterator>*/;
4232 fprintf(stderr
, "Runtime error: %s", "Reciever is null");
4233 fprintf(stderr
, " (%s:%d)\n", "lib/standard/ropes.nit", 828);
4236 var3
= ((val
* (*)(val
*, long))(var1
->class->vft
[COLOR_abstract_collection__SequenceRead___91d_93d
]))(var1
, var2
) /* [] on <var1:nullable String>*/;
4238 var4
= ((struct instance_kernel__Char
*)var3
)->value
; /* autounbox from nullable Object to Char */;
4244 /* method ropes#RopeCharIterator#item for (self: Object): nullable Object */
4245 val
* VIRTUAL_ropes__RopeCharIterator__item(val
* self
) {
4246 val
* var
/* : nullable Object */;
4247 char var1
/* : Char */;
4248 val
* var2
/* : nullable Object */;
4249 var1
= ropes__RopeCharIterator__item(self
);
4250 var2
= BOX_kernel__Char(var1
); /* autobox from Char to nullable Object */
4255 /* method ropes#RopeCharIterator#is_ok for (self: RopeCharIterator): Bool */
4256 short int ropes__RopeCharIterator__is_ok(val
* self
) {
4257 short int var
/* : Bool */;
4258 val
* var1
/* : DFSRopeLeafIterator */;
4259 short int var2
/* : Bool */;
4260 short int var3
/* : Bool */;
4261 short int var4
/* : Bool */;
4262 short int var5
/* : Bool */;
4263 val
* var6
/* : DFSRopeLeafIterator */;
4264 short int var7
/* : Bool */;
4265 short int var8
/* : Bool */;
4266 short int var_
/* var : Bool */;
4267 val
* var9
/* : nullable String */;
4268 val
* var10
/* : null */;
4269 short int var11
/* : Bool */;
4270 short int var_12
/* var : Bool */;
4271 long var13
/* : Int */;
4272 val
* var14
/* : nullable String */;
4273 long var15
/* : Int */;
4274 short int var16
/* : Bool */;
4275 short int var18
/* : Bool */;
4278 const char* var_class_name
;
4279 short int var19
/* : Bool */;
4280 short int var20
/* : Bool */;
4281 short int var21
/* : Bool */;
4282 var1
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_ropes__RopeCharIterator__sub_str_iter
]))(self
) /* sub_str_iter on <self:RopeCharIterator>*/;
4283 var2
= ((short int (*)(val
*))(var1
->class->vft
[COLOR_abstract_collection__Iterator__is_ok
]))(var1
) /* is_ok on <var1:DFSRopeLeafIterator>*/;
4290 var6
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_ropes__RopeCharIterator__sub_str_iter
]))(self
) /* sub_str_iter on <self:RopeCharIterator>*/;
4291 var7
= ((short int (*)(val
*))(var6
->class->vft
[COLOR_abstract_collection__Iterator__is_ok
]))(var6
) /* is_ok on <var6:DFSRopeLeafIterator>*/;
4295 var9
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_ropes__RopeCharIterator__curr_substring
]))(self
) /* curr_substring on <self:RopeCharIterator>*/;
4298 var11
= 0; /* is null */
4300 var11
= 1; /* arg is null and recv is not */
4308 var13
= ((long (*)(val
*))(self
->class->vft
[COLOR_ropes__RopeCharIterator__sub_pos
]))(self
) /* sub_pos on <self:RopeCharIterator>*/;
4309 var14
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_ropes__RopeCharIterator__curr_substring
]))(self
) /* curr_substring on <self:RopeCharIterator>*/;
4310 if (var14
== NULL
) {
4311 fprintf(stderr
, "Runtime error: %s", "Reciever is null");
4312 fprintf(stderr
, " (%s:%d)\n", "lib/standard/ropes.nit", 833);
4315 var15
= ((long (*)(val
*))(var14
->class->vft
[COLOR_abstract_collection__Collection__length
]))(var14
) /* length on <var14:nullable String>*/;
4317 { /* Inline kernel#Int#< (var13,var15) */
4318 /* Covariant cast for argument 0 (i) <var15:Int> isa OTHER */
4319 /* <var15:Int> isa OTHER */
4320 var18
= 1; /* easy <var15:Int> isa OTHER*/
4322 var_class_name
= type_kernel__Int
.name
;
4323 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name
);
4324 fprintf(stderr
, " (%s:%d)\n", "lib/standard/kernel.nit", 261);
4327 var19
= var13
< var15
;
4330 RET_LABEL17
:(void)0;
4348 /* method ropes#RopeCharIterator#is_ok for (self: Object): Bool */
4349 short int VIRTUAL_ropes__RopeCharIterator__is_ok(val
* self
) {
4350 short int var
/* : Bool */;
4351 short int var1
/* : Bool */;
4352 var1
= ropes__RopeCharIterator__is_ok(self
);
4357 /* method ropes#RopeCharIterator#next for (self: RopeCharIterator) */
4358 void ropes__RopeCharIterator__next(val
* self
) {
4359 short int var
/* : Bool */;
4360 long var1
/* : Int */;
4361 val
* var2
/* : nullable String */;
4362 long var3
/* : Int */;
4363 long var4
/* : Int */;
4364 long var5
/* : Int */;
4365 long var7
/* : Int */;
4366 short int var8
/* : Bool */;
4367 short int var10
/* : Bool */;
4370 const char* var_class_name
;
4371 short int var11
/* : Bool */;
4372 val
* var_
/* var : RopeCharIterator */;
4373 long var12
/* : Int */;
4374 long var13
/* : Int */;
4375 long var14
/* : Int */;
4376 long var16
/* : Int */;
4377 val
* var17
/* : DFSRopeLeafIterator */;
4378 val
* var18
/* : DFSRopeLeafIterator */;
4379 short int var19
/* : Bool */;
4380 val
* var20
/* : DFSRopeLeafIterator */;
4381 val
* var21
/* : nullable Object */;
4382 val
* var22
/* : String */;
4383 long var23
/* : Int */;
4384 val
* var24
/* : nullable String */;
4385 long var25
/* : Int */;
4386 val
* var_26
/* var : RopeCharIterator */;
4387 long var27
/* : Int */;
4388 long var28
/* : Int */;
4389 long var29
/* : Int */;
4390 long var31
/* : Int */;
4391 var
= ((short int (*)(val
*))(self
->class->vft
[COLOR_abstract_collection__Iterator__is_ok
]))(self
) /* is_ok on <self:RopeCharIterator>*/;
4393 fprintf(stderr
, "Runtime error: %s", "Assert failed");
4394 fprintf(stderr
, " (%s:%d)\n", "lib/standard/ropes.nit", 839);
4397 var1
= ((long (*)(val
*))(self
->class->vft
[COLOR_ropes__RopeCharIterator__sub_pos
]))(self
) /* sub_pos on <self:RopeCharIterator>*/;
4398 var2
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_ropes__RopeCharIterator__curr_substring
]))(self
) /* curr_substring on <self:RopeCharIterator>*/;
4400 fprintf(stderr
, "Runtime error: %s", "Reciever is null");
4401 fprintf(stderr
, " (%s:%d)\n", "lib/standard/ropes.nit", 840);
4404 var3
= ((long (*)(val
*))(var2
->class->vft
[COLOR_abstract_collection__Collection__length
]))(var2
) /* length on <var2:nullable String>*/;
4407 { /* Inline kernel#Int#- (var3,var4) */
4413 { /* Inline kernel#Int#< (var1,var5) */
4414 /* Covariant cast for argument 0 (i) <var5:Int> isa OTHER */
4415 /* <var5:Int> isa OTHER */
4416 var10
= 1; /* easy <var5:Int> isa OTHER*/
4418 var_class_name
= type_kernel__Int
.name
;
4419 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name
);
4420 fprintf(stderr
, " (%s:%d)\n", "lib/standard/kernel.nit", 261);
4423 var11
= var1
< var5
;
4430 var12
= ((long (*)(val
*))(var_
->class->vft
[COLOR_ropes__RopeCharIterator__sub_pos
]))(var_
) /* sub_pos on <var_:RopeCharIterator>*/;
4432 { /* Inline kernel#Int#+ (var12,var13) */
4433 var16
= var12
+ var13
;
4436 RET_LABEL15
:(void)0;
4438 ((void (*)(val
*, long))(var_
->class->vft
[COLOR_ropes__RopeCharIterator__sub_pos_61d
]))(var_
, var14
) /* sub_pos= on <var_:RopeCharIterator>*/;
4440 var17
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_ropes__RopeCharIterator__sub_str_iter
]))(self
) /* sub_str_iter on <self:RopeCharIterator>*/;
4441 ((void (*)(val
*))(var17
->class->vft
[COLOR_abstract_collection__Iterator__next
]))(var17
) /* next on <var17:DFSRopeLeafIterator>*/;
4442 var18
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_ropes__RopeCharIterator__sub_str_iter
]))(self
) /* sub_str_iter on <self:RopeCharIterator>*/;
4443 var19
= ((short int (*)(val
*))(var18
->class->vft
[COLOR_abstract_collection__Iterator__is_ok
]))(var18
) /* is_ok on <var18:DFSRopeLeafIterator>*/;
4445 var20
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_ropes__RopeCharIterator__sub_str_iter
]))(self
) /* sub_str_iter on <self:RopeCharIterator>*/;
4446 var21
= ((val
* (*)(val
*))(var20
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var20
) /* item on <var20:DFSRopeLeafIterator>*/;
4447 var22
= ((val
* (*)(val
*))(var21
->class->vft
[COLOR_ropes__LeafNode__value
]))(var21
) /* value on <var21:nullable Object(LeafNode)>*/;
4448 ((void (*)(val
*, val
*))(self
->class->vft
[COLOR_ropes__RopeCharIterator__curr_substring_61d
]))(self
, var22
) /* curr_substring= on <self:RopeCharIterator>*/;
4450 ((void (*)(val
*, long))(self
->class->vft
[COLOR_ropes__RopeCharIterator__sub_pos_61d
]))(self
, var23
) /* sub_pos= on <self:RopeCharIterator>*/;
4452 var24
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_ropes__RopeCharIterator__curr_substring
]))(self
) /* curr_substring on <self:RopeCharIterator>*/;
4453 if (var24
== NULL
) {
4454 fprintf(stderr
, "Runtime error: %s", "Reciever is null");
4455 fprintf(stderr
, " (%s:%d)\n", "lib/standard/ropes.nit", 848);
4458 var25
= ((long (*)(val
*))(var24
->class->vft
[COLOR_abstract_collection__Collection__length
]))(var24
) /* length on <var24:nullable String>*/;
4460 ((void (*)(val
*, long))(self
->class->vft
[COLOR_ropes__RopeCharIterator__sub_pos_61d
]))(self
, var25
) /* sub_pos= on <self:RopeCharIterator>*/;
4464 var27
= ((long (*)(val
*))(var_26
->class->vft
[COLOR_ropes__RopeCharIterator__abs_pos
]))(var_26
) /* abs_pos on <var_26:RopeCharIterator>*/;
4466 { /* Inline kernel#Int#+ (var27,var28) */
4467 var31
= var27
+ var28
;
4470 RET_LABEL30
:(void)0;
4472 ((void (*)(val
*, long))(var_26
->class->vft
[COLOR_ropes__RopeCharIterator__abs_pos_61d
]))(var_26
, var29
) /* abs_pos= on <var_26:RopeCharIterator>*/;
4475 /* method ropes#RopeCharIterator#next for (self: Object) */
4476 void VIRTUAL_ropes__RopeCharIterator__next(val
* self
) {
4477 ropes__RopeCharIterator__next(self
);
4480 /* method ropes#RopeCharIterator#index for (self: RopeCharIterator): Int */
4481 long ropes__RopeCharIterator__index(val
* self
) {
4482 long var
/* : Int */;
4483 long var1
/* : Int */;
4484 var1
= ((long (*)(val
*))(self
->class->vft
[COLOR_ropes__RopeCharIterator__abs_pos
]))(self
) /* abs_pos on <self:RopeCharIterator>*/;
4490 /* method ropes#RopeCharIterator#index for (self: Object): Int */
4491 long VIRTUAL_ropes__RopeCharIterator__index(val
* self
) {
4492 long var
/* : Int */;
4493 long var1
/* : Int */;
4494 var1
= ropes__RopeCharIterator__index(self
);
4499 /* method ropes#DFSRopeLeafIterator#visit_stack for (self: DFSRopeLeafIterator): List[TupleVisitNode] */
4500 val
* ropes__DFSRopeLeafIterator__visit_stack(val
* self
) {
4501 val
* var
/* : List[TupleVisitNode] */;
4502 val
* var1
/* : List[TupleVisitNode] */;
4503 var1
= self
->attrs
[COLOR_ropes__DFSRopeLeafIterator___64dvisit_stack
].val
; /* @visit_stack on <self:DFSRopeLeafIterator> */
4505 fprintf(stderr
, "Runtime error: %s", "Uninitialized attribute @visit_stack");
4506 fprintf(stderr
, " (%s:%d)\n", "lib/standard/ropes.nit", 865);
4513 /* method ropes#DFSRopeLeafIterator#visit_stack for (self: Object): List[TupleVisitNode] */
4514 val
* VIRTUAL_ropes__DFSRopeLeafIterator__visit_stack(val
* self
) {
4515 val
* var
/* : List[TupleVisitNode] */;
4516 val
* var1
/* : List[TupleVisitNode] */;
4517 var1
= ropes__DFSRopeLeafIterator__visit_stack(self
);
4522 /* method ropes#DFSRopeLeafIterator#visit_stack= for (self: DFSRopeLeafIterator, List[TupleVisitNode]) */
4523 void ropes__DFSRopeLeafIterator__visit_stack_61d(val
* self
, val
* p0
) {
4524 self
->attrs
[COLOR_ropes__DFSRopeLeafIterator___64dvisit_stack
].val
= p0
; /* @visit_stack on <self:DFSRopeLeafIterator> */
4527 /* method ropes#DFSRopeLeafIterator#visit_stack= for (self: Object, List[TupleVisitNode]) */
4528 void VIRTUAL_ropes__DFSRopeLeafIterator__visit_stack_61d(val
* self
, val
* p0
) {
4529 ropes__DFSRopeLeafIterator__visit_stack_61d(self
, p0
);
4532 /* method ropes#DFSRopeLeafIterator#curr_leaf for (self: DFSRopeLeafIterator): nullable LeafNode */
4533 val
* ropes__DFSRopeLeafIterator__curr_leaf(val
* self
) {
4534 val
* var
/* : nullable LeafNode */;
4535 val
* var1
/* : nullable LeafNode */;
4536 var1
= self
->attrs
[COLOR_ropes__DFSRopeLeafIterator___64dcurr_leaf
].val
; /* @curr_leaf on <self:DFSRopeLeafIterator> */
4541 /* method ropes#DFSRopeLeafIterator#curr_leaf for (self: Object): nullable LeafNode */
4542 val
* VIRTUAL_ropes__DFSRopeLeafIterator__curr_leaf(val
* self
) {
4543 val
* var
/* : nullable LeafNode */;
4544 val
* var1
/* : nullable LeafNode */;
4545 var1
= ropes__DFSRopeLeafIterator__curr_leaf(self
);
4550 /* method ropes#DFSRopeLeafIterator#curr_leaf= for (self: DFSRopeLeafIterator, nullable LeafNode) */
4551 void ropes__DFSRopeLeafIterator__curr_leaf_61d(val
* self
, val
* p0
) {
4552 self
->attrs
[COLOR_ropes__DFSRopeLeafIterator___64dcurr_leaf
].val
= p0
; /* @curr_leaf on <self:DFSRopeLeafIterator> */
4555 /* method ropes#DFSRopeLeafIterator#curr_leaf= for (self: Object, nullable LeafNode) */
4556 void VIRTUAL_ropes__DFSRopeLeafIterator__curr_leaf_61d(val
* self
, val
* p0
) {
4557 ropes__DFSRopeLeafIterator__curr_leaf_61d(self
, p0
);
4560 /* method ropes#DFSRopeLeafIterator#init for (self: DFSRopeLeafIterator, Rope) */
4561 void ropes__DFSRopeLeafIterator__init(val
* self
, val
* p0
) {
4562 val
* var_tgt
/* var tgt: Rope */;
4563 val
* var
/* : Rope */;
4564 val
* var1
/* : RopeNode */;
4565 val
* var_first_node
/* var first_node: RopeNode */;
4566 short int var2
/* : Bool */;
4569 val
* var3
/* : List[TupleVisitNode] */;
4570 val
* var4
/* : TupleVisitNode */;
4571 short int var5
/* : Bool */;
4575 ((void (*)(val
*, val
*))(self
->class->vft
[COLOR_ropes__RopeIterator__init
]))(self
, p0
) /* init on <self:DFSRopeLeafIterator>*/;
4576 var
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_ropes__RopeIterator__target
]))(self
) /* target on <self:DFSRopeLeafIterator>*/;
4577 var1
= ((val
* (*)(val
*))(var
->class->vft
[COLOR_ropes__Rope__parent_node
]))(var
) /* parent_node on <var:Rope>*/;
4578 var_first_node
= var1
;
4579 /* <var_first_node:RopeNode> isa ConcatNode */
4580 cltype
= type_ropes__ConcatNode
.color
;
4581 idtype
= type_ropes__ConcatNode
.id
;
4582 if(cltype
>= var_first_node
->type
->table_size
) {
4585 var2
= var_first_node
->type
->type_table
[cltype
] == idtype
;
4588 var3
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_ropes__DFSRopeLeafIterator__visit_stack
]))(self
) /* visit_stack on <self:DFSRopeLeafIterator>*/;
4589 var4
= NEW_ropes__TupleVisitNode(&type_ropes__TupleVisitNode
);
4590 ((void (*)(val
*, val
*))(var4
->class->vft
[COLOR_ropes__TupleVisitNode__init
]))(var4
, var_first_node
) /* init on <var4:TupleVisitNode>*/;
4591 ((void (*)(val
*, val
*))(var3
->class->vft
[COLOR_abstract_collection__Sequence__push
]))(var3
, var4
) /* push on <var3:List[TupleVisitNode]>*/;
4593 /* <var_first_node:RopeNode> isa LeafNode */
4594 cltype6
= type_ropes__LeafNode
.color
;
4595 idtype7
= type_ropes__LeafNode
.id
;
4596 if(cltype6
>= var_first_node
->type
->table_size
) {
4599 var5
= var_first_node
->type
->type_table
[cltype6
] == idtype7
;
4602 ((void (*)(val
*, val
*))(self
->class->vft
[COLOR_ropes__DFSRopeLeafIterator__curr_leaf_61d
]))(self
, var_first_node
) /* curr_leaf= on <self:DFSRopeLeafIterator>*/;
4607 ((void (*)(val
*))(self
->class->vft
[COLOR_ropes__DFSRopeLeafIterator__next_body
]))(self
) /* next_body on <self:DFSRopeLeafIterator>*/;
4610 /* method ropes#DFSRopeLeafIterator#init for (self: Object, Rope) */
4611 void VIRTUAL_ropes__DFSRopeLeafIterator__init(val
* self
, val
* p0
) {
4612 ropes__DFSRopeLeafIterator__init(self
, p0
);
4615 /* method ropes#DFSRopeLeafIterator#with_index for (self: DFSRopeLeafIterator, Rope, Int) */
4616 void ropes__DFSRopeLeafIterator__with_index(val
* self
, val
* p0
, long p1
) {
4617 val
* var_tgt
/* var tgt: Rope */;
4618 long var_index
/* var index: Int */;
4619 val
* var
/* : Rope */;
4620 val
* var1
/* : TupleLeafNodePos */;
4621 val
* var_returned_tuple
/* var returned_tuple: TupleLeafNodePos */;
4622 val
* var2
/* : LeafNode */;
4623 val
* var3
/* : List[TupleVisitNode] */;
4624 long var4
/* : Int */;
4625 long var5
/* : Int */;
4626 long var7
/* : Int */;
4629 ((void (*)(val
*, val
*, long))(self
->class->vft
[COLOR_ropes__RopeIterator__with_index
]))(self
, p0
, p1
) /* with_index on <self:DFSRopeLeafIterator>*/;
4630 var
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_ropes__RopeIterator__target
]))(self
) /* target on <self:DFSRopeLeafIterator>*/;
4631 var1
= ((val
* (*)(val
*, long))(var
->class->vft
[COLOR_ropes__Rope__get_node_for_pos
]))(var
, var_index
) /* get_node_for_pos on <var:Rope>*/;
4632 var_returned_tuple
= var1
;
4633 var2
= ((val
* (*)(val
*))(var_returned_tuple
->class->vft
[COLOR_ropes__TupleLeafNodePos__curr_node
]))(var_returned_tuple
) /* curr_node on <var_returned_tuple:TupleLeafNodePos>*/;
4634 ((void (*)(val
*, val
*))(self
->class->vft
[COLOR_ropes__DFSRopeLeafIterator__curr_leaf_61d
]))(self
, var2
) /* curr_leaf= on <self:DFSRopeLeafIterator>*/;
4635 var3
= ((val
* (*)(val
*))(var_returned_tuple
->class->vft
[COLOR_ropes__TupleLeafNodePos__visit_stack
]))(var_returned_tuple
) /* visit_stack on <var_returned_tuple:TupleLeafNodePos>*/;
4636 ((void (*)(val
*, val
*))(self
->class->vft
[COLOR_ropes__DFSRopeLeafIterator__visit_stack_61d
]))(self
, var3
) /* visit_stack= on <self:DFSRopeLeafIterator>*/;
4637 var4
= ((long (*)(val
*))(var_returned_tuple
->class->vft
[COLOR_ropes__TupleLeafNodePos__corrected_pos
]))(var_returned_tuple
) /* corrected_pos on <var_returned_tuple:TupleLeafNodePos>*/;
4638 { /* Inline kernel#Int#- (var_index,var4) */
4639 var7
= var_index
- var4
;
4644 ((void (*)(val
*, long))(self
->class->vft
[COLOR_ropes__RopeIterator__pos_61d
]))(self
, var5
) /* pos= on <self:DFSRopeLeafIterator>*/;
4647 /* method ropes#DFSRopeLeafIterator#with_index for (self: Object, Rope, Int) */
4648 void VIRTUAL_ropes__DFSRopeLeafIterator__with_index(val
* self
, val
* p0
, long p1
) {
4649 ropes__DFSRopeLeafIterator__with_index(self
, p0
, p1
);
4652 /* method ropes#DFSRopeLeafIterator#is_ok for (self: DFSRopeLeafIterator): Bool */
4653 short int ropes__DFSRopeLeafIterator__is_ok(val
* self
) {
4654 short int var
/* : Bool */;
4655 val
* var1
/* : nullable LeafNode */;
4656 val
* var2
/* : null */;
4657 short int var3
/* : Bool */;
4658 var1
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_ropes__DFSRopeLeafIterator__curr_leaf
]))(self
) /* curr_leaf on <self:DFSRopeLeafIterator>*/;
4661 var3
= 0; /* is null */
4663 var3
= 1; /* arg is null and recv is not */
4670 /* method ropes#DFSRopeLeafIterator#is_ok for (self: Object): Bool */
4671 short int VIRTUAL_ropes__DFSRopeLeafIterator__is_ok(val
* self
) {
4672 short int var
/* : Bool */;
4673 short int var1
/* : Bool */;
4674 var1
= ropes__DFSRopeLeafIterator__is_ok(self
);
4679 /* method ropes#DFSRopeLeafIterator#next for (self: DFSRopeLeafIterator) */
4680 void ropes__DFSRopeLeafIterator__next(val
* self
) {
4681 short int var
/* : Bool */;
4682 val
* var_
/* var : DFSRopeLeafIterator */;
4683 long var1
/* : Int */;
4684 val
* var2
/* : nullable LeafNode */;
4685 val
* var3
/* : String */;
4686 long var4
/* : Int */;
4687 long var5
/* : Int */;
4688 long var7
/* : Int */;
4689 var
= ((short int (*)(val
*))(self
->class->vft
[COLOR_abstract_collection__Iterator__is_ok
]))(self
) /* is_ok on <self:DFSRopeLeafIterator>*/;
4691 fprintf(stderr
, "Runtime error: %s", "Assert failed");
4692 fprintf(stderr
, " (%s:%d)\n", "lib/standard/ropes.nit", 902);
4696 var1
= ((long (*)(val
*))(var_
->class->vft
[COLOR_ropes__RopeIterator__pos
]))(var_
) /* pos on <var_:DFSRopeLeafIterator>*/;
4697 var2
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_ropes__DFSRopeLeafIterator__curr_leaf
]))(self
) /* curr_leaf on <self:DFSRopeLeafIterator>*/;
4699 fprintf(stderr
, "Runtime error: %s", "Reciever is null");
4700 fprintf(stderr
, " (%s:%d)\n", "lib/standard/ropes.nit", 903);
4703 var3
= ((val
* (*)(val
*))(var2
->class->vft
[COLOR_ropes__LeafNode__value
]))(var2
) /* value on <var2:nullable LeafNode>*/;
4705 var4
= ((long (*)(val
*))(var3
->class->vft
[COLOR_abstract_collection__Collection__length
]))(var3
) /* length on <var3:String>*/;
4706 { /* Inline kernel#Int#+ (var1,var4) */
4712 ((void (*)(val
*, long))(var_
->class->vft
[COLOR_ropes__RopeIterator__pos_61d
]))(var_
, var5
) /* pos= on <var_:DFSRopeLeafIterator>*/;
4713 ((void (*)(val
*))(self
->class->vft
[COLOR_ropes__DFSRopeLeafIterator__next_body
]))(self
) /* next_body on <self:DFSRopeLeafIterator>*/;
4716 /* method ropes#DFSRopeLeafIterator#next for (self: Object) */
4717 void VIRTUAL_ropes__DFSRopeLeafIterator__next(val
* self
) {
4718 ropes__DFSRopeLeafIterator__next(self
);
4721 /* method ropes#DFSRopeLeafIterator#next_body for (self: DFSRopeLeafIterator) */
4722 void ropes__DFSRopeLeafIterator__next_body(val
* self
) {
4723 val
* var
/* : List[TupleVisitNode] */;
4724 short int var1
/* : Bool */;
4725 short int var2
/* : Bool */;
4726 val
* var3
/* : List[TupleVisitNode] */;
4727 val
* var4
/* : nullable Object */;
4728 val
* var_curr_concat_tuple
/* var curr_concat_tuple: TupleVisitNode */;
4729 short int var5
/* : Bool */;
4730 short int var6
/* : Bool */;
4731 short int var7
/* : Bool */;
4732 val
* var8
/* : ConcatNode */;
4733 val
* var9
/* : nullable RopeNode */;
4734 val
* var_next_node
/* var next_node: nullable RopeNode */;
4735 val
* var10
/* : null */;
4736 short int var11
/* : Bool */;
4737 short int var12
/* : Bool */;
4740 val
* var13
/* : List[TupleVisitNode] */;
4741 val
* var14
/* : TupleVisitNode */;
4742 short int var15
/* : Bool */;
4745 short int var18
/* : Bool */;
4746 short int var19
/* : Bool */;
4747 short int var20
/* : Bool */;
4748 val
* var21
/* : ConcatNode */;
4749 val
* var22
/* : nullable RopeNode */;
4750 val
* var23
/* : null */;
4751 short int var24
/* : Bool */;
4752 short int var25
/* : Bool */;
4755 val
* var28
/* : List[TupleVisitNode] */;
4756 val
* var29
/* : TupleVisitNode */;
4757 short int var30
/* : Bool */;
4760 val
* var33
/* : List[TupleVisitNode] */;
4761 val
* var34
/* : nullable Object */;
4762 val
* var35
/* : null */;
4764 var
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_ropes__DFSRopeLeafIterator__visit_stack
]))(self
) /* visit_stack on <self:DFSRopeLeafIterator>*/;
4765 var1
= ((short int (*)(val
*))(var
->class->vft
[COLOR_abstract_collection__Collection__is_empty
]))(var
) /* is_empty on <var:List[TupleVisitNode]>*/;
4768 var3
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_ropes__DFSRopeLeafIterator__visit_stack
]))(self
) /* visit_stack on <self:DFSRopeLeafIterator>*/;
4769 var4
= ((val
* (*)(val
*))(var3
->class->vft
[COLOR_abstract_collection__SequenceRead__last
]))(var3
) /* last on <var3:List[TupleVisitNode]>*/;
4770 var_curr_concat_tuple
= var4
;
4771 var5
= ((short int (*)(val
*))(var_curr_concat_tuple
->class->vft
[COLOR_ropes__TupleVisitNode__left_visited
]))(var_curr_concat_tuple
) /* left_visited on <var_curr_concat_tuple:TupleVisitNode>*/;
4775 ((void (*)(val
*, short int))(var_curr_concat_tuple
->class->vft
[COLOR_ropes__TupleVisitNode__left_visited_61d
]))(var_curr_concat_tuple
, var7
) /* left_visited= on <var_curr_concat_tuple:TupleVisitNode>*/;
4776 var8
= ((val
* (*)(val
*))(var_curr_concat_tuple
->class->vft
[COLOR_ropes__TupleVisitNode__node
]))(var_curr_concat_tuple
) /* node on <var_curr_concat_tuple:TupleVisitNode>*/;
4777 var9
= ((val
* (*)(val
*))(var8
->class->vft
[COLOR_ropes__ConcatNode__left_child
]))(var8
) /* left_child on <var8:ConcatNode>*/;
4778 var_next_node
= var9
;
4780 if (var_next_node
== NULL
) {
4781 var11
= 1; /* is null */
4783 var11
= 0; /* arg is null but recv is not */
4786 goto CONTINUE_label
;
4789 /* <var_next_node:nullable RopeNode(RopeNode)> isa ConcatNode */
4790 cltype
= type_ropes__ConcatNode
.color
;
4791 idtype
= type_ropes__ConcatNode
.id
;
4792 if(cltype
>= var_next_node
->type
->table_size
) {
4795 var12
= var_next_node
->type
->type_table
[cltype
] == idtype
;
4798 var13
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_ropes__DFSRopeLeafIterator__visit_stack
]))(self
) /* visit_stack on <self:DFSRopeLeafIterator>*/;
4799 var14
= NEW_ropes__TupleVisitNode(&type_ropes__TupleVisitNode
);
4800 ((void (*)(val
*, val
*))(var14
->class->vft
[COLOR_ropes__TupleVisitNode__init
]))(var14
, var_next_node
) /* init on <var14:TupleVisitNode>*/;
4801 ((void (*)(val
*, val
*))(var13
->class->vft
[COLOR_abstract_collection__Sequence__push
]))(var13
, var14
) /* push on <var13:List[TupleVisitNode]>*/;
4803 /* <var_next_node:nullable RopeNode(RopeNode)> isa LeafNode */
4804 cltype16
= type_ropes__LeafNode
.color
;
4805 idtype17
= type_ropes__LeafNode
.id
;
4806 if(cltype16
>= var_next_node
->type
->table_size
) {
4809 var15
= var_next_node
->type
->type_table
[cltype16
] == idtype17
;
4812 ((void (*)(val
*, val
*))(self
->class->vft
[COLOR_ropes__DFSRopeLeafIterator__curr_leaf_61d
]))(self
, var_next_node
) /* curr_leaf= on <self:DFSRopeLeafIterator>*/;
4818 var18
= ((short int (*)(val
*))(var_curr_concat_tuple
->class->vft
[COLOR_ropes__TupleVisitNode__right_visited
]))(var_curr_concat_tuple
) /* right_visited on <var_curr_concat_tuple:TupleVisitNode>*/;
4822 ((void (*)(val
*, short int))(var_curr_concat_tuple
->class->vft
[COLOR_ropes__TupleVisitNode__right_visited_61d
]))(var_curr_concat_tuple
, var20
) /* right_visited= on <var_curr_concat_tuple:TupleVisitNode>*/;
4823 var21
= ((val
* (*)(val
*))(var_curr_concat_tuple
->class->vft
[COLOR_ropes__TupleVisitNode__node
]))(var_curr_concat_tuple
) /* node on <var_curr_concat_tuple:TupleVisitNode>*/;
4824 var22
= ((val
* (*)(val
*))(var21
->class->vft
[COLOR_ropes__ConcatNode__right_child
]))(var21
) /* right_child on <var21:ConcatNode>*/;
4825 var_next_node
= var22
;
4827 if (var_next_node
== NULL
) {
4828 var24
= 1; /* is null */
4830 var24
= 0; /* arg is null but recv is not */
4833 goto CONTINUE_label
;
4836 /* <var_next_node:nullable RopeNode(RopeNode)> isa ConcatNode */
4837 cltype26
= type_ropes__ConcatNode
.color
;
4838 idtype27
= type_ropes__ConcatNode
.id
;
4839 if(cltype26
>= var_next_node
->type
->table_size
) {
4842 var25
= var_next_node
->type
->type_table
[cltype26
] == idtype27
;
4845 var28
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_ropes__DFSRopeLeafIterator__visit_stack
]))(self
) /* visit_stack on <self:DFSRopeLeafIterator>*/;
4846 var29
= NEW_ropes__TupleVisitNode(&type_ropes__TupleVisitNode
);
4847 ((void (*)(val
*, val
*))(var29
->class->vft
[COLOR_ropes__TupleVisitNode__init
]))(var29
, var_next_node
) /* init on <var29:TupleVisitNode>*/;
4848 ((void (*)(val
*, val
*))(var28
->class->vft
[COLOR_abstract_collection__Sequence__push
]))(var28
, var29
) /* push on <var28:List[TupleVisitNode]>*/;
4850 /* <var_next_node:nullable RopeNode(RopeNode)> isa LeafNode */
4851 cltype31
= type_ropes__LeafNode
.color
;
4852 idtype32
= type_ropes__LeafNode
.id
;
4853 if(cltype31
>= var_next_node
->type
->table_size
) {
4856 var30
= var_next_node
->type
->type_table
[cltype31
] == idtype32
;
4859 ((void (*)(val
*, val
*))(self
->class->vft
[COLOR_ropes__DFSRopeLeafIterator__curr_leaf_61d
]))(self
, var_next_node
) /* curr_leaf= on <self:DFSRopeLeafIterator>*/;
4865 var33
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_ropes__DFSRopeLeafIterator__visit_stack
]))(self
) /* visit_stack on <self:DFSRopeLeafIterator>*/;
4866 var34
= ((val
* (*)(val
*))(var33
->class->vft
[COLOR_abstract_collection__Sequence__pop
]))(var33
) /* pop on <var33:List[TupleVisitNode]>*/;
4870 CONTINUE_label
: (void)0;
4872 BREAK_label
: (void)0;
4874 ((void (*)(val
*, val
*))(self
->class->vft
[COLOR_ropes__DFSRopeLeafIterator__curr_leaf_61d
]))(self
, var35
) /* curr_leaf= on <self:DFSRopeLeafIterator>*/;
4877 /* method ropes#DFSRopeLeafIterator#next_body for (self: Object) */
4878 void VIRTUAL_ropes__DFSRopeLeafIterator__next_body(val
* self
) {
4879 ropes__DFSRopeLeafIterator__next_body(self
);
4882 /* method ropes#DFSRopeLeafIterator#item for (self: DFSRopeLeafIterator): LeafNode */
4883 val
* ropes__DFSRopeLeafIterator__item(val
* self
) {
4884 val
* var
/* : LeafNode */;
4885 short int var1
/* : Bool */;
4886 val
* var2
/* : nullable LeafNode */;
4887 var1
= ((short int (*)(val
*))(self
->class->vft
[COLOR_abstract_collection__Iterator__is_ok
]))(self
) /* is_ok on <self:DFSRopeLeafIterator>*/;
4889 fprintf(stderr
, "Runtime error: %s", "Assert failed");
4890 fprintf(stderr
, " (%s:%d)\n", "lib/standard/ropes.nit", 951);
4893 var2
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_ropes__DFSRopeLeafIterator__curr_leaf
]))(self
) /* curr_leaf on <self:DFSRopeLeafIterator>*/;
4895 fprintf(stderr
, "Runtime error: %s", "Cast failed");
4896 fprintf(stderr
, " (%s:%d)\n", "lib/standard/ropes.nit", 952);
4904 /* method ropes#DFSRopeLeafIterator#item for (self: Object): nullable Object */
4905 val
* VIRTUAL_ropes__DFSRopeLeafIterator__item(val
* self
) {
4906 val
* var
/* : nullable Object */;
4907 val
* var1
/* : LeafNode */;
4908 var1
= ropes__DFSRopeLeafIterator__item(self
);
4913 /* method ropes#RopeNode#parent for (self: RopeNode): nullable ConcatNode */
4914 val
* ropes__RopeNode__parent(val
* self
) {
4915 val
* var
/* : nullable ConcatNode */;
4916 val
* var1
/* : nullable ConcatNode */;
4917 var1
= self
->attrs
[COLOR_ropes__RopeNode___64dparent
].val
; /* @parent on <self:RopeNode> */
4922 /* method ropes#RopeNode#parent for (self: Object): nullable ConcatNode */
4923 val
* VIRTUAL_ropes__RopeNode__parent(val
* self
) {
4924 val
* var
/* : nullable ConcatNode */;
4925 val
* var1
/* : nullable ConcatNode */;
4926 var1
= ropes__RopeNode__parent(self
);
4931 /* method ropes#RopeNode#parent= for (self: RopeNode, nullable ConcatNode) */
4932 void ropes__RopeNode__parent_61d(val
* self
, val
* p0
) {
4933 self
->attrs
[COLOR_ropes__RopeNode___64dparent
].val
= p0
; /* @parent on <self:RopeNode> */
4936 /* method ropes#RopeNode#parent= for (self: Object, nullable ConcatNode) */
4937 void VIRTUAL_ropes__RopeNode__parent_61d(val
* self
, val
* p0
) {
4938 ropes__RopeNode__parent_61d(self
, p0
);
4941 /* method ropes#RopeNode#height for (self: RopeNode): Int */
4942 long ropes__RopeNode__height(val
* self
) {
4943 long var
/* : Int */;
4944 long var1
/* : Int */;
4945 var1
= self
->attrs
[COLOR_ropes__RopeNode___64dheight
].l
; /* @height on <self:RopeNode> */
4950 /* method ropes#RopeNode#height for (self: Object): Int */
4951 long VIRTUAL_ropes__RopeNode__height(val
* self
) {
4952 long var
/* : Int */;
4953 long var1
/* : Int */;
4954 var1
= ropes__RopeNode__height(self
);
4959 /* method ropes#RopeNode#height= for (self: RopeNode, Int) */
4960 void ropes__RopeNode__height_61d(val
* self
, long p0
) {
4961 self
->attrs
[COLOR_ropes__RopeNode___64dheight
].l
= p0
; /* @height on <self:RopeNode> */
4964 /* method ropes#RopeNode#height= for (self: Object, Int) */
4965 void VIRTUAL_ropes__RopeNode__height_61d(val
* self
, long p0
) {
4966 ropes__RopeNode__height_61d(self
, p0
);
4969 /* method ropes#RopeNode#balance_factor for (self: RopeNode): Int */
4970 long ropes__RopeNode__balance_factor(val
* self
) {
4971 long var
/* : Int */;
4972 long var1
/* : Int */;
4973 var1
= ((long (*)(val
*))(self
->class->vft
[COLOR_ropes__RopeNode__height
]))(self
) /* height on <self:RopeNode>*/;
4979 /* method ropes#RopeNode#balance_factor for (self: Object): Int */
4980 long VIRTUAL_ropes__RopeNode__balance_factor(val
* self
) {
4981 long var
/* : Int */;
4982 long var1
/* : Int */;
4983 var1
= ropes__RopeNode__balance_factor(self
);
4988 /* method ropes#RopeNode#length for (self: RopeNode): Int */
4989 long ropes__RopeNode__length(val
* self
) {
4990 long var
/* : Int */;
4991 long var1
/* : Int */;
4992 var1
= self
->attrs
[COLOR_ropes__RopeNode___length
].l
; /* _length on <self:RopeNode> */
4998 /* method ropes#RopeNode#length for (self: Object): Int */
4999 long VIRTUAL_ropes__RopeNode__length(val
* self
) {
5000 long var
/* : Int */;
5001 long var1
/* : Int */;
5002 var1
= ropes__RopeNode__length(self
);
5007 /* method ropes#RopeNode#length= for (self: RopeNode, Int) */
5008 void ropes__RopeNode__length_61d(val
* self
, long p0
) {
5009 long var_len
/* var len: Int */;
5011 self
->attrs
[COLOR_ropes__RopeNode___length
].l
= var_len
; /* _length on <self:RopeNode> */
5014 /* method ropes#RopeNode#length= for (self: Object, Int) */
5015 void VIRTUAL_ropes__RopeNode__length_61d(val
* self
, long p0
) {
5016 ropes__RopeNode__length_61d(self
, p0
);
5019 /* method ropes#RopeNode#init for (self: RopeNode) */
5020 void ropes__RopeNode__init(val
* self
) {
5023 /* method ropes#RopeNode#init for (self: Object) */
5024 void VIRTUAL_ropes__RopeNode__init(val
* self
) {
5025 ropes__RopeNode__init(self
);
5028 /* method ropes#ConcatNode#left_child for (self: ConcatNode): nullable RopeNode */
5029 val
* ropes__ConcatNode__left_child(val
* self
) {
5030 val
* var
/* : nullable RopeNode */;
5031 val
* var1
/* : nullable RopeNode */;
5032 val
* var2
/* : null */;
5033 short int var3
/* : Bool */;
5034 val
* var4
/* : nullable RopeNode */;
5035 val
* var5
/* : null */;
5036 var1
= self
->attrs
[COLOR_ropes__ConcatNode___left_child
].val
; /* _left_child on <self:ConcatNode> */
5039 var3
= 0; /* is null */
5041 var3
= 1; /* arg is null and recv is not */
5044 var4
= self
->attrs
[COLOR_ropes__ConcatNode___left_child
].val
; /* _left_child on <self:ConcatNode> */
5055 /* method ropes#ConcatNode#left_child for (self: Object): nullable RopeNode */
5056 val
* VIRTUAL_ropes__ConcatNode__left_child(val
* self
) {
5057 val
* var
/* : nullable RopeNode */;
5058 val
* var1
/* : nullable RopeNode */;
5059 var1
= ropes__ConcatNode__left_child(self
);
5064 /* method ropes#ConcatNode#right_child for (self: ConcatNode): nullable RopeNode */
5065 val
* ropes__ConcatNode__right_child(val
* self
) {
5066 val
* var
/* : nullable RopeNode */;
5067 val
* var1
/* : nullable RopeNode */;
5068 val
* var2
/* : null */;
5069 short int var3
/* : Bool */;
5070 val
* var4
/* : nullable RopeNode */;
5071 val
* var5
/* : null */;
5072 var1
= self
->attrs
[COLOR_ropes__ConcatNode___right_child
].val
; /* _right_child on <self:ConcatNode> */
5075 var3
= 0; /* is null */
5077 var3
= 1; /* arg is null and recv is not */
5080 var4
= self
->attrs
[COLOR_ropes__ConcatNode___right_child
].val
; /* _right_child on <self:ConcatNode> */
5091 /* method ropes#ConcatNode#right_child for (self: Object): nullable RopeNode */
5092 val
* VIRTUAL_ropes__ConcatNode__right_child(val
* self
) {
5093 val
* var
/* : nullable RopeNode */;
5094 val
* var1
/* : nullable RopeNode */;
5095 var1
= ropes__ConcatNode__right_child(self
);
5100 /* method ropes#ConcatNode#left_child= for (self: ConcatNode, nullable RopeNode) */
5101 void ropes__ConcatNode__left_child_61d(val
* self
, val
* p0
) {
5102 val
* var_new_node
/* var new_node: nullable RopeNode */;
5104 self
->attrs
[COLOR_ropes__ConcatNode___left_child
].val
= var_new_node
; /* _left_child on <self:ConcatNode> */
5105 if (var_new_node
== NULL
) {
5106 fprintf(stderr
, "Runtime error: %s", "Reciever is null");
5107 fprintf(stderr
, " (%s:%d)\n", "lib/standard/ropes.nit", 1010);
5110 ((void (*)(val
*, val
*))(var_new_node
->class->vft
[COLOR_ropes__RopeNode__parent_61d
]))(var_new_node
, self
) /* parent= on <var_new_node:nullable RopeNode>*/;
5112 ((void (*)(val
*))(self
->class->vft
[COLOR_ropes__ConcatNode__update_data
]))(self
) /* update_data on <self:ConcatNode>*/;
5115 /* method ropes#ConcatNode#left_child= for (self: Object, nullable RopeNode) */
5116 void VIRTUAL_ropes__ConcatNode__left_child_61d(val
* self
, val
* p0
) {
5117 ropes__ConcatNode__left_child_61d(self
, p0
);
5120 /* method ropes#ConcatNode#right_child= for (self: ConcatNode, nullable RopeNode) */
5121 void ropes__ConcatNode__right_child_61d(val
* self
, val
* p0
) {
5122 val
* var_new_node
/* var new_node: nullable RopeNode */;
5124 self
->attrs
[COLOR_ropes__ConcatNode___right_child
].val
= var_new_node
; /* _right_child on <self:ConcatNode> */
5125 if (var_new_node
== NULL
) {
5126 fprintf(stderr
, "Runtime error: %s", "Reciever is null");
5127 fprintf(stderr
, " (%s:%d)\n", "lib/standard/ropes.nit", 1017);
5130 ((void (*)(val
*, val
*))(var_new_node
->class->vft
[COLOR_ropes__RopeNode__parent_61d
]))(var_new_node
, self
) /* parent= on <var_new_node:nullable RopeNode>*/;
5132 ((void (*)(val
*))(self
->class->vft
[COLOR_ropes__ConcatNode__update_data
]))(self
) /* update_data on <self:ConcatNode>*/;
5135 /* method ropes#ConcatNode#right_child= for (self: Object, nullable RopeNode) */
5136 void VIRTUAL_ropes__ConcatNode__right_child_61d(val
* self
, val
* p0
) {
5137 ropes__ConcatNode__right_child_61d(self
, p0
);
5140 /* method ropes#ConcatNode#update_data for (self: ConcatNode) */
5141 void ropes__ConcatNode__update_data(val
* self
) {
5142 long var
/* : Int */;
5143 long var1
/* : Int */;
5144 val
* var2
/* : nullable RopeNode */;
5145 val
* var3
/* : null */;
5146 short int var4
/* : Bool */;
5147 val
* var_
/* var : ConcatNode */;
5148 long var5
/* : Int */;
5149 val
* var6
/* : nullable RopeNode */;
5150 long var7
/* : Int */;
5151 long var8
/* : Int */;
5152 long var10
/* : Int */;
5153 val
* var11
/* : nullable RopeNode */;
5154 long var12
/* : Int */;
5155 long var13
/* : Int */;
5156 long var14
/* : Int */;
5157 long var16
/* : Int */;
5158 long var17
/* : Int */;
5159 short int var18
/* : Bool */;
5160 short int var20
/* : Bool */;
5163 const char* var_class_name
;
5164 short int var21
/* : Bool */;
5165 val
* var22
/* : nullable RopeNode */;
5166 long var23
/* : Int */;
5167 long var24
/* : Int */;
5168 long var25
/* : Int */;
5169 long var27
/* : Int */;
5170 val
* var28
/* : nullable RopeNode */;
5171 val
* var29
/* : null */;
5172 short int var30
/* : Bool */;
5173 val
* var_31
/* var : ConcatNode */;
5174 long var32
/* : Int */;
5175 val
* var33
/* : nullable RopeNode */;
5176 long var34
/* : Int */;
5177 long var35
/* : Int */;
5178 long var37
/* : Int */;
5179 val
* var38
/* : nullable RopeNode */;
5180 long var39
/* : Int */;
5181 long var40
/* : Int */;
5182 long var41
/* : Int */;
5183 long var43
/* : Int */;
5184 long var44
/* : Int */;
5185 short int var45
/* : Bool */;
5186 short int var47
/* : Bool */;
5189 const char* var_class_name50
;
5190 short int var51
/* : Bool */;
5191 val
* var52
/* : nullable RopeNode */;
5192 long var53
/* : Int */;
5193 long var54
/* : Int */;
5194 long var55
/* : Int */;
5195 long var57
/* : Int */;
5197 ((void (*)(val
*, long))(self
->class->vft
[COLOR_ropes__RopeNode__length_61d
]))(self
, var
) /* length= on <self:ConcatNode>*/;
5199 ((void (*)(val
*, long))(self
->class->vft
[COLOR_ropes__RopeNode__height_61d
]))(self
, var1
) /* height= on <self:ConcatNode>*/;
5200 var2
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_ropes__ConcatNode__left_child
]))(self
) /* left_child on <self:ConcatNode>*/;
5203 var4
= 0; /* is null */
5205 var4
= 1; /* arg is null and recv is not */
5209 var5
= ((long (*)(val
*))(var_
->class->vft
[COLOR_ropes__RopeNode__length
]))(var_
) /* length on <var_:ConcatNode>*/;
5210 var6
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_ropes__ConcatNode__left_child
]))(self
) /* left_child on <self:ConcatNode>*/;
5212 fprintf(stderr
, "Runtime error: %s", "Reciever is null");
5213 fprintf(stderr
, " (%s:%d)\n", "lib/standard/ropes.nit", 1029);
5216 var7
= ((long (*)(val
*))(var6
->class->vft
[COLOR_ropes__RopeNode__length
]))(var6
) /* length on <var6:nullable RopeNode>*/;
5218 { /* Inline kernel#Int#+ (var5,var7) */
5219 var10
= var5
+ var7
;
5224 ((void (*)(val
*, long))(var_
->class->vft
[COLOR_ropes__RopeNode__length_61d
]))(var_
, var8
) /* length= on <var_:ConcatNode>*/;
5225 var11
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_ropes__ConcatNode__left_child
]))(self
) /* left_child on <self:ConcatNode>*/;
5226 if (var11
== NULL
) {
5227 fprintf(stderr
, "Runtime error: %s", "Reciever is null");
5228 fprintf(stderr
, " (%s:%d)\n", "lib/standard/ropes.nit", 1030);
5231 var12
= ((long (*)(val
*))(var11
->class->vft
[COLOR_ropes__RopeNode__height
]))(var11
) /* height on <var11:nullable RopeNode>*/;
5234 { /* Inline kernel#Int#+ (var12,var13) */
5235 var16
= var12
+ var13
;
5238 RET_LABEL15
:(void)0;
5240 var17
= ((long (*)(val
*))(self
->class->vft
[COLOR_ropes__RopeNode__height
]))(self
) /* height on <self:ConcatNode>*/;
5241 { /* Inline kernel#Int#> (var14,var17) */
5242 /* Covariant cast for argument 0 (i) <var17:Int> isa OTHER */
5243 /* <var17:Int> isa OTHER */
5244 var20
= 1; /* easy <var17:Int> isa OTHER*/
5246 var_class_name
= type_kernel__Int
.name
;
5247 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name
);
5248 fprintf(stderr
, " (%s:%d)\n", "lib/standard/kernel.nit", 263);
5251 var21
= var14
> var17
;
5254 RET_LABEL19
:(void)0;
5257 var22
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_ropes__ConcatNode__left_child
]))(self
) /* left_child on <self:ConcatNode>*/;
5258 if (var22
== NULL
) {
5259 fprintf(stderr
, "Runtime error: %s", "Reciever is null");
5260 fprintf(stderr
, " (%s:%d)\n", "lib/standard/ropes.nit", 1030);
5263 var23
= ((long (*)(val
*))(var22
->class->vft
[COLOR_ropes__RopeNode__height
]))(var22
) /* height on <var22:nullable RopeNode>*/;
5266 { /* Inline kernel#Int#+ (var23,var24) */
5267 var27
= var23
+ var24
;
5270 RET_LABEL26
:(void)0;
5272 ((void (*)(val
*, long))(self
->class->vft
[COLOR_ropes__RopeNode__height_61d
]))(self
, var25
) /* height= on <self:ConcatNode>*/;
5277 var28
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_ropes__ConcatNode__right_child
]))(self
) /* right_child on <self:ConcatNode>*/;
5279 if (var28
== NULL
) {
5280 var30
= 0; /* is null */
5282 var30
= 1; /* arg is null and recv is not */
5286 var32
= ((long (*)(val
*))(var_31
->class->vft
[COLOR_ropes__RopeNode__length
]))(var_31
) /* length on <var_31:ConcatNode>*/;
5287 var33
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_ropes__ConcatNode__right_child
]))(self
) /* right_child on <self:ConcatNode>*/;
5288 if (var33
== NULL
) {
5289 fprintf(stderr
, "Runtime error: %s", "Reciever is null");
5290 fprintf(stderr
, " (%s:%d)\n", "lib/standard/ropes.nit", 1033);
5293 var34
= ((long (*)(val
*))(var33
->class->vft
[COLOR_ropes__RopeNode__length
]))(var33
) /* length on <var33:nullable RopeNode>*/;
5295 { /* Inline kernel#Int#+ (var32,var34) */
5296 var37
= var32
+ var34
;
5299 RET_LABEL36
:(void)0;
5301 ((void (*)(val
*, long))(var_31
->class->vft
[COLOR_ropes__RopeNode__length_61d
]))(var_31
, var35
) /* length= on <var_31:ConcatNode>*/;
5302 var38
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_ropes__ConcatNode__right_child
]))(self
) /* right_child on <self:ConcatNode>*/;
5303 if (var38
== NULL
) {
5304 fprintf(stderr
, "Runtime error: %s", "Reciever is null");
5305 fprintf(stderr
, " (%s:%d)\n", "lib/standard/ropes.nit", 1034);
5308 var39
= ((long (*)(val
*))(var38
->class->vft
[COLOR_ropes__RopeNode__height
]))(var38
) /* height on <var38:nullable RopeNode>*/;
5311 { /* Inline kernel#Int#+ (var39,var40) */
5312 var43
= var39
+ var40
;
5315 RET_LABEL42
:(void)0;
5317 var44
= ((long (*)(val
*))(self
->class->vft
[COLOR_ropes__RopeNode__height
]))(self
) /* height on <self:ConcatNode>*/;
5318 { /* Inline kernel#Int#> (var41,var44) */
5319 /* Covariant cast for argument 0 (i) <var44:Int> isa OTHER */
5320 /* <var44:Int> isa OTHER */
5321 var47
= 1; /* easy <var44:Int> isa OTHER*/
5323 var_class_name50
= type_kernel__Int
.name
;
5324 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name50
);
5325 fprintf(stderr
, " (%s:%d)\n", "lib/standard/kernel.nit", 263);
5328 var51
= var41
> var44
;
5331 RET_LABEL46
:(void)0;
5334 var52
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_ropes__ConcatNode__right_child
]))(self
) /* right_child on <self:ConcatNode>*/;
5335 if (var52
== NULL
) {
5336 fprintf(stderr
, "Runtime error: %s", "Reciever is null");
5337 fprintf(stderr
, " (%s:%d)\n", "lib/standard/ropes.nit", 1034);
5340 var53
= ((long (*)(val
*))(var52
->class->vft
[COLOR_ropes__RopeNode__height
]))(var52
) /* height on <var52:nullable RopeNode>*/;
5343 { /* Inline kernel#Int#+ (var53,var54) */
5344 var57
= var53
+ var54
;
5347 RET_LABEL56
:(void)0;
5349 ((void (*)(val
*, long))(self
->class->vft
[COLOR_ropes__RopeNode__height_61d
]))(self
, var55
) /* height= on <self:ConcatNode>*/;
5356 /* method ropes#ConcatNode#update_data for (self: Object) */
5357 void VIRTUAL_ropes__ConcatNode__update_data(val
* self
) {
5358 ropes__ConcatNode__update_data(self
);
5361 /* method ropes#ConcatNode#balance_factor for (self: ConcatNode): Int */
5362 long ropes__ConcatNode__balance_factor(val
* self
) {
5363 long var
/* : Int */;
5364 long var1
/* : Int */;
5365 long var_left_height
/* var left_height: Int */;
5366 long var2
/* : Int */;
5367 long var_right_height
/* var right_height: Int */;
5368 val
* var3
/* : nullable RopeNode */;
5369 val
* var4
/* : null */;
5370 short int var5
/* : Bool */;
5371 val
* var6
/* : nullable RopeNode */;
5372 long var7
/* : Int */;
5373 val
* var8
/* : nullable RopeNode */;
5374 val
* var9
/* : null */;
5375 short int var10
/* : Bool */;
5376 val
* var11
/* : nullable RopeNode */;
5377 long var12
/* : Int */;
5378 long var13
/* : Int */;
5379 long var15
/* : Int */;
5381 var_left_height
= var1
;
5383 var_right_height
= var2
;
5384 var3
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_ropes__ConcatNode__left_child
]))(self
) /* left_child on <self:ConcatNode>*/;
5387 var5
= 0; /* is null */
5389 var5
= 1; /* arg is null and recv is not */
5392 var6
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_ropes__ConcatNode__left_child
]))(self
) /* left_child on <self:ConcatNode>*/;
5394 fprintf(stderr
, "Runtime error: %s", "Reciever is null");
5395 fprintf(stderr
, " (%s:%d)\n", "lib/standard/ropes.nit", 1045);
5398 var7
= ((long (*)(val
*))(var6
->class->vft
[COLOR_ropes__RopeNode__height
]))(var6
) /* height on <var6:nullable RopeNode>*/;
5400 var_left_height
= var7
;
5403 var8
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_ropes__ConcatNode__right_child
]))(self
) /* right_child on <self:ConcatNode>*/;
5406 var10
= 0; /* is null */
5408 var10
= 1; /* arg is null and recv is not */
5411 var11
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_ropes__ConcatNode__right_child
]))(self
) /* right_child on <self:ConcatNode>*/;
5412 if (var11
== NULL
) {
5413 fprintf(stderr
, "Runtime error: %s", "Reciever is null");
5414 fprintf(stderr
, " (%s:%d)\n", "lib/standard/ropes.nit", 1046);
5417 var12
= ((long (*)(val
*))(var11
->class->vft
[COLOR_ropes__RopeNode__height
]))(var11
) /* height on <var11:nullable RopeNode>*/;
5419 var_right_height
= var12
;
5422 { /* Inline kernel#Int#- (var_left_height,var_right_height) */
5423 var15
= var_left_height
- var_right_height
;
5426 RET_LABEL14
:(void)0;
5433 /* method ropes#ConcatNode#balance_factor for (self: Object): Int */
5434 long VIRTUAL_ropes__ConcatNode__balance_factor(val
* self
) {
5435 long var
/* : Int */;
5436 long var1
/* : Int */;
5437 var1
= ropes__ConcatNode__balance_factor(self
);
5442 /* method ropes#ConcatNode#init for (self: ConcatNode) */
5443 void ropes__ConcatNode__init(val
* self
) {
5444 ((void (*)(val
*))(self
->class->vft
[COLOR_ropes__RopeNode__init
]))(self
) /* init on <self:ConcatNode>*/;
5447 /* method ropes#ConcatNode#init for (self: Object) */
5448 void VIRTUAL_ropes__ConcatNode__init(val
* self
) {
5449 ropes__ConcatNode__init(self
);
5452 /* method ropes#LeafNode#init for (self: LeafNode, AbstractString) */
5453 void ropes__LeafNode__init(val
* self
, val
* p0
) {
5454 val
* var_val
/* var val: AbstractString */;
5455 val
* var
/* : String */;
5456 long var1
/* : Int */;
5458 ((void (*)(val
*))(self
->class->vft
[COLOR_ropes__RopeNode__init
]))(self
) /* init on <self:LeafNode>*/;
5459 var
= ((val
* (*)(val
*))(var_val
->class->vft
[COLOR_string__Object__to_s
]))(var_val
) /* to_s on <var_val:AbstractString>*/;
5460 self
->attrs
[COLOR_ropes__LeafNode___value
].val
= var
; /* _value on <self:LeafNode> */
5461 var1
= ((long (*)(val
*))(var_val
->class->vft
[COLOR_abstract_collection__Collection__length
]))(var_val
) /* length on <var_val:AbstractString>*/;
5462 ((void (*)(val
*, long))(self
->class->vft
[COLOR_ropes__RopeNode__length_61d
]))(self
, var1
) /* length= on <self:LeafNode>*/;
5465 /* method ropes#LeafNode#init for (self: Object, AbstractString) */
5466 void VIRTUAL_ropes__LeafNode__init(val
* self
, val
* p0
) {
5467 ropes__LeafNode__init(self
, p0
);
5470 /* method ropes#LeafNode#value for (self: LeafNode): String */
5471 val
* ropes__LeafNode__value(val
* self
) {
5472 val
* var
/* : String */;
5473 val
* var1
/* : String */;
5474 var1
= self
->attrs
[COLOR_ropes__LeafNode___value
].val
; /* _value on <self:LeafNode> */
5476 fprintf(stderr
, "Runtime error: %s", "Uninitialized attribute _value");
5477 fprintf(stderr
, " (%s:%d)\n", "lib/standard/ropes.nit", 1064);
5485 /* method ropes#LeafNode#value for (self: Object): String */
5486 val
* VIRTUAL_ropes__LeafNode__value(val
* self
) {
5487 val
* var
/* : String */;
5488 val
* var1
/* : String */;
5489 var1
= ropes__LeafNode__value(self
);
5494 /* method ropes#LeafNode#value= for (self: LeafNode, String) */
5495 void ropes__LeafNode__value_61d(val
* self
, val
* p0
) {
5496 val
* var_val
/* var val: String */;
5498 self
->attrs
[COLOR_ropes__LeafNode___value
].val
= var_val
; /* _value on <self:LeafNode> */
5501 /* method ropes#LeafNode#value= for (self: Object, String) */
5502 void VIRTUAL_ropes__LeafNode__value_61d(val
* self
, val
* p0
) {
5503 ropes__LeafNode__value_61d(self
, p0
);
5506 /* method ropes#String#== for (self: String, nullable Object): Bool */
5507 short int ropes__String___61d_61d(val
* self
, val
* p0
) {
5508 short int var
/* : Bool */;
5509 val
* var_other
/* var other: nullable Object */;
5510 short int var1
/* : Bool */;
5513 short int var2
/* : Bool */;
5514 short int var3
/* : Bool */;
5516 /* <var_other:nullable Object> isa Rope */
5517 cltype
= type_ropes__Rope
.color
;
5518 idtype
= type_ropes__Rope
.id
;
5519 if(var_other
== NULL
) {
5522 if(cltype
>= var_other
->type
->table_size
) {
5525 var1
= var_other
->type
->type_table
[cltype
] == idtype
;
5529 var2
= ((short int (*)(val
*, val
*))(var_other
->class->vft
[COLOR_kernel__Object___61d_61d
]))(var_other
, self
) /* == on <var_other:nullable Object(Rope)>*/;
5533 var3
= ((short int (*)(val
*, val
*))(self
->class->vft
[COLOR_ropes__String___61d_61d
]))(self
, p0
) /* == on <self:String>*/;
5540 /* method ropes#String#== for (self: Object, nullable Object): Bool */
5541 short int VIRTUAL_ropes__String___61d_61d(val
* self
, val
* p0
) {
5542 short int var
/* : Bool */;
5543 short int var1
/* : Bool */;
5544 var1
= ropes__String___61d_61d(self
, p0
);
5549 /* method ropes#Buffer#== for (self: Buffer, nullable Object): Bool */
5550 short int ropes__Buffer___61d_61d(val
* self
, val
* p0
) {
5551 short int var
/* : Bool */;
5552 val
* var_other
/* var other: nullable Object */;
5553 short int var1
/* : Bool */;
5556 short int var2
/* : Bool */;
5557 short int var3
/* : Bool */;
5559 /* <var_other:nullable Object> isa Rope */
5560 cltype
= type_ropes__Rope
.color
;
5561 idtype
= type_ropes__Rope
.id
;
5562 if(var_other
== NULL
) {
5565 if(cltype
>= var_other
->type
->table_size
) {
5568 var1
= var_other
->type
->type_table
[cltype
] == idtype
;
5572 var2
= ((short int (*)(val
*, val
*))(var_other
->class->vft
[COLOR_kernel__Object___61d_61d
]))(var_other
, self
) /* == on <var_other:nullable Object(Rope)>*/;
5576 var3
= ((short int (*)(val
*, val
*))(self
->class->vft
[COLOR_ropes__Buffer___61d_61d
]))(self
, p0
) /* == on <self:Buffer>*/;
5583 /* method ropes#Buffer#== for (self: Object, nullable Object): Bool */
5584 short int VIRTUAL_ropes__Buffer___61d_61d(val
* self
, val
* p0
) {
5585 short int var
/* : Bool */;
5586 short int var1
/* : Bool */;
5587 var1
= ropes__Buffer___61d_61d(self
, p0
);