YAP 7.1.0
saveclause.h
1
2 /* This file was generated automatically by "yap -L misc/buildops"
3 please do not update */
4
5
6 while (TRUE) {
7 op_numbers op;
8 if (max && pc >= max) return 1;
9 op = Yap_op_from_opcode(pc->opc);
10 save_Opcode(stream, op);
11
12 /* C-code, maybe indexing */
13 switch (op) {
14 /* instructions type D */
15 case _write_dbterm:
16 CHECK(save_DBGroundTerm(stream, pc->y_u.D.D));
17 pc = NEXTOP(pc,D);
18 break;
19 /* instructions type Illss */
20 case _enter_lu_pred:
21 CHECK(save_PtoLUIndex(stream, pc->y_u.Illss.I));
22 CHECK(save_PtoOp(stream, pc->y_u.Illss.l1));
23 CHECK(save_PtoOp(stream, pc->y_u.Illss.l2));
24 CHECK(save_Constant(stream, pc->y_u.Illss.s));
25 CHECK(save_Constant(stream, pc->y_u.Illss.e));
26 pc = NEXTOP(pc,Illss);
27 break;
28 /* instructions type J */
29#ifdef YAP_JIT
30 case _jit_handler:
31#endif
32 /* instructions type L */
33 case _alloc_for_logical_pred:
34 CHECK(save_PtoLUClause(stream, pc->y_u.L.ClBase));
35 pc = NEXTOP(pc,L);
36 break;
37 /* instructions type N */
38 case _write_bigint:
39 CHECK(save_BlobTermInCode(stream, pc->y_u.N.b));
40 pc = NEXTOP(pc,N);
41 break;
42 /* instructions type Osblp */
43 case _either:
44 case _or_else:
45#ifdef YAPOR
46 CHECK(save_OrArg(stream, pc->y_u.Osblp.or_arg));
47#endif
48 CHECK(save_Constant(stream, pc->y_u.Osblp.s));
49 CHECK(save_CellPtoHeap(stream, pc->y_u.Osblp.bmap));
50 CHECK(save_PtoOp(stream, pc->y_u.Osblp.l));
51 CHECK(save_PtoPred(stream, pc->y_u.Osblp.p0));
52 pc = NEXTOP(pc,Osblp);
53 break;
54 /* instructions type Osbmp */
55 case _p_execute:
56 case _p_execute_tail:
57#ifdef YAPOR
58 CHECK(save_OrArg(stream, pc->y_u.Osbmp.or_arg));
59#endif
60 CHECK(save_Constant(stream, pc->y_u.Osbmp.s));
61 CHECK(save_CellPtoHeap(stream, pc->y_u.Osbmp.bmap));
62 CHECK(save_Module(stream, pc->y_u.Osbmp.mod));
63 CHECK(save_PtoPred(stream, pc->y_u.Osbmp.p0));
64 pc = NEXTOP(pc,Osbmp);
65 break;
66 /* instructions type Osbpa */
67 case _ensure_space:
68#ifdef YAPOR
69 CHECK(save_OrArg(stream, pc->y_u.Osbpa.or_arg));
70#endif
71 CHECK(save_Constant(stream, pc->y_u.Osbpa.s));
72 CHECK(save_CellPtoHeap(stream, pc->y_u.Osbpa.bmap));
73 CHECK(save_PtoPred(stream, pc->y_u.Osbpa.p));
74 CHECK(save_Arity(stream, pc->y_u.Osbpa.i));
75 pc = NEXTOP(pc,Osbpa);
76 break;
77 /* instructions type Osbpp */
78 case _call:
79 case _call_cpred:
80 case _call_usercpred:
81 case _dexecute:
82 case _execute:
83 case _execute_cpred:
84 case _fcall:
85 case _p_execute2:
86#ifdef YAPOR
87 CHECK(save_OrArg(stream, pc->y_u.Osbpp.or_arg));
88#endif
89 CHECK(save_Constant(stream, pc->y_u.Osbpp.s));
90 CHECK(save_CellPtoHeap(stream, pc->y_u.Osbpp.bmap));
91 CHECK(save_PtoPred(stream, pc->y_u.Osbpp.p));
92 CHECK(save_PtoPred(stream, pc->y_u.Osbpp.p0));
93 pc = NEXTOP(pc,Osbpp);
94 break;
95 /* instructions type OtILl */
96 case _count_trust_logical:
97 case _profiled_trust_logical:
98 case _trust_logical:
99#ifdef YAPOR
100 CHECK(save_OrArg(stream, pc->y_u.OtILl.or_arg));
101#endif
102#ifdef TABLING
103 CHECK(save_TabEntry(stream, pc->y_u.OtILl.te));
104#endif
105 CHECK(save_PtoLUIndex(stream, pc->y_u.OtILl.block));
106 CHECK(save_PtoLUClause(stream, pc->y_u.OtILl.d));
107 CHECK(save_PtoOp(stream, pc->y_u.OtILl.n));
108 pc = NEXTOP(pc,OtILl);
109 break;
110 /* instructions type OtaLl */
111 case _count_retry_logical:
112 case _profiled_retry_logical:
113 case _retry_logical:
114 case _try_logical:
115#ifdef YAPOR
116 CHECK(save_OrArg(stream, pc->y_u.OtaLl.or_arg));
117#endif
118#ifdef TABLING
119 CHECK(save_TabEntry(stream, pc->y_u.OtaLl.te));
120#endif
121 CHECK(save_Arity(stream, pc->y_u.OtaLl.s));
122 CHECK(save_PtoLUClause(stream, pc->y_u.OtaLl.d));
123 CHECK(save_PtoOp(stream, pc->y_u.OtaLl.n));
124 pc = NEXTOP(pc,OtaLl);
125 break;
126 /* instructions type OtapFs */
127 case _cut_c:
128 case _cut_userc:
129 case _retry_c:
130 case _retry_userc:
131 case _try_c:
132 case _try_userc:
133#ifdef YAPOR
134 CHECK(save_OrArg(stream, pc->y_u.OtapFs.or_arg));
135#endif
136#ifdef TABLING
137 CHECK(save_TabEntry(stream, pc->y_u.OtapFs.te));
138#endif
139 CHECK(save_Arity(stream, pc->y_u.OtapFs.s));
140 CHECK(save_PtoPred(stream, pc->y_u.OtapFs.p));
141 CHECK(save_ExternalFunction(stream, pc->y_u.OtapFs.f));
142 CHECK(save_Constant(stream, pc->y_u.OtapFs.extra));
143 pc = NEXTOP(pc,OtapFs);
144 break;
145 /* instructions type Otapl */
146 case _count_retry_and_mark:
147 case _count_retry_me:
148 case _count_trust_me:
149 case _profiled_retry_and_mark:
150 case _profiled_retry_me:
151 case _profiled_trust_me:
152 case _retry:
153 case _retry_and_mark:
154 case _retry_me:
155 case _spy_or_trymark:
156 case _trust:
157 case _trust_me:
158 case _try_and_mark:
159 case _try_clause:
160 case _try_me:
161#ifdef YAPOR
162 CHECK(save_OrArg(stream, pc->y_u.Otapl.or_arg));
163#endif
164#ifdef TABLING
165 CHECK(save_TabEntry(stream, pc->y_u.Otapl.te));
166#endif
167 CHECK(save_Arity(stream, pc->y_u.Otapl.s));
168 CHECK(save_PtoPred(stream, pc->y_u.Otapl.p));
169 CHECK(save_PtoOp(stream, pc->y_u.Otapl.d));
170 pc = NEXTOP(pc,Otapl);
171 break;
172 /* instructions type c */
173 case _write_atom:
174 CHECK(save_ConstantTerm(stream, pc->y_u.c.c));
175 pc = NEXTOP(pc,c);
176 break;
177 /* instructions type cc */
178 case _get_2atoms:
179 CHECK(save_ConstantTerm(stream, pc->y_u.cc.c1));
180 CHECK(save_ConstantTerm(stream, pc->y_u.cc.c2));
181 pc = NEXTOP(pc,cc);
182 break;
183 /* instructions type ccc */
184 case _get_3atoms:
185 CHECK(save_ConstantTerm(stream, pc->y_u.ccc.c1));
186 CHECK(save_ConstantTerm(stream, pc->y_u.ccc.c2));
187 CHECK(save_ConstantTerm(stream, pc->y_u.ccc.c3));
188 pc = NEXTOP(pc,ccc);
189 break;
190 /* instructions type cccc */
191 case _get_4atoms:
192 CHECK(save_ConstantTerm(stream, pc->y_u.cccc.c1));
193 CHECK(save_ConstantTerm(stream, pc->y_u.cccc.c2));
194 CHECK(save_ConstantTerm(stream, pc->y_u.cccc.c3));
195 CHECK(save_ConstantTerm(stream, pc->y_u.cccc.c4));
196 pc = NEXTOP(pc,cccc);
197 break;
198 /* instructions type ccccc */
199 case _get_5atoms:
200 CHECK(save_ConstantTerm(stream, pc->y_u.ccccc.c1));
201 CHECK(save_ConstantTerm(stream, pc->y_u.ccccc.c2));
202 CHECK(save_ConstantTerm(stream, pc->y_u.ccccc.c3));
203 CHECK(save_ConstantTerm(stream, pc->y_u.ccccc.c4));
204 CHECK(save_ConstantTerm(stream, pc->y_u.ccccc.c5));
205 pc = NEXTOP(pc,ccccc);
206 break;
207 /* instructions type cccccc */
208 case _get_6atoms:
209 CHECK(save_ConstantTerm(stream, pc->y_u.cccccc.c1));
210 CHECK(save_ConstantTerm(stream, pc->y_u.cccccc.c2));
211 CHECK(save_ConstantTerm(stream, pc->y_u.cccccc.c3));
212 CHECK(save_ConstantTerm(stream, pc->y_u.cccccc.c4));
213 CHECK(save_ConstantTerm(stream, pc->y_u.cccccc.c5));
214 CHECK(save_ConstantTerm(stream, pc->y_u.cccccc.c6));
215 pc = NEXTOP(pc,cccccc);
216 break;
217 /* instructions type clll */
218 case _if_not_then:
219 CHECK(save_ConstantTerm(stream, pc->y_u.clll.c));
220 CHECK(save_PtoOp(stream, pc->y_u.clll.l1));
221 CHECK(save_PtoOp(stream, pc->y_u.clll.l2));
222 CHECK(save_PtoOp(stream, pc->y_u.clll.l3));
223 pc = NEXTOP(pc,clll);
224 break;
225 /* instructions type d */
226 case _write_float:
227 CHECK(save_DoubleInCode(stream, pc->y_u.d.d));
228 pc = NEXTOP(pc,d);
229 break;
230 /* instructions type e */
231 case _Nstop:
232 case _allocate:
233 case _copy_idb_term:
234 case _enter_exo:
235 case _expand_index:
236 case _index_blob:
237 case _index_dbref:
238 case _index_long:
239 case _index_pred:
240 case _lock_pred:
241 case _op_fail:
242 case _p_equal:
243 case _p_functor:
244 case _pop:
245#ifdef BEAM
246 case _retry_eam:
247#endif
248 case _spy_pred:
249#ifdef THREADS
250 case _thread_local:
251#endif
252 case _trust_fail:
253 case _undef_p:
254 case _unify_idb_term:
255 case _unlock_lu:
256 case _write_l_list:
257 case _write_list:
258 case _write_void:
259 if (op == _Nstop || op == _copy_idb_term || op == _unify_idb_term) return 1;
260 pc = NEXTOP(pc,e);
261 break;
262 /* instructions type fa */
263 case _write_l_struc:
264 case _write_struct:
265 CHECK(save_Func(stream, pc->y_u.fa.f));
266 CHECK(save_Arity(stream, pc->y_u.fa.a));
267 pc = NEXTOP(pc,fa);
268 break;
269 /* instructions type i */
270 case _write_longint:
271 CHECK(save_IntegerInCode(stream, pc->y_u.i.i));
272 pc = NEXTOP(pc,i);
273 break;
274 /* instructions type l */
275 case _Ystop:
276 case _jump:
277 case _jump_if_var:
278 case _move_back:
279 case _retry2:
280 case _retry3:
281 case _retry4:
282 case _skip:
283 case _try_clause2:
284 case _try_clause3:
285 case _try_clause4:
286 case _try_in:
287 CHECK(save_PtoOp(stream, pc->y_u.l.l));
288 pc = NEXTOP(pc,l);
289 break;
290 /* instructions type llll */
291 case _switch_on_type:
292 CHECK(save_PtoOp(stream, pc->y_u.llll.l1));
293 CHECK(save_PtoOp(stream, pc->y_u.llll.l2));
294 CHECK(save_PtoOp(stream, pc->y_u.llll.l3));
295 CHECK(save_PtoOp(stream, pc->y_u.llll.l4));
296 pc = NEXTOP(pc,llll);
297 break;
298 /* instructions type lp */
299 case _retry_all_exo:
300 case _retry_exo:
301 case _retry_exo_udi:
302 case _try_all_exo:
303 case _try_exo:
304 case _try_exo_udi:
305 case _user_switch:
306 CHECK(save_PtoOp(stream, pc->y_u.lp.l));
307 CHECK(save_PtoPred(stream, pc->y_u.lp.p));
308 pc = NEXTOP(pc,lp);
309 break;
310 /* instructions type o */
311 case _unify_l_list:
312 case _unify_l_list_write:
313 case _unify_l_void:
314 case _unify_l_void_write:
315 case _unify_list:
316 case _unify_list_write:
317 case _unify_void:
318 case _unify_void_write:
319 CHECK(save_Opcode(stream, pc->y_u.o.opcw));
320 pc = NEXTOP(pc,o);
321 break;
322 /* instructions type oD */
323 case _unify_dbterm:
324 case _unify_l_dbterm:
325 CHECK(save_Opcode(stream, pc->y_u.oD.opcw));
326 CHECK(save_DBGroundTerm(stream, pc->y_u.oD.D));
327 pc = NEXTOP(pc,oD);
328 break;
329 /* instructions type oN */
330 case _unify_bigint:
331 case _unify_l_bigint:
332 CHECK(save_Opcode(stream, pc->y_u.oN.opcw));
333 CHECK(save_BlobTermInCode(stream, pc->y_u.oN.b));
334 pc = NEXTOP(pc,oN);
335 break;
336 /* instructions type oc */
337 case _unify_atom:
338 case _unify_atom_write:
339 case _unify_l_atom:
340 case _unify_l_atom_write:
341 CHECK(save_Opcode(stream, pc->y_u.oc.opcw));
342 CHECK(save_ConstantTerm(stream, pc->y_u.oc.c));
343 pc = NEXTOP(pc,oc);
344 break;
345 /* instructions type od */
346 case _unify_float:
347 case _unify_float_write:
348 case _unify_l_float:
349 case _unify_l_float_write:
350 CHECK(save_Opcode(stream, pc->y_u.od.opcw));
351 CHECK(save_DoubleInCode(stream, pc->y_u.od.d));
352 pc = NEXTOP(pc,od);
353 break;
354 /* instructions type ofa */
355 case _unify_l_struc:
356 case _unify_l_struc_write:
357 case _unify_struct:
358 case _unify_struct_write:
359 CHECK(save_Opcode(stream, pc->y_u.ofa.opcw));
360 CHECK(save_Func(stream, pc->y_u.ofa.f));
361 CHECK(save_Arity(stream, pc->y_u.ofa.a));
362 pc = NEXTOP(pc,ofa);
363 break;
364 /* instructions type oi */
365 case _unify_l_longint:
366 case _unify_l_longint_write:
367 case _unify_longint:
368 case _unify_longint_write:
369 CHECK(save_Opcode(stream, pc->y_u.oi.opcw));
370 CHECK(save_IntegerInCode(stream, pc->y_u.oi.i));
371 pc = NEXTOP(pc,oi);
372 break;
373 /* instructions type ollll */
374 case _switch_list_nl:
375 CHECK(save_Opcode(stream, pc->y_u.ollll.pop));
376 CHECK(save_PtoOp(stream, pc->y_u.ollll.l1));
377 CHECK(save_PtoOp(stream, pc->y_u.ollll.l2));
378 CHECK(save_PtoOp(stream, pc->y_u.ollll.l3));
379 CHECK(save_PtoOp(stream, pc->y_u.ollll.l4));
380 pc = NEXTOP(pc,ollll);
381 break;
382 /* instructions type os */
383#ifdef BEAM
384 case _run_eam:
385#endif
386 case _unify_l_n_voids:
387 case _unify_l_n_voids_write:
388 case _unify_n_voids:
389 case _unify_n_voids_write:
390 CHECK(save_Opcode(stream, pc->y_u.os.opcw));
391 CHECK(save_Constant(stream, pc->y_u.os.s));
392 pc = NEXTOP(pc,os);
393 break;
394 /* instructions type osc */
395 case _unify_n_atoms:
396 case _unify_n_atoms_write:
397 CHECK(save_Opcode(stream, pc->y_u.osc.opcw));
398 CHECK(save_Constant(stream, pc->y_u.osc.s));
399 CHECK(save_ConstantTerm(stream, pc->y_u.osc.c));
400 pc = NEXTOP(pc,osc);
401 break;
402 /* instructions type ou */
403 case _unify_l_string:
404 case _unify_string:
405 CHECK(save_Opcode(stream, pc->y_u.ou.opcw));
406 CHECK(save_BlobTermInCode(stream, pc->y_u.ou.ut));
407 pc = NEXTOP(pc,ou);
408 break;
409 /* instructions type ox */
410 case _save_appl_x:
411 case _save_appl_x_write:
412 case _save_pair_x:
413 case _save_pair_x_write:
414 case _unify_l_x_loc:
415 case _unify_l_x_loc_write:
416 case _unify_l_x_val:
417 case _unify_l_x_val_write:
418 case _unify_l_x_var:
419 case _unify_l_x_var_write:
420 case _unify_x_loc:
421 case _unify_x_loc_write:
422 case _unify_x_val:
423 case _unify_x_val_write:
424 case _unify_x_var:
425 case _unify_x_var_write:
426 CHECK(save_Opcode(stream, pc->y_u.ox.opcw));
427 CHECK(save_X(stream, pc->y_u.ox.x));
428 pc = NEXTOP(pc,ox);
429 break;
430 /* instructions type oxx */
431 case _unify_l_x_var2:
432 case _unify_l_x_var2_write:
433 case _unify_x_var2:
434 case _unify_x_var2_write:
435 CHECK(save_Opcode(stream, pc->y_u.oxx.opcw));
436 CHECK(save_X(stream, pc->y_u.oxx.xl));
437 CHECK(save_X(stream, pc->y_u.oxx.xr));
438 pc = NEXTOP(pc,oxx);
439 break;
440 /* instructions type oy */
441 case _save_appl_y:
442 case _save_appl_y_write:
443 case _save_pair_y:
444 case _save_pair_y_write:
445 case _unify_l_y_loc:
446 case _unify_l_y_loc_write:
447 case _unify_l_y_val:
448 case _unify_l_y_val_write:
449 case _unify_l_y_var:
450 case _unify_l_y_var_write:
451 case _unify_y_loc:
452 case _unify_y_loc_write:
453 case _unify_y_val:
454 case _unify_y_val_write:
455 case _unify_y_var:
456 case _unify_y_var_write:
457 CHECK(save_Opcode(stream, pc->y_u.oy.opcw));
458 CHECK(save_Y(stream, pc->y_u.oy.y));
459 pc = NEXTOP(pc,oy);
460 break;
461 /* instructions type p */
462 case _count_call:
463 case _count_retry:
464 case _deallocate:
465 case _enter_profiling:
466 case _lock_lu:
467 case _procceed:
468 case _retry_profiled:
469 case _retry_udi:
470 case _try_udi:
471 CHECK(save_PtoPred(stream, pc->y_u.p.p));
472 pc = NEXTOP(pc,p);
473 break;
474 /* instructions type plxxs */
475 case _call_bfunc_xx:
476 CHECK(save_PtoPred(stream, pc->y_u.plxxs.p));
477 CHECK(save_PtoOp(stream, pc->y_u.plxxs.f));
478 CHECK(save_X(stream, pc->y_u.plxxs.x1));
479 CHECK(save_X(stream, pc->y_u.plxxs.x2));
480 CHECK(save_Constant(stream, pc->y_u.plxxs.flags));
481 pc = NEXTOP(pc,plxxs);
482 break;
483 /* instructions type plxys */
484 case _call_bfunc_xy:
485 case _call_bfunc_yx:
486 CHECK(save_PtoPred(stream, pc->y_u.plxys.p));
487 CHECK(save_PtoOp(stream, pc->y_u.plxys.f));
488 CHECK(save_X(stream, pc->y_u.plxys.x));
489 CHECK(save_Y(stream, pc->y_u.plxys.y));
490 CHECK(save_Constant(stream, pc->y_u.plxys.flags));
491 pc = NEXTOP(pc,plxys);
492 break;
493 /* instructions type plyys */
494 case _call_bfunc_yy:
495 CHECK(save_PtoPred(stream, pc->y_u.plyys.p));
496 CHECK(save_PtoOp(stream, pc->y_u.plyys.f));
497 CHECK(save_Y(stream, pc->y_u.plyys.y1));
498 CHECK(save_Y(stream, pc->y_u.plyys.y2));
499 CHECK(save_Constant(stream, pc->y_u.plyys.flags));
500 pc = NEXTOP(pc,plyys);
501 break;
502 /* instructions type s */
503 case _cut:
504 case _cut_e:
505 case _cut_t:
506 case _pop_n:
507 case _write_n_voids:
508 CHECK(save_Constant(stream, pc->y_u.s.s));
509 pc = NEXTOP(pc,s);
510 break;
511 /* instructions type sc */
512 case _write_n_atoms:
513 CHECK(save_Constant(stream, pc->y_u.sc.s));
514 CHECK(save_ConstantTerm(stream, pc->y_u.sc.c));
515 pc = NEXTOP(pc,sc);
516 break;
517 /* instructions type sllll */
518 case _switch_on_sub_arg_type:
519 CHECK(save_Constant(stream, pc->y_u.sllll.s));
520 CHECK(save_PtoOp(stream, pc->y_u.sllll.l1));
521 CHECK(save_PtoOp(stream, pc->y_u.sllll.l2));
522 CHECK(save_PtoOp(stream, pc->y_u.sllll.l3));
523 CHECK(save_PtoOp(stream, pc->y_u.sllll.l4));
524 pc = NEXTOP(pc,sllll);
525 break;
526 /* instructions type slpp */
527 case _call_c_wfail:
528 CHECK(save_Constant(stream, pc->y_u.slpp.s));
529 CHECK(save_PtoOp(stream, pc->y_u.slpp.l));
530 CHECK(save_PtoPred(stream, pc->y_u.slpp.p));
531 CHECK(save_PtoPred(stream, pc->y_u.slpp.p0));
532 pc = NEXTOP(pc,slpp);
533 break;
534 /* instructions type sssl */
535 case _go_on_cons:
536 case _go_on_func:
537 case _if_cons:
538 case _if_func:
539 case _switch_on_cons:
540 case _switch_on_func:
541 CHECK(save_Constant(stream, pc->y_u.sssl.s));
542 CHECK(save_Constant(stream, pc->y_u.sssl.e));
543 CHECK(save_Constant(stream, pc->y_u.sssl.w));
544 CHECK(save_PtoOp(stream, pc->y_u.sssl.l));
545 pc = NEXTOP(pc,sssl);
546 break;
547 /* instructions type sssllp */
548 case _expand_clauses:
549 CHECK(save_Constant(stream, pc->y_u.sssllp.s1));
550 CHECK(save_Constant(stream, pc->y_u.sssllp.s2));
551 CHECK(save_Constant(stream, pc->y_u.sssllp.s3));
552 CHECK(save_PtoOp(stream, pc->y_u.sssllp.sprev));
553 CHECK(save_PtoOp(stream, pc->y_u.sssllp.snext));
554 CHECK(save_PtoPred(stream, pc->y_u.sssllp.p));
555 pc = NEXTOP(pc,sssllp);
556 break;
557 /* instructions type x */
558 case _get_atom_exo:
559 case _get_list:
560 case _put_list:
561 case _save_b_x:
562 case _write_x_loc:
563 case _write_x_val:
564 case _write_x_var:
565 CHECK(save_X(stream, pc->y_u.x.x));
566 pc = NEXTOP(pc,x);
567 break;
568 /* instructions type xD */
569 case _get_dbterm:
570 case _put_dbterm:
571 CHECK(save_X(stream, pc->y_u.xD.x));
572 CHECK(save_DBGroundTerm(stream, pc->y_u.xD.D));
573 pc = NEXTOP(pc,xD);
574 break;
575 /* instructions type xN */
576 case _get_bigint:
577 case _put_bigint:
578 CHECK(save_X(stream, pc->y_u.xN.x));
579 CHECK(save_BlobTermInCode(stream, pc->y_u.xN.b));
580 pc = NEXTOP(pc,xN);
581 break;
582 /* instructions type xc */
583 case _get_atom:
584 case _put_atom:
585 CHECK(save_X(stream, pc->y_u.xc.x));
586 CHECK(save_ConstantTerm(stream, pc->y_u.xc.c));
587 pc = NEXTOP(pc,xc);
588 break;
589 /* instructions type xd */
590 case _get_float:
591 case _put_float:
592 CHECK(save_X(stream, pc->y_u.xd.x));
593 CHECK(save_DoubleInCode(stream, pc->y_u.xd.d));
594 pc = NEXTOP(pc,xd);
595 break;
596 /* instructions type xfa */
597 case _get_struct:
598 case _put_struct:
599 CHECK(save_X(stream, pc->y_u.xfa.x));
600 CHECK(save_Func(stream, pc->y_u.xfa.f));
601 CHECK(save_Arity(stream, pc->y_u.xfa.a));
602 pc = NEXTOP(pc,xfa);
603 break;
604 /* instructions type xi */
605 case _get_longint:
606 case _put_longint:
607 CHECK(save_X(stream, pc->y_u.xi.x));
608 CHECK(save_IntegerInCode(stream, pc->y_u.xi.i));
609 pc = NEXTOP(pc,xi);
610 break;
611 /* instructions type xl */
612 case _p_atom_x:
613 case _p_atomic_x:
614 case _p_compound_x:
615 case _p_db_ref_x:
616 case _p_float_x:
617 case _p_integer_x:
618 case _p_nonvar_x:
619 case _p_number_x:
620 case _p_primitive_x:
621 case _p_var_x:
622 CHECK(save_X(stream, pc->y_u.xl.x));
623 CHECK(save_PtoOp(stream, pc->y_u.xl.F));
624 pc = NEXTOP(pc,xl);
625 break;
626 /* instructions type xll */
627 case _jump_if_nonvar:
628 CHECK(save_X(stream, pc->y_u.xll.x));
629 CHECK(save_PtoOp(stream, pc->y_u.xll.l1));
630 CHECK(save_PtoOp(stream, pc->y_u.xll.l2));
631 pc = NEXTOP(pc,xll);
632 break;
633 /* instructions type xllll */
634 case _switch_on_arg_type:
635 CHECK(save_X(stream, pc->y_u.xllll.x));
636 CHECK(save_PtoOp(stream, pc->y_u.xllll.l1));
637 CHECK(save_PtoOp(stream, pc->y_u.xllll.l2));
638 CHECK(save_PtoOp(stream, pc->y_u.xllll.l3));
639 CHECK(save_PtoOp(stream, pc->y_u.xllll.l4));
640 pc = NEXTOP(pc,xllll);
641 break;
642 /* instructions type xps */
643 case _commit_b_x:
644 case _safe_cut_b_x:
645 CHECK(save_X(stream, pc->y_u.xps.x));
646 CHECK(save_PtoPred(stream, pc->y_u.xps.p0));
647 CHECK(save_Constant(stream, pc->y_u.xps.s));
648 pc = NEXTOP(pc,xps);
649 break;
650 /* instructions type xu */
651 case _get_string:
652 CHECK(save_X(stream, pc->y_u.xu.x));
653 CHECK(save_BlobTermInCode(stream, pc->y_u.xu.ut));
654 pc = NEXTOP(pc,xu);
655 break;
656 /* instructions type xx */
657 case _get_x_val:
658 case _get_x_var:
659 case _gl_void_valx:
660 case _gl_void_varx:
661 case _glist_valx:
662 case _put_x_val:
663 case _put_x_var:
664 CHECK(save_X(stream, pc->y_u.xx.xl));
665 CHECK(save_X(stream, pc->y_u.xx.xr));
666 pc = NEXTOP(pc,xx);
667 break;
668 /* instructions type xxc */
669 case _p_func2s_cv:
670 CHECK(save_X(stream, pc->y_u.xxc.x));
671 CHECK(save_X(stream, pc->y_u.xxc.xi));
672 CHECK(save_ConstantTerm(stream, pc->y_u.xxc.c));
673 pc = NEXTOP(pc,xxc);
674 break;
675 /* instructions type xxn */
676 case _p_and_vc:
677 case _p_arg_cv:
678 case _p_div_cv:
679 case _p_div_vc:
680 case _p_func2s_vc:
681 case _p_minus_cv:
682 case _p_or_vc:
683 case _p_plus_vc:
684 case _p_sll_cv:
685 case _p_sll_vc:
686 case _p_slr_cv:
687 case _p_slr_vc:
688 case _p_times_vc:
689 CHECK(save_X(stream, pc->y_u.xxn.x));
690 CHECK(save_X(stream, pc->y_u.xxn.xi));
691 CHECK(save_Integer(stream, pc->y_u.xxn.c));
692 pc = NEXTOP(pc,xxn);
693 break;
694 /* instructions type xxx */
695 case _p_and_vv:
696 case _p_arg_vv:
697 case _p_div_vv:
698 case _p_func2f_xx:
699 case _p_func2s_vv:
700 case _p_minus_vv:
701 case _p_or_vv:
702 case _p_plus_vv:
703 case _p_sll_vv:
704 case _p_slr_vv:
705 case _p_times_vv:
706 CHECK(save_X(stream, pc->y_u.xxx.x));
707 CHECK(save_X(stream, pc->y_u.xxx.x1));
708 CHECK(save_X(stream, pc->y_u.xxx.x2));
709 pc = NEXTOP(pc,xxx);
710 break;
711 /* instructions type xxxx */
712 case _put_xx_val:
713 CHECK(save_X(stream, pc->y_u.xxxx.xl1));
714 CHECK(save_X(stream, pc->y_u.xxxx.xl2));
715 CHECK(save_X(stream, pc->y_u.xxxx.xr1));
716 CHECK(save_X(stream, pc->y_u.xxxx.xr2));
717 pc = NEXTOP(pc,xxxx);
718 break;
719 /* instructions type xxy */
720 case _p_func2f_xy:
721 CHECK(save_X(stream, pc->y_u.xxy.x));
722 CHECK(save_X(stream, pc->y_u.xxy.x1));
723 CHECK(save_Y(stream, pc->y_u.xxy.y2));
724 pc = NEXTOP(pc,xxy);
725 break;
726 /* instructions type y */
727 case _save_b_y:
728 case _write_y_loc:
729 case _write_y_val:
730 case _write_y_var:
731 CHECK(save_Y(stream, pc->y_u.y.y));
732 pc = NEXTOP(pc,y);
733 break;
734 /* instructions type yl */
735 case _p_atom_y:
736 case _p_atomic_y:
737 case _p_compound_y:
738 case _p_db_ref_y:
739 case _p_float_y:
740 case _p_integer_y:
741 case _p_nonvar_y:
742 case _p_number_y:
743 case _p_primitive_y:
744 case _p_var_y:
745 CHECK(save_Y(stream, pc->y_u.yl.y));
746 CHECK(save_PtoOp(stream, pc->y_u.yl.F));
747 pc = NEXTOP(pc,yl);
748 break;
749 /* instructions type yps */
750 case _commit_b_y:
751 case _soft_cut_b_y:
752 CHECK(save_Y(stream, pc->y_u.yps.y));
753 CHECK(save_PtoPred(stream, pc->y_u.yps.p0));
754 CHECK(save_Constant(stream, pc->y_u.yps.s));
755 pc = NEXTOP(pc,yps);
756 break;
757 /* instructions type yx */
758 case _get_y_val:
759 case _get_y_var:
760 case _gl_void_valy:
761 case _gl_void_vary:
762 case _glist_valy:
763 case _put_unsafe:
764 case _put_y_val:
765 case _put_y_var:
766 CHECK(save_Y(stream, pc->y_u.yx.y));
767 CHECK(save_X(stream, pc->y_u.yx.x));
768 pc = NEXTOP(pc,yx);
769 break;
770 /* instructions type yxc */
771 case _p_func2s_y_cv:
772 CHECK(save_Y(stream, pc->y_u.yxc.y));
773 CHECK(save_X(stream, pc->y_u.yxc.xi));
774 CHECK(save_ConstantTerm(stream, pc->y_u.yxc.c));
775 pc = NEXTOP(pc,yxc);
776 break;
777 /* instructions type yxn */
778 case _p_and_y_vc:
779 case _p_arg_y_cv:
780 case _p_div_y_cv:
781 case _p_div_y_vc:
782 case _p_func2s_y_vc:
783 case _p_minus_y_cv:
784 case _p_or_y_vc:
785 case _p_plus_y_vc:
786 case _p_sll_y_cv:
787 case _p_sll_y_vc:
788 case _p_slr_y_cv:
789 case _p_slr_y_vc:
790 case _p_times_y_vc:
791 CHECK(save_Y(stream, pc->y_u.yxn.y));
792 CHECK(save_X(stream, pc->y_u.yxn.xi));
793 CHECK(save_Integer(stream, pc->y_u.yxn.c));
794 pc = NEXTOP(pc,yxn);
795 break;
796 /* instructions type yxx */
797 case _p_and_y_vv:
798 case _p_arg_y_vv:
799 case _p_div_y_vv:
800 case _p_func2f_yx:
801 case _p_func2s_y_vv:
802 case _p_minus_y_vv:
803 case _p_or_y_vv:
804 case _p_plus_y_vv:
805 case _p_sll_y_vv:
806 case _p_slr_y_vv:
807 case _p_times_y_vv:
808 CHECK(save_Y(stream, pc->y_u.yxx.y));
809 CHECK(save_X(stream, pc->y_u.yxx.x1));
810 CHECK(save_X(stream, pc->y_u.yxx.x2));
811 pc = NEXTOP(pc,yxx);
812 break;
813 /* instructions type yyx */
814 case _p_func2f_yy:
815 CHECK(save_Y(stream, pc->y_u.yyx.y1));
816 CHECK(save_Y(stream, pc->y_u.yyx.y2));
817 CHECK(save_X(stream, pc->y_u.yyx.x));
818 pc = NEXTOP(pc,yyx);
819 break;
820 /* instructions type yyxx */
821 case _get_yy_var:
822 case _put_y_vals:
823 CHECK(save_Y(stream, pc->y_u.yyxx.y1));
824 CHECK(save_Y(stream, pc->y_u.yyxx.y2));
825 CHECK(save_X(stream, pc->y_u.yyxx.x1));
826 CHECK(save_X(stream, pc->y_u.yyxx.x2));
827 pc = NEXTOP(pc,yyxx);
828 break;
829#ifdef YAPOR
830 /* instructions type Otapl */
831 case _getwork:
832 case _getwork_seq:
833 case _sync:
834#ifdef YAPOR
835 CHECK(save_OrArg(stream, pc->y_u.Otapl.or_arg));
836#endif
837#ifdef TABLING
838 CHECK(save_TabEntry(stream, pc->y_u.Otapl.te));
839#endif
840 CHECK(save_Arity(stream, pc->y_u.Otapl.s));
841 CHECK(save_PtoPred(stream, pc->y_u.Otapl.p));
842 CHECK(save_PtoOp(stream, pc->y_u.Otapl.d));
843 pc = NEXTOP(pc,Otapl);
844 break;
845 /* instructions type e */
846 case _getwork_first_time:
847 if (op == _Nstop || op == _copy_idb_term || op == _unify_idb_term) return 1;
848 pc = NEXTOP(pc,e);
849 break;
850#endif
851#ifdef TABLING
852 /* instructions type Otapl */
853 case _table_answer_resolution:
854#ifdef THREADS_CONSUMER_SHARING
855 case _table_answer_resolution_completion:
856#endif
857 case _table_completion:
858 case _table_load_answer:
859 case _table_retry:
860 case _table_retry_me:
861 case _table_trust:
862 case _table_trust_me:
863 case _table_try:
864 case _table_try_answer:
865 case _table_try_me:
866 case _table_try_single:
867#ifdef YAPOR
868 CHECK(save_OrArg(stream, pc->y_u.Otapl.or_arg));
869#endif
870#ifdef TABLING
871 CHECK(save_TabEntry(stream, pc->y_u.Otapl.te));
872#endif
873 CHECK(save_Arity(stream, pc->y_u.Otapl.s));
874 CHECK(save_PtoPred(stream, pc->y_u.Otapl.p));
875 CHECK(save_PtoOp(stream, pc->y_u.Otapl.d));
876 pc = NEXTOP(pc,Otapl);
877 break;
878 /* instructions type e */
879#ifdef TABLING_INNER_CUTS
880 case _clause_with_cut:
881#endif
882 if (op == _Nstop || op == _copy_idb_term || op == _unify_idb_term) return 1;
883 pc = NEXTOP(pc,e);
884 break;
885 /* instructions type s */
886 case _table_new_answer:
887 CHECK(save_Constant(stream, pc->y_u.s.s));
888 pc = NEXTOP(pc,s);
889 break;
890 /* instructions type e */
891 case _trie_do_appl:
892 case _trie_do_appl_in_pair:
893 case _trie_do_atom:
894 case _trie_do_atom_in_pair:
895 case _trie_do_bigint:
896 case _trie_do_double:
897 case _trie_do_extension:
898 case _trie_do_gterm:
899 case _trie_do_longint:
900 case _trie_do_null:
901 case _trie_do_null_in_pair:
902 case _trie_do_pair:
903 case _trie_do_val:
904 case _trie_do_val_in_pair:
905 case _trie_do_var:
906 case _trie_do_var_in_pair:
907 case _trie_retry_appl:
908 case _trie_retry_appl_in_pair:
909 case _trie_retry_atom:
910 case _trie_retry_atom_in_pair:
911 case _trie_retry_bigint:
912 case _trie_retry_double:
913 case _trie_retry_extension:
914 case _trie_retry_gterm:
915 case _trie_retry_longint:
916 case _trie_retry_null:
917 case _trie_retry_null_in_pair:
918 case _trie_retry_pair:
919 case _trie_retry_val:
920 case _trie_retry_val_in_pair:
921 case _trie_retry_var:
922 case _trie_retry_var_in_pair:
923 case _trie_trust_appl:
924 case _trie_trust_appl_in_pair:
925 case _trie_trust_atom:
926 case _trie_trust_atom_in_pair:
927 case _trie_trust_bigint:
928 case _trie_trust_double:
929 case _trie_trust_extension:
930 case _trie_trust_gterm:
931 case _trie_trust_longint:
932 case _trie_trust_null:
933 case _trie_trust_null_in_pair:
934 case _trie_trust_pair:
935 case _trie_trust_val:
936 case _trie_trust_val_in_pair:
937 case _trie_trust_var:
938 case _trie_trust_var_in_pair:
939 case _trie_try_appl:
940 case _trie_try_appl_in_pair:
941 case _trie_try_atom:
942 case _trie_try_atom_in_pair:
943 case _trie_try_bigint:
944 case _trie_try_double:
945 case _trie_try_extension:
946 case _trie_try_gterm:
947 case _trie_try_longint:
948 case _trie_try_null:
949 case _trie_try_null_in_pair:
950 case _trie_try_pair:
951 case _trie_try_val:
952 case _trie_try_val_in_pair:
953 case _trie_try_var:
954 case _trie_try_var_in_pair:
955 if (op == _Nstop || op == _copy_idb_term || op == _unify_idb_term) return 1;
956 pc = NEXTOP(pc,e);
957 break;
958#endif
959default:
960 return -1;
961 }
962 }