1 | #include <rf_core.hh> |
---|
2 | #include <refal/Arithm.hh> |
---|
3 | #include <refal/Apply.hh> |
---|
4 | #include <refal/Compare.hh> |
---|
5 | #include <refal/Convert.hh> |
---|
6 | #include <refal/Box.hh> |
---|
7 | #include <refal/Static.hh> |
---|
8 | #include <refal/Table.hh> |
---|
9 | #include <refal/StdIO.hh> |
---|
10 | #include <refal/RF_Stack.hh> |
---|
11 | |
---|
12 | namespace refal |
---|
13 | { |
---|
14 | |
---|
15 | using namespace rfrt; |
---|
16 | |
---|
17 | namespace Debug |
---|
18 | { |
---|
19 | |
---|
20 | static Expr Break_m_Funcs; |
---|
21 | |
---|
22 | static Expr Breakpoints; |
---|
23 | |
---|
24 | static Expr Ops; |
---|
25 | |
---|
26 | static Expr Break_m_Depth; |
---|
27 | |
---|
28 | static Expr Break_q_; |
---|
29 | |
---|
30 | static Expr Last_m_Depth; |
---|
31 | |
---|
32 | RF_DECL (Stop_q_); |
---|
33 | |
---|
34 | RF_DECL (Debug); |
---|
35 | |
---|
36 | RF_DECL (Cont); |
---|
37 | |
---|
38 | RF_DECL (Run); |
---|
39 | |
---|
40 | RF_DECL (Step); |
---|
41 | |
---|
42 | RF_DECL (Next); |
---|
43 | |
---|
44 | RF_DECL (Var); |
---|
45 | |
---|
46 | RF_DECL (Set_m_Break); |
---|
47 | |
---|
48 | RF_DECL (Clear_m_Break); |
---|
49 | |
---|
50 | RF_DECL (Set_m_Func); |
---|
51 | |
---|
52 | RF_DECL (Clear_m_Func); |
---|
53 | |
---|
54 | RF_DECL (Init); |
---|
55 | |
---|
56 | RF_DECL (Clear_m_Break__0); |
---|
57 | |
---|
58 | RF_DECL (Cont__0); |
---|
59 | |
---|
60 | RF_DECL (Clear_m_Func__0); |
---|
61 | |
---|
62 | RF_DECL (Run__0); |
---|
63 | |
---|
64 | RF_DECL (Set_m_Func__0); |
---|
65 | |
---|
66 | RF_DECL (Set_m_Break__0); |
---|
67 | |
---|
68 | RF_DECL (Var__0); |
---|
69 | |
---|
70 | RF_DECL (Step__0); |
---|
71 | |
---|
72 | RF_DECL (Next__0); |
---|
73 | |
---|
74 | static Expr _c_0; |
---|
75 | |
---|
76 | static Expr _c_1; |
---|
77 | |
---|
78 | static Expr _c_2; |
---|
79 | |
---|
80 | static Expr _c_3; |
---|
81 | |
---|
82 | static Expr _c_4; |
---|
83 | |
---|
84 | static Expr _c_5; |
---|
85 | |
---|
86 | static Expr _c_6; |
---|
87 | |
---|
88 | static Expr _c_7; |
---|
89 | |
---|
90 | static Expr _c_8; |
---|
91 | |
---|
92 | static Expr _c_9; |
---|
93 | |
---|
94 | static Expr _c_10; |
---|
95 | |
---|
96 | static Expr _c_11; |
---|
97 | |
---|
98 | static Expr _c_12; |
---|
99 | |
---|
100 | static Expr _c_13; |
---|
101 | |
---|
102 | static Expr _c_14; |
---|
103 | |
---|
104 | static Expr _c_15; |
---|
105 | |
---|
106 | static Expr _c_16; |
---|
107 | |
---|
108 | static Expr _c_17; |
---|
109 | |
---|
110 | static Expr _c_18; |
---|
111 | |
---|
112 | static Expr _c_19; |
---|
113 | |
---|
114 | static Expr _c_20; |
---|
115 | |
---|
116 | static Expr _c_21; |
---|
117 | |
---|
118 | static Expr _c_22; |
---|
119 | |
---|
120 | static Expr _c_23; |
---|
121 | |
---|
122 | static Expr _c_24; |
---|
123 | |
---|
124 | static Expr _c_25; |
---|
125 | |
---|
126 | static Expr _c_26; |
---|
127 | |
---|
128 | static Expr _c_27; |
---|
129 | |
---|
130 | static Expr _c_28; |
---|
131 | |
---|
132 | static Expr _c_29; |
---|
133 | |
---|
134 | static Expr _c_30; |
---|
135 | |
---|
136 | static Expr _c_31; |
---|
137 | |
---|
138 | static Expr _c_32; |
---|
139 | |
---|
140 | static Expr _c_33; |
---|
141 | |
---|
142 | static Expr _c_34; |
---|
143 | |
---|
144 | static Expr _c_35; |
---|
145 | |
---|
146 | static Expr _c_36; |
---|
147 | |
---|
148 | static Expr _c_37; |
---|
149 | |
---|
150 | static Expr _c_38; |
---|
151 | |
---|
152 | static Expr _c_39; |
---|
153 | |
---|
154 | static Expr _c_40; |
---|
155 | |
---|
156 | RF_FUNC (Stop_q_, (RF_ARG _ve_point;;), RF_VOID) |
---|
157 | { |
---|
158 | { |
---|
159 | Expr _v__q_1; |
---|
160 | RF_CALL (Box::_q_, Break_q_, _v__q_1); |
---|
161 | { |
---|
162 | { |
---|
163 | if ((_v__q_1.get_len () != 1)) |
---|
164 | { |
---|
165 | goto _block2__branch1; |
---|
166 | } |
---|
167 | if (!_c_0.term_eq (_v__q_1, 0)) |
---|
168 | { |
---|
169 | goto _block2__branch1; |
---|
170 | } |
---|
171 | goto _block2; |
---|
172 | } |
---|
173 | _block2__branch1: {} |
---|
174 | if ((_v__q_1.get_len () != 1)) |
---|
175 | { |
---|
176 | goto _block1__branch1; |
---|
177 | } |
---|
178 | if (!_c_1.term_eq (_v__q_1, 0)) |
---|
179 | { |
---|
180 | goto _block1__branch1; |
---|
181 | } |
---|
182 | RF_RETFAIL; |
---|
183 | } |
---|
184 | _block2: {} |
---|
185 | goto _block1; |
---|
186 | } |
---|
187 | _block1__branch1: {} |
---|
188 | { |
---|
189 | Expr _v_Depth1; |
---|
190 | RF_CALL (RF__Stack::Depth, /*void*/, _v_Depth1); |
---|
191 | Expr _v__q_2; |
---|
192 | RF_CALL (Box::_q_, Break_m_Depth, _v__q_2); |
---|
193 | if (!RF_CALL (Compare::_lt__eq_, (_v_Depth1, _v__q_2), /*void*/)) |
---|
194 | { |
---|
195 | goto _block1__branch2; |
---|
196 | } |
---|
197 | goto _block1; |
---|
198 | } |
---|
199 | _block1__branch2: {} |
---|
200 | { |
---|
201 | if (!RF_CALL (Table::In_m_Table_q_, (Breakpoints, _ve_point), /*void*/)) |
---|
202 | { |
---|
203 | goto _block1__branch3; |
---|
204 | } |
---|
205 | goto _block1; |
---|
206 | } |
---|
207 | _block1__branch3: {} |
---|
208 | { |
---|
209 | Expr _v_Depth2; |
---|
210 | RF_CALL (RF__Stack::Depth, /*void*/, _v_Depth2); |
---|
211 | Expr _v__m_1; |
---|
212 | RF_CALL (Arithm::_m_, (_v_Depth2, _c_2), _v__m_1); |
---|
213 | Expr _v_Func1; |
---|
214 | if (!RF_CALL (RF__Stack::Func, _v__m_1, _v_Func1)) |
---|
215 | { |
---|
216 | goto _block1__branch4; |
---|
217 | } |
---|
218 | Expr _v_Name1; |
---|
219 | if (!RF_CALL (Static::Name, _v_Func1, _v_Name1)) |
---|
220 | { |
---|
221 | goto _block1__branch4; |
---|
222 | } |
---|
223 | if (!RF_CALL (Table::In_m_Table_q_, (Break_m_Funcs, _v_Name1), /*void*/)) |
---|
224 | { |
---|
225 | goto _block1__branch4; |
---|
226 | } |
---|
227 | Expr _v_Depth3; |
---|
228 | RF_CALL (RF__Stack::Depth, /*void*/, _v_Depth3); |
---|
229 | Expr _v__q_3; |
---|
230 | RF_CALL (Box::_q_, Last_m_Depth, _v__q_3); |
---|
231 | if (!RF_CALL (Compare::_gt_, (_v_Depth3, _v__q_3), /*void*/)) |
---|
232 | { |
---|
233 | goto _block1__branch4; |
---|
234 | } |
---|
235 | goto _block1; |
---|
236 | } |
---|
237 | _block1__branch4: {} |
---|
238 | Expr _v_Depth4; |
---|
239 | RF_CALL (RF__Stack::Depth, /*void*/, _v_Depth4); |
---|
240 | RF_CALL (Box::Store, (Last_m_Depth, _v_Depth4), /*void*/); |
---|
241 | RF_RETFAIL; |
---|
242 | } |
---|
243 | _block1: {} |
---|
244 | RF_CALL (Box::Store, (Break_q_, empty), /*void*/); |
---|
245 | RF_CALL (Box::Store, (Break_m_Depth, _c_3), /*void*/); |
---|
246 | Expr _v_Depth5; |
---|
247 | RF_CALL (RF__Stack::Depth, /*void*/, _v_Depth5); |
---|
248 | RF_CALL (Box::Store, (Last_m_Depth, _v_Depth5), /*void*/); |
---|
249 | RF_CALL (StdIO::Print, _c_4, /*void*/); |
---|
250 | Expr _v_RF__Stack1; |
---|
251 | if (!RF_CALL (RF__Stack::RF__Stack, (_c_5, _c_2), _v_RF__Stack1)) |
---|
252 | { |
---|
253 | RF_RETFAIL; |
---|
254 | } |
---|
255 | RF_CALL (StdIO::WriteLN, (_ve_point + _v_RF__Stack1), /*void*/); |
---|
256 | RF_END |
---|
257 | |
---|
258 | RF_FUNC (Debug, (RF_ARG _ve_nv;;), RF_VOID) |
---|
259 | { |
---|
260 | for ( ; ; ) |
---|
261 | { |
---|
262 | { |
---|
263 | { |
---|
264 | Expr _v_Read_m_Line1; |
---|
265 | if (!RF_CALL (StdIO::Read_m_Line, /*void*/, _v_Read_m_Line1)) |
---|
266 | { |
---|
267 | goto _block2__branch1; |
---|
268 | } |
---|
269 | uintptr_t _v_len1 = _v_Read_m_Line1.get_len (); |
---|
270 | uintptr_t _v_len2 = 1; |
---|
271 | if ((_v_len1 < _v_len2)) |
---|
272 | { |
---|
273 | goto _block2__branch1; |
---|
274 | } |
---|
275 | uintptr_t _v_len__2 = (_v_len1 - _v_len2); |
---|
276 | if (!_v_Read_m_Line1.symbol_at (0)) |
---|
277 | { |
---|
278 | goto _block2__branch1; |
---|
279 | } |
---|
280 | Expr _vs_1 (_v_Read_m_Line1, 0, 1); |
---|
281 | Expr _ve_2 (_v_Read_m_Line1, 1, _v_len__2); |
---|
282 | Expr _v_Lookup1; |
---|
283 | if (!RF_CALL (Table::Lookup, (Ops, _vs_1), _v_Lookup1)) |
---|
284 | { |
---|
285 | goto _block2__branch1; |
---|
286 | } |
---|
287 | if ((_v_Lookup1.get_len () != 1)) |
---|
288 | { |
---|
289 | goto _block2__branch1; |
---|
290 | } |
---|
291 | if (!_v_Lookup1.symbol_at (0)) |
---|
292 | { |
---|
293 | goto _block2__branch1; |
---|
294 | } |
---|
295 | Expr _vs_op (_v_Lookup1, 0, 1); |
---|
296 | Expr _v_Apply1; |
---|
297 | if (!RF_CALL (Apply::Apply, (_vs_op, (_ve_2 + _ve_nv ())), _v_Apply1)) |
---|
298 | { |
---|
299 | goto _block1__branch1; |
---|
300 | } |
---|
301 | uintptr_t _v_len3 = _v_Apply1.get_len (); |
---|
302 | uintptr_t _v_len4 = 0; |
---|
303 | if ((_v_len3 < _v_len4)) |
---|
304 | { |
---|
305 | goto _block1__branch1; |
---|
306 | } |
---|
307 | uintptr_t _v_len___e__e_tmp_m_Debugrf_m_29_m_32 = (_v_len3 - _v_len4); |
---|
308 | Expr _ve__e__e_tmp_m_Debugrf_m_29_m_32 (_v_Apply1, 0, _v_len___e__e_tmp_m_Debugrf_m_29_m_32); |
---|
309 | goto _block2; |
---|
310 | } |
---|
311 | _block2__branch1: {} |
---|
312 | { |
---|
313 | Expr _v_Entries1; |
---|
314 | RF_CALL (Table::Entries, Ops, _v_Entries1); |
---|
315 | if ((_v_Entries1.get_len () < 1)) |
---|
316 | { |
---|
317 | goto _block2__branch2; |
---|
318 | } |
---|
319 | RF_lsplit (_v_Entries1, 0, _ve__e__e_tmp_m_Debugrf_m_30_m_23, _v_lsplit__Entries1); |
---|
320 | for ( ; ; RF_iter(_v_Entries1)++) |
---|
321 | { |
---|
322 | { |
---|
323 | if (!RF_iter(_v_Entries1)) |
---|
324 | { |
---|
325 | goto _block2__branch2; |
---|
326 | } |
---|
327 | uintptr_t _v_len5 = _v_lsplit__Entries1.get_len (); |
---|
328 | uintptr_t _v_len6 = 1; |
---|
329 | if ((_v_len5 < _v_len6)) |
---|
330 | { |
---|
331 | goto _block2__branch2; |
---|
332 | } |
---|
333 | uintptr_t _v_len___e__e_tmp_m_Debugrf_m_30_m_42 = (_v_len5 - _v_len6); |
---|
334 | if (_v_lsplit__Entries1.symbol_at (0)) |
---|
335 | { |
---|
336 | goto _continue1; |
---|
337 | } |
---|
338 | Expr _v_deref__lsplit__Entries1 (_v_lsplit__Entries1, 0); |
---|
339 | if ((_v_deref__lsplit__Entries1.get_len () != 2)) |
---|
340 | { |
---|
341 | goto _continue1; |
---|
342 | } |
---|
343 | if (_v_deref__lsplit__Entries1.symbol_at (0)) |
---|
344 | { |
---|
345 | goto _continue1; |
---|
346 | } |
---|
347 | if (_v_deref__lsplit__Entries1.symbol_at (1)) |
---|
348 | { |
---|
349 | goto _continue1; |
---|
350 | } |
---|
351 | Expr _v_deref__deref__lsplit__Entries1 (_v_deref__lsplit__Entries1, 0); |
---|
352 | Expr _v_deref__deref__lsplit__Entries12 (_v_deref__lsplit__Entries1, 1); |
---|
353 | if ((_v_deref__deref__lsplit__Entries12.get_len () != 1)) |
---|
354 | { |
---|
355 | goto _continue1; |
---|
356 | } |
---|
357 | uintptr_t _v_len7 = _v_deref__deref__lsplit__Entries1.get_len (); |
---|
358 | uintptr_t _v_len8 = 0; |
---|
359 | if ((_v_len7 < _v_len8)) |
---|
360 | { |
---|
361 | goto _continue1; |
---|
362 | } |
---|
363 | uintptr_t _v_len__key = (_v_len7 - _v_len8); |
---|
364 | if (!_v_deref__deref__lsplit__Entries12.symbol_at (0)) |
---|
365 | { |
---|
366 | goto _continue1; |
---|
367 | } |
---|
368 | Expr _ve__e__e_tmp_m_Debugrf_m_30_m_42 (_v_lsplit__Entries1, 1, _v_len___e__e_tmp_m_Debugrf_m_30_m_42); |
---|
369 | Expr _ve_key (_v_deref__deref__lsplit__Entries1, 0, _v_len__key); |
---|
370 | Expr _vs_op (_v_deref__deref__lsplit__Entries12, 0, 1); |
---|
371 | RF_CALL (StdIO::Print, _ve_key, /*void*/); |
---|
372 | Expr _v_Apply2; |
---|
373 | if (!RF_CALL (Apply::Apply, (_vs_op, _c_6), _v_Apply2)) |
---|
374 | { |
---|
375 | goto _continue1; |
---|
376 | } |
---|
377 | uintptr_t _v_len9 = _v_Apply2.get_len (); |
---|
378 | uintptr_t _v_len10 = 0; |
---|
379 | if ((_v_len9 < _v_len10)) |
---|
380 | { |
---|
381 | goto _continue1; |
---|
382 | } |
---|
383 | uintptr_t _v_len___e__e_tmp_m_Debugrf_m_31_m_45 = (_v_len9 - _v_len10); |
---|
384 | Expr _ve__e__e_tmp_m_Debugrf_m_31_m_45 (_v_Apply2, 0, _v_len___e__e_tmp_m_Debugrf_m_31_m_45); |
---|
385 | goto _continue1; |
---|
386 | } |
---|
387 | _continue1: {} |
---|
388 | } |
---|
389 | } |
---|
390 | _block2__branch2: {} |
---|
391 | } |
---|
392 | _block2: {} |
---|
393 | } |
---|
394 | } |
---|
395 | _block1__branch1: {} |
---|
396 | RF_END |
---|
397 | |
---|
398 | RF_FUNC (Cont, (RF_ARG _ve_arg, _ve_nv;;), RF_VOID) |
---|
399 | { |
---|
400 | { |
---|
401 | if ((_ve_arg.get_len () != 1)) |
---|
402 | { |
---|
403 | goto _block1__branch1; |
---|
404 | } |
---|
405 | if (!_c_7.term_eq (_ve_arg, 0)) |
---|
406 | { |
---|
407 | goto _block1__branch1; |
---|
408 | } |
---|
409 | RF_TAILCALL (StdIO::PrintLN, _c_8, /*void*/); |
---|
410 | goto _block1; |
---|
411 | } |
---|
412 | _block1__branch1: {} |
---|
413 | uintptr_t _v_len1 = _ve_arg.get_len (); |
---|
414 | uintptr_t _v_len2 = 0; |
---|
415 | if (((_v_len1 < (_v_len2 + (0 * 1))))) |
---|
416 | { |
---|
417 | RF_FUNC_ERROR (unexpected_fail); |
---|
418 | } |
---|
419 | if (((_v_len1 - _v_len2) % 1)) |
---|
420 | { |
---|
421 | RF_FUNC_ERROR (unexpected_fail); |
---|
422 | } |
---|
423 | uintptr_t _v_len___e__e_tmp_m_Debugrf_m_42_m_6 = ((_v_len1 - _v_len2) / 1); |
---|
424 | Expr _ve__e__e_tmp_m_Debugrf_m_42_m_6 (_ve_arg, 0, _v_len___e__e_tmp_m_Debugrf_m_42_m_6); |
---|
425 | RF_RETFAIL; |
---|
426 | } |
---|
427 | _block1: {} |
---|
428 | RF_END |
---|
429 | |
---|
430 | RF_FUNC (Run, (RF_ARG _ve_arg, _ve_nv;;), RF_VOID) |
---|
431 | { |
---|
432 | { |
---|
433 | if ((_ve_arg.get_len () != 1)) |
---|
434 | { |
---|
435 | goto _block1__branch1; |
---|
436 | } |
---|
437 | if (!_c_7.term_eq (_ve_arg, 0)) |
---|
438 | { |
---|
439 | goto _block1__branch1; |
---|
440 | } |
---|
441 | RF_TAILCALL (StdIO::PrintLN, _c_9, /*void*/); |
---|
442 | goto _block1; |
---|
443 | } |
---|
444 | _block1__branch1: {} |
---|
445 | uintptr_t _v_len1 = _ve_arg.get_len (); |
---|
446 | uintptr_t _v_len2 = 0; |
---|
447 | if (((_v_len1 < (_v_len2 + (0 * 1))))) |
---|
448 | { |
---|
449 | RF_FUNC_ERROR (unexpected_fail); |
---|
450 | } |
---|
451 | if (((_v_len1 - _v_len2) % 1)) |
---|
452 | { |
---|
453 | RF_FUNC_ERROR (unexpected_fail); |
---|
454 | } |
---|
455 | uintptr_t _v_len___e__e_tmp_m_Debugrf_m_50_m_6 = ((_v_len1 - _v_len2) / 1); |
---|
456 | Expr _ve__e__e_tmp_m_Debugrf_m_50_m_6 (_ve_arg, 0, _v_len___e__e_tmp_m_Debugrf_m_50_m_6); |
---|
457 | RF_CALL (Box::Store, (Break_q_, _c_1), /*void*/); |
---|
458 | RF_RETFAIL; |
---|
459 | } |
---|
460 | _block1: {} |
---|
461 | RF_END |
---|
462 | |
---|
463 | RF_FUNC (Step, (RF_ARG _ve_arg, _ve_nv;;), RF_VOID) |
---|
464 | { |
---|
465 | { |
---|
466 | if ((_ve_arg.get_len () != 1)) |
---|
467 | { |
---|
468 | goto _block1__branch1; |
---|
469 | } |
---|
470 | if (!_c_7.term_eq (_ve_arg, 0)) |
---|
471 | { |
---|
472 | goto _block1__branch1; |
---|
473 | } |
---|
474 | RF_TAILCALL (StdIO::PrintLN, _c_10, /*void*/); |
---|
475 | goto _block1; |
---|
476 | } |
---|
477 | _block1__branch1: {} |
---|
478 | uintptr_t _v_len1 = _ve_arg.get_len (); |
---|
479 | uintptr_t _v_len2 = 0; |
---|
480 | if (((_v_len1 < (_v_len2 + (0 * 1))))) |
---|
481 | { |
---|
482 | RF_FUNC_ERROR (unexpected_fail); |
---|
483 | } |
---|
484 | if (((_v_len1 - _v_len2) % 1)) |
---|
485 | { |
---|
486 | RF_FUNC_ERROR (unexpected_fail); |
---|
487 | } |
---|
488 | uintptr_t _v_len___e__e_tmp_m_Debugrf_m_60_m_6 = ((_v_len1 - _v_len2) / 1); |
---|
489 | Expr _ve__e__e_tmp_m_Debugrf_m_60_m_6 (_ve_arg, 0, _v_len___e__e_tmp_m_Debugrf_m_60_m_6); |
---|
490 | RF_CALL (Box::Store, (Break_q_, _c_0), /*void*/); |
---|
491 | RF_RETFAIL; |
---|
492 | } |
---|
493 | _block1: {} |
---|
494 | RF_END |
---|
495 | |
---|
496 | RF_FUNC (Next, (RF_ARG _ve_arg, _ve_nv;;), RF_VOID) |
---|
497 | { |
---|
498 | { |
---|
499 | if ((_ve_arg.get_len () != 1)) |
---|
500 | { |
---|
501 | goto _block1__branch1; |
---|
502 | } |
---|
503 | if (!_c_7.term_eq (_ve_arg, 0)) |
---|
504 | { |
---|
505 | goto _block1__branch1; |
---|
506 | } |
---|
507 | RF_TAILCALL (StdIO::PrintLN, _c_11, /*void*/); |
---|
508 | goto _block1; |
---|
509 | } |
---|
510 | _block1__branch1: {} |
---|
511 | uintptr_t _v_len1 = _ve_arg.get_len (); |
---|
512 | uintptr_t _v_len2 = 0; |
---|
513 | if (((_v_len1 < (_v_len2 + (0 * 1))))) |
---|
514 | { |
---|
515 | RF_FUNC_ERROR (unexpected_fail); |
---|
516 | } |
---|
517 | if (((_v_len1 - _v_len2) % 1)) |
---|
518 | { |
---|
519 | RF_FUNC_ERROR (unexpected_fail); |
---|
520 | } |
---|
521 | uintptr_t _v_len___e__e_tmp_m_Debugrf_m_70_m_6 = ((_v_len1 - _v_len2) / 1); |
---|
522 | Expr _ve__e__e_tmp_m_Debugrf_m_70_m_6 (_ve_arg, 0, _v_len___e__e_tmp_m_Debugrf_m_70_m_6); |
---|
523 | Expr _v_Depth1; |
---|
524 | RF_CALL (RF__Stack::Depth, /*void*/, _v_Depth1); |
---|
525 | Expr _v__m_1; |
---|
526 | RF_CALL (Arithm::_m_, (_v_Depth1, _c_5), _v__m_1); |
---|
527 | RF_CALL (Box::Store, (Break_m_Depth, _v__m_1), /*void*/); |
---|
528 | RF_RETFAIL; |
---|
529 | } |
---|
530 | _block1: {} |
---|
531 | RF_END |
---|
532 | |
---|
533 | RF_FUNC (Var, (RF_ARG _ve_arg, _ve_nv;;), RF_VOID) |
---|
534 | { |
---|
535 | { |
---|
536 | if ((_ve_arg.get_len () != 1)) |
---|
537 | { |
---|
538 | goto _block1__branch1; |
---|
539 | } |
---|
540 | if (!_c_7.term_eq (_ve_arg, 0)) |
---|
541 | { |
---|
542 | goto _block1__branch1; |
---|
543 | } |
---|
544 | RF_TAILCALL (StdIO::PrintLN, _c_12, /*void*/); |
---|
545 | goto _block1; |
---|
546 | } |
---|
547 | _block1__branch1: {} |
---|
548 | { |
---|
549 | uintptr_t _v_len1 = _ve_arg.get_len (); |
---|
550 | uintptr_t _v_len2 = 0; |
---|
551 | if ((_v_len1 < (_v_len2 + 1))) |
---|
552 | { |
---|
553 | goto _block1__branch2; |
---|
554 | } |
---|
555 | uintptr_t _v_len__name = (_v_len1 - _v_len2); |
---|
556 | Expr _vv_name (_ve_arg, 0, _v_len__name); |
---|
557 | { |
---|
558 | { |
---|
559 | if ((_ve_nv.get_len () < 1)) |
---|
560 | { |
---|
561 | goto _block2__branch1; |
---|
562 | } |
---|
563 | RF_lsplit (_ve_nv, 0, _ve__e__e_tmp_m_Debugrf_m_81_m_14, _v_lsplit__nv); |
---|
564 | for ( ; ; RF_iter(_ve_nv)++) |
---|
565 | { |
---|
566 | { |
---|
567 | if (!RF_iter(_ve_nv)) |
---|
568 | { |
---|
569 | goto _block2__branch1; |
---|
570 | } |
---|
571 | uintptr_t _v_len3 = _v_lsplit__nv.get_len (); |
---|
572 | uintptr_t _v_len4 = 1; |
---|
573 | if ((_v_len3 < _v_len4)) |
---|
574 | { |
---|
575 | goto _block2__branch1; |
---|
576 | } |
---|
577 | uintptr_t _v_len___e__e_tmp_m_Debugrf_m_81_m_35 = (_v_len3 - _v_len4); |
---|
578 | if (_v_lsplit__nv.symbol_at (0)) |
---|
579 | { |
---|
580 | goto _continue1; |
---|
581 | } |
---|
582 | Expr _v_deref__lsplit__nv (_v_lsplit__nv, 0); |
---|
583 | if ((_v_deref__lsplit__nv.get_len () != (_v_len__name + 1))) |
---|
584 | { |
---|
585 | goto _continue1; |
---|
586 | } |
---|
587 | if (_v_deref__lsplit__nv.symbol_at (_v_len__name)) |
---|
588 | { |
---|
589 | goto _continue1; |
---|
590 | } |
---|
591 | Expr _v_deref__deref__lsplit__nv (_v_deref__lsplit__nv, _v_len__name); |
---|
592 | uintptr_t _v_len5 = _v_deref__deref__lsplit__nv.get_len (); |
---|
593 | uintptr_t _v_len6 = 0; |
---|
594 | if ((_v_len5 < _v_len6)) |
---|
595 | { |
---|
596 | goto _continue1; |
---|
597 | } |
---|
598 | uintptr_t _v_len__value = (_v_len5 - _v_len6); |
---|
599 | if (!_vv_name.eq (_v_deref__lsplit__nv, 0)) |
---|
600 | { |
---|
601 | goto _continue1; |
---|
602 | } |
---|
603 | Expr _ve__e__e_tmp_m_Debugrf_m_81_m_35 (_v_lsplit__nv, 1, _v_len___e__e_tmp_m_Debugrf_m_81_m_35); |
---|
604 | Expr _ve_value (_v_deref__deref__lsplit__nv, 0, _v_len__value); |
---|
605 | RF_TAILCALL (StdIO::WriteLN, _ve_value, /*void*/); |
---|
606 | goto _exit1; |
---|
607 | } |
---|
608 | _continue1: {} |
---|
609 | } |
---|
610 | _exit1: {} |
---|
611 | goto _block2; |
---|
612 | } |
---|
613 | _block2__branch1: {} |
---|
614 | RF_TAILCALL (StdIO::PrintLN, (_c_13 + _vv_name), /*void*/); |
---|
615 | } |
---|
616 | _block2: {} |
---|
617 | goto _block1; |
---|
618 | } |
---|
619 | _block1__branch2: {} |
---|
620 | if ((_ve_arg.get_len () != 0)) |
---|
621 | { |
---|
622 | RF_FUNC_ERROR (unexpected_fail); |
---|
623 | } |
---|
624 | { |
---|
625 | if ((_ve_nv.get_len () < 1)) |
---|
626 | { |
---|
627 | goto _block3__branch1; |
---|
628 | } |
---|
629 | RF_lsplit (_ve_nv, 0, _ve__e__e_tmp_m_Debugrf_m_85_m_14, _v_lsplit__nv2); |
---|
630 | for ( ; ; RF_iter(_ve_nv)++) |
---|
631 | { |
---|
632 | { |
---|
633 | if (!RF_iter(_ve_nv)) |
---|
634 | { |
---|
635 | goto _block3__branch1; |
---|
636 | } |
---|
637 | uintptr_t _v_len7 = _v_lsplit__nv2.get_len (); |
---|
638 | uintptr_t _v_len8 = 1; |
---|
639 | if ((_v_len7 < _v_len8)) |
---|
640 | { |
---|
641 | goto _block3__branch1; |
---|
642 | } |
---|
643 | uintptr_t _v_len___e__e_tmp_m_Debugrf_m_85_m_35 = (_v_len7 - _v_len8); |
---|
644 | if (_v_lsplit__nv2.symbol_at (0)) |
---|
645 | { |
---|
646 | goto _continue2; |
---|
647 | } |
---|
648 | Expr _v_deref__lsplit__nv2 (_v_lsplit__nv2, 0); |
---|
649 | uintptr_t _v_len9 = _v_deref__lsplit__nv2.get_len (); |
---|
650 | uintptr_t _v_len10 = 1; |
---|
651 | if ((_v_len9 < _v_len10)) |
---|
652 | { |
---|
653 | goto _continue2; |
---|
654 | } |
---|
655 | uintptr_t _v_len__name2 = (_v_len9 - _v_len10); |
---|
656 | if (_v_deref__lsplit__nv2.symbol_at (_v_len__name2)) |
---|
657 | { |
---|
658 | goto _continue2; |
---|
659 | } |
---|
660 | Expr _v_deref__deref__lsplit__nv2 (_v_deref__lsplit__nv2, _v_len__name2); |
---|
661 | uintptr_t _v_len11 = _v_deref__deref__lsplit__nv2.get_len (); |
---|
662 | uintptr_t _v_len12 = 0; |
---|
663 | if ((_v_len11 < _v_len12)) |
---|
664 | { |
---|
665 | goto _continue2; |
---|
666 | } |
---|
667 | uintptr_t _v_len__value2 = (_v_len11 - _v_len12); |
---|
668 | Expr _ve__e__e_tmp_m_Debugrf_m_85_m_35 (_v_lsplit__nv2, 1, _v_len___e__e_tmp_m_Debugrf_m_85_m_35); |
---|
669 | Expr _ve_name (_v_deref__lsplit__nv2, 0, _v_len__name2); |
---|
670 | Expr _ve_value (_v_deref__deref__lsplit__nv2, 0, _v_len__value2); |
---|
671 | RF_CALL (StdIO::Print, _c_14, /*void*/); |
---|
672 | RF_CALL (StdIO::Write, _ve_name, /*void*/); |
---|
673 | RF_CALL (StdIO::Print, _c_15, /*void*/); |
---|
674 | RF_CALL (StdIO::WriteLN, _ve_value, /*void*/); |
---|
675 | goto _continue2; |
---|
676 | } |
---|
677 | _continue2: {} |
---|
678 | } |
---|
679 | } |
---|
680 | _block3__branch1: {} |
---|
681 | } |
---|
682 | _block1: {} |
---|
683 | RF_END |
---|
684 | |
---|
685 | RF_FUNC (Set_m_Break, (RF_ARG _ve_arg, _ve_nv;;), RF_VOID) |
---|
686 | { |
---|
687 | { |
---|
688 | if ((_ve_arg.get_len () != 1)) |
---|
689 | { |
---|
690 | goto _block1__branch1; |
---|
691 | } |
---|
692 | if (!_c_7.term_eq (_ve_arg, 0)) |
---|
693 | { |
---|
694 | goto _block1__branch1; |
---|
695 | } |
---|
696 | RF_TAILCALL (StdIO::PrintLN, _c_16, /*void*/); |
---|
697 | goto _block1; |
---|
698 | } |
---|
699 | _block1__branch1: {} |
---|
700 | { |
---|
701 | if ((_ve_arg.get_len () < 2)) |
---|
702 | { |
---|
703 | goto _block1__branch2; |
---|
704 | } |
---|
705 | RF_rsplit (_ve_arg, 0, _v_rsplit__arg, _ve_column); |
---|
706 | for ( ; ; RF_iter(_ve_arg)--) |
---|
707 | { |
---|
708 | { |
---|
709 | if (!RF_iter(_ve_arg)) |
---|
710 | { |
---|
711 | goto _block1__branch2; |
---|
712 | } |
---|
713 | if ((_v_rsplit__arg.get_len () < 2)) |
---|
714 | { |
---|
715 | goto _block1__branch2; |
---|
716 | } |
---|
717 | if (!_c_17.term_eq (_v_rsplit__arg, (_v_rsplit__arg.get_len () - 1))) |
---|
718 | { |
---|
719 | goto _continue1; |
---|
720 | } |
---|
721 | Expr _v_subexpr__rsplit__arg (_v_rsplit__arg, 0, (_v_rsplit__arg.get_len () - 1)); |
---|
722 | RF_rsplit (_v_subexpr__rsplit__arg, 0, _v_rsplit__rsplit__arg, _ve_line); |
---|
723 | for ( ; ; RF_iter(_v_subexpr__rsplit__arg)--) |
---|
724 | { |
---|
725 | { |
---|
726 | if (!RF_iter(_v_subexpr__rsplit__arg)) |
---|
727 | { |
---|
728 | goto _continue1; |
---|
729 | } |
---|
730 | uintptr_t _v_len1 = _v_rsplit__rsplit__arg.get_len (); |
---|
731 | uintptr_t _v_len2 = 1; |
---|
732 | if ((_v_len1 < _v_len2)) |
---|
733 | { |
---|
734 | goto _continue1; |
---|
735 | } |
---|
736 | uintptr_t _v_len__fname = (_v_len1 - _v_len2); |
---|
737 | if (!_c_17.term_eq (_v_rsplit__rsplit__arg, _v_len__fname)) |
---|
738 | { |
---|
739 | goto _continue2; |
---|
740 | } |
---|
741 | Expr _ve_fname (_v_rsplit__rsplit__arg, 0, _v_len__fname); |
---|
742 | Expr _v_To_m_Int1; |
---|
743 | if (!RF_CALL (Convert::To_m_Int, _ve_line, _v_To_m_Int1)) |
---|
744 | { |
---|
745 | goto _continue2; |
---|
746 | } |
---|
747 | Expr _v_To_m_Int2; |
---|
748 | if (!RF_CALL (Convert::To_m_Int, _ve_column, _v_To_m_Int2)) |
---|
749 | { |
---|
750 | goto _continue2; |
---|
751 | } |
---|
752 | RF_CALL (Table::Bind, (Breakpoints, (_ve_fname + _v_To_m_Int1 + _v_To_m_Int2), empty), /*void*/); |
---|
753 | goto _continue2; |
---|
754 | } |
---|
755 | _continue2: {} |
---|
756 | } |
---|
757 | } |
---|
758 | _continue1: {} |
---|
759 | } |
---|
760 | } |
---|
761 | _block1__branch2: {} |
---|
762 | uintptr_t _v_len3 = _ve_arg.get_len (); |
---|
763 | uintptr_t _v_len4 = 0; |
---|
764 | if ((_v_len3 < _v_len4)) |
---|
765 | { |
---|
766 | RF_FUNC_ERROR (unexpected_fail); |
---|
767 | } |
---|
768 | uintptr_t _v_len___e__e_tmp_m_Debugrf_m_99_m_6 = (_v_len3 - _v_len4); |
---|
769 | Expr _ve__e__e_tmp_m_Debugrf_m_99_m_6 (_ve_arg, 0, _v_len___e__e_tmp_m_Debugrf_m_99_m_6); |
---|
770 | RF_CALL (StdIO::Print, _c_18, /*void*/); |
---|
771 | Expr _v_Domain1; |
---|
772 | RF_CALL (Table::Domain, Breakpoints, _v_Domain1); |
---|
773 | RF_CALL (StdIO::WriteLN, _v_Domain1, /*void*/); |
---|
774 | } |
---|
775 | _block1: {} |
---|
776 | RF_END |
---|
777 | |
---|
778 | RF_FUNC (Clear_m_Break, (RF_ARG _ve_arg, _ve_nv;;), RF_VOID) |
---|
779 | { |
---|
780 | { |
---|
781 | if ((_ve_arg.get_len () != 1)) |
---|
782 | { |
---|
783 | goto _block1__branch1; |
---|
784 | } |
---|
785 | if (!_c_7.term_eq (_ve_arg, 0)) |
---|
786 | { |
---|
787 | goto _block1__branch1; |
---|
788 | } |
---|
789 | RF_TAILCALL (StdIO::PrintLN, _c_19, /*void*/); |
---|
790 | goto _block1; |
---|
791 | } |
---|
792 | _block1__branch1: {} |
---|
793 | { |
---|
794 | if ((_ve_arg.get_len () < 2)) |
---|
795 | { |
---|
796 | goto _block1__branch2; |
---|
797 | } |
---|
798 | RF_lsplit (_ve_arg, 0, _ve_fname, _v_lsplit__arg); |
---|
799 | for ( ; ; RF_iter(_ve_arg)++) |
---|
800 | { |
---|
801 | { |
---|
802 | if (!RF_iter(_ve_arg)) |
---|
803 | { |
---|
804 | goto _block1__branch2; |
---|
805 | } |
---|
806 | if ((_v_lsplit__arg.get_len () < 2)) |
---|
807 | { |
---|
808 | goto _block1__branch2; |
---|
809 | } |
---|
810 | if (!_c_17.term_eq (_v_lsplit__arg, 0)) |
---|
811 | { |
---|
812 | goto _continue1; |
---|
813 | } |
---|
814 | Expr _v_subexpr__lsplit__arg (_v_lsplit__arg, 1, (_v_lsplit__arg.get_len () - 1)); |
---|
815 | RF_lsplit (_v_subexpr__lsplit__arg, 0, _ve_line, _v_lsplit__lsplit__arg); |
---|
816 | for ( ; ; RF_iter(_v_subexpr__lsplit__arg)++) |
---|
817 | { |
---|
818 | { |
---|
819 | if (!RF_iter(_v_subexpr__lsplit__arg)) |
---|
820 | { |
---|
821 | goto _continue1; |
---|
822 | } |
---|
823 | uintptr_t _v_len1 = _v_lsplit__lsplit__arg.get_len (); |
---|
824 | uintptr_t _v_len2 = 1; |
---|
825 | if ((_v_len1 < _v_len2)) |
---|
826 | { |
---|
827 | goto _continue1; |
---|
828 | } |
---|
829 | uintptr_t _v_len__column = (_v_len1 - _v_len2); |
---|
830 | if (!_c_17.term_eq (_v_lsplit__lsplit__arg, 0)) |
---|
831 | { |
---|
832 | goto _continue2; |
---|
833 | } |
---|
834 | Expr _ve_column (_v_lsplit__lsplit__arg, 1, _v_len__column); |
---|
835 | Expr _v_To_m_Int1; |
---|
836 | if (!RF_CALL (Convert::To_m_Int, _ve_line, _v_To_m_Int1)) |
---|
837 | { |
---|
838 | goto _continue2; |
---|
839 | } |
---|
840 | Expr _v_To_m_Int2; |
---|
841 | if (!RF_CALL (Convert::To_m_Int, _ve_column, _v_To_m_Int2)) |
---|
842 | { |
---|
843 | goto _continue2; |
---|
844 | } |
---|
845 | RF_CALL (Table::Unbind, (Breakpoints, (_ve_fname + _v_To_m_Int1 + _v_To_m_Int2)), /*void*/); |
---|
846 | goto _continue2; |
---|
847 | } |
---|
848 | _continue2: {} |
---|
849 | } |
---|
850 | } |
---|
851 | _continue1: {} |
---|
852 | } |
---|
853 | } |
---|
854 | _block1__branch2: {} |
---|
855 | uintptr_t _v_len3 = _ve_arg.get_len (); |
---|
856 | uintptr_t _v_len4 = 0; |
---|
857 | if ((_v_len3 < _v_len4)) |
---|
858 | { |
---|
859 | RF_FUNC_ERROR (unexpected_fail); |
---|
860 | } |
---|
861 | uintptr_t _v_len___e__e_tmp_m_Debugrf_m_110_m_6 = (_v_len3 - _v_len4); |
---|
862 | Expr _ve__e__e_tmp_m_Debugrf_m_110_m_6 (_ve_arg, 0, _v_len___e__e_tmp_m_Debugrf_m_110_m_6); |
---|
863 | RF_CALL (StdIO::PrintLN, _c_18, /*void*/); |
---|
864 | Expr _v_Domain1; |
---|
865 | RF_CALL (Table::Domain, Breakpoints, _v_Domain1); |
---|
866 | RF_CALL (StdIO::WriteLN, _v_Domain1, /*void*/); |
---|
867 | } |
---|
868 | _block1: {} |
---|
869 | RF_END |
---|
870 | |
---|
871 | RF_FUNC (Set_m_Func, (RF_ARG _ve_arg, _ve_nv;;), RF_VOID) |
---|
872 | { |
---|
873 | { |
---|
874 | if ((_ve_arg.get_len () != 1)) |
---|
875 | { |
---|
876 | goto _block1__branch1; |
---|
877 | } |
---|
878 | if (!_c_7.term_eq (_ve_arg, 0)) |
---|
879 | { |
---|
880 | goto _block1__branch1; |
---|
881 | } |
---|
882 | RF_TAILCALL (StdIO::PrintLN, _c_20, /*void*/); |
---|
883 | goto _block1; |
---|
884 | } |
---|
885 | _block1__branch1: {} |
---|
886 | { |
---|
887 | uintptr_t _v_len1 = _ve_arg.get_len (); |
---|
888 | uintptr_t _v_len2 = 0; |
---|
889 | if ((_v_len1 < (_v_len2 + 1))) |
---|
890 | { |
---|
891 | goto _block1__branch2; |
---|
892 | } |
---|
893 | uintptr_t _v_len__fname = (_v_len1 - _v_len2); |
---|
894 | Expr _vv_fname (_ve_arg, 0, _v_len__fname); |
---|
895 | Expr _v_To_m_Word1; |
---|
896 | RF_CALL (Convert::To_m_Word, _vv_fname, _v_To_m_Word1); |
---|
897 | RF_CALL (Table::Bind, (Break_m_Funcs, _v_To_m_Word1, empty), /*void*/); |
---|
898 | } |
---|
899 | _block1__branch2: {} |
---|
900 | uintptr_t _v_len3 = _ve_arg.get_len (); |
---|
901 | uintptr_t _v_len4 = 0; |
---|
902 | if ((_v_len3 < _v_len4)) |
---|
903 | { |
---|
904 | RF_FUNC_ERROR (unexpected_fail); |
---|
905 | } |
---|
906 | uintptr_t _v_len___e__e_tmp_m_Debugrf_m_121_m_6 = (_v_len3 - _v_len4); |
---|
907 | Expr _ve__e__e_tmp_m_Debugrf_m_121_m_6 (_ve_arg, 0, _v_len___e__e_tmp_m_Debugrf_m_121_m_6); |
---|
908 | RF_CALL (StdIO::Print, _c_21, /*void*/); |
---|
909 | Expr _v_Domain1; |
---|
910 | RF_CALL (Table::Domain, Break_m_Funcs, _v_Domain1); |
---|
911 | RF_CALL (StdIO::WriteLN, _v_Domain1, /*void*/); |
---|
912 | } |
---|
913 | _block1: {} |
---|
914 | RF_END |
---|
915 | |
---|
916 | RF_FUNC (Clear_m_Func, (RF_ARG _ve_arg, _ve_nv;;), RF_VOID) |
---|
917 | { |
---|
918 | { |
---|
919 | if ((_ve_arg.get_len () != 1)) |
---|
920 | { |
---|
921 | goto _block1__branch1; |
---|
922 | } |
---|
923 | if (!_c_7.term_eq (_ve_arg, 0)) |
---|
924 | { |
---|
925 | goto _block1__branch1; |
---|
926 | } |
---|
927 | RF_TAILCALL (StdIO::PrintLN, _c_22, /*void*/); |
---|
928 | goto _block1; |
---|
929 | } |
---|
930 | _block1__branch1: {} |
---|
931 | { |
---|
932 | uintptr_t _v_len1 = _ve_arg.get_len (); |
---|
933 | uintptr_t _v_len2 = 0; |
---|
934 | if ((_v_len1 < (_v_len2 + 1))) |
---|
935 | { |
---|
936 | goto _block1__branch2; |
---|
937 | } |
---|
938 | uintptr_t _v_len__fname = (_v_len1 - _v_len2); |
---|
939 | Expr _vv_fname (_ve_arg, 0, _v_len__fname); |
---|
940 | Expr _v_To_m_Word1; |
---|
941 | RF_CALL (Convert::To_m_Word, _vv_fname, _v_To_m_Word1); |
---|
942 | RF_CALL (Table::Unbind, (Break_m_Funcs, _v_To_m_Word1), /*void*/); |
---|
943 | } |
---|
944 | _block1__branch2: {} |
---|
945 | uintptr_t _v_len3 = _ve_arg.get_len (); |
---|
946 | uintptr_t _v_len4 = 0; |
---|
947 | if ((_v_len3 < _v_len4)) |
---|
948 | { |
---|
949 | RF_FUNC_ERROR (unexpected_fail); |
---|
950 | } |
---|
951 | uintptr_t _v_len___e__e_tmp_m_Debugrf_m_133_m_6 = (_v_len3 - _v_len4); |
---|
952 | Expr _ve__e__e_tmp_m_Debugrf_m_133_m_6 (_ve_arg, 0, _v_len___e__e_tmp_m_Debugrf_m_133_m_6); |
---|
953 | RF_CALL (StdIO::Print, _c_21, /*void*/); |
---|
954 | Expr _v_Domain1; |
---|
955 | RF_CALL (Table::Domain, Break_m_Funcs, _v_Domain1); |
---|
956 | RF_CALL (StdIO::WriteLN, _v_Domain1, /*void*/); |
---|
957 | } |
---|
958 | _block1: {} |
---|
959 | RF_END |
---|
960 | |
---|
961 | RF_FUNC (Init, RF_VOID, RF_VOID) |
---|
962 | RF_CALL (Box::Store, (Break_m_Depth, _c_3), /*void*/); |
---|
963 | RF_CALL (Table::Bind, (Ops, _c_23, _c_24), /*void*/); |
---|
964 | RF_CALL (Table::Bind, (Ops, _c_25, _c_26), /*void*/); |
---|
965 | RF_CALL (Table::Bind, (Ops, _c_27, _c_28), /*void*/); |
---|
966 | RF_CALL (Table::Bind, (Ops, _c_29, _c_30), /*void*/); |
---|
967 | RF_CALL (Table::Bind, (Ops, _c_14, _c_31), /*void*/); |
---|
968 | RF_CALL (Table::Bind, (Ops, _c_32, _c_33), /*void*/); |
---|
969 | RF_CALL (Table::Bind, (Ops, _c_34, _c_35), /*void*/); |
---|
970 | RF_CALL (Table::Bind, (Ops, _c_36, _c_37), /*void*/); |
---|
971 | RF_TAILCALL (Table::Bind, (Ops, _c_38, _c_39), /*void*/); |
---|
972 | RF_END |
---|
973 | |
---|
974 | RF_FUNC (Clear_m_Break__0, (RF_ARG _v_arg1;;), (RF_RES _v_res1;;)) |
---|
975 | uintptr_t _v_len1 = _v_arg1.get_len (); |
---|
976 | uintptr_t _v_len2 = 1; |
---|
977 | if (((_v_len1 < (_v_len2 + (0 * 1))))) |
---|
978 | { |
---|
979 | RF_ERROR (_c_40); |
---|
980 | } |
---|
981 | if (((_v_len1 - _v_len2) % 1)) |
---|
982 | { |
---|
983 | RF_ERROR (_c_40); |
---|
984 | } |
---|
985 | uintptr_t _v_len__stub1 = ((_v_len1 - _v_len2) / 1); |
---|
986 | if (_v_arg1.symbol_at ((0 + _v_len__stub1))) |
---|
987 | { |
---|
988 | RF_ERROR (_c_40); |
---|
989 | } |
---|
990 | Expr _v_deref__arg1 (_v_arg1, (0 + _v_len__stub1)); |
---|
991 | uintptr_t _v_len3 = _v_deref__arg1.get_len (); |
---|
992 | uintptr_t _v_len4 = 0; |
---|
993 | if (((_v_len3 < (_v_len4 + (0 * 1))))) |
---|
994 | { |
---|
995 | RF_ERROR (_c_40); |
---|
996 | } |
---|
997 | if (((_v_len3 - _v_len4) % 1)) |
---|
998 | { |
---|
999 | RF_ERROR (_c_40); |
---|
1000 | } |
---|
1001 | uintptr_t _v_len__stub2 = ((_v_len3 - _v_len4) / 1); |
---|
1002 | Expr _v_stub1 (_v_arg1, 0, _v_len__stub1); |
---|
1003 | Expr _v_stub2 (_v_deref__arg1, 0, _v_len__stub2); |
---|
1004 | RF_CALL (Clear_m_Break, (_v_stub1, _v_stub2), /*void*/); |
---|
1005 | _v_res1 = empty; |
---|
1006 | RF_END |
---|
1007 | |
---|
1008 | RF_FUNC (Cont__0, (RF_ARG _v_arg1;;), (RF_RES _v_res1;;)) |
---|
1009 | uintptr_t _v_len1 = _v_arg1.get_len (); |
---|
1010 | uintptr_t _v_len2 = 1; |
---|
1011 | if (((_v_len1 < (_v_len2 + (0 * 1))))) |
---|
1012 | { |
---|
1013 | RF_ERROR (_c_40); |
---|
1014 | } |
---|
1015 | if (((_v_len1 - _v_len2) % 1)) |
---|
1016 | { |
---|
1017 | RF_ERROR (_c_40); |
---|
1018 | } |
---|
1019 | uintptr_t _v_len__stub1 = ((_v_len1 - _v_len2) / 1); |
---|
1020 | if (_v_arg1.symbol_at ((0 + _v_len__stub1))) |
---|
1021 | { |
---|
1022 | RF_ERROR (_c_40); |
---|
1023 | } |
---|
1024 | Expr _v_deref__arg1 (_v_arg1, (0 + _v_len__stub1)); |
---|
1025 | uintptr_t _v_len3 = _v_deref__arg1.get_len (); |
---|
1026 | uintptr_t _v_len4 = 0; |
---|
1027 | if (((_v_len3 < (_v_len4 + (0 * 1))))) |
---|
1028 | { |
---|
1029 | RF_ERROR (_c_40); |
---|
1030 | } |
---|
1031 | if (((_v_len3 - _v_len4) % 1)) |
---|
1032 | { |
---|
1033 | RF_ERROR (_c_40); |
---|
1034 | } |
---|
1035 | uintptr_t _v_len__stub2 = ((_v_len3 - _v_len4) / 1); |
---|
1036 | Expr _v_stub1 (_v_arg1, 0, _v_len__stub1); |
---|
1037 | Expr _v_stub2 (_v_deref__arg1, 0, _v_len__stub2); |
---|
1038 | if (!RF_CALL (Cont, (_v_stub1, _v_stub2), /*void*/)) |
---|
1039 | { |
---|
1040 | RF_RETFAIL; |
---|
1041 | } |
---|
1042 | _v_res1 = empty; |
---|
1043 | RF_END |
---|
1044 | |
---|
1045 | RF_FUNC (Clear_m_Func__0, (RF_ARG _v_arg1;;), (RF_RES _v_res1;;)) |
---|
1046 | uintptr_t _v_len1 = _v_arg1.get_len (); |
---|
1047 | uintptr_t _v_len2 = 1; |
---|
1048 | if (((_v_len1 < (_v_len2 + (0 * 1))))) |
---|
1049 | { |
---|
1050 | RF_ERROR (_c_40); |
---|
1051 | } |
---|
1052 | if (((_v_len1 - _v_len2) % 1)) |
---|
1053 | { |
---|
1054 | RF_ERROR (_c_40); |
---|
1055 | } |
---|
1056 | uintptr_t _v_len__stub1 = ((_v_len1 - _v_len2) / 1); |
---|
1057 | if (_v_arg1.symbol_at ((0 + _v_len__stub1))) |
---|
1058 | { |
---|
1059 | RF_ERROR (_c_40); |
---|
1060 | } |
---|
1061 | Expr _v_deref__arg1 (_v_arg1, (0 + _v_len__stub1)); |
---|
1062 | uintptr_t _v_len3 = _v_deref__arg1.get_len (); |
---|
1063 | uintptr_t _v_len4 = 0; |
---|
1064 | if (((_v_len3 < (_v_len4 + (0 * 1))))) |
---|
1065 | { |
---|
1066 | RF_ERROR (_c_40); |
---|
1067 | } |
---|
1068 | if (((_v_len3 - _v_len4) % 1)) |
---|
1069 | { |
---|
1070 | RF_ERROR (_c_40); |
---|
1071 | } |
---|
1072 | uintptr_t _v_len__stub2 = ((_v_len3 - _v_len4) / 1); |
---|
1073 | Expr _v_stub1 (_v_arg1, 0, _v_len__stub1); |
---|
1074 | Expr _v_stub2 (_v_deref__arg1, 0, _v_len__stub2); |
---|
1075 | RF_CALL (Clear_m_Func, (_v_stub1, _v_stub2), /*void*/); |
---|
1076 | _v_res1 = empty; |
---|
1077 | RF_END |
---|
1078 | |
---|
1079 | RF_FUNC (Run__0, (RF_ARG _v_arg1;;), (RF_RES _v_res1;;)) |
---|
1080 | uintptr_t _v_len1 = _v_arg1.get_len (); |
---|
1081 | uintptr_t _v_len2 = 1; |
---|
1082 | if (((_v_len1 < (_v_len2 + (0 * 1))))) |
---|
1083 | { |
---|
1084 | RF_ERROR (_c_40); |
---|
1085 | } |
---|
1086 | if (((_v_len1 - _v_len2) % 1)) |
---|
1087 | { |
---|
1088 | RF_ERROR (_c_40); |
---|
1089 | } |
---|
1090 | uintptr_t _v_len__stub1 = ((_v_len1 - _v_len2) / 1); |
---|
1091 | if (_v_arg1.symbol_at ((0 + _v_len__stub1))) |
---|
1092 | { |
---|
1093 | RF_ERROR (_c_40); |
---|
1094 | } |
---|
1095 | Expr _v_deref__arg1 (_v_arg1, (0 + _v_len__stub1)); |
---|
1096 | uintptr_t _v_len3 = _v_deref__arg1.get_len (); |
---|
1097 | uintptr_t _v_len4 = 0; |
---|
1098 | if (((_v_len3 < (_v_len4 + (0 * 1))))) |
---|
1099 | { |
---|
1100 | RF_ERROR (_c_40); |
---|
1101 | } |
---|
1102 | if (((_v_len3 - _v_len4) % 1)) |
---|
1103 | { |
---|
1104 | RF_ERROR (_c_40); |
---|
1105 | } |
---|
1106 | uintptr_t _v_len__stub2 = ((_v_len3 - _v_len4) / 1); |
---|
1107 | Expr _v_stub1 (_v_arg1, 0, _v_len__stub1); |
---|
1108 | Expr _v_stub2 (_v_deref__arg1, 0, _v_len__stub2); |
---|
1109 | if (!RF_CALL (Run, (_v_stub1, _v_stub2), /*void*/)) |
---|
1110 | { |
---|
1111 | RF_RETFAIL; |
---|
1112 | } |
---|
1113 | _v_res1 = empty; |
---|
1114 | RF_END |
---|
1115 | |
---|
1116 | RF_FUNC (Set_m_Func__0, (RF_ARG _v_arg1;;), (RF_RES _v_res1;;)) |
---|
1117 | uintptr_t _v_len1 = _v_arg1.get_len (); |
---|
1118 | uintptr_t _v_len2 = 1; |
---|
1119 | if (((_v_len1 < (_v_len2 + (0 * 1))))) |
---|
1120 | { |
---|
1121 | RF_ERROR (_c_40); |
---|
1122 | } |
---|
1123 | if (((_v_len1 - _v_len2) % 1)) |
---|
1124 | { |
---|
1125 | RF_ERROR (_c_40); |
---|
1126 | } |
---|
1127 | uintptr_t _v_len__stub1 = ((_v_len1 - _v_len2) / 1); |
---|
1128 | if (_v_arg1.symbol_at ((0 + _v_len__stub1))) |
---|
1129 | { |
---|
1130 | RF_ERROR (_c_40); |
---|
1131 | } |
---|
1132 | Expr _v_deref__arg1 (_v_arg1, (0 + _v_len__stub1)); |
---|
1133 | uintptr_t _v_len3 = _v_deref__arg1.get_len (); |
---|
1134 | uintptr_t _v_len4 = 0; |
---|
1135 | if (((_v_len3 < (_v_len4 + (0 * 1))))) |
---|
1136 | { |
---|
1137 | RF_ERROR (_c_40); |
---|
1138 | } |
---|
1139 | if (((_v_len3 - _v_len4) % 1)) |
---|
1140 | { |
---|
1141 | RF_ERROR (_c_40); |
---|
1142 | } |
---|
1143 | uintptr_t _v_len__stub2 = ((_v_len3 - _v_len4) / 1); |
---|
1144 | Expr _v_stub1 (_v_arg1, 0, _v_len__stub1); |
---|
1145 | Expr _v_stub2 (_v_deref__arg1, 0, _v_len__stub2); |
---|
1146 | RF_CALL (Set_m_Func, (_v_stub1, _v_stub2), /*void*/); |
---|
1147 | _v_res1 = empty; |
---|
1148 | RF_END |
---|
1149 | |
---|
1150 | RF_FUNC (Set_m_Break__0, (RF_ARG _v_arg1;;), (RF_RES _v_res1;;)) |
---|
1151 | uintptr_t _v_len1 = _v_arg1.get_len (); |
---|
1152 | uintptr_t _v_len2 = 1; |
---|
1153 | if (((_v_len1 < (_v_len2 + (0 * 1))))) |
---|
1154 | { |
---|
1155 | RF_ERROR (_c_40); |
---|
1156 | } |
---|
1157 | if (((_v_len1 - _v_len2) % 1)) |
---|
1158 | { |
---|
1159 | RF_ERROR (_c_40); |
---|
1160 | } |
---|
1161 | uintptr_t _v_len__stub1 = ((_v_len1 - _v_len2) / 1); |
---|
1162 | if (_v_arg1.symbol_at ((0 + _v_len__stub1))) |
---|
1163 | { |
---|
1164 | RF_ERROR (_c_40); |
---|
1165 | } |
---|
1166 | Expr _v_deref__arg1 (_v_arg1, (0 + _v_len__stub1)); |
---|
1167 | uintptr_t _v_len3 = _v_deref__arg1.get_len (); |
---|
1168 | uintptr_t _v_len4 = 0; |
---|
1169 | if (((_v_len3 < (_v_len4 + (0 * 1))))) |
---|
1170 | { |
---|
1171 | RF_ERROR (_c_40); |
---|
1172 | } |
---|
1173 | if (((_v_len3 - _v_len4) % 1)) |
---|
1174 | { |
---|
1175 | RF_ERROR (_c_40); |
---|
1176 | } |
---|
1177 | uintptr_t _v_len__stub2 = ((_v_len3 - _v_len4) / 1); |
---|
1178 | Expr _v_stub1 (_v_arg1, 0, _v_len__stub1); |
---|
1179 | Expr _v_stub2 (_v_deref__arg1, 0, _v_len__stub2); |
---|
1180 | RF_CALL (Set_m_Break, (_v_stub1, _v_stub2), /*void*/); |
---|
1181 | _v_res1 = empty; |
---|
1182 | RF_END |
---|
1183 | |
---|
1184 | RF_FUNC (Var__0, (RF_ARG _v_arg1;;), (RF_RES _v_res1;;)) |
---|
1185 | uintptr_t _v_len1 = _v_arg1.get_len (); |
---|
1186 | uintptr_t _v_len2 = 1; |
---|
1187 | if (((_v_len1 < (_v_len2 + (0 * 1))))) |
---|
1188 | { |
---|
1189 | RF_ERROR (_c_40); |
---|
1190 | } |
---|
1191 | if (((_v_len1 - _v_len2) % 1)) |
---|
1192 | { |
---|
1193 | RF_ERROR (_c_40); |
---|
1194 | } |
---|
1195 | uintptr_t _v_len__stub1 = ((_v_len1 - _v_len2) / 1); |
---|
1196 | if (_v_arg1.symbol_at ((0 + _v_len__stub1))) |
---|
1197 | { |
---|
1198 | RF_ERROR (_c_40); |
---|
1199 | } |
---|
1200 | Expr _v_deref__arg1 (_v_arg1, (0 + _v_len__stub1)); |
---|
1201 | uintptr_t _v_len3 = _v_deref__arg1.get_len (); |
---|
1202 | uintptr_t _v_len4 = 0; |
---|
1203 | if (((_v_len3 < (_v_len4 + (0 * 1))))) |
---|
1204 | { |
---|
1205 | RF_ERROR (_c_40); |
---|
1206 | } |
---|
1207 | if (((_v_len3 - _v_len4) % 1)) |
---|
1208 | { |
---|
1209 | RF_ERROR (_c_40); |
---|
1210 | } |
---|
1211 | uintptr_t _v_len__stub2 = ((_v_len3 - _v_len4) / 1); |
---|
1212 | Expr _v_stub1 (_v_arg1, 0, _v_len__stub1); |
---|
1213 | Expr _v_stub2 (_v_deref__arg1, 0, _v_len__stub2); |
---|
1214 | RF_CALL (Var, (_v_stub1, _v_stub2), /*void*/); |
---|
1215 | _v_res1 = empty; |
---|
1216 | RF_END |
---|
1217 | |
---|
1218 | RF_FUNC (Step__0, (RF_ARG _v_arg1;;), (RF_RES _v_res1;;)) |
---|
1219 | uintptr_t _v_len1 = _v_arg1.get_len (); |
---|
1220 | uintptr_t _v_len2 = 1; |
---|
1221 | if (((_v_len1 < (_v_len2 + (0 * 1))))) |
---|
1222 | { |
---|
1223 | RF_ERROR (_c_40); |
---|
1224 | } |
---|
1225 | if (((_v_len1 - _v_len2) % 1)) |
---|
1226 | { |
---|
1227 | RF_ERROR (_c_40); |
---|
1228 | } |
---|
1229 | uintptr_t _v_len__stub1 = ((_v_len1 - _v_len2) / 1); |
---|
1230 | if (_v_arg1.symbol_at ((0 + _v_len__stub1))) |
---|
1231 | { |
---|
1232 | RF_ERROR (_c_40); |
---|
1233 | } |
---|
1234 | Expr _v_deref__arg1 (_v_arg1, (0 + _v_len__stub1)); |
---|
1235 | uintptr_t _v_len3 = _v_deref__arg1.get_len (); |
---|
1236 | uintptr_t _v_len4 = 0; |
---|
1237 | if (((_v_len3 < (_v_len4 + (0 * 1))))) |
---|
1238 | { |
---|
1239 | RF_ERROR (_c_40); |
---|
1240 | } |
---|
1241 | if (((_v_len3 - _v_len4) % 1)) |
---|
1242 | { |
---|
1243 | RF_ERROR (_c_40); |
---|
1244 | } |
---|
1245 | uintptr_t _v_len__stub2 = ((_v_len3 - _v_len4) / 1); |
---|
1246 | Expr _v_stub1 (_v_arg1, 0, _v_len__stub1); |
---|
1247 | Expr _v_stub2 (_v_deref__arg1, 0, _v_len__stub2); |
---|
1248 | if (!RF_CALL (Step, (_v_stub1, _v_stub2), /*void*/)) |
---|
1249 | { |
---|
1250 | RF_RETFAIL; |
---|
1251 | } |
---|
1252 | _v_res1 = empty; |
---|
1253 | RF_END |
---|
1254 | |
---|
1255 | RF_FUNC (Next__0, (RF_ARG _v_arg1;;), (RF_RES _v_res1;;)) |
---|
1256 | uintptr_t _v_len1 = _v_arg1.get_len (); |
---|
1257 | uintptr_t _v_len2 = 1; |
---|
1258 | if (((_v_len1 < (_v_len2 + (0 * 1))))) |
---|
1259 | { |
---|
1260 | RF_ERROR (_c_40); |
---|
1261 | } |
---|
1262 | if (((_v_len1 - _v_len2) % 1)) |
---|
1263 | { |
---|
1264 | RF_ERROR (_c_40); |
---|
1265 | } |
---|
1266 | uintptr_t _v_len__stub1 = ((_v_len1 - _v_len2) / 1); |
---|
1267 | if (_v_arg1.symbol_at ((0 + _v_len__stub1))) |
---|
1268 | { |
---|
1269 | RF_ERROR (_c_40); |
---|
1270 | } |
---|
1271 | Expr _v_deref__arg1 (_v_arg1, (0 + _v_len__stub1)); |
---|
1272 | uintptr_t _v_len3 = _v_deref__arg1.get_len (); |
---|
1273 | uintptr_t _v_len4 = 0; |
---|
1274 | if (((_v_len3 < (_v_len4 + (0 * 1))))) |
---|
1275 | { |
---|
1276 | RF_ERROR (_c_40); |
---|
1277 | } |
---|
1278 | if (((_v_len3 - _v_len4) % 1)) |
---|
1279 | { |
---|
1280 | RF_ERROR (_c_40); |
---|
1281 | } |
---|
1282 | uintptr_t _v_len__stub2 = ((_v_len3 - _v_len4) / 1); |
---|
1283 | Expr _v_stub1 (_v_arg1, 0, _v_len__stub1); |
---|
1284 | Expr _v_stub2 (_v_deref__arg1, 0, _v_len__stub2); |
---|
1285 | if (!RF_CALL (Next, (_v_stub1, _v_stub2), /*void*/)) |
---|
1286 | { |
---|
1287 | RF_RETFAIL; |
---|
1288 | } |
---|
1289 | _v_res1 = empty; |
---|
1290 | RF_END |
---|
1291 | |
---|
1292 | } |
---|
1293 | |
---|
1294 | namespace Debug |
---|
1295 | { |
---|
1296 | |
---|
1297 | static void init_ () |
---|
1298 | { |
---|
1299 | Break_m_Funcs = new rftype::StaticObject<rftype::Table>(L"Break-Funcs"); |
---|
1300 | Breakpoints = new rftype::StaticObject<rftype::Table>(L"Breakpoints"); |
---|
1301 | Ops = new rftype::StaticObject<rftype::Table>(L"Ops"); |
---|
1302 | Break_m_Depth = Expr::create_sym< rftype::NamedObject<rftype::BoxContents> >(L"Break-Depth"); |
---|
1303 | Break_q_ = Expr::create_sym< rftype::NamedObject<rftype::BoxContents> >(L"Break?"); |
---|
1304 | Last_m_Depth = Expr::create_sym< rftype::NamedObject<rftype::BoxContents> >(L"Last-Depth"); |
---|
1305 | _c_0 = Expr::create<Word>("ALL"); |
---|
1306 | _c_1 = Expr::create<Word>("NO"); |
---|
1307 | _c_2 = Expr::create<Integer>("1"); |
---|
1308 | _c_3 = Expr::create<Integer>("0"); |
---|
1309 | _c_4 = Expr::create<Word>("Stopped at "); |
---|
1310 | _c_5 = Expr::create<Integer>("2"); |
---|
1311 | _c_6 = Expr::create<Word>("Help") + (empty) (); |
---|
1312 | _c_7 = Expr (_c_6, 0, 1); |
---|
1313 | _c_8 = Expr::create<Word>(" continues execution (stop at the next breakpoint)"); |
---|
1314 | _c_9 = Expr::create<Word>(" runs the program to the end without stopping"); |
---|
1315 | _c_10 = Expr::create<Word>(" does one step"); |
---|
1316 | _c_11 = Expr::create<Word>(" steps program, proceeding through function calls"); |
---|
1317 | _c_12 = Expr::create<Word>("[var-name | /*empty*/] prints value of `var-name` | all variables"); |
---|
1318 | _c_13 = Expr::create<Word>("No variable with name "); |
---|
1319 | _c_14 = Char::create_expr (L"."); |
---|
1320 | _c_15 = Char::create_expr (L" : "); |
---|
1321 | _c_16 = Expr::create<Word>("[file-name line column] sets breakpoint at specified position"); |
---|
1322 | _c_17 = Expr (_c_15, 0, 1); |
---|
1323 | _c_18 = Expr::create<Word>("Breakpoints: "); |
---|
1324 | _c_19 = Expr::create<Word>("[file-name line column] removes breakpoint from specified position"); |
---|
1325 | _c_20 = Expr::create<Word>("[func-name] sets breakpoint just after entering function `func-name`"); |
---|
1326 | _c_21 = Expr::create<Word>("Break at functions: "); |
---|
1327 | _c_22 = Expr::create<Word>("[func-name] clears breakpoint at function `func-name`"); |
---|
1328 | _c_23 = Char::create_expr (L"c"); |
---|
1329 | _c_24 = Expr::create_sym<Func> (Cont__0); |
---|
1330 | _c_25 = Char::create_expr (L"s"); |
---|
1331 | _c_26 = Expr::create_sym<Func> (Step__0); |
---|
1332 | _c_27 = Char::create_expr (L"n"); |
---|
1333 | _c_28 = Expr::create_sym<Func> (Next__0); |
---|
1334 | _c_29 = Char::create_expr (L"r"); |
---|
1335 | _c_30 = Expr::create_sym<Func> (Run__0); |
---|
1336 | _c_31 = Expr::create_sym<Func> (Var__0); |
---|
1337 | _c_32 = Char::create_expr (L"+"); |
---|
1338 | _c_33 = Expr::create_sym<Func> (Set_m_Break__0); |
---|
1339 | _c_34 = Char::create_expr (L"-"); |
---|
1340 | _c_35 = Expr::create_sym<Func> (Clear_m_Break__0); |
---|
1341 | _c_36 = Char::create_expr (L"&"); |
---|
1342 | _c_37 = Expr::create_sym<Func> (Set_m_Func__0); |
---|
1343 | _c_38 = Char::create_expr (L"*"); |
---|
1344 | _c_39 = Expr::create_sym<Func> (Clear_m_Func__0); |
---|
1345 | _c_40 = Expr::create<Word>("Apply") + Expr::create<Word>("Apply") + Expr::create<Word>("Unexpected fail"); |
---|
1346 | RF_CALL(Init, /*void*/, /*void*/); |
---|
1347 | while (--rfrt::breakc >= 0) |
---|
1348 | { |
---|
1349 | RF_CALL(Table::Bind, (Break_m_Funcs, |
---|
1350 | Expr::create<Word>(rfrt::breakv[rfrt::breakc]), empty), /*void*/); |
---|
1351 | } |
---|
1352 | } |
---|
1353 | |
---|
1354 | static AtStart init_registrator_ (&init_); |
---|
1355 | |
---|
1356 | } |
---|
1357 | |
---|
1358 | } |
---|