d5e59fe395433594d88f783aa850da1404656292
[nit.git] / c_src / string_search._sep.c
1 /* This C file is generated by NIT to compile module string_search. */
2 #include "string_search._sep.h"
3 val_t string_search___Pattern___search_index_in(val_t self, val_t param0, val_t param1) {
4 struct trace_t trace = {NULL, LOCATE_string_search___Pattern___search_index_in, 21};
5 trace.prev = tracehead; tracehead = &trace;
6 fprintf(stderr, "Deferred method %s called (%s: %d)\n", "search_index_in", LOCATE_string_search, 21);
7 nit_exit(1);
8 tracehead = trace.prev;
9 return NIT_NULL;
10 }
11 val_t string_search___Pattern___search_in(val_t self, val_t param0, val_t param1) {
12 struct trace_t trace = {NULL, LOCATE_string_search___Pattern___search_in, 26};
13 trace.prev = tracehead; tracehead = &trace;
14 fprintf(stderr, "Deferred method %s called (%s: %d)\n", "search_in", LOCATE_string_search, 26);
15 nit_exit(1);
16 tracehead = trace.prev;
17 return NIT_NULL;
18 }
19 val_t string_search___Pattern___search_all_in(val_t self, val_t param0) {
20 struct trace_t trace = {NULL, LOCATE_string_search___Pattern___search_all_in, 30};
21 val_t variable0;
22 val_t variable1;
23 val_t variable2;
24 val_t variable3;
25 trace.prev = tracehead; tracehead = &trace;
26 variable0 = param0;
27 variable2 = NEW_array___Array___init(); /*new Array[Match]*/
28 variable1 = variable2;
29 variable3 = ((string_search___Pattern___search_in_t)CALL( self,COLOR_string_search___Pattern___search_in))( self, variable0 /*s*/, TAG_Int(0)) /*Pattern::search_in*/;
30 variable2 = variable3;
31 while (true) { /*while*/
32 variable3 = TAG_Bool(!UNTAG_Bool(TAG_Bool(( variable2 /*match*/ == NIT_NULL /*null*/) || (( variable2 /*match*/ != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL( variable2 /*match*/,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN( variable2 /*match*/, NIT_NULL /*null*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL( variable2 /*match*/,COLOR_kernel___Object_____eqeq))( variable2 /*match*/, NIT_NULL /*null*/) /*Match::==*/)))))));
33 if (!UNTAG_Bool(variable3)) break; /* while*/
34 ((array___AbstractArray___add_t)CALL( variable1 /*res*/,COLOR_abstract_collection___SimpleCollection___add))( variable1 /*res*/, variable2 /*match*/) /*Array::add*/;
35 variable3 = ((string_search___Match___after_t)CALL( variable2 /*match*/,COLOR_string_search___Match___after))( variable2 /*match*/) /*Match::after*/;
36 variable3 = ((string_search___Pattern___search_in_t)CALL( self,COLOR_string_search___Pattern___search_in))( self, variable0 /*s*/, variable3) /*Pattern::search_in*/;
37 variable2 = variable3 /*match=*/;
38 continue_1: while(0);
39 }
40 break_1: while(0);
41 variable1 = variable1 /*res*/;
42 goto return_label0;
43 return_label0: while(false);
44 tracehead = trace.prev;
45 return variable1;
46 }
47 val_t string_search___Pattern___split_in(val_t self, val_t param0) {
48 struct trace_t trace = {NULL, LOCATE_string_search___Pattern___split_in, 42};
49 val_t variable0;
50 val_t variable1;
51 val_t variable2;
52 val_t variable3;
53 val_t variable4;
54 val_t variable5;
55 trace.prev = tracehead; tracehead = &trace;
56 variable0 = param0;
57 variable2 = NEW_array___Array___init(); /*new Array[Match]*/
58 variable1 = variable2;
59 variable2 = TAG_Int(0);
60 variable4 = ((string_search___Pattern___search_in_t)CALL( self,COLOR_string_search___Pattern___search_in))( self, variable0 /*s*/, TAG_Int(0)) /*Pattern::search_in*/;
61 variable3 = variable4;
62 while (true) { /*while*/
63 variable4 = TAG_Bool(!UNTAG_Bool(TAG_Bool(( variable3 /*match*/ == NIT_NULL /*null*/) || (( variable3 /*match*/ != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL( variable3 /*match*/,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN( variable3 /*match*/, NIT_NULL /*null*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL( variable3 /*match*/,COLOR_kernel___Object_____eqeq))( variable3 /*match*/, NIT_NULL /*null*/) /*Match::==*/)))))));
64 if (!UNTAG_Bool(variable4)) break; /* while*/
65 variable5 = ((string_search___Match___from_t)CALL( variable3 /*match*/,COLOR_string_search___Match___from))( variable3 /*match*/) /*Match::from*/;
66 variable5 = TAG_Int(UNTAG_Int(variable5)-UNTAG_Int( variable2 /*i*/));
67 variable4 = variable5;
68 variable5 = NEW_string_search___Match___init( variable0 /*s*/, variable2 /*i*/, variable4 /*len*/); /*new Match*/
69 ((array___AbstractArray___add_t)CALL( variable1 /*res*/,COLOR_abstract_collection___SimpleCollection___add))( variable1 /*res*/, variable5) /*Array::add*/;
70 variable5 = ((string_search___Match___after_t)CALL( variable3 /*match*/,COLOR_string_search___Match___after))( variable3 /*match*/) /*Match::after*/;
71 variable2 = variable5 /*i=*/;
72 variable5 = ((string_search___Pattern___search_in_t)CALL( self,COLOR_string_search___Pattern___search_in))( self, variable0 /*s*/, variable2 /*i*/) /*Pattern::search_in*/;
73 variable3 = variable5 /*match=*/;
74 continue_3: while(0);
75 }
76 break_3: while(0);
77 variable4 = ((array___AbstractArray___length_t)CALL( variable0 /*s*/,COLOR_abstract_collection___Collection___length))( variable0 /*s*/) /*String::length*/;
78 variable4 = TAG_Int(UNTAG_Int(variable4)-UNTAG_Int( variable2 /*i*/));
79 variable5 = NEW_string_search___Match___init( variable0 /*s*/, variable2 /*i*/, variable4); /*new Match*/
80 variable4 = variable5;
81 ((array___AbstractArray___add_t)CALL( variable1 /*res*/,COLOR_abstract_collection___SimpleCollection___add))( variable1 /*res*/, variable4) /*Array::add*/;
82 variable1 = variable1 /*res*/;
83 goto return_label2;
84 return_label2: while(false);
85 tracehead = trace.prev;
86 return variable1;
87 }
88 val_t string_search___BM_Pattern___to_s(val_t self) {
89 struct trace_t trace = {NULL, LOCATE_string_search___BM_Pattern___to_s, 67};
90 val_t variable0;
91 trace.prev = tracehead; tracehead = &trace;
92 variable0 = ATTR_string_search___BM_Pattern____motif( self) /*BM_Pattern::_motif*/;
93 goto return_label4;
94 return_label4: while(false);
95 tracehead = trace.prev;
96 return variable0;
97 }
98 val_t string_search___BM_Pattern___search_index_in(val_t self, val_t param0, val_t param1) {
99 struct trace_t trace = {NULL, LOCATE_string_search___BM_Pattern___search_index_in, 69};
100 val_t variable0;
101 val_t variable1;
102 val_t variable2;
103 val_t variable3;
104 val_t variable4;
105 val_t variable5;
106 val_t variable6;
107 val_t variable7;
108 val_t variable8;
109 val_t variable9;
110 val_t variable10;
111 trace.prev = tracehead; tracehead = &trace;
112 variable0 = param0;
113 variable1 = param1;
114 variable2 = TAG_Bool(UNTAG_Int( variable1 /*from*/)>=UNTAG_Int( TAG_Int(0)));
115 if (!UNTAG_Bool(variable2)) { fprintf(stderr, "Assert%s failed (%s: %d)\n", "", LOCATE_string_search___BM_Pattern___search_index_in, 72); nit_exit(1);}
116 variable3 = ((array___AbstractArray___length_t)CALL( variable0 /*s*/,COLOR_abstract_collection___Collection___length))( variable0 /*s*/) /*String::length*/;
117 variable2 = variable3;
118 variable4 = ATTR_string_search___BM_Pattern____length( self) /*BM_Pattern::_length*/;
119 variable3 = variable4;
120 variable4 = variable1 /*from*/;
121 while (true) { /*while*/
122 variable5 = TAG_Int(UNTAG_Int( variable2 /*n*/)-UNTAG_Int( variable3 /*m*/));
123 variable5 = TAG_Int(UNTAG_Int(variable5)+UNTAG_Int( TAG_Int(1)));
124 variable5 = TAG_Bool(UNTAG_Int( variable4 /*j*/)<UNTAG_Int(variable5));
125 if (!UNTAG_Bool(variable5)) break; /* while*/
126 variable6 = TAG_Int(UNTAG_Int( variable3 /*m*/)-UNTAG_Int( TAG_Int(1)));
127 variable5 = variable6;
128 while (true) { /*while*/
129 variable6 = TAG_Bool(UNTAG_Int( variable5 /*i*/)>=UNTAG_Int( TAG_Int(0)));
130 variable7 = variable6;
131 if (UNTAG_Bool(variable7)) { /* and */
132 variable7 = ATTR_string_search___BM_Pattern____motif( self) /*BM_Pattern::_motif*/;
133 variable7 = ((string___String_____bra_t)CALL(variable7,COLOR_abstract_collection___Map_____bra))(variable7, variable5 /*i*/) /*String::[]*/;
134 variable8 = TAG_Int(UNTAG_Int( variable5 /*i*/)+UNTAG_Int( variable4 /*j*/));
135 variable8 = ((string___String_____bra_t)CALL( variable0 /*s*/,COLOR_abstract_collection___Map_____bra))( variable0 /*s*/, variable8) /*String::[]*/;
136 variable7 = TAG_Bool((variable7)==(variable8));
137 }
138 variable6 = variable7;
139 if (!UNTAG_Bool(variable6)) break; /* while*/
140 variable5 = TAG_Int(UNTAG_Int(variable5)-UNTAG_Int( TAG_Int(1))) /*i*/;
141 continue_7: while(0);
142 }
143 break_7: while(0);
144 variable6 = TAG_Bool(UNTAG_Int( variable5 /*i*/)<UNTAG_Int( TAG_Int(0)));
145 if (UNTAG_Bool(variable6)) { /*if*/
146 variable2 = variable4 /*j*/;
147 goto return_label5;
148 } else { /*if*/
149 variable7 = ATTR_string_search___BM_Pattern____gs( self) /*BM_Pattern::_gs*/;
150 variable8 = variable5 /*i*/;
151 variable9 = TAG_Bool(UNTAG_Int( variable8 /*index*/)>=UNTAG_Int( TAG_Int(0)));
152 variable10 = variable9;
153 if (UNTAG_Bool(variable10)) { /* and */
154 variable10 = variable7;
155 variable10 = ATTR_array___AbstractArray____length(variable10) /*Array::_length*/;
156 variable10 = TAG_Bool(UNTAG_Int( variable8 /*index*/)<UNTAG_Int(variable10));
157 }
158 variable9 = variable10;
159 if (!UNTAG_Bool(variable9)) { fprintf(stderr, "Assert%s failed (%s: %d)\n", " 'index' ", LOCATE_array___Array_____bra, 229); nit_exit(1);}
160 variable9 = variable7;
161 variable9 = ATTR_array___Array____items(variable9) /*Array::_items*/;
162 variable9 = UNBOX_NativeArray(variable9)[UNTAG_Int( variable8 /*index*/)];
163 goto return_label8;
164 return_label8: while(false);
165 variable7 = variable9;
166 variable6 = variable7;
167 variable8 = TAG_Int(UNTAG_Int( variable5 /*i*/)+UNTAG_Int( variable4 /*j*/));
168 variable8 = ((string___String_____bra_t)CALL( variable0 /*s*/,COLOR_abstract_collection___Map_____bra))( variable0 /*s*/, variable8) /*String::[]*/;
169 variable8 = ((string_search___BM_Pattern___bc_t)CALL( self,COLOR_string_search___BM_Pattern___bc))( self, variable8) /*BM_Pattern::bc*/;
170 variable8 = TAG_Int(UNTAG_Int(variable8)-UNTAG_Int( variable3 /*m*/));
171 variable8 = TAG_Int(UNTAG_Int(variable8)+UNTAG_Int( TAG_Int(1)));
172 variable8 = TAG_Int(UNTAG_Int(variable8)+UNTAG_Int( variable5 /*i*/));
173 variable7 = variable8;
174 variable8 = TAG_Bool(UNTAG_Int( variable6 /*gs*/)>UNTAG_Int( variable7 /*bc*/));
175 if (UNTAG_Bool(variable8)) { /*if*/
176 variable4 = TAG_Int(UNTAG_Int(variable4)+UNTAG_Int( variable6 /*gs*/)) /*j*/;
177 } else { /*if*/
178 variable4 = TAG_Int(UNTAG_Int(variable4)+UNTAG_Int( variable7 /*bc*/)) /*j*/;
179 }
180 }
181 continue_6: while(0);
182 }
183 break_6: while(0);
184 variable5 = TAG_Int(-UNTAG_Int( TAG_Int(1)));
185 variable2 = variable5;
186 goto return_label5;
187 return_label5: while(false);
188 tracehead = trace.prev;
189 return variable2;
190 }
191 val_t string_search___BM_Pattern___search_in(val_t self, val_t param0, val_t param1) {
192 struct trace_t trace = {NULL, LOCATE_string_search___BM_Pattern___search_in, 96};
193 val_t variable0;
194 val_t variable1;
195 val_t variable2;
196 val_t variable3;
197 val_t variable4;
198 trace.prev = tracehead; tracehead = &trace;
199 variable0 = param0;
200 variable1 = param1;
201 variable3 = ((string_search___BM_Pattern___search_index_in_t)CALL( self,COLOR_string_search___Pattern___search_index_in))( self, variable0 /*s*/, variable1 /*from*/) /*BM_Pattern::search_index_in*/;
202 variable2 = variable3;
203 variable3 = TAG_Bool(UNTAG_Int( variable2 /*to*/)<UNTAG_Int( TAG_Int(0)));
204 if (UNTAG_Bool(variable3)) { /*if*/
205 variable2 = NIT_NULL /*null*/;
206 goto return_label9;
207 } else { /*if*/
208 variable3 = ATTR_string_search___BM_Pattern____length( self) /*BM_Pattern::_length*/;
209 variable4 = NEW_string_search___Match___init( variable0 /*s*/, variable2 /*to*/, variable3); /*new Match*/
210 variable3 = variable4;
211 variable2 = variable3;
212 goto return_label9;
213 }
214 return_label9: while(false);
215 tracehead = trace.prev;
216 return variable2;
217 }
218 void string_search___BM_Pattern___init(val_t self, val_t param0, int* init_table) {
219 struct trace_t trace = {NULL, LOCATE_string_search___BM_Pattern___init, 107};
220 val_t variable0;
221 val_t variable1;
222 val_t variable2;
223 trace.prev = tracehead; tracehead = &trace;
224 variable0 = param0;
225 if (init_table[VAL2OBJ( self)->vft[INIT_TABLE_POS_BM_Pattern].i]) return;
226 ATTR_string_search___BM_Pattern____motif( self) /*BM_Pattern::_motif*/ = variable0 /*motif*/;
227 variable1 = ((array___AbstractArray___length_t)CALL( variable0 /*motif*/,COLOR_abstract_collection___Collection___length))( variable0 /*motif*/) /*String::length*/;
228 ATTR_string_search___BM_Pattern____length( self) /*BM_Pattern::_length*/ = variable1;
229 variable1 = ATTR_string_search___BM_Pattern____length( self) /*BM_Pattern::_length*/;
230 variable2 = NEW_array___Array___with_capacity(variable1); /*new Array[Int]*/
231 variable1 = variable2;
232 ATTR_string_search___BM_Pattern____gs( self) /*BM_Pattern::_gs*/ = variable1;
233 variable1 = NEW_array___ArrayMap___init(); /*new ArrayMap[Char, Int]*/
234 ATTR_string_search___BM_Pattern____bc_table( self) /*BM_Pattern::_bc_table*/ = variable1;
235 ((string_search___BM_Pattern___compute_gs_t)CALL( self,COLOR_string_search___BM_Pattern___compute_gs))( self) /*BM_Pattern::compute_gs*/;
236 ((string_search___BM_Pattern___compute_bc_t)CALL( self,COLOR_string_search___BM_Pattern___compute_bc))( self) /*BM_Pattern::compute_bc*/;
237 init_table[VAL2OBJ( self)->vft[INIT_TABLE_POS_BM_Pattern].i] = 1;
238 tracehead = trace.prev;
239 return;
240 }
241 val_t string_search___BM_Pattern___bc(val_t self, val_t param0) {
242 struct trace_t trace = {NULL, LOCATE_string_search___BM_Pattern___bc, 124};
243 val_t variable0;
244 val_t variable1;
245 trace.prev = tracehead; tracehead = &trace;
246 variable0 = param0;
247 variable1 = ATTR_string_search___BM_Pattern____bc_table( self) /*BM_Pattern::_bc_table*/;
248 variable1 = ((abstract_collection___Map___has_key_t)CALL(variable1,COLOR_abstract_collection___Map___has_key))(variable1, variable0 /*e*/) /*Map::has_key*/;
249 if (UNTAG_Bool(variable1)) { /*if*/
250 variable1 = ATTR_string_search___BM_Pattern____bc_table( self) /*BM_Pattern::_bc_table*/;
251 variable1 = ((abstract_collection___Map_____bra_t)CALL(variable1,COLOR_abstract_collection___Map_____bra))(variable1, variable0 /*e*/) /*Map::[]*/;
252 goto return_label11;
253 } else { /*if*/
254 variable1 = ATTR_string_search___BM_Pattern____length( self) /*BM_Pattern::_length*/;
255 goto return_label11;
256 }
257 return_label11: while(false);
258 tracehead = trace.prev;
259 return variable1;
260 }
261 void string_search___BM_Pattern___compute_bc(val_t self) {
262 struct trace_t trace = {NULL, LOCATE_string_search___BM_Pattern___compute_bc, 139};
263 val_t variable0;
264 val_t variable1;
265 val_t variable2;
266 val_t variable3;
267 val_t variable4;
268 val_t variable5;
269 trace.prev = tracehead; tracehead = &trace;
270 variable1 = ATTR_string_search___BM_Pattern____motif( self) /*BM_Pattern::_motif*/;
271 variable0 = variable1;
272 variable2 = ATTR_string_search___BM_Pattern____length( self) /*BM_Pattern::_length*/;
273 variable1 = variable2;
274 variable2 = TAG_Int(0);
275 while (true) { /*while*/
276 variable3 = TAG_Int(UNTAG_Int( variable1 /*m*/)-UNTAG_Int( TAG_Int(1)));
277 variable3 = TAG_Bool(UNTAG_Int( variable2 /*i*/)<UNTAG_Int(variable3));
278 if (!UNTAG_Bool(variable3)) break; /* while*/
279 variable3 = ATTR_string_search___BM_Pattern____bc_table( self) /*BM_Pattern::_bc_table*/;
280 variable4 = ((string___String_____bra_t)CALL( variable0 /*x*/,COLOR_abstract_collection___Map_____bra))( variable0 /*x*/, variable2 /*i*/) /*String::[]*/;
281 variable5 = TAG_Int(UNTAG_Int( variable1 /*m*/)-UNTAG_Int( variable2 /*i*/));
282 variable5 = TAG_Int(UNTAG_Int(variable5)-UNTAG_Int( TAG_Int(1)));
283 ((abstract_collection___Map_____braeq_t)CALL(variable3,COLOR_abstract_collection___Map_____braeq))(variable3, variable4, variable5) /*Map::[]=*/;
284 variable2 = TAG_Int(UNTAG_Int(variable2)+UNTAG_Int( TAG_Int(1))) /*i*/;
285 continue_13: while(0);
286 }
287 break_13: while(0);
288 tracehead = trace.prev;
289 return;
290 }
291 val_t string_search___BM_Pattern___suffixes(val_t self) {
292 struct trace_t trace = {NULL, LOCATE_string_search___BM_Pattern___suffixes, 150};
293 val_t variable0;
294 val_t variable1;
295 val_t variable2;
296 val_t variable3;
297 val_t variable4;
298 val_t variable5;
299 val_t variable6;
300 val_t variable7;
301 val_t variable8;
302 val_t variable9;
303 val_t variable10;
304 trace.prev = tracehead; tracehead = &trace;
305 variable1 = ATTR_string_search___BM_Pattern____motif( self) /*BM_Pattern::_motif*/;
306 variable0 = variable1;
307 variable2 = ATTR_string_search___BM_Pattern____length( self) /*BM_Pattern::_length*/;
308 variable1 = variable2;
309 variable3 = NEW_array___Array___filled_with( variable1 /*m*/, variable1 /*m*/); /*new Array[Int]*/
310 variable2 = variable3;
311 variable3 = TAG_Int((int)0) /*decl variable f*/;
312 variable5 = TAG_Int(UNTAG_Int( variable1 /*m*/)-UNTAG_Int( TAG_Int(1)));
313 variable4 = variable5;
314 variable6 = TAG_Int(UNTAG_Int( variable1 /*m*/)-UNTAG_Int( TAG_Int(2)));
315 variable5 = variable6;
316 while (true) { /*while*/
317 variable6 = TAG_Bool(UNTAG_Int( variable5 /*i*/)>=UNTAG_Int( TAG_Int(0)));
318 if (!UNTAG_Bool(variable6)) break; /* while*/
319 variable6 = TAG_Bool(UNTAG_Int( variable5 /*i*/)>UNTAG_Int( variable4 /*g*/));
320 variable7 = variable6;
321 if (UNTAG_Bool(variable7)) { /* and */
322 variable7 = TAG_Int(UNTAG_Int( variable5 /*i*/)+UNTAG_Int( variable1 /*m*/));
323 variable7 = TAG_Int(UNTAG_Int(variable7)-UNTAG_Int( TAG_Int(1)));
324 variable7 = TAG_Int(UNTAG_Int(variable7)-UNTAG_Int( variable3 /*f*/));
325 variable8 = variable7;
326 variable9 = TAG_Bool(UNTAG_Int( variable8 /*index*/)>=UNTAG_Int( TAG_Int(0)));
327 variable10 = variable9;
328 if (UNTAG_Bool(variable10)) { /* and */
329 variable10 = ATTR_array___AbstractArray____length( variable2 /*suff*/) /*Array::_length*/;
330 variable10 = TAG_Bool(UNTAG_Int( variable8 /*index*/)<UNTAG_Int(variable10));
331 }
332 variable9 = variable10;
333 if (!UNTAG_Bool(variable9)) { fprintf(stderr, "Assert%s failed (%s: %d)\n", " 'index' ", LOCATE_array___Array_____bra, 229); nit_exit(1);}
334 variable9 = ATTR_array___Array____items( variable2 /*suff*/) /*Array::_items*/;
335 variable9 = UNBOX_NativeArray(variable9)[UNTAG_Int( variable8 /*index*/)];
336 goto return_label16;
337 return_label16: while(false);
338 variable7 = variable9;
339 variable8 = TAG_Int(UNTAG_Int( variable5 /*i*/)-UNTAG_Int( variable4 /*g*/));
340 variable7 = TAG_Bool(UNTAG_Int(variable7)<UNTAG_Int(variable8));
341 }
342 variable6 = variable7;
343 if (UNTAG_Bool(variable6)) { /*if*/
344 variable6 = TAG_Int(UNTAG_Int( variable5 /*i*/)+UNTAG_Int( variable1 /*m*/));
345 variable6 = TAG_Int(UNTAG_Int(variable6)-UNTAG_Int( TAG_Int(1)));
346 variable6 = TAG_Int(UNTAG_Int(variable6)-UNTAG_Int( variable3 /*f*/));
347 variable7 = variable6;
348 variable8 = TAG_Bool(UNTAG_Int( variable7 /*index*/)>=UNTAG_Int( TAG_Int(0)));
349 variable9 = variable8;
350 if (UNTAG_Bool(variable9)) { /* and */
351 variable9 = ATTR_array___AbstractArray____length( variable2 /*suff*/) /*Array::_length*/;
352 variable9 = TAG_Bool(UNTAG_Int( variable7 /*index*/)<UNTAG_Int(variable9));
353 }
354 variable8 = variable9;
355 if (!UNTAG_Bool(variable8)) { fprintf(stderr, "Assert%s failed (%s: %d)\n", " 'index' ", LOCATE_array___Array_____bra, 229); nit_exit(1);}
356 variable8 = ATTR_array___Array____items( variable2 /*suff*/) /*Array::_items*/;
357 variable8 = UNBOX_NativeArray(variable8)[UNTAG_Int( variable7 /*index*/)];
358 goto return_label17;
359 return_label17: while(false);
360 variable6 = variable8;
361 ((array___Array_____braeq_t)CALL( variable2 /*suff*/,COLOR_abstract_collection___Map_____braeq))( variable2 /*suff*/, variable5 /*i*/, variable6) /*Array::[]=*/;
362 } else { /*if*/
363 variable6 = TAG_Bool(UNTAG_Int( variable5 /*i*/)<UNTAG_Int( variable4 /*g*/));
364 if (UNTAG_Bool(variable6)) { /*if*/
365 variable4 = variable5 /*i*/ /*g=*/;
366 }
367 variable3 = variable5 /*i*/ /*f=*/;
368 while (true) { /*while*/
369 variable6 = TAG_Bool(UNTAG_Int( variable4 /*g*/)>=UNTAG_Int( TAG_Int(0)));
370 variable7 = variable6;
371 if (UNTAG_Bool(variable7)) { /* and */
372 variable7 = ((string___String_____bra_t)CALL( variable0 /*x*/,COLOR_abstract_collection___Map_____bra))( variable0 /*x*/, variable4 /*g*/) /*String::[]*/;
373 variable8 = TAG_Int(UNTAG_Int( variable4 /*g*/)+UNTAG_Int( variable1 /*m*/));
374 variable8 = TAG_Int(UNTAG_Int(variable8)-UNTAG_Int( TAG_Int(1)));
375 variable8 = TAG_Int(UNTAG_Int(variable8)-UNTAG_Int( variable3 /*f*/));
376 variable8 = ((string___String_____bra_t)CALL( variable0 /*x*/,COLOR_abstract_collection___Map_____bra))( variable0 /*x*/, variable8) /*String::[]*/;
377 variable7 = TAG_Bool((variable7)==(variable8));
378 }
379 variable6 = variable7;
380 if (!UNTAG_Bool(variable6)) break; /* while*/
381 variable4 = TAG_Int(UNTAG_Int(variable4)-UNTAG_Int( TAG_Int(1))) /*g*/;
382 continue_18: while(0);
383 }
384 break_18: while(0);
385 variable6 = TAG_Int(UNTAG_Int( variable3 /*f*/)-UNTAG_Int( variable4 /*g*/));
386 ((array___Array_____braeq_t)CALL( variable2 /*suff*/,COLOR_abstract_collection___Map_____braeq))( variable2 /*suff*/, variable5 /*i*/, variable6) /*Array::[]=*/;
387 }
388 variable5 = TAG_Int(UNTAG_Int(variable5)-UNTAG_Int( TAG_Int(1))) /*i*/;
389 continue_15: while(0);
390 }
391 break_15: while(0);
392 variable0 = variable2 /*suff*/;
393 goto return_label14;
394 return_label14: while(false);
395 tracehead = trace.prev;
396 return variable0;
397 }
398 void string_search___BM_Pattern___compute_gs(val_t self) {
399 struct trace_t trace = {NULL, LOCATE_string_search___BM_Pattern___compute_gs, 173};
400 val_t variable0;
401 val_t variable1;
402 val_t variable2;
403 val_t variable3;
404 val_t variable4;
405 val_t variable5;
406 val_t variable6;
407 val_t variable7;
408 val_t variable8;
409 val_t variable9;
410 trace.prev = tracehead; tracehead = &trace;
411 variable1 = ATTR_string_search___BM_Pattern____motif( self) /*BM_Pattern::_motif*/;
412 variable0 = variable1;
413 variable2 = ATTR_string_search___BM_Pattern____length( self) /*BM_Pattern::_length*/;
414 variable1 = variable2;
415 variable3 = ((string_search___BM_Pattern___suffixes_t)CALL( self,COLOR_string_search___BM_Pattern___suffixes))( self) /*BM_Pattern::suffixes*/;
416 variable2 = variable3;
417 variable3 = TAG_Int(0);
418 while (true) { /*while*/
419 variable4 = TAG_Bool(UNTAG_Int( variable3 /*i*/)<UNTAG_Int( variable1 /*m*/));
420 if (!UNTAG_Bool(variable4)) break; /* while*/
421 variable4 = ATTR_string_search___BM_Pattern____gs( self) /*BM_Pattern::_gs*/;
422 ((array___Array_____braeq_t)CALL(variable4,COLOR_abstract_collection___Map_____braeq))(variable4, variable3 /*i*/, variable1 /*m*/) /*Array::[]=*/;
423 variable3 = TAG_Int(UNTAG_Int(variable3)+UNTAG_Int( TAG_Int(1))) /*i*/;
424 continue_20: while(0);
425 }
426 break_20: while(0);
427 variable4 = TAG_Int(0);
428 variable5 = TAG_Int(UNTAG_Int( variable1 /*m*/)-UNTAG_Int( TAG_Int(1)));
429 variable3 = variable5 /*i=*/;
430 while (true) { /*while*/
431 variable5 = TAG_Int(-UNTAG_Int( TAG_Int(1)));
432 variable5 = TAG_Bool(UNTAG_Int( variable3 /*i*/)>=UNTAG_Int(variable5));
433 if (!UNTAG_Bool(variable5)) break; /* while*/
434 variable5 = TAG_Int(-UNTAG_Int( TAG_Int(1)));
435 variable5 = TAG_Bool(( variable3 /*i*/)==(variable5));
436 variable6 = variable5;
437 if (!UNTAG_Bool(variable6)) { /* or */
438 variable6 = variable3 /*i*/;
439 variable7 = TAG_Bool(UNTAG_Int( variable6 /*index*/)>=UNTAG_Int( TAG_Int(0)));
440 variable8 = variable7;
441 if (UNTAG_Bool(variable8)) { /* and */
442 variable8 = ATTR_array___AbstractArray____length( variable2 /*suff*/) /*Array::_length*/;
443 variable8 = TAG_Bool(UNTAG_Int( variable6 /*index*/)<UNTAG_Int(variable8));
444 }
445 variable7 = variable8;
446 if (!UNTAG_Bool(variable7)) { fprintf(stderr, "Assert%s failed (%s: %d)\n", " 'index' ", LOCATE_array___Array_____bra, 229); nit_exit(1);}
447 variable7 = ATTR_array___Array____items( variable2 /*suff*/) /*Array::_items*/;
448 variable7 = UNBOX_NativeArray(variable7)[UNTAG_Int( variable6 /*index*/)];
449 goto return_label22;
450 return_label22: while(false);
451 variable6 = variable7;
452 variable7 = TAG_Int(UNTAG_Int( variable3 /*i*/)+UNTAG_Int( TAG_Int(1)));
453 variable6 = TAG_Bool((variable6)==(variable7));
454 }
455 variable5 = variable6;
456 if (UNTAG_Bool(variable5)) { /*if*/
457 while (true) { /*while*/
458 variable5 = TAG_Int(UNTAG_Int( variable1 /*m*/)-UNTAG_Int( TAG_Int(1)));
459 variable5 = TAG_Int(UNTAG_Int(variable5)-UNTAG_Int( variable3 /*i*/));
460 variable5 = TAG_Bool(UNTAG_Int( variable4 /*j*/)<UNTAG_Int(variable5));
461 if (!UNTAG_Bool(variable5)) break; /* while*/
462 variable5 = ATTR_string_search___BM_Pattern____gs( self) /*BM_Pattern::_gs*/;
463 variable6 = variable4 /*j*/;
464 variable7 = TAG_Bool(UNTAG_Int( variable6 /*index*/)>=UNTAG_Int( TAG_Int(0)));
465 variable8 = variable7;
466 if (UNTAG_Bool(variable8)) { /* and */
467 variable8 = variable5;
468 variable8 = ATTR_array___AbstractArray____length(variable8) /*Array::_length*/;
469 variable8 = TAG_Bool(UNTAG_Int( variable6 /*index*/)<UNTAG_Int(variable8));
470 }
471 variable7 = variable8;
472 if (!UNTAG_Bool(variable7)) { fprintf(stderr, "Assert%s failed (%s: %d)\n", " 'index' ", LOCATE_array___Array_____bra, 229); nit_exit(1);}
473 variable7 = variable5;
474 variable7 = ATTR_array___Array____items(variable7) /*Array::_items*/;
475 variable7 = UNBOX_NativeArray(variable7)[UNTAG_Int( variable6 /*index*/)];
476 goto return_label24;
477 return_label24: while(false);
478 variable5 = variable7;
479 variable5 = TAG_Bool((variable5)==( variable1 /*m*/));
480 if (UNTAG_Bool(variable5)) { /*if*/
481 variable5 = ATTR_string_search___BM_Pattern____gs( self) /*BM_Pattern::_gs*/;
482 variable6 = TAG_Int(UNTAG_Int( variable1 /*m*/)-UNTAG_Int( TAG_Int(1)));
483 variable6 = TAG_Int(UNTAG_Int(variable6)-UNTAG_Int( variable3 /*i*/));
484 ((array___Array_____braeq_t)CALL(variable5,COLOR_abstract_collection___Map_____braeq))(variable5, variable4 /*j*/, variable6) /*Array::[]=*/;
485 }
486 variable4 = TAG_Int(UNTAG_Int(variable4)+UNTAG_Int( TAG_Int(1))) /*j*/;
487 continue_23: while(0);
488 }
489 break_23: while(0);
490 }
491 variable3 = TAG_Int(UNTAG_Int(variable3)-UNTAG_Int( TAG_Int(1))) /*i*/;
492 continue_21: while(0);
493 }
494 break_21: while(0);
495 variable3 = TAG_Int(0) /*i=*/;
496 while (true) { /*while*/
497 variable5 = TAG_Int(UNTAG_Int( variable1 /*m*/)-UNTAG_Int( TAG_Int(1)));
498 variable5 = TAG_Bool(UNTAG_Int( variable3 /*i*/)<UNTAG_Int(variable5));
499 if (!UNTAG_Bool(variable5)) break; /* while*/
500 variable5 = ATTR_string_search___BM_Pattern____gs( self) /*BM_Pattern::_gs*/;
501 variable6 = TAG_Int(UNTAG_Int( variable1 /*m*/)-UNTAG_Int( TAG_Int(1)));
502 variable7 = variable3 /*i*/;
503 variable8 = TAG_Bool(UNTAG_Int( variable7 /*index*/)>=UNTAG_Int( TAG_Int(0)));
504 variable9 = variable8;
505 if (UNTAG_Bool(variable9)) { /* and */
506 variable9 = ATTR_array___AbstractArray____length( variable2 /*suff*/) /*Array::_length*/;
507 variable9 = TAG_Bool(UNTAG_Int( variable7 /*index*/)<UNTAG_Int(variable9));
508 }
509 variable8 = variable9;
510 if (!UNTAG_Bool(variable8)) { fprintf(stderr, "Assert%s failed (%s: %d)\n", " 'index' ", LOCATE_array___Array_____bra, 229); nit_exit(1);}
511 variable8 = ATTR_array___Array____items( variable2 /*suff*/) /*Array::_items*/;
512 variable8 = UNBOX_NativeArray(variable8)[UNTAG_Int( variable7 /*index*/)];
513 goto return_label26;
514 return_label26: while(false);
515 variable7 = variable8;
516 variable6 = TAG_Int(UNTAG_Int(variable6)-UNTAG_Int(variable7));
517 variable7 = TAG_Int(UNTAG_Int( variable1 /*m*/)-UNTAG_Int( TAG_Int(1)));
518 variable7 = TAG_Int(UNTAG_Int(variable7)-UNTAG_Int( variable3 /*i*/));
519 ((array___Array_____braeq_t)CALL(variable5,COLOR_abstract_collection___Map_____braeq))(variable5, variable6, variable7) /*Array::[]=*/;
520 variable3 = TAG_Int(UNTAG_Int(variable3)+UNTAG_Int( TAG_Int(1))) /*i*/;
521 continue_25: while(0);
522 }
523 break_25: while(0);
524 tracehead = trace.prev;
525 return;
526 }
527 val_t string_search___Match___string(val_t self) {
528 struct trace_t trace = {NULL, LOCATE_string_search___Match___string, 204};
529 trace.prev = tracehead; tracehead = &trace;
530 tracehead = trace.prev;
531 return ATTR_string_search___Match____string( self) /*Match::_string*/;
532 }
533 val_t string_search___Match___from(val_t self) {
534 struct trace_t trace = {NULL, LOCATE_string_search___Match___from, 207};
535 trace.prev = tracehead; tracehead = &trace;
536 tracehead = trace.prev;
537 return ATTR_string_search___Match____from( self) /*Match::_from*/;
538 }
539 val_t string_search___Match___length(val_t self) {
540 struct trace_t trace = {NULL, LOCATE_string_search___Match___length, 210};
541 trace.prev = tracehead; tracehead = &trace;
542 tracehead = trace.prev;
543 return ATTR_string_search___Match____length( self) /*Match::_length*/;
544 }
545 val_t string_search___Match___after(val_t self) {
546 struct trace_t trace = {NULL, LOCATE_string_search___Match___after, 213};
547 val_t variable0;
548 val_t variable1;
549 trace.prev = tracehead; tracehead = &trace;
550 variable0 = ATTR_string_search___Match____from( self) /*Match::_from*/;
551 variable1 = ATTR_string_search___Match____length( self) /*Match::_length*/;
552 variable0 = TAG_Int(UNTAG_Int(variable0)+UNTAG_Int(variable1));
553 goto return_label27;
554 return_label27: while(false);
555 tracehead = trace.prev;
556 return variable0;
557 }
558 val_t string_search___Match___to_s(val_t self) {
559 struct trace_t trace = {NULL, LOCATE_string_search___Match___to_s, 217};
560 val_t variable0;
561 val_t variable1;
562 val_t variable2;
563 trace.prev = tracehead; tracehead = &trace;
564 variable0 = ATTR_string_search___Match____string( self) /*Match::_string*/;
565 variable1 = ATTR_string_search___Match____from( self) /*Match::_from*/;
566 variable2 = ATTR_string_search___Match____length( self) /*Match::_length*/;
567 variable0 = ((string___String___substring_t)CALL(variable0,COLOR_string___String___substring))(variable0, variable1, variable2) /*String::substring*/;
568 goto return_label28;
569 return_label28: while(false);
570 tracehead = trace.prev;
571 return variable0;
572 }
573 void string_search___Match___init(val_t self, val_t param0, val_t param1, val_t param2, int* init_table) {
574 struct trace_t trace = {NULL, LOCATE_string_search___Match___init, 220};
575 val_t variable0;
576 val_t variable1;
577 val_t variable2;
578 val_t variable3;
579 val_t variable4;
580 trace.prev = tracehead; tracehead = &trace;
581 variable0 = param0;
582 variable1 = param1;
583 variable2 = param2;
584 if (init_table[VAL2OBJ( self)->vft[INIT_TABLE_POS_Match].i]) return;
585 variable3 = TAG_Bool(!UNTAG_Bool(TAG_Bool(( variable0 /*s*/ == NIT_NULL /*null*/) || (( variable0 /*s*/ != NIT_NULL) && UNTAG_Bool(((string___String_____eqeq_t)CALL( variable0 /*s*/,COLOR_kernel___Object_____eqeq))( variable0 /*s*/, NIT_NULL /*null*/) /*String::==*/)))));
586 if (!UNTAG_Bool(variable3)) { fprintf(stderr, "Assert%s failed (%s: %d)\n", " 'non_null_string' ", LOCATE_string_search___Match___init, 223); nit_exit(1);}
587 variable3 = TAG_Bool(UNTAG_Int( variable2 /*len*/)>=UNTAG_Int( TAG_Int(0)));
588 if (!UNTAG_Bool(variable3)) { fprintf(stderr, "Assert%s failed (%s: %d)\n", " 'positive_length' ", LOCATE_string_search___Match___init, 224); nit_exit(1);}
589 variable3 = TAG_Bool(UNTAG_Int( variable1 /*f*/)>=UNTAG_Int( TAG_Int(0)));
590 if (!UNTAG_Bool(variable3)) { fprintf(stderr, "Assert%s failed (%s: %d)\n", " 'valid_from' ", LOCATE_string_search___Match___init, 225); nit_exit(1);}
591 variable3 = TAG_Int(UNTAG_Int( variable1 /*f*/)+UNTAG_Int( variable2 /*len*/));
592 variable4 = ((array___AbstractArray___length_t)CALL( variable0 /*s*/,COLOR_abstract_collection___Collection___length))( variable0 /*s*/) /*String::length*/;
593 variable3 = TAG_Bool(UNTAG_Int(variable3)<=UNTAG_Int(variable4));
594 if (!UNTAG_Bool(variable3)) { fprintf(stderr, "Assert%s failed (%s: %d)\n", " 'valid_after' ", LOCATE_string_search___Match___init, 226); nit_exit(1);}
595 ATTR_string_search___Match____string( self) /*Match::_string*/ = variable0 /*s*/;
596 ATTR_string_search___Match____from( self) /*Match::_from*/ = variable1 /*f*/;
597 ATTR_string_search___Match____length( self) /*Match::_length*/ = variable2 /*len*/;
598 init_table[VAL2OBJ( self)->vft[INIT_TABLE_POS_Match].i] = 1;
599 tracehead = trace.prev;
600 return;
601 }
602 val_t string_search___Char___search_index_in(val_t self, val_t param0, val_t param1) {
603 struct trace_t trace = {NULL, LOCATE_string_search___Char___search_index_in, 235};
604 val_t variable0;
605 val_t variable1;
606 val_t variable2;
607 val_t variable3;
608 trace.prev = tracehead; tracehead = &trace;
609 variable0 = param0;
610 variable1 = param1;
611 variable3 = ((array___AbstractArray___length_t)CALL( variable0 /*s*/,COLOR_abstract_collection___Collection___length))( variable0 /*s*/) /*String::length*/;
612 variable2 = variable3;
613 while (true) { /*while*/
614 variable3 = TAG_Bool(UNTAG_Int( variable1 /*from*/)<UNTAG_Int( variable2 /*stop*/));
615 if (!UNTAG_Bool(variable3)) break; /* while*/
616 variable3 = ((string___String_____bra_t)CALL( variable0 /*s*/,COLOR_abstract_collection___Map_____bra))( variable0 /*s*/, variable1 /*from*/) /*String::[]*/;
617 variable3 = TAG_Bool((variable3)==( self));
618 if (UNTAG_Bool(variable3)) { /*if*/
619 variable2 = variable1 /*from*/;
620 goto return_label30;
621 }
622 variable1 = TAG_Int(UNTAG_Int(variable1)+UNTAG_Int( TAG_Int(1))) /*from*/;
623 continue_31: while(0);
624 }
625 break_31: while(0);
626 variable3 = TAG_Int(-UNTAG_Int( TAG_Int(1)));
627 variable2 = variable3;
628 goto return_label30;
629 return_label30: while(false);
630 tracehead = trace.prev;
631 return variable2;
632 }
633 val_t string_search___Char___search_in(val_t self, val_t param0, val_t param1) {
634 struct trace_t trace = {NULL, LOCATE_string_search___Char___search_in, 245};
635 val_t variable0;
636 val_t variable1;
637 val_t variable2;
638 val_t variable3;
639 trace.prev = tracehead; tracehead = &trace;
640 variable0 = param0;
641 variable1 = param1;
642 variable3 = ((string_search___Char___search_index_in_t)CALL( self,COLOR_string_search___Pattern___search_index_in))( self, variable0 /*s*/, variable1 /*from*/) /*Char::search_index_in*/;
643 variable2 = variable3;
644 variable3 = TAG_Bool(UNTAG_Int( variable2 /*pos*/)<UNTAG_Int( TAG_Int(0)));
645 if (UNTAG_Bool(variable3)) { /*if*/
646 variable2 = NIT_NULL /*null*/;
647 goto return_label32;
648 } else { /*if*/
649 variable3 = NEW_string_search___Match___init( variable0 /*s*/, variable2 /*pos*/, TAG_Int(1)); /*new Match*/
650 variable2 = variable3;
651 goto return_label32;
652 }
653 return_label32: while(false);
654 tracehead = trace.prev;
655 return variable2;
656 }
657 val_t string_search___String___search_index_in(val_t self, val_t param0, val_t param1) {
658 struct trace_t trace = {NULL, LOCATE_string_search___String___search_index_in, 258};
659 val_t variable0;
660 val_t variable1;
661 val_t variable2;
662 val_t variable3;
663 val_t variable4;
664 val_t variable5;
665 val_t variable6;
666 trace.prev = tracehead; tracehead = &trace;
667 variable0 = param0;
668 variable1 = param1;
669 variable2 = TAG_Bool(UNTAG_Int( variable1 /*from*/)>=UNTAG_Int( TAG_Int(0)));
670 if (!UNTAG_Bool(variable2)) { fprintf(stderr, "Assert%s failed (%s: %d)\n", "", LOCATE_string_search___String___search_index_in, 260); nit_exit(1);}
671 variable3 = ((array___AbstractArray___length_t)CALL( variable0 /*s*/,COLOR_abstract_collection___Collection___length))( variable0 /*s*/) /*String::length*/;
672 variable4 = ((array___AbstractArray___length_t)CALL( self,COLOR_abstract_collection___Collection___length))( self) /*String::length*/;
673 variable3 = TAG_Int(UNTAG_Int(variable3)-UNTAG_Int(variable4));
674 variable3 = TAG_Int(UNTAG_Int(variable3)+UNTAG_Int( TAG_Int(1)));
675 variable2 = variable3;
676 while (true) { /*while*/
677 variable3 = TAG_Bool(UNTAG_Int( variable1 /*from*/)<UNTAG_Int( variable2 /*stop*/));
678 if (!UNTAG_Bool(variable3)) break; /* while*/
679 variable4 = ((array___AbstractArray___length_t)CALL( self,COLOR_abstract_collection___Collection___length))( self) /*String::length*/;
680 variable4 = TAG_Int(UNTAG_Int(variable4)-UNTAG_Int( TAG_Int(1)));
681 variable3 = variable4;
682 while (true) { /*while*/
683 variable4 = TAG_Bool(UNTAG_Int( variable3 /*i*/)>=UNTAG_Int( TAG_Int(0)));
684 variable5 = variable4;
685 if (UNTAG_Bool(variable5)) { /* and */
686 variable5 = ((string___String_____bra_t)CALL( self,COLOR_abstract_collection___Map_____bra))( self, variable3 /*i*/) /*String::[]*/;
687 variable6 = TAG_Int(UNTAG_Int( variable3 /*i*/)+UNTAG_Int( variable1 /*from*/));
688 variable6 = ((string___String_____bra_t)CALL( variable0 /*s*/,COLOR_abstract_collection___Map_____bra))( variable0 /*s*/, variable6) /*String::[]*/;
689 variable5 = TAG_Bool((variable5)==(variable6));
690 }
691 variable4 = variable5;
692 if (!UNTAG_Bool(variable4)) break; /* while*/
693 variable3 = TAG_Int(UNTAG_Int(variable3)-UNTAG_Int( TAG_Int(1))) /*i*/;
694 continue_35: while(0);
695 }
696 break_35: while(0);
697 variable4 = TAG_Bool(UNTAG_Int( variable3 /*i*/)<UNTAG_Int( TAG_Int(0)));
698 if (UNTAG_Bool(variable4)) { /*if*/
699 variable2 = variable1 /*from*/;
700 goto return_label33;
701 }
702 variable1 = TAG_Int(UNTAG_Int(variable1)+UNTAG_Int( TAG_Int(1))) /*from*/;
703 continue_34: while(0);
704 }
705 break_34: while(0);
706 variable3 = TAG_Int(-UNTAG_Int( TAG_Int(1)));
707 variable2 = variable3;
708 goto return_label33;
709 return_label33: while(false);
710 tracehead = trace.prev;
711 return variable2;
712 }
713 val_t string_search___String___search_in(val_t self, val_t param0, val_t param1) {
714 struct trace_t trace = {NULL, LOCATE_string_search___String___search_in, 273};
715 val_t variable0;
716 val_t variable1;
717 val_t variable2;
718 val_t variable3;
719 val_t variable4;
720 trace.prev = tracehead; tracehead = &trace;
721 variable0 = param0;
722 variable1 = param1;
723 variable3 = ((string_search___String___search_index_in_t)CALL( self,COLOR_string_search___Pattern___search_index_in))( self, variable0 /*s*/, variable1 /*from*/) /*String::search_index_in*/;
724 variable2 = variable3;
725 variable3 = TAG_Bool(UNTAG_Int( variable2 /*pos*/)<UNTAG_Int( TAG_Int(0)));
726 if (UNTAG_Bool(variable3)) { /*if*/
727 variable2 = NIT_NULL /*null*/;
728 goto return_label36;
729 } else { /*if*/
730 variable3 = ((array___AbstractArray___length_t)CALL( self,COLOR_abstract_collection___Collection___length))( self) /*String::length*/;
731 variable4 = NEW_string_search___Match___init( variable0 /*s*/, variable2 /*pos*/, variable3); /*new Match*/
732 variable3 = variable4;
733 variable2 = variable3;
734 goto return_label36;
735 }
736 return_label36: while(false);
737 tracehead = trace.prev;
738 return variable2;
739 }
740 val_t string_search___String___search(val_t self, val_t param0) {
741 struct trace_t trace = {NULL, LOCATE_string_search___String___search, 283};
742 val_t variable0;
743 val_t variable1;
744 trace.prev = tracehead; tracehead = &trace;
745 variable0 = param0;
746 variable1 = ((string_search___Pattern___search_in_t)CALL( variable0 /*p*/,COLOR_string_search___Pattern___search_in))( variable0 /*p*/, self, TAG_Int(0)) /*Pattern::search_in*/;
747 goto return_label37;
748 return_label37: while(false);
749 tracehead = trace.prev;
750 return variable1;
751 }
752 val_t string_search___String___search_from(val_t self, val_t param0, val_t param1) {
753 struct trace_t trace = {NULL, LOCATE_string_search___String___search_from, 286};
754 val_t variable0;
755 val_t variable1;
756 val_t variable2;
757 trace.prev = tracehead; tracehead = &trace;
758 variable0 = param0;
759 variable1 = param1;
760 variable2 = ((string_search___Pattern___search_in_t)CALL( variable0 /*p*/,COLOR_string_search___Pattern___search_in))( variable0 /*p*/, self, variable1 /*from*/) /*Pattern::search_in*/;
761 goto return_label38;
762 return_label38: while(false);
763 tracehead = trace.prev;
764 return variable2;
765 }
766 val_t string_search___String___search_all(val_t self, val_t param0) {
767 struct trace_t trace = {NULL, LOCATE_string_search___String___search_all, 291};
768 val_t variable0;
769 val_t variable1;
770 trace.prev = tracehead; tracehead = &trace;
771 variable0 = param0;
772 variable1 = ((string_search___Pattern___search_all_in_t)CALL( variable0 /*p*/,COLOR_string_search___Pattern___search_all_in))( variable0 /*p*/, self) /*Pattern::search_all_in*/;
773 goto return_label39;
774 return_label39: while(false);
775 tracehead = trace.prev;
776 return variable1;
777 }
778 val_t string_search___String___split_with(val_t self, val_t param0) {
779 struct trace_t trace = {NULL, LOCATE_string_search___String___split_with, 300};
780 val_t variable0;
781 val_t variable1;
782 val_t variable2;
783 val_t variable3;
784 val_t variable4;
785 val_t variable5;
786 trace.prev = tracehead; tracehead = &trace;
787 variable0 = param0;
788 variable2 = ((string_search___Pattern___split_in_t)CALL( variable0 /*p*/,COLOR_string_search___Pattern___split_in))( variable0 /*p*/, self) /*Pattern::split_in*/;
789 variable1 = variable2;
790 variable3 = ((array___AbstractArray___length_t)CALL( variable1 /*matches*/,COLOR_abstract_collection___Collection___length))( variable1 /*matches*/) /*Array::length*/;
791 variable4 = NEW_array___Array___with_capacity(variable3); /*new Array[String]*/
792 variable3 = variable4;
793 variable2 = variable3;
794 variable3 = ((array___AbstractArray___iterator_t)CALL( variable1 /*matches*/,COLOR_abstract_collection___Collection___iterator))( variable1 /*matches*/) /*Array::iterator*/;
795 while (true) { /*for*/
796 variable4 = ((array___ArrayIterator___is_ok_t)CALL(variable3,COLOR_abstract_collection___Iterator___is_ok))(variable3) /*ArrayIterator::is_ok*/;
797 if (!UNTAG_Bool(variable4)) break; /*for*/
798 variable4 = ((array___ArrayIterator___item_t)CALL(variable3,COLOR_abstract_collection___Iterator___item))(variable3) /*ArrayIterator::item*/;
799 variable5 = ((string_search___Match___to_s_t)CALL( variable4 /*m*/,COLOR_string___Object___to_s))( variable4 /*m*/) /*Match::to_s*/;
800 ((array___AbstractArray___add_t)CALL( variable2 /*res*/,COLOR_abstract_collection___SimpleCollection___add))( variable2 /*res*/, variable5) /*Array::add*/;
801 continue_41: while(0);
802 ((array___ArrayIterator___next_t)CALL(variable3,COLOR_abstract_collection___Iterator___next))(variable3) /*ArrayIterator::next*/;
803 }
804 break_41: while(0);
805 variable1 = variable2 /*res*/;
806 goto return_label40;
807 return_label40: while(false);
808 tracehead = trace.prev;
809 return variable1;
810 }
811 val_t string_search___String___split(val_t self) {
812 struct trace_t trace = {NULL, LOCATE_string_search___String___split, 310};
813 val_t variable0;
814 trace.prev = tracehead; tracehead = &trace;
815 variable0 = ((string_search___String___split_with_t)CALL( self,COLOR_string_search___String___split_with))( self, TAG_Char('\n')) /*String::split_with*/;
816 goto return_label42;
817 return_label42: while(false);
818 tracehead = trace.prev;
819 return variable0;
820 }