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 CHECK_NEW_ropes__ConcatNode(var
);
175 ((void (*)(val
*, val
*))(self
->class->vft
[COLOR_ropes__Rope__parent_node_61d
]))(self
, var
) /* parent_node= on <self:Rope>*/;
178 /* method ropes#Rope#init for (self: Object) */
179 void VIRTUAL_ropes__Rope__init(val
* self
) {
180 ropes__Rope__init(self
);
183 /* method ropes#Rope#with_string for (self: Rope, AbstractString) */
184 void ropes__Rope__with_string(val
* self
, val
* p0
) {
185 val
* var_str
/* var str: AbstractString */;
186 val
* var
/* : ConcatNode */;
187 val
* var1
/* : RopeNode */;
188 short int var2
/* : Bool */;
191 const char* var_class_name
;
192 val
* var3
/* : LeafNode */;
193 val
* var4
/* : RopeNode */;
194 short int var5
/* : Bool */;
197 const char* var_class_name8
;
199 var
= NEW_ropes__ConcatNode(&type_ropes__ConcatNode
);
200 ((void (*)(val
*))(var
->class->vft
[COLOR_ropes__ConcatNode__init
]))(var
) /* init on <var:ConcatNode>*/;
201 CHECK_NEW_ropes__ConcatNode(var
);
202 ((void (*)(val
*, val
*))(self
->class->vft
[COLOR_ropes__Rope__parent_node_61d
]))(self
, var
) /* parent_node= on <self:Rope>*/;
203 var1
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_ropes__Rope__parent_node
]))(self
) /* parent_node on <self:Rope>*/;
204 /* <var1:RopeNode> isa ConcatNode */
205 cltype
= type_ropes__ConcatNode
.color
;
206 idtype
= type_ropes__ConcatNode
.id
;
207 if(cltype
>= var1
->type
->table_size
) {
210 var2
= var1
->type
->type_table
[cltype
] == idtype
;
213 var_class_name
= var1
== NULL ?
"null" : var1
->type
->name
;
214 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "ConcatNode", var_class_name
);
215 fprintf(stderr
, " (%s:%d)\n", "lib/standard/ropes.nit", 50);
218 var3
= NEW_ropes__LeafNode(&type_ropes__LeafNode
);
219 ((void (*)(val
*, val
*))(var3
->class->vft
[COLOR_ropes__LeafNode__init
]))(var3
, var_str
) /* init on <var3:LeafNode>*/;
220 CHECK_NEW_ropes__LeafNode(var3
);
221 ((void (*)(val
*, val
*))(var1
->class->vft
[COLOR_ropes__ConcatNode__right_child_61d
]))(var1
, var3
) /* right_child= on <var1:RopeNode(ConcatNode)>*/;
222 var4
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_ropes__Rope__parent_node
]))(self
) /* parent_node on <self:Rope>*/;
223 /* <var4:RopeNode> isa ConcatNode */
224 cltype6
= type_ropes__ConcatNode
.color
;
225 idtype7
= type_ropes__ConcatNode
.id
;
226 if(cltype6
>= var4
->type
->table_size
) {
229 var5
= var4
->type
->type_table
[cltype6
] == idtype7
;
232 var_class_name8
= var4
== NULL ?
"null" : var4
->type
->name
;
233 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "ConcatNode", var_class_name8
);
234 fprintf(stderr
, " (%s:%d)\n", "lib/standard/ropes.nit", 51);
237 ((void (*)(val
*))(var4
->class->vft
[COLOR_ropes__ConcatNode__update_data
]))(var4
) /* update_data on <var4:RopeNode(ConcatNode)>*/;
240 /* method ropes#Rope#with_string for (self: Object, AbstractString) */
241 void VIRTUAL_ropes__Rope__with_string(val
* self
, val
* p0
) {
242 ropes__Rope__with_string(self
, p0
);
245 /* method ropes#Rope#chars for (self: Rope): SequenceRead[Char] */
246 val
* ropes__Rope__chars(val
* self
) {
247 val
* var
/* : SequenceRead[Char] */;
248 val
* var1
/* : CharRopeView */;
249 var1
= NEW_ropes__CharRopeView(&type_ropes__CharRopeView
);
250 ((void (*)(val
*, val
*))(var1
->class->vft
[COLOR_ropes__CharRopeView__init
]))(var1
, self
) /* init on <var1:CharRopeView>*/;
251 CHECK_NEW_ropes__CharRopeView(var1
);
257 /* method ropes#Rope#chars for (self: Object): SequenceRead[Char] */
258 val
* VIRTUAL_ropes__Rope__chars(val
* self
) {
259 val
* var
/* : SequenceRead[Char] */;
260 val
* var1
/* : SequenceRead[Char] */;
261 var1
= ropes__Rope__chars(self
);
266 /* method ropes#Rope#length for (self: Rope): Int */
267 long ropes__Rope__length(val
* self
) {
268 long var
/* : Int */;
269 val
* var1
/* : RopeNode */;
270 long var2
/* : Int */;
271 var1
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_ropes__Rope__parent_node
]))(self
) /* parent_node on <self:Rope>*/;
272 var2
= ((long (*)(val
*))(var1
->class->vft
[COLOR_ropes__RopeNode__length
]))(var1
) /* length on <var1:RopeNode>*/;
278 /* method ropes#Rope#length for (self: Object): Int */
279 long VIRTUAL_ropes__Rope__length(val
* self
) {
280 long var
/* : Int */;
281 long var1
/* : Int */;
282 var1
= ropes__Rope__length(self
);
287 /* method ropes#Rope#to_s for (self: Rope): String */
288 val
* ropes__Rope__to_s(val
* self
) {
289 val
* var
/* : String */;
290 val
* var1
/* : nullable String */;
291 val
* var2
/* : null */;
292 short int var3
/* : Bool */;
293 val
* var4
/* : String */;
294 val
* var5
/* : nullable String */;
295 var1
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_ropes__Rope__str_representation
]))(self
) /* str_representation on <self:Rope>*/;
298 var3
= 1; /* is null */
300 var3
= 0; /* arg is null but recv is not */
303 var4
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_ropes__Rope__flatten
]))(self
) /* flatten on <self:Rope>*/;
307 var5
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_ropes__Rope__str_representation
]))(self
) /* str_representation on <self:Rope>*/;
309 fprintf(stderr
, "Runtime error: %s", "Cast failed");
310 fprintf(stderr
, " (%s:%d)\n", "lib/standard/ropes.nit", 70);
318 /* method ropes#Rope#to_s for (self: Object): String */
319 val
* VIRTUAL_ropes__Rope__to_s(val
* self
) {
320 val
* var
/* : String */;
321 val
* var1
/* : String */;
322 var1
= ropes__Rope__to_s(self
);
327 /* method ropes#Rope#flatten for (self: Rope): String */
328 val
* ropes__Rope__flatten(val
* self
) {
329 val
* var
/* : String */;
330 long var1
/* : Int */;
331 long var2
/* : Int */;
332 long var3
/* : Int */;
333 long var5
/* : Int */;
334 char* var6
/* : NativeString */;
335 char* var_native_final_str
/* var native_final_str: NativeString */;
336 long var7
/* : Int */;
337 char var8
/* : Char */;
338 long var10
/* : Int */;
339 long var_offset
/* var offset: Int */;
340 val
* var11
/* : DFSRopeLeafIterator */;
341 val
* var_iter
/* var iter: DFSRopeLeafIterator */;
342 short int var12
/* : Bool */;
343 val
* var13
/* : nullable Object */;
344 val
* var14
/* : String */;
345 char* var15
/* : NativeString */;
346 val
* var16
/* : nullable Object */;
347 val
* var17
/* : String */;
348 long var18
/* : Int */;
349 long var19
/* : Int */;
350 val
* var21
/* : nullable Object */;
351 val
* var22
/* : String */;
352 long var23
/* : Int */;
353 long var24
/* : Int */;
354 long var26
/* : Int */;
355 long var27
/* : Int */;
356 val
* var28
/* : String */;
357 var1
= ((long (*)(val
*))(self
->class->vft
[COLOR_ropes__Rope__length
]))(self
) /* length on <self:Rope>*/;
359 { /* Inline kernel#Int#+ (var1,var2) */
365 var6
= ((char* (*)(val
*, long))(self
->class->vft
[COLOR_string__StringCapable__calloc_string
]))(self
, var3
) /* calloc_string on <self:Rope>*/;
366 var_native_final_str
= var6
;
367 var7
= ((long (*)(val
*))(self
->class->vft
[COLOR_ropes__Rope__length
]))(self
) /* length on <self:Rope>*/;
369 { /* Inline string#NativeString#[]= (var_native_final_str,var7,var8) */
370 var_native_final_str
[var7
]=var8
;
375 var11
= NEW_ropes__DFSRopeLeafIterator(&type_ropes__DFSRopeLeafIterator
);
376 ((void (*)(val
*, val
*))(var11
->class->vft
[COLOR_ropes__DFSRopeLeafIterator__init
]))(var11
, self
) /* init on <var11:DFSRopeLeafIterator>*/;
377 CHECK_NEW_ropes__DFSRopeLeafIterator(var11
);
380 var12
= ((short int (*)(val
*))(var_iter
->class->vft
[COLOR_abstract_collection__Iterator__is_ok
]))(var_iter
) /* is_ok on <var_iter:DFSRopeLeafIterator>*/;
382 var13
= ((val
* (*)(val
*))(var_iter
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var_iter
) /* item on <var_iter:DFSRopeLeafIterator>*/;
383 var14
= ((val
* (*)(val
*))(var13
->class->vft
[COLOR_ropes__LeafNode__value
]))(var13
) /* value on <var13:nullable Object(LeafNode)>*/;
384 var15
= var14
->attrs
[COLOR_string__AbstractString___items
].str
; /* _items on <var14:String> */
385 var16
= ((val
* (*)(val
*))(var_iter
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var_iter
) /* item on <var_iter:DFSRopeLeafIterator>*/;
386 var17
= ((val
* (*)(val
*))(var16
->class->vft
[COLOR_ropes__LeafNode__value
]))(var16
) /* value on <var16:nullable Object(LeafNode)>*/;
387 var18
= ((long (*)(val
*))(var17
->class->vft
[COLOR_abstract_collection__Collection__length
]))(var17
) /* length on <var17:String>*/;
389 { /* Inline string#NativeString#copy_to (var15,var_native_final_str,var18,var19,var_offset) */
390 memcpy(var_native_final_str
+var_offset
,var15
+var19
,var18
);
393 var21
= ((val
* (*)(val
*))(var_iter
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var_iter
) /* item on <var_iter:DFSRopeLeafIterator>*/;
394 var22
= ((val
* (*)(val
*))(var21
->class->vft
[COLOR_ropes__LeafNode__value
]))(var21
) /* value on <var21:nullable Object(LeafNode)>*/;
395 var23
= ((long (*)(val
*))(var22
->class->vft
[COLOR_abstract_collection__Collection__length
]))(var22
) /* length on <var22:String>*/;
396 { /* Inline kernel#Int#+ (var_offset,var23) */
397 var26
= var_offset
+ var23
;
403 ((void (*)(val
*))(var_iter
->class->vft
[COLOR_abstract_collection__Iterator__next
]))(var_iter
) /* next on <var_iter:DFSRopeLeafIterator>*/;
404 CONTINUE_label
: (void)0;
406 BREAK_label
: (void)0;
407 var27
= ((long (*)(val
*))(self
->class->vft
[COLOR_ropes__Rope__length
]))(self
) /* length on <self:Rope>*/;
408 var28
= string__NativeString__to_s_with_length(var_native_final_str
, var27
);
414 /* method ropes#Rope#flatten for (self: Object): String */
415 val
* VIRTUAL_ropes__Rope__flatten(val
* self
) {
416 val
* var
/* : String */;
417 val
* var1
/* : String */;
418 var1
= ropes__Rope__flatten(self
);
423 /* method ropes#Rope#get_node_for_pos for (self: Rope, Int): TupleLeafNodePos */
424 val
* ropes__Rope__get_node_for_pos(val
* self
, long p0
) {
425 val
* var
/* : TupleLeafNodePos */;
426 long var_position
/* var position: Int */;
427 short int var1
/* : Bool */;
428 long var2
/* : Int */;
429 short int var3
/* : Bool */;
430 short int var5
/* : Bool */;
433 const char* var_class_name
;
434 short int var6
/* : Bool */;
435 short int var_
/* var : Bool */;
436 long var7
/* : Int */;
437 short int var8
/* : Bool */;
438 short int var10
/* : Bool */;
441 const char* var_class_name13
;
442 short int var14
/* : Bool */;
443 val
* var15
/* : RopeNode */;
444 val
* var_curr_node
/* var curr_node: nullable RopeNode */;
445 val
* var16
/* : List[TupleVisitNode] */;
446 val
* var_visit_stack
/* var visit_stack: List[TupleVisitNode] */;
447 short int var17
/* : Bool */;
450 val
* var20
/* : TupleVisitNode */;
451 val
* var_curr_visit_tuple
/* var curr_visit_tuple: TupleVisitNode */;
452 short int var21
/* : Bool */;
453 val
* var22
/* : nullable RopeNode */;
454 val
* var23
/* : null */;
455 short int var24
/* : Bool */;
456 val
* var25
/* : nullable RopeNode */;
457 long var26
/* : Int */;
458 short int var27
/* : Bool */;
459 short int var29
/* : Bool */;
462 const char* var_class_name32
;
463 short int var33
/* : Bool */;
464 short int var34
/* : Bool */;
465 val
* var35
/* : nullable RopeNode */;
466 val
* var36
/* : nullable RopeNode */;
467 val
* var37
/* : null */;
468 short int var38
/* : Bool */;
469 short int var39
/* : Bool */;
470 short int var40
/* : Bool */;
471 val
* var41
/* : nullable RopeNode */;
472 val
* var42
/* : null */;
473 short int var43
/* : Bool */;
474 val
* var44
/* : nullable RopeNode */;
475 long var45
/* : Int */;
476 long var46
/* : Int */;
477 long var48
/* : Int */;
478 val
* var49
/* : nullable RopeNode */;
480 val
* var50
/* : String */;
481 char* var51
/* : NativeString */;
482 long var52
/* : Int */;
483 val
* var53
/* : String */;
484 short int var54
/* : Bool */;
487 val
* var57
/* : TupleLeafNodePos */;
490 { /* Inline kernel#Int#>= (var_position,var2) */
491 /* Covariant cast for argument 0 (i) <var2:Int> isa OTHER */
492 /* <var2:Int> isa OTHER */
493 var5
= 1; /* easy <var2:Int> isa OTHER*/
495 var_class_name
= type_kernel__Int
.name
;
496 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name
);
497 fprintf(stderr
, " (%s:%d)\n", "lib/standard/kernel.nit", 262);
500 var6
= var_position
>= var2
;
507 var7
= ((long (*)(val
*))(self
->class->vft
[COLOR_ropes__Rope__length
]))(self
) /* length on <self:Rope>*/;
508 { /* Inline kernel#Int#< (var_position,var7) */
509 /* Covariant cast for argument 0 (i) <var7:Int> isa OTHER */
510 /* <var7:Int> isa OTHER */
511 var10
= 1; /* easy <var7:Int> isa OTHER*/
513 var_class_name13
= type_kernel__Int
.name
;
514 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name13
);
515 fprintf(stderr
, " (%s:%d)\n", "lib/standard/kernel.nit", 261);
518 var14
= var_position
< var7
;
528 fprintf(stderr
, "Runtime error: %s", "Assert failed");
529 fprintf(stderr
, " (%s:%d)\n", "lib/standard/ropes.nit", 96);
532 var15
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_ropes__Rope__parent_node
]))(self
) /* parent_node on <self:Rope>*/;
533 var_curr_node
= var15
;
534 var16
= NEW_list__List(&type_list__Listropes__TupleVisitNode
);
535 ((void (*)(val
*))(var16
->class->vft
[COLOR_list__List__init
]))(var16
) /* init on <var16:List[TupleVisitNode]>*/;
536 CHECK_NEW_list__List(var16
);
537 var_visit_stack
= var16
;
539 /* <var_curr_node:nullable RopeNode> isa ConcatNode */
540 cltype18
= type_ropes__ConcatNode
.color
;
541 idtype19
= type_ropes__ConcatNode
.id
;
542 if(var_curr_node
== NULL
) {
545 if(cltype18
>= var_curr_node
->type
->table_size
) {
548 var17
= var_curr_node
->type
->type_table
[cltype18
] == idtype19
;
552 var20
= NEW_ropes__TupleVisitNode(&type_ropes__TupleVisitNode
);
553 ((void (*)(val
*, val
*))(var20
->class->vft
[COLOR_ropes__TupleVisitNode__init
]))(var20
, var_curr_node
) /* init on <var20:TupleVisitNode>*/;
554 CHECK_NEW_ropes__TupleVisitNode(var20
);
555 var_curr_visit_tuple
= var20
;
556 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)>*/;
559 var24
= 0; /* is null */
561 var24
= 1; /* arg is null and recv is not */
566 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)>*/;
568 fprintf(stderr
, "Runtime error: %s", "Reciever is null");
569 fprintf(stderr
, " (%s:%d)\n", "lib/standard/ropes.nit", 107);
572 var26
= ((long (*)(val
*))(var25
->class->vft
[COLOR_ropes__RopeNode__length
]))(var25
) /* length on <var25:nullable RopeNode>*/;
574 { /* Inline kernel#Int#< (var_position,var26) */
575 /* Covariant cast for argument 0 (i) <var26:Int> isa OTHER */
576 /* <var26:Int> isa OTHER */
577 var29
= 1; /* easy <var26:Int> isa OTHER*/
579 var_class_name32
= type_kernel__Int
.name
;
580 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name32
);
581 fprintf(stderr
, " (%s:%d)\n", "lib/standard/kernel.nit", 261);
584 var33
= var_position
< var26
;
593 ((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>*/;
594 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)>*/;
595 var_curr_node
= var35
;
597 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)>*/;
600 var38
= 0; /* is null */
602 var38
= 1; /* arg is null and recv is not */
606 ((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>*/;
608 ((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>*/;
609 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)>*/;
612 var43
= 0; /* is null */
614 var43
= 1; /* arg is null and recv is not */
617 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)>*/;
619 fprintf(stderr
, "Runtime error: %s", "Reciever is null");
620 fprintf(stderr
, " (%s:%d)\n", "lib/standard/ropes.nit", 113);
623 var45
= ((long (*)(val
*))(var44
->class->vft
[COLOR_ropes__RopeNode__length
]))(var44
) /* length on <var44:nullable RopeNode>*/;
625 { /* Inline kernel#Int#- (var_position,var45) */
626 var48
= var_position
- var45
;
631 var_position
= var46
;
634 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)>*/;
635 var_curr_node
= var49
;
640 var51
= "Fatal Error";
642 var53
= string__NativeString__to_s_with_length(var51
, var52
);
646 ((void (*)(val
*, val
*))(self
->class->vft
[COLOR_file__Object__print
]))(self
, var50
) /* print on <self:Rope>*/;
647 fprintf(stderr
, "Runtime error: %s", "Aborted");
648 fprintf(stderr
, " (%s:%d)\n", "lib/standard/ropes.nit", 117);
652 ((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]>*/;
654 /* <var_curr_node:nullable RopeNode> isa LeafNode */
655 cltype55
= type_ropes__LeafNode
.color
;
656 idtype56
= type_ropes__LeafNode
.id
;
657 if(var_curr_node
== NULL
) {
660 if(cltype55
>= var_curr_node
->type
->table_size
) {
663 var54
= var_curr_node
->type
->type_table
[cltype55
] == idtype56
;
667 var57
= NEW_ropes__TupleLeafNodePos(&type_ropes__TupleLeafNodePos
);
668 ((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>*/;
669 CHECK_NEW_ropes__TupleLeafNodePos(var57
);
675 CONTINUE_label
: (void)0;
677 BREAK_label
: (void)0;
681 /* method ropes#Rope#get_node_for_pos for (self: Object, Int): TupleLeafNodePos */
682 val
* VIRTUAL_ropes__Rope__get_node_for_pos(val
* self
, long p0
) {
683 val
* var
/* : TupleLeafNodePos */;
684 val
* var1
/* : TupleLeafNodePos */;
685 var1
= ropes__Rope__get_node_for_pos(self
, p0
);
690 /* method ropes#Rope#+ for (self: Rope, Rope): Rope */
691 val
* ropes__Rope___43d(val
* self
, val
* p0
) {
692 val
* var
/* : Rope */;
693 val
* var_other
/* var other: Rope */;
694 val
* var1
/* : BufferRope */;
695 val
* var_new_rope
/* var new_rope: BufferRope */;
696 val
* var2
/* : DFSRopeLeafIterator */;
697 val
* var_first_iter
/* var first_iter: DFSRopeLeafIterator */;
698 short int var3
/* : Bool */;
699 val
* var4
/* : nullable Object */;
700 val
* var5
/* : String */;
701 val
* var6
/* : BufferRope */;
702 val
* var7
/* : DFSRopeLeafIterator */;
703 val
* var_second_iter
/* var second_iter: DFSRopeLeafIterator */;
704 short int var8
/* : Bool */;
705 val
* var9
/* : nullable Object */;
706 val
* var10
/* : String */;
707 val
* var11
/* : BufferRope */;
709 var1
= NEW_ropes__BufferRope(&type_ropes__BufferRope
);
710 ((void (*)(val
*))(var1
->class->vft
[COLOR_ropes__BufferRope__init
]))(var1
) /* init on <var1:BufferRope>*/;
711 CHECK_NEW_ropes__BufferRope(var1
);
713 var2
= NEW_ropes__DFSRopeLeafIterator(&type_ropes__DFSRopeLeafIterator
);
714 ((void (*)(val
*, val
*))(var2
->class->vft
[COLOR_ropes__DFSRopeLeafIterator__init
]))(var2
, self
) /* init on <var2:DFSRopeLeafIterator>*/;
715 CHECK_NEW_ropes__DFSRopeLeafIterator(var2
);
716 var_first_iter
= var2
;
718 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>*/;
720 var4
= ((val
* (*)(val
*))(var_first_iter
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var_first_iter
) /* item on <var_first_iter:DFSRopeLeafIterator>*/;
721 var5
= ((val
* (*)(val
*))(var4
->class->vft
[COLOR_ropes__LeafNode__value
]))(var4
) /* value on <var4:nullable Object(LeafNode)>*/;
722 var6
= ((val
* (*)(val
*, val
*))(var_new_rope
->class->vft
[COLOR_ropes__BufferRope__append
]))(var_new_rope
, var5
) /* append on <var_new_rope:BufferRope>*/;
724 ((void (*)(val
*))(var_first_iter
->class->vft
[COLOR_abstract_collection__Iterator__next
]))(var_first_iter
) /* next on <var_first_iter:DFSRopeLeafIterator>*/;
725 CONTINUE_label
: (void)0;
727 BREAK_label
: (void)0;
728 var7
= NEW_ropes__DFSRopeLeafIterator(&type_ropes__DFSRopeLeafIterator
);
729 ((void (*)(val
*, val
*))(var7
->class->vft
[COLOR_ropes__DFSRopeLeafIterator__init
]))(var7
, var_other
) /* init on <var7:DFSRopeLeafIterator>*/;
730 CHECK_NEW_ropes__DFSRopeLeafIterator(var7
);
731 var_second_iter
= var7
;
733 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>*/;
735 var9
= ((val
* (*)(val
*))(var_second_iter
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var_second_iter
) /* item on <var_second_iter:DFSRopeLeafIterator>*/;
736 var10
= ((val
* (*)(val
*))(var9
->class->vft
[COLOR_ropes__LeafNode__value
]))(var9
) /* value on <var9:nullable Object(LeafNode)>*/;
737 var11
= ((val
* (*)(val
*, val
*))(var_new_rope
->class->vft
[COLOR_ropes__BufferRope__append
]))(var_new_rope
, var10
) /* append on <var_new_rope:BufferRope>*/;
739 ((void (*)(val
*))(var_second_iter
->class->vft
[COLOR_abstract_collection__Iterator__next
]))(var_second_iter
) /* next on <var_second_iter:DFSRopeLeafIterator>*/;
740 CONTINUE_label12
: (void)0;
742 BREAK_label12
: (void)0;
748 /* method ropes#Rope#+ for (self: Object, Rope): Rope */
749 val
* VIRTUAL_ropes__Rope___43d(val
* self
, val
* p0
) {
750 val
* var
/* : Rope */;
751 val
* var1
/* : Rope */;
752 var1
= ropes__Rope___43d(self
, p0
);
757 /* method ropes#Rope#multi_concat for (self: Rope, Array[Rope]): Rope */
758 val
* ropes__Rope__multi_concat(val
* self
, val
* p0
) {
759 val
* var
/* : Rope */;
760 val
* var_ropes
/* var ropes: Array[Rope] */;
761 val
* var1
/* : BufferRope */;
762 val
* var_new_rope
/* var new_rope: BufferRope */;
763 val
* var2
/* : Iterator[LeafNode] */;
764 val
* var_self_iter
/* var self_iter: Iterator[LeafNode] */;
765 short int var3
/* : Bool */;
766 val
* var4
/* : nullable Object */;
767 val
* var5
/* : String */;
768 val
* var6
/* : BufferRope */;
769 val
* var7
/* : Iterator[nullable Object] */;
770 short int var8
/* : Bool */;
771 val
* var9
/* : nullable Object */;
772 val
* var_i
/* var i: Rope */;
773 val
* var10
/* : Iterator[LeafNode] */;
774 val
* var_iter
/* var iter: Iterator[LeafNode] */;
775 short int var11
/* : Bool */;
776 val
* var12
/* : nullable Object */;
777 val
* var13
/* : String */;
778 val
* var14
/* : BufferRope */;
780 var1
= NEW_ropes__BufferRope(&type_ropes__BufferRope
);
781 ((void (*)(val
*))(var1
->class->vft
[COLOR_ropes__BufferRope__init
]))(var1
) /* init on <var1:BufferRope>*/;
782 CHECK_NEW_ropes__BufferRope(var1
);
784 var2
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_ropes__Rope__iterator
]))(self
) /* iterator on <self:Rope>*/;
785 var_self_iter
= var2
;
787 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]>*/;
789 var4
= ((val
* (*)(val
*))(var_self_iter
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var_self_iter
) /* item on <var_self_iter:Iterator[LeafNode]>*/;
790 var5
= ((val
* (*)(val
*))(var4
->class->vft
[COLOR_ropes__LeafNode__value
]))(var4
) /* value on <var4:nullable Object(LeafNode)>*/;
791 var6
= ((val
* (*)(val
*, val
*))(var_new_rope
->class->vft
[COLOR_ropes__BufferRope__append
]))(var_new_rope
, var5
) /* append on <var_new_rope:BufferRope>*/;
793 ((void (*)(val
*))(var_self_iter
->class->vft
[COLOR_abstract_collection__Iterator__next
]))(var_self_iter
) /* next on <var_self_iter:Iterator[LeafNode]>*/;
794 CONTINUE_label
: (void)0;
796 BREAK_label
: (void)0;
797 var7
= ((val
* (*)(val
*))(var_ropes
->class->vft
[COLOR_abstract_collection__Collection__iterator
]))(var_ropes
) /* iterator on <var_ropes:Array[Rope]>*/;
799 var8
= ((short int (*)(val
*))(var7
->class->vft
[COLOR_abstract_collection__Iterator__is_ok
]))(var7
) /* is_ok on <var7:Iterator[nullable Object]>*/;
801 var9
= ((val
* (*)(val
*))(var7
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var7
) /* item on <var7:Iterator[nullable Object]>*/;
803 var10
= ((val
* (*)(val
*))(var_i
->class->vft
[COLOR_ropes__Rope__iterator
]))(var_i
) /* iterator on <var_i:Rope>*/;
806 var11
= ((short int (*)(val
*))(var_iter
->class->vft
[COLOR_abstract_collection__Iterator__is_ok
]))(var_iter
) /* is_ok on <var_iter:Iterator[LeafNode]>*/;
808 var12
= ((val
* (*)(val
*))(var_iter
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var_iter
) /* item on <var_iter:Iterator[LeafNode]>*/;
809 var13
= ((val
* (*)(val
*))(var12
->class->vft
[COLOR_ropes__LeafNode__value
]))(var12
) /* value on <var12:nullable Object(LeafNode)>*/;
810 var14
= ((val
* (*)(val
*, val
*))(var_new_rope
->class->vft
[COLOR_ropes__BufferRope__append
]))(var_new_rope
, var13
) /* append on <var_new_rope:BufferRope>*/;
812 ((void (*)(val
*))(var_iter
->class->vft
[COLOR_abstract_collection__Iterator__next
]))(var_iter
) /* next on <var_iter:Iterator[LeafNode]>*/;
813 CONTINUE_label15
: (void)0;
815 BREAK_label15
: (void)0;
816 CONTINUE_label16
: (void)0;
817 ((void (*)(val
*))(var7
->class->vft
[COLOR_abstract_collection__Iterator__next
]))(var7
) /* next on <var7:Iterator[nullable Object]>*/;
819 BREAK_label16
: (void)0;
825 /* method ropes#Rope#multi_concat for (self: Object, Array[Rope]): Rope */
826 val
* VIRTUAL_ropes__Rope__multi_concat(val
* self
, val
* p0
) {
827 val
* var
/* : Rope */;
828 val
* var1
/* : Rope */;
829 var1
= ropes__Rope__multi_concat(self
, p0
);
834 /* method ropes#Rope#* for (self: Rope, Int): Rope */
835 val
* ropes__Rope___42d(val
* self
, long p0
) {
836 val
* var
/* : Rope */;
837 long var_repeats
/* var repeats: Int */;
838 val
* var1
/* : BufferRope */;
839 val
* var_new_rope
/* var new_rope: BufferRope */;
840 val
* var2
/* : String */;
841 val
* var_str
/* var str: String */;
842 val
* var3
/* : Range[Int] */;
843 long var4
/* : Int */;
844 val
* var5
/* : Discrete */;
845 val
* var6
/* : Discrete */;
846 val
* var7
/* : Iterator[nullable Object] */;
847 short int var8
/* : Bool */;
848 val
* var9
/* : nullable Object */;
849 long var_i
/* var i: Int */;
850 long var10
/* : Int */;
851 val
* var11
/* : BufferRope */;
853 var1
= NEW_ropes__BufferRope(&type_ropes__BufferRope
);
854 ((void (*)(val
*))(var1
->class->vft
[COLOR_ropes__BufferRope__init
]))(var1
) /* init on <var1:BufferRope>*/;
855 CHECK_NEW_ropes__BufferRope(var1
);
857 var2
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_string__Object__to_s
]))(self
) /* to_s on <self:Rope>*/;
859 var3
= NEW_range__Range(&type_range__Rangekernel__Int
);
861 var5
= BOX_kernel__Int(var4
); /* autobox from Int to Discrete */
862 var6
= BOX_kernel__Int(var_repeats
); /* autobox from Int to Discrete */
863 ((void (*)(val
*, val
*, val
*))(var3
->class->vft
[COLOR_range__Range__init
]))(var3
, var5
, var6
) /* init on <var3:Range[Int]>*/;
864 CHECK_NEW_range__Range(var3
);
865 var7
= ((val
* (*)(val
*))(var3
->class->vft
[COLOR_abstract_collection__Collection__iterator
]))(var3
) /* iterator on <var3:Range[Int]>*/;
867 var8
= ((short int (*)(val
*))(var7
->class->vft
[COLOR_abstract_collection__Iterator__is_ok
]))(var7
) /* is_ok on <var7:Iterator[nullable Object]>*/;
869 var9
= ((val
* (*)(val
*))(var7
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var7
) /* item on <var7:Iterator[nullable Object]>*/;
870 var10
= ((struct instance_kernel__Int
*)var9
)->value
; /* autounbox from nullable Object to Int */;
872 var11
= ((val
* (*)(val
*, val
*))(var_new_rope
->class->vft
[COLOR_ropes__BufferRope__append
]))(var_new_rope
, var_str
) /* append on <var_new_rope:BufferRope>*/;
874 CONTINUE_label
: (void)0;
875 ((void (*)(val
*))(var7
->class->vft
[COLOR_abstract_collection__Iterator__next
]))(var7
) /* next on <var7:Iterator[nullable Object]>*/;
877 BREAK_label
: (void)0;
883 /* method ropes#Rope#* for (self: Object, Int): Rope */
884 val
* VIRTUAL_ropes__Rope___42d(val
* self
, long p0
) {
885 val
* var
/* : Rope */;
886 val
* var1
/* : Rope */;
887 var1
= ropes__Rope___42d(self
, p0
);
892 /* method ropes#Rope#iterator for (self: Rope): Iterator[LeafNode] */
893 val
* ropes__Rope__iterator(val
* self
) {
894 val
* var
/* : Iterator[LeafNode] */;
895 val
* var1
/* : DFSRopeLeafIterator */;
896 var1
= NEW_ropes__DFSRopeLeafIterator(&type_ropes__DFSRopeLeafIterator
);
897 ((void (*)(val
*, val
*))(var1
->class->vft
[COLOR_ropes__DFSRopeLeafIterator__init
]))(var1
, self
) /* init on <var1:DFSRopeLeafIterator>*/;
898 CHECK_NEW_ropes__DFSRopeLeafIterator(var1
);
904 /* method ropes#Rope#iterator for (self: Object): Iterator[LeafNode] */
905 val
* VIRTUAL_ropes__Rope__iterator(val
* self
) {
906 val
* var
/* : Iterator[LeafNode] */;
907 val
* var1
/* : Iterator[LeafNode] */;
908 var1
= ropes__Rope__iterator(self
);
913 /* method ropes#Rope#subrope for (self: Rope, Int, Int): Rope */
914 val
* ropes__Rope__subrope(val
* self
, long p0
, long p1
) {
915 val
* var
/* : Rope */;
916 long var_index_from
/* var index_from: Int */;
917 long var_count
/* var count: Int */;
918 long var1
/* : Int */;
919 short int var2
/* : Bool */;
920 short int var4
/* : Bool */;
923 const char* var_class_name
;
924 short int var5
/* : Bool */;
925 long var6
/* : Int */;
926 short int var7
/* : Bool */;
927 short int var9
/* : Bool */;
930 const char* var_class_name12
;
931 short int var13
/* : Bool */;
932 long var14
/* : Int */;
933 long var16
/* : Int */;
934 long var17
/* : Int */;
935 short int var18
/* : Bool */;
936 short int var20
/* : Bool */;
939 const char* var_class_name23
;
940 short int var24
/* : Bool */;
941 long var25
/* : Int */;
942 long var26
/* : Int */;
943 long var27
/* : Int */;
944 long var29
/* : Int */;
945 long var30
/* : Int */;
946 short int var31
/* : Bool */;
947 short int var33
/* : Bool */;
950 const char* var_class_name36
;
951 short int var37
/* : Bool */;
952 long var38
/* : Int */;
953 long var39
/* : Int */;
954 long var41
/* : Int */;
955 val
* var42
/* : BufferRope */;
956 val
* var_buffer
/* var buffer: BufferRope */;
957 val
* var43
/* : DFSRopeLeafIterator */;
958 val
* var_iter
/* var iter: DFSRopeLeafIterator */;
959 long var44
/* : Int */;
960 long var45
/* : Int */;
961 long var47
/* : Int */;
962 long var_curr_subrope_index
/* var curr_subrope_index: Int */;
963 short int var48
/* : Bool */;
964 long var49
/* : Int */;
965 short int var50
/* : Bool */;
966 short int var52
/* : Bool */;
967 long var53
/* : Int */;
968 short int var54
/* : Bool */;
969 short int var56
/* : Bool */;
972 const char* var_class_name59
;
973 short int var60
/* : Bool */;
974 val
* var61
/* : nullable Object */;
975 val
* var62
/* : String */;
976 long var63
/* : Int */;
977 short int var64
/* : Bool */;
978 short int var66
/* : Bool */;
981 const char* var_class_name69
;
982 short int var70
/* : Bool */;
983 val
* var71
/* : nullable Object */;
984 val
* var72
/* : String */;
985 val
* var73
/* : String */;
986 val
* var74
/* : BufferRope */;
987 val
* var75
/* : nullable Object */;
988 val
* var76
/* : String */;
989 long var77
/* : Int */;
990 long var78
/* : Int */;
991 long var80
/* : Int */;
992 long var81
/* : Int */;
993 long var83
/* : Int */;
994 long var84
/* : Int */;
995 val
* var85
/* : nullable Object */;
996 val
* var86
/* : String */;
997 val
* var87
/* : String */;
998 val
* var88
/* : BufferRope */;
999 val
* var89
/* : nullable Object */;
1000 val
* var90
/* : String */;
1001 long var91
/* : Int */;
1002 short int var92
/* : Bool */;
1003 short int var94
/* : Bool */;
1006 const char* var_class_name97
;
1007 short int var98
/* : Bool */;
1008 val
* var99
/* : nullable Object */;
1009 val
* var100
/* : String */;
1010 val
* var101
/* : BufferRope */;
1011 val
* var102
/* : nullable Object */;
1012 val
* var103
/* : String */;
1013 long var104
/* : Int */;
1014 long var105
/* : Int */;
1015 long var107
/* : Int */;
1016 val
* var108
/* : nullable Object */;
1017 val
* var109
/* : String */;
1018 long var110
/* : Int */;
1019 val
* var111
/* : String */;
1020 val
* var112
/* : BufferRope */;
1021 var_index_from
= p0
;
1024 { /* Inline kernel#Int#>= (var_count,var1) */
1025 /* Covariant cast for argument 0 (i) <var1:Int> isa OTHER */
1026 /* <var1:Int> isa OTHER */
1027 var4
= 1; /* easy <var1:Int> isa OTHER*/
1029 var_class_name
= type_kernel__Int
.name
;
1030 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name
);
1031 fprintf(stderr
, " (%s:%d)\n", "lib/standard/kernel.nit", 262);
1034 var5
= var_count
>= var1
;
1040 fprintf(stderr
, "Runtime error: %s", "Assert failed");
1041 fprintf(stderr
, " (%s:%d)\n", "lib/standard/ropes.nit", 205);
1045 { /* Inline kernel#Int#< (var_index_from,var6) */
1046 /* Covariant cast for argument 0 (i) <var6:Int> isa OTHER */
1047 /* <var6:Int> isa OTHER */
1048 var9
= 1; /* easy <var6:Int> isa OTHER*/
1050 var_class_name12
= type_kernel__Int
.name
;
1051 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name12
);
1052 fprintf(stderr
, " (%s:%d)\n", "lib/standard/kernel.nit", 261);
1055 var13
= var_index_from
< var6
;
1061 { /* Inline kernel#Int#+ (var_count,var_index_from) */
1062 var16
= var_count
+ var_index_from
;
1065 RET_LABEL15
:(void)0;
1069 { /* Inline kernel#Int#< (var_count,var17) */
1070 /* Covariant cast for argument 0 (i) <var17:Int> isa OTHER */
1071 /* <var17:Int> isa OTHER */
1072 var20
= 1; /* easy <var17:Int> isa OTHER*/
1074 var_class_name23
= type_kernel__Int
.name
;
1075 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name23
);
1076 fprintf(stderr
, " (%s:%d)\n", "lib/standard/kernel.nit", 261);
1079 var24
= var_count
< var17
;
1082 RET_LABEL19
:(void)0;
1090 var_index_from
= var26
;
1093 { /* Inline kernel#Int#- (var_count,var_index_from) */
1094 var29
= var_count
- var_index_from
;
1097 RET_LABEL28
:(void)0;
1099 var30
= ((long (*)(val
*))(self
->class->vft
[COLOR_ropes__Rope__length
]))(self
) /* length on <self:Rope>*/;
1100 { /* Inline kernel#Int#>= (var27,var30) */
1101 /* Covariant cast for argument 0 (i) <var30:Int> isa OTHER */
1102 /* <var30:Int> isa OTHER */
1103 var33
= 1; /* easy <var30:Int> isa OTHER*/
1105 var_class_name36
= type_kernel__Int
.name
;
1106 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name36
);
1107 fprintf(stderr
, " (%s:%d)\n", "lib/standard/kernel.nit", 262);
1110 var37
= var27
>= var30
;
1113 RET_LABEL32
:(void)0;
1116 var38
= ((long (*)(val
*))(self
->class->vft
[COLOR_ropes__Rope__length
]))(self
) /* length on <self:Rope>*/;
1117 { /* Inline kernel#Int#- (var38,var_index_from) */
1118 var41
= var38
- var_index_from
;
1121 RET_LABEL40
:(void)0;
1126 var42
= NEW_ropes__BufferRope(&type_ropes__BufferRope
);
1127 ((void (*)(val
*))(var42
->class->vft
[COLOR_ropes__BufferRope__init
]))(var42
) /* init on <var42:BufferRope>*/;
1128 CHECK_NEW_ropes__BufferRope(var42
);
1130 var43
= NEW_ropes__DFSRopeLeafIterator(&type_ropes__DFSRopeLeafIterator
);
1131 ((void (*)(val
*, val
*, long))(var43
->class->vft
[COLOR_ropes__DFSRopeLeafIterator__with_index
]))(var43
, self
, var_index_from
) /* with_index on <var43:DFSRopeLeafIterator>*/;
1132 CHECK_NEW_ropes__DFSRopeLeafIterator(var43
);
1134 var44
= ((long (*)(val
*))(var_iter
->class->vft
[COLOR_ropes__RopeIterator__pos
]))(var_iter
) /* pos on <var_iter:DFSRopeLeafIterator>*/;
1135 { /* Inline kernel#Int#- (var_index_from,var44) */
1136 var47
= var_index_from
- var44
;
1139 RET_LABEL46
:(void)0;
1141 var_curr_subrope_index
= var45
;
1143 var48
= ((short int (*)(val
*))(var_iter
->class->vft
[COLOR_abstract_collection__Iterator__is_ok
]))(var_iter
) /* is_ok on <var_iter:DFSRopeLeafIterator>*/;
1146 { /* Inline kernel#Int#== (var_count,var49) */
1147 var52
= var_count
== var49
;
1150 RET_LABEL51
:(void)0;
1157 { /* Inline kernel#Int#> (var_curr_subrope_index,var53) */
1158 /* Covariant cast for argument 0 (i) <var53:Int> isa OTHER */
1159 /* <var53:Int> isa OTHER */
1160 var56
= 1; /* easy <var53:Int> isa OTHER*/
1162 var_class_name59
= type_kernel__Int
.name
;
1163 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name59
);
1164 fprintf(stderr
, " (%s:%d)\n", "lib/standard/kernel.nit", 263);
1167 var60
= var_curr_subrope_index
> var53
;
1170 RET_LABEL55
:(void)0;
1173 var61
= ((val
* (*)(val
*))(var_iter
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var_iter
) /* item on <var_iter:DFSRopeLeafIterator>*/;
1174 var62
= ((val
* (*)(val
*))(var61
->class->vft
[COLOR_ropes__LeafNode__value
]))(var61
) /* value on <var61:nullable Object(LeafNode)>*/;
1175 var63
= ((long (*)(val
*))(var62
->class->vft
[COLOR_abstract_collection__Collection__length
]))(var62
) /* length on <var62:String>*/;
1176 { /* Inline kernel#Int#>= (var_count,var63) */
1177 /* Covariant cast for argument 0 (i) <var63:Int> isa OTHER */
1178 /* <var63:Int> isa OTHER */
1179 var66
= 1; /* easy <var63:Int> isa OTHER*/
1181 var_class_name69
= type_kernel__Int
.name
;
1182 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name69
);
1183 fprintf(stderr
, " (%s:%d)\n", "lib/standard/kernel.nit", 262);
1186 var70
= var_count
>= var63
;
1189 RET_LABEL65
:(void)0;
1192 var71
= ((val
* (*)(val
*))(var_iter
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var_iter
) /* item on <var_iter:DFSRopeLeafIterator>*/;
1193 var72
= ((val
* (*)(val
*))(var71
->class->vft
[COLOR_ropes__LeafNode__value
]))(var71
) /* value on <var71:nullable Object(LeafNode)>*/;
1194 var73
= ((val
* (*)(val
*, long, long))(var72
->class->vft
[COLOR_string__AbstractString__substring
]))(var72
, var_curr_subrope_index
, var_count
) /* substring on <var72:String>*/;
1195 var74
= ((val
* (*)(val
*, val
*))(var_buffer
->class->vft
[COLOR_ropes__BufferRope__append
]))(var_buffer
, var73
) /* append on <var_buffer:BufferRope>*/;
1197 var75
= ((val
* (*)(val
*))(var_iter
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var_iter
) /* item on <var_iter:DFSRopeLeafIterator>*/;
1198 var76
= ((val
* (*)(val
*))(var75
->class->vft
[COLOR_ropes__LeafNode__value
]))(var75
) /* value on <var75:nullable Object(LeafNode)>*/;
1199 var77
= ((long (*)(val
*))(var76
->class->vft
[COLOR_abstract_collection__Collection__length
]))(var76
) /* length on <var76:String>*/;
1200 { /* Inline kernel#Int#- (var77,var_curr_subrope_index) */
1201 var80
= var77
- var_curr_subrope_index
;
1204 RET_LABEL79
:(void)0;
1206 { /* Inline kernel#Int#- (var_count,var78) */
1207 var83
= var_count
- var78
;
1210 RET_LABEL82
:(void)0;
1214 var_curr_subrope_index
= var84
;
1216 var85
= ((val
* (*)(val
*))(var_iter
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var_iter
) /* item on <var_iter:DFSRopeLeafIterator>*/;
1217 var86
= ((val
* (*)(val
*))(var85
->class->vft
[COLOR_ropes__LeafNode__value
]))(var85
) /* value on <var85:nullable Object(LeafNode)>*/;
1218 var87
= ((val
* (*)(val
*, long, long))(var86
->class->vft
[COLOR_string__AbstractString__substring
]))(var86
, var_curr_subrope_index
, var_count
) /* substring on <var86:String>*/;
1219 var88
= ((val
* (*)(val
*, val
*))(var_buffer
->class->vft
[COLOR_ropes__BufferRope__append
]))(var_buffer
, var87
) /* append on <var_buffer:BufferRope>*/;
1224 var89
= ((val
* (*)(val
*))(var_iter
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var_iter
) /* item on <var_iter:DFSRopeLeafIterator>*/;
1225 var90
= ((val
* (*)(val
*))(var89
->class->vft
[COLOR_ropes__LeafNode__value
]))(var89
) /* value on <var89:nullable Object(LeafNode)>*/;
1226 var91
= ((long (*)(val
*))(var90
->class->vft
[COLOR_abstract_collection__Collection__length
]))(var90
) /* length on <var90:String>*/;
1227 { /* Inline kernel#Int#>= (var_count,var91) */
1228 /* Covariant cast for argument 0 (i) <var91:Int> isa OTHER */
1229 /* <var91:Int> isa OTHER */
1230 var94
= 1; /* easy <var91:Int> isa OTHER*/
1232 var_class_name97
= type_kernel__Int
.name
;
1233 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name97
);
1234 fprintf(stderr
, " (%s:%d)\n", "lib/standard/kernel.nit", 262);
1237 var98
= var_count
>= var91
;
1240 RET_LABEL93
:(void)0;
1243 var99
= ((val
* (*)(val
*))(var_iter
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var_iter
) /* item on <var_iter:DFSRopeLeafIterator>*/;
1244 var100
= ((val
* (*)(val
*))(var99
->class->vft
[COLOR_ropes__LeafNode__value
]))(var99
) /* value on <var99:nullable Object(LeafNode)>*/;
1245 var101
= ((val
* (*)(val
*, val
*))(var_buffer
->class->vft
[COLOR_ropes__BufferRope__append
]))(var_buffer
, var100
) /* append on <var_buffer:BufferRope>*/;
1247 var102
= ((val
* (*)(val
*))(var_iter
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var_iter
) /* item on <var_iter:DFSRopeLeafIterator>*/;
1248 var103
= ((val
* (*)(val
*))(var102
->class->vft
[COLOR_ropes__LeafNode__value
]))(var102
) /* value on <var102:nullable Object(LeafNode)>*/;
1249 var104
= ((long (*)(val
*))(var103
->class->vft
[COLOR_abstract_collection__Collection__length
]))(var103
) /* length on <var103:String>*/;
1250 { /* Inline kernel#Int#- (var_count,var104) */
1251 var107
= var_count
- var104
;
1254 RET_LABEL106
:(void)0;
1258 var108
= ((val
* (*)(val
*))(var_iter
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var_iter
) /* item on <var_iter:DFSRopeLeafIterator>*/;
1259 var109
= ((val
* (*)(val
*))(var108
->class->vft
[COLOR_ropes__LeafNode__value
]))(var108
) /* value on <var108:nullable Object(LeafNode)>*/;
1261 var111
= ((val
* (*)(val
*, long, long))(var109
->class->vft
[COLOR_string__AbstractString__substring
]))(var109
, var110
, var_count
) /* substring on <var109:String>*/;
1262 var112
= ((val
* (*)(val
*, val
*))(var_buffer
->class->vft
[COLOR_ropes__BufferRope__append
]))(var_buffer
, var111
) /* append on <var_buffer:BufferRope>*/;
1267 ((void (*)(val
*))(var_iter
->class->vft
[COLOR_abstract_collection__Iterator__next
]))(var_iter
) /* next on <var_iter:DFSRopeLeafIterator>*/;
1268 CONTINUE_label
: (void)0;
1270 BREAK_label
: (void)0;
1276 /* method ropes#Rope#subrope for (self: Object, Int, Int): Rope */
1277 val
* VIRTUAL_ropes__Rope__subrope(val
* self
, long p0
, long p1
) {
1278 val
* var
/* : Rope */;
1279 val
* var1
/* : Rope */;
1280 var1
= ropes__Rope__subrope(self
, p0
, p1
);
1285 /* method ropes#Rope#to_upper for (self: Rope): Rope */
1286 val
* ropes__Rope__to_upper(val
* self
) {
1287 val
* var
/* : Rope */;
1288 val
* var1
/* : BufferRope */;
1289 val
* var_new_rope
/* var new_rope: BufferRope */;
1290 val
* var2
/* : DFSRopeLeafIterator */;
1291 val
* var_iter
/* var iter: DFSRopeLeafIterator */;
1292 short int var3
/* : Bool */;
1293 val
* var4
/* : nullable Object */;
1294 val
* var5
/* : String */;
1295 val
* var6
/* : String */;
1296 val
* var7
/* : BufferRope */;
1297 var1
= NEW_ropes__BufferRope(&type_ropes__BufferRope
);
1298 ((void (*)(val
*))(var1
->class->vft
[COLOR_ropes__BufferRope__init
]))(var1
) /* init on <var1:BufferRope>*/;
1299 CHECK_NEW_ropes__BufferRope(var1
);
1300 var_new_rope
= var1
;
1301 var2
= NEW_ropes__DFSRopeLeafIterator(&type_ropes__DFSRopeLeafIterator
);
1302 ((void (*)(val
*, val
*))(var2
->class->vft
[COLOR_ropes__DFSRopeLeafIterator__init
]))(var2
, self
) /* init on <var2:DFSRopeLeafIterator>*/;
1303 CHECK_NEW_ropes__DFSRopeLeafIterator(var2
);
1306 var3
= ((short int (*)(val
*))(var_iter
->class->vft
[COLOR_abstract_collection__Iterator__is_ok
]))(var_iter
) /* is_ok on <var_iter:DFSRopeLeafIterator>*/;
1308 var4
= ((val
* (*)(val
*))(var_iter
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var_iter
) /* item on <var_iter:DFSRopeLeafIterator>*/;
1309 var5
= ((val
* (*)(val
*))(var4
->class->vft
[COLOR_ropes__LeafNode__value
]))(var4
) /* value on <var4:nullable Object(LeafNode)>*/;
1310 var6
= ((val
* (*)(val
*))(var5
->class->vft
[COLOR_string__AbstractString__to_upper
]))(var5
) /* to_upper on <var5:String>*/;
1311 var7
= ((val
* (*)(val
*, val
*))(var_new_rope
->class->vft
[COLOR_ropes__BufferRope__append
]))(var_new_rope
, var6
) /* append on <var_new_rope:BufferRope>*/;
1313 ((void (*)(val
*))(var_iter
->class->vft
[COLOR_abstract_collection__Iterator__next
]))(var_iter
) /* next on <var_iter:DFSRopeLeafIterator>*/;
1314 CONTINUE_label
: (void)0;
1316 BREAK_label
: (void)0;
1322 /* method ropes#Rope#to_upper for (self: Object): Rope */
1323 val
* VIRTUAL_ropes__Rope__to_upper(val
* self
) {
1324 val
* var
/* : Rope */;
1325 val
* var1
/* : Rope */;
1326 var1
= ropes__Rope__to_upper(self
);
1331 /* method ropes#Rope#to_lower for (self: Rope): Rope */
1332 val
* ropes__Rope__to_lower(val
* self
) {
1333 val
* var
/* : Rope */;
1334 val
* var1
/* : BufferRope */;
1335 val
* var_new_rope
/* var new_rope: BufferRope */;
1336 val
* var2
/* : DFSRopeLeafIterator */;
1337 val
* var_iter
/* var iter: DFSRopeLeafIterator */;
1338 short int var3
/* : Bool */;
1339 val
* var4
/* : nullable Object */;
1340 val
* var5
/* : String */;
1341 val
* var6
/* : String */;
1342 val
* var7
/* : BufferRope */;
1343 var1
= NEW_ropes__BufferRope(&type_ropes__BufferRope
);
1344 ((void (*)(val
*))(var1
->class->vft
[COLOR_ropes__BufferRope__init
]))(var1
) /* init on <var1:BufferRope>*/;
1345 CHECK_NEW_ropes__BufferRope(var1
);
1346 var_new_rope
= var1
;
1347 var2
= NEW_ropes__DFSRopeLeafIterator(&type_ropes__DFSRopeLeafIterator
);
1348 ((void (*)(val
*, val
*))(var2
->class->vft
[COLOR_ropes__DFSRopeLeafIterator__init
]))(var2
, self
) /* init on <var2:DFSRopeLeafIterator>*/;
1349 CHECK_NEW_ropes__DFSRopeLeafIterator(var2
);
1352 var3
= ((short int (*)(val
*))(var_iter
->class->vft
[COLOR_abstract_collection__Iterator__is_ok
]))(var_iter
) /* is_ok on <var_iter:DFSRopeLeafIterator>*/;
1354 var4
= ((val
* (*)(val
*))(var_iter
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var_iter
) /* item on <var_iter:DFSRopeLeafIterator>*/;
1355 var5
= ((val
* (*)(val
*))(var4
->class->vft
[COLOR_ropes__LeafNode__value
]))(var4
) /* value on <var4:nullable Object(LeafNode)>*/;
1356 var6
= ((val
* (*)(val
*))(var5
->class->vft
[COLOR_string__AbstractString__to_lower
]))(var5
) /* to_lower on <var5:String>*/;
1357 var7
= ((val
* (*)(val
*, val
*))(var_new_rope
->class->vft
[COLOR_ropes__BufferRope__append
]))(var_new_rope
, var6
) /* append on <var_new_rope:BufferRope>*/;
1359 ((void (*)(val
*))(var_iter
->class->vft
[COLOR_abstract_collection__Iterator__next
]))(var_iter
) /* next on <var_iter:DFSRopeLeafIterator>*/;
1360 CONTINUE_label
: (void)0;
1362 BREAK_label
: (void)0;
1368 /* method ropes#Rope#to_lower for (self: Object): Rope */
1369 val
* VIRTUAL_ropes__Rope__to_lower(val
* self
) {
1370 val
* var
/* : Rope */;
1371 val
* var1
/* : Rope */;
1372 var1
= ropes__Rope__to_lower(self
);
1377 /* method ropes#Rope#== for (self: Rope, nullable Object): Bool */
1378 short int ropes__Rope___61d_61d(val
* self
, val
* p0
) {
1379 short int var
/* : Bool */;
1380 val
* var_other
/* var other: nullable Object */;
1381 short int var1
/* : Bool */;
1382 val
* var2
/* : null */;
1383 short int var3
/* : Bool */;
1384 short int var_
/* var : Bool */;
1385 short int var4
/* : Bool */;
1386 short int var5
/* : Bool */;
1389 short int var_6
/* var : Bool */;
1390 short int var7
/* : Bool */;
1393 short int var10
/* : Bool */;
1394 short int var11
/* : Bool */;
1395 val
* var12
/* : RopeCharIterator */;
1396 val
* var_self_iter
/* var self_iter: RopeCharIterator */;
1397 short int var13
/* : Bool */;
1400 long var16
/* : Int */;
1401 long var17
/* : Int */;
1402 short int var18
/* : Bool */;
1403 short int var20
/* : Bool */;
1404 short int var21
/* : Bool */;
1405 short int var22
/* : Bool */;
1406 val
* var23
/* : RopeCharIterator */;
1407 val
* var_other_iterator
/* var other_iterator: RopeCharIterator */;
1408 short int var24
/* : Bool */;
1409 val
* var25
/* : nullable Object */;
1410 val
* var26
/* : nullable Object */;
1411 short int var27
/* : Bool */;
1412 short int var29
/* : Bool */;
1413 short int var30
/* : Bool */;
1414 short int var31
/* : Bool */;
1415 short int var32
/* : Bool */;
1418 long var35
/* : Int */;
1419 long var_pos
/* var pos: Int */;
1420 long var36
/* : Int */;
1421 long var37
/* : Int */;
1422 short int var38
/* : Bool */;
1423 short int var40
/* : Bool */;
1424 short int var41
/* : Bool */;
1425 short int var42
/* : Bool */;
1426 short int var43
/* : Bool */;
1427 val
* var44
/* : nullable Object */;
1428 val
* var45
/* : nullable Object */;
1429 short int var46
/* : Bool */;
1430 short int var48
/* : Bool */;
1431 short int var49
/* : Bool */;
1432 short int var50
/* : Bool */;
1433 long var51
/* : Int */;
1434 long var52
/* : Int */;
1435 long var54
/* : Int */;
1436 short int var56
/* : Bool */;
1439 if (var_other
== NULL
) {
1440 var3
= 1; /* is null */
1442 var3
= 0; /* arg is null but recv is not */
1448 /* <var_other:nullable Object(Object)> isa Rope */
1449 cltype
= type_ropes__Rope
.color
;
1450 idtype
= type_ropes__Rope
.id
;
1451 if(cltype
>= var_other
->type
->table_size
) {
1454 var5
= var_other
->type
->type_table
[cltype
] == idtype
;
1460 /* <var_other:nullable Object(Object)> isa AbstractString */
1461 cltype8
= type_string__AbstractString
.color
;
1462 idtype9
= type_string__AbstractString
.id
;
1463 if(cltype8
>= var_other
->type
->table_size
) {
1466 var7
= var_other
->type
->type_table
[cltype8
] == idtype9
;
1479 var12
= NEW_ropes__RopeCharIterator(&type_ropes__RopeCharIterator
);
1480 ((void (*)(val
*, val
*))(var12
->class->vft
[COLOR_ropes__RopeCharIterator__init
]))(var12
, self
) /* init on <var12:RopeCharIterator>*/;
1481 CHECK_NEW_ropes__RopeCharIterator(var12
);
1482 var_self_iter
= var12
;
1483 /* <var_other:nullable Object> isa Rope */
1484 cltype14
= type_ropes__Rope
.color
;
1485 idtype15
= type_ropes__Rope
.id
;
1486 if(var_other
== NULL
) {
1489 if(cltype14
>= var_other
->type
->table_size
) {
1492 var13
= var_other
->type
->type_table
[cltype14
] == idtype15
;
1496 var16
= ((long (*)(val
*))(self
->class->vft
[COLOR_ropes__Rope__length
]))(self
) /* length on <self:Rope>*/;
1497 var17
= ((long (*)(val
*))(var_other
->class->vft
[COLOR_ropes__Rope__length
]))(var_other
) /* length on <var_other:nullable Object(Rope)>*/;
1498 { /* Inline kernel#Int#!= (var16,var17) */
1499 var20
= var16
== var17
;
1503 RET_LABEL19
:(void)0;
1511 var23
= NEW_ropes__RopeCharIterator(&type_ropes__RopeCharIterator
);
1512 ((void (*)(val
*, val
*))(var23
->class->vft
[COLOR_ropes__RopeCharIterator__init
]))(var23
, var_other
) /* init on <var23:RopeCharIterator>*/;
1513 CHECK_NEW_ropes__RopeCharIterator(var23
);
1514 var_other_iterator
= var23
;
1516 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>*/;
1518 var25
= ((val
* (*)(val
*))(var_self_iter
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var_self_iter
) /* item on <var_self_iter:RopeCharIterator>*/;
1519 var26
= ((val
* (*)(val
*))(var_other_iterator
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var_other_iterator
) /* item on <var_other_iterator:RopeCharIterator>*/;
1520 { /* Inline kernel#Char#!= (var25,var26) */
1521 var29
= var25
== var26
|| (((struct instance_kernel__Char
*)var25
)->value
== ((struct instance_kernel__Char
*)var26
)->value
);
1525 RET_LABEL28
:(void)0;
1533 ((void (*)(val
*))(var_self_iter
->class->vft
[COLOR_abstract_collection__Iterator__next
]))(var_self_iter
) /* next on <var_self_iter:RopeCharIterator>*/;
1534 ((void (*)(val
*))(var_other_iterator
->class->vft
[COLOR_abstract_collection__Iterator__next
]))(var_other_iterator
) /* next on <var_other_iterator:RopeCharIterator>*/;
1535 CONTINUE_label
: (void)0;
1537 BREAK_label
: (void)0;
1539 /* <var_other:nullable Object> isa AbstractString */
1540 cltype33
= type_string__AbstractString
.color
;
1541 idtype34
= type_string__AbstractString
.id
;
1542 if(var_other
== NULL
) {
1545 if(cltype33
>= var_other
->type
->table_size
) {
1548 var32
= var_other
->type
->type_table
[cltype33
] == idtype34
;
1554 var36
= ((long (*)(val
*))(self
->class->vft
[COLOR_ropes__Rope__length
]))(self
) /* length on <self:Rope>*/;
1555 var37
= ((long (*)(val
*))(var_other
->class->vft
[COLOR_abstract_collection__Collection__length
]))(var_other
) /* length on <var_other:nullable Object(AbstractString)>*/;
1556 { /* Inline kernel#Int#!= (var36,var37) */
1557 var40
= var36
== var37
;
1561 RET_LABEL39
:(void)0;
1570 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>*/;
1572 var44
= ((val
* (*)(val
*))(var_self_iter
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var_self_iter
) /* item on <var_self_iter:RopeCharIterator>*/;
1573 var45
= ((val
* (*)(val
*, long))(var_other
->class->vft
[COLOR_abstract_collection__SequenceRead___91d_93d
]))(var_other
, var_pos
) /* [] on <var_other:nullable Object(AbstractString)>*/;
1574 { /* Inline kernel#Char#!= (var44,var45) */
1575 var48
= var44
== var45
|| (((struct instance_kernel__Char
*)var44
)->value
== ((struct instance_kernel__Char
*)var45
)->value
);
1579 RET_LABEL47
:(void)0;
1588 { /* Inline kernel#Int#+ (var_pos,var51) */
1589 var54
= var_pos
+ var51
;
1592 RET_LABEL53
:(void)0;
1595 ((void (*)(val
*))(var_self_iter
->class->vft
[COLOR_abstract_collection__Iterator__next
]))(var_self_iter
) /* next on <var_self_iter:RopeCharIterator>*/;
1596 CONTINUE_label55
: (void)0;
1598 BREAK_label55
: (void)0;
1608 /* method ropes#Rope#== for (self: Object, nullable Object): Bool */
1609 short int VIRTUAL_ropes__Rope___61d_61d(val
* self
, val
* p0
) {
1610 short int var
/* : Bool */;
1611 short int var1
/* : Bool */;
1612 var1
= ropes__Rope___61d_61d(self
, p0
);
1617 /* method ropes#Rope#< for (self: Rope, Rope): Bool */
1618 short int ropes__Rope___60d(val
* self
, val
* p0
) {
1619 short int var
/* : Bool */;
1620 short int var1
/* : Bool */;
1623 const struct type
* type_struct
;
1624 const char* var_class_name
;
1625 val
* var_other
/* var other: Rope */;
1626 val
* var2
/* : SequenceRead[Char] */;
1627 val
* var3
/* : Iterator[nullable Object] */;
1628 val
* var_other_iter
/* var other_iter: IndexedIterator[Char] */;
1629 val
* var4
/* : SequenceRead[Char] */;
1630 val
* var5
/* : Iterator[nullable Object] */;
1631 short int var6
/* : Bool */;
1632 val
* var7
/* : nullable Object */;
1633 char var_i
/* var i: Char */;
1634 char var8
/* : Char */;
1635 short int var9
/* : Bool */;
1636 short int var10
/* : Bool */;
1637 short int var11
/* : Bool */;
1638 val
* var12
/* : nullable Object */;
1639 short int var13
/* : Bool */;
1640 short int var15
/* : Bool */;
1643 const char* var_class_name18
;
1644 char var19
/* : Char */;
1645 short int var20
/* : Bool */;
1646 short int var21
/* : Bool */;
1647 val
* var22
/* : nullable Object */;
1648 short int var23
/* : Bool */;
1649 short int var25
/* : Bool */;
1652 const char* var_class_name28
;
1653 char var29
/* : Char */;
1654 short int var30
/* : Bool */;
1655 short int var31
/* : Bool */;
1656 short int var32
/* : Bool */;
1657 short int var33
/* : Bool */;
1658 short int var34
/* : Bool */;
1659 /* Covariant cast for argument 0 (other) <p0:Rope> isa OTHER */
1660 /* <p0:Rope> isa OTHER */
1661 type_struct
= self
->type
->resolution_table
->types
[COLOR_kernel__Comparable_VTOTHER
];
1662 cltype
= type_struct
->color
;
1663 idtype
= type_struct
->id
;
1664 if(cltype
>= p0
->type
->table_size
) {
1667 var1
= p0
->type
->type_table
[cltype
] == idtype
;
1670 var_class_name
= p0
== NULL ?
"null" : p0
->type
->name
;
1671 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name
);
1672 fprintf(stderr
, " (%s:%d)\n", "lib/standard/ropes.nit", 301);
1676 var2
= ((val
* (*)(val
*))(var_other
->class->vft
[COLOR_ropes__Rope__chars
]))(var_other
) /* chars on <var_other:Rope>*/;
1677 var3
= ((val
* (*)(val
*))(var2
->class->vft
[COLOR_abstract_collection__Collection__iterator
]))(var2
) /* iterator on <var2:SequenceRead[Char]>*/;
1678 var_other_iter
= var3
;
1679 var4
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_ropes__Rope__chars
]))(self
) /* chars on <self:Rope>*/;
1680 var5
= ((val
* (*)(val
*))(var4
->class->vft
[COLOR_abstract_collection__Collection__iterator
]))(var4
) /* iterator on <var4:SequenceRead[Char]>*/;
1682 var6
= ((short int (*)(val
*))(var5
->class->vft
[COLOR_abstract_collection__Iterator__is_ok
]))(var5
) /* is_ok on <var5:Iterator[nullable Object]>*/;
1684 var7
= ((val
* (*)(val
*))(var5
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var5
) /* item on <var5:Iterator[nullable Object]>*/;
1685 var8
= ((struct instance_kernel__Char
*)var7
)->value
; /* autounbox from nullable Object to Char */;
1687 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]>*/;
1695 var12
= ((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,var12) */
1697 /* Covariant cast for argument 0 (i) <var12:nullable Object(Char)> isa OTHER */
1698 /* <var12:nullable Object(Char)> isa OTHER */
1699 var15
= 1; /* easy <var12:nullable Object(Char)> isa OTHER*/
1701 var_class_name18
= var12
== NULL ?
"null" : var12
->type
->name
;
1702 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name18
);
1703 fprintf(stderr
, " (%s:%d)\n", "lib/standard/kernel.nit", 437);
1706 var19
= ((struct instance_kernel__Char
*)var12
)->value
; /* autounbox from nullable Object to Char */;
1707 var20
= var_i
< var19
;
1710 RET_LABEL14
:(void)0;
1718 var22
= ((val
* (*)(val
*))(var_other_iter
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var_other_iter
) /* item on <var_other_iter:IndexedIterator[Char]>*/;
1719 { /* Inline kernel#Char#> (var_i,var22) */
1720 /* Covariant cast for argument 0 (i) <var22:nullable Object(Char)> isa OTHER */
1721 /* <var22:nullable Object(Char)> isa OTHER */
1722 var25
= 1; /* easy <var22:nullable Object(Char)> isa OTHER*/
1724 var_class_name28
= var22
== NULL ?
"null" : var22
->type
->name
;
1725 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name28
);
1726 fprintf(stderr
, " (%s:%d)\n", "lib/standard/kernel.nit", 439);
1729 var29
= ((struct instance_kernel__Char
*)var22
)->value
; /* autounbox from nullable Object to Char */;
1730 var30
= var_i
> var29
;
1733 RET_LABEL24
:(void)0;
1741 ((void (*)(val
*))(var_other_iter
->class->vft
[COLOR_abstract_collection__Iterator__next
]))(var_other_iter
) /* next on <var_other_iter:IndexedIterator[Char]>*/;
1742 CONTINUE_label
: (void)0;
1743 ((void (*)(val
*))(var5
->class->vft
[COLOR_abstract_collection__Iterator__next
]))(var5
) /* next on <var5:Iterator[nullable Object]>*/;
1745 BREAK_label
: (void)0;
1746 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]>*/;
1759 /* method ropes#Rope#< for (self: Object, Comparable): Bool */
1760 short int VIRTUAL_ropes__Rope___60d(val
* self
, val
* p0
) {
1761 short int var
/* : Bool */;
1762 short int var1
/* : Bool */;
1763 var1
= ropes__Rope___60d(self
, p0
);
1768 /* method ropes#BufferRope#is_dirty for (self: BufferRope): Bool */
1769 short int ropes__BufferRope__is_dirty(val
* self
) {
1770 short int var
/* : Bool */;
1771 short int var1
/* : Bool */;
1772 var1
= self
->attrs
[COLOR_ropes__BufferRope___64dis_dirty
].s
; /* @is_dirty on <self:BufferRope> */
1777 /* method ropes#BufferRope#is_dirty for (self: Object): Bool */
1778 short int VIRTUAL_ropes__BufferRope__is_dirty(val
* self
) {
1779 short int var
/* : Bool */;
1780 short int var1
/* : Bool */;
1781 var1
= ropes__BufferRope__is_dirty(self
);
1786 /* method ropes#BufferRope#is_dirty= for (self: BufferRope, Bool) */
1787 void ropes__BufferRope__is_dirty_61d(val
* self
, short int p0
) {
1788 self
->attrs
[COLOR_ropes__BufferRope___64dis_dirty
].s
= p0
; /* @is_dirty on <self:BufferRope> */
1791 /* method ropes#BufferRope#is_dirty= for (self: Object, Bool) */
1792 void VIRTUAL_ropes__BufferRope__is_dirty_61d(val
* self
, short int p0
) {
1793 ropes__BufferRope__is_dirty_61d(self
, p0
);
1796 /* method ropes#BufferRope#init for (self: BufferRope) */
1797 void ropes__BufferRope__init(val
* self
) {
1798 ((void (*)(val
*))(self
->class->vft
[COLOR_ropes__Rope__init
]))(self
) /* init on <self:BufferRope>*/;
1801 /* method ropes#BufferRope#init for (self: Object) */
1802 void VIRTUAL_ropes__BufferRope__init(val
* self
) {
1803 ropes__BufferRope__init(self
);
1806 /* method ropes#BufferRope#with_string for (self: BufferRope, AbstractString) */
1807 void ropes__BufferRope__with_string(val
* self
, val
* p0
) {
1808 val
* var_str
/* var str: AbstractString */;
1810 ((void (*)(val
*, val
*))(self
->class->vft
[COLOR_ropes__Rope__with_string
]))(self
, p0
) /* with_string on <self:BufferRope>*/;
1813 /* method ropes#BufferRope#with_string for (self: Object, AbstractString) */
1814 void VIRTUAL_ropes__BufferRope__with_string(val
* self
, val
* p0
) {
1815 ropes__BufferRope__with_string(self
, p0
);
1818 /* method ropes#BufferRope#rotate_right for (self: BufferRope, ConcatNode) */
1819 void ropes__BufferRope__rotate_right(val
* self
, val
* p0
) {
1820 val
* var_root
/* var root: ConcatNode */;
1821 val
* var
/* : nullable RopeNode */;
1822 val
* var1
/* : null */;
1823 short int var2
/* : Bool */;
1824 val
* var3
/* : nullable RopeNode */;
1825 short int var4
/* : Bool */;
1828 const char* var_class_name
;
1829 val
* var_pivot
/* var pivot: ConcatNode */;
1830 val
* var5
/* : nullable RopeNode */;
1831 val
* var_root_new_left
/* var root_new_left: nullable RopeNode */;
1832 val
* var6
/* : nullable ConcatNode */;
1833 val
* var_root_parent
/* var root_parent: nullable ConcatNode */;
1834 val
* var7
/* : null */;
1835 short int var8
/* : Bool */;
1836 val
* var9
/* : null */;
1837 val
* var10
/* : nullable RopeNode */;
1838 short int var11
/* : Bool */;
1840 var
= ((val
* (*)(val
*))(var_root
->class->vft
[COLOR_ropes__ConcatNode__left_child
]))(var_root
) /* left_child on <var_root:ConcatNode>*/;
1843 var2
= 0; /* is null */
1845 var2
= 1; /* arg is null and recv is not */
1848 fprintf(stderr
, "Runtime error: %s", "Assert failed");
1849 fprintf(stderr
, " (%s:%d)\n", "lib/standard/ropes.nit", 353);
1852 var3
= ((val
* (*)(val
*))(var_root
->class->vft
[COLOR_ropes__ConcatNode__left_child
]))(var_root
) /* left_child on <var_root:ConcatNode>*/;
1853 /* <var3:nullable RopeNode> isa ConcatNode */
1854 cltype
= type_ropes__ConcatNode
.color
;
1855 idtype
= type_ropes__ConcatNode
.id
;
1859 if(cltype
>= var3
->type
->table_size
) {
1862 var4
= var3
->type
->type_table
[cltype
] == idtype
;
1866 var_class_name
= var3
== NULL ?
"null" : var3
->type
->name
;
1867 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "ConcatNode", var_class_name
);
1868 fprintf(stderr
, " (%s:%d)\n", "lib/standard/ropes.nit", 354);
1872 var5
= ((val
* (*)(val
*))(var_pivot
->class->vft
[COLOR_ropes__ConcatNode__right_child
]))(var_pivot
) /* right_child on <var_pivot:ConcatNode>*/;
1873 var_root_new_left
= var5
;
1874 var6
= ((val
* (*)(val
*))(var_root
->class->vft
[COLOR_ropes__RopeNode__parent
]))(var_root
) /* parent on <var_root:ConcatNode>*/;
1875 var_root_parent
= var6
;
1876 ((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>*/;
1877 ((void (*)(val
*, val
*))(var_pivot
->class->vft
[COLOR_ropes__ConcatNode__right_child_61d
]))(var_pivot
, var_root
) /* right_child= on <var_pivot:ConcatNode>*/;
1879 if (var_root_parent
== NULL
) {
1880 var8
= 1; /* is null */
1882 var8
= 0; /* arg is null but recv is not */
1885 ((void (*)(val
*, val
*))(self
->class->vft
[COLOR_ropes__Rope__parent_node_61d
]))(self
, var_pivot
) /* parent_node= on <self:BufferRope>*/;
1887 ((void (*)(val
*, val
*))(var_pivot
->class->vft
[COLOR_ropes__RopeNode__parent_61d
]))(var_pivot
, var9
) /* parent= on <var_pivot:ConcatNode>*/;
1891 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)>*/;
1892 if (var10
== NULL
) {
1893 var11
= 0; /* <var_root:ConcatNode> cannot be null */
1895 var11
= ((short int (*)(val
*, val
*))(var10
->class->vft
[COLOR_kernel__Object___61d_61d
]))(var10
, var_root
) /* == on <var10:nullable RopeNode>*/;
1898 ((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)>*/;
1900 ((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)>*/;
1902 ((void (*)(val
*))(var_root
->class->vft
[COLOR_ropes__ConcatNode__update_data
]))(var_root
) /* update_data on <var_root:ConcatNode>*/;
1903 ((void (*)(val
*))(var_pivot
->class->vft
[COLOR_ropes__ConcatNode__update_data
]))(var_pivot
) /* update_data on <var_pivot:ConcatNode>*/;
1904 ((void (*)(val
*))(var_root_parent
->class->vft
[COLOR_ropes__ConcatNode__update_data
]))(var_root_parent
) /* update_data on <var_root_parent:nullable ConcatNode(ConcatNode)>*/;
1907 /* method ropes#BufferRope#rotate_right for (self: Object, ConcatNode) */
1908 void VIRTUAL_ropes__BufferRope__rotate_right(val
* self
, val
* p0
) {
1909 ropes__BufferRope__rotate_right(self
, p0
);
1912 /* method ropes#BufferRope#rotate_left for (self: BufferRope, ConcatNode) */
1913 void ropes__BufferRope__rotate_left(val
* self
, val
* p0
) {
1914 val
* var_root
/* var root: ConcatNode */;
1915 val
* var
/* : nullable RopeNode */;
1916 val
* var1
/* : null */;
1917 short int var2
/* : Bool */;
1918 val
* var3
/* : nullable RopeNode */;
1919 short int var4
/* : Bool */;
1922 const char* var_class_name
;
1923 val
* var_pivot
/* var pivot: ConcatNode */;
1924 val
* var5
/* : nullable RopeNode */;
1925 val
* var_root_new_right
/* var root_new_right: nullable RopeNode */;
1926 val
* var6
/* : nullable ConcatNode */;
1927 val
* var_root_parent
/* var root_parent: nullable ConcatNode */;
1928 val
* var7
/* : null */;
1929 short int var8
/* : Bool */;
1930 val
* var9
/* : null */;
1931 val
* var10
/* : nullable RopeNode */;
1932 short int var11
/* : Bool */;
1934 var
= ((val
* (*)(val
*))(var_root
->class->vft
[COLOR_ropes__ConcatNode__right_child
]))(var_root
) /* right_child on <var_root:ConcatNode>*/;
1937 var2
= 0; /* is null */
1939 var2
= 1; /* arg is null and recv is not */
1942 fprintf(stderr
, "Runtime error: %s", "Assert failed");
1943 fprintf(stderr
, " (%s:%d)\n", "lib/standard/ropes.nit", 386);
1946 var3
= ((val
* (*)(val
*))(var_root
->class->vft
[COLOR_ropes__ConcatNode__right_child
]))(var_root
) /* right_child on <var_root:ConcatNode>*/;
1947 /* <var3:nullable RopeNode> isa ConcatNode */
1948 cltype
= type_ropes__ConcatNode
.color
;
1949 idtype
= type_ropes__ConcatNode
.id
;
1953 if(cltype
>= var3
->type
->table_size
) {
1956 var4
= var3
->type
->type_table
[cltype
] == idtype
;
1960 var_class_name
= var3
== NULL ?
"null" : var3
->type
->name
;
1961 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "ConcatNode", var_class_name
);
1962 fprintf(stderr
, " (%s:%d)\n", "lib/standard/ropes.nit", 387);
1966 var5
= ((val
* (*)(val
*))(var_pivot
->class->vft
[COLOR_ropes__ConcatNode__left_child
]))(var_pivot
) /* left_child on <var_pivot:ConcatNode>*/;
1967 var_root_new_right
= var5
;
1968 var6
= ((val
* (*)(val
*))(var_root
->class->vft
[COLOR_ropes__RopeNode__parent
]))(var_root
) /* parent on <var_root:ConcatNode>*/;
1969 var_root_parent
= var6
;
1970 ((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>*/;
1971 ((void (*)(val
*, val
*))(var_pivot
->class->vft
[COLOR_ropes__ConcatNode__left_child_61d
]))(var_pivot
, var_root
) /* left_child= on <var_pivot:ConcatNode>*/;
1973 if (var_root_parent
== NULL
) {
1974 var8
= 1; /* is null */
1976 var8
= 0; /* arg is null but recv is not */
1979 ((void (*)(val
*, val
*))(self
->class->vft
[COLOR_ropes__Rope__parent_node_61d
]))(self
, var_pivot
) /* parent_node= on <self:BufferRope>*/;
1981 ((void (*)(val
*, val
*))(var_pivot
->class->vft
[COLOR_ropes__RopeNode__parent_61d
]))(var_pivot
, var9
) /* parent= on <var_pivot:ConcatNode>*/;
1985 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)>*/;
1986 if (var10
== NULL
) {
1987 var11
= 0; /* <var_root:ConcatNode> cannot be null */
1989 var11
= ((short int (*)(val
*, val
*))(var10
->class->vft
[COLOR_kernel__Object___61d_61d
]))(var10
, var_root
) /* == on <var10:nullable RopeNode>*/;
1992 ((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)>*/;
1994 ((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)>*/;
1996 ((void (*)(val
*))(var_root
->class->vft
[COLOR_ropes__ConcatNode__update_data
]))(var_root
) /* update_data on <var_root:ConcatNode>*/;
1997 ((void (*)(val
*))(var_pivot
->class->vft
[COLOR_ropes__ConcatNode__update_data
]))(var_pivot
) /* update_data on <var_pivot:ConcatNode>*/;
1998 ((void (*)(val
*))(var_root_parent
->class->vft
[COLOR_ropes__ConcatNode__update_data
]))(var_root_parent
) /* update_data on <var_root_parent:nullable ConcatNode(ConcatNode)>*/;
2001 /* method ropes#BufferRope#rotate_left for (self: Object, ConcatNode) */
2002 void VIRTUAL_ropes__BufferRope__rotate_left(val
* self
, val
* p0
) {
2003 ropes__BufferRope__rotate_left(self
, p0
);
2006 /* method ropes#BufferRope#balance_from_node for (self: BufferRope, nullable ConcatNode) */
2007 void ropes__BufferRope__balance_from_node(val
* self
, val
* p0
) {
2008 val
* var_parent_node
/* var parent_node: nullable ConcatNode */;
2009 val
* var
/* : null */;
2010 short int var1
/* : Bool */;
2011 long var2
/* : Int */;
2012 long var_node_balance
/* var node_balance: Int */;
2013 short int var3
/* : Bool */;
2014 long var4
/* : Int */;
2015 long var5
/* : Int */;
2016 long var7
/* : Int */;
2017 short int var8
/* : Bool */;
2018 short int var10
/* : Bool */;
2021 const char* var_class_name
;
2022 short int var11
/* : Bool */;
2023 short int var_
/* var : Bool */;
2024 long var12
/* : Int */;
2025 short int var13
/* : Bool */;
2026 short int var15
/* : Bool */;
2029 const char* var_class_name18
;
2030 short int var19
/* : Bool */;
2031 val
* var20
/* : nullable ConcatNode */;
2032 var_parent_node
= p0
;
2035 if (var_parent_node
== NULL
) {
2036 var1
= 0; /* is null */
2038 var1
= 1; /* arg is null and recv is not */
2041 ((void (*)(val
*))(var_parent_node
->class->vft
[COLOR_ropes__ConcatNode__update_data
]))(var_parent_node
) /* update_data on <var_parent_node:nullable ConcatNode(ConcatNode)>*/;
2042 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)>*/;
2043 var_node_balance
= var2
;
2045 { /* Inline kernel#Int#unary - (var4) */
2051 { /* Inline kernel#Int#< (var_node_balance,var5) */
2052 /* Covariant cast for argument 0 (i) <var5:Int> isa OTHER */
2053 /* <var5:Int> isa OTHER */
2054 var10
= 1; /* easy <var5:Int> isa OTHER*/
2056 var_class_name
= type_kernel__Int
.name
;
2057 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name
);
2058 fprintf(stderr
, " (%s:%d)\n", "lib/standard/kernel.nit", 261);
2061 var11
= var_node_balance
< var5
;
2071 { /* Inline kernel#Int#> (var_node_balance,var12) */
2072 /* Covariant cast for argument 0 (i) <var12:Int> isa OTHER */
2073 /* <var12:Int> isa OTHER */
2074 var15
= 1; /* easy <var12:Int> isa OTHER*/
2076 var_class_name18
= type_kernel__Int
.name
;
2077 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name18
);
2078 fprintf(stderr
, " (%s:%d)\n", "lib/standard/kernel.nit", 263);
2081 var19
= var_node_balance
> var12
;
2084 RET_LABEL14
:(void)0;
2089 ((void (*)(val
*, val
*))(self
->class->vft
[COLOR_ropes__BufferRope__balance_node
]))(self
, var_parent_node
) /* balance_node on <self:BufferRope>*/;
2092 var20
= ((val
* (*)(val
*))(var_parent_node
->class->vft
[COLOR_ropes__RopeNode__parent
]))(var_parent_node
) /* parent on <var_parent_node:nullable ConcatNode(ConcatNode)>*/;
2093 var_parent_node
= var20
;
2094 CONTINUE_label
: (void)0;
2096 BREAK_label
: (void)0;
2099 /* method ropes#BufferRope#balance_from_node for (self: Object, nullable ConcatNode) */
2100 void VIRTUAL_ropes__BufferRope__balance_from_node(val
* self
, val
* p0
) {
2101 ropes__BufferRope__balance_from_node(self
, p0
);
2104 /* method ropes#BufferRope#balance_node for (self: BufferRope, ConcatNode) */
2105 void ropes__BufferRope__balance_node(val
* self
, val
* p0
) {
2106 val
* var_node
/* var node: ConcatNode */;
2107 long var
/* : Int */;
2108 long var_balance_factor
/* var balance_factor: Int */;
2109 long var1
/* : Int */;
2110 long var2
/* : Int */;
2111 long var4
/* : Int */;
2112 short int var5
/* : Bool */;
2113 short int var7
/* : Bool */;
2116 const char* var_class_name
;
2117 short int var8
/* : Bool */;
2118 val
* var9
/* : nullable RopeNode */;
2119 long var10
/* : Int */;
2120 long var_right_balance
/* var right_balance: Int */;
2121 long var11
/* : Int */;
2122 short int var12
/* : Bool */;
2123 short int var14
/* : Bool */;
2126 const char* var_class_name17
;
2127 short int var18
/* : Bool */;
2128 val
* var19
/* : nullable RopeNode */;
2129 short int var20
/* : Bool */;
2132 const char* var_class_name23
;
2133 val
* var24
/* : nullable RopeNode */;
2134 long var25
/* : Int */;
2135 long var_left_balance
/* var left_balance: Int */;
2136 long var26
/* : Int */;
2137 short int var27
/* : Bool */;
2138 short int var29
/* : Bool */;
2141 const char* var_class_name32
;
2142 short int var33
/* : Bool */;
2143 val
* var34
/* : nullable RopeNode */;
2144 short int var35
/* : Bool */;
2147 const char* var_class_name38
;
2149 var
= ((long (*)(val
*))(var_node
->class->vft
[COLOR_ropes__RopeNode__balance_factor
]))(var_node
) /* balance_factor on <var_node:ConcatNode>*/;
2150 var_balance_factor
= var
;
2152 { /* Inline kernel#Int#unary - (var1) */
2158 { /* Inline kernel#Int#< (var_balance_factor,var2) */
2159 /* Covariant cast for argument 0 (i) <var2:Int> isa OTHER */
2160 /* <var2:Int> isa OTHER */
2161 var7
= 1; /* easy <var2:Int> isa OTHER*/
2163 var_class_name
= type_kernel__Int
.name
;
2164 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name
);
2165 fprintf(stderr
, " (%s:%d)\n", "lib/standard/kernel.nit", 261);
2168 var8
= var_balance_factor
< var2
;
2174 var9
= ((val
* (*)(val
*))(var_node
->class->vft
[COLOR_ropes__ConcatNode__right_child
]))(var_node
) /* right_child on <var_node:ConcatNode>*/;
2176 fprintf(stderr
, "Runtime error: %s", "Reciever is null");
2177 fprintf(stderr
, " (%s:%d)\n", "lib/standard/ropes.nit", 429);
2180 var10
= ((long (*)(val
*))(var9
->class->vft
[COLOR_ropes__RopeNode__balance_factor
]))(var9
) /* balance_factor on <var9:nullable RopeNode>*/;
2182 var_right_balance
= var10
;
2184 { /* Inline kernel#Int#< (var_right_balance,var11) */
2185 /* Covariant cast for argument 0 (i) <var11:Int> isa OTHER */
2186 /* <var11:Int> isa OTHER */
2187 var14
= 1; /* easy <var11:Int> isa OTHER*/
2189 var_class_name17
= type_kernel__Int
.name
;
2190 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name17
);
2191 fprintf(stderr
, " (%s:%d)\n", "lib/standard/kernel.nit", 261);
2194 var18
= var_right_balance
< var11
;
2197 RET_LABEL13
:(void)0;
2200 ((void (*)(val
*, val
*))(self
->class->vft
[COLOR_ropes__BufferRope__rotate_left
]))(self
, var_node
) /* rotate_left on <self:BufferRope>*/;
2202 var19
= ((val
* (*)(val
*))(var_node
->class->vft
[COLOR_ropes__ConcatNode__right_child
]))(var_node
) /* right_child on <var_node:ConcatNode>*/;
2203 /* <var19:nullable RopeNode> isa ConcatNode */
2204 cltype21
= type_ropes__ConcatNode
.color
;
2205 idtype22
= type_ropes__ConcatNode
.id
;
2209 if(cltype21
>= var19
->type
->table_size
) {
2212 var20
= var19
->type
->type_table
[cltype21
] == idtype22
;
2216 var_class_name23
= var19
== NULL ?
"null" : var19
->type
->name
;
2217 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "ConcatNode", var_class_name23
);
2218 fprintf(stderr
, " (%s:%d)\n", "lib/standard/ropes.nit", 433);
2221 ((void (*)(val
*, val
*))(self
->class->vft
[COLOR_ropes__BufferRope__rotate_right
]))(self
, var19
) /* rotate_right on <self:BufferRope>*/;
2222 ((void (*)(val
*, val
*))(self
->class->vft
[COLOR_ropes__BufferRope__rotate_left
]))(self
, var_node
) /* rotate_left on <self:BufferRope>*/;
2225 var24
= ((val
* (*)(val
*))(var_node
->class->vft
[COLOR_ropes__ConcatNode__left_child
]))(var_node
) /* left_child on <var_node:ConcatNode>*/;
2226 if (var24
== NULL
) {
2227 fprintf(stderr
, "Runtime error: %s", "Reciever is null");
2228 fprintf(stderr
, " (%s:%d)\n", "lib/standard/ropes.nit", 437);
2231 var25
= ((long (*)(val
*))(var24
->class->vft
[COLOR_ropes__RopeNode__balance_factor
]))(var24
) /* balance_factor on <var24:nullable RopeNode>*/;
2233 var_left_balance
= var25
;
2235 { /* Inline kernel#Int#> (var_left_balance,var26) */
2236 /* Covariant cast for argument 0 (i) <var26:Int> isa OTHER */
2237 /* <var26:Int> isa OTHER */
2238 var29
= 1; /* easy <var26:Int> isa OTHER*/
2240 var_class_name32
= type_kernel__Int
.name
;
2241 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name32
);
2242 fprintf(stderr
, " (%s:%d)\n", "lib/standard/kernel.nit", 263);
2245 var33
= var_left_balance
> var26
;
2248 RET_LABEL28
:(void)0;
2251 ((void (*)(val
*, val
*))(self
->class->vft
[COLOR_ropes__BufferRope__rotate_right
]))(self
, var_node
) /* rotate_right on <self:BufferRope>*/;
2253 var34
= ((val
* (*)(val
*))(var_node
->class->vft
[COLOR_ropes__ConcatNode__left_child
]))(var_node
) /* left_child on <var_node:ConcatNode>*/;
2254 /* <var34:nullable RopeNode> isa ConcatNode */
2255 cltype36
= type_ropes__ConcatNode
.color
;
2256 idtype37
= type_ropes__ConcatNode
.id
;
2260 if(cltype36
>= var34
->type
->table_size
) {
2263 var35
= var34
->type
->type_table
[cltype36
] == idtype37
;
2267 var_class_name38
= var34
== NULL ?
"null" : var34
->type
->name
;
2268 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "ConcatNode", var_class_name38
);
2269 fprintf(stderr
, " (%s:%d)\n", "lib/standard/ropes.nit", 441);
2272 ((void (*)(val
*, val
*))(self
->class->vft
[COLOR_ropes__BufferRope__rotate_left
]))(self
, var34
) /* rotate_left on <self:BufferRope>*/;
2273 ((void (*)(val
*, val
*))(self
->class->vft
[COLOR_ropes__BufferRope__rotate_right
]))(self
, var_node
) /* rotate_right on <self:BufferRope>*/;
2278 /* method ropes#BufferRope#balance_node for (self: Object, ConcatNode) */
2279 void VIRTUAL_ropes__BufferRope__balance_node(val
* self
, val
* p0
) {
2280 ropes__BufferRope__balance_node(self
, p0
);
2283 /* method ropes#BufferRope#append for (self: BufferRope, Collection[Char]): BufferRope */
2284 val
* ropes__BufferRope__append(val
* self
, val
* p0
) {
2285 val
* var
/* : BufferRope */;
2286 val
* var_str
/* var str: Collection[Char] */;
2287 short int var1
/* : Bool */;
2290 val
* var2
/* : RopeNode */;
2291 val
* var_last_node
/* var last_node: RopeNode */;
2292 short int var3
/* : Bool */;
2293 short int var4
/* : Bool */;
2296 short int var_
/* var : Bool */;
2297 val
* var7
/* : nullable RopeNode */;
2298 val
* var8
/* : null */;
2299 short int var9
/* : Bool */;
2300 val
* var10
/* : nullable RopeNode */;
2301 short int var11
/* : Bool */;
2304 val
* var14
/* : LeafNode */;
2305 val
* var15
/* : String */;
2306 short int var16
/* : Bool */;
2309 val
* var19
/* : nullable ConcatNode */;
2310 val
* var_last_node_parent
/* var last_node_parent: nullable ConcatNode */;
2311 val
* var20
/* : ConcatNode */;
2312 val
* var_new_concat
/* var new_concat: ConcatNode */;
2313 val
* var21
/* : LeafNode */;
2314 val
* var22
/* : String */;
2315 static val
* varonce
;
2316 val
* var23
/* : String */;
2317 char* var24
/* : NativeString */;
2318 long var25
/* : Int */;
2319 val
* var26
/* : String */;
2320 val
* var27
/* : Buffer */;
2321 long var28
/* : Int */;
2322 val
* var_buf
/* var buf: Buffer */;
2323 val
* var29
/* : Iterator[nullable Object] */;
2324 short int var30
/* : Bool */;
2325 val
* var31
/* : nullable Object */;
2326 char var_i
/* var i: Char */;
2327 char var32
/* : Char */;
2328 val
* var33
/* : nullable Object */;
2329 val
* var35
/* : BufferRope */;
2330 short int var36
/* : Bool */;
2331 short int var37
/* : Bool */;
2332 short int var38
/* : Bool */;
2334 /* <var_str:Collection[Char]> isa AbstractString */
2335 cltype
= type_string__AbstractString
.color
;
2336 idtype
= type_string__AbstractString
.id
;
2337 if(cltype
>= var_str
->type
->table_size
) {
2340 var1
= var_str
->type
->type_table
[cltype
] == idtype
;
2343 var2
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_ropes__Rope__parent_node
]))(self
) /* parent_node on <self:BufferRope>*/;
2344 var_last_node
= var2
;
2346 /* <var_last_node:RopeNode> isa ConcatNode */
2347 cltype5
= type_ropes__ConcatNode
.color
;
2348 idtype6
= type_ropes__ConcatNode
.id
;
2349 if(cltype5
>= var_last_node
->type
->table_size
) {
2352 var4
= var_last_node
->type
->type_table
[cltype5
] == idtype6
;
2356 var7
= ((val
* (*)(val
*))(var_last_node
->class->vft
[COLOR_ropes__ConcatNode__right_child
]))(var_last_node
) /* right_child on <var_last_node:RopeNode(ConcatNode)>*/;
2359 var9
= 0; /* is null */
2361 var9
= 1; /* arg is null and recv is not */
2368 var10
= ((val
* (*)(val
*))(var_last_node
->class->vft
[COLOR_ropes__ConcatNode__right_child
]))(var_last_node
) /* right_child on <var_last_node:RopeNode(ConcatNode)>*/;
2369 if (var10
== NULL
) {
2370 fprintf(stderr
, "Runtime error: %s", "Cast failed");
2371 fprintf(stderr
, " (%s:%d)\n", "lib/standard/ropes.nit", 458);
2374 var_last_node
= var10
;
2375 CONTINUE_label
: (void)0;
2377 BREAK_label
: (void)0;
2378 /* <var_last_node:RopeNode> isa ConcatNode */
2379 cltype12
= type_ropes__ConcatNode
.color
;
2380 idtype13
= type_ropes__ConcatNode
.id
;
2381 if(cltype12
>= var_last_node
->type
->table_size
) {
2384 var11
= var_last_node
->type
->type_table
[cltype12
] == idtype13
;
2387 var14
= NEW_ropes__LeafNode(&type_ropes__LeafNode
);
2388 var15
= ((val
* (*)(val
*))(var_str
->class->vft
[COLOR_string__Object__to_s
]))(var_str
) /* to_s on <var_str:Collection[Char](AbstractString)>*/;
2389 ((void (*)(val
*, val
*))(var14
->class->vft
[COLOR_ropes__LeafNode__init
]))(var14
, var15
) /* init on <var14:LeafNode>*/;
2390 CHECK_NEW_ropes__LeafNode(var14
);
2391 ((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)>*/;
2393 /* <var_last_node:RopeNode> isa LeafNode */
2394 cltype17
= type_ropes__LeafNode
.color
;
2395 idtype18
= type_ropes__LeafNode
.id
;
2396 if(cltype17
>= var_last_node
->type
->table_size
) {
2399 var16
= var_last_node
->type
->type_table
[cltype17
] == idtype18
;
2402 var19
= ((val
* (*)(val
*))(var_last_node
->class->vft
[COLOR_ropes__RopeNode__parent
]))(var_last_node
) /* parent on <var_last_node:RopeNode(LeafNode)>*/;
2403 var_last_node_parent
= var19
;
2404 var20
= NEW_ropes__ConcatNode(&type_ropes__ConcatNode
);
2405 ((void (*)(val
*))(var20
->class->vft
[COLOR_ropes__ConcatNode__init
]))(var20
) /* init on <var20:ConcatNode>*/;
2406 CHECK_NEW_ropes__ConcatNode(var20
);
2407 var_new_concat
= var20
;
2408 if (var_last_node_parent
== NULL
) {
2409 fprintf(stderr
, "Runtime error: %s", "Reciever is null");
2410 fprintf(stderr
, " (%s:%d)\n", "lib/standard/ropes.nit", 466);
2413 ((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>*/;
2415 ((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>*/;
2416 var21
= NEW_ropes__LeafNode(&type_ropes__LeafNode
);
2417 var22
= ((val
* (*)(val
*))(var_str
->class->vft
[COLOR_string__Object__to_s
]))(var_str
) /* to_s on <var_str:Collection[Char](AbstractString)>*/;
2418 ((void (*)(val
*, val
*))(var21
->class->vft
[COLOR_ropes__LeafNode__init
]))(var21
, var22
) /* init on <var21:LeafNode>*/;
2419 CHECK_NEW_ropes__LeafNode(var21
);
2420 ((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>*/;
2421 var_last_node
= var_new_concat
;
2426 var24
= "Fatal Error, please report to the developers for more insight.";
2428 var26
= string__NativeString__to_s_with_length(var24
, var25
);
2432 ((void (*)(val
*, val
*))(self
->class->vft
[COLOR_file__Object__print
]))(self
, var23
) /* print on <self:BufferRope>*/;
2433 fprintf(stderr
, "Runtime error: %s", "Aborted");
2434 fprintf(stderr
, " (%s:%d)\n", "lib/standard/ropes.nit", 472);
2438 ((void (*)(val
*, val
*))(self
->class->vft
[COLOR_ropes__BufferRope__balance_from_node
]))(self
, var_last_node
) /* balance_from_node on <self:BufferRope>*/;
2440 var27
= NEW_string__Buffer(&type_string__Buffer
);
2441 var28
= ((long (*)(val
*))(var_str
->class->vft
[COLOR_abstract_collection__Collection__length
]))(var_str
) /* length on <var_str:Collection[Char]>*/;
2442 ((void (*)(val
*, long))(var27
->class->vft
[COLOR_string__Buffer__with_capacity
]))(var27
, var28
) /* with_capacity on <var27:Buffer>*/;
2443 CHECK_NEW_string__Buffer(var27
);
2445 var29
= ((val
* (*)(val
*))(var_str
->class->vft
[COLOR_abstract_collection__Collection__iterator
]))(var_str
) /* iterator on <var_str:Collection[Char]>*/;
2447 var30
= ((short int (*)(val
*))(var29
->class->vft
[COLOR_abstract_collection__Iterator__is_ok
]))(var29
) /* is_ok on <var29:Iterator[nullable Object]>*/;
2449 var31
= ((val
* (*)(val
*))(var29
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var29
) /* item on <var29:Iterator[nullable Object]>*/;
2450 var32
= ((struct instance_kernel__Char
*)var31
)->value
; /* autounbox from nullable Object to Char */;
2452 var33
= BOX_kernel__Char(var_i
); /* autobox from Char to nullable Object */
2453 ((void (*)(val
*, val
*))(var_buf
->class->vft
[COLOR_abstract_collection__SimpleCollection__add
]))(var_buf
, var33
) /* add on <var_buf:Buffer>*/;
2454 CONTINUE_label34
: (void)0;
2455 ((void (*)(val
*))(var29
->class->vft
[COLOR_abstract_collection__Iterator__next
]))(var29
) /* next on <var29:Iterator[nullable Object]>*/;
2457 BREAK_label34
: (void)0;
2458 var35
= ((val
* (*)(val
*, val
*))(self
->class->vft
[COLOR_ropes__BufferRope__append
]))(self
, var_buf
) /* append on <self:BufferRope>*/;
2461 var36
= ((short int (*)(val
*))(self
->class->vft
[COLOR_ropes__BufferRope__is_dirty
]))(self
) /* is_dirty on <self:BufferRope>*/;
2465 ((void (*)(val
*, short int))(self
->class->vft
[COLOR_ropes__BufferRope__is_dirty_61d
]))(self
, var38
) /* is_dirty= on <self:BufferRope>*/;
2473 /* method ropes#BufferRope#append for (self: Object, Collection[Char]): BufferRope */
2474 val
* VIRTUAL_ropes__BufferRope__append(val
* self
, val
* p0
) {
2475 val
* var
/* : BufferRope */;
2476 val
* var1
/* : BufferRope */;
2477 var1
= ropes__BufferRope__append(self
, p0
);
2482 /* method ropes#BufferRope#append_multi for (self: BufferRope, Array[Collection[Char]]): BufferRope */
2483 val
* ropes__BufferRope__append_multi(val
* self
, val
* p0
) {
2484 val
* var
/* : BufferRope */;
2485 val
* var_strs
/* var strs: Array[Collection[Char]] */;
2486 val
* var1
/* : Iterator[nullable Object] */;
2487 short int var2
/* : Bool */;
2488 val
* var3
/* : nullable Object */;
2489 val
* var_i
/* var i: Collection[Char] */;
2490 val
* var4
/* : BufferRope */;
2492 var1
= ((val
* (*)(val
*))(var_strs
->class->vft
[COLOR_abstract_collection__Collection__iterator
]))(var_strs
) /* iterator on <var_strs:Array[Collection[Char]]>*/;
2494 var2
= ((short int (*)(val
*))(var1
->class->vft
[COLOR_abstract_collection__Iterator__is_ok
]))(var1
) /* is_ok on <var1:Iterator[nullable Object]>*/;
2496 var3
= ((val
* (*)(val
*))(var1
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var1
) /* item on <var1:Iterator[nullable Object]>*/;
2498 var4
= ((val
* (*)(val
*, val
*))(self
->class->vft
[COLOR_ropes__BufferRope__append
]))(self
, var_i
) /* append on <self:BufferRope>*/;
2500 CONTINUE_label
: (void)0;
2501 ((void (*)(val
*))(var1
->class->vft
[COLOR_abstract_collection__Iterator__next
]))(var1
) /* next on <var1:Iterator[nullable Object]>*/;
2503 BREAK_label
: (void)0;
2509 /* method ropes#BufferRope#append_multi for (self: Object, Array[Collection[Char]]): BufferRope */
2510 val
* VIRTUAL_ropes__BufferRope__append_multi(val
* self
, val
* p0
) {
2511 val
* var
/* : BufferRope */;
2512 val
* var1
/* : BufferRope */;
2513 var1
= ropes__BufferRope__append_multi(self
, p0
);
2518 /* method ropes#BufferRope#prepend for (self: BufferRope, Collection[Char]): BufferRope */
2519 val
* ropes__BufferRope__prepend(val
* self
, val
* p0
) {
2520 val
* var
/* : BufferRope */;
2521 val
* var_str
/* var str: Collection[Char] */;
2522 short int var1
/* : Bool */;
2525 val
* var2
/* : RopeNode */;
2526 val
* var_curr_node
/* var curr_node: RopeNode */;
2527 short int var3
/* : Bool */;
2528 short int var4
/* : Bool */;
2531 short int var_
/* var : Bool */;
2532 val
* var7
/* : nullable RopeNode */;
2533 val
* var8
/* : null */;
2534 short int var9
/* : Bool */;
2535 val
* var10
/* : nullable RopeNode */;
2536 short int var11
/* : Bool */;
2539 val
* var14
/* : LeafNode */;
2540 val
* var15
/* : String */;
2541 short int var16
/* : Bool */;
2544 val
* var19
/* : nullable ConcatNode */;
2545 val
* var_parent
/* var parent: nullable ConcatNode */;
2546 val
* var20
/* : ConcatNode */;
2547 val
* var_new_concat
/* var new_concat: ConcatNode */;
2548 val
* var21
/* : LeafNode */;
2549 val
* var22
/* : String */;
2550 val
* var_new_leaf
/* var new_leaf: LeafNode */;
2551 static val
* varonce
;
2552 val
* var23
/* : String */;
2553 char* var24
/* : NativeString */;
2554 long var25
/* : Int */;
2555 val
* var26
/* : String */;
2556 val
* var27
/* : Buffer */;
2557 long var28
/* : Int */;
2558 val
* var_buf
/* var buf: Buffer */;
2559 val
* var29
/* : Iterator[nullable Object] */;
2560 short int var30
/* : Bool */;
2561 val
* var31
/* : nullable Object */;
2562 char var_i
/* var i: Char */;
2563 char var32
/* : Char */;
2564 val
* var33
/* : nullable Object */;
2565 val
* var35
/* : String */;
2566 val
* var36
/* : BufferRope */;
2567 short int var37
/* : Bool */;
2568 short int var38
/* : Bool */;
2569 short int var39
/* : Bool */;
2571 /* <var_str:Collection[Char]> isa AbstractString */
2572 cltype
= type_string__AbstractString
.color
;
2573 idtype
= type_string__AbstractString
.id
;
2574 if(cltype
>= var_str
->type
->table_size
) {
2577 var1
= var_str
->type
->type_table
[cltype
] == idtype
;
2580 var2
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_ropes__Rope__parent_node
]))(self
) /* parent_node on <self:BufferRope>*/;
2581 var_curr_node
= var2
;
2583 /* <var_curr_node:RopeNode> isa ConcatNode */
2584 cltype5
= type_ropes__ConcatNode
.color
;
2585 idtype6
= type_ropes__ConcatNode
.id
;
2586 if(cltype5
>= var_curr_node
->type
->table_size
) {
2589 var4
= var_curr_node
->type
->type_table
[cltype5
] == idtype6
;
2593 var7
= ((val
* (*)(val
*))(var_curr_node
->class->vft
[COLOR_ropes__ConcatNode__left_child
]))(var_curr_node
) /* left_child on <var_curr_node:RopeNode(ConcatNode)>*/;
2596 var9
= 0; /* is null */
2598 var9
= 1; /* arg is null and recv is not */
2605 var10
= ((val
* (*)(val
*))(var_curr_node
->class->vft
[COLOR_ropes__ConcatNode__left_child
]))(var_curr_node
) /* left_child on <var_curr_node:RopeNode(ConcatNode)>*/;
2606 if (var10
== NULL
) {
2607 fprintf(stderr
, "Runtime error: %s", "Cast failed");
2608 fprintf(stderr
, " (%s:%d)\n", "lib/standard/ropes.nit", 505);
2611 var_curr_node
= var10
;
2612 CONTINUE_label
: (void)0;
2614 BREAK_label
: (void)0;
2615 /* <var_curr_node:RopeNode> isa ConcatNode */
2616 cltype12
= type_ropes__ConcatNode
.color
;
2617 idtype13
= type_ropes__ConcatNode
.id
;
2618 if(cltype12
>= var_curr_node
->type
->table_size
) {
2621 var11
= var_curr_node
->type
->type_table
[cltype12
] == idtype13
;
2624 var14
= NEW_ropes__LeafNode(&type_ropes__LeafNode
);
2625 var15
= ((val
* (*)(val
*))(var_str
->class->vft
[COLOR_string__Object__to_s
]))(var_str
) /* to_s on <var_str:Collection[Char](AbstractString)>*/;
2626 ((void (*)(val
*, val
*))(var14
->class->vft
[COLOR_ropes__LeafNode__init
]))(var14
, var15
) /* init on <var14:LeafNode>*/;
2627 CHECK_NEW_ropes__LeafNode(var14
);
2628 ((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)>*/;
2630 /* <var_curr_node:RopeNode> isa LeafNode */
2631 cltype17
= type_ropes__LeafNode
.color
;
2632 idtype18
= type_ropes__LeafNode
.id
;
2633 if(cltype17
>= var_curr_node
->type
->table_size
) {
2636 var16
= var_curr_node
->type
->type_table
[cltype17
] == idtype18
;
2639 var19
= ((val
* (*)(val
*))(var_curr_node
->class->vft
[COLOR_ropes__RopeNode__parent
]))(var_curr_node
) /* parent on <var_curr_node:RopeNode(LeafNode)>*/;
2641 var20
= NEW_ropes__ConcatNode(&type_ropes__ConcatNode
);
2642 ((void (*)(val
*))(var20
->class->vft
[COLOR_ropes__ConcatNode__init
]))(var20
) /* init on <var20:ConcatNode>*/;
2643 CHECK_NEW_ropes__ConcatNode(var20
);
2644 var_new_concat
= var20
;
2645 var21
= NEW_ropes__LeafNode(&type_ropes__LeafNode
);
2646 var22
= ((val
* (*)(val
*))(var_str
->class->vft
[COLOR_string__Object__to_s
]))(var_str
) /* to_s on <var_str:Collection[Char](AbstractString)>*/;
2647 ((void (*)(val
*, val
*))(var21
->class->vft
[COLOR_ropes__LeafNode__init
]))(var21
, var22
) /* init on <var21:LeafNode>*/;
2648 CHECK_NEW_ropes__LeafNode(var21
);
2649 var_new_leaf
= var21
;
2650 ((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>*/;
2651 ((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>*/;
2652 if (var_parent
== NULL
) {
2653 fprintf(stderr
, "Runtime error: %s", "Reciever is null");
2654 fprintf(stderr
, " (%s:%d)\n", "lib/standard/ropes.nit", 516);
2657 ((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>*/;
2659 var_curr_node
= var_new_concat
;
2664 var24
= "Fatal Error";
2666 var26
= string__NativeString__to_s_with_length(var24
, var25
);
2670 ((void (*)(val
*, val
*))(self
->class->vft
[COLOR_file__Object__print
]))(self
, var23
) /* print on <self:BufferRope>*/;
2671 fprintf(stderr
, "Runtime error: %s", "Aborted");
2672 fprintf(stderr
, " (%s:%d)\n", "lib/standard/ropes.nit", 520);
2676 ((void (*)(val
*, val
*))(self
->class->vft
[COLOR_ropes__BufferRope__balance_from_node
]))(self
, var_curr_node
) /* balance_from_node on <self:BufferRope>*/;
2678 var27
= NEW_string__Buffer(&type_string__Buffer
);
2679 var28
= ((long (*)(val
*))(var_str
->class->vft
[COLOR_abstract_collection__Collection__length
]))(var_str
) /* length on <var_str:Collection[Char]>*/;
2680 ((void (*)(val
*, long))(var27
->class->vft
[COLOR_string__Buffer__with_capacity
]))(var27
, var28
) /* with_capacity on <var27:Buffer>*/;
2681 CHECK_NEW_string__Buffer(var27
);
2683 var29
= ((val
* (*)(val
*))(var_str
->class->vft
[COLOR_abstract_collection__Collection__iterator
]))(var_str
) /* iterator on <var_str:Collection[Char]>*/;
2685 var30
= ((short int (*)(val
*))(var29
->class->vft
[COLOR_abstract_collection__Iterator__is_ok
]))(var29
) /* is_ok on <var29:Iterator[nullable Object]>*/;
2687 var31
= ((val
* (*)(val
*))(var29
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var29
) /* item on <var29:Iterator[nullable Object]>*/;
2688 var32
= ((struct instance_kernel__Char
*)var31
)->value
; /* autounbox from nullable Object to Char */;
2690 var33
= BOX_kernel__Char(var_i
); /* autobox from Char to nullable Object */
2691 ((void (*)(val
*, val
*))(var_buf
->class->vft
[COLOR_abstract_collection__SimpleCollection__add
]))(var_buf
, var33
) /* add on <var_buf:Buffer>*/;
2692 CONTINUE_label34
: (void)0;
2693 ((void (*)(val
*))(var29
->class->vft
[COLOR_abstract_collection__Iterator__next
]))(var29
) /* next on <var29:Iterator[nullable Object]>*/;
2695 BREAK_label34
: (void)0;
2696 var35
= ((val
* (*)(val
*))(var_buf
->class->vft
[COLOR_string__Object__to_s
]))(var_buf
) /* to_s on <var_buf:Buffer>*/;
2697 var36
= ((val
* (*)(val
*, val
*))(self
->class->vft
[COLOR_ropes__BufferRope__prepend
]))(self
, var35
) /* prepend on <self:BufferRope>*/;
2700 var37
= ((short int (*)(val
*))(self
->class->vft
[COLOR_ropes__BufferRope__is_dirty
]))(self
) /* is_dirty on <self:BufferRope>*/;
2704 ((void (*)(val
*, short int))(self
->class->vft
[COLOR_ropes__BufferRope__is_dirty_61d
]))(self
, var39
) /* is_dirty= on <self:BufferRope>*/;
2712 /* method ropes#BufferRope#prepend for (self: Object, Collection[Char]): BufferRope */
2713 val
* VIRTUAL_ropes__BufferRope__prepend(val
* self
, val
* p0
) {
2714 val
* var
/* : BufferRope */;
2715 val
* var1
/* : BufferRope */;
2716 var1
= ropes__BufferRope__prepend(self
, p0
);
2721 /* method ropes#BufferRope#prepend_multi for (self: BufferRope, Array[Collection[Char]]): BufferRope */
2722 val
* ropes__BufferRope__prepend_multi(val
* self
, val
* p0
) {
2723 val
* var
/* : BufferRope */;
2724 val
* var_strs
/* var strs: Array[Collection[Char]] */;
2725 val
* var1
/* : Iterator[nullable Object] */;
2726 short int var2
/* : Bool */;
2727 val
* var3
/* : nullable Object */;
2728 val
* var_i
/* var i: Collection[Char] */;
2729 val
* var4
/* : BufferRope */;
2731 var1
= ((val
* (*)(val
*))(var_strs
->class->vft
[COLOR_abstract_collection__Collection__iterator
]))(var_strs
) /* iterator on <var_strs:Array[Collection[Char]]>*/;
2733 var2
= ((short int (*)(val
*))(var1
->class->vft
[COLOR_abstract_collection__Iterator__is_ok
]))(var1
) /* is_ok on <var1:Iterator[nullable Object]>*/;
2735 var3
= ((val
* (*)(val
*))(var1
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var1
) /* item on <var1:Iterator[nullable Object]>*/;
2737 var4
= ((val
* (*)(val
*, val
*))(self
->class->vft
[COLOR_ropes__BufferRope__prepend
]))(self
, var_i
) /* prepend on <self:BufferRope>*/;
2739 CONTINUE_label
: (void)0;
2740 ((void (*)(val
*))(var1
->class->vft
[COLOR_abstract_collection__Iterator__next
]))(var1
) /* next on <var1:Iterator[nullable Object]>*/;
2742 BREAK_label
: (void)0;
2748 /* method ropes#BufferRope#prepend_multi for (self: Object, Array[Collection[Char]]): BufferRope */
2749 val
* VIRTUAL_ropes__BufferRope__prepend_multi(val
* self
, val
* p0
) {
2750 val
* var
/* : BufferRope */;
2751 val
* var1
/* : BufferRope */;
2752 var1
= ropes__BufferRope__prepend_multi(self
, p0
);
2757 /* method ropes#BufferRope#concat for (self: BufferRope, Rope): Rope */
2758 val
* ropes__BufferRope__concat(val
* self
, val
* p0
) {
2759 val
* var
/* : Rope */;
2760 val
* var_str
/* var str: Rope */;
2761 val
* var1
/* : DFSRopeLeafIterator */;
2762 val
* var_other_iter
/* var other_iter: DFSRopeLeafIterator */;
2763 val
* var2
/* : List[String] */;
2764 val
* var_modif_list
/* var modif_list: List[String] */;
2765 short int var3
/* : Bool */;
2766 val
* var4
/* : nullable Object */;
2767 val
* var5
/* : String */;
2768 long var6
/* : Int */;
2769 long var7
/* : Int */;
2770 short int var8
/* : Bool */;
2771 short int var10
/* : Bool */;
2774 const char* var_class_name
;
2775 short int var11
/* : Bool */;
2776 val
* var12
/* : nullable Object */;
2777 val
* var13
/* : BufferRope */;
2778 short int var15
/* : Bool */;
2779 short int var16
/* : Bool */;
2780 short int var17
/* : Bool */;
2782 var1
= NEW_ropes__DFSRopeLeafIterator(&type_ropes__DFSRopeLeafIterator
);
2783 ((void (*)(val
*, val
*))(var1
->class->vft
[COLOR_ropes__DFSRopeLeafIterator__init
]))(var1
, var_str
) /* init on <var1:DFSRopeLeafIterator>*/;
2784 CHECK_NEW_ropes__DFSRopeLeafIterator(var1
);
2785 var_other_iter
= var1
;
2786 var2
= NEW_list__List(&type_list__Liststring__String
);
2787 ((void (*)(val
*))(var2
->class->vft
[COLOR_list__List__init
]))(var2
) /* init on <var2:List[String]>*/;
2788 CHECK_NEW_list__List(var2
);
2789 var_modif_list
= var2
;
2791 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>*/;
2793 var4
= ((val
* (*)(val
*))(var_other_iter
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var_other_iter
) /* item on <var_other_iter:DFSRopeLeafIterator>*/;
2794 var5
= ((val
* (*)(val
*))(var4
->class->vft
[COLOR_ropes__LeafNode__value
]))(var4
) /* value on <var4:nullable Object(LeafNode)>*/;
2795 ((void (*)(val
*, val
*))(var_modif_list
->class->vft
[COLOR_abstract_collection__Sequence__push
]))(var_modif_list
, var5
) /* push on <var_modif_list:List[String]>*/;
2796 ((void (*)(val
*))(var_other_iter
->class->vft
[COLOR_abstract_collection__Iterator__next
]))(var_other_iter
) /* next on <var_other_iter:DFSRopeLeafIterator>*/;
2797 CONTINUE_label
: (void)0;
2799 BREAK_label
: (void)0;
2801 var6
= ((long (*)(val
*))(var_modif_list
->class->vft
[COLOR_abstract_collection__Collection__length
]))(var_modif_list
) /* length on <var_modif_list:List[String]>*/;
2803 { /* Inline kernel#Int#> (var6,var7) */
2804 /* Covariant cast for argument 0 (i) <var7:Int> isa OTHER */
2805 /* <var7:Int> isa OTHER */
2806 var10
= 1; /* easy <var7:Int> isa OTHER*/
2808 var_class_name
= type_kernel__Int
.name
;
2809 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name
);
2810 fprintf(stderr
, " (%s:%d)\n", "lib/standard/kernel.nit", 263);
2813 var11
= var6
> var7
;
2819 var12
= ((val
* (*)(val
*))(var_modif_list
->class->vft
[COLOR_abstract_collection__Sequence__shift
]))(var_modif_list
) /* shift on <var_modif_list:List[String]>*/;
2820 var13
= ((val
* (*)(val
*, val
*))(self
->class->vft
[COLOR_ropes__BufferRope__append
]))(self
, var12
) /* append on <self:BufferRope>*/;
2822 CONTINUE_label14
: (void)0;
2824 BREAK_label14
: (void)0;
2825 var15
= ((short int (*)(val
*))(self
->class->vft
[COLOR_ropes__BufferRope__is_dirty
]))(self
) /* is_dirty on <self:BufferRope>*/;
2829 ((void (*)(val
*, short int))(self
->class->vft
[COLOR_ropes__BufferRope__is_dirty_61d
]))(self
, var17
) /* is_dirty= on <self:BufferRope>*/;
2837 /* method ropes#BufferRope#concat for (self: Object, Rope): Rope */
2838 val
* VIRTUAL_ropes__BufferRope__concat(val
* self
, val
* p0
) {
2839 val
* var
/* : Rope */;
2840 val
* var1
/* : Rope */;
2841 var1
= ropes__BufferRope__concat(self
, p0
);
2846 /* method ropes#BufferRope#freeze for (self: BufferRope): ImmutableRope */
2847 val
* ropes__BufferRope__freeze(val
* self
) {
2848 val
* var
/* : ImmutableRope */;
2849 val
* var1
/* : BufferRope */;
2850 val
* var_buffer_rope
/* var buffer_rope: BufferRope */;
2851 val
* var2
/* : ImmutableRope */;
2852 val
* var_new_rope
/* var new_rope: ImmutableRope */;
2853 val
* var3
/* : DFSRopeLeafIterator */;
2854 val
* var_iter
/* var iter: DFSRopeLeafIterator */;
2855 short int var4
/* : Bool */;
2856 val
* var5
/* : nullable Object */;
2857 val
* var6
/* : String */;
2858 val
* var7
/* : BufferRope */;
2859 val
* var8
/* : RopeNode */;
2860 short int var9
/* : Bool */;
2861 short int var10
/* : Bool */;
2862 val
* var11
/* : nullable String */;
2863 var1
= NEW_ropes__BufferRope(&type_ropes__BufferRope
);
2864 ((void (*)(val
*))(var1
->class->vft
[COLOR_ropes__BufferRope__init
]))(var1
) /* init on <var1:BufferRope>*/;
2865 CHECK_NEW_ropes__BufferRope(var1
);
2866 var_buffer_rope
= var1
;
2867 var2
= NEW_ropes__ImmutableRope(&type_ropes__ImmutableRope
);
2868 ((void (*)(val
*))(var2
->class->vft
[COLOR_ropes__ImmutableRope__init
]))(var2
) /* init on <var2:ImmutableRope>*/;
2869 CHECK_NEW_ropes__ImmutableRope(var2
);
2870 var_new_rope
= var2
;
2871 var3
= NEW_ropes__DFSRopeLeafIterator(&type_ropes__DFSRopeLeafIterator
);
2872 ((void (*)(val
*, val
*))(var3
->class->vft
[COLOR_ropes__DFSRopeLeafIterator__init
]))(var3
, self
) /* init on <var3:DFSRopeLeafIterator>*/;
2873 CHECK_NEW_ropes__DFSRopeLeafIterator(var3
);
2876 var4
= ((short int (*)(val
*))(var_iter
->class->vft
[COLOR_abstract_collection__Iterator__is_ok
]))(var_iter
) /* is_ok on <var_iter:DFSRopeLeafIterator>*/;
2878 var5
= ((val
* (*)(val
*))(var_iter
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var_iter
) /* item on <var_iter:DFSRopeLeafIterator>*/;
2879 var6
= ((val
* (*)(val
*))(var5
->class->vft
[COLOR_ropes__LeafNode__value
]))(var5
) /* value on <var5:nullable Object(LeafNode)>*/;
2880 var7
= ((val
* (*)(val
*, val
*))(var_buffer_rope
->class->vft
[COLOR_ropes__BufferRope__append
]))(var_buffer_rope
, var6
) /* append on <var_buffer_rope:BufferRope>*/;
2882 ((void (*)(val
*))(var_iter
->class->vft
[COLOR_abstract_collection__Iterator__next
]))(var_iter
) /* next on <var_iter:DFSRopeLeafIterator>*/;
2883 CONTINUE_label
: (void)0;
2885 BREAK_label
: (void)0;
2886 var8
= ((val
* (*)(val
*))(var_buffer_rope
->class->vft
[COLOR_ropes__Rope__parent_node
]))(var_buffer_rope
) /* parent_node on <var_buffer_rope:BufferRope>*/;
2887 ((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>*/;
2888 var9
= ((short int (*)(val
*))(self
->class->vft
[COLOR_ropes__BufferRope__is_dirty
]))(self
) /* is_dirty on <self:BufferRope>*/;
2891 var11
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_ropes__Rope__str_representation
]))(self
) /* str_representation on <self:BufferRope>*/;
2892 ((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>*/;
2900 /* method ropes#BufferRope#freeze for (self: Object): ImmutableRope */
2901 val
* VIRTUAL_ropes__BufferRope__freeze(val
* self
) {
2902 val
* var
/* : ImmutableRope */;
2903 val
* var1
/* : ImmutableRope */;
2904 var1
= ropes__BufferRope__freeze(self
);
2909 /* method ropes#BufferRope#to_immutable for (self: BufferRope): ImmutableRope */
2910 val
* ropes__BufferRope__to_immutable(val
* self
) {
2911 val
* var
/* : ImmutableRope */;
2912 val
* var1
/* : ImmutableRope */;
2913 val
* var_immutable_self
/* var immutable_self: ImmutableRope */;
2914 val
* var2
/* : RopeNode */;
2915 var1
= NEW_ropes__ImmutableRope(&type_ropes__ImmutableRope
);
2916 ((void (*)(val
*))(var1
->class->vft
[COLOR_ropes__ImmutableRope__init
]))(var1
) /* init on <var1:ImmutableRope>*/;
2917 CHECK_NEW_ropes__ImmutableRope(var1
);
2918 var_immutable_self
= var1
;
2919 var2
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_ropes__Rope__parent_node
]))(self
) /* parent_node on <self:BufferRope>*/;
2920 ((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>*/;
2921 var
= var_immutable_self
;
2926 /* method ropes#BufferRope#to_immutable for (self: Object): ImmutableRope */
2927 val
* VIRTUAL_ropes__BufferRope__to_immutable(val
* self
) {
2928 val
* var
/* : ImmutableRope */;
2929 val
* var1
/* : ImmutableRope */;
2930 var1
= ropes__BufferRope__to_immutable(self
);
2935 /* method ropes#BufferRope#subrope for (self: BufferRope, Int, Int): BufferRope */
2936 val
* ropes__BufferRope__subrope(val
* self
, long p0
, long p1
) {
2937 val
* var
/* : BufferRope */;
2938 long var_index_from
/* var index_from: Int */;
2939 long var_count
/* var count: Int */;
2940 val
* var1
/* : Rope */;
2941 short int var2
/* : Bool */;
2944 const char* var_class_name
;
2945 var_index_from
= p0
;
2947 var1
= ((val
* (*)(val
*, long, long))(self
->class->vft
[COLOR_ropes__BufferRope__subrope
]))(self
, p0
, p1
) /* subrope on <self:BufferRope>*/;
2948 /* <var1:Rope> isa BufferRope */
2949 cltype
= type_ropes__BufferRope
.color
;
2950 idtype
= type_ropes__BufferRope
.id
;
2951 if(cltype
>= var1
->type
->table_size
) {
2954 var2
= var1
->type
->type_table
[cltype
] == idtype
;
2957 var_class_name
= var1
== NULL ?
"null" : var1
->type
->name
;
2958 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "BufferRope", var_class_name
);
2959 fprintf(stderr
, " (%s:%d)\n", "lib/standard/ropes.nit", 603);
2967 /* method ropes#BufferRope#subrope for (self: Object, Int, Int): Rope */
2968 val
* VIRTUAL_ropes__BufferRope__subrope(val
* self
, long p0
, long p1
) {
2969 val
* var
/* : Rope */;
2970 val
* var1
/* : BufferRope */;
2971 var1
= ropes__BufferRope__subrope(self
, p0
, p1
);
2976 /* method ropes#BufferRope#* for (self: BufferRope, Int): BufferRope */
2977 val
* ropes__BufferRope___42d(val
* self
, long p0
) {
2978 val
* var
/* : BufferRope */;
2979 long var_repeats
/* var repeats: Int */;
2980 val
* var1
/* : Rope */;
2981 short int var2
/* : Bool */;
2984 const char* var_class_name
;
2986 var1
= ((val
* (*)(val
*, long))(self
->class->vft
[COLOR_ropes__BufferRope___42d
]))(self
, p0
) /* * on <self:BufferRope>*/;
2987 /* <var1:Rope> isa BufferRope */
2988 cltype
= type_ropes__BufferRope
.color
;
2989 idtype
= type_ropes__BufferRope
.id
;
2990 if(cltype
>= var1
->type
->table_size
) {
2993 var2
= var1
->type
->type_table
[cltype
] == idtype
;
2996 var_class_name
= var1
== NULL ?
"null" : var1
->type
->name
;
2997 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "BufferRope", var_class_name
);
2998 fprintf(stderr
, " (%s:%d)\n", "lib/standard/ropes.nit", 608);
3006 /* method ropes#BufferRope#* for (self: Object, Int): Rope */
3007 val
* VIRTUAL_ropes__BufferRope___42d(val
* self
, long p0
) {
3008 val
* var
/* : Rope */;
3009 val
* var1
/* : BufferRope */;
3010 var1
= ropes__BufferRope___42d(self
, p0
);
3015 /* method ropes#BufferRope#+ for (self: BufferRope, Rope): BufferRope */
3016 val
* ropes__BufferRope___43d(val
* self
, val
* p0
) {
3017 val
* var
/* : BufferRope */;
3018 val
* var_other
/* var other: Rope */;
3019 val
* var1
/* : Rope */;
3020 short int var2
/* : Bool */;
3023 const char* var_class_name
;
3025 var1
= ((val
* (*)(val
*, val
*))(self
->class->vft
[COLOR_ropes__BufferRope___43d
]))(self
, p0
) /* + on <self:BufferRope>*/;
3026 /* <var1:Rope> isa BufferRope */
3027 cltype
= type_ropes__BufferRope
.color
;
3028 idtype
= type_ropes__BufferRope
.id
;
3029 if(cltype
>= var1
->type
->table_size
) {
3032 var2
= var1
->type
->type_table
[cltype
] == idtype
;
3035 var_class_name
= var1
== NULL ?
"null" : var1
->type
->name
;
3036 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "BufferRope", var_class_name
);
3037 fprintf(stderr
, " (%s:%d)\n", "lib/standard/ropes.nit", 613);
3045 /* method ropes#BufferRope#+ for (self: Object, Rope): Rope */
3046 val
* VIRTUAL_ropes__BufferRope___43d(val
* self
, val
* p0
) {
3047 val
* var
/* : Rope */;
3048 val
* var1
/* : BufferRope */;
3049 var1
= ropes__BufferRope___43d(self
, p0
);
3054 /* method ropes#BufferRope#multi_concat for (self: BufferRope, Array[Rope]): BufferRope */
3055 val
* ropes__BufferRope__multi_concat(val
* self
, val
* p0
) {
3056 val
* var
/* : BufferRope */;
3057 val
* var_ropes
/* var ropes: Array[Rope] */;
3058 val
* var1
/* : Rope */;
3059 short int var2
/* : Bool */;
3062 const char* var_class_name
;
3064 var1
= ((val
* (*)(val
*, val
*))(self
->class->vft
[COLOR_ropes__BufferRope__multi_concat
]))(self
, p0
) /* multi_concat on <self:BufferRope>*/;
3065 /* <var1:Rope> isa BufferRope */
3066 cltype
= type_ropes__BufferRope
.color
;
3067 idtype
= type_ropes__BufferRope
.id
;
3068 if(cltype
>= var1
->type
->table_size
) {
3071 var2
= var1
->type
->type_table
[cltype
] == idtype
;
3074 var_class_name
= var1
== NULL ?
"null" : var1
->type
->name
;
3075 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "BufferRope", var_class_name
);
3076 fprintf(stderr
, " (%s:%d)\n", "lib/standard/ropes.nit", 618);
3084 /* method ropes#BufferRope#multi_concat for (self: Object, Array[Rope]): Rope */
3085 val
* VIRTUAL_ropes__BufferRope__multi_concat(val
* self
, val
* p0
) {
3086 val
* var
/* : Rope */;
3087 val
* var1
/* : BufferRope */;
3088 var1
= ropes__BufferRope__multi_concat(self
, p0
);
3093 /* method ropes#BufferRope#to_s for (self: BufferRope): String */
3094 val
* ropes__BufferRope__to_s(val
* self
) {
3095 val
* var
/* : String */;
3096 short int var1
/* : Bool */;
3097 val
* var2
/* : nullable String */;
3098 val
* var3
/* : null */;
3099 short int var4
/* : Bool */;
3100 short int var_
/* var : Bool */;
3101 short int var5
/* : Bool */;
3102 val
* var6
/* : String */;
3103 short int var7
/* : Bool */;
3104 val
* var8
/* : nullable String */;
3105 var2
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_ropes__Rope__str_representation
]))(self
) /* str_representation on <self:BufferRope>*/;
3108 var4
= 1; /* is null */
3110 var4
= 0; /* arg is null but recv is not */
3116 var5
= ((short int (*)(val
*))(self
->class->vft
[COLOR_ropes__BufferRope__is_dirty
]))(self
) /* is_dirty on <self:BufferRope>*/;
3120 var6
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_ropes__Rope__flatten
]))(self
) /* flatten on <self:BufferRope>*/;
3121 ((void (*)(val
*, val
*))(self
->class->vft
[COLOR_ropes__Rope__str_representation_61d
]))(self
, var6
) /* str_representation= on <self:BufferRope>*/;
3123 ((void (*)(val
*, short int))(self
->class->vft
[COLOR_ropes__BufferRope__is_dirty_61d
]))(self
, var7
) /* is_dirty= on <self:BufferRope>*/;
3126 var8
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_ropes__Rope__str_representation
]))(self
) /* str_representation on <self:BufferRope>*/;
3128 fprintf(stderr
, "Runtime error: %s", "Cast failed");
3129 fprintf(stderr
, " (%s:%d)\n", "lib/standard/ropes.nit", 629);
3137 /* method ropes#BufferRope#to_s for (self: Object): String */
3138 val
* VIRTUAL_ropes__BufferRope__to_s(val
* self
) {
3139 val
* var
/* : String */;
3140 val
* var1
/* : String */;
3141 var1
= ropes__BufferRope__to_s(self
);
3146 /* method ropes#ImmutableRope#init for (self: ImmutableRope) */
3147 void ropes__ImmutableRope__init(val
* self
) {
3148 ((void (*)(val
*))(self
->class->vft
[COLOR_ropes__Rope__init
]))(self
) /* init on <self:ImmutableRope>*/;
3151 /* method ropes#ImmutableRope#init for (self: Object) */
3152 void VIRTUAL_ropes__ImmutableRope__init(val
* self
) {
3153 ropes__ImmutableRope__init(self
);
3156 /* method ropes#ImmutableRope#with_string for (self: ImmutableRope, AbstractString) */
3157 void ropes__ImmutableRope__with_string(val
* self
, val
* p0
) {
3158 val
* var_str
/* var str: AbstractString */;
3160 ((void (*)(val
*, val
*))(self
->class->vft
[COLOR_ropes__Rope__with_string
]))(self
, p0
) /* with_string on <self:ImmutableRope>*/;
3163 /* method ropes#ImmutableRope#with_string for (self: Object, AbstractString) */
3164 void VIRTUAL_ropes__ImmutableRope__with_string(val
* self
, val
* p0
) {
3165 ropes__ImmutableRope__with_string(self
, p0
);
3168 /* method ropes#ImmutableRope#subrope for (self: ImmutableRope, Int, Int): ImmutableRope */
3169 val
* ropes__ImmutableRope__subrope(val
* self
, long p0
, long p1
) {
3170 val
* var
/* : ImmutableRope */;
3171 long var_index_from
/* var index_from: Int */;
3172 long var_count
/* var count: Int */;
3173 val
* var1
/* : Rope */;
3174 short int var2
/* : Bool */;
3177 const char* var_class_name
;
3178 val
* var3
/* : ImmutableRope */;
3179 var_index_from
= p0
;
3181 var1
= ((val
* (*)(val
*, long, long))(self
->class->vft
[COLOR_ropes__ImmutableRope__subrope
]))(self
, p0
, p1
) /* subrope on <self:ImmutableRope>*/;
3182 /* <var1:Rope> isa BufferRope */
3183 cltype
= type_ropes__BufferRope
.color
;
3184 idtype
= type_ropes__BufferRope
.id
;
3185 if(cltype
>= var1
->type
->table_size
) {
3188 var2
= var1
->type
->type_table
[cltype
] == idtype
;
3191 var_class_name
= var1
== NULL ?
"null" : var1
->type
->name
;
3192 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "BufferRope", var_class_name
);
3193 fprintf(stderr
, " (%s:%d)\n", "lib/standard/ropes.nit", 654);
3196 var3
= ((val
* (*)(val
*))(var1
->class->vft
[COLOR_ropes__BufferRope__to_immutable
]))(var1
) /* to_immutable on <var1:Rope(BufferRope)>*/;
3202 /* method ropes#ImmutableRope#subrope for (self: Object, Int, Int): Rope */
3203 val
* VIRTUAL_ropes__ImmutableRope__subrope(val
* self
, long p0
, long p1
) {
3204 val
* var
/* : Rope */;
3205 val
* var1
/* : ImmutableRope */;
3206 var1
= ropes__ImmutableRope__subrope(self
, p0
, p1
);
3211 /* method ropes#ImmutableRope#* for (self: ImmutableRope, Int): ImmutableRope */
3212 val
* ropes__ImmutableRope___42d(val
* self
, long p0
) {
3213 val
* var
/* : ImmutableRope */;
3214 long var_repeats
/* var repeats: Int */;
3215 val
* var1
/* : Rope */;
3216 short int var2
/* : Bool */;
3219 const char* var_class_name
;
3220 val
* var3
/* : ImmutableRope */;
3222 var1
= ((val
* (*)(val
*, long))(self
->class->vft
[COLOR_ropes__ImmutableRope___42d
]))(self
, p0
) /* * on <self:ImmutableRope>*/;
3223 /* <var1:Rope> isa BufferRope */
3224 cltype
= type_ropes__BufferRope
.color
;
3225 idtype
= type_ropes__BufferRope
.id
;
3226 if(cltype
>= var1
->type
->table_size
) {
3229 var2
= var1
->type
->type_table
[cltype
] == idtype
;
3232 var_class_name
= var1
== NULL ?
"null" : var1
->type
->name
;
3233 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "BufferRope", var_class_name
);
3234 fprintf(stderr
, " (%s:%d)\n", "lib/standard/ropes.nit", 659);
3237 var3
= ((val
* (*)(val
*))(var1
->class->vft
[COLOR_ropes__BufferRope__to_immutable
]))(var1
) /* to_immutable on <var1:Rope(BufferRope)>*/;
3243 /* method ropes#ImmutableRope#* for (self: Object, Int): Rope */
3244 val
* VIRTUAL_ropes__ImmutableRope___42d(val
* self
, long p0
) {
3245 val
* var
/* : Rope */;
3246 val
* var1
/* : ImmutableRope */;
3247 var1
= ropes__ImmutableRope___42d(self
, p0
);
3252 /* method ropes#ImmutableRope#+ for (self: ImmutableRope, Rope): ImmutableRope */
3253 val
* ropes__ImmutableRope___43d(val
* self
, val
* p0
) {
3254 val
* var
/* : ImmutableRope */;
3255 val
* var_other
/* var other: Rope */;
3256 val
* var1
/* : Rope */;
3257 short int var2
/* : Bool */;
3260 const char* var_class_name
;
3261 val
* var3
/* : ImmutableRope */;
3263 var1
= ((val
* (*)(val
*, val
*))(self
->class->vft
[COLOR_ropes__ImmutableRope___43d
]))(self
, p0
) /* + on <self:ImmutableRope>*/;
3264 /* <var1:Rope> isa BufferRope */
3265 cltype
= type_ropes__BufferRope
.color
;
3266 idtype
= type_ropes__BufferRope
.id
;
3267 if(cltype
>= var1
->type
->table_size
) {
3270 var2
= var1
->type
->type_table
[cltype
] == idtype
;
3273 var_class_name
= var1
== NULL ?
"null" : var1
->type
->name
;
3274 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "BufferRope", var_class_name
);
3275 fprintf(stderr
, " (%s:%d)\n", "lib/standard/ropes.nit", 664);
3278 var3
= ((val
* (*)(val
*))(var1
->class->vft
[COLOR_ropes__BufferRope__to_immutable
]))(var1
) /* to_immutable on <var1:Rope(BufferRope)>*/;
3284 /* method ropes#ImmutableRope#+ for (self: Object, Rope): Rope */
3285 val
* VIRTUAL_ropes__ImmutableRope___43d(val
* self
, val
* p0
) {
3286 val
* var
/* : Rope */;
3287 val
* var1
/* : ImmutableRope */;
3288 var1
= ropes__ImmutableRope___43d(self
, p0
);
3293 /* method ropes#ImmutableRope#multi_concat for (self: ImmutableRope, Array[Rope]): ImmutableRope */
3294 val
* ropes__ImmutableRope__multi_concat(val
* self
, val
* p0
) {
3295 val
* var
/* : ImmutableRope */;
3296 val
* var_ropes
/* var ropes: Array[Rope] */;
3297 val
* var1
/* : Rope */;
3298 short int var2
/* : Bool */;
3301 const char* var_class_name
;
3302 val
* var3
/* : ImmutableRope */;
3304 var1
= ((val
* (*)(val
*, val
*))(self
->class->vft
[COLOR_ropes__ImmutableRope__multi_concat
]))(self
, p0
) /* multi_concat on <self:ImmutableRope>*/;
3305 /* <var1:Rope> isa BufferRope */
3306 cltype
= type_ropes__BufferRope
.color
;
3307 idtype
= type_ropes__BufferRope
.id
;
3308 if(cltype
>= var1
->type
->table_size
) {
3311 var2
= var1
->type
->type_table
[cltype
] == idtype
;
3314 var_class_name
= var1
== NULL ?
"null" : var1
->type
->name
;
3315 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "BufferRope", var_class_name
);
3316 fprintf(stderr
, " (%s:%d)\n", "lib/standard/ropes.nit", 669);
3319 var3
= ((val
* (*)(val
*))(var1
->class->vft
[COLOR_ropes__BufferRope__to_immutable
]))(var1
) /* to_immutable on <var1:Rope(BufferRope)>*/;
3325 /* method ropes#ImmutableRope#multi_concat for (self: Object, Array[Rope]): Rope */
3326 val
* VIRTUAL_ropes__ImmutableRope__multi_concat(val
* self
, val
* p0
) {
3327 val
* var
/* : Rope */;
3328 val
* var1
/* : ImmutableRope */;
3329 var1
= ropes__ImmutableRope__multi_concat(self
, p0
);
3334 /* method ropes#CharRopeView#target for (self: CharRopeView): Rope */
3335 val
* ropes__CharRopeView__target(val
* self
) {
3336 val
* var
/* : Rope */;
3337 val
* var1
/* : Rope */;
3338 var1
= self
->attrs
[COLOR_ropes__CharRopeView___64dtarget
].val
; /* @target on <self:CharRopeView> */
3340 fprintf(stderr
, "Runtime error: %s", "Uninitialized attribute @target");
3341 fprintf(stderr
, " (%s:%d)\n", "lib/standard/ropes.nit", 681);
3348 /* method ropes#CharRopeView#target for (self: Object): Rope */
3349 val
* VIRTUAL_ropes__CharRopeView__target(val
* self
) {
3350 val
* var
/* : Rope */;
3351 val
* var1
/* : Rope */;
3352 var1
= ropes__CharRopeView__target(self
);
3357 /* method ropes#CharRopeView#target= for (self: CharRopeView, Rope) */
3358 void ropes__CharRopeView__target_61d(val
* self
, val
* p0
) {
3359 self
->attrs
[COLOR_ropes__CharRopeView___64dtarget
].val
= p0
; /* @target on <self:CharRopeView> */
3362 /* method ropes#CharRopeView#target= for (self: Object, Rope) */
3363 void VIRTUAL_ropes__CharRopeView__target_61d(val
* self
, val
* p0
) {
3364 ropes__CharRopeView__target_61d(self
, p0
);
3367 /* method ropes#CharRopeView#init for (self: CharRopeView, Rope) */
3368 void ropes__CharRopeView__init(val
* self
, val
* p0
) {
3369 val
* var_tgt
/* var tgt: Rope */;
3371 ((void (*)(val
*, val
*))(self
->class->vft
[COLOR_ropes__CharRopeView__target_61d
]))(self
, var_tgt
) /* target= on <self:CharRopeView>*/;
3374 /* method ropes#CharRopeView#init for (self: Object, Rope) */
3375 void VIRTUAL_ropes__CharRopeView__init(val
* self
, val
* p0
) {
3376 ropes__CharRopeView__init(self
, p0
);
3379 /* method ropes#CharRopeView#[] for (self: CharRopeView, Int): Char */
3380 char ropes__CharRopeView___91d_93d(val
* self
, long p0
) {
3381 char var
/* : Char */;
3382 long var_position
/* var position: Int */;
3383 val
* var1
/* : Rope */;
3384 val
* var2
/* : TupleLeafNodePos */;
3385 val
* var_tuple
/* var tuple: TupleLeafNodePos */;
3386 val
* var3
/* : LeafNode */;
3387 val
* var4
/* : String */;
3388 long var5
/* : Int */;
3389 val
* var6
/* : nullable Object */;
3390 char var7
/* : Char */;
3392 var1
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_ropes__CharRopeView__target
]))(self
) /* target on <self:CharRopeView>*/;
3393 var2
= ((val
* (*)(val
*, long))(var1
->class->vft
[COLOR_ropes__Rope__get_node_for_pos
]))(var1
, var_position
) /* get_node_for_pos on <var1:Rope>*/;
3395 var3
= ((val
* (*)(val
*))(var_tuple
->class->vft
[COLOR_ropes__TupleLeafNodePos__curr_node
]))(var_tuple
) /* curr_node on <var_tuple:TupleLeafNodePos>*/;
3396 var4
= ((val
* (*)(val
*))(var3
->class->vft
[COLOR_ropes__LeafNode__value
]))(var3
) /* value on <var3:LeafNode>*/;
3397 var5
= ((long (*)(val
*))(var_tuple
->class->vft
[COLOR_ropes__TupleLeafNodePos__corrected_pos
]))(var_tuple
) /* corrected_pos on <var_tuple:TupleLeafNodePos>*/;
3398 var6
= ((val
* (*)(val
*, long))(var4
->class->vft
[COLOR_abstract_collection__SequenceRead___91d_93d
]))(var4
, var5
) /* [] on <var4:String>*/;
3399 var7
= ((struct instance_kernel__Char
*)var6
)->value
; /* autounbox from nullable Object to Char */;
3405 /* method ropes#CharRopeView#[] for (self: Object, Int): nullable Object */
3406 val
* VIRTUAL_ropes__CharRopeView___91d_93d(val
* self
, long p0
) {
3407 val
* var
/* : nullable Object */;
3408 char var1
/* : Char */;
3409 val
* var2
/* : nullable Object */;
3410 var1
= ropes__CharRopeView___91d_93d(self
, p0
);
3411 var2
= BOX_kernel__Char(var1
); /* autobox from Char to nullable Object */
3416 /* method ropes#CharRopeView#first for (self: CharRopeView): Char */
3417 char ropes__CharRopeView__first(val
* self
) {
3418 char var
/* : Char */;
3419 long var1
/* : Int */;
3420 val
* var2
/* : nullable Object */;
3421 char var3
/* : Char */;
3423 var2
= ((val
* (*)(val
*, long))(self
->class->vft
[COLOR_abstract_collection__SequenceRead___91d_93d
]))(self
, var1
) /* [] on <self:CharRopeView>*/;
3424 var3
= ((struct instance_kernel__Char
*)var2
)->value
; /* autounbox from nullable Object to Char */;
3430 /* method ropes#CharRopeView#first for (self: Object): nullable Object */
3431 val
* VIRTUAL_ropes__CharRopeView__first(val
* self
) {
3432 val
* var
/* : nullable Object */;
3433 char var1
/* : Char */;
3434 val
* var2
/* : nullable Object */;
3435 var1
= ropes__CharRopeView__first(self
);
3436 var2
= BOX_kernel__Char(var1
); /* autobox from Char to nullable Object */
3441 /* method ropes#CharRopeView#index_of for (self: CharRopeView, Char): Int */
3442 long ropes__CharRopeView__index_of(val
* self
, char p0
) {
3443 long var
/* : Int */;
3444 short int var1
/* : Bool */;
3447 const char* var_class_name
;
3448 char var_char
/* var char: Char */;
3449 val
* var2
/* : RopeCharIterator */;
3450 val
* var3
/* : Rope */;
3451 val
* var_intern_iter
/* var intern_iter: RopeCharIterator */;
3452 short int var4
/* : Bool */;
3453 val
* var5
/* : nullable Object */;
3454 short int var6
/* : Bool */;
3455 short int var8
/* : Bool */;
3456 char var9
/* : Char */;
3457 long var10
/* : Int */;
3458 long var11
/* : Int */;
3459 long var12
/* : Int */;
3460 long var14
/* : Int */;
3461 /* Covariant cast for argument 0 (char) <p0:Char> isa SequenceRead#0 */
3462 /* <p0:Char> isa SequenceRead#0 */
3463 var1
= 1; /* easy <p0:Char> isa SequenceRead#0*/
3465 var_class_name
= type_kernel__Char
.name
;
3466 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "SequenceRead#0", var_class_name
);
3467 fprintf(stderr
, " (%s:%d)\n", "lib/standard/ropes.nit", 697);
3471 var2
= NEW_ropes__RopeCharIterator(&type_ropes__RopeCharIterator
);
3472 var3
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_ropes__CharRopeView__target
]))(self
) /* target on <self:CharRopeView>*/;
3473 ((void (*)(val
*, val
*))(var2
->class->vft
[COLOR_ropes__RopeCharIterator__init
]))(var2
, var3
) /* init on <var2:RopeCharIterator>*/;
3474 CHECK_NEW_ropes__RopeCharIterator(var2
);
3475 var_intern_iter
= var2
;
3477 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>*/;
3479 var5
= ((val
* (*)(val
*))(var_intern_iter
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var_intern_iter
) /* item on <var_intern_iter:RopeCharIterator>*/;
3480 { /* Inline kernel#Char#== (var5,var_char) */
3481 var8
= (var5
!= NULL
) && (var5
->class == &class_kernel__Char
);
3483 var9
= ((struct instance_kernel__Char
*)var5
)->value
; /* autounbox from nullable Object to Char */;
3484 var8
= (var9
== var_char
);
3491 var10
= ((long (*)(val
*))(var_intern_iter
->class->vft
[COLOR_abstract_collection__IndexedIterator__index
]))(var_intern_iter
) /* index on <var_intern_iter:RopeCharIterator>*/;
3496 ((void (*)(val
*))(var_intern_iter
->class->vft
[COLOR_abstract_collection__Iterator__next
]))(var_intern_iter
) /* next on <var_intern_iter:RopeCharIterator>*/;
3497 CONTINUE_label
: (void)0;
3499 BREAK_label
: (void)0;
3501 { /* Inline kernel#Int#unary - (var11) */
3505 RET_LABEL13
:(void)0;
3512 /* method ropes#CharRopeView#index_of for (self: Object, nullable Object): Int */
3513 long VIRTUAL_ropes__CharRopeView__index_of(val
* self
, val
* p0
) {
3514 long var
/* : Int */;
3515 long var1
/* : Int */;
3516 char var2
/* : Char */;
3517 var2
= ((struct instance_kernel__Char
*)p0
)->value
; /* autounbox from nullable Object to Char */;
3518 var1
= ropes__CharRopeView__index_of(self
, var2
);
3523 /* method ropes#CharRopeView#iterator for (self: CharRopeView): Iterator[Char] */
3524 val
* ropes__CharRopeView__iterator(val
* self
) {
3525 val
* var
/* : Iterator[Char] */;
3526 val
* var1
/* : RopeCharIterator */;
3527 val
* var2
/* : Rope */;
3528 var1
= NEW_ropes__RopeCharIterator(&type_ropes__RopeCharIterator
);
3529 var2
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_ropes__CharRopeView__target
]))(self
) /* target on <self:CharRopeView>*/;
3530 ((void (*)(val
*, val
*))(var1
->class->vft
[COLOR_ropes__RopeCharIterator__init
]))(var1
, var2
) /* init on <var1:RopeCharIterator>*/;
3531 CHECK_NEW_ropes__RopeCharIterator(var1
);
3537 /* method ropes#CharRopeView#iterator for (self: Object): Iterator[nullable Object] */
3538 val
* VIRTUAL_ropes__CharRopeView__iterator(val
* self
) {
3539 val
* var
/* : Iterator[nullable Object] */;
3540 val
* var1
/* : Iterator[Char] */;
3541 var1
= ropes__CharRopeView__iterator(self
);
3546 /* method ropes#CharRopeView#last for (self: CharRopeView): Char */
3547 char ropes__CharRopeView__last(val
* self
) {
3548 char var
/* : Char */;
3549 long var1
/* : Int */;
3550 long var2
/* : Int */;
3551 long var3
/* : Int */;
3552 long var5
/* : Int */;
3553 val
* var6
/* : nullable Object */;
3554 char var7
/* : Char */;
3555 var1
= ((long (*)(val
*))(self
->class->vft
[COLOR_abstract_collection__Collection__length
]))(self
) /* length on <self:CharRopeView>*/;
3557 { /* Inline kernel#Int#- (var1,var2) */
3563 var6
= ((val
* (*)(val
*, long))(self
->class->vft
[COLOR_abstract_collection__SequenceRead___91d_93d
]))(self
, var3
) /* [] on <self:CharRopeView>*/;
3564 var7
= ((struct instance_kernel__Char
*)var6
)->value
; /* autounbox from nullable Object to Char */;
3570 /* method ropes#CharRopeView#last for (self: Object): nullable Object */
3571 val
* VIRTUAL_ropes__CharRopeView__last(val
* self
) {
3572 val
* var
/* : nullable Object */;
3573 char var1
/* : Char */;
3574 val
* var2
/* : nullable Object */;
3575 var1
= ropes__CharRopeView__last(self
);
3576 var2
= BOX_kernel__Char(var1
); /* autobox from Char to nullable Object */
3581 /* method ropes#CharRopeView#length for (self: CharRopeView): Int */
3582 long ropes__CharRopeView__length(val
* self
) {
3583 long var
/* : Int */;
3584 val
* var1
/* : Rope */;
3585 long var2
/* : Int */;
3586 var1
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_ropes__CharRopeView__target
]))(self
) /* target on <self:CharRopeView>*/;
3587 var2
= ((long (*)(val
*))(var1
->class->vft
[COLOR_ropes__Rope__length
]))(var1
) /* length on <var1:Rope>*/;
3593 /* method ropes#CharRopeView#length for (self: Object): Int */
3594 long VIRTUAL_ropes__CharRopeView__length(val
* self
) {
3595 long var
/* : Int */;
3596 long var1
/* : Int */;
3597 var1
= ropes__CharRopeView__length(self
);
3602 /* method ropes#CharRopeView#count for (self: CharRopeView, Char): Int */
3603 long ropes__CharRopeView__count(val
* self
, char p0
) {
3604 long var
/* : Int */;
3605 short int var1
/* : Bool */;
3608 const char* var_class_name
;
3609 char var_item
/* var item: Char */;
3610 long var2
/* : Int */;
3611 long var_count
/* var count: Int */;
3612 val
* var3
/* : Iterator[nullable Object] */;
3613 val
* var_iter
/* var iter: Iterator[Char] */;
3614 val
* var4
/* : Iterator[nullable Object] */;
3615 short int var5
/* : Bool */;
3616 val
* var6
/* : nullable Object */;
3617 char var_i
/* var i: Char */;
3618 char var7
/* : Char */;
3619 short int var8
/* : Bool */;
3620 short int var10
/* : Bool */;
3621 long var11
/* : Int */;
3622 long var12
/* : Int */;
3623 long var14
/* : Int */;
3624 /* Covariant cast for argument 0 (item) <p0:Char> isa Collection#0 */
3625 /* <p0:Char> isa Collection#0 */
3626 var1
= 1; /* easy <p0:Char> isa Collection#0*/
3628 var_class_name
= type_kernel__Char
.name
;
3629 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "Collection#0", var_class_name
);
3630 fprintf(stderr
, " (%s:%d)\n", "lib/standard/ropes.nit", 715);
3636 var3
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_abstract_collection__Collection__iterator
]))(self
) /* iterator on <self:CharRopeView>*/;
3638 var4
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_abstract_collection__Collection__iterator
]))(self
) /* iterator on <self:CharRopeView>*/;
3640 var5
= ((short int (*)(val
*))(var4
->class->vft
[COLOR_abstract_collection__Iterator__is_ok
]))(var4
) /* is_ok on <var4:Iterator[nullable Object]>*/;
3642 var6
= ((val
* (*)(val
*))(var4
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var4
) /* item on <var4:Iterator[nullable Object]>*/;
3643 var7
= ((struct instance_kernel__Char
*)var6
)->value
; /* autounbox from nullable Object to Char */;
3645 { /* Inline kernel#Char#== (var_i,var_item) */
3646 var10
= var_i
== var_item
;
3653 { /* Inline kernel#Int#+ (var_count,var11) */
3654 var14
= var_count
+ var11
;
3657 RET_LABEL13
:(void)0;
3662 CONTINUE_label
: (void)0;
3663 ((void (*)(val
*))(var4
->class->vft
[COLOR_abstract_collection__Iterator__next
]))(var4
) /* next on <var4:Iterator[nullable Object]>*/;
3665 BREAK_label
: (void)0;
3671 /* method ropes#CharRopeView#count for (self: Object, nullable Object): Int */
3672 long VIRTUAL_ropes__CharRopeView__count(val
* self
, val
* p0
) {
3673 long var
/* : Int */;
3674 long var1
/* : Int */;
3675 char var2
/* : Char */;
3676 var2
= ((struct instance_kernel__Char
*)p0
)->value
; /* autounbox from nullable Object to Char */;
3677 var1
= ropes__CharRopeView__count(self
, var2
);
3682 /* method ropes#CharRopeView#has_only for (self: CharRopeView, Char): Bool */
3683 short int ropes__CharRopeView__has_only(val
* self
, char p0
) {
3684 short int var
/* : Bool */;
3685 short int var1
/* : Bool */;
3688 const char* var_class_name
;
3689 char var_item
/* var item: Char */;
3690 val
* var2
/* : Iterator[nullable Object] */;
3691 short int var3
/* : Bool */;
3692 val
* var4
/* : nullable Object */;
3693 char var_i
/* var i: Char */;
3694 char var5
/* : Char */;
3695 short int var6
/* : Bool */;
3696 short int var8
/* : Bool */;
3697 short int var9
/* : Bool */;
3698 short int var10
/* : Bool */;
3699 short int var11
/* : Bool */;
3700 /* Covariant cast for argument 0 (item) <p0:Char> isa Collection#0 */
3701 /* <p0:Char> isa Collection#0 */
3702 var1
= 1; /* easy <p0:Char> isa Collection#0*/
3704 var_class_name
= type_kernel__Char
.name
;
3705 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "Collection#0", var_class_name
);
3706 fprintf(stderr
, " (%s:%d)\n", "lib/standard/ropes.nit", 727);
3710 var2
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_abstract_collection__Collection__iterator
]))(self
) /* iterator on <self:CharRopeView>*/;
3712 var3
= ((short int (*)(val
*))(var2
->class->vft
[COLOR_abstract_collection__Iterator__is_ok
]))(var2
) /* is_ok on <var2:Iterator[nullable Object]>*/;
3714 var4
= ((val
* (*)(val
*))(var2
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var2
) /* item on <var2:Iterator[nullable Object]>*/;
3715 var5
= ((struct instance_kernel__Char
*)var4
)->value
; /* autounbox from nullable Object to Char */;
3717 { /* Inline kernel#Char#!= (var_i,var_item) */
3718 var8
= var_i
== var_item
;
3730 CONTINUE_label
: (void)0;
3731 ((void (*)(val
*))(var2
->class->vft
[COLOR_abstract_collection__Iterator__next
]))(var2
) /* next on <var2:Iterator[nullable Object]>*/;
3733 BREAK_label
: (void)0;
3740 /* method ropes#CharRopeView#has_only for (self: Object, nullable Object): Bool */
3741 short int VIRTUAL_ropes__CharRopeView__has_only(val
* self
, val
* p0
) {
3742 short int var
/* : Bool */;
3743 short int var1
/* : Bool */;
3744 char var2
/* : Char */;
3745 var2
= ((struct instance_kernel__Char
*)p0
)->value
; /* autounbox from nullable Object to Char */;
3746 var1
= ropes__CharRopeView__has_only(self
, var2
);
3751 /* method ropes#CharRopeView#is_empty for (self: CharRopeView): Bool */
3752 short int ropes__CharRopeView__is_empty(val
* self
) {
3753 short int var
/* : Bool */;
3754 long var1
/* : Int */;
3755 long var2
/* : Int */;
3756 short int var3
/* : Bool */;
3757 short int var5
/* : Bool */;
3758 var1
= ((long (*)(val
*))(self
->class->vft
[COLOR_abstract_collection__Collection__length
]))(self
) /* length on <self:CharRopeView>*/;
3760 { /* Inline kernel#Int#== (var1,var2) */
3761 var5
= var1
== var2
;
3771 /* method ropes#CharRopeView#is_empty for (self: Object): Bool */
3772 short int VIRTUAL_ropes__CharRopeView__is_empty(val
* self
) {
3773 short int var
/* : Bool */;
3774 short int var1
/* : Bool */;
3775 var1
= ropes__CharRopeView__is_empty(self
);
3780 /* method ropes#CharRopeView#to_a for (self: CharRopeView): Array[Char] */
3781 val
* ropes__CharRopeView__to_a(val
* self
) {
3782 val
* var
/* : Array[Char] */;
3783 val
* var1
/* : String */;
3784 val
* var2
/* : Array[nullable Object] */;
3785 var1
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_string__Object__to_s
]))(self
) /* to_s on <self:CharRopeView>*/;
3786 var2
= ((val
* (*)(val
*))(var1
->class->vft
[COLOR_array__Collection__to_a
]))(var1
) /* to_a on <var1:String>*/;
3792 /* method ropes#CharRopeView#to_a for (self: Object): Array[nullable Object] */
3793 val
* VIRTUAL_ropes__CharRopeView__to_a(val
* self
) {
3794 val
* var
/* : Array[nullable Object] */;
3795 val
* var1
/* : Array[Char] */;
3796 var1
= ropes__CharRopeView__to_a(self
);
3801 /* method ropes#CharRopeView#to_s for (self: CharRopeView): String */
3802 val
* ropes__CharRopeView__to_s(val
* self
) {
3803 val
* var
/* : String */;
3804 val
* var1
/* : Rope */;
3805 val
* var2
/* : String */;
3806 var1
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_ropes__CharRopeView__target
]))(self
) /* target on <self:CharRopeView>*/;
3807 var2
= ((val
* (*)(val
*))(var1
->class->vft
[COLOR_string__Object__to_s
]))(var1
) /* to_s on <var1:Rope>*/;
3813 /* method ropes#CharRopeView#to_s for (self: Object): String */
3814 val
* VIRTUAL_ropes__CharRopeView__to_s(val
* self
) {
3815 val
* var
/* : String */;
3816 val
* var1
/* : String */;
3817 var1
= ropes__CharRopeView__to_s(self
);
3822 /* method ropes#CharRopeView#== for (self: CharRopeView, nullable Object): Bool */
3823 short int ropes__CharRopeView___61d_61d(val
* self
, val
* p0
) {
3824 short int var
/* : Bool */;
3825 val
* var_other
/* var other: nullable Object */;
3826 short int var1
/* : Bool */;
3829 short int var2
/* : Bool */;
3830 short int var3
/* : Bool */;
3831 long var4
/* : Int */;
3832 short int var5
/* : Bool */;
3833 short int var7
/* : Bool */;
3834 long var8
/* : Int */;
3835 short int var9
/* : Bool */;
3836 short int var10
/* : Bool */;
3837 val
* var11
/* : Iterator[nullable Object] */;
3838 val
* var_iter
/* var iter: IndexedIterator[Char] */;
3839 val
* var12
/* : Iterator[nullable Object] */;
3840 short int var13
/* : Bool */;
3841 val
* var14
/* : nullable Object */;
3842 char var_i
/* var i: Char */;
3843 char var15
/* : Char */;
3844 val
* var16
/* : nullable Object */;
3845 short int var17
/* : Bool */;
3846 short int var19
/* : Bool */;
3847 char var20
/* : Char */;
3848 short int var21
/* : Bool */;
3849 short int var22
/* : Bool */;
3850 short int var23
/* : Bool */;
3852 /* <var_other:nullable Object> isa SequenceRead[Char] */
3853 cltype
= type_abstract_collection__SequenceReadkernel__Char
.color
;
3854 idtype
= type_abstract_collection__SequenceReadkernel__Char
.id
;
3855 if(var_other
== NULL
) {
3858 if(cltype
>= var_other
->type
->table_size
) {
3861 var1
= var_other
->type
->type_table
[cltype
] == idtype
;
3871 var4
= ((long (*)(val
*))(self
->class->vft
[COLOR_abstract_collection__Collection__length
]))(self
) /* length on <self:CharRopeView>*/;
3872 { /* Inline kernel#Int#!= (var4,var_other) */
3873 var7
= (var_other
!= NULL
) && (var_other
->class == &class_kernel__Int
);
3875 var8
= ((struct instance_kernel__Int
*)var_other
)->value
; /* autounbox from nullable Object to Int */;
3876 var7
= (var8
== var4
);
3889 var11
= ((val
* (*)(val
*))(var_other
->class->vft
[COLOR_abstract_collection__Collection__iterator
]))(var_other
) /* iterator on <var_other:nullable Object(SequenceRead[Char])>*/;
3891 var12
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_abstract_collection__Collection__iterator
]))(self
) /* iterator on <self:CharRopeView>*/;
3893 var13
= ((short int (*)(val
*))(var12
->class->vft
[COLOR_abstract_collection__Iterator__is_ok
]))(var12
) /* is_ok on <var12:Iterator[nullable Object]>*/;
3895 var14
= ((val
* (*)(val
*))(var12
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var12
) /* item on <var12:Iterator[nullable Object]>*/;
3896 var15
= ((struct instance_kernel__Char
*)var14
)->value
; /* autounbox from nullable Object to Char */;
3898 var16
= ((val
* (*)(val
*))(var_iter
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var_iter
) /* item on <var_iter:IndexedIterator[Char]>*/;
3899 { /* Inline kernel#Char#!= (var_i,var16) */
3900 var19
= (var16
!= NULL
) && (var16
->class == &class_kernel__Char
);
3902 var20
= ((struct instance_kernel__Char
*)var16
)->value
; /* autounbox from nullable Object to Char */;
3903 var19
= (var20
== var_i
);
3908 RET_LABEL18
:(void)0;
3916 ((void (*)(val
*))(var_iter
->class->vft
[COLOR_abstract_collection__Iterator__next
]))(var_iter
) /* next on <var_iter:IndexedIterator[Char]>*/;
3917 CONTINUE_label
: (void)0;
3918 ((void (*)(val
*))(var12
->class->vft
[COLOR_abstract_collection__Iterator__next
]))(var12
) /* next on <var12:Iterator[nullable Object]>*/;
3920 BREAK_label
: (void)0;
3927 /* method ropes#CharRopeView#== for (self: Object, nullable Object): Bool */
3928 short int VIRTUAL_ropes__CharRopeView___61d_61d(val
* self
, val
* p0
) {
3929 short int var
/* : Bool */;
3930 short int var1
/* : Bool */;
3931 var1
= ropes__CharRopeView___61d_61d(self
, p0
);
3936 /* method ropes#TupleVisitNode#init for (self: TupleVisitNode, ConcatNode) */
3937 void ropes__TupleVisitNode__init(val
* self
, val
* p0
) {
3938 val
* var_tgt
/* var tgt: ConcatNode */;
3940 ((void (*)(val
*, val
*))(self
->class->vft
[COLOR_ropes__TupleVisitNode__node_61d
]))(self
, var_tgt
) /* node= on <self:TupleVisitNode>*/;
3943 /* method ropes#TupleVisitNode#init for (self: Object, ConcatNode) */
3944 void VIRTUAL_ropes__TupleVisitNode__init(val
* self
, val
* p0
) {
3945 ropes__TupleVisitNode__init(self
, p0
);
3948 /* method ropes#TupleVisitNode#node for (self: TupleVisitNode): ConcatNode */
3949 val
* ropes__TupleVisitNode__node(val
* self
) {
3950 val
* var
/* : ConcatNode */;
3951 val
* var1
/* : ConcatNode */;
3952 var1
= self
->attrs
[COLOR_ropes__TupleVisitNode___64dnode
].val
; /* @node on <self:TupleVisitNode> */
3954 fprintf(stderr
, "Runtime error: %s", "Uninitialized attribute @node");
3955 fprintf(stderr
, " (%s:%d)\n", "lib/standard/ropes.nit", 775);
3962 /* method ropes#TupleVisitNode#node for (self: Object): ConcatNode */
3963 val
* VIRTUAL_ropes__TupleVisitNode__node(val
* self
) {
3964 val
* var
/* : ConcatNode */;
3965 val
* var1
/* : ConcatNode */;
3966 var1
= ropes__TupleVisitNode__node(self
);
3971 /* method ropes#TupleVisitNode#node= for (self: TupleVisitNode, ConcatNode) */
3972 void ropes__TupleVisitNode__node_61d(val
* self
, val
* p0
) {
3973 self
->attrs
[COLOR_ropes__TupleVisitNode___64dnode
].val
= p0
; /* @node on <self:TupleVisitNode> */
3976 /* method ropes#TupleVisitNode#node= for (self: Object, ConcatNode) */
3977 void VIRTUAL_ropes__TupleVisitNode__node_61d(val
* self
, val
* p0
) {
3978 ropes__TupleVisitNode__node_61d(self
, p0
);
3981 /* method ropes#TupleVisitNode#left_visited for (self: TupleVisitNode): Bool */
3982 short int ropes__TupleVisitNode__left_visited(val
* self
) {
3983 short int var
/* : Bool */;
3984 short int var1
/* : Bool */;
3985 var1
= self
->attrs
[COLOR_ropes__TupleVisitNode___64dleft_visited
].s
; /* @left_visited on <self:TupleVisitNode> */
3990 /* method ropes#TupleVisitNode#left_visited for (self: Object): Bool */
3991 short int VIRTUAL_ropes__TupleVisitNode__left_visited(val
* self
) {
3992 short int var
/* : Bool */;
3993 short int var1
/* : Bool */;
3994 var1
= ropes__TupleVisitNode__left_visited(self
);
3999 /* method ropes#TupleVisitNode#left_visited= for (self: TupleVisitNode, Bool) */
4000 void ropes__TupleVisitNode__left_visited_61d(val
* self
, short int p0
) {
4001 self
->attrs
[COLOR_ropes__TupleVisitNode___64dleft_visited
].s
= p0
; /* @left_visited on <self:TupleVisitNode> */
4004 /* method ropes#TupleVisitNode#left_visited= for (self: Object, Bool) */
4005 void VIRTUAL_ropes__TupleVisitNode__left_visited_61d(val
* self
, short int p0
) {
4006 ropes__TupleVisitNode__left_visited_61d(self
, p0
);
4009 /* method ropes#TupleVisitNode#right_visited for (self: TupleVisitNode): Bool */
4010 short int ropes__TupleVisitNode__right_visited(val
* self
) {
4011 short int var
/* : Bool */;
4012 short int var1
/* : Bool */;
4013 var1
= self
->attrs
[COLOR_ropes__TupleVisitNode___64dright_visited
].s
; /* @right_visited on <self:TupleVisitNode> */
4018 /* method ropes#TupleVisitNode#right_visited for (self: Object): Bool */
4019 short int VIRTUAL_ropes__TupleVisitNode__right_visited(val
* self
) {
4020 short int var
/* : Bool */;
4021 short int var1
/* : Bool */;
4022 var1
= ropes__TupleVisitNode__right_visited(self
);
4027 /* method ropes#TupleVisitNode#right_visited= for (self: TupleVisitNode, Bool) */
4028 void ropes__TupleVisitNode__right_visited_61d(val
* self
, short int p0
) {
4029 self
->attrs
[COLOR_ropes__TupleVisitNode___64dright_visited
].s
= p0
; /* @right_visited on <self:TupleVisitNode> */
4032 /* method ropes#TupleVisitNode#right_visited= for (self: Object, Bool) */
4033 void VIRTUAL_ropes__TupleVisitNode__right_visited_61d(val
* self
, short int p0
) {
4034 ropes__TupleVisitNode__right_visited_61d(self
, p0
);
4037 /* method ropes#RopeIterator#target for (self: RopeIterator): Rope */
4038 val
* ropes__RopeIterator__target(val
* self
) {
4039 val
* var
/* : Rope */;
4040 val
* var1
/* : Rope */;
4041 var1
= self
->attrs
[COLOR_ropes__RopeIterator___target
].val
; /* _target on <self:RopeIterator> */
4043 fprintf(stderr
, "Runtime error: %s", "Uninitialized attribute _target");
4044 fprintf(stderr
, " (%s:%d)\n", "lib/standard/ropes.nit", 789);
4052 /* method ropes#RopeIterator#target for (self: Object): Rope */
4053 val
* VIRTUAL_ropes__RopeIterator__target(val
* self
) {
4054 val
* var
/* : Rope */;
4055 val
* var1
/* : Rope */;
4056 var1
= ropes__RopeIterator__target(self
);
4061 /* method ropes#RopeIterator#pos for (self: RopeIterator): Int */
4062 long ropes__RopeIterator__pos(val
* self
) {
4063 long var
/* : Int */;
4064 long var1
/* : Int */;
4065 var1
= self
->attrs
[COLOR_ropes__RopeIterator___64dpos
].l
; /* @pos on <self:RopeIterator> */
4070 /* method ropes#RopeIterator#pos for (self: Object): Int */
4071 long VIRTUAL_ropes__RopeIterator__pos(val
* self
) {
4072 long var
/* : Int */;
4073 long var1
/* : Int */;
4074 var1
= ropes__RopeIterator__pos(self
);
4079 /* method ropes#RopeIterator#pos= for (self: RopeIterator, Int) */
4080 void ropes__RopeIterator__pos_61d(val
* self
, long p0
) {
4081 self
->attrs
[COLOR_ropes__RopeIterator___64dpos
].l
= p0
; /* @pos on <self:RopeIterator> */
4084 /* method ropes#RopeIterator#pos= for (self: Object, Int) */
4085 void VIRTUAL_ropes__RopeIterator__pos_61d(val
* self
, long p0
) {
4086 ropes__RopeIterator__pos_61d(self
, p0
);
4089 /* method ropes#RopeIterator#init for (self: RopeIterator, Rope) */
4090 void ropes__RopeIterator__init(val
* self
, val
* p0
) {
4091 val
* var_tgt
/* var tgt: Rope */;
4093 self
->attrs
[COLOR_ropes__RopeIterator___target
].val
= var_tgt
; /* _target on <self:RopeIterator> */
4096 /* method ropes#RopeIterator#init for (self: Object, Rope) */
4097 void VIRTUAL_ropes__RopeIterator__init(val
* self
, val
* p0
) {
4098 ropes__RopeIterator__init(self
, p0
);
4101 /* method ropes#RopeIterator#with_index for (self: RopeIterator, Rope, Int) */
4102 void ropes__RopeIterator__with_index(val
* self
, val
* p0
, long p1
) {
4103 val
* var_tgt
/* var tgt: Rope */;
4104 long var_index
/* var index: Int */;
4107 self
->attrs
[COLOR_ropes__RopeIterator___target
].val
= var_tgt
; /* _target on <self:RopeIterator> */
4110 /* method ropes#RopeIterator#with_index for (self: Object, Rope, Int) */
4111 void VIRTUAL_ropes__RopeIterator__with_index(val
* self
, val
* p0
, long p1
) {
4112 ropes__RopeIterator__with_index(self
, p0
, p1
);
4115 /* method ropes#RopeCharIterator#sub_str_iter for (self: RopeCharIterator): DFSRopeLeafIterator */
4116 val
* ropes__RopeCharIterator__sub_str_iter(val
* self
) {
4117 val
* var
/* : DFSRopeLeafIterator */;
4118 val
* var1
/* : DFSRopeLeafIterator */;
4119 var1
= self
->attrs
[COLOR_ropes__RopeCharIterator___64dsub_str_iter
].val
; /* @sub_str_iter on <self:RopeCharIterator> */
4121 fprintf(stderr
, "Runtime error: %s", "Uninitialized attribute @sub_str_iter");
4122 fprintf(stderr
, " (%s:%d)\n", "lib/standard/ropes.nit", 810);
4129 /* method ropes#RopeCharIterator#sub_str_iter for (self: Object): DFSRopeLeafIterator */
4130 val
* VIRTUAL_ropes__RopeCharIterator__sub_str_iter(val
* self
) {
4131 val
* var
/* : DFSRopeLeafIterator */;
4132 val
* var1
/* : DFSRopeLeafIterator */;
4133 var1
= ropes__RopeCharIterator__sub_str_iter(self
);
4138 /* method ropes#RopeCharIterator#sub_str_iter= for (self: RopeCharIterator, DFSRopeLeafIterator) */
4139 void ropes__RopeCharIterator__sub_str_iter_61d(val
* self
, val
* p0
) {
4140 self
->attrs
[COLOR_ropes__RopeCharIterator___64dsub_str_iter
].val
= p0
; /* @sub_str_iter on <self:RopeCharIterator> */
4143 /* method ropes#RopeCharIterator#sub_str_iter= for (self: Object, DFSRopeLeafIterator) */
4144 void VIRTUAL_ropes__RopeCharIterator__sub_str_iter_61d(val
* self
, val
* p0
) {
4145 ropes__RopeCharIterator__sub_str_iter_61d(self
, p0
);
4148 /* method ropes#RopeCharIterator#abs_pos for (self: RopeCharIterator): Int */
4149 long ropes__RopeCharIterator__abs_pos(val
* self
) {
4150 long var
/* : Int */;
4151 long var1
/* : Int */;
4152 var1
= self
->attrs
[COLOR_ropes__RopeCharIterator___64dabs_pos
].l
; /* @abs_pos on <self:RopeCharIterator> */
4157 /* method ropes#RopeCharIterator#abs_pos for (self: Object): Int */
4158 long VIRTUAL_ropes__RopeCharIterator__abs_pos(val
* self
) {
4159 long var
/* : Int */;
4160 long var1
/* : Int */;
4161 var1
= ropes__RopeCharIterator__abs_pos(self
);
4166 /* method ropes#RopeCharIterator#abs_pos= for (self: RopeCharIterator, Int) */
4167 void ropes__RopeCharIterator__abs_pos_61d(val
* self
, long p0
) {
4168 self
->attrs
[COLOR_ropes__RopeCharIterator___64dabs_pos
].l
= p0
; /* @abs_pos on <self:RopeCharIterator> */
4171 /* method ropes#RopeCharIterator#abs_pos= for (self: Object, Int) */
4172 void VIRTUAL_ropes__RopeCharIterator__abs_pos_61d(val
* self
, long p0
) {
4173 ropes__RopeCharIterator__abs_pos_61d(self
, p0
);
4176 /* method ropes#RopeCharIterator#sub_pos for (self: RopeCharIterator): Int */
4177 long ropes__RopeCharIterator__sub_pos(val
* self
) {
4178 long var
/* : Int */;
4179 long var1
/* : Int */;
4180 var1
= self
->attrs
[COLOR_ropes__RopeCharIterator___64dsub_pos
].l
; /* @sub_pos on <self:RopeCharIterator> */
4185 /* method ropes#RopeCharIterator#sub_pos for (self: Object): Int */
4186 long VIRTUAL_ropes__RopeCharIterator__sub_pos(val
* self
) {
4187 long var
/* : Int */;
4188 long var1
/* : Int */;
4189 var1
= ropes__RopeCharIterator__sub_pos(self
);
4194 /* method ropes#RopeCharIterator#sub_pos= for (self: RopeCharIterator, Int) */
4195 void ropes__RopeCharIterator__sub_pos_61d(val
* self
, long p0
) {
4196 self
->attrs
[COLOR_ropes__RopeCharIterator___64dsub_pos
].l
= p0
; /* @sub_pos on <self:RopeCharIterator> */
4199 /* method ropes#RopeCharIterator#sub_pos= for (self: Object, Int) */
4200 void VIRTUAL_ropes__RopeCharIterator__sub_pos_61d(val
* self
, long p0
) {
4201 ropes__RopeCharIterator__sub_pos_61d(self
, p0
);
4204 /* method ropes#RopeCharIterator#curr_substring for (self: RopeCharIterator): nullable String */
4205 val
* ropes__RopeCharIterator__curr_substring(val
* self
) {
4206 val
* var
/* : nullable String */;
4207 val
* var1
/* : nullable String */;
4208 var1
= self
->attrs
[COLOR_ropes__RopeCharIterator___64dcurr_substring
].val
; /* @curr_substring on <self:RopeCharIterator> */
4213 /* method ropes#RopeCharIterator#curr_substring for (self: Object): nullable String */
4214 val
* VIRTUAL_ropes__RopeCharIterator__curr_substring(val
* self
) {
4215 val
* var
/* : nullable String */;
4216 val
* var1
/* : nullable String */;
4217 var1
= ropes__RopeCharIterator__curr_substring(self
);
4222 /* method ropes#RopeCharIterator#curr_substring= for (self: RopeCharIterator, nullable String) */
4223 void ropes__RopeCharIterator__curr_substring_61d(val
* self
, val
* p0
) {
4224 self
->attrs
[COLOR_ropes__RopeCharIterator___64dcurr_substring
].val
= p0
; /* @curr_substring on <self:RopeCharIterator> */
4227 /* method ropes#RopeCharIterator#curr_substring= for (self: Object, nullable String) */
4228 void VIRTUAL_ropes__RopeCharIterator__curr_substring_61d(val
* self
, val
* p0
) {
4229 ropes__RopeCharIterator__curr_substring_61d(self
, p0
);
4232 /* method ropes#RopeCharIterator#init for (self: RopeCharIterator, Rope) */
4233 void ropes__RopeCharIterator__init(val
* self
, val
* p0
) {
4234 val
* var_tgt
/* var tgt: Rope */;
4235 val
* var
/* : DFSRopeLeafIterator */;
4236 val
* var1
/* : DFSRopeLeafIterator */;
4237 short int var2
/* : Bool */;
4238 val
* var3
/* : DFSRopeLeafIterator */;
4239 val
* var4
/* : nullable Object */;
4240 val
* var5
/* : String */;
4242 var
= NEW_ropes__DFSRopeLeafIterator(&type_ropes__DFSRopeLeafIterator
);
4243 ((void (*)(val
*, val
*))(var
->class->vft
[COLOR_ropes__DFSRopeLeafIterator__init
]))(var
, var_tgt
) /* init on <var:DFSRopeLeafIterator>*/;
4244 CHECK_NEW_ropes__DFSRopeLeafIterator(var
);
4245 ((void (*)(val
*, val
*))(self
->class->vft
[COLOR_ropes__RopeCharIterator__sub_str_iter_61d
]))(self
, var
) /* sub_str_iter= on <self:RopeCharIterator>*/;
4246 var1
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_ropes__RopeCharIterator__sub_str_iter
]))(self
) /* sub_str_iter on <self:RopeCharIterator>*/;
4247 var2
= ((short int (*)(val
*))(var1
->class->vft
[COLOR_abstract_collection__Iterator__is_ok
]))(var1
) /* is_ok on <var1:DFSRopeLeafIterator>*/;
4249 var3
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_ropes__RopeCharIterator__sub_str_iter
]))(self
) /* sub_str_iter on <self:RopeCharIterator>*/;
4250 var4
= ((val
* (*)(val
*))(var3
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var3
) /* item on <var3:DFSRopeLeafIterator>*/;
4251 var5
= ((val
* (*)(val
*))(var4
->class->vft
[COLOR_ropes__LeafNode__value
]))(var4
) /* value on <var4:nullable Object(LeafNode)>*/;
4252 ((void (*)(val
*, val
*))(self
->class->vft
[COLOR_ropes__RopeCharIterator__curr_substring_61d
]))(self
, var5
) /* curr_substring= on <self:RopeCharIterator>*/;
4257 /* method ropes#RopeCharIterator#init for (self: Object, Rope) */
4258 void VIRTUAL_ropes__RopeCharIterator__init(val
* self
, val
* p0
) {
4259 ropes__RopeCharIterator__init(self
, p0
);
4262 /* method ropes#RopeCharIterator#item for (self: RopeCharIterator): Char */
4263 char ropes__RopeCharIterator__item(val
* self
) {
4264 char var
/* : Char */;
4265 val
* var1
/* : nullable String */;
4266 long var2
/* : Int */;
4267 val
* var3
/* : nullable Object */;
4268 char var4
/* : Char */;
4269 var1
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_ropes__RopeCharIterator__curr_substring
]))(self
) /* curr_substring on <self:RopeCharIterator>*/;
4270 var2
= ((long (*)(val
*))(self
->class->vft
[COLOR_ropes__RopeCharIterator__sub_pos
]))(self
) /* sub_pos on <self:RopeCharIterator>*/;
4272 fprintf(stderr
, "Runtime error: %s", "Reciever is null");
4273 fprintf(stderr
, " (%s:%d)\n", "lib/standard/ropes.nit", 828);
4276 var3
= ((val
* (*)(val
*, long))(var1
->class->vft
[COLOR_abstract_collection__SequenceRead___91d_93d
]))(var1
, var2
) /* [] on <var1:nullable String>*/;
4278 var4
= ((struct instance_kernel__Char
*)var3
)->value
; /* autounbox from nullable Object to Char */;
4284 /* method ropes#RopeCharIterator#item for (self: Object): nullable Object */
4285 val
* VIRTUAL_ropes__RopeCharIterator__item(val
* self
) {
4286 val
* var
/* : nullable Object */;
4287 char var1
/* : Char */;
4288 val
* var2
/* : nullable Object */;
4289 var1
= ropes__RopeCharIterator__item(self
);
4290 var2
= BOX_kernel__Char(var1
); /* autobox from Char to nullable Object */
4295 /* method ropes#RopeCharIterator#is_ok for (self: RopeCharIterator): Bool */
4296 short int ropes__RopeCharIterator__is_ok(val
* self
) {
4297 short int var
/* : Bool */;
4298 val
* var1
/* : DFSRopeLeafIterator */;
4299 short int var2
/* : Bool */;
4300 short int var3
/* : Bool */;
4301 short int var4
/* : Bool */;
4302 short int var5
/* : Bool */;
4303 val
* var6
/* : DFSRopeLeafIterator */;
4304 short int var7
/* : Bool */;
4305 short int var8
/* : Bool */;
4306 short int var_
/* var : Bool */;
4307 val
* var9
/* : nullable String */;
4308 val
* var10
/* : null */;
4309 short int var11
/* : Bool */;
4310 short int var_12
/* var : Bool */;
4311 long var13
/* : Int */;
4312 val
* var14
/* : nullable String */;
4313 long var15
/* : Int */;
4314 short int var16
/* : Bool */;
4315 short int var18
/* : Bool */;
4318 const char* var_class_name
;
4319 short int var19
/* : Bool */;
4320 short int var20
/* : Bool */;
4321 short int var21
/* : Bool */;
4322 var1
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_ropes__RopeCharIterator__sub_str_iter
]))(self
) /* sub_str_iter on <self:RopeCharIterator>*/;
4323 var2
= ((short int (*)(val
*))(var1
->class->vft
[COLOR_abstract_collection__Iterator__is_ok
]))(var1
) /* is_ok on <var1:DFSRopeLeafIterator>*/;
4330 var6
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_ropes__RopeCharIterator__sub_str_iter
]))(self
) /* sub_str_iter on <self:RopeCharIterator>*/;
4331 var7
= ((short int (*)(val
*))(var6
->class->vft
[COLOR_abstract_collection__Iterator__is_ok
]))(var6
) /* is_ok on <var6:DFSRopeLeafIterator>*/;
4335 var9
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_ropes__RopeCharIterator__curr_substring
]))(self
) /* curr_substring on <self:RopeCharIterator>*/;
4338 var11
= 0; /* is null */
4340 var11
= 1; /* arg is null and recv is not */
4348 var13
= ((long (*)(val
*))(self
->class->vft
[COLOR_ropes__RopeCharIterator__sub_pos
]))(self
) /* sub_pos on <self:RopeCharIterator>*/;
4349 var14
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_ropes__RopeCharIterator__curr_substring
]))(self
) /* curr_substring on <self:RopeCharIterator>*/;
4350 if (var14
== NULL
) {
4351 fprintf(stderr
, "Runtime error: %s", "Reciever is null");
4352 fprintf(stderr
, " (%s:%d)\n", "lib/standard/ropes.nit", 833);
4355 var15
= ((long (*)(val
*))(var14
->class->vft
[COLOR_abstract_collection__Collection__length
]))(var14
) /* length on <var14:nullable String>*/;
4357 { /* Inline kernel#Int#< (var13,var15) */
4358 /* Covariant cast for argument 0 (i) <var15:Int> isa OTHER */
4359 /* <var15:Int> isa OTHER */
4360 var18
= 1; /* easy <var15:Int> isa OTHER*/
4362 var_class_name
= type_kernel__Int
.name
;
4363 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name
);
4364 fprintf(stderr
, " (%s:%d)\n", "lib/standard/kernel.nit", 261);
4367 var19
= var13
< var15
;
4370 RET_LABEL17
:(void)0;
4388 /* method ropes#RopeCharIterator#is_ok for (self: Object): Bool */
4389 short int VIRTUAL_ropes__RopeCharIterator__is_ok(val
* self
) {
4390 short int var
/* : Bool */;
4391 short int var1
/* : Bool */;
4392 var1
= ropes__RopeCharIterator__is_ok(self
);
4397 /* method ropes#RopeCharIterator#next for (self: RopeCharIterator) */
4398 void ropes__RopeCharIterator__next(val
* self
) {
4399 short int var
/* : Bool */;
4400 long var1
/* : Int */;
4401 val
* var2
/* : nullable String */;
4402 long var3
/* : Int */;
4403 long var4
/* : Int */;
4404 long var5
/* : Int */;
4405 long var7
/* : Int */;
4406 short int var8
/* : Bool */;
4407 short int var10
/* : Bool */;
4410 const char* var_class_name
;
4411 short int var11
/* : Bool */;
4412 val
* var_
/* var : RopeCharIterator */;
4413 long var12
/* : Int */;
4414 long var13
/* : Int */;
4415 long var14
/* : Int */;
4416 long var16
/* : Int */;
4417 val
* var17
/* : DFSRopeLeafIterator */;
4418 val
* var18
/* : DFSRopeLeafIterator */;
4419 short int var19
/* : Bool */;
4420 val
* var20
/* : DFSRopeLeafIterator */;
4421 val
* var21
/* : nullable Object */;
4422 val
* var22
/* : String */;
4423 long var23
/* : Int */;
4424 val
* var24
/* : nullable String */;
4425 long var25
/* : Int */;
4426 val
* var_26
/* var : RopeCharIterator */;
4427 long var27
/* : Int */;
4428 long var28
/* : Int */;
4429 long var29
/* : Int */;
4430 long var31
/* : Int */;
4431 var
= ((short int (*)(val
*))(self
->class->vft
[COLOR_abstract_collection__Iterator__is_ok
]))(self
) /* is_ok on <self:RopeCharIterator>*/;
4433 fprintf(stderr
, "Runtime error: %s", "Assert failed");
4434 fprintf(stderr
, " (%s:%d)\n", "lib/standard/ropes.nit", 839);
4437 var1
= ((long (*)(val
*))(self
->class->vft
[COLOR_ropes__RopeCharIterator__sub_pos
]))(self
) /* sub_pos on <self:RopeCharIterator>*/;
4438 var2
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_ropes__RopeCharIterator__curr_substring
]))(self
) /* curr_substring on <self:RopeCharIterator>*/;
4440 fprintf(stderr
, "Runtime error: %s", "Reciever is null");
4441 fprintf(stderr
, " (%s:%d)\n", "lib/standard/ropes.nit", 840);
4444 var3
= ((long (*)(val
*))(var2
->class->vft
[COLOR_abstract_collection__Collection__length
]))(var2
) /* length on <var2:nullable String>*/;
4447 { /* Inline kernel#Int#- (var3,var4) */
4453 { /* Inline kernel#Int#< (var1,var5) */
4454 /* Covariant cast for argument 0 (i) <var5:Int> isa OTHER */
4455 /* <var5:Int> isa OTHER */
4456 var10
= 1; /* easy <var5:Int> isa OTHER*/
4458 var_class_name
= type_kernel__Int
.name
;
4459 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name
);
4460 fprintf(stderr
, " (%s:%d)\n", "lib/standard/kernel.nit", 261);
4463 var11
= var1
< var5
;
4470 var12
= ((long (*)(val
*))(var_
->class->vft
[COLOR_ropes__RopeCharIterator__sub_pos
]))(var_
) /* sub_pos on <var_:RopeCharIterator>*/;
4472 { /* Inline kernel#Int#+ (var12,var13) */
4473 var16
= var12
+ var13
;
4476 RET_LABEL15
:(void)0;
4478 ((void (*)(val
*, long))(var_
->class->vft
[COLOR_ropes__RopeCharIterator__sub_pos_61d
]))(var_
, var14
) /* sub_pos= on <var_:RopeCharIterator>*/;
4480 var17
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_ropes__RopeCharIterator__sub_str_iter
]))(self
) /* sub_str_iter on <self:RopeCharIterator>*/;
4481 ((void (*)(val
*))(var17
->class->vft
[COLOR_abstract_collection__Iterator__next
]))(var17
) /* next on <var17:DFSRopeLeafIterator>*/;
4482 var18
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_ropes__RopeCharIterator__sub_str_iter
]))(self
) /* sub_str_iter on <self:RopeCharIterator>*/;
4483 var19
= ((short int (*)(val
*))(var18
->class->vft
[COLOR_abstract_collection__Iterator__is_ok
]))(var18
) /* is_ok on <var18:DFSRopeLeafIterator>*/;
4485 var20
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_ropes__RopeCharIterator__sub_str_iter
]))(self
) /* sub_str_iter on <self:RopeCharIterator>*/;
4486 var21
= ((val
* (*)(val
*))(var20
->class->vft
[COLOR_abstract_collection__Iterator__item
]))(var20
) /* item on <var20:DFSRopeLeafIterator>*/;
4487 var22
= ((val
* (*)(val
*))(var21
->class->vft
[COLOR_ropes__LeafNode__value
]))(var21
) /* value on <var21:nullable Object(LeafNode)>*/;
4488 ((void (*)(val
*, val
*))(self
->class->vft
[COLOR_ropes__RopeCharIterator__curr_substring_61d
]))(self
, var22
) /* curr_substring= on <self:RopeCharIterator>*/;
4490 ((void (*)(val
*, long))(self
->class->vft
[COLOR_ropes__RopeCharIterator__sub_pos_61d
]))(self
, var23
) /* sub_pos= on <self:RopeCharIterator>*/;
4492 var24
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_ropes__RopeCharIterator__curr_substring
]))(self
) /* curr_substring on <self:RopeCharIterator>*/;
4493 if (var24
== NULL
) {
4494 fprintf(stderr
, "Runtime error: %s", "Reciever is null");
4495 fprintf(stderr
, " (%s:%d)\n", "lib/standard/ropes.nit", 848);
4498 var25
= ((long (*)(val
*))(var24
->class->vft
[COLOR_abstract_collection__Collection__length
]))(var24
) /* length on <var24:nullable String>*/;
4500 ((void (*)(val
*, long))(self
->class->vft
[COLOR_ropes__RopeCharIterator__sub_pos_61d
]))(self
, var25
) /* sub_pos= on <self:RopeCharIterator>*/;
4504 var27
= ((long (*)(val
*))(var_26
->class->vft
[COLOR_ropes__RopeCharIterator__abs_pos
]))(var_26
) /* abs_pos on <var_26:RopeCharIterator>*/;
4506 { /* Inline kernel#Int#+ (var27,var28) */
4507 var31
= var27
+ var28
;
4510 RET_LABEL30
:(void)0;
4512 ((void (*)(val
*, long))(var_26
->class->vft
[COLOR_ropes__RopeCharIterator__abs_pos_61d
]))(var_26
, var29
) /* abs_pos= on <var_26:RopeCharIterator>*/;
4515 /* method ropes#RopeCharIterator#next for (self: Object) */
4516 void VIRTUAL_ropes__RopeCharIterator__next(val
* self
) {
4517 ropes__RopeCharIterator__next(self
);
4520 /* method ropes#RopeCharIterator#index for (self: RopeCharIterator): Int */
4521 long ropes__RopeCharIterator__index(val
* self
) {
4522 long var
/* : Int */;
4523 long var1
/* : Int */;
4524 var1
= ((long (*)(val
*))(self
->class->vft
[COLOR_ropes__RopeCharIterator__abs_pos
]))(self
) /* abs_pos on <self:RopeCharIterator>*/;
4530 /* method ropes#RopeCharIterator#index for (self: Object): Int */
4531 long VIRTUAL_ropes__RopeCharIterator__index(val
* self
) {
4532 long var
/* : Int */;
4533 long var1
/* : Int */;
4534 var1
= ropes__RopeCharIterator__index(self
);
4539 /* method ropes#DFSRopeLeafIterator#visit_stack for (self: DFSRopeLeafIterator): List[TupleVisitNode] */
4540 val
* ropes__DFSRopeLeafIterator__visit_stack(val
* self
) {
4541 val
* var
/* : List[TupleVisitNode] */;
4542 val
* var1
/* : List[TupleVisitNode] */;
4543 var1
= self
->attrs
[COLOR_ropes__DFSRopeLeafIterator___64dvisit_stack
].val
; /* @visit_stack on <self:DFSRopeLeafIterator> */
4545 fprintf(stderr
, "Runtime error: %s", "Uninitialized attribute @visit_stack");
4546 fprintf(stderr
, " (%s:%d)\n", "lib/standard/ropes.nit", 865);
4553 /* method ropes#DFSRopeLeafIterator#visit_stack for (self: Object): List[TupleVisitNode] */
4554 val
* VIRTUAL_ropes__DFSRopeLeafIterator__visit_stack(val
* self
) {
4555 val
* var
/* : List[TupleVisitNode] */;
4556 val
* var1
/* : List[TupleVisitNode] */;
4557 var1
= ropes__DFSRopeLeafIterator__visit_stack(self
);
4562 /* method ropes#DFSRopeLeafIterator#visit_stack= for (self: DFSRopeLeafIterator, List[TupleVisitNode]) */
4563 void ropes__DFSRopeLeafIterator__visit_stack_61d(val
* self
, val
* p0
) {
4564 self
->attrs
[COLOR_ropes__DFSRopeLeafIterator___64dvisit_stack
].val
= p0
; /* @visit_stack on <self:DFSRopeLeafIterator> */
4567 /* method ropes#DFSRopeLeafIterator#visit_stack= for (self: Object, List[TupleVisitNode]) */
4568 void VIRTUAL_ropes__DFSRopeLeafIterator__visit_stack_61d(val
* self
, val
* p0
) {
4569 ropes__DFSRopeLeafIterator__visit_stack_61d(self
, p0
);
4572 /* method ropes#DFSRopeLeafIterator#curr_leaf for (self: DFSRopeLeafIterator): nullable LeafNode */
4573 val
* ropes__DFSRopeLeafIterator__curr_leaf(val
* self
) {
4574 val
* var
/* : nullable LeafNode */;
4575 val
* var1
/* : nullable LeafNode */;
4576 var1
= self
->attrs
[COLOR_ropes__DFSRopeLeafIterator___64dcurr_leaf
].val
; /* @curr_leaf on <self:DFSRopeLeafIterator> */
4581 /* method ropes#DFSRopeLeafIterator#curr_leaf for (self: Object): nullable LeafNode */
4582 val
* VIRTUAL_ropes__DFSRopeLeafIterator__curr_leaf(val
* self
) {
4583 val
* var
/* : nullable LeafNode */;
4584 val
* var1
/* : nullable LeafNode */;
4585 var1
= ropes__DFSRopeLeafIterator__curr_leaf(self
);
4590 /* method ropes#DFSRopeLeafIterator#curr_leaf= for (self: DFSRopeLeafIterator, nullable LeafNode) */
4591 void ropes__DFSRopeLeafIterator__curr_leaf_61d(val
* self
, val
* p0
) {
4592 self
->attrs
[COLOR_ropes__DFSRopeLeafIterator___64dcurr_leaf
].val
= p0
; /* @curr_leaf on <self:DFSRopeLeafIterator> */
4595 /* method ropes#DFSRopeLeafIterator#curr_leaf= for (self: Object, nullable LeafNode) */
4596 void VIRTUAL_ropes__DFSRopeLeafIterator__curr_leaf_61d(val
* self
, val
* p0
) {
4597 ropes__DFSRopeLeafIterator__curr_leaf_61d(self
, p0
);
4600 /* method ropes#DFSRopeLeafIterator#init for (self: DFSRopeLeafIterator, Rope) */
4601 void ropes__DFSRopeLeafIterator__init(val
* self
, val
* p0
) {
4602 val
* var_tgt
/* var tgt: Rope */;
4603 val
* var
/* : Rope */;
4604 val
* var1
/* : RopeNode */;
4605 val
* var_first_node
/* var first_node: RopeNode */;
4606 short int var2
/* : Bool */;
4609 val
* var3
/* : List[TupleVisitNode] */;
4610 val
* var4
/* : TupleVisitNode */;
4611 short int var5
/* : Bool */;
4615 ((void (*)(val
*, val
*))(self
->class->vft
[COLOR_ropes__RopeIterator__init
]))(self
, p0
) /* init on <self:DFSRopeLeafIterator>*/;
4616 var
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_ropes__RopeIterator__target
]))(self
) /* target on <self:DFSRopeLeafIterator>*/;
4617 var1
= ((val
* (*)(val
*))(var
->class->vft
[COLOR_ropes__Rope__parent_node
]))(var
) /* parent_node on <var:Rope>*/;
4618 var_first_node
= var1
;
4619 /* <var_first_node:RopeNode> isa ConcatNode */
4620 cltype
= type_ropes__ConcatNode
.color
;
4621 idtype
= type_ropes__ConcatNode
.id
;
4622 if(cltype
>= var_first_node
->type
->table_size
) {
4625 var2
= var_first_node
->type
->type_table
[cltype
] == idtype
;
4628 var3
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_ropes__DFSRopeLeafIterator__visit_stack
]))(self
) /* visit_stack on <self:DFSRopeLeafIterator>*/;
4629 var4
= NEW_ropes__TupleVisitNode(&type_ropes__TupleVisitNode
);
4630 ((void (*)(val
*, val
*))(var4
->class->vft
[COLOR_ropes__TupleVisitNode__init
]))(var4
, var_first_node
) /* init on <var4:TupleVisitNode>*/;
4631 CHECK_NEW_ropes__TupleVisitNode(var4
);
4632 ((void (*)(val
*, val
*))(var3
->class->vft
[COLOR_abstract_collection__Sequence__push
]))(var3
, var4
) /* push on <var3:List[TupleVisitNode]>*/;
4634 /* <var_first_node:RopeNode> isa LeafNode */
4635 cltype6
= type_ropes__LeafNode
.color
;
4636 idtype7
= type_ropes__LeafNode
.id
;
4637 if(cltype6
>= var_first_node
->type
->table_size
) {
4640 var5
= var_first_node
->type
->type_table
[cltype6
] == idtype7
;
4643 ((void (*)(val
*, val
*))(self
->class->vft
[COLOR_ropes__DFSRopeLeafIterator__curr_leaf_61d
]))(self
, var_first_node
) /* curr_leaf= on <self:DFSRopeLeafIterator>*/;
4648 ((void (*)(val
*))(self
->class->vft
[COLOR_ropes__DFSRopeLeafIterator__next_body
]))(self
) /* next_body on <self:DFSRopeLeafIterator>*/;
4651 /* method ropes#DFSRopeLeafIterator#init for (self: Object, Rope) */
4652 void VIRTUAL_ropes__DFSRopeLeafIterator__init(val
* self
, val
* p0
) {
4653 ropes__DFSRopeLeafIterator__init(self
, p0
);
4656 /* method ropes#DFSRopeLeafIterator#with_index for (self: DFSRopeLeafIterator, Rope, Int) */
4657 void ropes__DFSRopeLeafIterator__with_index(val
* self
, val
* p0
, long p1
) {
4658 val
* var_tgt
/* var tgt: Rope */;
4659 long var_index
/* var index: Int */;
4660 val
* var
/* : Rope */;
4661 val
* var1
/* : TupleLeafNodePos */;
4662 val
* var_returned_tuple
/* var returned_tuple: TupleLeafNodePos */;
4663 val
* var2
/* : LeafNode */;
4664 val
* var3
/* : List[TupleVisitNode] */;
4665 long var4
/* : Int */;
4666 long var5
/* : Int */;
4667 long var7
/* : Int */;
4670 ((void (*)(val
*, val
*, long))(self
->class->vft
[COLOR_ropes__RopeIterator__with_index
]))(self
, p0
, p1
) /* with_index on <self:DFSRopeLeafIterator>*/;
4671 var
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_ropes__RopeIterator__target
]))(self
) /* target on <self:DFSRopeLeafIterator>*/;
4672 var1
= ((val
* (*)(val
*, long))(var
->class->vft
[COLOR_ropes__Rope__get_node_for_pos
]))(var
, var_index
) /* get_node_for_pos on <var:Rope>*/;
4673 var_returned_tuple
= var1
;
4674 var2
= ((val
* (*)(val
*))(var_returned_tuple
->class->vft
[COLOR_ropes__TupleLeafNodePos__curr_node
]))(var_returned_tuple
) /* curr_node on <var_returned_tuple:TupleLeafNodePos>*/;
4675 ((void (*)(val
*, val
*))(self
->class->vft
[COLOR_ropes__DFSRopeLeafIterator__curr_leaf_61d
]))(self
, var2
) /* curr_leaf= on <self:DFSRopeLeafIterator>*/;
4676 var3
= ((val
* (*)(val
*))(var_returned_tuple
->class->vft
[COLOR_ropes__TupleLeafNodePos__visit_stack
]))(var_returned_tuple
) /* visit_stack on <var_returned_tuple:TupleLeafNodePos>*/;
4677 ((void (*)(val
*, val
*))(self
->class->vft
[COLOR_ropes__DFSRopeLeafIterator__visit_stack_61d
]))(self
, var3
) /* visit_stack= on <self:DFSRopeLeafIterator>*/;
4678 var4
= ((long (*)(val
*))(var_returned_tuple
->class->vft
[COLOR_ropes__TupleLeafNodePos__corrected_pos
]))(var_returned_tuple
) /* corrected_pos on <var_returned_tuple:TupleLeafNodePos>*/;
4679 { /* Inline kernel#Int#- (var_index,var4) */
4680 var7
= var_index
- var4
;
4685 ((void (*)(val
*, long))(self
->class->vft
[COLOR_ropes__RopeIterator__pos_61d
]))(self
, var5
) /* pos= on <self:DFSRopeLeafIterator>*/;
4688 /* method ropes#DFSRopeLeafIterator#with_index for (self: Object, Rope, Int) */
4689 void VIRTUAL_ropes__DFSRopeLeafIterator__with_index(val
* self
, val
* p0
, long p1
) {
4690 ropes__DFSRopeLeafIterator__with_index(self
, p0
, p1
);
4693 /* method ropes#DFSRopeLeafIterator#is_ok for (self: DFSRopeLeafIterator): Bool */
4694 short int ropes__DFSRopeLeafIterator__is_ok(val
* self
) {
4695 short int var
/* : Bool */;
4696 val
* var1
/* : nullable LeafNode */;
4697 val
* var2
/* : null */;
4698 short int var3
/* : Bool */;
4699 var1
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_ropes__DFSRopeLeafIterator__curr_leaf
]))(self
) /* curr_leaf on <self:DFSRopeLeafIterator>*/;
4702 var3
= 0; /* is null */
4704 var3
= 1; /* arg is null and recv is not */
4711 /* method ropes#DFSRopeLeafIterator#is_ok for (self: Object): Bool */
4712 short int VIRTUAL_ropes__DFSRopeLeafIterator__is_ok(val
* self
) {
4713 short int var
/* : Bool */;
4714 short int var1
/* : Bool */;
4715 var1
= ropes__DFSRopeLeafIterator__is_ok(self
);
4720 /* method ropes#DFSRopeLeafIterator#next for (self: DFSRopeLeafIterator) */
4721 void ropes__DFSRopeLeafIterator__next(val
* self
) {
4722 short int var
/* : Bool */;
4723 val
* var_
/* var : DFSRopeLeafIterator */;
4724 long var1
/* : Int */;
4725 val
* var2
/* : nullable LeafNode */;
4726 val
* var3
/* : String */;
4727 long var4
/* : Int */;
4728 long var5
/* : Int */;
4729 long var7
/* : Int */;
4730 var
= ((short int (*)(val
*))(self
->class->vft
[COLOR_abstract_collection__Iterator__is_ok
]))(self
) /* is_ok on <self:DFSRopeLeafIterator>*/;
4732 fprintf(stderr
, "Runtime error: %s", "Assert failed");
4733 fprintf(stderr
, " (%s:%d)\n", "lib/standard/ropes.nit", 902);
4737 var1
= ((long (*)(val
*))(var_
->class->vft
[COLOR_ropes__RopeIterator__pos
]))(var_
) /* pos on <var_:DFSRopeLeafIterator>*/;
4738 var2
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_ropes__DFSRopeLeafIterator__curr_leaf
]))(self
) /* curr_leaf on <self:DFSRopeLeafIterator>*/;
4740 fprintf(stderr
, "Runtime error: %s", "Reciever is null");
4741 fprintf(stderr
, " (%s:%d)\n", "lib/standard/ropes.nit", 903);
4744 var3
= ((val
* (*)(val
*))(var2
->class->vft
[COLOR_ropes__LeafNode__value
]))(var2
) /* value on <var2:nullable LeafNode>*/;
4746 var4
= ((long (*)(val
*))(var3
->class->vft
[COLOR_abstract_collection__Collection__length
]))(var3
) /* length on <var3:String>*/;
4747 { /* Inline kernel#Int#+ (var1,var4) */
4753 ((void (*)(val
*, long))(var_
->class->vft
[COLOR_ropes__RopeIterator__pos_61d
]))(var_
, var5
) /* pos= on <var_:DFSRopeLeafIterator>*/;
4754 ((void (*)(val
*))(self
->class->vft
[COLOR_ropes__DFSRopeLeafIterator__next_body
]))(self
) /* next_body on <self:DFSRopeLeafIterator>*/;
4757 /* method ropes#DFSRopeLeafIterator#next for (self: Object) */
4758 void VIRTUAL_ropes__DFSRopeLeafIterator__next(val
* self
) {
4759 ropes__DFSRopeLeafIterator__next(self
);
4762 /* method ropes#DFSRopeLeafIterator#next_body for (self: DFSRopeLeafIterator) */
4763 void ropes__DFSRopeLeafIterator__next_body(val
* self
) {
4764 val
* var
/* : List[TupleVisitNode] */;
4765 short int var1
/* : Bool */;
4766 short int var2
/* : Bool */;
4767 val
* var3
/* : List[TupleVisitNode] */;
4768 val
* var4
/* : nullable Object */;
4769 val
* var_curr_concat_tuple
/* var curr_concat_tuple: TupleVisitNode */;
4770 short int var5
/* : Bool */;
4771 short int var6
/* : Bool */;
4772 short int var7
/* : Bool */;
4773 val
* var8
/* : ConcatNode */;
4774 val
* var9
/* : nullable RopeNode */;
4775 val
* var_next_node
/* var next_node: nullable RopeNode */;
4776 val
* var10
/* : null */;
4777 short int var11
/* : Bool */;
4778 short int var12
/* : Bool */;
4781 val
* var13
/* : List[TupleVisitNode] */;
4782 val
* var14
/* : TupleVisitNode */;
4783 short int var15
/* : Bool */;
4786 short int var18
/* : Bool */;
4787 short int var19
/* : Bool */;
4788 short int var20
/* : Bool */;
4789 val
* var21
/* : ConcatNode */;
4790 val
* var22
/* : nullable RopeNode */;
4791 val
* var23
/* : null */;
4792 short int var24
/* : Bool */;
4793 short int var25
/* : Bool */;
4796 val
* var28
/* : List[TupleVisitNode] */;
4797 val
* var29
/* : TupleVisitNode */;
4798 short int var30
/* : Bool */;
4801 val
* var33
/* : List[TupleVisitNode] */;
4802 val
* var34
/* : nullable Object */;
4803 val
* var35
/* : null */;
4805 var
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_ropes__DFSRopeLeafIterator__visit_stack
]))(self
) /* visit_stack on <self:DFSRopeLeafIterator>*/;
4806 var1
= ((short int (*)(val
*))(var
->class->vft
[COLOR_abstract_collection__Collection__is_empty
]))(var
) /* is_empty on <var:List[TupleVisitNode]>*/;
4809 var3
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_ropes__DFSRopeLeafIterator__visit_stack
]))(self
) /* visit_stack on <self:DFSRopeLeafIterator>*/;
4810 var4
= ((val
* (*)(val
*))(var3
->class->vft
[COLOR_abstract_collection__SequenceRead__last
]))(var3
) /* last on <var3:List[TupleVisitNode]>*/;
4811 var_curr_concat_tuple
= var4
;
4812 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>*/;
4816 ((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>*/;
4817 var8
= ((val
* (*)(val
*))(var_curr_concat_tuple
->class->vft
[COLOR_ropes__TupleVisitNode__node
]))(var_curr_concat_tuple
) /* node on <var_curr_concat_tuple:TupleVisitNode>*/;
4818 var9
= ((val
* (*)(val
*))(var8
->class->vft
[COLOR_ropes__ConcatNode__left_child
]))(var8
) /* left_child on <var8:ConcatNode>*/;
4819 var_next_node
= var9
;
4821 if (var_next_node
== NULL
) {
4822 var11
= 1; /* is null */
4824 var11
= 0; /* arg is null but recv is not */
4827 goto CONTINUE_label
;
4830 /* <var_next_node:nullable RopeNode(RopeNode)> isa ConcatNode */
4831 cltype
= type_ropes__ConcatNode
.color
;
4832 idtype
= type_ropes__ConcatNode
.id
;
4833 if(cltype
>= var_next_node
->type
->table_size
) {
4836 var12
= var_next_node
->type
->type_table
[cltype
] == idtype
;
4839 var13
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_ropes__DFSRopeLeafIterator__visit_stack
]))(self
) /* visit_stack on <self:DFSRopeLeafIterator>*/;
4840 var14
= NEW_ropes__TupleVisitNode(&type_ropes__TupleVisitNode
);
4841 ((void (*)(val
*, val
*))(var14
->class->vft
[COLOR_ropes__TupleVisitNode__init
]))(var14
, var_next_node
) /* init on <var14:TupleVisitNode>*/;
4842 CHECK_NEW_ropes__TupleVisitNode(var14
);
4843 ((void (*)(val
*, val
*))(var13
->class->vft
[COLOR_abstract_collection__Sequence__push
]))(var13
, var14
) /* push on <var13:List[TupleVisitNode]>*/;
4845 /* <var_next_node:nullable RopeNode(RopeNode)> isa LeafNode */
4846 cltype16
= type_ropes__LeafNode
.color
;
4847 idtype17
= type_ropes__LeafNode
.id
;
4848 if(cltype16
>= var_next_node
->type
->table_size
) {
4851 var15
= var_next_node
->type
->type_table
[cltype16
] == idtype17
;
4854 ((void (*)(val
*, val
*))(self
->class->vft
[COLOR_ropes__DFSRopeLeafIterator__curr_leaf_61d
]))(self
, var_next_node
) /* curr_leaf= on <self:DFSRopeLeafIterator>*/;
4860 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>*/;
4864 ((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>*/;
4865 var21
= ((val
* (*)(val
*))(var_curr_concat_tuple
->class->vft
[COLOR_ropes__TupleVisitNode__node
]))(var_curr_concat_tuple
) /* node on <var_curr_concat_tuple:TupleVisitNode>*/;
4866 var22
= ((val
* (*)(val
*))(var21
->class->vft
[COLOR_ropes__ConcatNode__right_child
]))(var21
) /* right_child on <var21:ConcatNode>*/;
4867 var_next_node
= var22
;
4869 if (var_next_node
== NULL
) {
4870 var24
= 1; /* is null */
4872 var24
= 0; /* arg is null but recv is not */
4875 goto CONTINUE_label
;
4878 /* <var_next_node:nullable RopeNode(RopeNode)> isa ConcatNode */
4879 cltype26
= type_ropes__ConcatNode
.color
;
4880 idtype27
= type_ropes__ConcatNode
.id
;
4881 if(cltype26
>= var_next_node
->type
->table_size
) {
4884 var25
= var_next_node
->type
->type_table
[cltype26
] == idtype27
;
4887 var28
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_ropes__DFSRopeLeafIterator__visit_stack
]))(self
) /* visit_stack on <self:DFSRopeLeafIterator>*/;
4888 var29
= NEW_ropes__TupleVisitNode(&type_ropes__TupleVisitNode
);
4889 ((void (*)(val
*, val
*))(var29
->class->vft
[COLOR_ropes__TupleVisitNode__init
]))(var29
, var_next_node
) /* init on <var29:TupleVisitNode>*/;
4890 CHECK_NEW_ropes__TupleVisitNode(var29
);
4891 ((void (*)(val
*, val
*))(var28
->class->vft
[COLOR_abstract_collection__Sequence__push
]))(var28
, var29
) /* push on <var28:List[TupleVisitNode]>*/;
4893 /* <var_next_node:nullable RopeNode(RopeNode)> isa LeafNode */
4894 cltype31
= type_ropes__LeafNode
.color
;
4895 idtype32
= type_ropes__LeafNode
.id
;
4896 if(cltype31
>= var_next_node
->type
->table_size
) {
4899 var30
= var_next_node
->type
->type_table
[cltype31
] == idtype32
;
4902 ((void (*)(val
*, val
*))(self
->class->vft
[COLOR_ropes__DFSRopeLeafIterator__curr_leaf_61d
]))(self
, var_next_node
) /* curr_leaf= on <self:DFSRopeLeafIterator>*/;
4908 var33
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_ropes__DFSRopeLeafIterator__visit_stack
]))(self
) /* visit_stack on <self:DFSRopeLeafIterator>*/;
4909 var34
= ((val
* (*)(val
*))(var33
->class->vft
[COLOR_abstract_collection__Sequence__pop
]))(var33
) /* pop on <var33:List[TupleVisitNode]>*/;
4913 CONTINUE_label
: (void)0;
4915 BREAK_label
: (void)0;
4917 ((void (*)(val
*, val
*))(self
->class->vft
[COLOR_ropes__DFSRopeLeafIterator__curr_leaf_61d
]))(self
, var35
) /* curr_leaf= on <self:DFSRopeLeafIterator>*/;
4920 /* method ropes#DFSRopeLeafIterator#next_body for (self: Object) */
4921 void VIRTUAL_ropes__DFSRopeLeafIterator__next_body(val
* self
) {
4922 ropes__DFSRopeLeafIterator__next_body(self
);
4925 /* method ropes#DFSRopeLeafIterator#item for (self: DFSRopeLeafIterator): LeafNode */
4926 val
* ropes__DFSRopeLeafIterator__item(val
* self
) {
4927 val
* var
/* : LeafNode */;
4928 short int var1
/* : Bool */;
4929 val
* var2
/* : nullable LeafNode */;
4930 var1
= ((short int (*)(val
*))(self
->class->vft
[COLOR_abstract_collection__Iterator__is_ok
]))(self
) /* is_ok on <self:DFSRopeLeafIterator>*/;
4932 fprintf(stderr
, "Runtime error: %s", "Assert failed");
4933 fprintf(stderr
, " (%s:%d)\n", "lib/standard/ropes.nit", 951);
4936 var2
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_ropes__DFSRopeLeafIterator__curr_leaf
]))(self
) /* curr_leaf on <self:DFSRopeLeafIterator>*/;
4938 fprintf(stderr
, "Runtime error: %s", "Cast failed");
4939 fprintf(stderr
, " (%s:%d)\n", "lib/standard/ropes.nit", 952);
4947 /* method ropes#DFSRopeLeafIterator#item for (self: Object): nullable Object */
4948 val
* VIRTUAL_ropes__DFSRopeLeafIterator__item(val
* self
) {
4949 val
* var
/* : nullable Object */;
4950 val
* var1
/* : LeafNode */;
4951 var1
= ropes__DFSRopeLeafIterator__item(self
);
4956 /* method ropes#RopeNode#parent for (self: RopeNode): nullable ConcatNode */
4957 val
* ropes__RopeNode__parent(val
* self
) {
4958 val
* var
/* : nullable ConcatNode */;
4959 val
* var1
/* : nullable ConcatNode */;
4960 var1
= self
->attrs
[COLOR_ropes__RopeNode___64dparent
].val
; /* @parent on <self:RopeNode> */
4965 /* method ropes#RopeNode#parent for (self: Object): nullable ConcatNode */
4966 val
* VIRTUAL_ropes__RopeNode__parent(val
* self
) {
4967 val
* var
/* : nullable ConcatNode */;
4968 val
* var1
/* : nullable ConcatNode */;
4969 var1
= ropes__RopeNode__parent(self
);
4974 /* method ropes#RopeNode#parent= for (self: RopeNode, nullable ConcatNode) */
4975 void ropes__RopeNode__parent_61d(val
* self
, val
* p0
) {
4976 self
->attrs
[COLOR_ropes__RopeNode___64dparent
].val
= p0
; /* @parent on <self:RopeNode> */
4979 /* method ropes#RopeNode#parent= for (self: Object, nullable ConcatNode) */
4980 void VIRTUAL_ropes__RopeNode__parent_61d(val
* self
, val
* p0
) {
4981 ropes__RopeNode__parent_61d(self
, p0
);
4984 /* method ropes#RopeNode#height for (self: RopeNode): Int */
4985 long ropes__RopeNode__height(val
* self
) {
4986 long var
/* : Int */;
4987 long var1
/* : Int */;
4988 var1
= self
->attrs
[COLOR_ropes__RopeNode___64dheight
].l
; /* @height on <self:RopeNode> */
4993 /* method ropes#RopeNode#height for (self: Object): Int */
4994 long VIRTUAL_ropes__RopeNode__height(val
* self
) {
4995 long var
/* : Int */;
4996 long var1
/* : Int */;
4997 var1
= ropes__RopeNode__height(self
);
5002 /* method ropes#RopeNode#height= for (self: RopeNode, Int) */
5003 void ropes__RopeNode__height_61d(val
* self
, long p0
) {
5004 self
->attrs
[COLOR_ropes__RopeNode___64dheight
].l
= p0
; /* @height on <self:RopeNode> */
5007 /* method ropes#RopeNode#height= for (self: Object, Int) */
5008 void VIRTUAL_ropes__RopeNode__height_61d(val
* self
, long p0
) {
5009 ropes__RopeNode__height_61d(self
, p0
);
5012 /* method ropes#RopeNode#balance_factor for (self: RopeNode): Int */
5013 long ropes__RopeNode__balance_factor(val
* self
) {
5014 long var
/* : Int */;
5015 long var1
/* : Int */;
5016 var1
= ((long (*)(val
*))(self
->class->vft
[COLOR_ropes__RopeNode__height
]))(self
) /* height on <self:RopeNode>*/;
5022 /* method ropes#RopeNode#balance_factor for (self: Object): Int */
5023 long VIRTUAL_ropes__RopeNode__balance_factor(val
* self
) {
5024 long var
/* : Int */;
5025 long var1
/* : Int */;
5026 var1
= ropes__RopeNode__balance_factor(self
);
5031 /* method ropes#RopeNode#length for (self: RopeNode): Int */
5032 long ropes__RopeNode__length(val
* self
) {
5033 long var
/* : Int */;
5034 long var1
/* : Int */;
5035 var1
= self
->attrs
[COLOR_ropes__RopeNode___length
].l
; /* _length on <self:RopeNode> */
5041 /* method ropes#RopeNode#length for (self: Object): Int */
5042 long VIRTUAL_ropes__RopeNode__length(val
* self
) {
5043 long var
/* : Int */;
5044 long var1
/* : Int */;
5045 var1
= ropes__RopeNode__length(self
);
5050 /* method ropes#RopeNode#length= for (self: RopeNode, Int) */
5051 void ropes__RopeNode__length_61d(val
* self
, long p0
) {
5052 long var_len
/* var len: Int */;
5054 self
->attrs
[COLOR_ropes__RopeNode___length
].l
= var_len
; /* _length on <self:RopeNode> */
5057 /* method ropes#RopeNode#length= for (self: Object, Int) */
5058 void VIRTUAL_ropes__RopeNode__length_61d(val
* self
, long p0
) {
5059 ropes__RopeNode__length_61d(self
, p0
);
5062 /* method ropes#RopeNode#init for (self: RopeNode) */
5063 void ropes__RopeNode__init(val
* self
) {
5066 /* method ropes#RopeNode#init for (self: Object) */
5067 void VIRTUAL_ropes__RopeNode__init(val
* self
) {
5068 ropes__RopeNode__init(self
);
5071 /* method ropes#ConcatNode#left_child for (self: ConcatNode): nullable RopeNode */
5072 val
* ropes__ConcatNode__left_child(val
* self
) {
5073 val
* var
/* : nullable RopeNode */;
5074 val
* var1
/* : nullable RopeNode */;
5075 val
* var2
/* : null */;
5076 short int var3
/* : Bool */;
5077 val
* var4
/* : nullable RopeNode */;
5078 val
* var5
/* : null */;
5079 var1
= self
->attrs
[COLOR_ropes__ConcatNode___left_child
].val
; /* _left_child on <self:ConcatNode> */
5082 var3
= 0; /* is null */
5084 var3
= 1; /* arg is null and recv is not */
5087 var4
= self
->attrs
[COLOR_ropes__ConcatNode___left_child
].val
; /* _left_child on <self:ConcatNode> */
5098 /* method ropes#ConcatNode#left_child for (self: Object): nullable RopeNode */
5099 val
* VIRTUAL_ropes__ConcatNode__left_child(val
* self
) {
5100 val
* var
/* : nullable RopeNode */;
5101 val
* var1
/* : nullable RopeNode */;
5102 var1
= ropes__ConcatNode__left_child(self
);
5107 /* method ropes#ConcatNode#right_child for (self: ConcatNode): nullable RopeNode */
5108 val
* ropes__ConcatNode__right_child(val
* self
) {
5109 val
* var
/* : nullable RopeNode */;
5110 val
* var1
/* : nullable RopeNode */;
5111 val
* var2
/* : null */;
5112 short int var3
/* : Bool */;
5113 val
* var4
/* : nullable RopeNode */;
5114 val
* var5
/* : null */;
5115 var1
= self
->attrs
[COLOR_ropes__ConcatNode___right_child
].val
; /* _right_child on <self:ConcatNode> */
5118 var3
= 0; /* is null */
5120 var3
= 1; /* arg is null and recv is not */
5123 var4
= self
->attrs
[COLOR_ropes__ConcatNode___right_child
].val
; /* _right_child on <self:ConcatNode> */
5134 /* method ropes#ConcatNode#right_child for (self: Object): nullable RopeNode */
5135 val
* VIRTUAL_ropes__ConcatNode__right_child(val
* self
) {
5136 val
* var
/* : nullable RopeNode */;
5137 val
* var1
/* : nullable RopeNode */;
5138 var1
= ropes__ConcatNode__right_child(self
);
5143 /* method ropes#ConcatNode#left_child= for (self: ConcatNode, nullable RopeNode) */
5144 void ropes__ConcatNode__left_child_61d(val
* self
, val
* p0
) {
5145 val
* var_new_node
/* var new_node: nullable RopeNode */;
5147 self
->attrs
[COLOR_ropes__ConcatNode___left_child
].val
= var_new_node
; /* _left_child on <self:ConcatNode> */
5148 if (var_new_node
== NULL
) {
5149 fprintf(stderr
, "Runtime error: %s", "Reciever is null");
5150 fprintf(stderr
, " (%s:%d)\n", "lib/standard/ropes.nit", 1010);
5153 ((void (*)(val
*, val
*))(var_new_node
->class->vft
[COLOR_ropes__RopeNode__parent_61d
]))(var_new_node
, self
) /* parent= on <var_new_node:nullable RopeNode>*/;
5155 ((void (*)(val
*))(self
->class->vft
[COLOR_ropes__ConcatNode__update_data
]))(self
) /* update_data on <self:ConcatNode>*/;
5158 /* method ropes#ConcatNode#left_child= for (self: Object, nullable RopeNode) */
5159 void VIRTUAL_ropes__ConcatNode__left_child_61d(val
* self
, val
* p0
) {
5160 ropes__ConcatNode__left_child_61d(self
, p0
);
5163 /* method ropes#ConcatNode#right_child= for (self: ConcatNode, nullable RopeNode) */
5164 void ropes__ConcatNode__right_child_61d(val
* self
, val
* p0
) {
5165 val
* var_new_node
/* var new_node: nullable RopeNode */;
5167 self
->attrs
[COLOR_ropes__ConcatNode___right_child
].val
= var_new_node
; /* _right_child on <self:ConcatNode> */
5168 if (var_new_node
== NULL
) {
5169 fprintf(stderr
, "Runtime error: %s", "Reciever is null");
5170 fprintf(stderr
, " (%s:%d)\n", "lib/standard/ropes.nit", 1017);
5173 ((void (*)(val
*, val
*))(var_new_node
->class->vft
[COLOR_ropes__RopeNode__parent_61d
]))(var_new_node
, self
) /* parent= on <var_new_node:nullable RopeNode>*/;
5175 ((void (*)(val
*))(self
->class->vft
[COLOR_ropes__ConcatNode__update_data
]))(self
) /* update_data on <self:ConcatNode>*/;
5178 /* method ropes#ConcatNode#right_child= for (self: Object, nullable RopeNode) */
5179 void VIRTUAL_ropes__ConcatNode__right_child_61d(val
* self
, val
* p0
) {
5180 ropes__ConcatNode__right_child_61d(self
, p0
);
5183 /* method ropes#ConcatNode#update_data for (self: ConcatNode) */
5184 void ropes__ConcatNode__update_data(val
* self
) {
5185 long var
/* : Int */;
5186 long var1
/* : Int */;
5187 val
* var2
/* : nullable RopeNode */;
5188 val
* var3
/* : null */;
5189 short int var4
/* : Bool */;
5190 val
* var_
/* var : ConcatNode */;
5191 long var5
/* : Int */;
5192 val
* var6
/* : nullable RopeNode */;
5193 long var7
/* : Int */;
5194 long var8
/* : Int */;
5195 long var10
/* : Int */;
5196 val
* var11
/* : nullable RopeNode */;
5197 long var12
/* : Int */;
5198 long var13
/* : Int */;
5199 long var14
/* : Int */;
5200 long var16
/* : Int */;
5201 long var17
/* : Int */;
5202 short int var18
/* : Bool */;
5203 short int var20
/* : Bool */;
5206 const char* var_class_name
;
5207 short int var21
/* : Bool */;
5208 val
* var22
/* : nullable RopeNode */;
5209 long var23
/* : Int */;
5210 long var24
/* : Int */;
5211 long var25
/* : Int */;
5212 long var27
/* : Int */;
5213 val
* var28
/* : nullable RopeNode */;
5214 val
* var29
/* : null */;
5215 short int var30
/* : Bool */;
5216 val
* var_31
/* var : ConcatNode */;
5217 long var32
/* : Int */;
5218 val
* var33
/* : nullable RopeNode */;
5219 long var34
/* : Int */;
5220 long var35
/* : Int */;
5221 long var37
/* : Int */;
5222 val
* var38
/* : nullable RopeNode */;
5223 long var39
/* : Int */;
5224 long var40
/* : Int */;
5225 long var41
/* : Int */;
5226 long var43
/* : Int */;
5227 long var44
/* : Int */;
5228 short int var45
/* : Bool */;
5229 short int var47
/* : Bool */;
5232 const char* var_class_name50
;
5233 short int var51
/* : Bool */;
5234 val
* var52
/* : nullable RopeNode */;
5235 long var53
/* : Int */;
5236 long var54
/* : Int */;
5237 long var55
/* : Int */;
5238 long var57
/* : Int */;
5240 ((void (*)(val
*, long))(self
->class->vft
[COLOR_ropes__RopeNode__length_61d
]))(self
, var
) /* length= on <self:ConcatNode>*/;
5242 ((void (*)(val
*, long))(self
->class->vft
[COLOR_ropes__RopeNode__height_61d
]))(self
, var1
) /* height= on <self:ConcatNode>*/;
5243 var2
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_ropes__ConcatNode__left_child
]))(self
) /* left_child on <self:ConcatNode>*/;
5246 var4
= 0; /* is null */
5248 var4
= 1; /* arg is null and recv is not */
5252 var5
= ((long (*)(val
*))(var_
->class->vft
[COLOR_ropes__RopeNode__length
]))(var_
) /* length on <var_:ConcatNode>*/;
5253 var6
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_ropes__ConcatNode__left_child
]))(self
) /* left_child on <self:ConcatNode>*/;
5255 fprintf(stderr
, "Runtime error: %s", "Reciever is null");
5256 fprintf(stderr
, " (%s:%d)\n", "lib/standard/ropes.nit", 1029);
5259 var7
= ((long (*)(val
*))(var6
->class->vft
[COLOR_ropes__RopeNode__length
]))(var6
) /* length on <var6:nullable RopeNode>*/;
5261 { /* Inline kernel#Int#+ (var5,var7) */
5262 var10
= var5
+ var7
;
5267 ((void (*)(val
*, long))(var_
->class->vft
[COLOR_ropes__RopeNode__length_61d
]))(var_
, var8
) /* length= on <var_:ConcatNode>*/;
5268 var11
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_ropes__ConcatNode__left_child
]))(self
) /* left_child on <self:ConcatNode>*/;
5269 if (var11
== NULL
) {
5270 fprintf(stderr
, "Runtime error: %s", "Reciever is null");
5271 fprintf(stderr
, " (%s:%d)\n", "lib/standard/ropes.nit", 1030);
5274 var12
= ((long (*)(val
*))(var11
->class->vft
[COLOR_ropes__RopeNode__height
]))(var11
) /* height on <var11:nullable RopeNode>*/;
5277 { /* Inline kernel#Int#+ (var12,var13) */
5278 var16
= var12
+ var13
;
5281 RET_LABEL15
:(void)0;
5283 var17
= ((long (*)(val
*))(self
->class->vft
[COLOR_ropes__RopeNode__height
]))(self
) /* height on <self:ConcatNode>*/;
5284 { /* Inline kernel#Int#> (var14,var17) */
5285 /* Covariant cast for argument 0 (i) <var17:Int> isa OTHER */
5286 /* <var17:Int> isa OTHER */
5287 var20
= 1; /* easy <var17:Int> isa OTHER*/
5289 var_class_name
= type_kernel__Int
.name
;
5290 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name
);
5291 fprintf(stderr
, " (%s:%d)\n", "lib/standard/kernel.nit", 263);
5294 var21
= var14
> var17
;
5297 RET_LABEL19
:(void)0;
5300 var22
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_ropes__ConcatNode__left_child
]))(self
) /* left_child on <self:ConcatNode>*/;
5301 if (var22
== NULL
) {
5302 fprintf(stderr
, "Runtime error: %s", "Reciever is null");
5303 fprintf(stderr
, " (%s:%d)\n", "lib/standard/ropes.nit", 1030);
5306 var23
= ((long (*)(val
*))(var22
->class->vft
[COLOR_ropes__RopeNode__height
]))(var22
) /* height on <var22:nullable RopeNode>*/;
5309 { /* Inline kernel#Int#+ (var23,var24) */
5310 var27
= var23
+ var24
;
5313 RET_LABEL26
:(void)0;
5315 ((void (*)(val
*, long))(self
->class->vft
[COLOR_ropes__RopeNode__height_61d
]))(self
, var25
) /* height= on <self:ConcatNode>*/;
5320 var28
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_ropes__ConcatNode__right_child
]))(self
) /* right_child on <self:ConcatNode>*/;
5322 if (var28
== NULL
) {
5323 var30
= 0; /* is null */
5325 var30
= 1; /* arg is null and recv is not */
5329 var32
= ((long (*)(val
*))(var_31
->class->vft
[COLOR_ropes__RopeNode__length
]))(var_31
) /* length on <var_31:ConcatNode>*/;
5330 var33
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_ropes__ConcatNode__right_child
]))(self
) /* right_child on <self:ConcatNode>*/;
5331 if (var33
== NULL
) {
5332 fprintf(stderr
, "Runtime error: %s", "Reciever is null");
5333 fprintf(stderr
, " (%s:%d)\n", "lib/standard/ropes.nit", 1033);
5336 var34
= ((long (*)(val
*))(var33
->class->vft
[COLOR_ropes__RopeNode__length
]))(var33
) /* length on <var33:nullable RopeNode>*/;
5338 { /* Inline kernel#Int#+ (var32,var34) */
5339 var37
= var32
+ var34
;
5342 RET_LABEL36
:(void)0;
5344 ((void (*)(val
*, long))(var_31
->class->vft
[COLOR_ropes__RopeNode__length_61d
]))(var_31
, var35
) /* length= on <var_31:ConcatNode>*/;
5345 var38
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_ropes__ConcatNode__right_child
]))(self
) /* right_child on <self:ConcatNode>*/;
5346 if (var38
== NULL
) {
5347 fprintf(stderr
, "Runtime error: %s", "Reciever is null");
5348 fprintf(stderr
, " (%s:%d)\n", "lib/standard/ropes.nit", 1034);
5351 var39
= ((long (*)(val
*))(var38
->class->vft
[COLOR_ropes__RopeNode__height
]))(var38
) /* height on <var38:nullable RopeNode>*/;
5354 { /* Inline kernel#Int#+ (var39,var40) */
5355 var43
= var39
+ var40
;
5358 RET_LABEL42
:(void)0;
5360 var44
= ((long (*)(val
*))(self
->class->vft
[COLOR_ropes__RopeNode__height
]))(self
) /* height on <self:ConcatNode>*/;
5361 { /* Inline kernel#Int#> (var41,var44) */
5362 /* Covariant cast for argument 0 (i) <var44:Int> isa OTHER */
5363 /* <var44:Int> isa OTHER */
5364 var47
= 1; /* easy <var44:Int> isa OTHER*/
5366 var_class_name50
= type_kernel__Int
.name
;
5367 fprintf(stderr
, "Runtime error: Cast failed. Expected `%s`, got `%s`", "OTHER", var_class_name50
);
5368 fprintf(stderr
, " (%s:%d)\n", "lib/standard/kernel.nit", 263);
5371 var51
= var41
> var44
;
5374 RET_LABEL46
:(void)0;
5377 var52
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_ropes__ConcatNode__right_child
]))(self
) /* right_child on <self:ConcatNode>*/;
5378 if (var52
== NULL
) {
5379 fprintf(stderr
, "Runtime error: %s", "Reciever is null");
5380 fprintf(stderr
, " (%s:%d)\n", "lib/standard/ropes.nit", 1034);
5383 var53
= ((long (*)(val
*))(var52
->class->vft
[COLOR_ropes__RopeNode__height
]))(var52
) /* height on <var52:nullable RopeNode>*/;
5386 { /* Inline kernel#Int#+ (var53,var54) */
5387 var57
= var53
+ var54
;
5390 RET_LABEL56
:(void)0;
5392 ((void (*)(val
*, long))(self
->class->vft
[COLOR_ropes__RopeNode__height_61d
]))(self
, var55
) /* height= on <self:ConcatNode>*/;
5399 /* method ropes#ConcatNode#update_data for (self: Object) */
5400 void VIRTUAL_ropes__ConcatNode__update_data(val
* self
) {
5401 ropes__ConcatNode__update_data(self
);
5404 /* method ropes#ConcatNode#balance_factor for (self: ConcatNode): Int */
5405 long ropes__ConcatNode__balance_factor(val
* self
) {
5406 long var
/* : Int */;
5407 long var1
/* : Int */;
5408 long var_left_height
/* var left_height: Int */;
5409 long var2
/* : Int */;
5410 long var_right_height
/* var right_height: Int */;
5411 val
* var3
/* : nullable RopeNode */;
5412 val
* var4
/* : null */;
5413 short int var5
/* : Bool */;
5414 val
* var6
/* : nullable RopeNode */;
5415 long var7
/* : Int */;
5416 val
* var8
/* : nullable RopeNode */;
5417 val
* var9
/* : null */;
5418 short int var10
/* : Bool */;
5419 val
* var11
/* : nullable RopeNode */;
5420 long var12
/* : Int */;
5421 long var13
/* : Int */;
5422 long var15
/* : Int */;
5424 var_left_height
= var1
;
5426 var_right_height
= var2
;
5427 var3
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_ropes__ConcatNode__left_child
]))(self
) /* left_child on <self:ConcatNode>*/;
5430 var5
= 0; /* is null */
5432 var5
= 1; /* arg is null and recv is not */
5435 var6
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_ropes__ConcatNode__left_child
]))(self
) /* left_child on <self:ConcatNode>*/;
5437 fprintf(stderr
, "Runtime error: %s", "Reciever is null");
5438 fprintf(stderr
, " (%s:%d)\n", "lib/standard/ropes.nit", 1045);
5441 var7
= ((long (*)(val
*))(var6
->class->vft
[COLOR_ropes__RopeNode__height
]))(var6
) /* height on <var6:nullable RopeNode>*/;
5443 var_left_height
= var7
;
5446 var8
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_ropes__ConcatNode__right_child
]))(self
) /* right_child on <self:ConcatNode>*/;
5449 var10
= 0; /* is null */
5451 var10
= 1; /* arg is null and recv is not */
5454 var11
= ((val
* (*)(val
*))(self
->class->vft
[COLOR_ropes__ConcatNode__right_child
]))(self
) /* right_child on <self:ConcatNode>*/;
5455 if (var11
== NULL
) {
5456 fprintf(stderr
, "Runtime error: %s", "Reciever is null");
5457 fprintf(stderr
, " (%s:%d)\n", "lib/standard/ropes.nit", 1046);
5460 var12
= ((long (*)(val
*))(var11
->class->vft
[COLOR_ropes__RopeNode__height
]))(var11
) /* height on <var11:nullable RopeNode>*/;
5462 var_right_height
= var12
;
5465 { /* Inline kernel#Int#- (var_left_height,var_right_height) */
5466 var15
= var_left_height
- var_right_height
;
5469 RET_LABEL14
:(void)0;
5476 /* method ropes#ConcatNode#balance_factor for (self: Object): Int */
5477 long VIRTUAL_ropes__ConcatNode__balance_factor(val
* self
) {
5478 long var
/* : Int */;
5479 long var1
/* : Int */;
5480 var1
= ropes__ConcatNode__balance_factor(self
);
5485 /* method ropes#ConcatNode#init for (self: ConcatNode) */
5486 void ropes__ConcatNode__init(val
* self
) {
5487 ((void (*)(val
*))(self
->class->vft
[COLOR_ropes__RopeNode__init
]))(self
) /* init on <self:ConcatNode>*/;
5490 /* method ropes#ConcatNode#init for (self: Object) */
5491 void VIRTUAL_ropes__ConcatNode__init(val
* self
) {
5492 ropes__ConcatNode__init(self
);
5495 /* method ropes#LeafNode#init for (self: LeafNode, AbstractString) */
5496 void ropes__LeafNode__init(val
* self
, val
* p0
) {
5497 val
* var_val
/* var val: AbstractString */;
5498 val
* var
/* : String */;
5499 long var1
/* : Int */;
5501 ((void (*)(val
*))(self
->class->vft
[COLOR_ropes__RopeNode__init
]))(self
) /* init on <self:LeafNode>*/;
5502 var
= ((val
* (*)(val
*))(var_val
->class->vft
[COLOR_string__Object__to_s
]))(var_val
) /* to_s on <var_val:AbstractString>*/;
5503 self
->attrs
[COLOR_ropes__LeafNode___value
].val
= var
; /* _value on <self:LeafNode> */
5504 var1
= ((long (*)(val
*))(var_val
->class->vft
[COLOR_abstract_collection__Collection__length
]))(var_val
) /* length on <var_val:AbstractString>*/;
5505 ((void (*)(val
*, long))(self
->class->vft
[COLOR_ropes__RopeNode__length_61d
]))(self
, var1
) /* length= on <self:LeafNode>*/;
5508 /* method ropes#LeafNode#init for (self: Object, AbstractString) */
5509 void VIRTUAL_ropes__LeafNode__init(val
* self
, val
* p0
) {
5510 ropes__LeafNode__init(self
, p0
);
5513 /* method ropes#LeafNode#value for (self: LeafNode): String */
5514 val
* ropes__LeafNode__value(val
* self
) {
5515 val
* var
/* : String */;
5516 val
* var1
/* : String */;
5517 var1
= self
->attrs
[COLOR_ropes__LeafNode___value
].val
; /* _value on <self:LeafNode> */
5519 fprintf(stderr
, "Runtime error: %s", "Uninitialized attribute _value");
5520 fprintf(stderr
, " (%s:%d)\n", "lib/standard/ropes.nit", 1064);
5528 /* method ropes#LeafNode#value for (self: Object): String */
5529 val
* VIRTUAL_ropes__LeafNode__value(val
* self
) {
5530 val
* var
/* : String */;
5531 val
* var1
/* : String */;
5532 var1
= ropes__LeafNode__value(self
);
5537 /* method ropes#LeafNode#value= for (self: LeafNode, String) */
5538 void ropes__LeafNode__value_61d(val
* self
, val
* p0
) {
5539 val
* var_val
/* var val: String */;
5541 self
->attrs
[COLOR_ropes__LeafNode___value
].val
= var_val
; /* _value on <self:LeafNode> */
5544 /* method ropes#LeafNode#value= for (self: Object, String) */
5545 void VIRTUAL_ropes__LeafNode__value_61d(val
* self
, val
* p0
) {
5546 ropes__LeafNode__value_61d(self
, p0
);
5549 /* method ropes#String#== for (self: String, nullable Object): Bool */
5550 short int ropes__String___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__String___61d_61d
]))(self
, p0
) /* == on <self:String>*/;
5583 /* method ropes#String#== for (self: Object, nullable Object): Bool */
5584 short int VIRTUAL_ropes__String___61d_61d(val
* self
, val
* p0
) {
5585 short int var
/* : Bool */;
5586 short int var1
/* : Bool */;
5587 var1
= ropes__String___61d_61d(self
, p0
);
5592 /* method ropes#Buffer#== for (self: Buffer, nullable Object): Bool */
5593 short int ropes__Buffer___61d_61d(val
* self
, val
* p0
) {
5594 short int var
/* : Bool */;
5595 val
* var_other
/* var other: nullable Object */;
5596 short int var1
/* : Bool */;
5599 short int var2
/* : Bool */;
5600 short int var3
/* : Bool */;
5602 /* <var_other:nullable Object> isa Rope */
5603 cltype
= type_ropes__Rope
.color
;
5604 idtype
= type_ropes__Rope
.id
;
5605 if(var_other
== NULL
) {
5608 if(cltype
>= var_other
->type
->table_size
) {
5611 var1
= var_other
->type
->type_table
[cltype
] == idtype
;
5615 var2
= ((short int (*)(val
*, val
*))(var_other
->class->vft
[COLOR_kernel__Object___61d_61d
]))(var_other
, self
) /* == on <var_other:nullable Object(Rope)>*/;
5619 var3
= ((short int (*)(val
*, val
*))(self
->class->vft
[COLOR_ropes__Buffer___61d_61d
]))(self
, p0
) /* == on <self:Buffer>*/;
5626 /* method ropes#Buffer#== for (self: Object, nullable Object): Bool */
5627 short int VIRTUAL_ropes__Buffer___61d_61d(val
* self
, val
* p0
) {
5628 short int var
/* : Bool */;
5629 short int var1
/* : Bool */;
5630 var1
= ropes__Buffer___61d_61d(self
, p0
);