1 /* This C file is generated by NIT to compile module string_search. */
2 #include "string_search._sep.h"
3 val_t
string_search___Pattern___search_index_in(val_t self
, val_t param0
, val_t param1
) {
4 struct trace_t trace
= {NULL
, NULL
, 21, LOCATE_string_search___Pattern___search_index_in
};
5 val_t
*variable
= NULL
;
6 void **closurevariable
= NULL
;
7 trace
.prev
= tracehead
; tracehead
= &trace
;
8 trace
.file
= LOCATE_string_search
;
9 fprintf(stderr
, "Deferred method called");
10 fprintf(stderr
, " (%s:%d)\n", LOCATE_string_search
, 21);
12 tracehead
= trace
.prev
;
15 val_t
string_search___Pattern___search_in(val_t self
, val_t param0
, val_t param1
) {
16 struct trace_t trace
= {NULL
, NULL
, 26, LOCATE_string_search___Pattern___search_in
};
17 val_t
*variable
= NULL
;
18 void **closurevariable
= NULL
;
19 trace
.prev
= tracehead
; tracehead
= &trace
;
20 trace
.file
= LOCATE_string_search
;
21 fprintf(stderr
, "Deferred method called");
22 fprintf(stderr
, " (%s:%d)\n", LOCATE_string_search
, 26);
24 tracehead
= trace
.prev
;
27 val_t
string_search___Pattern___search_all_in(val_t self
, val_t param0
) {
28 struct trace_t trace
= {NULL
, NULL
, 30, LOCATE_string_search___Pattern___search_all_in
};
30 void **closurevariable
= NULL
;
31 trace
.prev
= tracehead
; tracehead
= &trace
;
32 trace
.file
= LOCATE_string_search
;
35 variable
[4] = NEW_Array_array___Array___init(); /*new Array[Match]*/
36 variable
[3] = variable
[4];
37 variable
[5] = variable
[0];
38 variable
[5] = CALL_string_search___Pattern___search_in(variable
[5])(variable
[5], variable
[1] /*s*/, TAG_Int(0)) /*Pattern::search_in*/;
39 variable
[4] = variable
[5];
40 while (true) { /*while*/
41 variable
[5] = TAG_Bool(!UNTAG_Bool(TAG_Bool(( variable
[4] /*match*/ == NIT_NULL
/*null*/) || (( variable
[4] /*match*/ != NIT_NULL
) && ((CALL_kernel___Object_____eqeq( variable
[4] /*match*/)==kernel___Object_____eqeq
)?
(IS_EQUAL_NN( variable
[4] /*match*/, NIT_NULL
/*null*/)):(UNTAG_Bool(CALL_kernel___Object_____eqeq( variable
[4] /*match*/)( variable
[4] /*match*/, NIT_NULL
/*null*/) /*Object::==*/)))))));
42 if (!UNTAG_Bool(variable
[5])) break; /* while*/
43 CALL_abstract_collection___SimpleCollection___add( variable
[3] /*res*/)( variable
[3] /*res*/, variable
[4] /*match*/) /*AbstractArray::add*/;
44 variable
[5] = variable
[0];
45 variable
[6] = CALL_string_search___Match___after( variable
[4] /*match*/)( variable
[4] /*match*/) /*Match::after*/;
46 variable
[5] = CALL_string_search___Pattern___search_in(variable
[5])(variable
[5], variable
[1] /*s*/, variable
[6]) /*Pattern::search_in*/;
47 variable
[4] = variable
[5] /*match=*/;
51 variable
[2] = variable
[3] /*res*/;
53 return_label0
: while(false);
54 tracehead
= trace
.prev
;
57 val_t
string_search___Pattern___split_in(val_t self
, val_t param0
) {
58 struct trace_t trace
= {NULL
, NULL
, 42, LOCATE_string_search___Pattern___split_in
};
60 void **closurevariable
= NULL
;
61 trace
.prev
= tracehead
; tracehead
= &trace
;
62 trace
.file
= LOCATE_string_search
;
65 variable
[4] = NEW_Array_array___Array___init(); /*new Array[Match]*/
66 variable
[3] = variable
[4];
67 variable
[4] = TAG_Int(0);
68 variable
[6] = variable
[0];
69 variable
[6] = CALL_string_search___Pattern___search_in(variable
[6])(variable
[6], variable
[1] /*s*/, TAG_Int(0)) /*Pattern::search_in*/;
70 variable
[5] = variable
[6];
71 while (true) { /*while*/
72 variable
[6] = TAG_Bool(!UNTAG_Bool(TAG_Bool(( variable
[5] /*match*/ == NIT_NULL
/*null*/) || (( variable
[5] /*match*/ != NIT_NULL
) && ((CALL_kernel___Object_____eqeq( variable
[5] /*match*/)==kernel___Object_____eqeq
)?
(IS_EQUAL_NN( variable
[5] /*match*/, NIT_NULL
/*null*/)):(UNTAG_Bool(CALL_kernel___Object_____eqeq( variable
[5] /*match*/)( variable
[5] /*match*/, NIT_NULL
/*null*/) /*Object::==*/)))))));
73 if (!UNTAG_Bool(variable
[6])) break; /* while*/
74 variable
[7] = CALL_string_search___Match___from( variable
[5] /*match*/)( variable
[5] /*match*/) /*Match::from*/;
75 variable
[7] = TAG_Int(UNTAG_Int(variable
[7])-UNTAG_Int( variable
[4] /*i*/));
76 variable
[6] = variable
[7];
77 variable
[7] = NEW_Match_string_search___Match___init( variable
[1] /*s*/, variable
[4] /*i*/, variable
[6] /*len*/); /*new Match*/
78 CALL_abstract_collection___SimpleCollection___add( variable
[3] /*res*/)( variable
[3] /*res*/, variable
[7]) /*AbstractArray::add*/;
79 variable
[7] = CALL_string_search___Match___after( variable
[5] /*match*/)( variable
[5] /*match*/) /*Match::after*/;
80 variable
[4] = variable
[7] /*i=*/;
81 variable
[7] = variable
[0];
82 variable
[7] = CALL_string_search___Pattern___search_in(variable
[7])(variable
[7], variable
[1] /*s*/, variable
[4] /*i*/) /*Pattern::search_in*/;
83 variable
[5] = variable
[7] /*match=*/;
87 variable
[6] = CALL_abstract_collection___Collection___length( variable
[1] /*s*/)( variable
[1] /*s*/) /*AbstractArray::length*/;
88 variable
[6] = TAG_Int(UNTAG_Int(variable
[6])-UNTAG_Int( variable
[4] /*i*/));
89 variable
[7] = NEW_Match_string_search___Match___init( variable
[1] /*s*/, variable
[4] /*i*/, variable
[6]); /*new Match*/
90 variable
[6] = variable
[7];
91 CALL_abstract_collection___SimpleCollection___add( variable
[3] /*res*/)( variable
[3] /*res*/, variable
[6]) /*AbstractArray::add*/;
92 variable
[2] = variable
[3] /*res*/;
94 return_label2
: while(false);
95 tracehead
= trace
.prev
;
98 void string_search___Pattern___init(val_t self
, int* init_table
) {
99 struct trace_t trace
= {NULL
, NULL
, 0, LOCATE_string_search___Pattern___init
};
100 val_t
*variable
= NULL
;
101 void **closurevariable
= NULL
;
102 trace
.prev
= tracehead
; tracehead
= &trace
;
103 trace
.file
= LOCATE_string_search
;
104 tracehead
= trace
.prev
;
107 val_t
string_search___BM_Pattern___to_s(val_t self
) {
108 struct trace_t trace
= {NULL
, NULL
, 67, LOCATE_string_search___BM_Pattern___to_s
};
110 void **closurevariable
= NULL
;
111 trace
.prev
= tracehead
; tracehead
= &trace
;
112 trace
.file
= LOCATE_string_search
;
114 variable
[2] = variable
[0];
115 variable
[2] = ATTR_string_search___BM_Pattern____motif(variable
[2]) /*BM_Pattern::_motif*/;
116 variable
[1] = variable
[2];
118 return_label4
: while(false);
119 tracehead
= trace
.prev
;
122 val_t
string_search___BM_Pattern___search_index_in(val_t self
, val_t param0
, val_t param1
) {
123 struct trace_t trace
= {NULL
, NULL
, 69, LOCATE_string_search___BM_Pattern___search_index_in
};
125 void **closurevariable
= NULL
;
126 trace
.prev
= tracehead
; tracehead
= &trace
;
127 trace
.file
= LOCATE_string_search
;
129 variable
[1] = param0
;
130 variable
[2] = param1
;
131 variable
[4] = TAG_Bool(UNTAG_Int( variable
[2] /*from*/)>=UNTAG_Int( TAG_Int(0)));
132 if (!UNTAG_Bool(variable
[4])) { fprintf(stderr
, "Assert%s failed", ""); fprintf(stderr
, " in %s (%s:%d)\n", LOCATE_string_search___BM_Pattern___search_index_in
, LOCATE_string_search
, 72); nit_exit(1);}
133 variable
[5] = CALL_abstract_collection___Collection___length( variable
[1] /*s*/)( variable
[1] /*s*/) /*AbstractArray::length*/;
134 variable
[4] = variable
[5];
135 variable
[6] = variable
[0];
136 variable
[6] = ATTR_string_search___BM_Pattern____length(variable
[6]) /*BM_Pattern::_length*/;
137 variable
[5] = variable
[6];
138 variable
[6] = variable
[2] /*from*/;
139 while (true) { /*while*/
140 variable
[7] = TAG_Int(UNTAG_Int( variable
[4] /*n*/)-UNTAG_Int( variable
[5] /*m*/));
141 variable
[7] = TAG_Int(UNTAG_Int(variable
[7])+UNTAG_Int( TAG_Int(1)));
142 variable
[7] = TAG_Bool(UNTAG_Int( variable
[6] /*j*/)<UNTAG_Int(variable
[7]));
143 if (!UNTAG_Bool(variable
[7])) break; /* while*/
144 variable
[8] = TAG_Int(UNTAG_Int( variable
[5] /*m*/)-UNTAG_Int( TAG_Int(1)));
145 variable
[7] = variable
[8];
146 while (true) { /*while*/
147 variable
[8] = TAG_Bool(UNTAG_Int( variable
[7] /*i*/)>=UNTAG_Int( TAG_Int(0)));
148 variable
[9] = variable
[8];
149 if (UNTAG_Bool(variable
[9])) { /* and */
150 variable
[9] = variable
[0];
151 variable
[9] = ATTR_string_search___BM_Pattern____motif(variable
[9]) /*BM_Pattern::_motif*/;
152 variable
[9] = CALL_abstract_collection___Map_____bra(variable
[9])(variable
[9], variable
[7] /*i*/) /*String::[]*/;
153 variable
[10] = TAG_Int(UNTAG_Int( variable
[7] /*i*/)+UNTAG_Int( variable
[6] /*j*/));
154 variable
[10] = CALL_abstract_collection___Map_____bra( variable
[1] /*s*/)( variable
[1] /*s*/, variable
[10]) /*String::[]*/;
155 variable
[9] = TAG_Bool((variable
[9])==(variable
[10]));
157 variable
[8] = variable
[9];
158 if (!UNTAG_Bool(variable
[8])) break; /* while*/
159 variable
[7] = TAG_Int(UNTAG_Int(variable
[7])-UNTAG_Int( TAG_Int(1))) /*i*/;
160 continue_7
: while(0);
163 variable
[8] = TAG_Bool(UNTAG_Int( variable
[7] /*i*/)<UNTAG_Int( TAG_Int(0)));
164 if (UNTAG_Bool(variable
[8])) { /*if*/
165 variable
[3] = variable
[6] /*j*/;
168 variable
[9] = variable
[0];
169 variable
[9] = ATTR_string_search___BM_Pattern____gs(variable
[9]) /*BM_Pattern::_gs*/;
170 variable
[10] = variable
[9];
171 variable
[11] = variable
[7] /*i*/;
172 variable
[13] = TAG_Bool(UNTAG_Int( variable
[11] /*index*/)>=UNTAG_Int( TAG_Int(0)));
173 variable
[14] = variable
[13];
174 if (UNTAG_Bool(variable
[14])) { /* and */
175 variable
[14] = variable
[10];
176 variable
[14] = ATTR_array___AbstractArray____length(variable
[14]) /*AbstractArray::_length*/;
177 variable
[14] = TAG_Bool(UNTAG_Int( variable
[11] /*index*/)<UNTAG_Int(variable
[14]));
179 variable
[13] = variable
[14];
180 if (!UNTAG_Bool(variable
[13])) { fprintf(stderr
, "Assert%s failed", " 'index' "); fprintf(stderr
, " in %s (%s:%d)\n", LOCATE_array___Array_____bra
, LOCATE_string_search
, 229); nit_exit(1);}
181 variable
[13] = variable
[10];
182 variable
[13] = ATTR_array___Array____items(variable
[13]) /*Array::_items*/;
183 variable
[13] = UNBOX_NativeArray(variable
[13])[UNTAG_Int( variable
[11] /*index*/)];
184 variable
[12] = variable
[13];
186 return_label8
: while(false);
187 variable
[9] = variable
[12];
188 variable
[8] = variable
[9];
189 variable
[10] = variable
[0];
190 variable
[11] = TAG_Int(UNTAG_Int( variable
[7] /*i*/)+UNTAG_Int( variable
[6] /*j*/));
191 variable
[11] = CALL_abstract_collection___Map_____bra( variable
[1] /*s*/)( variable
[1] /*s*/, variable
[11]) /*String::[]*/;
192 variable
[10] = CALL_string_search___BM_Pattern___bc(variable
[10])(variable
[10], variable
[11]) /*BM_Pattern::bc*/;
193 variable
[10] = TAG_Int(UNTAG_Int(variable
[10])-UNTAG_Int( variable
[5] /*m*/));
194 variable
[10] = TAG_Int(UNTAG_Int(variable
[10])+UNTAG_Int( TAG_Int(1)));
195 variable
[10] = TAG_Int(UNTAG_Int(variable
[10])+UNTAG_Int( variable
[7] /*i*/));
196 variable
[9] = variable
[10];
197 variable
[10] = TAG_Bool(UNTAG_Int( variable
[8] /*gs*/)>UNTAG_Int( variable
[9] /*bc*/));
198 if (UNTAG_Bool(variable
[10])) { /*if*/
199 variable
[6] = TAG_Int(UNTAG_Int(variable
[6])+UNTAG_Int( variable
[8] /*gs*/)) /*j*/;
201 variable
[6] = TAG_Int(UNTAG_Int(variable
[6])+UNTAG_Int( variable
[9] /*bc*/)) /*j*/;
204 continue_6
: while(0);
207 variable
[7] = TAG_Int(-UNTAG_Int( TAG_Int(1)));
208 variable
[3] = variable
[7];
210 return_label5
: while(false);
211 tracehead
= trace
.prev
;
214 val_t
string_search___BM_Pattern___search_in(val_t self
, val_t param0
, val_t param1
) {
215 struct trace_t trace
= {NULL
, NULL
, 96, LOCATE_string_search___BM_Pattern___search_in
};
217 void **closurevariable
= NULL
;
218 trace
.prev
= tracehead
; tracehead
= &trace
;
219 trace
.file
= LOCATE_string_search
;
221 variable
[1] = param0
;
222 variable
[2] = param1
;
223 variable
[5] = variable
[0];
224 variable
[5] = CALL_string_search___Pattern___search_index_in(variable
[5])(variable
[5], variable
[1] /*s*/, variable
[2] /*from*/) /*BM_Pattern::search_index_in*/;
225 variable
[4] = variable
[5];
226 variable
[5] = TAG_Bool(UNTAG_Int( variable
[4] /*to*/)<UNTAG_Int( TAG_Int(0)));
227 if (UNTAG_Bool(variable
[5])) { /*if*/
228 variable
[3] = NIT_NULL
/*null*/;
231 variable
[5] = variable
[0];
232 variable
[5] = ATTR_string_search___BM_Pattern____length(variable
[5]) /*BM_Pattern::_length*/;
233 variable
[6] = NEW_Match_string_search___Match___init( variable
[1] /*s*/, variable
[4] /*to*/, variable
[5]); /*new Match*/
234 variable
[5] = variable
[6];
235 variable
[3] = variable
[5];
238 return_label9
: while(false);
239 tracehead
= trace
.prev
;
242 void string_search___BM_Pattern___init(val_t self
, val_t param0
, int* init_table
) {
243 struct trace_t trace
= {NULL
, NULL
, 107, LOCATE_string_search___BM_Pattern___init
};
245 void **closurevariable
= NULL
;
246 trace
.prev
= tracehead
; tracehead
= &trace
;
247 trace
.file
= LOCATE_string_search
;
249 variable
[1] = param0
;
250 if (init_table
[VAL2OBJ(variable
[0])->vft
[INIT_TABLE_POS_BM_Pattern
].i
]) return;
251 variable
[3] = variable
[0];
252 ATTR_string_search___BM_Pattern____motif(variable
[3]) /*BM_Pattern::_motif*/ = variable
[1] /*motif*/;
253 variable
[3] = variable
[0];
254 variable
[4] = CALL_abstract_collection___Collection___length( variable
[1] /*motif*/)( variable
[1] /*motif*/) /*AbstractArray::length*/;
255 ATTR_string_search___BM_Pattern____length(variable
[3]) /*BM_Pattern::_length*/ = variable
[4];
256 variable
[3] = variable
[0];
257 variable
[4] = variable
[0];
258 variable
[4] = ATTR_string_search___BM_Pattern____length(variable
[4]) /*BM_Pattern::_length*/;
259 variable
[5] = NEW_Array_array___Array___with_capacity(variable
[4]); /*new Array[Int]*/
260 variable
[4] = variable
[5];
261 ATTR_string_search___BM_Pattern____gs(variable
[3]) /*BM_Pattern::_gs*/ = variable
[4];
262 variable
[3] = variable
[0];
263 variable
[4] = NEW_ArrayMap_array___ArrayMap___init(); /*new ArrayMap[Char, Int]*/
264 ATTR_string_search___BM_Pattern____bc_table(variable
[3]) /*BM_Pattern::_bc_table*/ = variable
[4];
265 variable
[3] = variable
[0];
266 CALL_string_search___BM_Pattern___compute_gs(variable
[3])(variable
[3]) /*BM_Pattern::compute_gs*/;
267 variable
[3] = variable
[0];
268 CALL_string_search___BM_Pattern___compute_bc(variable
[3])(variable
[3]) /*BM_Pattern::compute_bc*/;
269 return_label10
: while(false);
270 init_table
[VAL2OBJ(variable
[0])->vft
[INIT_TABLE_POS_BM_Pattern
].i
] = 1;
271 tracehead
= trace
.prev
;
274 val_t
string_search___BM_Pattern___bc(val_t self
, val_t param0
) {
275 struct trace_t trace
= {NULL
, NULL
, 124, LOCATE_string_search___BM_Pattern___bc
};
277 void **closurevariable
= NULL
;
278 trace
.prev
= tracehead
; tracehead
= &trace
;
279 trace
.file
= LOCATE_string_search
;
281 variable
[1] = param0
;
282 variable
[3] = variable
[0];
283 variable
[3] = ATTR_string_search___BM_Pattern____bc_table(variable
[3]) /*BM_Pattern::_bc_table*/;
284 variable
[3] = CALL_abstract_collection___Map___has_key(variable
[3])(variable
[3], variable
[1] /*e*/) /*Map::has_key*/;
285 if (UNTAG_Bool(variable
[3])) { /*if*/
286 variable
[3] = variable
[0];
287 variable
[3] = ATTR_string_search___BM_Pattern____bc_table(variable
[3]) /*BM_Pattern::_bc_table*/;
288 variable
[3] = CALL_abstract_collection___Map_____bra(variable
[3])(variable
[3], variable
[1] /*e*/) /*Map::[]*/;
289 variable
[2] = variable
[3];
292 variable
[3] = variable
[0];
293 variable
[3] = ATTR_string_search___BM_Pattern____length(variable
[3]) /*BM_Pattern::_length*/;
294 variable
[2] = variable
[3];
297 return_label11
: while(false);
298 tracehead
= trace
.prev
;
301 void string_search___BM_Pattern___compute_bc(val_t self
) {
302 struct trace_t trace
= {NULL
, NULL
, 139, LOCATE_string_search___BM_Pattern___compute_bc
};
304 void **closurevariable
= NULL
;
305 trace
.prev
= tracehead
; tracehead
= &trace
;
306 trace
.file
= LOCATE_string_search
;
308 variable
[3] = variable
[0];
309 variable
[3] = ATTR_string_search___BM_Pattern____motif(variable
[3]) /*BM_Pattern::_motif*/;
310 variable
[2] = variable
[3];
311 variable
[4] = variable
[0];
312 variable
[4] = ATTR_string_search___BM_Pattern____length(variable
[4]) /*BM_Pattern::_length*/;
313 variable
[3] = variable
[4];
314 variable
[4] = TAG_Int(0);
315 while (true) { /*while*/
316 variable
[5] = TAG_Int(UNTAG_Int( variable
[3] /*m*/)-UNTAG_Int( TAG_Int(1)));
317 variable
[5] = TAG_Bool(UNTAG_Int( variable
[4] /*i*/)<UNTAG_Int(variable
[5]));
318 if (!UNTAG_Bool(variable
[5])) break; /* while*/
319 variable
[5] = variable
[0];
320 variable
[5] = ATTR_string_search___BM_Pattern____bc_table(variable
[5]) /*BM_Pattern::_bc_table*/;
321 variable
[6] = CALL_abstract_collection___Map_____bra( variable
[2] /*x*/)( variable
[2] /*x*/, variable
[4] /*i*/) /*String::[]*/;
322 variable
[7] = TAG_Int(UNTAG_Int( variable
[3] /*m*/)-UNTAG_Int( variable
[4] /*i*/));
323 variable
[7] = TAG_Int(UNTAG_Int(variable
[7])-UNTAG_Int( TAG_Int(1)));
324 CALL_abstract_collection___Map_____braeq(variable
[5])(variable
[5], variable
[6], variable
[7]) /*Map::[]=*/;
325 variable
[4] = TAG_Int(UNTAG_Int(variable
[4])+UNTAG_Int( TAG_Int(1))) /*i*/;
326 continue_13
: while(0);
329 return_label12
: while(false);
330 tracehead
= trace
.prev
;
333 val_t
string_search___BM_Pattern___suffixes(val_t self
) {
334 struct trace_t trace
= {NULL
, NULL
, 150, LOCATE_string_search___BM_Pattern___suffixes
};
336 void **closurevariable
= NULL
;
337 trace
.prev
= tracehead
; tracehead
= &trace
;
338 trace
.file
= LOCATE_string_search
;
340 variable
[3] = variable
[0];
341 variable
[3] = ATTR_string_search___BM_Pattern____motif(variable
[3]) /*BM_Pattern::_motif*/;
342 variable
[2] = variable
[3];
343 variable
[4] = variable
[0];
344 variable
[4] = ATTR_string_search___BM_Pattern____length(variable
[4]) /*BM_Pattern::_length*/;
345 variable
[3] = variable
[4];
346 variable
[5] = NEW_Array_array___Array___filled_with( variable
[3] /*m*/, variable
[3] /*m*/); /*new Array[Int]*/
347 variable
[4] = variable
[5];
348 variable
[5] = TAG_Int(0);
349 variable
[7] = TAG_Int(UNTAG_Int( variable
[3] /*m*/)-UNTAG_Int( TAG_Int(1)));
350 variable
[6] = variable
[7];
351 variable
[8] = TAG_Int(UNTAG_Int( variable
[3] /*m*/)-UNTAG_Int( TAG_Int(2)));
352 variable
[7] = variable
[8];
353 while (true) { /*while*/
354 variable
[8] = TAG_Bool(UNTAG_Int( variable
[7] /*i*/)>=UNTAG_Int( TAG_Int(0)));
355 if (!UNTAG_Bool(variable
[8])) break; /* while*/
356 variable
[8] = TAG_Bool(UNTAG_Int( variable
[7] /*i*/)>UNTAG_Int( variable
[6] /*g*/));
357 variable
[9] = variable
[8];
358 if (UNTAG_Bool(variable
[9])) { /* and */
359 variable
[9] = TAG_Int(UNTAG_Int( variable
[7] /*i*/)+UNTAG_Int( variable
[3] /*m*/));
360 variable
[9] = TAG_Int(UNTAG_Int(variable
[9])-UNTAG_Int( TAG_Int(1)));
361 variable
[9] = TAG_Int(UNTAG_Int(variable
[9])-UNTAG_Int( variable
[5] /*f*/));
362 variable
[10] = variable
[4] /*suff*/;
363 variable
[11] = variable
[9];
364 variable
[13] = TAG_Bool(UNTAG_Int( variable
[11] /*index*/)>=UNTAG_Int( TAG_Int(0)));
365 variable
[14] = variable
[13];
366 if (UNTAG_Bool(variable
[14])) { /* and */
367 variable
[14] = variable
[10];
368 variable
[14] = ATTR_array___AbstractArray____length(variable
[14]) /*AbstractArray::_length*/;
369 variable
[14] = TAG_Bool(UNTAG_Int( variable
[11] /*index*/)<UNTAG_Int(variable
[14]));
371 variable
[13] = variable
[14];
372 if (!UNTAG_Bool(variable
[13])) { fprintf(stderr
, "Assert%s failed", " 'index' "); fprintf(stderr
, " in %s (%s:%d)\n", LOCATE_array___Array_____bra
, LOCATE_string_search
, 229); nit_exit(1);}
373 variable
[13] = variable
[10];
374 variable
[13] = ATTR_array___Array____items(variable
[13]) /*Array::_items*/;
375 variable
[13] = UNBOX_NativeArray(variable
[13])[UNTAG_Int( variable
[11] /*index*/)];
376 variable
[12] = variable
[13];
378 return_label16
: while(false);
379 variable
[9] = variable
[12];
380 variable
[10] = TAG_Int(UNTAG_Int( variable
[7] /*i*/)-UNTAG_Int( variable
[6] /*g*/));
381 variable
[9] = TAG_Bool(UNTAG_Int(variable
[9])<UNTAG_Int(variable
[10]));
383 variable
[8] = variable
[9];
384 if (UNTAG_Bool(variable
[8])) { /*if*/
385 variable
[8] = TAG_Int(UNTAG_Int( variable
[7] /*i*/)+UNTAG_Int( variable
[3] /*m*/));
386 variable
[8] = TAG_Int(UNTAG_Int(variable
[8])-UNTAG_Int( TAG_Int(1)));
387 variable
[8] = TAG_Int(UNTAG_Int(variable
[8])-UNTAG_Int( variable
[5] /*f*/));
388 variable
[9] = variable
[4] /*suff*/;
389 variable
[10] = variable
[8];
390 variable
[12] = TAG_Bool(UNTAG_Int( variable
[10] /*index*/)>=UNTAG_Int( TAG_Int(0)));
391 variable
[13] = variable
[12];
392 if (UNTAG_Bool(variable
[13])) { /* and */
393 variable
[13] = variable
[9];
394 variable
[13] = ATTR_array___AbstractArray____length(variable
[13]) /*AbstractArray::_length*/;
395 variable
[13] = TAG_Bool(UNTAG_Int( variable
[10] /*index*/)<UNTAG_Int(variable
[13]));
397 variable
[12] = variable
[13];
398 if (!UNTAG_Bool(variable
[12])) { fprintf(stderr
, "Assert%s failed", " 'index' "); fprintf(stderr
, " in %s (%s:%d)\n", LOCATE_array___Array_____bra
, LOCATE_string_search
, 229); nit_exit(1);}
399 variable
[12] = variable
[9];
400 variable
[12] = ATTR_array___Array____items(variable
[12]) /*Array::_items*/;
401 variable
[12] = UNBOX_NativeArray(variable
[12])[UNTAG_Int( variable
[10] /*index*/)];
402 variable
[11] = variable
[12];
404 return_label17
: while(false);
405 variable
[8] = variable
[11];
406 CALL_abstract_collection___Map_____braeq( variable
[4] /*suff*/)( variable
[4] /*suff*/, variable
[7] /*i*/, variable
[8]) /*Array::[]=*/;
408 variable
[8] = TAG_Bool(UNTAG_Int( variable
[7] /*i*/)<UNTAG_Int( variable
[6] /*g*/));
409 if (UNTAG_Bool(variable
[8])) { /*if*/
410 variable
[6] = variable
[7] /*i*/ /*g=*/;
412 variable
[5] = variable
[7] /*i*/ /*f=*/;
413 while (true) { /*while*/
414 variable
[8] = TAG_Bool(UNTAG_Int( variable
[6] /*g*/)>=UNTAG_Int( TAG_Int(0)));
415 variable
[9] = variable
[8];
416 if (UNTAG_Bool(variable
[9])) { /* and */
417 variable
[9] = CALL_abstract_collection___Map_____bra( variable
[2] /*x*/)( variable
[2] /*x*/, variable
[6] /*g*/) /*String::[]*/;
418 variable
[10] = TAG_Int(UNTAG_Int( variable
[6] /*g*/)+UNTAG_Int( variable
[3] /*m*/));
419 variable
[10] = TAG_Int(UNTAG_Int(variable
[10])-UNTAG_Int( TAG_Int(1)));
420 variable
[10] = TAG_Int(UNTAG_Int(variable
[10])-UNTAG_Int( variable
[5] /*f*/));
421 variable
[10] = CALL_abstract_collection___Map_____bra( variable
[2] /*x*/)( variable
[2] /*x*/, variable
[10]) /*String::[]*/;
422 variable
[9] = TAG_Bool((variable
[9])==(variable
[10]));
424 variable
[8] = variable
[9];
425 if (!UNTAG_Bool(variable
[8])) break; /* while*/
426 variable
[6] = TAG_Int(UNTAG_Int(variable
[6])-UNTAG_Int( TAG_Int(1))) /*g*/;
427 continue_18
: while(0);
430 variable
[8] = TAG_Int(UNTAG_Int( variable
[5] /*f*/)-UNTAG_Int( variable
[6] /*g*/));
431 CALL_abstract_collection___Map_____braeq( variable
[4] /*suff*/)( variable
[4] /*suff*/, variable
[7] /*i*/, variable
[8]) /*Array::[]=*/;
433 variable
[7] = TAG_Int(UNTAG_Int(variable
[7])-UNTAG_Int( TAG_Int(1))) /*i*/;
434 continue_15
: while(0);
437 variable
[1] = variable
[4] /*suff*/;
439 return_label14
: while(false);
440 tracehead
= trace
.prev
;
443 void string_search___BM_Pattern___compute_gs(val_t self
) {
444 struct trace_t trace
= {NULL
, NULL
, 173, LOCATE_string_search___BM_Pattern___compute_gs
};
446 void **closurevariable
= NULL
;
447 trace
.prev
= tracehead
; tracehead
= &trace
;
448 trace
.file
= LOCATE_string_search
;
450 variable
[3] = variable
[0];
451 variable
[3] = ATTR_string_search___BM_Pattern____motif(variable
[3]) /*BM_Pattern::_motif*/;
452 variable
[2] = variable
[3];
453 variable
[4] = variable
[0];
454 variable
[4] = ATTR_string_search___BM_Pattern____length(variable
[4]) /*BM_Pattern::_length*/;
455 variable
[3] = variable
[4];
456 variable
[5] = variable
[0];
457 variable
[5] = CALL_string_search___BM_Pattern___suffixes(variable
[5])(variable
[5]) /*BM_Pattern::suffixes*/;
458 variable
[4] = variable
[5];
459 variable
[5] = TAG_Int(0);
460 while (true) { /*while*/
461 variable
[6] = TAG_Bool(UNTAG_Int( variable
[5] /*i*/)<UNTAG_Int( variable
[3] /*m*/));
462 if (!UNTAG_Bool(variable
[6])) break; /* while*/
463 variable
[6] = variable
[0];
464 variable
[6] = ATTR_string_search___BM_Pattern____gs(variable
[6]) /*BM_Pattern::_gs*/;
465 CALL_abstract_collection___Map_____braeq(variable
[6])(variable
[6], variable
[5] /*i*/, variable
[3] /*m*/) /*Array::[]=*/;
466 variable
[5] = TAG_Int(UNTAG_Int(variable
[5])+UNTAG_Int( TAG_Int(1))) /*i*/;
467 continue_20
: while(0);
470 variable
[6] = TAG_Int(0);
471 variable
[7] = TAG_Int(UNTAG_Int( variable
[3] /*m*/)-UNTAG_Int( TAG_Int(1)));
472 variable
[5] = variable
[7] /*i=*/;
473 while (true) { /*while*/
474 variable
[7] = TAG_Int(-UNTAG_Int( TAG_Int(1)));
475 variable
[7] = TAG_Bool(UNTAG_Int( variable
[5] /*i*/)>=UNTAG_Int(variable
[7]));
476 if (!UNTAG_Bool(variable
[7])) break; /* while*/
477 variable
[7] = TAG_Int(-UNTAG_Int( TAG_Int(1)));
478 variable
[7] = TAG_Bool(( variable
[5] /*i*/)==(variable
[7]));
479 variable
[8] = variable
[7];
480 if (!UNTAG_Bool(variable
[8])) { /* or */
481 variable
[8] = variable
[4] /*suff*/;
482 variable
[9] = variable
[5] /*i*/;
483 variable
[11] = TAG_Bool(UNTAG_Int( variable
[9] /*index*/)>=UNTAG_Int( TAG_Int(0)));
484 variable
[12] = variable
[11];
485 if (UNTAG_Bool(variable
[12])) { /* and */
486 variable
[12] = variable
[8];
487 variable
[12] = ATTR_array___AbstractArray____length(variable
[12]) /*AbstractArray::_length*/;
488 variable
[12] = TAG_Bool(UNTAG_Int( variable
[9] /*index*/)<UNTAG_Int(variable
[12]));
490 variable
[11] = variable
[12];
491 if (!UNTAG_Bool(variable
[11])) { fprintf(stderr
, "Assert%s failed", " 'index' "); fprintf(stderr
, " in %s (%s:%d)\n", LOCATE_array___Array_____bra
, LOCATE_string_search
, 229); nit_exit(1);}
492 variable
[11] = variable
[8];
493 variable
[11] = ATTR_array___Array____items(variable
[11]) /*Array::_items*/;
494 variable
[11] = UNBOX_NativeArray(variable
[11])[UNTAG_Int( variable
[9] /*index*/)];
495 variable
[10] = variable
[11];
497 return_label22
: while(false);
498 variable
[8] = variable
[10];
499 variable
[9] = TAG_Int(UNTAG_Int( variable
[5] /*i*/)+UNTAG_Int( TAG_Int(1)));
500 variable
[8] = TAG_Bool((variable
[8])==(variable
[9]));
502 variable
[7] = variable
[8];
503 if (UNTAG_Bool(variable
[7])) { /*if*/
504 while (true) { /*while*/
505 variable
[7] = TAG_Int(UNTAG_Int( variable
[3] /*m*/)-UNTAG_Int( TAG_Int(1)));
506 variable
[7] = TAG_Int(UNTAG_Int(variable
[7])-UNTAG_Int( variable
[5] /*i*/));
507 variable
[7] = TAG_Bool(UNTAG_Int( variable
[6] /*j*/)<UNTAG_Int(variable
[7]));
508 if (!UNTAG_Bool(variable
[7])) break; /* while*/
509 variable
[7] = variable
[0];
510 variable
[7] = ATTR_string_search___BM_Pattern____gs(variable
[7]) /*BM_Pattern::_gs*/;
511 variable
[8] = variable
[7];
512 variable
[9] = variable
[6] /*j*/;
513 variable
[11] = TAG_Bool(UNTAG_Int( variable
[9] /*index*/)>=UNTAG_Int( TAG_Int(0)));
514 variable
[12] = variable
[11];
515 if (UNTAG_Bool(variable
[12])) { /* and */
516 variable
[12] = variable
[8];
517 variable
[12] = ATTR_array___AbstractArray____length(variable
[12]) /*AbstractArray::_length*/;
518 variable
[12] = TAG_Bool(UNTAG_Int( variable
[9] /*index*/)<UNTAG_Int(variable
[12]));
520 variable
[11] = variable
[12];
521 if (!UNTAG_Bool(variable
[11])) { fprintf(stderr
, "Assert%s failed", " 'index' "); fprintf(stderr
, " in %s (%s:%d)\n", LOCATE_array___Array_____bra
, LOCATE_string_search
, 229); nit_exit(1);}
522 variable
[11] = variable
[8];
523 variable
[11] = ATTR_array___Array____items(variable
[11]) /*Array::_items*/;
524 variable
[11] = UNBOX_NativeArray(variable
[11])[UNTAG_Int( variable
[9] /*index*/)];
525 variable
[10] = variable
[11];
527 return_label24
: while(false);
528 variable
[7] = variable
[10];
529 variable
[7] = TAG_Bool((variable
[7])==( variable
[3] /*m*/));
530 if (UNTAG_Bool(variable
[7])) { /*if*/
531 variable
[7] = variable
[0];
532 variable
[7] = ATTR_string_search___BM_Pattern____gs(variable
[7]) /*BM_Pattern::_gs*/;
533 variable
[8] = TAG_Int(UNTAG_Int( variable
[3] /*m*/)-UNTAG_Int( TAG_Int(1)));
534 variable
[8] = TAG_Int(UNTAG_Int(variable
[8])-UNTAG_Int( variable
[5] /*i*/));
535 CALL_abstract_collection___Map_____braeq(variable
[7])(variable
[7], variable
[6] /*j*/, variable
[8]) /*Array::[]=*/;
537 variable
[6] = TAG_Int(UNTAG_Int(variable
[6])+UNTAG_Int( TAG_Int(1))) /*j*/;
538 continue_23
: while(0);
542 variable
[5] = TAG_Int(UNTAG_Int(variable
[5])-UNTAG_Int( TAG_Int(1))) /*i*/;
543 continue_21
: while(0);
546 variable
[5] = TAG_Int(0) /*i=*/;
547 while (true) { /*while*/
548 variable
[7] = TAG_Int(UNTAG_Int( variable
[3] /*m*/)-UNTAG_Int( TAG_Int(1)));
549 variable
[7] = TAG_Bool(UNTAG_Int( variable
[5] /*i*/)<UNTAG_Int(variable
[7]));
550 if (!UNTAG_Bool(variable
[7])) break; /* while*/
551 variable
[7] = variable
[0];
552 variable
[7] = ATTR_string_search___BM_Pattern____gs(variable
[7]) /*BM_Pattern::_gs*/;
553 variable
[8] = TAG_Int(UNTAG_Int( variable
[3] /*m*/)-UNTAG_Int( TAG_Int(1)));
554 variable
[9] = variable
[4] /*suff*/;
555 variable
[10] = variable
[5] /*i*/;
556 variable
[12] = TAG_Bool(UNTAG_Int( variable
[10] /*index*/)>=UNTAG_Int( TAG_Int(0)));
557 variable
[13] = variable
[12];
558 if (UNTAG_Bool(variable
[13])) { /* and */
559 variable
[13] = variable
[9];
560 variable
[13] = ATTR_array___AbstractArray____length(variable
[13]) /*AbstractArray::_length*/;
561 variable
[13] = TAG_Bool(UNTAG_Int( variable
[10] /*index*/)<UNTAG_Int(variable
[13]));
563 variable
[12] = variable
[13];
564 if (!UNTAG_Bool(variable
[12])) { fprintf(stderr
, "Assert%s failed", " 'index' "); fprintf(stderr
, " in %s (%s:%d)\n", LOCATE_array___Array_____bra
, LOCATE_string_search
, 229); nit_exit(1);}
565 variable
[12] = variable
[9];
566 variable
[12] = ATTR_array___Array____items(variable
[12]) /*Array::_items*/;
567 variable
[12] = UNBOX_NativeArray(variable
[12])[UNTAG_Int( variable
[10] /*index*/)];
568 variable
[11] = variable
[12];
570 return_label26
: while(false);
571 variable
[9] = variable
[11];
572 variable
[8] = TAG_Int(UNTAG_Int(variable
[8])-UNTAG_Int(variable
[9]));
573 variable
[9] = TAG_Int(UNTAG_Int( variable
[3] /*m*/)-UNTAG_Int( TAG_Int(1)));
574 variable
[9] = TAG_Int(UNTAG_Int(variable
[9])-UNTAG_Int( variable
[5] /*i*/));
575 CALL_abstract_collection___Map_____braeq(variable
[7])(variable
[7], variable
[8], variable
[9]) /*Array::[]=*/;
576 variable
[5] = TAG_Int(UNTAG_Int(variable
[5])+UNTAG_Int( TAG_Int(1))) /*i*/;
577 continue_25
: while(0);
580 return_label19
: while(false);
581 tracehead
= trace
.prev
;
584 val_t
string_search___Match___to_s(val_t self
) {
585 struct trace_t trace
= {NULL
, NULL
, 217, LOCATE_string_search___Match___to_s
};
587 void **closurevariable
= NULL
;
588 trace
.prev
= tracehead
; tracehead
= &trace
;
589 trace
.file
= LOCATE_string_search
;
591 variable
[2] = variable
[0];
592 variable
[2] = ATTR_string_search___Match____string(variable
[2]) /*Match::_string*/;
593 variable
[3] = variable
[0];
594 variable
[3] = ATTR_string_search___Match____from(variable
[3]) /*Match::_from*/;
595 variable
[4] = variable
[0];
596 variable
[4] = ATTR_string_search___Match____length(variable
[4]) /*Match::_length*/;
597 variable
[2] = CALL_string___String___substring(variable
[2])(variable
[2], variable
[3], variable
[4]) /*String::substring*/;
598 variable
[1] = variable
[2];
600 return_label27
: while(false);
601 tracehead
= trace
.prev
;
604 val_t
string_search___Match___string(val_t self
) {
605 struct trace_t trace
= {NULL
, NULL
, 204, LOCATE_string_search___Match___string
};
606 val_t
*variable
= NULL
;
607 void **closurevariable
= NULL
;
608 trace
.prev
= tracehead
; tracehead
= &trace
;
609 trace
.file
= LOCATE_string_search
;
610 tracehead
= trace
.prev
;
611 return ATTR_string_search___Match____string( self
) /*Match::_string*/;
613 val_t
string_search___Match___from(val_t self
) {
614 struct trace_t trace
= {NULL
, NULL
, 207, LOCATE_string_search___Match___from
};
615 val_t
*variable
= NULL
;
616 void **closurevariable
= NULL
;
617 trace
.prev
= tracehead
; tracehead
= &trace
;
618 trace
.file
= LOCATE_string_search
;
619 tracehead
= trace
.prev
;
620 return ATTR_string_search___Match____from( self
) /*Match::_from*/;
622 val_t
string_search___Match___length(val_t self
) {
623 struct trace_t trace
= {NULL
, NULL
, 210, LOCATE_string_search___Match___length
};
624 val_t
*variable
= NULL
;
625 void **closurevariable
= NULL
;
626 trace
.prev
= tracehead
; tracehead
= &trace
;
627 trace
.file
= LOCATE_string_search
;
628 tracehead
= trace
.prev
;
629 return ATTR_string_search___Match____length( self
) /*Match::_length*/;
631 val_t
string_search___Match___after(val_t self
) {
632 struct trace_t trace
= {NULL
, NULL
, 213, LOCATE_string_search___Match___after
};
634 void **closurevariable
= NULL
;
635 trace
.prev
= tracehead
; tracehead
= &trace
;
636 trace
.file
= LOCATE_string_search
;
638 variable
[2] = variable
[0];
639 variable
[2] = ATTR_string_search___Match____from(variable
[2]) /*Match::_from*/;
640 variable
[3] = variable
[0];
641 variable
[3] = ATTR_string_search___Match____length(variable
[3]) /*Match::_length*/;
642 variable
[2] = TAG_Int(UNTAG_Int(variable
[2])+UNTAG_Int(variable
[3]));
643 variable
[1] = variable
[2];
645 return_label28
: while(false);
646 tracehead
= trace
.prev
;
649 void string_search___Match___init(val_t self
, val_t param0
, val_t param1
, val_t param2
, int* init_table
) {
650 struct trace_t trace
= {NULL
, NULL
, 220, LOCATE_string_search___Match___init
};
652 void **closurevariable
= NULL
;
653 trace
.prev
= tracehead
; tracehead
= &trace
;
654 trace
.file
= LOCATE_string_search
;
656 variable
[1] = param0
;
657 variable
[2] = param1
;
658 variable
[3] = param2
;
659 if (init_table
[VAL2OBJ(variable
[0])->vft
[INIT_TABLE_POS_Match
].i
]) return;
660 variable
[5] = TAG_Bool(!UNTAG_Bool(TAG_Bool(( variable
[1] /*s*/ == NIT_NULL
/*null*/) || (( variable
[1] /*s*/ != NIT_NULL
) && ((CALL_kernel___Object_____eqeq( variable
[1] /*s*/)==kernel___Object_____eqeq
)?
(IS_EQUAL_NN( variable
[1] /*s*/, NIT_NULL
/*null*/)):(UNTAG_Bool(CALL_kernel___Object_____eqeq( variable
[1] /*s*/)( variable
[1] /*s*/, NIT_NULL
/*null*/) /*Object::==*/)))))));
661 if (!UNTAG_Bool(variable
[5])) { fprintf(stderr
, "Assert%s failed", " 'non_null_string' "); fprintf(stderr
, " in %s (%s:%d)\n", LOCATE_string_search___Match___init
, LOCATE_string_search
, 223); nit_exit(1);}
662 variable
[5] = TAG_Bool(UNTAG_Int( variable
[3] /*len*/)>=UNTAG_Int( TAG_Int(0)));
663 if (!UNTAG_Bool(variable
[5])) { fprintf(stderr
, "Assert%s failed", " 'positive_length' "); fprintf(stderr
, " in %s (%s:%d)\n", LOCATE_string_search___Match___init
, LOCATE_string_search
, 224); nit_exit(1);}
664 variable
[5] = TAG_Bool(UNTAG_Int( variable
[2] /*f*/)>=UNTAG_Int( TAG_Int(0)));
665 if (!UNTAG_Bool(variable
[5])) { fprintf(stderr
, "Assert%s failed", " 'valid_from' "); fprintf(stderr
, " in %s (%s:%d)\n", LOCATE_string_search___Match___init
, LOCATE_string_search
, 225); nit_exit(1);}
666 variable
[5] = TAG_Int(UNTAG_Int( variable
[2] /*f*/)+UNTAG_Int( variable
[3] /*len*/));
667 variable
[6] = CALL_abstract_collection___Collection___length( variable
[1] /*s*/)( variable
[1] /*s*/) /*AbstractArray::length*/;
668 variable
[5] = TAG_Bool(UNTAG_Int(variable
[5])<=UNTAG_Int(variable
[6]));
669 if (!UNTAG_Bool(variable
[5])) { fprintf(stderr
, "Assert%s failed", " 'valid_after' "); fprintf(stderr
, " in %s (%s:%d)\n", LOCATE_string_search___Match___init
, LOCATE_string_search
, 226); nit_exit(1);}
670 variable
[5] = variable
[0];
671 ATTR_string_search___Match____string(variable
[5]) /*Match::_string*/ = variable
[1] /*s*/;
672 variable
[5] = variable
[0];
673 ATTR_string_search___Match____from(variable
[5]) /*Match::_from*/ = variable
[2] /*f*/;
674 variable
[5] = variable
[0];
675 ATTR_string_search___Match____length(variable
[5]) /*Match::_length*/ = variable
[3] /*len*/;
676 return_label29
: while(false);
677 init_table
[VAL2OBJ(variable
[0])->vft
[INIT_TABLE_POS_Match
].i
] = 1;
678 tracehead
= trace
.prev
;
681 val_t
string_search___Char___search_index_in(val_t self
, val_t param0
, val_t param1
) {
682 struct trace_t trace
= {NULL
, NULL
, 235, LOCATE_string_search___Char___search_index_in
};
684 void **closurevariable
= NULL
;
685 trace
.prev
= tracehead
; tracehead
= &trace
;
686 trace
.file
= LOCATE_string_search
;
688 variable
[1] = param0
;
689 variable
[2] = param1
;
690 variable
[5] = CALL_abstract_collection___Collection___length( variable
[1] /*s*/)( variable
[1] /*s*/) /*AbstractArray::length*/;
691 variable
[4] = variable
[5];
692 while (true) { /*while*/
693 variable
[5] = TAG_Bool(UNTAG_Int( variable
[2] /*from*/)<UNTAG_Int( variable
[4] /*stop*/));
694 if (!UNTAG_Bool(variable
[5])) break; /* while*/
695 variable
[5] = CALL_abstract_collection___Map_____bra( variable
[1] /*s*/)( variable
[1] /*s*/, variable
[2] /*from*/) /*String::[]*/;
696 variable
[6] = variable
[0];
697 variable
[5] = TAG_Bool((variable
[5])==(variable
[6]));
698 if (UNTAG_Bool(variable
[5])) { /*if*/
699 variable
[3] = variable
[2] /*from*/;
702 variable
[2] = TAG_Int(UNTAG_Int(variable
[2])+UNTAG_Int( TAG_Int(1))) /*from*/;
703 continue_31
: while(0);
706 variable
[5] = TAG_Int(-UNTAG_Int( TAG_Int(1)));
707 variable
[3] = variable
[5];
709 return_label30
: while(false);
710 tracehead
= trace
.prev
;
713 val_t
string_search___Char___search_in(val_t self
, val_t param0
, val_t param1
) {
714 struct trace_t trace
= {NULL
, NULL
, 245, LOCATE_string_search___Char___search_in
};
716 void **closurevariable
= NULL
;
717 trace
.prev
= tracehead
; tracehead
= &trace
;
718 trace
.file
= LOCATE_string_search
;
720 variable
[1] = param0
;
721 variable
[2] = param1
;
722 variable
[5] = variable
[0];
723 variable
[5] = CALL_string_search___Pattern___search_index_in(variable
[5])(variable
[5], variable
[1] /*s*/, variable
[2] /*from*/) /*Char::search_index_in*/;
724 variable
[4] = variable
[5];
725 variable
[5] = TAG_Bool(UNTAG_Int( variable
[4] /*pos*/)<UNTAG_Int( TAG_Int(0)));
726 if (UNTAG_Bool(variable
[5])) { /*if*/
727 variable
[3] = NIT_NULL
/*null*/;
730 variable
[5] = NEW_Match_string_search___Match___init( variable
[1] /*s*/, variable
[4] /*pos*/, TAG_Int(1)); /*new Match*/
731 variable
[3] = variable
[5];
734 return_label32
: while(false);
735 tracehead
= trace
.prev
;
738 val_t
string_search___String___search_index_in(val_t self
, val_t param0
, val_t param1
) {
739 struct trace_t trace
= {NULL
, NULL
, 258, LOCATE_string_search___String___search_index_in
};
741 void **closurevariable
= NULL
;
742 trace
.prev
= tracehead
; tracehead
= &trace
;
743 trace
.file
= LOCATE_string_search
;
745 variable
[1] = param0
;
746 variable
[2] = param1
;
747 variable
[4] = TAG_Bool(UNTAG_Int( variable
[2] /*from*/)>=UNTAG_Int( TAG_Int(0)));
748 if (!UNTAG_Bool(variable
[4])) { fprintf(stderr
, "Assert%s failed", ""); fprintf(stderr
, " in %s (%s:%d)\n", LOCATE_string_search___String___search_index_in
, LOCATE_string_search
, 260); nit_exit(1);}
749 variable
[5] = CALL_abstract_collection___Collection___length( variable
[1] /*s*/)( variable
[1] /*s*/) /*AbstractArray::length*/;
750 variable
[6] = variable
[0];
751 variable
[6] = CALL_abstract_collection___Collection___length(variable
[6])(variable
[6]) /*AbstractArray::length*/;
752 variable
[5] = TAG_Int(UNTAG_Int(variable
[5])-UNTAG_Int(variable
[6]));
753 variable
[5] = TAG_Int(UNTAG_Int(variable
[5])+UNTAG_Int( TAG_Int(1)));
754 variable
[4] = variable
[5];
755 while (true) { /*while*/
756 variable
[5] = TAG_Bool(UNTAG_Int( variable
[2] /*from*/)<UNTAG_Int( variable
[4] /*stop*/));
757 if (!UNTAG_Bool(variable
[5])) break; /* while*/
758 variable
[6] = variable
[0];
759 variable
[6] = CALL_abstract_collection___Collection___length(variable
[6])(variable
[6]) /*AbstractArray::length*/;
760 variable
[6] = TAG_Int(UNTAG_Int(variable
[6])-UNTAG_Int( TAG_Int(1)));
761 variable
[5] = variable
[6];
762 while (true) { /*while*/
763 variable
[6] = TAG_Bool(UNTAG_Int( variable
[5] /*i*/)>=UNTAG_Int( TAG_Int(0)));
764 variable
[7] = variable
[6];
765 if (UNTAG_Bool(variable
[7])) { /* and */
766 variable
[7] = variable
[0];
767 variable
[7] = CALL_abstract_collection___Map_____bra(variable
[7])(variable
[7], variable
[5] /*i*/) /*String::[]*/;
768 variable
[8] = TAG_Int(UNTAG_Int( variable
[5] /*i*/)+UNTAG_Int( variable
[2] /*from*/));
769 variable
[8] = CALL_abstract_collection___Map_____bra( variable
[1] /*s*/)( variable
[1] /*s*/, variable
[8]) /*String::[]*/;
770 variable
[7] = TAG_Bool((variable
[7])==(variable
[8]));
772 variable
[6] = variable
[7];
773 if (!UNTAG_Bool(variable
[6])) break; /* while*/
774 variable
[5] = TAG_Int(UNTAG_Int(variable
[5])-UNTAG_Int( TAG_Int(1))) /*i*/;
775 continue_35
: while(0);
778 variable
[6] = TAG_Bool(UNTAG_Int( variable
[5] /*i*/)<UNTAG_Int( TAG_Int(0)));
779 if (UNTAG_Bool(variable
[6])) { /*if*/
780 variable
[3] = variable
[2] /*from*/;
783 variable
[2] = TAG_Int(UNTAG_Int(variable
[2])+UNTAG_Int( TAG_Int(1))) /*from*/;
784 continue_34
: while(0);
787 variable
[5] = TAG_Int(-UNTAG_Int( TAG_Int(1)));
788 variable
[3] = variable
[5];
790 return_label33
: while(false);
791 tracehead
= trace
.prev
;
794 val_t
string_search___String___search_in(val_t self
, val_t param0
, val_t param1
) {
795 struct trace_t trace
= {NULL
, NULL
, 273, LOCATE_string_search___String___search_in
};
797 void **closurevariable
= NULL
;
798 trace
.prev
= tracehead
; tracehead
= &trace
;
799 trace
.file
= LOCATE_string_search
;
801 variable
[1] = param0
;
802 variable
[2] = param1
;
803 variable
[5] = variable
[0];
804 variable
[5] = CALL_string_search___Pattern___search_index_in(variable
[5])(variable
[5], variable
[1] /*s*/, variable
[2] /*from*/) /*String::search_index_in*/;
805 variable
[4] = variable
[5];
806 variable
[5] = TAG_Bool(UNTAG_Int( variable
[4] /*pos*/)<UNTAG_Int( TAG_Int(0)));
807 if (UNTAG_Bool(variable
[5])) { /*if*/
808 variable
[3] = NIT_NULL
/*null*/;
811 variable
[5] = variable
[0];
812 variable
[5] = CALL_abstract_collection___Collection___length(variable
[5])(variable
[5]) /*AbstractArray::length*/;
813 variable
[6] = NEW_Match_string_search___Match___init( variable
[1] /*s*/, variable
[4] /*pos*/, variable
[5]); /*new Match*/
814 variable
[5] = variable
[6];
815 variable
[3] = variable
[5];
818 return_label36
: while(false);
819 tracehead
= trace
.prev
;
822 val_t
string_search___String___search(val_t self
, val_t param0
) {
823 struct trace_t trace
= {NULL
, NULL
, 283, LOCATE_string_search___String___search
};
825 void **closurevariable
= NULL
;
826 trace
.prev
= tracehead
; tracehead
= &trace
;
827 trace
.file
= LOCATE_string_search
;
829 variable
[1] = param0
;
830 variable
[3] = variable
[0];
831 variable
[3] = CALL_string_search___Pattern___search_in( variable
[1] /*p*/)( variable
[1] /*p*/, variable
[3], TAG_Int(0)) /*Pattern::search_in*/;
832 variable
[2] = variable
[3];
834 return_label37
: while(false);
835 tracehead
= trace
.prev
;
838 val_t
string_search___String___search_from(val_t self
, val_t param0
, val_t param1
) {
839 struct trace_t trace
= {NULL
, NULL
, 286, LOCATE_string_search___String___search_from
};
841 void **closurevariable
= NULL
;
842 trace
.prev
= tracehead
; tracehead
= &trace
;
843 trace
.file
= LOCATE_string_search
;
845 variable
[1] = param0
;
846 variable
[2] = param1
;
847 variable
[4] = variable
[0];
848 variable
[4] = CALL_string_search___Pattern___search_in( variable
[1] /*p*/)( variable
[1] /*p*/, variable
[4], variable
[2] /*from*/) /*Pattern::search_in*/;
849 variable
[3] = variable
[4];
851 return_label38
: while(false);
852 tracehead
= trace
.prev
;
855 val_t
string_search___String___search_all(val_t self
, val_t param0
) {
856 struct trace_t trace
= {NULL
, NULL
, 291, LOCATE_string_search___String___search_all
};
858 void **closurevariable
= NULL
;
859 trace
.prev
= tracehead
; tracehead
= &trace
;
860 trace
.file
= LOCATE_string_search
;
862 variable
[1] = param0
;
863 variable
[3] = variable
[0];
864 variable
[3] = CALL_string_search___Pattern___search_all_in( variable
[1] /*p*/)( variable
[1] /*p*/, variable
[3]) /*Pattern::search_all_in*/;
865 variable
[2] = variable
[3];
867 return_label39
: while(false);
868 tracehead
= trace
.prev
;
871 val_t
string_search___String___split_with(val_t self
, val_t param0
) {
872 struct trace_t trace
= {NULL
, NULL
, 300, LOCATE_string_search___String___split_with
};
874 void **closurevariable
= NULL
;
875 trace
.prev
= tracehead
; tracehead
= &trace
;
876 trace
.file
= LOCATE_string_search
;
878 variable
[1] = param0
;
879 variable
[4] = variable
[0];
880 variable
[4] = CALL_string_search___Pattern___split_in( variable
[1] /*p*/)( variable
[1] /*p*/, variable
[4]) /*Pattern::split_in*/;
881 variable
[3] = variable
[4];
882 variable
[5] = CALL_abstract_collection___Collection___length( variable
[3] /*matches*/)( variable
[3] /*matches*/) /*AbstractArray::length*/;
883 variable
[6] = NEW_Array_array___Array___with_capacity(variable
[5]); /*new Array[String]*/
884 variable
[5] = variable
[6];
885 variable
[4] = variable
[5];
886 variable
[5] = CALL_abstract_collection___Collection___iterator( variable
[3] /*matches*/)( variable
[3] /*matches*/) /*AbstractArray::iterator*/;
887 while (true) { /*for*/
888 variable
[6] = CALL_abstract_collection___Iterator___is_ok(variable
[5])(variable
[5]) /*ArrayIterator::is_ok*/;
889 if (!UNTAG_Bool(variable
[6])) break; /*for*/
890 variable
[6] = CALL_abstract_collection___Iterator___item(variable
[5])(variable
[5]) /*ArrayIterator::item*/;
891 variable
[7] = variable
[6];
892 variable
[8] = CALL_string___Object___to_s( variable
[7] /*m*/)( variable
[7] /*m*/) /*Match::to_s*/;
893 CALL_abstract_collection___SimpleCollection___add( variable
[4] /*res*/)( variable
[4] /*res*/, variable
[8]) /*AbstractArray::add*/;
894 continue_41
: while(0);
895 CALL_abstract_collection___Iterator___next(variable
[5])(variable
[5]) /*ArrayIterator::next*/;
898 variable
[2] = variable
[4] /*res*/;
900 return_label40
: while(false);
901 tracehead
= trace
.prev
;
904 val_t
string_search___String___split(val_t self
) {
905 struct trace_t trace
= {NULL
, NULL
, 310, LOCATE_string_search___String___split
};
907 void **closurevariable
= NULL
;
908 trace
.prev
= tracehead
; tracehead
= &trace
;
909 trace
.file
= LOCATE_string_search
;
911 variable
[2] = variable
[0];
912 variable
[2] = CALL_string_search___String___split_with(variable
[2])(variable
[2], TAG_Char('\n')) /*String::split_with*/;
913 variable
[1] = variable
[2];
915 return_label42
: while(false);
916 tracehead
= trace
.prev
;