ni_nitdoc: simplified github option
[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:247 */
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:247 */
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:243 */
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:247 */
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:245 */
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:242 */
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:247 */
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:243 */
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:245 */
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:434 */
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:247 */
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:242 */
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:279 */
356 REGB5 = REGB4;
357 /* ../lib/standard/collection/array.nit:281 */
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:243 */
365 REGB3 = TAG_Bool(UNTAG_Int(REGB5)>=UNTAG_Int(REGB3));
366 /* ../lib/standard/collection/array.nit:281 */
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, 281);
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:242 */
380 REGB3 = TAG_Bool(UNTAG_Int(REGB5)<UNTAG_Int(REGB3));
381 } else {
382 /* ../lib/standard/collection/array.nit:281 */
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, 281);
389 }
390 /* ../lib/standard/collection/array.nit:282 */
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, 282);
395 }
396 /* ../lib/standard/collection/array.nit:725 */
397 fra.me.REG[2] = ((Nit_NativeArray)fra.me.REG[2])->val[UNTAG_Int(REGB5)];
398 /* ../lib/standard/collection/array.nit:282 */
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:245 */
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:247 */
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:245 */
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:244 */
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:245 */
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:245 */
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:246 */
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:242 */
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:247 */
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:242 */
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:247 */
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:247 */
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:245 */
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:247 */
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:247 */
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:243 */
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:244 */
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:245 */
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:247 */
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:279 */
762 fra.me.REG[2] = fra.me.REG[0];
763 /* ../lib/standard/collection/array.nit:281 */
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:243 */
771 REGB4 = TAG_Bool(UNTAG_Int(REGB5)>=UNTAG_Int(REGB4));
772 /* ../lib/standard/collection/array.nit:281 */
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, 281);
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:242 */
786 REGB4 = TAG_Bool(UNTAG_Int(REGB5)<UNTAG_Int(REGB4));
787 } else {
788 /* ../lib/standard/collection/array.nit:281 */
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, 281);
795 }
796 /* ../lib/standard/collection/array.nit:282 */
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, 282);
801 }
802 /* ../lib/standard/collection/array.nit:725 */
803 fra.me.REG[2] = ((Nit_NativeArray)fra.me.REG[2])->val[UNTAG_Int(REGB5)];
804 /* ../lib/standard/collection/array.nit:282 */
805 goto label1;
806 label1: while(0);
807 /* ../lib/standard/kernel.nit:247 */
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:242 */
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:245 */
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:247 */
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:279 */
835 fra.me.REG[2] = fra.me.REG[0];
836 /* ../lib/standard/collection/array.nit:281 */
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:243 */
844 REGB5 = TAG_Bool(UNTAG_Int(REGB4)>=UNTAG_Int(REGB5));
845 /* ../lib/standard/collection/array.nit:281 */
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, 281);
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:242 */
859 REGB5 = TAG_Bool(UNTAG_Int(REGB4)<UNTAG_Int(REGB5));
860 } else {
861 /* ../lib/standard/collection/array.nit:281 */
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, 281);
868 }
869 /* ../lib/standard/collection/array.nit:282 */
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, 282);
874 }
875 /* ../lib/standard/collection/array.nit:725 */
876 fra.me.REG[2] = ((Nit_NativeArray)fra.me.REG[2])->val[UNTAG_Int(REGB4)];
877 /* ../lib/standard/collection/array.nit:282 */
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:242 */
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:243 */
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:245 */
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:247 */
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:434 */
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:247 */
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:247 */
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:247 */
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:242 */
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:245 */
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:247 */
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:246 */
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:243 */
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:246 */
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:237 */
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:279 */
1075 fra.me.REG[2] = fra.me.REG[1];
1076 REGB3 = REGB1;
1077 /* ../lib/standard/collection/array.nit:281 */
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:243 */
1085 REGB5 = TAG_Bool(UNTAG_Int(REGB3)>=UNTAG_Int(REGB5));
1086 /* ../lib/standard/collection/array.nit:281 */
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, 281);
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:242 */
1100 REGB5 = TAG_Bool(UNTAG_Int(REGB3)<UNTAG_Int(REGB5));
1101 } else {
1102 /* ../lib/standard/collection/array.nit:281 */
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, 281);
1109 }
1110 /* ../lib/standard/collection/array.nit:282 */
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, 282);
1115 }
1116 /* ../lib/standard/collection/array.nit:725 */
1117 fra.me.REG[2] = ((Nit_NativeArray)fra.me.REG[2])->val[UNTAG_Int(REGB3)];
1118 /* ../lib/standard/collection/array.nit:282 */
1119 goto label2;
1120 label2: while(0);
1121 /* ../lib/standard/string_search.nit:186 */
1122 REGB3 = TAG_Int(1);
1123 /* ../lib/standard/kernel.nit:245 */
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:237 */
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:247 */
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:242 */
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:279 */
1166 REGB4 = REGB2;
1167 /* ../lib/standard/collection/array.nit:281 */
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:243 */
1175 REGB5 = TAG_Bool(UNTAG_Int(REGB4)>=UNTAG_Int(REGB5));
1176 /* ../lib/standard/collection/array.nit:281 */
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, 281);
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:242 */
1190 REGB5 = TAG_Bool(UNTAG_Int(REGB4)<UNTAG_Int(REGB5));
1191 } else {
1192 /* ../lib/standard/collection/array.nit:281 */
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, 281);
1199 }
1200 /* ../lib/standard/collection/array.nit:282 */
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, 282);
1205 }
1206 /* ../lib/standard/collection/array.nit:725 */
1207 fra.me.REG[2] = ((Nit_NativeArray)fra.me.REG[2])->val[UNTAG_Int(REGB4)];
1208 /* ../lib/standard/collection/array.nit:282 */
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:237 */
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:247 */
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:245 */
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:247 */
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:247 */
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:242 */
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:247 */
1291 REGB2 = TAG_Int(UNTAG_Int(REGB0)-UNTAG_Int(REGB2));
1292 /* ../lib/standard/collection/array.nit:279 */
1293 fra.me.REG[3] = fra.me.REG[1];
1294 REGB4 = REGB1;
1295 /* ../lib/standard/collection/array.nit:281 */
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:243 */
1303 REGB5 = TAG_Bool(UNTAG_Int(REGB4)>=UNTAG_Int(REGB5));
1304 /* ../lib/standard/collection/array.nit:281 */
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, 281);
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:242 */
1318 REGB5 = TAG_Bool(UNTAG_Int(REGB4)<UNTAG_Int(REGB5));
1319 } else {
1320 /* ../lib/standard/collection/array.nit:281 */
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, 281);
1327 }
1328 /* ../lib/standard/collection/array.nit:282 */
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, 282);
1333 }
1334 /* ../lib/standard/collection/array.nit:725 */
1335 fra.me.REG[3] = ((Nit_NativeArray)fra.me.REG[3])->val[UNTAG_Int(REGB4)];
1336 /* ../lib/standard/collection/array.nit:282 */
1337 goto label6;
1338 label6: while(0);
1339 /* ../lib/standard/kernel.nit:247 */
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:247 */
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:245 */
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___BM_Pattern___hash[] = "string_search::BM_Pattern::(hash::Object::hash)";
1364 val_t standard___string_search___BM_Pattern___hash(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 = 201;
1371 fra.me.meth = LOCATE_standard___string_search___BM_Pattern___hash;
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:201 */
1378 REGB0 = TAG_Bool(ATTR_standard___string_search___BM_Pattern____motif(fra.me.REG[0])!=NIT_NULL);
1379 if (UNTAG_Bool(REGB0)) {
1380 } else {
1381 nit_abort("Uninitialized attribute %s", "_motif", LOCATE_standard___string_search, 201);
1382 }
1383 fra.me.REG[0] = ATTR_standard___string_search___BM_Pattern____motif(fra.me.REG[0]);
1384 REGB0 = CALL_standard___hash___Object___hash(fra.me.REG[0])(fra.me.REG[0]);
1385 goto label1;
1386 label1: while(0);
1387 stack_frame_head = fra.me.prev;
1388 return REGB0;
1389 }
1390 static const char LOCATE_standard___string_search___BM_Pattern_____eqeq[] = "string_search::BM_Pattern::(kernel::Object::==)";
1391 val_t standard___string_search___BM_Pattern_____eqeq(val_t p0, val_t p1){
1392 struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
1393 val_t REGB0;
1394 val_t REGB1;
1395 val_t tmp;
1396 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
1397 fra.me.file = LOCATE_standard___string_search;
1398 fra.me.line = 202;
1399 fra.me.meth = LOCATE_standard___string_search___BM_Pattern_____eqeq;
1400 fra.me.has_broke = 0;
1401 fra.me.REG_size = 2;
1402 fra.me.nitni_local_ref_head = NULL;
1403 fra.me.REG[0] = NIT_NULL;
1404 fra.me.REG[1] = NIT_NULL;
1405 fra.me.REG[0] = p0;
1406 fra.me.REG[1] = p1;
1407 /* ../lib/standard/string_search.nit:202 */
1408 REGB0 = TAG_Bool((fra.me.REG[1]!=NIT_NULL) && VAL_ISA(fra.me.REG[1], COLOR_standard___string_search___BM_Pattern, ID_standard___string_search___BM_Pattern)) /*cast BM_Pattern*/;
1409 if (UNTAG_Bool(REGB0)) {
1410 REGB0 = TAG_Bool(ATTR_standard___string_search___BM_Pattern____motif(fra.me.REG[1])!=NIT_NULL);
1411 if (UNTAG_Bool(REGB0)) {
1412 } else {
1413 nit_abort("Uninitialized attribute %s", "_motif", LOCATE_standard___string_search, 202);
1414 }
1415 fra.me.REG[1] = ATTR_standard___string_search___BM_Pattern____motif(fra.me.REG[1]);
1416 REGB0 = TAG_Bool(ATTR_standard___string_search___BM_Pattern____motif(fra.me.REG[0])!=NIT_NULL);
1417 if (UNTAG_Bool(REGB0)) {
1418 } else {
1419 nit_abort("Uninitialized attribute %s", "_motif", LOCATE_standard___string_search, 202);
1420 }
1421 fra.me.REG[0] = ATTR_standard___string_search___BM_Pattern____motif(fra.me.REG[0]);
1422 REGB0 = TAG_Bool(IS_EQUAL_OO(fra.me.REG[1],fra.me.REG[0]));
1423 if (UNTAG_Bool(REGB0)) {
1424 } else {
1425 REGB1 = CALL_standard___kernel___Object_____eqeq(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[0]);
1426 REGB0 = REGB1;
1427 }
1428 } else {
1429 REGB1 = TAG_Bool(0);
1430 REGB0 = REGB1;
1431 }
1432 goto label1;
1433 label1: while(0);
1434 stack_frame_head = fra.me.prev;
1435 return REGB0;
1436 }
1437 static const char LOCATE_standard___string_search___Match___string[] = "string_search::Match::string";
1438 val_t standard___string_search___Match___string(val_t p0){
1439 struct {struct stack_frame_t me;} fra;
1440 val_t REGB0;
1441 val_t tmp;
1442 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
1443 fra.me.file = LOCATE_standard___string_search;
1444 fra.me.line = 207;
1445 fra.me.meth = LOCATE_standard___string_search___Match___string;
1446 fra.me.has_broke = 0;
1447 fra.me.REG_size = 1;
1448 fra.me.nitni_local_ref_head = NULL;
1449 fra.me.REG[0] = NIT_NULL;
1450 fra.me.REG[0] = p0;
1451 /* ../lib/standard/string_search.nit:207 */
1452 REGB0 = TAG_Bool(ATTR_standard___string_search___Match____string(fra.me.REG[0])!=NIT_NULL);
1453 if (UNTAG_Bool(REGB0)) {
1454 } else {
1455 nit_abort("Uninitialized attribute %s", "_string", LOCATE_standard___string_search, 207);
1456 }
1457 fra.me.REG[0] = ATTR_standard___string_search___Match____string(fra.me.REG[0]);
1458 stack_frame_head = fra.me.prev;
1459 return fra.me.REG[0];
1460 }
1461 static const char LOCATE_standard___string_search___Match___from[] = "string_search::Match::from";
1462 val_t standard___string_search___Match___from(val_t p0){
1463 struct {struct stack_frame_t me;} fra;
1464 val_t REGB0;
1465 val_t tmp;
1466 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
1467 fra.me.file = LOCATE_standard___string_search;
1468 fra.me.line = 210;
1469 fra.me.meth = LOCATE_standard___string_search___Match___from;
1470 fra.me.has_broke = 0;
1471 fra.me.REG_size = 1;
1472 fra.me.nitni_local_ref_head = NULL;
1473 fra.me.REG[0] = NIT_NULL;
1474 fra.me.REG[0] = p0;
1475 /* ../lib/standard/string_search.nit:210 */
1476 REGB0 = TAG_Bool(ATTR_standard___string_search___Match____from(fra.me.REG[0])!=NIT_NULL);
1477 if (UNTAG_Bool(REGB0)) {
1478 } else {
1479 nit_abort("Uninitialized attribute %s", "_from", LOCATE_standard___string_search, 210);
1480 }
1481 REGB0 = ATTR_standard___string_search___Match____from(fra.me.REG[0]);
1482 stack_frame_head = fra.me.prev;
1483 return REGB0;
1484 }
1485 static const char LOCATE_standard___string_search___Match___length[] = "string_search::Match::length";
1486 val_t standard___string_search___Match___length(val_t p0){
1487 struct {struct stack_frame_t me;} fra;
1488 val_t REGB0;
1489 val_t tmp;
1490 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
1491 fra.me.file = LOCATE_standard___string_search;
1492 fra.me.line = 213;
1493 fra.me.meth = LOCATE_standard___string_search___Match___length;
1494 fra.me.has_broke = 0;
1495 fra.me.REG_size = 1;
1496 fra.me.nitni_local_ref_head = NULL;
1497 fra.me.REG[0] = NIT_NULL;
1498 fra.me.REG[0] = p0;
1499 /* ../lib/standard/string_search.nit:213 */
1500 REGB0 = TAG_Bool(ATTR_standard___string_search___Match____length(fra.me.REG[0])!=NIT_NULL);
1501 if (UNTAG_Bool(REGB0)) {
1502 } else {
1503 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___string_search, 213);
1504 }
1505 REGB0 = ATTR_standard___string_search___Match____length(fra.me.REG[0]);
1506 stack_frame_head = fra.me.prev;
1507 return REGB0;
1508 }
1509 static const char LOCATE_standard___string_search___Match___after[] = "string_search::Match::after";
1510 val_t standard___string_search___Match___after(val_t p0){
1511 struct {struct stack_frame_t me;} fra;
1512 val_t REGB0;
1513 val_t REGB1;
1514 val_t tmp;
1515 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
1516 fra.me.file = LOCATE_standard___string_search;
1517 fra.me.line = 216;
1518 fra.me.meth = LOCATE_standard___string_search___Match___after;
1519 fra.me.has_broke = 0;
1520 fra.me.REG_size = 1;
1521 fra.me.nitni_local_ref_head = NULL;
1522 fra.me.REG[0] = NIT_NULL;
1523 fra.me.REG[0] = p0;
1524 /* ../lib/standard/string_search.nit:218 */
1525 REGB0 = TAG_Bool(ATTR_standard___string_search___Match____from(fra.me.REG[0])!=NIT_NULL);
1526 if (UNTAG_Bool(REGB0)) {
1527 } else {
1528 nit_abort("Uninitialized attribute %s", "_from", LOCATE_standard___string_search, 218);
1529 }
1530 REGB0 = ATTR_standard___string_search___Match____from(fra.me.REG[0]);
1531 REGB1 = TAG_Bool(ATTR_standard___string_search___Match____length(fra.me.REG[0])!=NIT_NULL);
1532 if (UNTAG_Bool(REGB1)) {
1533 } else {
1534 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___string_search, 218);
1535 }
1536 REGB1 = ATTR_standard___string_search___Match____length(fra.me.REG[0]);
1537 /* ../lib/standard/kernel.nit:245 */
1538 REGB1 = TAG_Int(UNTAG_Int(REGB0)+UNTAG_Int(REGB1));
1539 /* ../lib/standard/string_search.nit:218 */
1540 goto label1;
1541 label1: while(0);
1542 stack_frame_head = fra.me.prev;
1543 return REGB1;
1544 }
1545 static const char LOCATE_standard___string_search___Match___to_s[] = "string_search::Match::(string::Object::to_s)";
1546 val_t standard___string_search___Match___to_s(val_t p0){
1547 struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
1548 val_t REGB0;
1549 val_t REGB1;
1550 val_t tmp;
1551 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
1552 fra.me.file = LOCATE_standard___string_search;
1553 fra.me.line = 220;
1554 fra.me.meth = LOCATE_standard___string_search___Match___to_s;
1555 fra.me.has_broke = 0;
1556 fra.me.REG_size = 2;
1557 fra.me.nitni_local_ref_head = NULL;
1558 fra.me.REG[0] = NIT_NULL;
1559 fra.me.REG[1] = NIT_NULL;
1560 fra.me.REG[0] = p0;
1561 /* ../lib/standard/string_search.nit:221 */
1562 REGB0 = TAG_Bool(ATTR_standard___string_search___Match____string(fra.me.REG[0])!=NIT_NULL);
1563 if (UNTAG_Bool(REGB0)) {
1564 } else {
1565 nit_abort("Uninitialized attribute %s", "_string", LOCATE_standard___string_search, 221);
1566 }
1567 fra.me.REG[1] = ATTR_standard___string_search___Match____string(fra.me.REG[0]);
1568 REGB0 = TAG_Bool(ATTR_standard___string_search___Match____from(fra.me.REG[0])!=NIT_NULL);
1569 if (UNTAG_Bool(REGB0)) {
1570 } else {
1571 nit_abort("Uninitialized attribute %s", "_from", LOCATE_standard___string_search, 221);
1572 }
1573 REGB0 = ATTR_standard___string_search___Match____from(fra.me.REG[0]);
1574 REGB1 = TAG_Bool(ATTR_standard___string_search___Match____length(fra.me.REG[0])!=NIT_NULL);
1575 if (UNTAG_Bool(REGB1)) {
1576 } else {
1577 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___string_search, 221);
1578 }
1579 REGB1 = ATTR_standard___string_search___Match____length(fra.me.REG[0]);
1580 fra.me.REG[1] = CALL_standard___string___AbstractString___substring(fra.me.REG[1])(fra.me.REG[1], REGB0, REGB1);
1581 goto label1;
1582 label1: while(0);
1583 stack_frame_head = fra.me.prev;
1584 return fra.me.REG[1];
1585 }
1586 static const char LOCATE_standard___string_search___Match___init[] = "string_search::Match::init";
1587 void standard___string_search___Match___init(val_t p0, val_t p1, val_t p2, val_t p3, int* init_table){
1588 int itpos1 = VAL2OBJ(p0)->vft[INIT_TABLE_POS_standard___string_search___Match].i;
1589 struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
1590 val_t REGB0;
1591 val_t REGB1;
1592 val_t REGB2;
1593 val_t REGB3;
1594 val_t REGB4;
1595 val_t tmp;
1596 if (init_table[itpos1]) return;
1597 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
1598 fra.me.file = LOCATE_standard___string_search;
1599 fra.me.line = 223;
1600 fra.me.meth = LOCATE_standard___string_search___Match___init;
1601 fra.me.has_broke = 0;
1602 fra.me.REG_size = 2;
1603 fra.me.nitni_local_ref_head = NULL;
1604 fra.me.REG[0] = NIT_NULL;
1605 fra.me.REG[1] = NIT_NULL;
1606 fra.me.REG[0] = p0;
1607 fra.me.REG[1] = p1;
1608 REGB0 = p2;
1609 REGB1 = p3;
1610 /* ../lib/standard/string_search.nit:226 */
1611 REGB2 = TAG_Int(0);
1612 REGB3 = TAG_Bool(VAL_ISA(REGB2, VTCOLOR_standard___kernel___Comparable___OTHER(REGB1), VTID_standard___kernel___Comparable___OTHER(REGB1))) /*cast OTHER*/;
1613 if (UNTAG_Bool(REGB3)) {
1614 } else {
1615 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
1616 }
1617 /* ../lib/standard/kernel.nit:243 */
1618 REGB2 = TAG_Bool(UNTAG_Int(REGB1)>=UNTAG_Int(REGB2));
1619 /* ../lib/standard/string_search.nit:226 */
1620 if (UNTAG_Bool(REGB2)) {
1621 } else {
1622 nit_abort("Assert '%s' failed", "positive_length", LOCATE_standard___string_search, 226);
1623 }
1624 /* ../lib/standard/string_search.nit:227 */
1625 REGB2 = TAG_Int(0);
1626 REGB3 = TAG_Bool(VAL_ISA(REGB2, VTCOLOR_standard___kernel___Comparable___OTHER(REGB0), VTID_standard___kernel___Comparable___OTHER(REGB0))) /*cast OTHER*/;
1627 if (UNTAG_Bool(REGB3)) {
1628 } else {
1629 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
1630 }
1631 /* ../lib/standard/kernel.nit:243 */
1632 REGB2 = TAG_Bool(UNTAG_Int(REGB0)>=UNTAG_Int(REGB2));
1633 /* ../lib/standard/string_search.nit:227 */
1634 if (UNTAG_Bool(REGB2)) {
1635 } else {
1636 nit_abort("Assert '%s' failed", "valid_from", LOCATE_standard___string_search, 227);
1637 }
1638 /* ../lib/standard/kernel.nit:245 */
1639 REGB2 = TAG_Int(UNTAG_Int(REGB0)+UNTAG_Int(REGB1));
1640 /* ../lib/standard/collection/array.nit:24 */
1641 REGB3 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[1])!=NIT_NULL);
1642 if (UNTAG_Bool(REGB3)) {
1643 } else {
1644 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 24);
1645 }
1646 REGB3 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[1]);
1647 REGB4 = TAG_Bool(VAL_ISA(REGB3, VTCOLOR_standard___kernel___Comparable___OTHER(REGB2), VTID_standard___kernel___Comparable___OTHER(REGB2))) /*cast OTHER*/;
1648 if (UNTAG_Bool(REGB4)) {
1649 } else {
1650 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
1651 }
1652 /* ../lib/standard/kernel.nit:241 */
1653 REGB3 = TAG_Bool(UNTAG_Int(REGB2)<=UNTAG_Int(REGB3));
1654 /* ../lib/standard/string_search.nit:228 */
1655 if (UNTAG_Bool(REGB3)) {
1656 } else {
1657 nit_abort("Assert '%s' failed", "valid_after", LOCATE_standard___string_search, 228);
1658 }
1659 /* ../lib/standard/string_search.nit:229 */
1660 ATTR_standard___string_search___Match____string(fra.me.REG[0]) = fra.me.REG[1];
1661 /* ../lib/standard/string_search.nit:230 */
1662 ATTR_standard___string_search___Match____from(fra.me.REG[0]) = REGB0;
1663 /* ../lib/standard/string_search.nit:231 */
1664 ATTR_standard___string_search___Match____length(fra.me.REG[0]) = REGB1;
1665 stack_frame_head = fra.me.prev;
1666 init_table[itpos1] = 1;
1667 return;
1668 }
1669 static const char LOCATE_standard___string_search___Char___search_index_in[] = "string_search::Char::(string_search::Pattern::search_index_in)";
1670 val_t standard___string_search___Char___search_index_in(val_t p0, val_t p1, val_t p2){
1671 struct {struct stack_frame_t me;} fra;
1672 val_t REGB0;
1673 val_t REGB1;
1674 val_t REGB2;
1675 val_t REGB3;
1676 val_t REGB4;
1677 val_t tmp;
1678 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
1679 fra.me.file = LOCATE_standard___string_search;
1680 fra.me.line = 238;
1681 fra.me.meth = LOCATE_standard___string_search___Char___search_index_in;
1682 fra.me.has_broke = 0;
1683 fra.me.REG_size = 1;
1684 fra.me.nitni_local_ref_head = NULL;
1685 fra.me.REG[0] = NIT_NULL;
1686 REGB0 = p0;
1687 fra.me.REG[0] = p1;
1688 REGB1 = p2;
1689 /* ../lib/standard/collection/array.nit:24 */
1690 REGB2 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL);
1691 if (UNTAG_Bool(REGB2)) {
1692 } else {
1693 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 24);
1694 }
1695 REGB2 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0]);
1696 /* ../lib/standard/string_search.nit:241 */
1697 while(1) {
1698 REGB3 = TAG_Bool(VAL_ISA(REGB2, VTCOLOR_standard___kernel___Comparable___OTHER(REGB1), VTID_standard___kernel___Comparable___OTHER(REGB1))) /*cast OTHER*/;
1699 if (UNTAG_Bool(REGB3)) {
1700 } else {
1701 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
1702 }
1703 /* ../lib/standard/kernel.nit:242 */
1704 REGB3 = TAG_Bool(UNTAG_Int(REGB1)<UNTAG_Int(REGB2));
1705 /* ../lib/standard/string_search.nit:241 */
1706 if (UNTAG_Bool(REGB3)) {
1707 /* ../lib/standard/string_search.nit:242 */
1708 REGB3 = CALL_standard___collection___abstract_collection___SequenceRead_____bra(fra.me.REG[0])(fra.me.REG[0], REGB1);
1709 REGB4 = TAG_Bool(IS_EQUAL_OO(REGB3,REGB0));
1710 if (UNTAG_Bool(REGB4)) {
1711 } else {
1712 /* ../lib/standard/kernel.nit:434 */
1713 REGB3 = TAG_Bool((REGB3)==(REGB0));
1714 /* ../lib/standard/string_search.nit:242 */
1715 REGB4 = REGB3;
1716 }
1717 if (UNTAG_Bool(REGB4)) {
1718 REGB4 = REGB1;
1719 goto label1;
1720 }
1721 /* ../lib/standard/string_search.nit:243 */
1722 REGB3 = TAG_Int(1);
1723 /* ../lib/standard/kernel.nit:245 */
1724 REGB3 = TAG_Int(UNTAG_Int(REGB1)+UNTAG_Int(REGB3));
1725 /* ../lib/standard/string_search.nit:243 */
1726 REGB1 = REGB3;
1727 } else {
1728 /* ../lib/standard/string_search.nit:241 */
1729 goto label2;
1730 }
1731 }
1732 label2: while(0);
1733 /* ../lib/standard/string_search.nit:245 */
1734 REGB1 = TAG_Int(1);
1735 /* ../lib/standard/kernel.nit:246 */
1736 REGB1 = TAG_Int(-UNTAG_Int(REGB1));
1737 /* ../lib/standard/string_search.nit:245 */
1738 REGB4 = REGB1;
1739 goto label1;
1740 label1: while(0);
1741 stack_frame_head = fra.me.prev;
1742 return REGB4;
1743 }
1744 static const char LOCATE_standard___string_search___Char___search_in[] = "string_search::Char::(string_search::Pattern::search_in)";
1745 val_t standard___string_search___Char___search_in(val_t p0, val_t p1, val_t p2){
1746 struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
1747 val_t REGB0;
1748 val_t REGB1;
1749 val_t REGB2;
1750 val_t tmp;
1751 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
1752 fra.me.file = LOCATE_standard___string_search;
1753 fra.me.line = 248;
1754 fra.me.meth = LOCATE_standard___string_search___Char___search_in;
1755 fra.me.has_broke = 0;
1756 fra.me.REG_size = 2;
1757 fra.me.nitni_local_ref_head = NULL;
1758 fra.me.REG[0] = NIT_NULL;
1759 fra.me.REG[1] = NIT_NULL;
1760 REGB0 = p0;
1761 fra.me.REG[0] = p1;
1762 REGB1 = p2;
1763 /* ../lib/standard/string_search.nit:250 */
1764 REGB1 = CALL_standard___string_search___Pattern___search_index_in(REGB0)(REGB0, fra.me.REG[0], REGB1);
1765 /* ../lib/standard/string_search.nit:251 */
1766 REGB0 = TAG_Int(0);
1767 REGB2 = TAG_Bool(VAL_ISA(REGB0, VTCOLOR_standard___kernel___Comparable___OTHER(REGB1), VTID_standard___kernel___Comparable___OTHER(REGB1))) /*cast OTHER*/;
1768 if (UNTAG_Bool(REGB2)) {
1769 } else {
1770 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
1771 }
1772 /* ../lib/standard/kernel.nit:242 */
1773 REGB0 = TAG_Bool(UNTAG_Int(REGB1)<UNTAG_Int(REGB0));
1774 /* ../lib/standard/string_search.nit:251 */
1775 if (UNTAG_Bool(REGB0)) {
1776 /* ../lib/standard/string_search.nit:252 */
1777 fra.me.REG[1] = NIT_NULL;
1778 goto label1;
1779 } else {
1780 /* ../lib/standard/string_search.nit:254 */
1781 REGB0 = TAG_Int(1);
1782 fra.me.REG[0] = NEW_Match_standard___string_search___Match___init(fra.me.REG[0], REGB1, REGB0);
1783 fra.me.REG[1] = fra.me.REG[0];
1784 goto label1;
1785 }
1786 label1: while(0);
1787 stack_frame_head = fra.me.prev;
1788 return fra.me.REG[1];
1789 }
1790 static const char LOCATE_standard___string_search___String___search_index_in[] = "string_search::String::(string_search::Pattern::search_index_in)";
1791 val_t standard___string_search___String___search_index_in(val_t p0, val_t p1, val_t p2){
1792 struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
1793 val_t REGB0;
1794 val_t REGB1;
1795 val_t REGB2;
1796 val_t REGB3;
1797 val_t REGB4;
1798 val_t REGB5;
1799 val_t tmp;
1800 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
1801 fra.me.file = LOCATE_standard___string_search;
1802 fra.me.line = 262;
1803 fra.me.meth = LOCATE_standard___string_search___String___search_index_in;
1804 fra.me.has_broke = 0;
1805 fra.me.REG_size = 2;
1806 fra.me.nitni_local_ref_head = NULL;
1807 fra.me.REG[0] = NIT_NULL;
1808 fra.me.REG[1] = NIT_NULL;
1809 fra.me.REG[0] = p0;
1810 fra.me.REG[1] = p1;
1811 REGB0 = p2;
1812 /* ../lib/standard/string_search.nit:264 */
1813 REGB1 = TAG_Int(0);
1814 REGB2 = TAG_Bool(VAL_ISA(REGB1, VTCOLOR_standard___kernel___Comparable___OTHER(REGB0), VTID_standard___kernel___Comparable___OTHER(REGB0))) /*cast OTHER*/;
1815 if (UNTAG_Bool(REGB2)) {
1816 } else {
1817 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
1818 }
1819 /* ../lib/standard/kernel.nit:243 */
1820 REGB1 = TAG_Bool(UNTAG_Int(REGB0)>=UNTAG_Int(REGB1));
1821 /* ../lib/standard/string_search.nit:264 */
1822 if (UNTAG_Bool(REGB1)) {
1823 } else {
1824 nit_abort("Assert failed", NULL, LOCATE_standard___string_search, 264);
1825 }
1826 /* ../lib/standard/collection/array.nit:24 */
1827 REGB1 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[1])!=NIT_NULL);
1828 if (UNTAG_Bool(REGB1)) {
1829 } else {
1830 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 24);
1831 }
1832 REGB1 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[1]);
1833 REGB2 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL);
1834 if (UNTAG_Bool(REGB2)) {
1835 } else {
1836 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 24);
1837 }
1838 REGB2 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0]);
1839 /* ../lib/standard/kernel.nit:247 */
1840 REGB2 = TAG_Int(UNTAG_Int(REGB1)-UNTAG_Int(REGB2));
1841 /* ../lib/standard/string_search.nit:265 */
1842 REGB1 = TAG_Int(1);
1843 /* ../lib/standard/kernel.nit:245 */
1844 REGB1 = TAG_Int(UNTAG_Int(REGB2)+UNTAG_Int(REGB1));
1845 /* ../lib/standard/string_search.nit:266 */
1846 while(1) {
1847 REGB2 = TAG_Bool(VAL_ISA(REGB1, VTCOLOR_standard___kernel___Comparable___OTHER(REGB0), VTID_standard___kernel___Comparable___OTHER(REGB0))) /*cast OTHER*/;
1848 if (UNTAG_Bool(REGB2)) {
1849 } else {
1850 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
1851 }
1852 /* ../lib/standard/kernel.nit:242 */
1853 REGB2 = TAG_Bool(UNTAG_Int(REGB0)<UNTAG_Int(REGB1));
1854 /* ../lib/standard/string_search.nit:266 */
1855 if (UNTAG_Bool(REGB2)) {
1856 /* ../lib/standard/collection/array.nit:24 */
1857 REGB2 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL);
1858 if (UNTAG_Bool(REGB2)) {
1859 } else {
1860 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 24);
1861 }
1862 REGB2 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0]);
1863 /* ../lib/standard/string_search.nit:267 */
1864 REGB3 = TAG_Int(1);
1865 /* ../lib/standard/kernel.nit:247 */
1866 REGB3 = TAG_Int(UNTAG_Int(REGB2)-UNTAG_Int(REGB3));
1867 /* ../lib/standard/string_search.nit:268 */
1868 while(1) {
1869 REGB2 = TAG_Int(0);
1870 REGB4 = TAG_Bool(VAL_ISA(REGB2, VTCOLOR_standard___kernel___Comparable___OTHER(REGB3), VTID_standard___kernel___Comparable___OTHER(REGB3))) /*cast OTHER*/;
1871 if (UNTAG_Bool(REGB4)) {
1872 } else {
1873 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
1874 }
1875 /* ../lib/standard/kernel.nit:243 */
1876 REGB2 = TAG_Bool(UNTAG_Int(REGB3)>=UNTAG_Int(REGB2));
1877 /* ../lib/standard/string_search.nit:268 */
1878 if (UNTAG_Bool(REGB2)) {
1879 REGB2 = CALL_standard___collection___abstract_collection___SequenceRead_____bra(fra.me.REG[0])(fra.me.REG[0], REGB3);
1880 /* ../lib/standard/kernel.nit:245 */
1881 REGB4 = TAG_Int(UNTAG_Int(REGB3)+UNTAG_Int(REGB0));
1882 /* ../lib/standard/string_search.nit:268 */
1883 REGB4 = CALL_standard___collection___abstract_collection___SequenceRead_____bra(fra.me.REG[1])(fra.me.REG[1], REGB4);
1884 REGB5 = TAG_Bool(IS_EQUAL_OO(REGB2,REGB4));
1885 if (UNTAG_Bool(REGB5)) {
1886 } else {
1887 /* ../lib/standard/kernel.nit:434 */
1888 REGB4 = TAG_Bool((REGB2)==(REGB4));
1889 /* ../lib/standard/string_search.nit:268 */
1890 REGB5 = REGB4;
1891 }
1892 } else {
1893 REGB4 = TAG_Bool(0);
1894 REGB5 = REGB4;
1895 }
1896 if (UNTAG_Bool(REGB5)) {
1897 REGB5 = TAG_Int(1);
1898 /* ../lib/standard/kernel.nit:247 */
1899 REGB5 = TAG_Int(UNTAG_Int(REGB3)-UNTAG_Int(REGB5));
1900 /* ../lib/standard/string_search.nit:268 */
1901 REGB3 = REGB5;
1902 } else {
1903 goto label1;
1904 }
1905 }
1906 label1: while(0);
1907 /* ../lib/standard/string_search.nit:270 */
1908 REGB5 = TAG_Int(0);
1909 REGB4 = TAG_Bool(VAL_ISA(REGB5, VTCOLOR_standard___kernel___Comparable___OTHER(REGB3), VTID_standard___kernel___Comparable___OTHER(REGB3))) /*cast OTHER*/;
1910 if (UNTAG_Bool(REGB4)) {
1911 } else {
1912 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
1913 }
1914 /* ../lib/standard/kernel.nit:242 */
1915 REGB5 = TAG_Bool(UNTAG_Int(REGB3)<UNTAG_Int(REGB5));
1916 /* ../lib/standard/string_search.nit:270 */
1917 if (UNTAG_Bool(REGB5)) {
1918 REGB5 = REGB0;
1919 goto label2;
1920 }
1921 /* ../lib/standard/string_search.nit:272 */
1922 REGB3 = TAG_Int(1);
1923 /* ../lib/standard/kernel.nit:245 */
1924 REGB3 = TAG_Int(UNTAG_Int(REGB0)+UNTAG_Int(REGB3));
1925 /* ../lib/standard/string_search.nit:272 */
1926 REGB0 = REGB3;
1927 } else {
1928 /* ../lib/standard/string_search.nit:266 */
1929 goto label3;
1930 }
1931 }
1932 label3: while(0);
1933 /* ../lib/standard/string_search.nit:274 */
1934 REGB0 = TAG_Int(1);
1935 /* ../lib/standard/kernel.nit:246 */
1936 REGB0 = TAG_Int(-UNTAG_Int(REGB0));
1937 /* ../lib/standard/string_search.nit:274 */
1938 REGB5 = REGB0;
1939 goto label2;
1940 label2: while(0);
1941 stack_frame_head = fra.me.prev;
1942 return REGB5;
1943 }
1944 static const char LOCATE_standard___string_search___String___search_in[] = "string_search::String::(string_search::Pattern::search_in)";
1945 val_t standard___string_search___String___search_in(val_t p0, val_t p1, val_t p2){
1946 struct {struct stack_frame_t me; val_t MORE_REG[2];} fra;
1947 val_t REGB0;
1948 val_t REGB1;
1949 val_t REGB2;
1950 val_t tmp;
1951 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
1952 fra.me.file = LOCATE_standard___string_search;
1953 fra.me.line = 277;
1954 fra.me.meth = LOCATE_standard___string_search___String___search_in;
1955 fra.me.has_broke = 0;
1956 fra.me.REG_size = 3;
1957 fra.me.nitni_local_ref_head = NULL;
1958 fra.me.REG[0] = NIT_NULL;
1959 fra.me.REG[1] = NIT_NULL;
1960 fra.me.REG[2] = NIT_NULL;
1961 fra.me.REG[0] = p0;
1962 fra.me.REG[1] = p1;
1963 REGB0 = p2;
1964 /* ../lib/standard/string_search.nit:279 */
1965 REGB0 = CALL_standard___string_search___Pattern___search_index_in(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1], REGB0);
1966 /* ../lib/standard/string_search.nit:280 */
1967 REGB1 = TAG_Int(0);
1968 REGB2 = TAG_Bool(VAL_ISA(REGB1, VTCOLOR_standard___kernel___Comparable___OTHER(REGB0), VTID_standard___kernel___Comparable___OTHER(REGB0))) /*cast OTHER*/;
1969 if (UNTAG_Bool(REGB2)) {
1970 } else {
1971 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
1972 }
1973 /* ../lib/standard/kernel.nit:242 */
1974 REGB1 = TAG_Bool(UNTAG_Int(REGB0)<UNTAG_Int(REGB1));
1975 /* ../lib/standard/string_search.nit:280 */
1976 if (UNTAG_Bool(REGB1)) {
1977 /* ../lib/standard/string_search.nit:281 */
1978 fra.me.REG[2] = NIT_NULL;
1979 goto label1;
1980 } else {
1981 /* ../lib/standard/collection/array.nit:24 */
1982 REGB1 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL);
1983 if (UNTAG_Bool(REGB1)) {
1984 } else {
1985 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 24);
1986 }
1987 REGB1 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0]);
1988 /* ../lib/standard/string_search.nit:283 */
1989 fra.me.REG[1] = NEW_Match_standard___string_search___Match___init(fra.me.REG[1], REGB0, REGB1);
1990 fra.me.REG[2] = fra.me.REG[1];
1991 goto label1;
1992 }
1993 label1: while(0);
1994 stack_frame_head = fra.me.prev;
1995 return fra.me.REG[2];
1996 }
1997 static const char LOCATE_standard___string_search___String___search[] = "string_search::String::search";
1998 val_t standard___string_search___String___search(val_t p0, val_t p1){
1999 struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
2000 val_t REGB0;
2001 val_t tmp;
2002 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
2003 fra.me.file = LOCATE_standard___string_search;
2004 fra.me.line = 287;
2005 fra.me.meth = LOCATE_standard___string_search___String___search;
2006 fra.me.has_broke = 0;
2007 fra.me.REG_size = 2;
2008 fra.me.nitni_local_ref_head = NULL;
2009 fra.me.REG[0] = NIT_NULL;
2010 fra.me.REG[1] = NIT_NULL;
2011 fra.me.REG[0] = p0;
2012 fra.me.REG[1] = p1;
2013 /* ../lib/standard/string_search.nit:288 */
2014 REGB0 = TAG_Int(0);
2015 fra.me.REG[0] = CALL_standard___string_search___Pattern___search_in(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[0], REGB0);
2016 goto label1;
2017 label1: while(0);
2018 stack_frame_head = fra.me.prev;
2019 return fra.me.REG[0];
2020 }
2021 static const char LOCATE_standard___string_search___String___search_from[] = "string_search::String::search_from";
2022 val_t standard___string_search___String___search_from(val_t p0, val_t p1, val_t p2){
2023 struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
2024 val_t REGB0;
2025 val_t tmp;
2026 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
2027 fra.me.file = LOCATE_standard___string_search;
2028 fra.me.line = 290;
2029 fra.me.meth = LOCATE_standard___string_search___String___search_from;
2030 fra.me.has_broke = 0;
2031 fra.me.REG_size = 2;
2032 fra.me.nitni_local_ref_head = NULL;
2033 fra.me.REG[0] = NIT_NULL;
2034 fra.me.REG[1] = NIT_NULL;
2035 fra.me.REG[0] = p0;
2036 fra.me.REG[1] = p1;
2037 REGB0 = p2;
2038 /* ../lib/standard/string_search.nit:293 */
2039 fra.me.REG[0] = CALL_standard___string_search___Pattern___search_in(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[0], REGB0);
2040 goto label1;
2041 label1: while(0);
2042 stack_frame_head = fra.me.prev;
2043 return fra.me.REG[0];
2044 }
2045 static const char LOCATE_standard___string_search___String___search_all[] = "string_search::String::search_all";
2046 val_t standard___string_search___String___search_all(val_t p0, val_t p1){
2047 struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
2048 val_t tmp;
2049 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
2050 fra.me.file = LOCATE_standard___string_search;
2051 fra.me.line = 295;
2052 fra.me.meth = LOCATE_standard___string_search___String___search_all;
2053 fra.me.has_broke = 0;
2054 fra.me.REG_size = 2;
2055 fra.me.nitni_local_ref_head = NULL;
2056 fra.me.REG[0] = NIT_NULL;
2057 fra.me.REG[1] = NIT_NULL;
2058 fra.me.REG[0] = p0;
2059 fra.me.REG[1] = p1;
2060 /* ../lib/standard/string_search.nit:302 */
2061 fra.me.REG[0] = CALL_standard___string_search___Pattern___search_all_in(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[0]);
2062 goto label1;
2063 label1: while(0);
2064 stack_frame_head = fra.me.prev;
2065 return fra.me.REG[0];
2066 }
2067 static const char LOCATE_standard___string_search___String___split[] = "string_search::String::split";
2068 val_t standard___string_search___String___split(val_t p0, val_t p1){
2069 struct {struct stack_frame_t me; val_t MORE_REG[3];} fra;
2070 val_t REGB0;
2071 val_t REGB1;
2072 val_t REGB2;
2073 val_t tmp;
2074 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
2075 fra.me.file = LOCATE_standard___string_search;
2076 fra.me.line = 304;
2077 fra.me.meth = LOCATE_standard___string_search___String___split;
2078 fra.me.has_broke = 0;
2079 fra.me.REG_size = 4;
2080 fra.me.nitni_local_ref_head = NULL;
2081 fra.me.REG[0] = NIT_NULL;
2082 fra.me.REG[1] = NIT_NULL;
2083 fra.me.REG[2] = NIT_NULL;
2084 fra.me.REG[3] = NIT_NULL;
2085 fra.me.REG[0] = p0;
2086 fra.me.REG[1] = p1;
2087 /* ../lib/standard/string_search.nit:309 */
2088 fra.me.REG[0] = CALL_standard___string_search___Pattern___split_in(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[0]);
2089 /* ../lib/standard/collection/array.nit:24 */
2090 REGB0 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL);
2091 if (UNTAG_Bool(REGB0)) {
2092 } else {
2093 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 24);
2094 }
2095 REGB0 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0]);
2096 /* ../lib/standard/string_search.nit:310 */
2097 fra.me.REG[1] = NEW_Array_standard___collection___array___Array___with_capacity(REGB0);
2098 /* ../lib/standard/collection/array.nit:270 */
2099 REGB0 = TAG_Int(0);
2100 /* ../lib/standard/collection/array.nit:271 */
2101 REGB1 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL);
2102 if (UNTAG_Bool(REGB1)) {
2103 } else {
2104 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 271);
2105 }
2106 REGB1 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0]);
2107 /* ../lib/standard/collection/array.nit:272 */
2108 fra.me.REG[2] = ATTR_standard___collection___array___Array____items(fra.me.REG[0]);
2109 /* ../lib/standard/collection/array.nit:273 */
2110 while(1) {
2111 /* ../lib/standard/collection/array.nit:24 */
2112 REGB1 = TAG_Bool(ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL);
2113 if (UNTAG_Bool(REGB1)) {
2114 } else {
2115 nit_abort("Uninitialized attribute %s", "_length", LOCATE_standard___collection___array, 24);
2116 }
2117 REGB1 = ATTR_standard___collection___array___AbstractArrayRead____length(fra.me.REG[0]);
2118 REGB2 = TAG_Bool(VAL_ISA(REGB1, VTCOLOR_standard___kernel___Comparable___OTHER(REGB0), VTID_standard___kernel___Comparable___OTHER(REGB0))) /*cast OTHER*/;
2119 if (UNTAG_Bool(REGB2)) {
2120 } else {
2121 nit_abort("Cast failed", NULL, LOCATE_standard___kernel, 0);
2122 }
2123 /* ../lib/standard/kernel.nit:242 */
2124 REGB1 = TAG_Bool(UNTAG_Int(REGB0)<UNTAG_Int(REGB1));
2125 /* ../lib/standard/collection/array.nit:273 */
2126 if (UNTAG_Bool(REGB1)) {
2127 /* ../lib/standard/collection/array.nit:274 */
2128 REGB1 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
2129 if (UNTAG_Bool(REGB1)) {
2130 nit_abort("Reciever is null", NULL, LOCATE_standard___collection___array, 274);
2131 }
2132 /* ../lib/standard/collection/array.nit:725 */
2133 fra.me.REG[3] = ((Nit_NativeArray)fra.me.REG[2])->val[UNTAG_Int(REGB0)];
2134 /* ../lib/standard/string_search.nit:311 */
2135 fra.me.REG[3] = CALL_standard___string___Object___to_s(fra.me.REG[3])(fra.me.REG[3]);
2136 CALL_standard___collection___abstract_collection___SimpleCollection___add(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[3]);
2137 /* ../lib/standard/collection/array.nit:275 */
2138 REGB1 = TAG_Int(1);
2139 /* ../lib/standard/kernel.nit:245 */
2140 REGB1 = TAG_Int(UNTAG_Int(REGB0)+UNTAG_Int(REGB1));
2141 /* ../lib/standard/collection/array.nit:275 */
2142 REGB0 = REGB1;
2143 } else {
2144 /* ../lib/standard/collection/array.nit:273 */
2145 goto label1;
2146 }
2147 }
2148 label1: while(0);
2149 /* ../lib/standard/string_search.nit:312 */
2150 goto label2;
2151 label2: while(0);
2152 stack_frame_head = fra.me.prev;
2153 return fra.me.REG[1];
2154 }
2155 static const char LOCATE_standard___string_search___String___split_with[] = "string_search::String::split_with";
2156 val_t standard___string_search___String___split_with(val_t p0, val_t p1){
2157 struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
2158 val_t tmp;
2159 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
2160 fra.me.file = LOCATE_standard___string_search;
2161 fra.me.line = 315;
2162 fra.me.meth = LOCATE_standard___string_search___String___split_with;
2163 fra.me.has_broke = 0;
2164 fra.me.REG_size = 2;
2165 fra.me.nitni_local_ref_head = NULL;
2166 fra.me.REG[0] = NIT_NULL;
2167 fra.me.REG[1] = NIT_NULL;
2168 fra.me.REG[0] = p0;
2169 fra.me.REG[1] = p1;
2170 /* ../lib/standard/string_search.nit:316 */
2171 fra.me.REG[1] = CALL_standard___string_search___String___split(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1]);
2172 goto label1;
2173 label1: while(0);
2174 stack_frame_head = fra.me.prev;
2175 return fra.me.REG[1];
2176 }
2177 static const char LOCATE_standard___string_search___String___replace[] = "string_search::String::replace";
2178 val_t standard___string_search___String___replace(val_t p0, val_t p1, val_t p2){
2179 struct {struct stack_frame_t me; val_t MORE_REG[2];} fra;
2180 val_t tmp;
2181 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
2182 fra.me.file = LOCATE_standard___string_search;
2183 fra.me.line = 318;
2184 fra.me.meth = LOCATE_standard___string_search___String___replace;
2185 fra.me.has_broke = 0;
2186 fra.me.REG_size = 3;
2187 fra.me.nitni_local_ref_head = NULL;
2188 fra.me.REG[0] = NIT_NULL;
2189 fra.me.REG[1] = NIT_NULL;
2190 fra.me.REG[2] = NIT_NULL;
2191 fra.me.REG[0] = p0;
2192 fra.me.REG[1] = p1;
2193 fra.me.REG[2] = p2;
2194 /* ../lib/standard/string_search.nit:324 */
2195 fra.me.REG[1] = CALL_standard___string_search___String___split_with(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1]);
2196 fra.me.REG[2] = CALL_standard___string___Collection___join(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[2]);
2197 goto label1;
2198 label1: while(0);
2199 stack_frame_head = fra.me.prev;
2200 return fra.me.REG[2];
2201 }
2202 static const char LOCATE_standard___string_search___String___html_escape[] = "string_search::String::html_escape";
2203 val_t standard___string_search___String___html_escape(val_t p0){
2204 struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
2205 val_t REGB0;
2206 val_t REGB1;
2207 val_t tmp;
2208 static val_t once_value_1; /* Once value */
2209 static val_t once_value_2; /* Once value */
2210 static val_t once_value_3; /* Once value */
2211 static val_t once_value_4; /* Once value */
2212 fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
2213 fra.me.file = LOCATE_standard___string_search;
2214 fra.me.line = 327;
2215 fra.me.meth = LOCATE_standard___string_search___String___html_escape;
2216 fra.me.has_broke = 0;
2217 fra.me.REG_size = 2;
2218 fra.me.nitni_local_ref_head = NULL;
2219 fra.me.REG[0] = NIT_NULL;
2220 fra.me.REG[1] = NIT_NULL;
2221 fra.me.REG[0] = p0;
2222 /* ../lib/standard/string_search.nit:333 */
2223 REGB0 = TAG_Char('&');
2224 REGB0 = CALL_standard___collection___abstract_collection___Collection___has(fra.me.REG[0])(fra.me.REG[0], REGB0);
2225 if (UNTAG_Bool(REGB0)) {
2226 REGB0 = TAG_Char('&');
2227 if (!once_value_1) {
2228 fra.me.REG[1] = BOX_NativeString("&amp;");
2229 REGB1 = TAG_Int(5);
2230 fra.me.REG[1] = CALL_standard___string___NativeString___to_s_with_length(fra.me.REG[1])(fra.me.REG[1], REGB1);
2231 once_value_1 = fra.me.REG[1];
2232 register_static_object(&once_value_1);
2233 } else fra.me.REG[1] = once_value_1;
2234 fra.me.REG[1] = fra.me.REG[1];
2235 fra.me.REG[1] = CALL_standard___string_search___String___replace(fra.me.REG[0])(fra.me.REG[0], REGB0, fra.me.REG[1]);
2236 fra.me.REG[0] = fra.me.REG[1];
2237 }
2238 /* ../lib/standard/string_search.nit:334 */
2239 REGB0 = TAG_Char('<');
2240 REGB0 = CALL_standard___collection___abstract_collection___Collection___has(fra.me.REG[0])(fra.me.REG[0], REGB0);
2241 if (UNTAG_Bool(REGB0)) {
2242 REGB0 = TAG_Char('<');
2243 if (!once_value_2) {
2244 fra.me.REG[1] = BOX_NativeString("&lt;");
2245 REGB1 = TAG_Int(4);
2246 fra.me.REG[1] = CALL_standard___string___NativeString___to_s_with_length(fra.me.REG[1])(fra.me.REG[1], REGB1);
2247 once_value_2 = fra.me.REG[1];
2248 register_static_object(&once_value_2);
2249 } else fra.me.REG[1] = once_value_2;
2250 fra.me.REG[1] = fra.me.REG[1];
2251 fra.me.REG[1] = CALL_standard___string_search___String___replace(fra.me.REG[0])(fra.me.REG[0], REGB0, fra.me.REG[1]);
2252 fra.me.REG[0] = fra.me.REG[1];
2253 }
2254 /* ../lib/standard/string_search.nit:335 */
2255 REGB0 = TAG_Char('>');
2256 REGB0 = CALL_standard___collection___abstract_collection___Collection___has(fra.me.REG[0])(fra.me.REG[0], REGB0);
2257 if (UNTAG_Bool(REGB0)) {
2258 REGB0 = TAG_Char('>');
2259 if (!once_value_3) {
2260 fra.me.REG[1] = BOX_NativeString("&gt;");
2261 REGB1 = TAG_Int(4);
2262 fra.me.REG[1] = CALL_standard___string___NativeString___to_s_with_length(fra.me.REG[1])(fra.me.REG[1], REGB1);
2263 once_value_3 = fra.me.REG[1];
2264 register_static_object(&once_value_3);
2265 } else fra.me.REG[1] = once_value_3;
2266 fra.me.REG[1] = fra.me.REG[1];
2267 fra.me.REG[1] = CALL_standard___string_search___String___replace(fra.me.REG[0])(fra.me.REG[0], REGB0, fra.me.REG[1]);
2268 fra.me.REG[0] = fra.me.REG[1];
2269 }
2270 /* ../lib/standard/string_search.nit:336 */
2271 REGB0 = TAG_Char('"');
2272 REGB0 = CALL_standard___collection___abstract_collection___Collection___has(fra.me.REG[0])(fra.me.REG[0], REGB0);
2273 if (UNTAG_Bool(REGB0)) {
2274 REGB0 = TAG_Char('"');
2275 if (!once_value_4) {
2276 fra.me.REG[1] = BOX_NativeString("&quot;");
2277 REGB1 = TAG_Int(6);
2278 fra.me.REG[1] = CALL_standard___string___NativeString___to_s_with_length(fra.me.REG[1])(fra.me.REG[1], REGB1);
2279 once_value_4 = fra.me.REG[1];
2280 register_static_object(&once_value_4);
2281 } else fra.me.REG[1] = once_value_4;
2282 fra.me.REG[1] = fra.me.REG[1];
2283 fra.me.REG[1] = CALL_standard___string_search___String___replace(fra.me.REG[0])(fra.me.REG[0], REGB0, fra.me.REG[1]);
2284 fra.me.REG[0] = fra.me.REG[1];
2285 }
2286 /* ../lib/standard/string_search.nit:337 */
2287 goto label5;
2288 label5: while(0);
2289 stack_frame_head = fra.me.prev;
2290 return fra.me.REG[0];
2291 }