niti, nitg & rta: use lookup_first_definition
[nit.git] / c_src / standard___string_search._sep.c
1 /* This C file is generated by NIT to compile module standard___string_search. */
2 #include "standard___string_search._sep.h"
3 val_t standard___string_search___Pattern___search_index_in(val_t p0, val_t p1, val_t p2){
4 struct {struct stack_frame_t me;} fra;
5 val_t tmp;
6 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
7 fra.me.file = LOCATE_standard___string_search;
8 fra.me.line = 21;
9 fra.me.meth = LOCATE_standard___string_search___Pattern___search_index_in;
10 fra.me.has_broke = 0;
11 fra.me.REG_size = 0;
12 fra.me.nitni_local_ref_head = NULL;
13 /* ../lib/standard/string_search.nit:21 */
14 nit_abort("Deferred method called", NULL, LOCATE_standard___string_search, 21);
15 stack_frame_head = fra.me.prev;
16 return NIT_NULL;
17 }
18 val_t standard___string_search___Pattern___search_in(val_t p0, val_t p1, val_t p2){
19 struct {struct stack_frame_t me;} fra;
20 val_t tmp;
21 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
22 fra.me.file = LOCATE_standard___string_search;
23 fra.me.line = 26;
24 fra.me.meth = LOCATE_standard___string_search___Pattern___search_in;
25 fra.me.has_broke = 0;
26 fra.me.REG_size = 0;
27 fra.me.nitni_local_ref_head = NULL;
28 /* ../lib/standard/string_search.nit:26 */
29 nit_abort("Deferred method called", NULL, LOCATE_standard___string_search, 26);
30 stack_frame_head = fra.me.prev;
31 return NIT_NULL;
32 }
33 val_t standard___string_search___Pattern___search_all_in(val_t p0, val_t p1){
34 struct {struct stack_frame_t me; val_t MORE_REG[4];} fra;
35 val_t REGB0;
36 val_t REGB1;
37 val_t tmp;
38 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
39 fra.me.file = LOCATE_standard___string_search;
40 fra.me.line = 30;
41 fra.me.meth = LOCATE_standard___string_search___Pattern___search_all_in;
42 fra.me.has_broke = 0;
43 fra.me.REG_size = 5;
44 fra.me.nitni_local_ref_head = NULL;
45 fra.me.REG[0] = NIT_NULL;
46 fra.me.REG[1] = NIT_NULL;
47 fra.me.REG[2] = NIT_NULL;
48 fra.me.REG[3] = NIT_NULL;
49 fra.me.REG[4] = NIT_NULL;
50 fra.me.REG[0] = p0;
51 fra.me.REG[1] = p1;
52 /* ../lib/standard/string_search.nit:33 */
53 fra.me.REG[2] = NEW_Array_standard___collection___array___Array___init();
54 /* ../lib/standard/string_search.nit:34 */
55 REGB0 = TAG_Int(0);
56 fra.me.REG[3] = CALL_standard___string_search___Pattern___search_in(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1], REGB0);
57 /* ../lib/standard/string_search.nit:35 */
58 while(1) {
59 REGB0 = TAG_Bool(fra.me.REG[3]==NIT_NULL);
60 if (UNTAG_Bool(REGB0)) {
61 } else {
62 REGB1 = TAG_Bool(fra.me.REG[3]==NIT_NULL);
63 if (UNTAG_Bool(REGB1)) {
64 REGB1 = TAG_Bool(false);
65 REGB0 = REGB1;
66 } else {
67 REGB1 = CALL_standard___kernel___Object_____eqeq(fra.me.REG[3])(fra.me.REG[3], NIT_NULL);
68 REGB0 = REGB1;
69 }
70 }
71 REGB0 = TAG_Bool(!UNTAG_Bool(REGB0));
72 if (UNTAG_Bool(REGB0)) {
73 /* ../lib/standard/string_search.nit:36 */
74 CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[3]);
75 /* ../lib/standard/string_search.nit:37 */
76 REGB0 = TAG_Bool(fra.me.REG[3]==NIT_NULL);
77 if (UNTAG_Bool(REGB0)) {
78 nit_abort("Reciever is null", NULL, LOCATE_standard___string_search, 37);
79 }
80 REGB0 = CALL_standard___string_search___Match___after(fra.me.REG[3])(fra.me.REG[3]);
81 fra.me.REG[4] = CALL_standard___string_search___Pattern___search_in(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1], REGB0);
82 fra.me.REG[3] = fra.me.REG[4];
83 } else {
84 /* ../lib/standard/string_search.nit:35 */
85 goto label1;
86 }
87 }
88 label1: while(0);
89 /* ../lib/standard/string_search.nit:39 */
90 goto label2;
91 label2: while(0);
92 stack_frame_head = fra.me.prev;
93 return fra.me.REG[2];
94 }
95 val_t standard___string_search___Pattern___split_in(val_t p0, val_t p1){
96 struct {struct stack_frame_t me; val_t MORE_REG[4];} fra;
97 val_t REGB0;
98 val_t REGB1;
99 val_t REGB2;
100 val_t tmp;
101 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
102 fra.me.file = LOCATE_standard___string_search;
103 fra.me.line = 42;
104 fra.me.meth = LOCATE_standard___string_search___Pattern___split_in;
105 fra.me.has_broke = 0;
106 fra.me.REG_size = 5;
107 fra.me.nitni_local_ref_head = NULL;
108 fra.me.REG[0] = NIT_NULL;
109 fra.me.REG[1] = NIT_NULL;
110 fra.me.REG[2] = NIT_NULL;
111 fra.me.REG[3] = NIT_NULL;
112 fra.me.REG[4] = NIT_NULL;
113 fra.me.REG[0] = p0;
114 fra.me.REG[1] = p1;
115 /* ../lib/standard/string_search.nit:45 */
116 fra.me.REG[2] = NEW_Array_standard___collection___array___Array___init();
117 /* ../lib/standard/string_search.nit:46 */
118 REGB0 = TAG_Int(0);
119 /* ../lib/standard/string_search.nit:47 */
120 REGB1 = TAG_Int(0);
121 fra.me.REG[3] = CALL_standard___string_search___Pattern___search_in(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1], REGB1);
122 /* ../lib/standard/string_search.nit:48 */
123 while(1) {
124 REGB1 = TAG_Bool(fra.me.REG[3]==NIT_NULL);
125 if (UNTAG_Bool(REGB1)) {
126 } else {
127 REGB2 = TAG_Bool(fra.me.REG[3]==NIT_NULL);
128 if (UNTAG_Bool(REGB2)) {
129 REGB2 = TAG_Bool(false);
130 REGB1 = REGB2;
131 } else {
132 REGB2 = CALL_standard___kernel___Object_____eqeq(fra.me.REG[3])(fra.me.REG[3], NIT_NULL);
133 REGB1 = REGB2;
134 }
135 }
136 REGB1 = TAG_Bool(!UNTAG_Bool(REGB1));
137 if (UNTAG_Bool(REGB1)) {
138 /* ../lib/standard/string_search.nit:50 */
139 REGB1 = TAG_Bool(fra.me.REG[3]==NIT_NULL);
140 if (UNTAG_Bool(REGB1)) {
141 nit_abort("Reciever is null", NULL, LOCATE_standard___string_search, 50);
142 }
143 REGB1 = CALL_standard___string_search___Match___from(fra.me.REG[3])(fra.me.REG[3]);
144 /* ../lib/standard/kernel.nit:237 */
145 REGB1 = TAG_Int(UNTAG_Int(REGB1)-UNTAG_Int(REGB0));
146 /* ../lib/standard/string_search.nit:51 */
147 fra.me.REG[4] = NEW_Match_standard___string_search___Match___init(fra.me.REG[1], REGB0, REGB1);
148 CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[4]);
149 /* ../lib/standard/string_search.nit:52 */
150 REGB1 = TAG_Bool(fra.me.REG[3]==NIT_NULL);
151 if (UNTAG_Bool(REGB1)) {
152 nit_abort("Reciever is null", NULL, LOCATE_standard___string_search, 52);
153 }
154 REGB1 = CALL_standard___string_search___Match___after(fra.me.REG[3])(fra.me.REG[3]);
155 REGB0 = REGB1;
156 /* ../lib/standard/string_search.nit:53 */
157 fra.me.REG[4] = CALL_standard___string_search___Pattern___search_in(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1], REGB0);
158 fra.me.REG[3] = fra.me.REG[4];
159 } else {
160 /* ../lib/standard/string_search.nit:48 */
161 goto label1;
162 }
163 }
164 label1: while(0);
165 /* ../lib/standard/collection/array.nit:24 */
166 REGB1 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[1])!=NIT_NULL);
167 if (UNTAG_Bool(REGB1)) {
168 } else {
169 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 24);
170 }
171 REGB1 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[1]);
172 /* ../lib/standard/kernel.nit:237 */
173 REGB1 = TAG_Int(UNTAG_Int(REGB1)-UNTAG_Int(REGB0));
174 /* ../lib/standard/string_search.nit:56 */
175 fra.me.REG[1] = NEW_Match_standard___string_search___Match___init(fra.me.REG[1], REGB0, REGB1);
176 CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[1]);
177 /* ../lib/standard/string_search.nit:57 */
178 goto label2;
179 label2: while(0);
180 stack_frame_head = fra.me.prev;
181 return fra.me.REG[2];
182 }
183 val_t standard___string_search___BM_Pattern___to_s(val_t p0){
184 struct {struct stack_frame_t me;} fra;
185 val_t REGB0;
186 val_t tmp;
187 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
188 fra.me.file = LOCATE_standard___string_search;
189 fra.me.line = 68;
190 fra.me.meth = LOCATE_standard___string_search___BM_Pattern___to_s;
191 fra.me.has_broke = 0;
192 fra.me.REG_size = 1;
193 fra.me.nitni_local_ref_head = NULL;
194 fra.me.REG[0] = NIT_NULL;
195 fra.me.REG[0] = p0;
196 /* ../lib/standard/string_search.nit:68 */
197 REGB0 = TAG_Bool(ATTR_standard___string_search___BM_Pattern____motif(fra.me.REG[0])!=NIT_NULL);
198 if (UNTAG_Bool(REGB0)) {
199 } else {
200 nit_abort("Uninitialized attribute %s", "_motif", LOCATE_standard___string_search, 68);
201 }
202 fra.me.REG[0] = ATTR_standard___string_search___BM_Pattern____motif(fra.me.REG[0]);
203 goto label1;
204 label1: while(0);
205 stack_frame_head = fra.me.prev;
206 return fra.me.REG[0];
207 }
208 val_t standard___string_search___BM_Pattern___search_index_in(val_t p0, val_t p1, val_t p2){
209 struct {struct stack_frame_t me; val_t MORE_REG[2];} fra;
210 val_t REGB0;
211 val_t REGB1;
212 val_t REGB2;
213 val_t REGB3;
214 val_t REGB4;
215 val_t REGB5;
216 val_t REGB6;
217 val_t REGB7;
218 val_t tmp;
219 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
220 fra.me.file = LOCATE_standard___string_search;
221 fra.me.line = 70;
222 fra.me.meth = LOCATE_standard___string_search___BM_Pattern___search_index_in;
223 fra.me.has_broke = 0;
224 fra.me.REG_size = 3;
225 fra.me.nitni_local_ref_head = NULL;
226 fra.me.REG[0] = NIT_NULL;
227 fra.me.REG[1] = NIT_NULL;
228 fra.me.REG[2] = NIT_NULL;
229 fra.me.REG[0] = p0;
230 fra.me.REG[1] = p1;
231 REGB0 = p2;
232 /* ../lib/standard/string_search.nit:73 */
233 REGB1 = TAG_Int(0);
234 REGB2 = TAG_Bool(VAL_ISA(REGB1, VTCOLOR_standard___kernel___Comparable___OTHER(REGB0), VTID_standard___kernel___Comparable___OTHER(REGB0))) /*cast OTHER*/;
235 if (UNTAG_Bool(REGB2)) {
236 } else {
237 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
238 }
239 /* ../lib/standard/kernel.nit:233 */
240 REGB1 = TAG_Bool(UNTAG_Int(REGB0)>=UNTAG_Int(REGB1));
241 /* ../lib/standard/string_search.nit:73 */
242 if (UNTAG_Bool(REGB1)) {
243 } else {
244 nit_abort("Assert failed", NULL, LOCATE_standard___string_search, 73);
245 }
246 /* ../lib/standard/collection/array.nit:24 */
247 REGB1 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[1])!=NIT_NULL);
248 if (UNTAG_Bool(REGB1)) {
249 } else {
250 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 24);
251 }
252 REGB1 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[1]);
253 /* ../lib/standard/string_search.nit:75 */
254 REGB2 = TAG_Bool(ATTR_standard___string_search___BM_Pattern____length(fra.me.REG[0])!=NIT_NULL);
255 if (UNTAG_Bool(REGB2)) {
256 } else {
257 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___string_search, 75);
258 }
259 REGB2 = ATTR_standard___string_search___BM_Pattern____length(fra.me.REG[0]);
260 /* ../lib/standard/string_search.nit:78 */
261 while(1) {
262 /* ../lib/standard/kernel.nit:237 */
263 REGB3 = TAG_Int(UNTAG_Int(REGB1)-UNTAG_Int(REGB2));
264 /* ../lib/standard/string_search.nit:78 */
265 REGB4 = TAG_Int(1);
266 /* ../lib/standard/kernel.nit:235 */
267 REGB4 = TAG_Int(UNTAG_Int(REGB3)+UNTAG_Int(REGB4));
268 REGB3 = TAG_Bool(VAL_ISA(REGB4, VTCOLOR_standard___kernel___Comparable___OTHER(REGB0), VTID_standard___kernel___Comparable___OTHER(REGB0))) /*cast OTHER*/;
269 if (UNTAG_Bool(REGB3)) {
270 } else {
271 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
272 }
273 /* ../lib/standard/kernel.nit:232 */
274 REGB4 = TAG_Bool(UNTAG_Int(REGB0)<UNTAG_Int(REGB4));
275 /* ../lib/standard/string_search.nit:78 */
276 if (UNTAG_Bool(REGB4)) {
277 /* ../lib/standard/string_search.nit:79 */
278 REGB4 = TAG_Int(1);
279 /* ../lib/standard/kernel.nit:237 */
280 REGB4 = TAG_Int(UNTAG_Int(REGB2)-UNTAG_Int(REGB4));
281 /* ../lib/standard/string_search.nit:80 */
282 while(1) {
283 REGB3 = TAG_Int(0);
284 REGB5 = TAG_Bool(VAL_ISA(REGB3, VTCOLOR_standard___kernel___Comparable___OTHER(REGB4), VTID_standard___kernel___Comparable___OTHER(REGB4))) /*cast OTHER*/;
285 if (UNTAG_Bool(REGB5)) {
286 } else {
287 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
288 }
289 /* ../lib/standard/kernel.nit:233 */
290 REGB3 = TAG_Bool(UNTAG_Int(REGB4)>=UNTAG_Int(REGB3));
291 /* ../lib/standard/string_search.nit:80 */
292 if (UNTAG_Bool(REGB3)) {
293 REGB3 = TAG_Bool(ATTR_standard___string_search___BM_Pattern____motif(fra.me.REG[0])!=NIT_NULL);
294 if (UNTAG_Bool(REGB3)) {
295 } else {
296 nit_abort("Uninitialized attribute %s", "_motif", LOCATE_standard___string_search, 80);
297 }
298 fra.me.REG[2] = ATTR_standard___string_search___BM_Pattern____motif(fra.me.REG[0]);
299 REGB3 = CALL_standard___collection___abstract_collection___SequenceRead_____bra(fra.me.REG[2])(fra.me.REG[2], REGB4);
300 /* ../lib/standard/kernel.nit:235 */
301 REGB5 = TAG_Int(UNTAG_Int(REGB4)+UNTAG_Int(REGB0));
302 /* ../lib/standard/string_search.nit:80 */
303 REGB5 = CALL_standard___collection___abstract_collection___SequenceRead_____bra(fra.me.REG[1])(fra.me.REG[1], REGB5);
304 REGB6 = TAG_Bool(IS_EQUAL_OO(REGB3,REGB5));
305 if (UNTAG_Bool(REGB6)) {
306 } else {
307 /* ../lib/standard/kernel.nit:378 */
308 REGB5 = TAG_Bool((REGB3)==(REGB5));
309 /* ../lib/standard/string_search.nit:80 */
310 REGB6 = REGB5;
311 }
312 } else {
313 REGB5 = TAG_Bool(false);
314 REGB6 = REGB5;
315 }
316 if (UNTAG_Bool(REGB6)) {
317 REGB6 = TAG_Int(1);
318 /* ../lib/standard/kernel.nit:237 */
319 REGB6 = TAG_Int(UNTAG_Int(REGB4)-UNTAG_Int(REGB6));
320 /* ../lib/standard/string_search.nit:80 */
321 REGB4 = REGB6;
322 } else {
323 goto label1;
324 }
325 }
326 label1: while(0);
327 /* ../lib/standard/string_search.nit:81 */
328 REGB6 = TAG_Int(0);
329 REGB5 = TAG_Bool(VAL_ISA(REGB6, VTCOLOR_standard___kernel___Comparable___OTHER(REGB4), VTID_standard___kernel___Comparable___OTHER(REGB4))) /*cast OTHER*/;
330 if (UNTAG_Bool(REGB5)) {
331 } else {
332 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
333 }
334 /* ../lib/standard/kernel.nit:232 */
335 REGB6 = TAG_Bool(UNTAG_Int(REGB4)<UNTAG_Int(REGB6));
336 /* ../lib/standard/string_search.nit:81 */
337 if (UNTAG_Bool(REGB6)) {
338 /* ../lib/standard/string_search.nit:82 */
339 REGB6 = REGB0;
340 goto label2;
341 } else {
342 /* ../lib/standard/string_search.nit:84 */
343 REGB5 = TAG_Bool(ATTR_standard___string_search___BM_Pattern____gs(fra.me.REG[0])!=NIT_NULL);
344 if (UNTAG_Bool(REGB5)) {
345 } else {
346 nit_abort("Uninitialized attribute %s", "_gs", LOCATE_standard___string_search, 84);
347 }
348 fra.me.REG[2] = ATTR_standard___string_search___BM_Pattern____gs(fra.me.REG[0]);
349 /* ../lib/standard/collection/array.nit:278 */
350 REGB5 = REGB4;
351 /* ../lib/standard/collection/array.nit:280 */
352 REGB3 = TAG_Int(0);
353 REGB7 = TAG_Bool(VAL_ISA(REGB3, VTCOLOR_standard___kernel___Comparable___OTHER(REGB5), VTID_standard___kernel___Comparable___OTHER(REGB5))) /*cast OTHER*/;
354 if (UNTAG_Bool(REGB7)) {
355 } else {
356 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
357 }
358 /* ../lib/standard/kernel.nit:233 */
359 REGB3 = TAG_Bool(UNTAG_Int(REGB5)>=UNTAG_Int(REGB3));
360 /* ../lib/standard/collection/array.nit:280 */
361 if (UNTAG_Bool(REGB3)) {
362 REGB3 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[2])!=NIT_NULL);
363 if (UNTAG_Bool(REGB3)) {
364 } else {
365 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 280);
366 }
367 REGB3 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[2]);
368 REGB7 = TAG_Bool(VAL_ISA(REGB3, VTCOLOR_standard___kernel___Comparable___OTHER(REGB5), VTID_standard___kernel___Comparable___OTHER(REGB5))) /*cast OTHER*/;
369 if (UNTAG_Bool(REGB7)) {
370 } else {
371 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
372 }
373 /* ../lib/standard/kernel.nit:232 */
374 REGB3 = TAG_Bool(UNTAG_Int(REGB5)<UNTAG_Int(REGB3));
375 } else {
376 /* ../lib/standard/collection/array.nit:280 */
377 REGB7 = TAG_Bool(false);
378 REGB3 = REGB7;
379 }
380 if (UNTAG_Bool(REGB3)) {
381 } else {
382 nit_abort("Assert '%s' failed", "index", LOCATE_standard___collection___array, 280);
383 }
384 /* ../lib/standard/collection/array.nit:281 */
385 fra.me.REG[2] = ATTR_standard___collection___array___Array____items(fra.me.REG[2]);
386 REGB3 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
387 if (UNTAG_Bool(REGB3)) {
388 nit_abort("Reciever is null", NULL, LOCATE_standard___collection___array, 281);
389 }
390 /* ../lib/standard/collection/array.nit:718 */
391 fra.me.REG[2] = ((Nit_NativeArray)fra.me.REG[2])->val[UNTAG_Int(REGB5)];
392 /* ../lib/standard/collection/array.nit:281 */
393 goto label3;
394 label3: while(0);
395 /* ../lib/standard/string_search.nit:84 */
396 REGB5 = fra.me.REG[2];
397 /* ../lib/standard/kernel.nit:235 */
398 REGB3 = TAG_Int(UNTAG_Int(REGB4)+UNTAG_Int(REGB0));
399 /* ../lib/standard/string_search.nit:85 */
400 REGB3 = CALL_standard___collection___abstract_collection___SequenceRead_____bra(fra.me.REG[1])(fra.me.REG[1], REGB3);
401 REGB3 = CALL_standard___string_search___BM_Pattern___bc(fra.me.REG[0])(fra.me.REG[0], REGB3);
402 /* ../lib/standard/kernel.nit:237 */
403 REGB3 = TAG_Int(UNTAG_Int(REGB3)-UNTAG_Int(REGB2));
404 /* ../lib/standard/string_search.nit:85 */
405 REGB7 = TAG_Int(1);
406 /* ../lib/standard/kernel.nit:235 */
407 REGB7 = TAG_Int(UNTAG_Int(REGB3)+UNTAG_Int(REGB7));
408 REGB4 = TAG_Int(UNTAG_Int(REGB7)+UNTAG_Int(REGB4));
409 REGB7 = TAG_Bool(VAL_ISA(REGB4, VTCOLOR_standard___kernel___Comparable___OTHER(REGB5), VTID_standard___kernel___Comparable___OTHER(REGB5))) /*cast OTHER*/;
410 if (UNTAG_Bool(REGB7)) {
411 } else {
412 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
413 }
414 /* ../lib/standard/kernel.nit:234 */
415 REGB7 = TAG_Bool(UNTAG_Int(REGB5)>UNTAG_Int(REGB4));
416 /* ../lib/standard/string_search.nit:87 */
417 if (UNTAG_Bool(REGB7)) {
418 /* ../lib/standard/kernel.nit:235 */
419 REGB5 = TAG_Int(UNTAG_Int(REGB0)+UNTAG_Int(REGB5));
420 /* ../lib/standard/string_search.nit:88 */
421 REGB0 = REGB5;
422 } else {
423 /* ../lib/standard/kernel.nit:235 */
424 REGB4 = TAG_Int(UNTAG_Int(REGB0)+UNTAG_Int(REGB4));
425 /* ../lib/standard/string_search.nit:90 */
426 REGB0 = REGB4;
427 }
428 }
429 } else {
430 /* ../lib/standard/string_search.nit:78 */
431 goto label4;
432 }
433 }
434 label4: while(0);
435 /* ../lib/standard/string_search.nit:94 */
436 REGB0 = TAG_Int(1);
437 /* ../lib/standard/kernel.nit:236 */
438 REGB0 = TAG_Int(-UNTAG_Int(REGB0));
439 /* ../lib/standard/string_search.nit:94 */
440 REGB6 = REGB0;
441 goto label2;
442 label2: while(0);
443 stack_frame_head = fra.me.prev;
444 return REGB6;
445 }
446 val_t standard___string_search___BM_Pattern___search_in(val_t p0, val_t p1, val_t p2){
447 struct {struct stack_frame_t me; val_t MORE_REG[2];} fra;
448 val_t REGB0;
449 val_t REGB1;
450 val_t REGB2;
451 val_t tmp;
452 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
453 fra.me.file = LOCATE_standard___string_search;
454 fra.me.line = 97;
455 fra.me.meth = LOCATE_standard___string_search___BM_Pattern___search_in;
456 fra.me.has_broke = 0;
457 fra.me.REG_size = 3;
458 fra.me.nitni_local_ref_head = NULL;
459 fra.me.REG[0] = NIT_NULL;
460 fra.me.REG[1] = NIT_NULL;
461 fra.me.REG[2] = NIT_NULL;
462 fra.me.REG[0] = p0;
463 fra.me.REG[1] = p1;
464 REGB0 = p2;
465 /* ../lib/standard/string_search.nit:100 */
466 REGB0 = CALL_standard___string_search___Pattern___search_index_in(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1], REGB0);
467 /* ../lib/standard/string_search.nit:101 */
468 REGB1 = TAG_Int(0);
469 REGB2 = TAG_Bool(VAL_ISA(REGB1, VTCOLOR_standard___kernel___Comparable___OTHER(REGB0), VTID_standard___kernel___Comparable___OTHER(REGB0))) /*cast OTHER*/;
470 if (UNTAG_Bool(REGB2)) {
471 } else {
472 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
473 }
474 /* ../lib/standard/kernel.nit:232 */
475 REGB1 = TAG_Bool(UNTAG_Int(REGB0)<UNTAG_Int(REGB1));
476 /* ../lib/standard/string_search.nit:101 */
477 if (UNTAG_Bool(REGB1)) {
478 /* ../lib/standard/string_search.nit:102 */
479 fra.me.REG[2] = NIT_NULL;
480 goto label1;
481 } else {
482 /* ../lib/standard/string_search.nit:104 */
483 REGB1 = TAG_Bool(ATTR_standard___string_search___BM_Pattern____length(fra.me.REG[0])!=NIT_NULL);
484 if (UNTAG_Bool(REGB1)) {
485 } else {
486 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___string_search, 104);
487 }
488 REGB1 = ATTR_standard___string_search___BM_Pattern____length(fra.me.REG[0]);
489 fra.me.REG[1] = NEW_Match_standard___string_search___Match___init(fra.me.REG[1], REGB0, REGB1);
490 fra.me.REG[2] = fra.me.REG[1];
491 goto label1;
492 }
493 label1: while(0);
494 stack_frame_head = fra.me.prev;
495 return fra.me.REG[2];
496 }
497 void standard___string_search___BM_Pattern___init(val_t p0, val_t p1, int* init_table){
498 int itpos0 = VAL2OBJ(p0)->vft[INIT_TABLE_POS_standard___string_search___BM_Pattern].i;
499 struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
500 val_t REGB0;
501 val_t tmp;
502 if (init_table[itpos0]) return;
503 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
504 fra.me.file = LOCATE_standard___string_search;
505 fra.me.line = 108;
506 fra.me.meth = LOCATE_standard___string_search___BM_Pattern___init;
507 fra.me.has_broke = 0;
508 fra.me.REG_size = 2;
509 fra.me.nitni_local_ref_head = NULL;
510 fra.me.REG[0] = NIT_NULL;
511 fra.me.REG[1] = NIT_NULL;
512 fra.me.REG[0] = p0;
513 fra.me.REG[1] = p1;
514 /* ../lib/standard/string_search.nit:111 */
515 ATTR_standard___string_search___BM_Pattern____motif(fra.me.REG[0]) = fra.me.REG[1];
516 /* ../lib/standard/collection/array.nit:24 */
517 REGB0 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[1])!=NIT_NULL);
518 if (UNTAG_Bool(REGB0)) {
519 } else {
520 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 24);
521 }
522 REGB0 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[1]);
523 /* ../lib/standard/string_search.nit:112 */
524 ATTR_standard___string_search___BM_Pattern____length(fra.me.REG[0]) = REGB0;
525 /* ../lib/standard/string_search.nit:113 */
526 REGB0 = TAG_Bool(ATTR_standard___string_search___BM_Pattern____length(fra.me.REG[0])!=NIT_NULL);
527 if (UNTAG_Bool(REGB0)) {
528 } else {
529 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___string_search, 113);
530 }
531 REGB0 = ATTR_standard___string_search___BM_Pattern____length(fra.me.REG[0]);
532 fra.me.REG[1] = NEW_Array_standard___collection___array___Array___with_capacity(REGB0);
533 ATTR_standard___string_search___BM_Pattern____gs(fra.me.REG[0]) = fra.me.REG[1];
534 /* ../lib/standard/string_search.nit:114 */
535 fra.me.REG[1] = NEW_ArrayMap_standard___collection___array___ArrayMap___init();
536 ATTR_standard___string_search___BM_Pattern____bc_table(fra.me.REG[0]) = fra.me.REG[1];
537 /* ../lib/standard/string_search.nit:115 */
538 CALL_standard___string_search___BM_Pattern___compute_gs(fra.me.REG[0])(fra.me.REG[0]);
539 /* ../lib/standard/string_search.nit:116 */
540 CALL_standard___string_search___BM_Pattern___compute_bc(fra.me.REG[0])(fra.me.REG[0]);
541 stack_frame_head = fra.me.prev;
542 init_table[itpos0] = 1;
543 return;
544 }
545 val_t standard___string_search___BM_Pattern___bc(val_t p0, val_t p1){
546 struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
547 val_t REGB0;
548 val_t REGB1;
549 val_t tmp;
550 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
551 fra.me.file = LOCATE_standard___string_search;
552 fra.me.line = 125;
553 fra.me.meth = LOCATE_standard___string_search___BM_Pattern___bc;
554 fra.me.has_broke = 0;
555 fra.me.REG_size = 2;
556 fra.me.nitni_local_ref_head = NULL;
557 fra.me.REG[0] = NIT_NULL;
558 fra.me.REG[1] = NIT_NULL;
559 fra.me.REG[0] = p0;
560 REGB0 = p1;
561 /* ../lib/standard/string_search.nit:127 */
562 REGB1 = TAG_Bool(ATTR_standard___string_search___BM_Pattern____bc_table(fra.me.REG[0])!=NIT_NULL);
563 if (UNTAG_Bool(REGB1)) {
564 } else {
565 nit_abort("Uninitialized attribute %s", "_bc_table", LOCATE_standard___string_search, 127);
566 }
567 fra.me.REG[1] = ATTR_standard___string_search___BM_Pattern____bc_table(fra.me.REG[0]);
568 REGB1 = CALL_standard___collection___abstract_collection___MapRead___has_key(fra.me.REG[1])(fra.me.REG[1], REGB0);
569 if (UNTAG_Bool(REGB1)) {
570 /* ../lib/standard/string_search.nit:128 */
571 REGB1 = TAG_Bool(ATTR_standard___string_search___BM_Pattern____bc_table(fra.me.REG[0])!=NIT_NULL);
572 if (UNTAG_Bool(REGB1)) {
573 } else {
574 nit_abort("Uninitialized attribute %s", "_bc_table", LOCATE_standard___string_search, 128);
575 }
576 fra.me.REG[1] = ATTR_standard___string_search___BM_Pattern____bc_table(fra.me.REG[0]);
577 fra.me.REG[1] = CALL_standard___collection___abstract_collection___MapRead_____bra(fra.me.REG[1])(fra.me.REG[1], REGB0);
578 REGB0 = fra.me.REG[1];
579 goto label1;
580 } else {
581 /* ../lib/standard/string_search.nit:130 */
582 REGB1 = TAG_Bool(ATTR_standard___string_search___BM_Pattern____length(fra.me.REG[0])!=NIT_NULL);
583 if (UNTAG_Bool(REGB1)) {
584 } else {
585 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___string_search, 130);
586 }
587 REGB1 = ATTR_standard___string_search___BM_Pattern____length(fra.me.REG[0]);
588 REGB0 = REGB1;
589 goto label1;
590 }
591 label1: while(0);
592 stack_frame_head = fra.me.prev;
593 return REGB0;
594 }
595 void standard___string_search___BM_Pattern___compute_bc(val_t p0){
596 struct {struct stack_frame_t me; val_t MORE_REG[2];} fra;
597 val_t REGB0;
598 val_t REGB1;
599 val_t REGB2;
600 val_t REGB3;
601 val_t REGB4;
602 val_t tmp;
603 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
604 fra.me.file = LOCATE_standard___string_search;
605 fra.me.line = 140;
606 fra.me.meth = LOCATE_standard___string_search___BM_Pattern___compute_bc;
607 fra.me.has_broke = 0;
608 fra.me.REG_size = 3;
609 fra.me.nitni_local_ref_head = NULL;
610 fra.me.REG[0] = NIT_NULL;
611 fra.me.REG[1] = NIT_NULL;
612 fra.me.REG[2] = NIT_NULL;
613 fra.me.REG[0] = p0;
614 /* ../lib/standard/string_search.nit:142 */
615 REGB0 = TAG_Bool(ATTR_standard___string_search___BM_Pattern____motif(fra.me.REG[0])!=NIT_NULL);
616 if (UNTAG_Bool(REGB0)) {
617 } else {
618 nit_abort("Uninitialized attribute %s", "_motif", LOCATE_standard___string_search, 142);
619 }
620 fra.me.REG[1] = ATTR_standard___string_search___BM_Pattern____motif(fra.me.REG[0]);
621 /* ../lib/standard/string_search.nit:143 */
622 REGB0 = TAG_Bool(ATTR_standard___string_search___BM_Pattern____length(fra.me.REG[0])!=NIT_NULL);
623 if (UNTAG_Bool(REGB0)) {
624 } else {
625 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___string_search, 143);
626 }
627 REGB0 = ATTR_standard___string_search___BM_Pattern____length(fra.me.REG[0]);
628 /* ../lib/standard/string_search.nit:144 */
629 REGB1 = TAG_Int(0);
630 /* ../lib/standard/string_search.nit:145 */
631 while(1) {
632 REGB2 = TAG_Int(1);
633 /* ../lib/standard/kernel.nit:237 */
634 REGB2 = TAG_Int(UNTAG_Int(REGB0)-UNTAG_Int(REGB2));
635 REGB3 = TAG_Bool(VAL_ISA(REGB2, VTCOLOR_standard___kernel___Comparable___OTHER(REGB1), VTID_standard___kernel___Comparable___OTHER(REGB1))) /*cast OTHER*/;
636 if (UNTAG_Bool(REGB3)) {
637 } else {
638 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
639 }
640 /* ../lib/standard/kernel.nit:232 */
641 REGB2 = TAG_Bool(UNTAG_Int(REGB1)<UNTAG_Int(REGB2));
642 /* ../lib/standard/string_search.nit:145 */
643 if (UNTAG_Bool(REGB2)) {
644 /* ../lib/standard/string_search.nit:146 */
645 REGB2 = TAG_Bool(ATTR_standard___string_search___BM_Pattern____bc_table(fra.me.REG[0])!=NIT_NULL);
646 if (UNTAG_Bool(REGB2)) {
647 } else {
648 nit_abort("Uninitialized attribute %s", "_bc_table", LOCATE_standard___string_search, 146);
649 }
650 fra.me.REG[2] = ATTR_standard___string_search___BM_Pattern____bc_table(fra.me.REG[0]);
651 REGB2 = CALL_standard___collection___abstract_collection___SequenceRead_____bra(fra.me.REG[1])(fra.me.REG[1], REGB1);
652 /* ../lib/standard/kernel.nit:237 */
653 REGB3 = TAG_Int(UNTAG_Int(REGB0)-UNTAG_Int(REGB1));
654 /* ../lib/standard/string_search.nit:146 */
655 REGB4 = TAG_Int(1);
656 /* ../lib/standard/kernel.nit:237 */
657 REGB4 = TAG_Int(UNTAG_Int(REGB3)-UNTAG_Int(REGB4));
658 /* ../lib/standard/string_search.nit:146 */
659 CALL_standard___collection___abstract_collection___Map_____braeq(fra.me.REG[2])(fra.me.REG[2], REGB2, REGB4);
660 /* ../lib/standard/string_search.nit:147 */
661 REGB4 = TAG_Int(1);
662 /* ../lib/standard/kernel.nit:235 */
663 REGB4 = TAG_Int(UNTAG_Int(REGB1)+UNTAG_Int(REGB4));
664 /* ../lib/standard/string_search.nit:147 */
665 REGB1 = REGB4;
666 } else {
667 /* ../lib/standard/string_search.nit:145 */
668 goto label1;
669 }
670 }
671 label1: while(0);
672 stack_frame_head = fra.me.prev;
673 return;
674 }
675 val_t standard___string_search___BM_Pattern___suffixes(val_t p0){
676 struct {struct stack_frame_t me; val_t MORE_REG[2];} fra;
677 val_t REGB0;
678 val_t REGB1;
679 val_t REGB2;
680 val_t REGB3;
681 val_t REGB4;
682 val_t REGB5;
683 val_t REGB6;
684 val_t tmp;
685 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
686 fra.me.file = LOCATE_standard___string_search;
687 fra.me.line = 151;
688 fra.me.meth = LOCATE_standard___string_search___BM_Pattern___suffixes;
689 fra.me.has_broke = 0;
690 fra.me.REG_size = 3;
691 fra.me.nitni_local_ref_head = NULL;
692 fra.me.REG[0] = NIT_NULL;
693 fra.me.REG[1] = NIT_NULL;
694 fra.me.REG[2] = NIT_NULL;
695 fra.me.REG[0] = p0;
696 /* ../lib/standard/string_search.nit:153 */
697 REGB0 = TAG_Bool(ATTR_standard___string_search___BM_Pattern____motif(fra.me.REG[0])!=NIT_NULL);
698 if (UNTAG_Bool(REGB0)) {
699 } else {
700 nit_abort("Uninitialized attribute %s", "_motif", LOCATE_standard___string_search, 153);
701 }
702 fra.me.REG[1] = ATTR_standard___string_search___BM_Pattern____motif(fra.me.REG[0]);
703 /* ../lib/standard/string_search.nit:154 */
704 REGB0 = TAG_Bool(ATTR_standard___string_search___BM_Pattern____length(fra.me.REG[0])!=NIT_NULL);
705 if (UNTAG_Bool(REGB0)) {
706 } else {
707 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___string_search, 154);
708 }
709 REGB0 = ATTR_standard___string_search___BM_Pattern____length(fra.me.REG[0]);
710 /* ../lib/standard/string_search.nit:155 */
711 fra.me.REG[0] = NEW_Array_standard___collection___array___Array___filled_with(REGB0, REGB0);
712 /* ../lib/standard/string_search.nit:157 */
713 REGB1 = TAG_Int(0);
714 /* ../lib/standard/string_search.nit:158 */
715 REGB2 = TAG_Int(1);
716 /* ../lib/standard/kernel.nit:237 */
717 REGB2 = TAG_Int(UNTAG_Int(REGB0)-UNTAG_Int(REGB2));
718 /* ../lib/standard/string_search.nit:159 */
719 REGB3 = TAG_Int(2);
720 /* ../lib/standard/kernel.nit:237 */
721 REGB3 = TAG_Int(UNTAG_Int(REGB0)-UNTAG_Int(REGB3));
722 /* ../lib/standard/string_search.nit:160 */
723 while(1) {
724 REGB4 = TAG_Int(0);
725 REGB5 = TAG_Bool(VAL_ISA(REGB4, VTCOLOR_standard___kernel___Comparable___OTHER(REGB3), VTID_standard___kernel___Comparable___OTHER(REGB3))) /*cast OTHER*/;
726 if (UNTAG_Bool(REGB5)) {
727 } else {
728 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
729 }
730 /* ../lib/standard/kernel.nit:233 */
731 REGB4 = TAG_Bool(UNTAG_Int(REGB3)>=UNTAG_Int(REGB4));
732 /* ../lib/standard/string_search.nit:160 */
733 if (UNTAG_Bool(REGB4)) {
734 REGB4 = TAG_Bool(VAL_ISA(REGB2, VTCOLOR_standard___kernel___Comparable___OTHER(REGB3), VTID_standard___kernel___Comparable___OTHER(REGB3))) /*cast OTHER*/;
735 if (UNTAG_Bool(REGB4)) {
736 } else {
737 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
738 }
739 /* ../lib/standard/kernel.nit:234 */
740 REGB4 = TAG_Bool(UNTAG_Int(REGB3)>UNTAG_Int(REGB2));
741 /* ../lib/standard/string_search.nit:161 */
742 if (UNTAG_Bool(REGB4)) {
743 /* ../lib/standard/kernel.nit:235 */
744 REGB4 = TAG_Int(UNTAG_Int(REGB3)+UNTAG_Int(REGB0));
745 /* ../lib/standard/string_search.nit:161 */
746 REGB5 = TAG_Int(1);
747 /* ../lib/standard/kernel.nit:237 */
748 REGB5 = TAG_Int(UNTAG_Int(REGB4)-UNTAG_Int(REGB5));
749 REGB5 = TAG_Int(UNTAG_Int(REGB5)-UNTAG_Int(REGB1));
750 /* ../lib/standard/collection/array.nit:278 */
751 fra.me.REG[2] = fra.me.REG[0];
752 /* ../lib/standard/collection/array.nit:280 */
753 REGB4 = TAG_Int(0);
754 REGB6 = TAG_Bool(VAL_ISA(REGB4, VTCOLOR_standard___kernel___Comparable___OTHER(REGB5), VTID_standard___kernel___Comparable___OTHER(REGB5))) /*cast OTHER*/;
755 if (UNTAG_Bool(REGB6)) {
756 } else {
757 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
758 }
759 /* ../lib/standard/kernel.nit:233 */
760 REGB4 = TAG_Bool(UNTAG_Int(REGB5)>=UNTAG_Int(REGB4));
761 /* ../lib/standard/collection/array.nit:280 */
762 if (UNTAG_Bool(REGB4)) {
763 REGB4 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[2])!=NIT_NULL);
764 if (UNTAG_Bool(REGB4)) {
765 } else {
766 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 280);
767 }
768 REGB4 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[2]);
769 REGB6 = TAG_Bool(VAL_ISA(REGB4, VTCOLOR_standard___kernel___Comparable___OTHER(REGB5), VTID_standard___kernel___Comparable___OTHER(REGB5))) /*cast OTHER*/;
770 if (UNTAG_Bool(REGB6)) {
771 } else {
772 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
773 }
774 /* ../lib/standard/kernel.nit:232 */
775 REGB4 = TAG_Bool(UNTAG_Int(REGB5)<UNTAG_Int(REGB4));
776 } else {
777 /* ../lib/standard/collection/array.nit:280 */
778 REGB6 = TAG_Bool(false);
779 REGB4 = REGB6;
780 }
781 if (UNTAG_Bool(REGB4)) {
782 } else {
783 nit_abort("Assert '%s' failed", "index", LOCATE_standard___collection___array, 280);
784 }
785 /* ../lib/standard/collection/array.nit:281 */
786 fra.me.REG[2] = ATTR_standard___collection___array___Array____items(fra.me.REG[2]);
787 REGB4 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
788 if (UNTAG_Bool(REGB4)) {
789 nit_abort("Reciever is null", NULL, LOCATE_standard___collection___array, 281);
790 }
791 /* ../lib/standard/collection/array.nit:718 */
792 fra.me.REG[2] = ((Nit_NativeArray)fra.me.REG[2])->val[UNTAG_Int(REGB5)];
793 /* ../lib/standard/collection/array.nit:281 */
794 goto label1;
795 label1: while(0);
796 /* ../lib/standard/kernel.nit:237 */
797 REGB5 = TAG_Int(UNTAG_Int(REGB3)-UNTAG_Int(REGB2));
798 /* ../lib/standard/string_search.nit:161 */
799 REGB4 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
800 if (UNTAG_Bool(REGB4)) {
801 nit_abort("Reciever is null", NULL, LOCATE_standard___string_search, 161);
802 }
803 REGB4 = TAG_Bool(VAL_ISA(REGB5, VTCOLOR_standard___kernel___Comparable___OTHER(fra.me.REG[2]), VTID_standard___kernel___Comparable___OTHER(fra.me.REG[2]))) /*cast OTHER*/;
804 if (UNTAG_Bool(REGB4)) {
805 } else {
806 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
807 }
808 /* ../lib/standard/kernel.nit:232 */
809 REGB5 = TAG_Bool(UNTAG_Int(fra.me.REG[2])<UNTAG_Int(REGB5));
810 } else {
811 /* ../lib/standard/string_search.nit:161 */
812 REGB4 = TAG_Bool(false);
813 REGB5 = REGB4;
814 }
815 if (UNTAG_Bool(REGB5)) {
816 /* ../lib/standard/kernel.nit:235 */
817 REGB5 = TAG_Int(UNTAG_Int(REGB3)+UNTAG_Int(REGB0));
818 /* ../lib/standard/string_search.nit:162 */
819 REGB4 = TAG_Int(1);
820 /* ../lib/standard/kernel.nit:237 */
821 REGB4 = TAG_Int(UNTAG_Int(REGB5)-UNTAG_Int(REGB4));
822 REGB4 = TAG_Int(UNTAG_Int(REGB4)-UNTAG_Int(REGB1));
823 /* ../lib/standard/collection/array.nit:278 */
824 fra.me.REG[2] = fra.me.REG[0];
825 /* ../lib/standard/collection/array.nit:280 */
826 REGB5 = TAG_Int(0);
827 REGB6 = TAG_Bool(VAL_ISA(REGB5, VTCOLOR_standard___kernel___Comparable___OTHER(REGB4), VTID_standard___kernel___Comparable___OTHER(REGB4))) /*cast OTHER*/;
828 if (UNTAG_Bool(REGB6)) {
829 } else {
830 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
831 }
832 /* ../lib/standard/kernel.nit:233 */
833 REGB5 = TAG_Bool(UNTAG_Int(REGB4)>=UNTAG_Int(REGB5));
834 /* ../lib/standard/collection/array.nit:280 */
835 if (UNTAG_Bool(REGB5)) {
836 REGB5 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[2])!=NIT_NULL);
837 if (UNTAG_Bool(REGB5)) {
838 } else {
839 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 280);
840 }
841 REGB5 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[2]);
842 REGB6 = TAG_Bool(VAL_ISA(REGB5, VTCOLOR_standard___kernel___Comparable___OTHER(REGB4), VTID_standard___kernel___Comparable___OTHER(REGB4))) /*cast OTHER*/;
843 if (UNTAG_Bool(REGB6)) {
844 } else {
845 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
846 }
847 /* ../lib/standard/kernel.nit:232 */
848 REGB5 = TAG_Bool(UNTAG_Int(REGB4)<UNTAG_Int(REGB5));
849 } else {
850 /* ../lib/standard/collection/array.nit:280 */
851 REGB6 = TAG_Bool(false);
852 REGB5 = REGB6;
853 }
854 if (UNTAG_Bool(REGB5)) {
855 } else {
856 nit_abort("Assert '%s' failed", "index", LOCATE_standard___collection___array, 280);
857 }
858 /* ../lib/standard/collection/array.nit:281 */
859 fra.me.REG[2] = ATTR_standard___collection___array___Array____items(fra.me.REG[2]);
860 REGB5 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
861 if (UNTAG_Bool(REGB5)) {
862 nit_abort("Reciever is null", NULL, LOCATE_standard___collection___array, 281);
863 }
864 /* ../lib/standard/collection/array.nit:718 */
865 fra.me.REG[2] = ((Nit_NativeArray)fra.me.REG[2])->val[UNTAG_Int(REGB4)];
866 /* ../lib/standard/collection/array.nit:281 */
867 goto label2;
868 label2: while(0);
869 /* ../lib/standard/string_search.nit:162 */
870 CALL_standard___collection___abstract_collection___Sequence_____braeq(fra.me.REG[0])(fra.me.REG[0], REGB3, fra.me.REG[2]);
871 } else {
872 REGB4 = TAG_Bool(VAL_ISA(REGB2, VTCOLOR_standard___kernel___Comparable___OTHER(REGB3), VTID_standard___kernel___Comparable___OTHER(REGB3))) /*cast OTHER*/;
873 if (UNTAG_Bool(REGB4)) {
874 } else {
875 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
876 }
877 /* ../lib/standard/kernel.nit:232 */
878 REGB4 = TAG_Bool(UNTAG_Int(REGB3)<UNTAG_Int(REGB2));
879 /* ../lib/standard/string_search.nit:164 */
880 if (UNTAG_Bool(REGB4)) {
881 REGB2 = REGB3;
882 }
883 /* ../lib/standard/string_search.nit:165 */
884 REGB1 = REGB3;
885 /* ../lib/standard/string_search.nit:166 */
886 while(1) {
887 REGB4 = TAG_Int(0);
888 REGB5 = TAG_Bool(VAL_ISA(REGB4, VTCOLOR_standard___kernel___Comparable___OTHER(REGB2), VTID_standard___kernel___Comparable___OTHER(REGB2))) /*cast OTHER*/;
889 if (UNTAG_Bool(REGB5)) {
890 } else {
891 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
892 }
893 /* ../lib/standard/kernel.nit:233 */
894 REGB4 = TAG_Bool(UNTAG_Int(REGB2)>=UNTAG_Int(REGB4));
895 /* ../lib/standard/string_search.nit:166 */
896 if (UNTAG_Bool(REGB4)) {
897 REGB4 = CALL_standard___collection___abstract_collection___SequenceRead_____bra(fra.me.REG[1])(fra.me.REG[1], REGB2);
898 /* ../lib/standard/kernel.nit:235 */
899 REGB5 = TAG_Int(UNTAG_Int(REGB2)+UNTAG_Int(REGB0));
900 /* ../lib/standard/string_search.nit:166 */
901 REGB6 = TAG_Int(1);
902 /* ../lib/standard/kernel.nit:237 */
903 REGB6 = TAG_Int(UNTAG_Int(REGB5)-UNTAG_Int(REGB6));
904 REGB6 = TAG_Int(UNTAG_Int(REGB6)-UNTAG_Int(REGB1));
905 /* ../lib/standard/string_search.nit:166 */
906 REGB6 = CALL_standard___collection___abstract_collection___SequenceRead_____bra(fra.me.REG[1])(fra.me.REG[1], REGB6);
907 REGB5 = TAG_Bool(IS_EQUAL_OO(REGB4,REGB6));
908 if (UNTAG_Bool(REGB5)) {
909 } else {
910 /* ../lib/standard/kernel.nit:378 */
911 REGB6 = TAG_Bool((REGB4)==(REGB6));
912 /* ../lib/standard/string_search.nit:166 */
913 REGB5 = REGB6;
914 }
915 } else {
916 REGB6 = TAG_Bool(false);
917 REGB5 = REGB6;
918 }
919 if (UNTAG_Bool(REGB5)) {
920 REGB5 = TAG_Int(1);
921 /* ../lib/standard/kernel.nit:237 */
922 REGB5 = TAG_Int(UNTAG_Int(REGB2)-UNTAG_Int(REGB5));
923 /* ../lib/standard/string_search.nit:166 */
924 REGB2 = REGB5;
925 } else {
926 goto label3;
927 }
928 }
929 label3: while(0);
930 /* ../lib/standard/kernel.nit:237 */
931 REGB5 = TAG_Int(UNTAG_Int(REGB1)-UNTAG_Int(REGB2));
932 /* ../lib/standard/string_search.nit:167 */
933 CALL_standard___collection___abstract_collection___Sequence_____braeq(fra.me.REG[0])(fra.me.REG[0], REGB3, REGB5);
934 }
935 /* ../lib/standard/string_search.nit:169 */
936 REGB5 = TAG_Int(1);
937 /* ../lib/standard/kernel.nit:237 */
938 REGB5 = TAG_Int(UNTAG_Int(REGB3)-UNTAG_Int(REGB5));
939 /* ../lib/standard/string_search.nit:169 */
940 REGB3 = REGB5;
941 } else {
942 /* ../lib/standard/string_search.nit:160 */
943 goto label4;
944 }
945 }
946 label4: while(0);
947 /* ../lib/standard/string_search.nit:171 */
948 goto label5;
949 label5: while(0);
950 stack_frame_head = fra.me.prev;
951 return fra.me.REG[0];
952 }
953 void standard___string_search___BM_Pattern___compute_gs(val_t p0){
954 struct {struct stack_frame_t me; val_t MORE_REG[3];} fra;
955 val_t REGB0;
956 val_t REGB1;
957 val_t REGB2;
958 val_t REGB3;
959 val_t REGB4;
960 val_t REGB5;
961 val_t REGB6;
962 val_t tmp;
963 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
964 fra.me.file = LOCATE_standard___string_search;
965 fra.me.line = 174;
966 fra.me.meth = LOCATE_standard___string_search___BM_Pattern___compute_gs;
967 fra.me.has_broke = 0;
968 fra.me.REG_size = 4;
969 fra.me.nitni_local_ref_head = NULL;
970 fra.me.REG[0] = NIT_NULL;
971 fra.me.REG[1] = NIT_NULL;
972 fra.me.REG[2] = NIT_NULL;
973 fra.me.REG[3] = NIT_NULL;
974 fra.me.REG[0] = p0;
975 /* ../lib/standard/string_search.nit:176 */
976 REGB0 = TAG_Bool(ATTR_standard___string_search___BM_Pattern____motif(fra.me.REG[0])!=NIT_NULL);
977 if (UNTAG_Bool(REGB0)) {
978 } else {
979 nit_abort("Uninitialized attribute %s", "_motif", LOCATE_standard___string_search, 176);
980 }
981 fra.me.REG[1] = ATTR_standard___string_search___BM_Pattern____motif(fra.me.REG[0]);
982 /* ../lib/standard/string_search.nit:177 */
983 REGB0 = TAG_Bool(ATTR_standard___string_search___BM_Pattern____length(fra.me.REG[0])!=NIT_NULL);
984 if (UNTAG_Bool(REGB0)) {
985 } else {
986 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___string_search, 177);
987 }
988 REGB0 = ATTR_standard___string_search___BM_Pattern____length(fra.me.REG[0]);
989 /* ../lib/standard/string_search.nit:178 */
990 fra.me.REG[1] = CALL_standard___string_search___BM_Pattern___suffixes(fra.me.REG[0])(fra.me.REG[0]);
991 /* ../lib/standard/string_search.nit:179 */
992 REGB1 = TAG_Int(0);
993 /* ../lib/standard/string_search.nit:180 */
994 while(1) {
995 REGB2 = TAG_Bool(VAL_ISA(REGB0, VTCOLOR_standard___kernel___Comparable___OTHER(REGB1), VTID_standard___kernel___Comparable___OTHER(REGB1))) /*cast OTHER*/;
996 if (UNTAG_Bool(REGB2)) {
997 } else {
998 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
999 }
1000 /* ../lib/standard/kernel.nit:232 */
1001 REGB2 = TAG_Bool(UNTAG_Int(REGB1)<UNTAG_Int(REGB0));
1002 /* ../lib/standard/string_search.nit:180 */
1003 if (UNTAG_Bool(REGB2)) {
1004 /* ../lib/standard/string_search.nit:181 */
1005 REGB2 = TAG_Bool(ATTR_standard___string_search___BM_Pattern____gs(fra.me.REG[0])!=NIT_NULL);
1006 if (UNTAG_Bool(REGB2)) {
1007 } else {
1008 nit_abort("Uninitialized attribute %s", "_gs", LOCATE_standard___string_search, 181);
1009 }
1010 fra.me.REG[2] = ATTR_standard___string_search___BM_Pattern____gs(fra.me.REG[0]);
1011 CALL_standard___collection___abstract_collection___Sequence_____braeq(fra.me.REG[2])(fra.me.REG[2], REGB1, REGB0);
1012 /* ../lib/standard/string_search.nit:182 */
1013 REGB2 = TAG_Int(1);
1014 /* ../lib/standard/kernel.nit:235 */
1015 REGB2 = TAG_Int(UNTAG_Int(REGB1)+UNTAG_Int(REGB2));
1016 /* ../lib/standard/string_search.nit:182 */
1017 REGB1 = REGB2;
1018 } else {
1019 /* ../lib/standard/string_search.nit:180 */
1020 goto label1;
1021 }
1022 }
1023 label1: while(0);
1024 /* ../lib/standard/string_search.nit:184 */
1025 REGB2 = TAG_Int(0);
1026 /* ../lib/standard/string_search.nit:185 */
1027 REGB3 = TAG_Int(1);
1028 /* ../lib/standard/kernel.nit:237 */
1029 REGB3 = TAG_Int(UNTAG_Int(REGB0)-UNTAG_Int(REGB3));
1030 /* ../lib/standard/string_search.nit:185 */
1031 REGB1 = REGB3;
1032 /* ../lib/standard/string_search.nit:186 */
1033 while(1) {
1034 REGB3 = TAG_Int(1);
1035 /* ../lib/standard/kernel.nit:236 */
1036 REGB3 = TAG_Int(-UNTAG_Int(REGB3));
1037 REGB4 = TAG_Bool(VAL_ISA(REGB3, VTCOLOR_standard___kernel___Comparable___OTHER(REGB1), VTID_standard___kernel___Comparable___OTHER(REGB1))) /*cast OTHER*/;
1038 if (UNTAG_Bool(REGB4)) {
1039 } else {
1040 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
1041 }
1042 /* ../lib/standard/kernel.nit:233 */
1043 REGB3 = TAG_Bool(UNTAG_Int(REGB1)>=UNTAG_Int(REGB3));
1044 /* ../lib/standard/string_search.nit:186 */
1045 if (UNTAG_Bool(REGB3)) {
1046 /* ../lib/standard/string_search.nit:187 */
1047 REGB3 = TAG_Int(1);
1048 /* ../lib/standard/kernel.nit:236 */
1049 REGB3 = TAG_Int(-UNTAG_Int(REGB3));
1050 /* ../lib/standard/string_search.nit:187 */
1051 REGB4 = TAG_Bool(IS_EQUAL_OO(REGB1,REGB3));
1052 if (UNTAG_Bool(REGB4)) {
1053 } else {
1054 /* ../lib/standard/kernel.nit:227 */
1055 REGB3 = TAG_Bool((REGB1)==(REGB3));
1056 /* ../lib/standard/string_search.nit:187 */
1057 REGB4 = REGB3;
1058 }
1059 if (UNTAG_Bool(REGB4)) {
1060 REGB4 = TAG_Bool(true);
1061 } else {
1062 /* ../lib/standard/collection/array.nit:278 */
1063 fra.me.REG[2] = fra.me.REG[1];
1064 REGB3 = REGB1;
1065 /* ../lib/standard/collection/array.nit:280 */
1066 REGB5 = TAG_Int(0);
1067 REGB6 = TAG_Bool(VAL_ISA(REGB5, VTCOLOR_standard___kernel___Comparable___OTHER(REGB3), VTID_standard___kernel___Comparable___OTHER(REGB3))) /*cast OTHER*/;
1068 if (UNTAG_Bool(REGB6)) {
1069 } else {
1070 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
1071 }
1072 /* ../lib/standard/kernel.nit:233 */
1073 REGB5 = TAG_Bool(UNTAG_Int(REGB3)>=UNTAG_Int(REGB5));
1074 /* ../lib/standard/collection/array.nit:280 */
1075 if (UNTAG_Bool(REGB5)) {
1076 REGB5 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[2])!=NIT_NULL);
1077 if (UNTAG_Bool(REGB5)) {
1078 } else {
1079 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 280);
1080 }
1081 REGB5 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[2]);
1082 REGB6 = TAG_Bool(VAL_ISA(REGB5, VTCOLOR_standard___kernel___Comparable___OTHER(REGB3), VTID_standard___kernel___Comparable___OTHER(REGB3))) /*cast OTHER*/;
1083 if (UNTAG_Bool(REGB6)) {
1084 } else {
1085 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
1086 }
1087 /* ../lib/standard/kernel.nit:232 */
1088 REGB5 = TAG_Bool(UNTAG_Int(REGB3)<UNTAG_Int(REGB5));
1089 } else {
1090 /* ../lib/standard/collection/array.nit:280 */
1091 REGB6 = TAG_Bool(false);
1092 REGB5 = REGB6;
1093 }
1094 if (UNTAG_Bool(REGB5)) {
1095 } else {
1096 nit_abort("Assert '%s' failed", "index", LOCATE_standard___collection___array, 280);
1097 }
1098 /* ../lib/standard/collection/array.nit:281 */
1099 fra.me.REG[2] = ATTR_standard___collection___array___Array____items(fra.me.REG[2]);
1100 REGB5 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
1101 if (UNTAG_Bool(REGB5)) {
1102 nit_abort("Reciever is null", NULL, LOCATE_standard___collection___array, 281);
1103 }
1104 /* ../lib/standard/collection/array.nit:718 */
1105 fra.me.REG[2] = ((Nit_NativeArray)fra.me.REG[2])->val[UNTAG_Int(REGB3)];
1106 /* ../lib/standard/collection/array.nit:281 */
1107 goto label2;
1108 label2: while(0);
1109 /* ../lib/standard/string_search.nit:187 */
1110 REGB3 = TAG_Int(1);
1111 /* ../lib/standard/kernel.nit:235 */
1112 REGB3 = TAG_Int(UNTAG_Int(REGB1)+UNTAG_Int(REGB3));
1113 /* ../lib/standard/string_search.nit:187 */
1114 REGB5 = TAG_Bool(IS_EQUAL_ON(REGB3,fra.me.REG[2]));
1115 if (UNTAG_Bool(REGB5)) {
1116 } else {
1117 REGB6 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
1118 if (UNTAG_Bool(REGB6)) {
1119 REGB6 = TAG_Bool(false);
1120 REGB5 = REGB6;
1121 } else {
1122 /* ../lib/standard/kernel.nit:227 */
1123 REGB3 = TAG_Bool((fra.me.REG[2])==(REGB3));
1124 /* ../lib/standard/string_search.nit:187 */
1125 REGB5 = REGB3;
1126 }
1127 }
1128 REGB4 = REGB5;
1129 }
1130 if (UNTAG_Bool(REGB4)) {
1131 /* ../lib/standard/string_search.nit:188 */
1132 while(1) {
1133 REGB4 = TAG_Int(1);
1134 /* ../lib/standard/kernel.nit:237 */
1135 REGB4 = TAG_Int(UNTAG_Int(REGB0)-UNTAG_Int(REGB4));
1136 REGB4 = TAG_Int(UNTAG_Int(REGB4)-UNTAG_Int(REGB1));
1137 REGB5 = TAG_Bool(VAL_ISA(REGB4, VTCOLOR_standard___kernel___Comparable___OTHER(REGB2), VTID_standard___kernel___Comparable___OTHER(REGB2))) /*cast OTHER*/;
1138 if (UNTAG_Bool(REGB5)) {
1139 } else {
1140 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
1141 }
1142 /* ../lib/standard/kernel.nit:232 */
1143 REGB4 = TAG_Bool(UNTAG_Int(REGB2)<UNTAG_Int(REGB4));
1144 /* ../lib/standard/string_search.nit:188 */
1145 if (UNTAG_Bool(REGB4)) {
1146 /* ../lib/standard/string_search.nit:189 */
1147 REGB4 = TAG_Bool(ATTR_standard___string_search___BM_Pattern____gs(fra.me.REG[0])!=NIT_NULL);
1148 if (UNTAG_Bool(REGB4)) {
1149 } else {
1150 nit_abort("Uninitialized attribute %s", "_gs", LOCATE_standard___string_search, 189);
1151 }
1152 fra.me.REG[2] = ATTR_standard___string_search___BM_Pattern____gs(fra.me.REG[0]);
1153 /* ../lib/standard/collection/array.nit:278 */
1154 REGB4 = REGB2;
1155 /* ../lib/standard/collection/array.nit:280 */
1156 REGB5 = TAG_Int(0);
1157 REGB3 = TAG_Bool(VAL_ISA(REGB5, VTCOLOR_standard___kernel___Comparable___OTHER(REGB4), VTID_standard___kernel___Comparable___OTHER(REGB4))) /*cast OTHER*/;
1158 if (UNTAG_Bool(REGB3)) {
1159 } else {
1160 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
1161 }
1162 /* ../lib/standard/kernel.nit:233 */
1163 REGB5 = TAG_Bool(UNTAG_Int(REGB4)>=UNTAG_Int(REGB5));
1164 /* ../lib/standard/collection/array.nit:280 */
1165 if (UNTAG_Bool(REGB5)) {
1166 REGB5 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[2])!=NIT_NULL);
1167 if (UNTAG_Bool(REGB5)) {
1168 } else {
1169 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 280);
1170 }
1171 REGB5 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[2]);
1172 REGB3 = TAG_Bool(VAL_ISA(REGB5, VTCOLOR_standard___kernel___Comparable___OTHER(REGB4), VTID_standard___kernel___Comparable___OTHER(REGB4))) /*cast OTHER*/;
1173 if (UNTAG_Bool(REGB3)) {
1174 } else {
1175 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
1176 }
1177 /* ../lib/standard/kernel.nit:232 */
1178 REGB5 = TAG_Bool(UNTAG_Int(REGB4)<UNTAG_Int(REGB5));
1179 } else {
1180 /* ../lib/standard/collection/array.nit:280 */
1181 REGB3 = TAG_Bool(false);
1182 REGB5 = REGB3;
1183 }
1184 if (UNTAG_Bool(REGB5)) {
1185 } else {
1186 nit_abort("Assert '%s' failed", "index", LOCATE_standard___collection___array, 280);
1187 }
1188 /* ../lib/standard/collection/array.nit:281 */
1189 fra.me.REG[2] = ATTR_standard___collection___array___Array____items(fra.me.REG[2]);
1190 REGB5 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
1191 if (UNTAG_Bool(REGB5)) {
1192 nit_abort("Reciever is null", NULL, LOCATE_standard___collection___array, 281);
1193 }
1194 /* ../lib/standard/collection/array.nit:718 */
1195 fra.me.REG[2] = ((Nit_NativeArray)fra.me.REG[2])->val[UNTAG_Int(REGB4)];
1196 /* ../lib/standard/collection/array.nit:281 */
1197 goto label3;
1198 label3: while(0);
1199 /* ../lib/standard/string_search.nit:189 */
1200 REGB4 = TAG_Bool(IS_EQUAL_ON(REGB0,fra.me.REG[2]));
1201 if (UNTAG_Bool(REGB4)) {
1202 } else {
1203 REGB5 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
1204 if (UNTAG_Bool(REGB5)) {
1205 REGB5 = TAG_Bool(false);
1206 REGB4 = REGB5;
1207 } else {
1208 /* ../lib/standard/kernel.nit:227 */
1209 REGB5 = TAG_Bool((fra.me.REG[2])==(REGB0));
1210 /* ../lib/standard/string_search.nit:189 */
1211 REGB4 = REGB5;
1212 }
1213 }
1214 if (UNTAG_Bool(REGB4)) {
1215 REGB4 = TAG_Bool(ATTR_standard___string_search___BM_Pattern____gs(fra.me.REG[0])!=NIT_NULL);
1216 if (UNTAG_Bool(REGB4)) {
1217 } else {
1218 nit_abort("Uninitialized attribute %s", "_gs", LOCATE_standard___string_search, 189);
1219 }
1220 fra.me.REG[2] = ATTR_standard___string_search___BM_Pattern____gs(fra.me.REG[0]);
1221 REGB4 = TAG_Int(1);
1222 /* ../lib/standard/kernel.nit:237 */
1223 REGB4 = TAG_Int(UNTAG_Int(REGB0)-UNTAG_Int(REGB4));
1224 REGB4 = TAG_Int(UNTAG_Int(REGB4)-UNTAG_Int(REGB1));
1225 /* ../lib/standard/string_search.nit:189 */
1226 CALL_standard___collection___abstract_collection___Sequence_____braeq(fra.me.REG[2])(fra.me.REG[2], REGB2, REGB4);
1227 }
1228 /* ../lib/standard/string_search.nit:190 */
1229 REGB4 = TAG_Int(1);
1230 /* ../lib/standard/kernel.nit:235 */
1231 REGB4 = TAG_Int(UNTAG_Int(REGB2)+UNTAG_Int(REGB4));
1232 /* ../lib/standard/string_search.nit:190 */
1233 REGB2 = REGB4;
1234 } else {
1235 /* ../lib/standard/string_search.nit:188 */
1236 goto label4;
1237 }
1238 }
1239 label4: while(0);
1240 }
1241 /* ../lib/standard/string_search.nit:193 */
1242 REGB4 = TAG_Int(1);
1243 /* ../lib/standard/kernel.nit:237 */
1244 REGB4 = TAG_Int(UNTAG_Int(REGB1)-UNTAG_Int(REGB4));
1245 /* ../lib/standard/string_search.nit:193 */
1246 REGB1 = REGB4;
1247 } else {
1248 /* ../lib/standard/string_search.nit:186 */
1249 goto label5;
1250 }
1251 }
1252 label5: while(0);
1253 /* ../lib/standard/string_search.nit:195 */
1254 REGB2 = TAG_Int(0);
1255 REGB1 = REGB2;
1256 /* ../lib/standard/string_search.nit:196 */
1257 while(1) {
1258 REGB2 = TAG_Int(1);
1259 /* ../lib/standard/kernel.nit:237 */
1260 REGB2 = TAG_Int(UNTAG_Int(REGB0)-UNTAG_Int(REGB2));
1261 REGB4 = TAG_Bool(VAL_ISA(REGB2, VTCOLOR_standard___kernel___Comparable___OTHER(REGB1), VTID_standard___kernel___Comparable___OTHER(REGB1))) /*cast OTHER*/;
1262 if (UNTAG_Bool(REGB4)) {
1263 } else {
1264 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
1265 }
1266 /* ../lib/standard/kernel.nit:232 */
1267 REGB2 = TAG_Bool(UNTAG_Int(REGB1)<UNTAG_Int(REGB2));
1268 /* ../lib/standard/string_search.nit:196 */
1269 if (UNTAG_Bool(REGB2)) {
1270 /* ../lib/standard/string_search.nit:197 */
1271 REGB2 = TAG_Bool(ATTR_standard___string_search___BM_Pattern____gs(fra.me.REG[0])!=NIT_NULL);
1272 if (UNTAG_Bool(REGB2)) {
1273 } else {
1274 nit_abort("Uninitialized attribute %s", "_gs", LOCATE_standard___string_search, 197);
1275 }
1276 fra.me.REG[2] = ATTR_standard___string_search___BM_Pattern____gs(fra.me.REG[0]);
1277 REGB2 = TAG_Int(1);
1278 /* ../lib/standard/kernel.nit:237 */
1279 REGB2 = TAG_Int(UNTAG_Int(REGB0)-UNTAG_Int(REGB2));
1280 /* ../lib/standard/collection/array.nit:278 */
1281 fra.me.REG[3] = fra.me.REG[1];
1282 REGB4 = REGB1;
1283 /* ../lib/standard/collection/array.nit:280 */
1284 REGB5 = TAG_Int(0);
1285 REGB3 = TAG_Bool(VAL_ISA(REGB5, VTCOLOR_standard___kernel___Comparable___OTHER(REGB4), VTID_standard___kernel___Comparable___OTHER(REGB4))) /*cast OTHER*/;
1286 if (UNTAG_Bool(REGB3)) {
1287 } else {
1288 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
1289 }
1290 /* ../lib/standard/kernel.nit:233 */
1291 REGB5 = TAG_Bool(UNTAG_Int(REGB4)>=UNTAG_Int(REGB5));
1292 /* ../lib/standard/collection/array.nit:280 */
1293 if (UNTAG_Bool(REGB5)) {
1294 REGB5 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[3])!=NIT_NULL);
1295 if (UNTAG_Bool(REGB5)) {
1296 } else {
1297 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 280);
1298 }
1299 REGB5 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[3]);
1300 REGB3 = TAG_Bool(VAL_ISA(REGB5, VTCOLOR_standard___kernel___Comparable___OTHER(REGB4), VTID_standard___kernel___Comparable___OTHER(REGB4))) /*cast OTHER*/;
1301 if (UNTAG_Bool(REGB3)) {
1302 } else {
1303 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
1304 }
1305 /* ../lib/standard/kernel.nit:232 */
1306 REGB5 = TAG_Bool(UNTAG_Int(REGB4)<UNTAG_Int(REGB5));
1307 } else {
1308 /* ../lib/standard/collection/array.nit:280 */
1309 REGB3 = TAG_Bool(false);
1310 REGB5 = REGB3;
1311 }
1312 if (UNTAG_Bool(REGB5)) {
1313 } else {
1314 nit_abort("Assert '%s' failed", "index", LOCATE_standard___collection___array, 280);
1315 }
1316 /* ../lib/standard/collection/array.nit:281 */
1317 fra.me.REG[3] = ATTR_standard___collection___array___Array____items(fra.me.REG[3]);
1318 REGB5 = TAG_Bool(fra.me.REG[3]==NIT_NULL);
1319 if (UNTAG_Bool(REGB5)) {
1320 nit_abort("Reciever is null", NULL, LOCATE_standard___collection___array, 281);
1321 }
1322 /* ../lib/standard/collection/array.nit:718 */
1323 fra.me.REG[3] = ((Nit_NativeArray)fra.me.REG[3])->val[UNTAG_Int(REGB4)];
1324 /* ../lib/standard/collection/array.nit:281 */
1325 goto label6;
1326 label6: while(0);
1327 /* ../lib/standard/kernel.nit:237 */
1328 REGB2 = TAG_Int(UNTAG_Int(REGB2)-UNTAG_Int(fra.me.REG[3]));
1329 /* ../lib/standard/string_search.nit:197 */
1330 REGB4 = TAG_Int(1);
1331 /* ../lib/standard/kernel.nit:237 */
1332 REGB4 = TAG_Int(UNTAG_Int(REGB0)-UNTAG_Int(REGB4));
1333 REGB4 = TAG_Int(UNTAG_Int(REGB4)-UNTAG_Int(REGB1));
1334 /* ../lib/standard/string_search.nit:197 */
1335 CALL_standard___collection___abstract_collection___Sequence_____braeq(fra.me.REG[2])(fra.me.REG[2], REGB2, REGB4);
1336 /* ../lib/standard/string_search.nit:198 */
1337 REGB4 = TAG_Int(1);
1338 /* ../lib/standard/kernel.nit:235 */
1339 REGB4 = TAG_Int(UNTAG_Int(REGB1)+UNTAG_Int(REGB4));
1340 /* ../lib/standard/string_search.nit:198 */
1341 REGB1 = REGB4;
1342 } else {
1343 /* ../lib/standard/string_search.nit:196 */
1344 goto label7;
1345 }
1346 }
1347 label7: while(0);
1348 stack_frame_head = fra.me.prev;
1349 return;
1350 }
1351 val_t standard___string_search___Match___string(val_t p0){
1352 struct {struct stack_frame_t me;} fra;
1353 val_t REGB0;
1354 val_t tmp;
1355 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
1356 fra.me.file = LOCATE_standard___string_search;
1357 fra.me.line = 205;
1358 fra.me.meth = LOCATE_standard___string_search___Match___string;
1359 fra.me.has_broke = 0;
1360 fra.me.REG_size = 1;
1361 fra.me.nitni_local_ref_head = NULL;
1362 fra.me.REG[0] = NIT_NULL;
1363 fra.me.REG[0] = p0;
1364 /* ../lib/standard/string_search.nit:205 */
1365 REGB0 = TAG_Bool(ATTR_standard___string_search___Match____string(fra.me.REG[0])!=NIT_NULL);
1366 if (UNTAG_Bool(REGB0)) {
1367 } else {
1368 nit_abort("Uninitialized attribute %s", "_string", LOCATE_standard___string_search, 205);
1369 }
1370 fra.me.REG[0] = ATTR_standard___string_search___Match____string(fra.me.REG[0]);
1371 stack_frame_head = fra.me.prev;
1372 return fra.me.REG[0];
1373 }
1374 val_t standard___string_search___Match___from(val_t p0){
1375 struct {struct stack_frame_t me;} fra;
1376 val_t REGB0;
1377 val_t tmp;
1378 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
1379 fra.me.file = LOCATE_standard___string_search;
1380 fra.me.line = 208;
1381 fra.me.meth = LOCATE_standard___string_search___Match___from;
1382 fra.me.has_broke = 0;
1383 fra.me.REG_size = 1;
1384 fra.me.nitni_local_ref_head = NULL;
1385 fra.me.REG[0] = NIT_NULL;
1386 fra.me.REG[0] = p0;
1387 /* ../lib/standard/string_search.nit:208 */
1388 REGB0 = TAG_Bool(ATTR_standard___string_search___Match____from(fra.me.REG[0])!=NIT_NULL);
1389 if (UNTAG_Bool(REGB0)) {
1390 } else {
1391 nit_abort("Uninitialized attribute %s", "_from", LOCATE_standard___string_search, 208);
1392 }
1393 REGB0 = ATTR_standard___string_search___Match____from(fra.me.REG[0]);
1394 stack_frame_head = fra.me.prev;
1395 return REGB0;
1396 }
1397 val_t standard___string_search___Match___length(val_t p0){
1398 struct {struct stack_frame_t me;} fra;
1399 val_t REGB0;
1400 val_t tmp;
1401 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
1402 fra.me.file = LOCATE_standard___string_search;
1403 fra.me.line = 211;
1404 fra.me.meth = LOCATE_standard___string_search___Match___length;
1405 fra.me.has_broke = 0;
1406 fra.me.REG_size = 1;
1407 fra.me.nitni_local_ref_head = NULL;
1408 fra.me.REG[0] = NIT_NULL;
1409 fra.me.REG[0] = p0;
1410 /* ../lib/standard/string_search.nit:211 */
1411 REGB0 = TAG_Bool(ATTR_standard___string_search___Match____length(fra.me.REG[0])!=NIT_NULL);
1412 if (UNTAG_Bool(REGB0)) {
1413 } else {
1414 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___string_search, 211);
1415 }
1416 REGB0 = ATTR_standard___string_search___Match____length(fra.me.REG[0]);
1417 stack_frame_head = fra.me.prev;
1418 return REGB0;
1419 }
1420 val_t standard___string_search___Match___after(val_t p0){
1421 struct {struct stack_frame_t me;} fra;
1422 val_t REGB0;
1423 val_t REGB1;
1424 val_t tmp;
1425 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
1426 fra.me.file = LOCATE_standard___string_search;
1427 fra.me.line = 214;
1428 fra.me.meth = LOCATE_standard___string_search___Match___after;
1429 fra.me.has_broke = 0;
1430 fra.me.REG_size = 1;
1431 fra.me.nitni_local_ref_head = NULL;
1432 fra.me.REG[0] = NIT_NULL;
1433 fra.me.REG[0] = p0;
1434 /* ../lib/standard/string_search.nit:216 */
1435 REGB0 = TAG_Bool(ATTR_standard___string_search___Match____from(fra.me.REG[0])!=NIT_NULL);
1436 if (UNTAG_Bool(REGB0)) {
1437 } else {
1438 nit_abort("Uninitialized attribute %s", "_from", LOCATE_standard___string_search, 216);
1439 }
1440 REGB0 = ATTR_standard___string_search___Match____from(fra.me.REG[0]);
1441 REGB1 = TAG_Bool(ATTR_standard___string_search___Match____length(fra.me.REG[0])!=NIT_NULL);
1442 if (UNTAG_Bool(REGB1)) {
1443 } else {
1444 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___string_search, 216);
1445 }
1446 REGB1 = ATTR_standard___string_search___Match____length(fra.me.REG[0]);
1447 /* ../lib/standard/kernel.nit:235 */
1448 REGB1 = TAG_Int(UNTAG_Int(REGB0)+UNTAG_Int(REGB1));
1449 /* ../lib/standard/string_search.nit:216 */
1450 goto label1;
1451 label1: while(0);
1452 stack_frame_head = fra.me.prev;
1453 return REGB1;
1454 }
1455 val_t standard___string_search___Match___to_s(val_t p0){
1456 struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
1457 val_t REGB0;
1458 val_t REGB1;
1459 val_t tmp;
1460 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
1461 fra.me.file = LOCATE_standard___string_search;
1462 fra.me.line = 218;
1463 fra.me.meth = LOCATE_standard___string_search___Match___to_s;
1464 fra.me.has_broke = 0;
1465 fra.me.REG_size = 2;
1466 fra.me.nitni_local_ref_head = NULL;
1467 fra.me.REG[0] = NIT_NULL;
1468 fra.me.REG[1] = NIT_NULL;
1469 fra.me.REG[0] = p0;
1470 /* ../lib/standard/string_search.nit:219 */
1471 REGB0 = TAG_Bool(ATTR_standard___string_search___Match____string(fra.me.REG[0])!=NIT_NULL);
1472 if (UNTAG_Bool(REGB0)) {
1473 } else {
1474 nit_abort("Uninitialized attribute %s", "_string", LOCATE_standard___string_search, 219);
1475 }
1476 fra.me.REG[1] = ATTR_standard___string_search___Match____string(fra.me.REG[0]);
1477 REGB0 = TAG_Bool(ATTR_standard___string_search___Match____from(fra.me.REG[0])!=NIT_NULL);
1478 if (UNTAG_Bool(REGB0)) {
1479 } else {
1480 nit_abort("Uninitialized attribute %s", "_from", LOCATE_standard___string_search, 219);
1481 }
1482 REGB0 = ATTR_standard___string_search___Match____from(fra.me.REG[0]);
1483 REGB1 = TAG_Bool(ATTR_standard___string_search___Match____length(fra.me.REG[0])!=NIT_NULL);
1484 if (UNTAG_Bool(REGB1)) {
1485 } else {
1486 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___string_search, 219);
1487 }
1488 REGB1 = ATTR_standard___string_search___Match____length(fra.me.REG[0]);
1489 fra.me.REG[1] = CALL_standard___string___AbstractString___substring(fra.me.REG[1])(fra.me.REG[1], REGB0, REGB1);
1490 goto label1;
1491 label1: while(0);
1492 stack_frame_head = fra.me.prev;
1493 return fra.me.REG[1];
1494 }
1495 void standard___string_search___Match___init(val_t p0, val_t p1, val_t p2, val_t p3, int* init_table){
1496 int itpos1 = VAL2OBJ(p0)->vft[INIT_TABLE_POS_standard___string_search___Match].i;
1497 struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
1498 val_t REGB0;
1499 val_t REGB1;
1500 val_t REGB2;
1501 val_t REGB3;
1502 val_t REGB4;
1503 val_t tmp;
1504 if (init_table[itpos1]) return;
1505 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
1506 fra.me.file = LOCATE_standard___string_search;
1507 fra.me.line = 221;
1508 fra.me.meth = LOCATE_standard___string_search___Match___init;
1509 fra.me.has_broke = 0;
1510 fra.me.REG_size = 2;
1511 fra.me.nitni_local_ref_head = NULL;
1512 fra.me.REG[0] = NIT_NULL;
1513 fra.me.REG[1] = NIT_NULL;
1514 fra.me.REG[0] = p0;
1515 fra.me.REG[1] = p1;
1516 REGB0 = p2;
1517 REGB1 = p3;
1518 /* ../lib/standard/string_search.nit:224 */
1519 REGB2 = TAG_Int(0);
1520 REGB3 = TAG_Bool(VAL_ISA(REGB2, VTCOLOR_standard___kernel___Comparable___OTHER(REGB1), VTID_standard___kernel___Comparable___OTHER(REGB1))) /*cast OTHER*/;
1521 if (UNTAG_Bool(REGB3)) {
1522 } else {
1523 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
1524 }
1525 /* ../lib/standard/kernel.nit:233 */
1526 REGB2 = TAG_Bool(UNTAG_Int(REGB1)>=UNTAG_Int(REGB2));
1527 /* ../lib/standard/string_search.nit:224 */
1528 if (UNTAG_Bool(REGB2)) {
1529 } else {
1530 nit_abort("Assert '%s' failed", "positive_length", LOCATE_standard___string_search, 224);
1531 }
1532 /* ../lib/standard/string_search.nit:225 */
1533 REGB2 = TAG_Int(0);
1534 REGB3 = TAG_Bool(VAL_ISA(REGB2, VTCOLOR_standard___kernel___Comparable___OTHER(REGB0), VTID_standard___kernel___Comparable___OTHER(REGB0))) /*cast OTHER*/;
1535 if (UNTAG_Bool(REGB3)) {
1536 } else {
1537 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
1538 }
1539 /* ../lib/standard/kernel.nit:233 */
1540 REGB2 = TAG_Bool(UNTAG_Int(REGB0)>=UNTAG_Int(REGB2));
1541 /* ../lib/standard/string_search.nit:225 */
1542 if (UNTAG_Bool(REGB2)) {
1543 } else {
1544 nit_abort("Assert '%s' failed", "valid_from", LOCATE_standard___string_search, 225);
1545 }
1546 /* ../lib/standard/kernel.nit:235 */
1547 REGB2 = TAG_Int(UNTAG_Int(REGB0)+UNTAG_Int(REGB1));
1548 /* ../lib/standard/collection/array.nit:24 */
1549 REGB3 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[1])!=NIT_NULL);
1550 if (UNTAG_Bool(REGB3)) {
1551 } else {
1552 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 24);
1553 }
1554 REGB3 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[1]);
1555 REGB4 = TAG_Bool(VAL_ISA(REGB3, VTCOLOR_standard___kernel___Comparable___OTHER(REGB2), VTID_standard___kernel___Comparable___OTHER(REGB2))) /*cast OTHER*/;
1556 if (UNTAG_Bool(REGB4)) {
1557 } else {
1558 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
1559 }
1560 /* ../lib/standard/kernel.nit:231 */
1561 REGB3 = TAG_Bool(UNTAG_Int(REGB2)<=UNTAG_Int(REGB3));
1562 /* ../lib/standard/string_search.nit:226 */
1563 if (UNTAG_Bool(REGB3)) {
1564 } else {
1565 nit_abort("Assert '%s' failed", "valid_after", LOCATE_standard___string_search, 226);
1566 }
1567 /* ../lib/standard/string_search.nit:227 */
1568 ATTR_standard___string_search___Match____string(fra.me.REG[0]) = fra.me.REG[1];
1569 /* ../lib/standard/string_search.nit:228 */
1570 ATTR_standard___string_search___Match____from(fra.me.REG[0]) = REGB0;
1571 /* ../lib/standard/string_search.nit:229 */
1572 ATTR_standard___string_search___Match____length(fra.me.REG[0]) = REGB1;
1573 stack_frame_head = fra.me.prev;
1574 init_table[itpos1] = 1;
1575 return;
1576 }
1577 val_t standard___string_search___Char___search_index_in(val_t p0, val_t p1, val_t p2){
1578 struct {struct stack_frame_t me;} fra;
1579 val_t REGB0;
1580 val_t REGB1;
1581 val_t REGB2;
1582 val_t REGB3;
1583 val_t REGB4;
1584 val_t tmp;
1585 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
1586 fra.me.file = LOCATE_standard___string_search;
1587 fra.me.line = 236;
1588 fra.me.meth = LOCATE_standard___string_search___Char___search_index_in;
1589 fra.me.has_broke = 0;
1590 fra.me.REG_size = 1;
1591 fra.me.nitni_local_ref_head = NULL;
1592 fra.me.REG[0] = NIT_NULL;
1593 REGB0 = p0;
1594 fra.me.REG[0] = p1;
1595 REGB1 = p2;
1596 /* ../lib/standard/collection/array.nit:24 */
1597 REGB2 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL);
1598 if (UNTAG_Bool(REGB2)) {
1599 } else {
1600 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 24);
1601 }
1602 REGB2 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0]);
1603 /* ../lib/standard/string_search.nit:239 */
1604 while(1) {
1605 REGB3 = TAG_Bool(VAL_ISA(REGB2, VTCOLOR_standard___kernel___Comparable___OTHER(REGB1), VTID_standard___kernel___Comparable___OTHER(REGB1))) /*cast OTHER*/;
1606 if (UNTAG_Bool(REGB3)) {
1607 } else {
1608 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
1609 }
1610 /* ../lib/standard/kernel.nit:232 */
1611 REGB3 = TAG_Bool(UNTAG_Int(REGB1)<UNTAG_Int(REGB2));
1612 /* ../lib/standard/string_search.nit:239 */
1613 if (UNTAG_Bool(REGB3)) {
1614 /* ../lib/standard/string_search.nit:240 */
1615 REGB3 = CALL_standard___collection___abstract_collection___SequenceRead_____bra(fra.me.REG[0])(fra.me.REG[0], REGB1);
1616 REGB4 = TAG_Bool(IS_EQUAL_OO(REGB3,REGB0));
1617 if (UNTAG_Bool(REGB4)) {
1618 } else {
1619 /* ../lib/standard/kernel.nit:378 */
1620 REGB3 = TAG_Bool((REGB3)==(REGB0));
1621 /* ../lib/standard/string_search.nit:240 */
1622 REGB4 = REGB3;
1623 }
1624 if (UNTAG_Bool(REGB4)) {
1625 REGB4 = REGB1;
1626 goto label1;
1627 }
1628 /* ../lib/standard/string_search.nit:241 */
1629 REGB3 = TAG_Int(1);
1630 /* ../lib/standard/kernel.nit:235 */
1631 REGB3 = TAG_Int(UNTAG_Int(REGB1)+UNTAG_Int(REGB3));
1632 /* ../lib/standard/string_search.nit:241 */
1633 REGB1 = REGB3;
1634 } else {
1635 /* ../lib/standard/string_search.nit:239 */
1636 goto label2;
1637 }
1638 }
1639 label2: while(0);
1640 /* ../lib/standard/string_search.nit:243 */
1641 REGB1 = TAG_Int(1);
1642 /* ../lib/standard/kernel.nit:236 */
1643 REGB1 = TAG_Int(-UNTAG_Int(REGB1));
1644 /* ../lib/standard/string_search.nit:243 */
1645 REGB4 = REGB1;
1646 goto label1;
1647 label1: while(0);
1648 stack_frame_head = fra.me.prev;
1649 return REGB4;
1650 }
1651 val_t standard___string_search___Char___search_in(val_t p0, val_t p1, val_t p2){
1652 struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
1653 val_t REGB0;
1654 val_t REGB1;
1655 val_t REGB2;
1656 val_t tmp;
1657 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
1658 fra.me.file = LOCATE_standard___string_search;
1659 fra.me.line = 246;
1660 fra.me.meth = LOCATE_standard___string_search___Char___search_in;
1661 fra.me.has_broke = 0;
1662 fra.me.REG_size = 2;
1663 fra.me.nitni_local_ref_head = NULL;
1664 fra.me.REG[0] = NIT_NULL;
1665 fra.me.REG[1] = NIT_NULL;
1666 REGB0 = p0;
1667 fra.me.REG[0] = p1;
1668 REGB1 = p2;
1669 /* ../lib/standard/string_search.nit:248 */
1670 REGB1 = CALL_standard___string_search___Pattern___search_index_in(REGB0)(REGB0, fra.me.REG[0], REGB1);
1671 /* ../lib/standard/string_search.nit:249 */
1672 REGB0 = TAG_Int(0);
1673 REGB2 = TAG_Bool(VAL_ISA(REGB0, VTCOLOR_standard___kernel___Comparable___OTHER(REGB1), VTID_standard___kernel___Comparable___OTHER(REGB1))) /*cast OTHER*/;
1674 if (UNTAG_Bool(REGB2)) {
1675 } else {
1676 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
1677 }
1678 /* ../lib/standard/kernel.nit:232 */
1679 REGB0 = TAG_Bool(UNTAG_Int(REGB1)<UNTAG_Int(REGB0));
1680 /* ../lib/standard/string_search.nit:249 */
1681 if (UNTAG_Bool(REGB0)) {
1682 /* ../lib/standard/string_search.nit:250 */
1683 fra.me.REG[1] = NIT_NULL;
1684 goto label1;
1685 } else {
1686 /* ../lib/standard/string_search.nit:252 */
1687 REGB0 = TAG_Int(1);
1688 fra.me.REG[0] = NEW_Match_standard___string_search___Match___init(fra.me.REG[0], REGB1, REGB0);
1689 fra.me.REG[1] = fra.me.REG[0];
1690 goto label1;
1691 }
1692 label1: while(0);
1693 stack_frame_head = fra.me.prev;
1694 return fra.me.REG[1];
1695 }
1696 val_t standard___string_search___String___search_index_in(val_t p0, val_t p1, val_t p2){
1697 struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
1698 val_t REGB0;
1699 val_t REGB1;
1700 val_t REGB2;
1701 val_t REGB3;
1702 val_t REGB4;
1703 val_t REGB5;
1704 val_t tmp;
1705 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
1706 fra.me.file = LOCATE_standard___string_search;
1707 fra.me.line = 260;
1708 fra.me.meth = LOCATE_standard___string_search___String___search_index_in;
1709 fra.me.has_broke = 0;
1710 fra.me.REG_size = 2;
1711 fra.me.nitni_local_ref_head = NULL;
1712 fra.me.REG[0] = NIT_NULL;
1713 fra.me.REG[1] = NIT_NULL;
1714 fra.me.REG[0] = p0;
1715 fra.me.REG[1] = p1;
1716 REGB0 = p2;
1717 /* ../lib/standard/string_search.nit:262 */
1718 REGB1 = TAG_Int(0);
1719 REGB2 = TAG_Bool(VAL_ISA(REGB1, VTCOLOR_standard___kernel___Comparable___OTHER(REGB0), VTID_standard___kernel___Comparable___OTHER(REGB0))) /*cast OTHER*/;
1720 if (UNTAG_Bool(REGB2)) {
1721 } else {
1722 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
1723 }
1724 /* ../lib/standard/kernel.nit:233 */
1725 REGB1 = TAG_Bool(UNTAG_Int(REGB0)>=UNTAG_Int(REGB1));
1726 /* ../lib/standard/string_search.nit:262 */
1727 if (UNTAG_Bool(REGB1)) {
1728 } else {
1729 nit_abort("Assert failed", NULL, LOCATE_standard___string_search, 262);
1730 }
1731 /* ../lib/standard/collection/array.nit:24 */
1732 REGB1 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[1])!=NIT_NULL);
1733 if (UNTAG_Bool(REGB1)) {
1734 } else {
1735 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 24);
1736 }
1737 REGB1 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[1]);
1738 REGB2 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL);
1739 if (UNTAG_Bool(REGB2)) {
1740 } else {
1741 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 24);
1742 }
1743 REGB2 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0]);
1744 /* ../lib/standard/kernel.nit:237 */
1745 REGB2 = TAG_Int(UNTAG_Int(REGB1)-UNTAG_Int(REGB2));
1746 /* ../lib/standard/string_search.nit:263 */
1747 REGB1 = TAG_Int(1);
1748 /* ../lib/standard/kernel.nit:235 */
1749 REGB1 = TAG_Int(UNTAG_Int(REGB2)+UNTAG_Int(REGB1));
1750 /* ../lib/standard/string_search.nit:264 */
1751 while(1) {
1752 REGB2 = TAG_Bool(VAL_ISA(REGB1, VTCOLOR_standard___kernel___Comparable___OTHER(REGB0), VTID_standard___kernel___Comparable___OTHER(REGB0))) /*cast OTHER*/;
1753 if (UNTAG_Bool(REGB2)) {
1754 } else {
1755 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
1756 }
1757 /* ../lib/standard/kernel.nit:232 */
1758 REGB2 = TAG_Bool(UNTAG_Int(REGB0)<UNTAG_Int(REGB1));
1759 /* ../lib/standard/string_search.nit:264 */
1760 if (UNTAG_Bool(REGB2)) {
1761 /* ../lib/standard/collection/array.nit:24 */
1762 REGB2 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL);
1763 if (UNTAG_Bool(REGB2)) {
1764 } else {
1765 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 24);
1766 }
1767 REGB2 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0]);
1768 /* ../lib/standard/string_search.nit:265 */
1769 REGB3 = TAG_Int(1);
1770 /* ../lib/standard/kernel.nit:237 */
1771 REGB3 = TAG_Int(UNTAG_Int(REGB2)-UNTAG_Int(REGB3));
1772 /* ../lib/standard/string_search.nit:266 */
1773 while(1) {
1774 REGB2 = TAG_Int(0);
1775 REGB4 = TAG_Bool(VAL_ISA(REGB2, VTCOLOR_standard___kernel___Comparable___OTHER(REGB3), VTID_standard___kernel___Comparable___OTHER(REGB3))) /*cast OTHER*/;
1776 if (UNTAG_Bool(REGB4)) {
1777 } else {
1778 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
1779 }
1780 /* ../lib/standard/kernel.nit:233 */
1781 REGB2 = TAG_Bool(UNTAG_Int(REGB3)>=UNTAG_Int(REGB2));
1782 /* ../lib/standard/string_search.nit:266 */
1783 if (UNTAG_Bool(REGB2)) {
1784 REGB2 = CALL_standard___collection___abstract_collection___SequenceRead_____bra(fra.me.REG[0])(fra.me.REG[0], REGB3);
1785 /* ../lib/standard/kernel.nit:235 */
1786 REGB4 = TAG_Int(UNTAG_Int(REGB3)+UNTAG_Int(REGB0));
1787 /* ../lib/standard/string_search.nit:266 */
1788 REGB4 = CALL_standard___collection___abstract_collection___SequenceRead_____bra(fra.me.REG[1])(fra.me.REG[1], REGB4);
1789 REGB5 = TAG_Bool(IS_EQUAL_OO(REGB2,REGB4));
1790 if (UNTAG_Bool(REGB5)) {
1791 } else {
1792 /* ../lib/standard/kernel.nit:378 */
1793 REGB4 = TAG_Bool((REGB2)==(REGB4));
1794 /* ../lib/standard/string_search.nit:266 */
1795 REGB5 = REGB4;
1796 }
1797 } else {
1798 REGB4 = TAG_Bool(false);
1799 REGB5 = REGB4;
1800 }
1801 if (UNTAG_Bool(REGB5)) {
1802 REGB5 = TAG_Int(1);
1803 /* ../lib/standard/kernel.nit:237 */
1804 REGB5 = TAG_Int(UNTAG_Int(REGB3)-UNTAG_Int(REGB5));
1805 /* ../lib/standard/string_search.nit:266 */
1806 REGB3 = REGB5;
1807 } else {
1808 goto label1;
1809 }
1810 }
1811 label1: while(0);
1812 /* ../lib/standard/string_search.nit:268 */
1813 REGB5 = TAG_Int(0);
1814 REGB4 = TAG_Bool(VAL_ISA(REGB5, VTCOLOR_standard___kernel___Comparable___OTHER(REGB3), VTID_standard___kernel___Comparable___OTHER(REGB3))) /*cast OTHER*/;
1815 if (UNTAG_Bool(REGB4)) {
1816 } else {
1817 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
1818 }
1819 /* ../lib/standard/kernel.nit:232 */
1820 REGB5 = TAG_Bool(UNTAG_Int(REGB3)<UNTAG_Int(REGB5));
1821 /* ../lib/standard/string_search.nit:268 */
1822 if (UNTAG_Bool(REGB5)) {
1823 REGB5 = REGB0;
1824 goto label2;
1825 }
1826 /* ../lib/standard/string_search.nit:270 */
1827 REGB3 = TAG_Int(1);
1828 /* ../lib/standard/kernel.nit:235 */
1829 REGB3 = TAG_Int(UNTAG_Int(REGB0)+UNTAG_Int(REGB3));
1830 /* ../lib/standard/string_search.nit:270 */
1831 REGB0 = REGB3;
1832 } else {
1833 /* ../lib/standard/string_search.nit:264 */
1834 goto label3;
1835 }
1836 }
1837 label3: while(0);
1838 /* ../lib/standard/string_search.nit:272 */
1839 REGB0 = TAG_Int(1);
1840 /* ../lib/standard/kernel.nit:236 */
1841 REGB0 = TAG_Int(-UNTAG_Int(REGB0));
1842 /* ../lib/standard/string_search.nit:272 */
1843 REGB5 = REGB0;
1844 goto label2;
1845 label2: while(0);
1846 stack_frame_head = fra.me.prev;
1847 return REGB5;
1848 }
1849 val_t standard___string_search___String___search_in(val_t p0, val_t p1, val_t p2){
1850 struct {struct stack_frame_t me; val_t MORE_REG[2];} fra;
1851 val_t REGB0;
1852 val_t REGB1;
1853 val_t REGB2;
1854 val_t tmp;
1855 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
1856 fra.me.file = LOCATE_standard___string_search;
1857 fra.me.line = 275;
1858 fra.me.meth = LOCATE_standard___string_search___String___search_in;
1859 fra.me.has_broke = 0;
1860 fra.me.REG_size = 3;
1861 fra.me.nitni_local_ref_head = NULL;
1862 fra.me.REG[0] = NIT_NULL;
1863 fra.me.REG[1] = NIT_NULL;
1864 fra.me.REG[2] = NIT_NULL;
1865 fra.me.REG[0] = p0;
1866 fra.me.REG[1] = p1;
1867 REGB0 = p2;
1868 /* ../lib/standard/string_search.nit:277 */
1869 REGB0 = CALL_standard___string_search___Pattern___search_index_in(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1], REGB0);
1870 /* ../lib/standard/string_search.nit:278 */
1871 REGB1 = TAG_Int(0);
1872 REGB2 = TAG_Bool(VAL_ISA(REGB1, VTCOLOR_standard___kernel___Comparable___OTHER(REGB0), VTID_standard___kernel___Comparable___OTHER(REGB0))) /*cast OTHER*/;
1873 if (UNTAG_Bool(REGB2)) {
1874 } else {
1875 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
1876 }
1877 /* ../lib/standard/kernel.nit:232 */
1878 REGB1 = TAG_Bool(UNTAG_Int(REGB0)<UNTAG_Int(REGB1));
1879 /* ../lib/standard/string_search.nit:278 */
1880 if (UNTAG_Bool(REGB1)) {
1881 /* ../lib/standard/string_search.nit:279 */
1882 fra.me.REG[2] = NIT_NULL;
1883 goto label1;
1884 } else {
1885 /* ../lib/standard/collection/array.nit:24 */
1886 REGB1 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL);
1887 if (UNTAG_Bool(REGB1)) {
1888 } else {
1889 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 24);
1890 }
1891 REGB1 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0]);
1892 /* ../lib/standard/string_search.nit:281 */
1893 fra.me.REG[1] = NEW_Match_standard___string_search___Match___init(fra.me.REG[1], REGB0, REGB1);
1894 fra.me.REG[2] = fra.me.REG[1];
1895 goto label1;
1896 }
1897 label1: while(0);
1898 stack_frame_head = fra.me.prev;
1899 return fra.me.REG[2];
1900 }
1901 val_t standard___string_search___String___search(val_t p0, val_t p1){
1902 struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
1903 val_t REGB0;
1904 val_t tmp;
1905 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
1906 fra.me.file = LOCATE_standard___string_search;
1907 fra.me.line = 285;
1908 fra.me.meth = LOCATE_standard___string_search___String___search;
1909 fra.me.has_broke = 0;
1910 fra.me.REG_size = 2;
1911 fra.me.nitni_local_ref_head = NULL;
1912 fra.me.REG[0] = NIT_NULL;
1913 fra.me.REG[1] = NIT_NULL;
1914 fra.me.REG[0] = p0;
1915 fra.me.REG[1] = p1;
1916 /* ../lib/standard/string_search.nit:286 */
1917 REGB0 = TAG_Int(0);
1918 fra.me.REG[0] = CALL_standard___string_search___Pattern___search_in(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[0], REGB0);
1919 goto label1;
1920 label1: while(0);
1921 stack_frame_head = fra.me.prev;
1922 return fra.me.REG[0];
1923 }
1924 val_t standard___string_search___String___search_from(val_t p0, val_t p1, val_t p2){
1925 struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
1926 val_t REGB0;
1927 val_t tmp;
1928 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
1929 fra.me.file = LOCATE_standard___string_search;
1930 fra.me.line = 288;
1931 fra.me.meth = LOCATE_standard___string_search___String___search_from;
1932 fra.me.has_broke = 0;
1933 fra.me.REG_size = 2;
1934 fra.me.nitni_local_ref_head = NULL;
1935 fra.me.REG[0] = NIT_NULL;
1936 fra.me.REG[1] = NIT_NULL;
1937 fra.me.REG[0] = p0;
1938 fra.me.REG[1] = p1;
1939 REGB0 = p2;
1940 /* ../lib/standard/string_search.nit:291 */
1941 fra.me.REG[0] = CALL_standard___string_search___Pattern___search_in(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[0], REGB0);
1942 goto label1;
1943 label1: while(0);
1944 stack_frame_head = fra.me.prev;
1945 return fra.me.REG[0];
1946 }
1947 val_t standard___string_search___String___search_all(val_t p0, val_t p1){
1948 struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
1949 val_t tmp;
1950 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
1951 fra.me.file = LOCATE_standard___string_search;
1952 fra.me.line = 293;
1953 fra.me.meth = LOCATE_standard___string_search___String___search_all;
1954 fra.me.has_broke = 0;
1955 fra.me.REG_size = 2;
1956 fra.me.nitni_local_ref_head = NULL;
1957 fra.me.REG[0] = NIT_NULL;
1958 fra.me.REG[1] = NIT_NULL;
1959 fra.me.REG[0] = p0;
1960 fra.me.REG[1] = p1;
1961 /* ../lib/standard/string_search.nit:300 */
1962 fra.me.REG[0] = CALL_standard___string_search___Pattern___search_all_in(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[0]);
1963 goto label1;
1964 label1: while(0);
1965 stack_frame_head = fra.me.prev;
1966 return fra.me.REG[0];
1967 }
1968 val_t standard___string_search___String___split_with(val_t p0, val_t p1){
1969 struct {struct stack_frame_t me; val_t MORE_REG[3];} fra;
1970 val_t REGB0;
1971 val_t REGB1;
1972 val_t REGB2;
1973 val_t tmp;
1974 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
1975 fra.me.file = LOCATE_standard___string_search;
1976 fra.me.line = 302;
1977 fra.me.meth = LOCATE_standard___string_search___String___split_with;
1978 fra.me.has_broke = 0;
1979 fra.me.REG_size = 4;
1980 fra.me.nitni_local_ref_head = NULL;
1981 fra.me.REG[0] = NIT_NULL;
1982 fra.me.REG[1] = NIT_NULL;
1983 fra.me.REG[2] = NIT_NULL;
1984 fra.me.REG[3] = NIT_NULL;
1985 fra.me.REG[0] = p0;
1986 fra.me.REG[1] = p1;
1987 /* ../lib/standard/string_search.nit:306 */
1988 fra.me.REG[0] = CALL_standard___string_search___Pattern___split_in(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[0]);
1989 /* ../lib/standard/collection/array.nit:24 */
1990 REGB0 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL);
1991 if (UNTAG_Bool(REGB0)) {
1992 } else {
1993 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 24);
1994 }
1995 REGB0 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0]);
1996 /* ../lib/standard/string_search.nit:307 */
1997 fra.me.REG[1] = NEW_Array_standard___collection___array___Array___with_capacity(REGB0);
1998 /* ../lib/standard/collection/array.nit:269 */
1999 REGB0 = TAG_Int(0);
2000 /* ../lib/standard/collection/array.nit:270 */
2001 REGB1 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL);
2002 if (UNTAG_Bool(REGB1)) {
2003 } else {
2004 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 270);
2005 }
2006 REGB1 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0]);
2007 /* ../lib/standard/collection/array.nit:271 */
2008 fra.me.REG[2] = ATTR_standard___collection___array___Array____items(fra.me.REG[0]);
2009 /* ../lib/standard/collection/array.nit:272 */
2010 while(1) {
2011 /* ../lib/standard/collection/array.nit:24 */
2012 REGB1 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL);
2013 if (UNTAG_Bool(REGB1)) {
2014 } else {
2015 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 24);
2016 }
2017 REGB1 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0]);
2018 REGB2 = TAG_Bool(VAL_ISA(REGB1, VTCOLOR_standard___kernel___Comparable___OTHER(REGB0), VTID_standard___kernel___Comparable___OTHER(REGB0))) /*cast OTHER*/;
2019 if (UNTAG_Bool(REGB2)) {
2020 } else {
2021 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
2022 }
2023 /* ../lib/standard/kernel.nit:232 */
2024 REGB1 = TAG_Bool(UNTAG_Int(REGB0)<UNTAG_Int(REGB1));
2025 /* ../lib/standard/collection/array.nit:272 */
2026 if (UNTAG_Bool(REGB1)) {
2027 /* ../lib/standard/collection/array.nit:273 */
2028 REGB1 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
2029 if (UNTAG_Bool(REGB1)) {
2030 nit_abort("Reciever is null", NULL, LOCATE_standard___collection___array, 273);
2031 }
2032 /* ../lib/standard/collection/array.nit:718 */
2033 fra.me.REG[3] = ((Nit_NativeArray)fra.me.REG[2])->val[UNTAG_Int(REGB0)];
2034 /* ../lib/standard/string_search.nit:308 */
2035 fra.me.REG[3] = CALL_standard___string___Object___to_s(fra.me.REG[3])(fra.me.REG[3]);
2036 CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[3]);
2037 /* ../lib/standard/collection/array.nit:274 */
2038 REGB1 = TAG_Int(1);
2039 /* ../lib/standard/kernel.nit:235 */
2040 REGB1 = TAG_Int(UNTAG_Int(REGB0)+UNTAG_Int(REGB1));
2041 /* ../lib/standard/collection/array.nit:274 */
2042 REGB0 = REGB1;
2043 } else {
2044 /* ../lib/standard/collection/array.nit:272 */
2045 goto label1;
2046 }
2047 }
2048 label1: while(0);
2049 /* ../lib/standard/string_search.nit:309 */
2050 goto label2;
2051 label2: while(0);
2052 stack_frame_head = fra.me.prev;
2053 return fra.me.REG[1];
2054 }
2055 val_t standard___string_search___String___split(val_t p0){
2056 struct {struct stack_frame_t me;} fra;
2057 val_t REGB0;
2058 val_t tmp;
2059 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
2060 fra.me.file = LOCATE_standard___string_search;
2061 fra.me.line = 312;
2062 fra.me.meth = LOCATE_standard___string_search___String___split;
2063 fra.me.has_broke = 0;
2064 fra.me.REG_size = 1;
2065 fra.me.nitni_local_ref_head = NULL;
2066 fra.me.REG[0] = NIT_NULL;
2067 fra.me.REG[0] = p0;
2068 /* ../lib/standard/string_search.nit:314 */
2069 REGB0 = TAG_Char('\n');
2070 fra.me.REG[0] = CALL_standard___string_search___String___split_with(fra.me.REG[0])(fra.me.REG[0], REGB0);
2071 goto label1;
2072 label1: while(0);
2073 stack_frame_head = fra.me.prev;
2074 return fra.me.REG[0];
2075 }
2076 val_t standard___string_search___String___replace(val_t p0, val_t p1, val_t p2){
2077 struct {struct stack_frame_t me; val_t MORE_REG[2];} fra;
2078 val_t tmp;
2079 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
2080 fra.me.file = LOCATE_standard___string_search;
2081 fra.me.line = 316;
2082 fra.me.meth = LOCATE_standard___string_search___String___replace;
2083 fra.me.has_broke = 0;
2084 fra.me.REG_size = 3;
2085 fra.me.nitni_local_ref_head = NULL;
2086 fra.me.REG[0] = NIT_NULL;
2087 fra.me.REG[1] = NIT_NULL;
2088 fra.me.REG[2] = NIT_NULL;
2089 fra.me.REG[0] = p0;
2090 fra.me.REG[1] = p1;
2091 fra.me.REG[2] = p2;
2092 /* ../lib/standard/string_search.nit:322 */
2093 fra.me.REG[1] = CALL_standard___string_search___String___split_with(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1]);
2094 fra.me.REG[2] = CALL_standard___string___Collection___join(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[2]);
2095 goto label1;
2096 label1: while(0);
2097 stack_frame_head = fra.me.prev;
2098 return fra.me.REG[2];
2099 }
2100 val_t standard___string_search___String___html_escape(val_t p0){
2101 struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
2102 val_t REGB0;
2103 val_t REGB1;
2104 val_t tmp;
2105 static val_t once_value_1; /* Once value */
2106 static val_t once_value_2; /* Once value */
2107 static val_t once_value_3; /* Once value */
2108 static val_t once_value_4; /* Once value */
2109 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
2110 fra.me.file = LOCATE_standard___string_search;
2111 fra.me.line = 325;
2112 fra.me.meth = LOCATE_standard___string_search___String___html_escape;
2113 fra.me.has_broke = 0;
2114 fra.me.REG_size = 2;
2115 fra.me.nitni_local_ref_head = NULL;
2116 fra.me.REG[0] = NIT_NULL;
2117 fra.me.REG[1] = NIT_NULL;
2118 fra.me.REG[0] = p0;
2119 /* ../lib/standard/string_search.nit:331 */
2120 REGB0 = TAG_Char('&');
2121 REGB0 = CALL_standard___collection___abstract_collection___Collection___has(fra.me.REG[0])(fra.me.REG[0], REGB0);
2122 if (UNTAG_Bool(REGB0)) {
2123 REGB0 = TAG_Char('&');
2124 if (!once_value_1) {
2125 fra.me.REG[1] = BOX_NativeString("&amp;");
2126 REGB1 = TAG_Int(5);
2127 fra.me.REG[1] = NEW_String_standard___string___String___with_native(fra.me.REG[1], REGB1);
2128 once_value_1 = fra.me.REG[1];
2129 register_static_object(&once_value_1);
2130 } else fra.me.REG[1] = once_value_1;
2131 fra.me.REG[1] = fra.me.REG[1];
2132 fra.me.REG[1] = CALL_standard___string_search___String___replace(fra.me.REG[0])(fra.me.REG[0], REGB0, fra.me.REG[1]);
2133 fra.me.REG[0] = fra.me.REG[1];
2134 }
2135 /* ../lib/standard/string_search.nit:332 */
2136 REGB0 = TAG_Char('<');
2137 REGB0 = CALL_standard___collection___abstract_collection___Collection___has(fra.me.REG[0])(fra.me.REG[0], REGB0);
2138 if (UNTAG_Bool(REGB0)) {
2139 REGB0 = TAG_Char('<');
2140 if (!once_value_2) {
2141 fra.me.REG[1] = BOX_NativeString("&lt;");
2142 REGB1 = TAG_Int(4);
2143 fra.me.REG[1] = NEW_String_standard___string___String___with_native(fra.me.REG[1], REGB1);
2144 once_value_2 = fra.me.REG[1];
2145 register_static_object(&once_value_2);
2146 } else fra.me.REG[1] = once_value_2;
2147 fra.me.REG[1] = fra.me.REG[1];
2148 fra.me.REG[1] = CALL_standard___string_search___String___replace(fra.me.REG[0])(fra.me.REG[0], REGB0, fra.me.REG[1]);
2149 fra.me.REG[0] = fra.me.REG[1];
2150 }
2151 /* ../lib/standard/string_search.nit:333 */
2152 REGB0 = TAG_Char('>');
2153 REGB0 = CALL_standard___collection___abstract_collection___Collection___has(fra.me.REG[0])(fra.me.REG[0], REGB0);
2154 if (UNTAG_Bool(REGB0)) {
2155 REGB0 = TAG_Char('>');
2156 if (!once_value_3) {
2157 fra.me.REG[1] = BOX_NativeString("&gt;");
2158 REGB1 = TAG_Int(4);
2159 fra.me.REG[1] = NEW_String_standard___string___String___with_native(fra.me.REG[1], REGB1);
2160 once_value_3 = fra.me.REG[1];
2161 register_static_object(&once_value_3);
2162 } else fra.me.REG[1] = once_value_3;
2163 fra.me.REG[1] = fra.me.REG[1];
2164 fra.me.REG[1] = CALL_standard___string_search___String___replace(fra.me.REG[0])(fra.me.REG[0], REGB0, fra.me.REG[1]);
2165 fra.me.REG[0] = fra.me.REG[1];
2166 }
2167 /* ../lib/standard/string_search.nit:334 */
2168 REGB0 = TAG_Char('"');
2169 REGB0 = CALL_standard___collection___abstract_collection___Collection___has(fra.me.REG[0])(fra.me.REG[0], REGB0);
2170 if (UNTAG_Bool(REGB0)) {
2171 REGB0 = TAG_Char('"');
2172 if (!once_value_4) {
2173 fra.me.REG[1] = BOX_NativeString("&quot;");
2174 REGB1 = TAG_Int(6);
2175 fra.me.REG[1] = NEW_String_standard___string___String___with_native(fra.me.REG[1], REGB1);
2176 once_value_4 = fra.me.REG[1];
2177 register_static_object(&once_value_4);
2178 } else fra.me.REG[1] = once_value_4;
2179 fra.me.REG[1] = fra.me.REG[1];
2180 fra.me.REG[1] = CALL_standard___string_search___String___replace(fra.me.REG[0])(fra.me.REG[0], REGB0, fra.me.REG[1]);
2181 fra.me.REG[0] = fra.me.REG[1];
2182 }
2183 /* ../lib/standard/string_search.nit:335 */
2184 goto label5;
2185 label5: while(0);
2186 stack_frame_head = fra.me.prev;
2187 return fra.me.REG[0];
2188 }