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