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