prolog-vm.c 532 KB
Newer Older
1 2 3 4 5 6 7 8 9 10
SCM scm_equal_p852271;

SCM scm_leq_p848299;

SCM scm_geq_p844327;

SCM scm_less_p840162;

SCM scm_gr_p836383;

11
SCM brace161892;
12

13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
SCM scm_num721462;

SCM scm_string836001;

SCM scm_string808963;

SCM scm_string804418;

SCM scm_string799446;

SCM scm_string795488;

SCM scm_string780398;

SCM scm_string761574;

SCM scm_string742443;

SCM scm_string740972;

33

34
void * _soperations_s[1024];
35

36
SCM _sdls_s = SCM_BOOL_F;
37

38 39 40 41 42 43 44 45 46 47 48 49 50
SCM _sdelayers_s = SCM_BOOL_F;

SCM _sunwind__hooks_s = SCM_BOOL_F;

SCM _sunwind__parameters_s = SCM_BOOL_F;

SCM _strue_s = SCM_BOOL_F;

SCM _sfalse_s = SCM_BOOL_F;

SCM _sgp__not__n_s = SCM_BOOL_F;

SCM _sgp__is__delayed_p_s = SCM_BOOL_F;
51

52 53 54 55
SCM pack__start (SCM nvar, SCM nstack, SCM instructions, SCM contants, SCM tvars);

SCM pack__start (SCM nvar, SCM nstack, SCM instructions, SCM contants, SCM tvars) {
     {
56
        SCM ret901721;
57 58 59
         {
            
             {
60 61 62
                SCM a901722;
                SCM a901723;
                a901722 = scm_cons(scm_num721462, SCM_EOL);
63
                 {
64 65 66
                    SCM a901724;
                    SCM a901725;
                    a901724 = SCM_EOL;
67
                     {
68 69 70
                        SCM a901726;
                        SCM a901727;
                        a901726 = SCM_BOOL_F;
71
                         {
72 73
                            SCM vv901719;
                            vv901719 = scm_c_make_vector(5, SCM_BOOL_F);
74
                             {
75 76
                                SCM * vp901720;
                                vp901720 = SCM_I_VECTOR_WELTS(vv901719);
77 78 79 80
                                 {
                                    
                                    
                                    
81
                                    AREF(vp901720, 0) = nvar;
82
                                    
83
                                    AREF(vp901720, 1) = nstack;
84
                                    
85
                                    AREF(vp901720, 2) = contants;
86
                                    
87
                                    AREF(vp901720, 3) = instructions;
88
                                    
89
                                    AREF(vp901720, 4) = tvars;
90
                                    
91
                                    a901727 = vv901719;
92 93 94
                                }
                            }
                        }
95
                        a901725 = scm_cons(a901726, a901727);
96
                    }
97
                    a901723 = scm_cons(a901724, a901725);
98
                }
99
                ret901721 = scm_cons(a901722, a901723);
100 101
            }
        }
102
        return ret901721;
103 104 105
    }
}

106 107 108 109
SCM gp_c_vector_x (SCM x, int n, SCM s);

SCM gp_c_vector_x (SCM x, int n, SCM s) {
     {
110
        SCM ret901729;
111 112
         {
            
113
            if (SCM_I_IS_VECTOR(x) && n == SCM_I_VECTOR_LENGTH(x)) {
114
                ret901729 = s;
115 116 117
            } else {
                if (scm_is_true(gp_varp(x, s))) {
                     {
118 119
                        SCM v901728;
                        v901728 = scm_c_make_vector(n, SCM_BOOL_F);
120 121 122
                        
                        
                        
123
                         {
124 125
                            int i901730;
                            i901730 = n;
126
                             {
127
                                
128
                              lp901731:
129 130
                                 {
                                    
131 132
                                    if (i901730 == 0) {
                                        ret901729 = gp_gp_unify(x, v901728, s);
133 134
                                    } else {
                                         {
135 136
                                            int ii901732;
                                            ii901732 = i901730 - 1;
137 138 139
                                            
                                            
                                            
140 141
                                            scm_c_vector_set_x(v901728,
                                                               ii901732,
142 143
                                                               gp_mkvar(s));
                                            
144
                                             {
145 146 147 148
                                                int next901735;
                                                next901735 = ii901732;
                                                i901730 = next901735;
                                                goto lp901731;
149 150 151 152 153 154 155
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
156
                } else {
157
                    ret901729 = SCM_BOOL_F;
158 159 160
                }
            }
        }
161
        return ret901729;
162 163 164 165 166 167 168
    }
}

SCM gp_c_vector (SCM x, int n, SCM s);

SCM gp_c_vector (SCM x, int n, SCM s) {
     {
169
        SCM ret901737;
170 171 172
         {
            
             {
173 174
                SCM x901736;
                x901736 = gp_gp_lookup(x, s);
175 176 177
                
                
                
178 179 180
                if (SCM_I_IS_VECTOR(x901736)
                      && n == SCM_I_VECTOR_LENGTH(x901736)) {
                    ret901737 = s;
181
                } else {
182
                    ret901737 = 0;
183 184 185
                }
            }
        }
186
        return ret901737;
187 188 189 190 191 192 193 194 195
    }
}

SCM _smodel__lambda_s = SCM_BOOL_F;

SCM init__vm__data (SCM dls, SCM delayers, SCM unwind__hooks, SCM unwind__parameters, SCM true, SCM false, SCM gp__not__n, SCM gp__is__delayed_p, SCM model__lambda);

SCM init__vm__data (SCM dls, SCM delayers, SCM unwind__hooks, SCM unwind__parameters, SCM true, SCM false, SCM gp__not__n, SCM gp__is__delayed_p, SCM model__lambda) {
     {
196
        SCM ret901738;
197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216
         {
            
            _sdls_s = dls;
            
            _sdelayers_s = delayers;
            
            _sunwind__hooks_s = unwind__hooks;
            
            _sunwind__parameters_s = unwind__parameters;
            
            _strue_s = true;
            
            _sfalse_s = false;
            
            _sgp__not__n_s = gp__not__n;
            
            _sgp__is__delayed_p_s = gp__is__delayed_p;
            
            _smodel__lambda_s = model__lambda;
            
217
            ret901738 = SCM_BOOL_F;
218
        }
219
        return ret901738;
220 221 222
    }
}

223
SCM * vm__raw (scm_i_thread * thread, vp_t * vp, SCM * fp, SCM * sp, SCM * free, scm_t_uint32 * recieve_p, int register_p);
224

225
SCM * vm__raw (scm_i_thread * thread, vp_t * vp, SCM * fp, SCM * sp, SCM * free, scm_t_uint32 * recieve_p, int register_p) {
226
     {
227
        SCM * ret901768;
228 229 230 231 232 233 234
         {
            
            --sp;
            
            if (register_p) {
                 {
                    
235 236
                    AREF(_soperations_s, 97) = &&cutter;
                    
237 238
                    AREF(_soperations_s, 0) = &&store__state;
                    
239 240 241
                    AREF(_soperations_s, 7) = &&softie;
                    
                    AREF(_soperations_s, 8) = &&softie__light;
242
                    
243 244
                    AREF(_soperations_s, 1) = &&newframe;
                    
245 246 247 248 249 250 251
                    AREF(_soperations_s, 2) = &&newframe__light;
                    
                    AREF(_soperations_s, 3) = &&unwind;
                    
                    AREF(_soperations_s, 5) = &&unwind__tail;
                    
                    AREF(_soperations_s, 4) = &&unwind__light;
252
                    
253
                    AREF(_soperations_s, 6) = &&unwind__light__tail;
254
                    
255
                    AREF(_soperations_s, 11) = &&newframe__negation;
256
                    
257
                    AREF(_soperations_s, 12) = &&unwind__negation;
258
                    
259
                    AREF(_soperations_s, 13) = &&post__negation;
260
                    
261
                    AREF(_soperations_s, 30) = &&pre__unify;
262
                    
263
                    AREF(_soperations_s, 31) = &&post__unify;
264
                    
265
                    AREF(_soperations_s, 32) = &&post__unify__tail;
266
                    
267
                    AREF(_soperations_s, 9) = &&post__s;
268
                    
269
                    AREF(_soperations_s, 10) = &&post__q;
270
                    
271
                    AREF(_soperations_s, 33) = &&clear__sp;
272
                    
273
                    AREF(_soperations_s, 34) = &&false;
274
                    
275
                    AREF(_soperations_s, 14) = &&set;
276
                    
277 278 279 280
                    AREF(_soperations_s, 25) = &&sp__move;
                    
                    AREF(_soperations_s, 26) = &&sp__move__s;
                    
281
                    AREF(_soperations_s, 24) = &&unify;
282
                    
283
                    AREF(_soperations_s, 23) = &&unify__2;
284
                    
285
                    AREF(_soperations_s, 16) = &&unify__constant;
286
                    
287
                    AREF(_soperations_s, 17) = &&unify__instruction;
288
                    
289
                    AREF(_soperations_s, 18) = &&unify__constant__2;
290
                    
291
                    AREF(_soperations_s, 19) = &&unify__instruction__2;
292
                    
293
                    AREF(_soperations_s, 95) = &&equal__constant;
294
                    
295
                    AREF(_soperations_s, 96) = &&equal__instruction;
296
                    
297
                    AREF(_soperations_s, 20) = &&icurly;
298
                    
299
                    AREF(_soperations_s, 21) = &&ifkn;
300
                    
301
                    AREF(_soperations_s, 22) = &&icons;
302
                    
303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331
                    AREF(_soperations_s, 27) = &&icurly_e;
                    
                    AREF(_soperations_s, 28) = &&ifkn_e;
                    
                    AREF(_soperations_s, 29) = &&icons_e;
                    
                    AREF(_soperations_s, 35) = &&fail;
                    
                    AREF(_soperations_s, 36) = &&cc;
                    
                    AREF(_soperations_s, 37) = &&tail__cc;
                    
                    AREF(_soperations_s, 38) = &&call;
                    
                    AREF(_soperations_s, 39) = &&call__n;
                    
                    AREF(_soperations_s, 40) = &&tail__call;
                    
                    AREF(_soperations_s, 41) = &&goto__inst;
                    
                    AREF(_soperations_s, 42) = &&cut;
                    
                    AREF(_soperations_s, 43) = &&post__call;
                    
                    AREF(_soperations_s, 44) = &&post__unicall;
                    
                    AREF(_soperations_s, 56) = &&pushv;
                    
                    AREF(_soperations_s, 45) = &&push__constant;
332
                    
333
                    AREF(_soperations_s, 46) = &&push__instruction;
334
                    
335
                    AREF(_soperations_s, 47) = &&push__variable__s;
336
                    
337
                    AREF(_soperations_s, 48) = &&push__variable__v;
338
                    
339
                    AREF(_soperations_s, 49) = &&push__2variables__s;
340
                    
341
                    AREF(_soperations_s, 50) = &&push__2variables__x;
342
                    
343
                    AREF(_soperations_s, 51) = &&push__3variables__s;
344
                    
345
                    AREF(_soperations_s, 52) = &&push__3variables__x;
346
                    
347
                    AREF(_soperations_s, 54) = &&push__variable__scm;
348
                    
349
                    AREF(_soperations_s, 55) = &&pop__variable;
350
                    
351
                    AREF(_soperations_s, 62) = &&dup;
352
                    
353
                    AREF(_soperations_s, 61) = &&pop;
354
                    
355
                    AREF(_soperations_s, 60) = &&seek;
356
                    
357
                    AREF(_soperations_s, 57) = &&mk__cons;
358
                    
359
                    AREF(_soperations_s, 58) = &&mk__fkn;
360
                    
361
                    AREF(_soperations_s, 59) = &&mk__curly;
362
                    
363
                    AREF(_soperations_s, 143) = &&lognot;
364
                    
365
                    AREF(_soperations_s, 141) = &&uminus;
366
                    
367
                    AREF(_soperations_s, 103) = &+
368
                    
369
                    AREF(_soperations_s, 105) = &−
370
                    
371
                    AREF(_soperations_s, 107) = &&mul;
372
                    
373
                    AREF(_soperations_s, 109) = &÷
374
                    
375
                    AREF(_soperations_s, 117) = &&shift_l;
376
                    
377
                    AREF(_soperations_s, 120) = &&shift_r;
378
                    
379
                    AREF(_soperations_s, 133) = &&xor;
380
                    
381
                    AREF(_soperations_s, 104) = &&plus2_1;
382
                    
383
                    AREF(_soperations_s, 106) = &&minus2_1;
384
                    
385
                    AREF(_soperations_s, 108) = &&mul2_1;
386
                    
387
                    AREF(_soperations_s, 110) = &&div2_1;
388
                    
389
                    AREF(_soperations_s, 130) = &&bitand;
Stefan Israelsson Tampe's avatar
Stefan Israelsson Tampe committed
390
                    
391
                    AREF(_soperations_s, 132) = &&bitor;
Stefan Israelsson Tampe's avatar
Stefan Israelsson Tampe committed
392
                    
393
                    AREF(_soperations_s, 134) = &&xor1;
Stefan Israelsson Tampe's avatar
Stefan Israelsson Tampe committed
394
                    
395
                    AREF(_soperations_s, 118) = &&shiftLL;
Stefan Israelsson Tampe's avatar
Stefan Israelsson Tampe committed
396
                    
397
                    AREF(_soperations_s, 119) = &&shiftLR;
398
                    
399
                    AREF(_soperations_s, 121) = &&shiftRL;
400
                    
401
                    AREF(_soperations_s, 122) = &&shiftRR;
402
                    
403
                    AREF(_soperations_s, 118) = &&shiftLL;
404
                    
405
                    AREF(_soperations_s, 124) = &&modL;
406
                    
407
                    AREF(_soperations_s, 125) = &&modR;
408
                    
409
                    AREF(_soperations_s, 123) = &&modulo;
410
                    
411
                    AREF(_soperations_s, 129) = &&band;
412
                    
413
                    AREF(_soperations_s, 131) = &&bor;
414
                    
415
                    AREF(_soperations_s, 76) = &>
416
                    
417
                    AREF(_soperations_s, 79) = &&ls;
418
                    
419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434
                    AREF(_soperations_s, 82) = &≥
                    
                    AREF(_soperations_s, 85) = &≤
                    
                    AREF(_soperations_s, 77) = &&gtL;
                    
                    AREF(_soperations_s, 80) = &&ltL;
                    
                    AREF(_soperations_s, 83) = &&geL;
                    
                    AREF(_soperations_s, 86) = &&leL;
                    
                    AREF(_soperations_s, 88) = &&eq;
                    
                    AREF(_soperations_s, 89) = &&neq;
                    
435
                    ret901768 = sp;
436 437 438
                }
            } else {
                 {
439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519
                    SCM pinned_p901739;
                    int call_p901740;
                    int narg901741;
                    int nlocals901742;
                    SCM always901743;
                    SCM middle901744;
                    SCM session901745;
                    SCM cnst901746;
                    SCM variables__scm901747;
                    SCM * variables901748;
                    SCM constants__scm901749;
                    SCM * constants901750;
                    SCM instructions__scm901751;
                    SCM * instructions901752;
                    SCM tvars__scm901753;
                    SCM * tvars901754;
                    int ninst901755;
                    int nstack901756;
                    int nvar901757;
                    SCM ctrl__stack901758;
                    SCM sp__stack901759;
                    SCM * inst__pt901760;
                    int p_p901761;
                    SCM pp901762;
                    SCM s901763;
                    SCM p901764;
                    SCM cut901765;
                    SCM scut901766;
                    int iter901767;
                    pinned_p901739 = SCM_BOOL_F;
                    call_p901740 = 1;
                    narg901741 = 0;
                    nlocals901742 = 0;
                    always901743 = SCM_BOOL_F;
                    middle901744 = SCM_BOOL_F;
                    session901745 = SCM_BOOL_F;
                    cnst901746 = SCM_BOOL_F;
                    variables__scm901747 = SCM_BOOL_F;
                    variables901748 = 0;
                    constants__scm901749 = SCM_BOOL_F;
                    constants901750 = 0;
                    instructions__scm901751 = SCM_BOOL_F;
                    instructions901752 = 0;
                    tvars__scm901753 = SCM_BOOL_F;
                    tvars901754 = 0;
                    ninst901755 = 0;
                    nstack901756 = 0;
                    nvar901757 = 2;
                    ctrl__stack901758 = SCM_EOL;
                    sp__stack901759 = SCM_EOL;
                    inst__pt901760 = 0;
                    p_p901761 = 0;
                    pp901762 = SCM_BOOL_F;
                    s901763 = SCM_BOOL_F;
                    p901764 = scm_num721462;
                    cut901765 = scm_num721462;
                    scut901766 = scm_num721462;
                    iter901767 = 0;
                    
                    
                    
                     {
                        SCM x901769;
                        x901769 = AREF(free, 1);
                        
                        
                        
                        narg901741 = scm2int(SCM_CAR(x901769));
                        
                        nlocals901742 = scm2int(SCM_CDR(x901769));
                    }
                    
                     {
                        
                        always901743 = AREF(free, 2);
                        
                        middle901744 = SCM_CDR(always901743);
                        
                        session901745 = SCM_CDR(middle901744);
                        
                        cnst901746 = SCM_CDR(session901745);
520 521
                    }
                    
522
                    printf("sp - fp . %d\n", (fp - sp));
523 524
                    
                     {
525
                        int pred902031;
526
                         {
527
                            
528
                            int x902032;
529
                            
530
                            int y902033;
531 532
                            
                            if (fp > sp) {
533
                                x902032 = fp - sp;
534 535 536
                            } else {
                                 {
                                    
537 538
                                    scm_misc_error("prolog-vm",
                                                   "negative stack pointer",
539 540
                                                   SCM_EOL);
                                    
541
                                    x902032 = 1;
542 543 544
                                }
                            }
                            
545 546
                            y902033 = 1;
                            pred902031 = x902032 > y902033;
547
                        }
548
                        if (pred902031) {
549 550
                             {
                                
551
                                p_p901761 = 0;
552
                                
553
                                s901763 = AREF(fp, -1);
554
                                
555
                                p901764 = AREF(fp, -2);
556 557
                            }
                        } else {
558
                            p_p901761 = 1;
559 560 561
                        }
                    }
                    
562
                    if (p_p901761) {
563
                        sp = fp;
Stefan Israelsson Tampe's avatar
Stefan Israelsson Tampe committed
564 565
                    }
                    
566
                     {
567 568
                        SCM * r901770;
                        r901770 = SCM_I_VECTOR_WELTS(cnst901746);
569 570 571
                        
                        
                        
572
                        nvar901757 = scm2int(AREF(r901770, 0));
573
                        
574
                        nstack901756 = scm2int(AREF(r901770, 1));
575
                        
576
                        constants__scm901749 = AREF(r901770, 2);
577
                        
578
                        instructions__scm901751 = AREF(r901770, 3);
579
                        
580
                        tvars__scm901753 = AREF(r901770, 4);
581 582
                    }
                    
583 584
                    instructions901752
                      = SCM_I_VECTOR_WELTS(instructions__scm901751);
585
                    
586
                    constants901750 = SCM_I_VECTOR_WELTS(constants__scm901749);
587
                    
588
                    tvars901754 = SCM_I_VECTOR_WELTS(tvars__scm901753);
589
                    
590
                    variables__scm901747 = SCM_CAR(session901745);
591 592 593
                    
                     {
                        
594
                        printf("get-variables\n");
595
                        
596
                        if (scm_is_true(variables__scm901747)) {
597
                             {
598 599 600
                                SCM * vv901771;
                                vv901771
                                  = SCM_I_VECTOR_WELTS(variables__scm901747);
601 602 603
                                
                                
                                
604 605
                                pinned_p901739
                                  = scm_variable_ref(AREF(vv901771, 3));
606
                                
607
                                variables901748 = vv901771;
608
                            }
609
                        } else {
610
                             {
611 612
                                int n901772;
                                n901772 = nvar901757;
613
                                 {
614 615 616
                                    SCM v901773;
                                    v901773
                                      = scm_c_make_vector(n901772, SCM_BOOL_F);
617
                                     {
618 619
                                        SCM * vv901774;
                                        vv901774 = SCM_I_VECTOR_WELTS(v901773);
620
                                         {
621 622 623
                                            
                                            
                                            
624 625
                                            session901745
                                              = scm_cons(v901773, cnst901746);
626
                                            
627
                                            middle901744
628
                                              = scm_cons(SCM_EOL,
629
                                                         session901745);
630
                                            
631
                                             {
632 633
                                                int i902036;
                                                i902036 = 0;
634
                                                 {
635
                                                    
636
                                                  lp902037:
637
                                                     {
638
                                                        
639
                                                        if (i902036 < n901772) {
640
                                                             {
641 642 643 644
                                                                int var_p902038;
                                                                var_p902038
                                                                  = scm2int(AREF(tvars901754,
                                                                                 i902036));
645 646 647
                                                                
                                                                
                                                                
648 649 650 651
                                                                if (var_p902038) {
                                                                    AREF(vv901774,
                                                                         i902036)
                                                                      = gp_mkvar(s901763);
652 653 654
                                                                }
                                                                
                                                                 {
655 656 657
                                                                    int next902039;
                                                                    next902039
                                                                      = i902036
658
                                                                          + 1;
659 660 661
                                                                    i902036
                                                                      = next902039;
                                                                    goto lp902037;
662 663 664 665 666 667 668
                                                                }
                                                            }
                                                        }
                                                    }
                                                }
                                            }
                                            
669
                                            AREF(vv901774, 3)
670 671
                                              = gp_get_state_token();
                                            
672
                                            variables901748 = vv901774;
673 674 675 676 677 678 679 680
                                        }
                                    }
                                }
                            }
                        }
                    }
                    
                     {
681 682
                        SCM x1901775;
                        x1901775 = SCM_CAR(always901743);
683
                         {
684 685
                            SCM x2901776;
                            x2901776 = SCM_CDR(x1901775);
686
                             {
687 688 689
                                
                                
                                
690
                                ninst901755 = scm2int(SCM_CAR(x1901775));
691
                                
692
                                if (p_p901761) {
693 694
                                     {
                                        
695
                                        ctrl__stack901758 = x2901776;
696
                                        
697
                                        pp901762 = SCM_BOOL_F;
698 699
                                    }
                                } else {
700
                                    if (ninst901755 == 0) {
701 702
                                         {
                                            
703
                                            ctrl__stack901758 = SCM_EOL;
704
                                            
705
                                            pp901762 = SCM_BOOL_F;
706 707
                                        }
                                    } else {
708 709
                                         {
                                            
710 711
                                            ctrl__stack901758
                                              = SCM_CAR(x2901776);
712
                                            
713
                                            pp901762 = SCM_CDR(x2901776);
714 715 716 717 718 719 720
                                        }
                                    }
                                }
                            }
                        }
                    }
                    
721 722
                    if (p_p901761 || ninst901755 == 0) {
                        call_p901740 = 0;
723 724
                    }
                    
725 726 727
                    if (SCM_CONSP(pp901762)
                          && scm_is_eq(SCM_CDR(pp901762), p901764)) {
                        p901764 = SCM_CAR(pp901762);
728 729
                    }
                    
730
                    if (ninst901755 == 0) {
731 732
                         {
                            
733
                            AREF(variables901748, 0) = AREF(fp, -3);
734
                            
735
                            AREF(variables901748, 1) = AREF(fp, -2);
736
                            
737
                            AREF(variables901748, 2) = AREF(fp, -2);
738 739 740
                        }
                    }
                    
741
                    sp__stack901759 = SCM_CAR(middle901744);
742
                    
743
                    inst__pt901760 = instructions901752 + ninst901755;
744 745 746 747
                    
                    INTERUPT();
                    
                    gp_gc();
748
                    
749
                    cut901765 = p901764;
750
                    
751
                    scut901766 = s901763;
752
                    
753
                     {
754 755 756
                        void * jmp901777;
                        jmp901777
                          = AREF(_soperations_s, scm2int(*(inst__pt901760)));
757 758 759
                        
                        
                        
760
                        ++inst__pt901760;
761
                        
762
                        goto *jmp901777;
763 764
                    }
                    
765 766 767 768 769 770 771
                     {
                        
                        
                      pre__unify:
                        
                        printf("%s : %d\n", "pre-unify", 30);
                    }
772
                    
773
                    printf("sp - fp . %d\n", (fp - sp));
774 775
                    
                     {
776 777
                        SCM n901778;
                        n901778 = *inst__pt901760;
778 779 780
                        
                        
                        
781
                        call_p901740 = 0;
782
                        
783
                        inst__pt901760 = inst__pt901760 + 1;
784
                        
785
                        if (SCM_CONSP(n901778)) {
786
                             {
787 788
                                int i2902044;
                                i2902044 = scm2int(SCM_CAR(n901778));
789 790 791
                                
                                
                                
792
                                AREF(fp, -(nstack901756 + i2902044))
793
                                  = scm_fluid_ref(_sdelayers_s);
794 795 796
                            }
                        } else {
                             {
797 798
                                int i2902045;
                                i2902045 = scm2int(n901778);
799
                                
800 801
                                
                                
802
                                if (1) {
803
                                    if (scm_is_true(pinned_p901739)) {
804 805
                                         {
                                            
806 807 808
                                            variables__scm901747
                                              = gp_copy_vector(&(variables901748),
                                                               nvar901757);
809
                                            
810 811 812
                                            session901745
                                              = scm_cons(variables__scm901747,
                                                         cnst901746);
813
                                            
814
                                            middle901744
815
                                              = scm_cons(SCM_EOL,
816
                                                         session901745);
817
                                            
818
                                            pinned_p901739 = SCM_BOOL_F;
819 820 821 822
                                        }
                                    }
                                }
                                
823
                                AREF(variables901748, i2902045)
824
                                  = scm_fluid_ref(_sdelayers_s);
825 826 827 828 829
                            }
                        }
                    }
                    
                     {
830 831 832
                        void * jmp901779;
                        jmp901779
                          = AREF(_soperations_s, scm2int(*(inst__pt901760)));
833 834 835
                        
                        
                        
836
                        ++inst__pt901760;
837
                        
838
                        goto *jmp901779;
839 840
                    }
                    
841 842 843 844 845 846 847
                     {
                        
                        
                      post__unify:
                        
                        printf("%s : %d\n", "post-unify", 31);
                    }
848
                    
849
                    printf("sp - fp . %d\n", (fp - sp));
850 851
                    
                     {
852 853
                        SCM n901780;
                        n901780 = *inst__pt901760;
854
                         {
855 856
                            int nsloc901781;
                            nsloc901781 = scm2int(AREF(inst__pt901760, 1));
857
                             {
858 859
                                SCM old901784;
                                if (SCM_CONSP(n901780)) {
860
                                     {
861 862
                                        int i2901782;
                                        i2901782 = scm2int(SCM_CAR(n901780));
863 864 865
                                        
                                        
                                        
866
                                        old901784
867
                                          = AREF(fp,
868
                                                 -(nstack901756 + i2901782));
869 870 871
                                    }
                                } else {
                                     {
872 873
                                        int i2901783;
                                        i2901783 = scm2int(n901780);
874 875
                                        
                                        
876
                                        
877
                                        if (0) {
878
                                            if (scm_is_true(pinned_p901739)) {
879 880
                                                 {
                                                    
881 882 883
                                                    variables__scm901747
                                                      = gp_copy_vector(&(variables901748),
                                                                       nvar901757);
884
                                                    
885 886 887
                                                    session901745
                                                      = scm_cons(variables__scm901747,
                                                                 cnst901746);
888
                                                    
889
                                                    middle901744
890
                                                      = scm_cons(SCM_EOL,
891
                                                                 session901745);
892
                                                    
893
                                                    pinned_p901739
894 895 896 897 898
                                                      = SCM_BOOL_F;
                                                }
                                            }
                                        }
                                        
899 900
                                        old901784
                                          = AREF(variables901748, i2901783);
901 902 903 904 905 906
                                    }
                                }
                                 {
                                    
                                    
                                    
907
                                    if (SCM_CONSP(n901780)) {
908
                                         {
909 910 911
                                            int i2902049;
                                            i2902049
                                              = scm2int(SCM_CAR(n901780));
912 913 914 915
                                            
                                            
                                            
                                            AREF(fp,
916
                                                 -(nstack901756 + i2902049))
917
                                              = SCM_BOOL_F;
918 919 920
                                        }
                                    } else {
                                         {
921 922
                                            int i2902050;
                                            i2902050 = scm2int(n901780);
923
                                            
924
                                            
925
                                            
926
                                            if (1) {
927
                                                if (scm_is_true(pinned_p901739)) {
928 929
                                                     {
                                                        
930 931 932
                                                        variables__scm901747
                                                          = gp_copy_vector(&(variables901748),
                                                                           nvar901757);
933
                                                        
934 935 936
                                                        session901745
                                                          = scm_cons(variables__scm901747,
                                                                     cnst901746);
937
                                                        
938
                                                        middle901744
939
                                                          = scm_cons(SCM_EOL,
940
                                                                     session901745);
941
                                                        
942
                                                        pinned_p901739
943 944 945 946
                                                          = SCM_BOOL_F;
                                                    }
                                                }
                                            }
947
                                            
948
                                            AREF(variables901748, i2902050)
949
                                              = SCM_BOOL_F;
950 951 952
                                        }
                                    }
                                    
953
                                    inst__pt901760 = inst__pt901760 + 2;
954 955
                                    
                                    if (!scm_is_eq(scm_fluid_ref(_sdelayers_s),
956
                                                   old901784)) {
957 958 959
                                         {
                                            
                                             {
960 961
                                                SCM l902051;
                                                l902051 = SCM_EOL;
962 963
                                                 {
                                                    
964
                                                  lp902059:
965 966 967
                                                     {
                                                        
                                                        if (fp == sp) {
968 969
                                                            sp__stack901759
                                                              = l902051;
970
                                                        } else {
971
                                                             {
972 973 974
                                                                
                                                                sp = sp + 1;
                                                                
975
                                                                 {
976 977
                                                                    SCM r902060;
                                                                    r902060
978 979 980 981 982
                                                                      = *sp;
                                                                    
                                                                    
                                                                    
                                                                    *sp
983
                                                                      = SCM_BOOL_F;
984 985
                                                                    
                                                                     {
986 987 988 989 990 991 992
                                                                        SCM next902063;
                                                                        next902063
                                                                          = scm_cons(r902060,
                                                                                     l902051);
                                                                        l902051
                                                                          = next902063;
                                                                        goto lp902059;
993 994 995 996 997 998 999 1000
                                                                    }
                                                                }
                                                            }
                                                        }
                                                    }
                                                }
                                            }
                                            
1001
                                            if (nsloc901781 > 0) {
1002
                                                 {
1003 1004
                                                    SCM * vp902052;
                                                    vp902052
1005
                                                      = fp
1006 1007
                                                          + -nstack901756
                                                               + nsloc901781;
1008 1009 1010 1011
                                                    
                                                    
                                                    
                                                     {
1012 1013
                                                        int i902064;
                                                        i902064 = nsloc901781;
1014 1015
                                                         {
                                                            
1016
                                                          lp902069:
1017 1018
                                                             {
                                                                
1019
                                                                if (i902064
1020
                                                                      > 0) {
1021
                                                                     {
1022
                                                                        
1023 1024
                                                                        sp__stack901759
                                                                          = scm_cons(AREF(vp902052,
1025
                                                                                          1),
1026
                                                                                     sp__stack901759);
1027
                                                                        
1028
                                                                        --vp902052;
1029
                                                                        
1030
                                                                         {
1031 1032 1033
                                                                            int next902070;
                                                                            next902070
                                                                              = i902064
1034
                                                                                  - 1;
1035 1036 1037
                                                                            i902064
                                                                              = next902070;
                                                                            goto lp902069;
1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048
                                                                        }
                                                                    }
                                                                }
                                                            }
                                                        }
                                                    }
                                                }
                                            }
                                            
                                            AREF(fp, 0) = _sdls_s;
                                            
1049
                                            AREF(fp, -4) = old901784;
1050
                                            
1051
                                            sp = fp + -5;
1052 1053 1054 1055 1056 1057 1058 1059 1060 1061
                                            
                                            goto call;
                                        }
                                    }
                                }
                            }
                        }
                    }
                    
                     {
1062 1063 1064
                        void * jmp901785;
                        jmp901785
                          = AREF(_soperations_s, scm2int(*(inst__pt901760)));
1065 1066 1067
                        
                        
                        
1068
                        ++inst__pt901760;
1069
                        
1070
                        goto *jmp901785;
1071 1072
                    }
                    
1073 1074 1075 1076 1077 1078 1079
                     {
                        
                        
                      post__unify__tail:
                        
                        printf("%s : %d\n", "post-unify-tail", 32);
                    }
1080
                    
1081
                    printf("sp - fp . %d\n", (fp - sp));
1082 1083
                    
                     {
1084 1085
                        SCM n901786;
                        n901786 = *inst__pt901760;
1086
                         {
1087 1088
                            SCM old901789;
                            if (SCM_CONSP(n901786)) {
1089
                                 {
1090 1091
                                    int i2901787;
                                    i2901787 = scm2int(SCM_CAR(n901786));
1092 1093 1094
                                    
                                    
                                    
1095 1096
                                    old901789
                                      = AREF(fp, -(nstack901756 + i2901787));
1097 1098 1099
                                }
                            } else {
                                 {
1100 1101
                                    int i2901788;
                                    i2901788 = scm2int(n901786);
1102 1103
                                    
                                    
1104
                                    
1105
                                    if (0) {
1106
                                        if (scm_is_true(pinned_p901739)) {
1107 1108
                                             {
                                                
1109 1110 1111
                                                variables__scm901747
                                                  = gp_copy_vector(&(variables901748),
                                                                   nvar901757);
1112
                                                
1113 1114 1115
                                                session901745
                                                  = scm_cons(variables__scm901747,
                                                             cnst901746);
1116
                                                
1117
                                                middle901744
1118
                                                  = scm_cons(SCM_EOL,
1119
                                                             session901745);