1 
2   /* This file, hstruct.h, was generated automatically by "yap -L misc/buildheap"
3      please do not update, update misc/HEAPFIELDS instead */
4 
5 
6 
7 
8 
9 
10 
11 
12 
13 
14 
15 
16 
17 
18 
19 
20 
21 
22 
23 
24 
25 
26 
27 
28 
29 
30 
31 
32   UInt  hole_size;
33   struct malloc_state  *av_;
34 #if USE_DL_MALLOC
35   struct memory_hole  memory_holes[MAX_DLMALLOC_HOLES];
36   UInt  nof_memory_holes;
37 #if defined(YAPOR) || defined(THREADS)
38   lockvar  dlmalloc_lock;
39 #endif
40 #endif
41 #if USE_DL_MALLOC || (USE_SYSTEM_MALLOC && HAVE_MALLINFO)
42 #ifndef  HeapUsed
43 #define  HeapUsed  Yap_givemallinfo()
44 #endif
45   Int  heap_used;
46 #else
47   Int  heap_used;
48 #endif
49   Int  heap_max;
50   ADDR  heap_top;
51   ADDR  heap_lim;
52   struct FREEB  *free_blocks;
53 #if defined(YAPOR) || defined(THREADS)
54   lockvar  free_blocks_lock;
55   lockvar  heap_used_lock;
56   lockvar  heap_top_lock;
57   int  heap_top_owner;
58 #endif
59 
60 
61 #if USE_THREADED_CODE
62   opentry  *op_rtable;
63 #endif
64 
65   OPCODE  execute_cpred_op_code;
66   OPCODE  expand_op_code;
67   OPCODE  fail_op;
68   OPCODE  index_op;
69   OPCODE  lockpred_op;
70   OPCODE  orlast_op;
71   OPCODE  undef_op;
72 
73   UInt  n_of_atoms;
74   UInt  atom_hash_table_size;
75   UInt  wide_atom_hash_table_size;
76   UInt  n_of_wide_atoms;
77   AtomHashEntry  invisiblechain;
78   AtomHashEntry  *wide_hash_chain;
79   AtomHashEntry  *hash_chain;
80 
81 #include "tatoms.h"
82 #ifdef EUROTRA
83   Term  term_dollar_u;
84 #endif
85   Term  term_prolog;
86   Term  term_refound_var;
87   Term  user_module;
88   Term  idb_module;
89   Term  attributes_module;
90   Term  charsio_module;
91   Term  terms_module;
92   Term  system_module;
93   Term  operating_system_module;
94   Term  readutil_module;
95   Term  hacks_module;
96   Term  arg_module;
97   Term  globals_module;
98   Term  swi_module;
99 
100 
101 
102   struct mod_entry  *current_modules;
103 
104 
105 
106 
107   yap_exec_mode  execution_mode;
108 
109   struct pred_entry  **pred_hash;
110 #if defined(YAPOR) || defined(THREADS)
111   rwlock_t  pred_hash_rw_lock;
112 #endif
113   UInt  preds_in_hash_table;
114   UInt  pred_hash_table_size;
115 
116   struct pred_entry  *creep_code;
117   struct pred_entry  *undef_code;
118   struct pred_entry  *spy_code;
119   struct pred_entry  *pred_fail;
120   struct pred_entry  *pred_true;
121 #ifdef COROUTINING
122   struct pred_entry  *wake_up_code;
123 #endif
124   struct pred_entry  *pred_goal_expansion;
125   struct pred_entry  *pred_meta_call;
126   struct pred_entry  *pred_dollar_catch;
127   struct pred_entry  *pred_recorded_with_key;
128   struct pred_entry  *pred_log_upd_clause;
129   struct pred_entry  *pred_log_upd_clause_erase;
130   struct pred_entry  *pred_log_upd_clause0;
131   struct pred_entry  *pred_static_clause;
132   struct pred_entry  *pred_throw;
133   struct pred_entry  *pred_handle_throw;
134   struct pred_entry  *pred_is;
135   struct pred_entry  *pred_safe_call_cleanup;
136   struct pred_entry  *pred_restore_regs;
137 #ifdef YAPOR
138   struct pred_entry  *pred_getwork;
139   struct pred_entry  *pred_getwork_seq;
140 #endif /* YAPOR */
141 
142 #ifdef LOW_LEVEL_TRACER
143   int  yap_do_low_level_trace;
144 #if defined(YAPOR) || defined(THREADS)
145   lockvar  low_level_trace_lock;
146 #endif
147 #endif
148 
149   UInt  clause_space;
150   UInt  index_space_Tree;
151   UInt  index_space_EXT;
152   UInt  index_space_SW;
153   UInt  lu_clause_space;
154   UInt  lu_index_space_Tree;
155   UInt  lu_index_space_CP;
156   UInt  lu_index_space_EXT;
157   UInt  lu_index_space_SW;
158 
159   yamop  comma_code[5];
160   yamop  dummycode[1];
161   yamop  failcode[1];
162   yamop  nocode[1];
163   yamop  env_for_trustfail[2];
164   yamop  *trustfailcode;
165   yamop  env_for_yescode[2];
166   yamop  *yescode;
167   yamop  rtrycode[1];
168 #ifdef BEAM
169   yamop  beam_retry_code[1];
170 #endif /* BEAM */
171 #ifdef YAPOR
172   int  seq_def;
173   yamop  getwork_code[1];
174   yamop  getwork_seq_code[1];
175   yamop  getwork_first_time[1];
176 #endif /* YAPOR */
177 #ifdef TABLING
178   yamop  table_load_answer_code[1];
179   yamop  table_try_answer_code[1];
180   yamop  table_answer_resolution_code[1];
181   yamop  table_completion_code[1];
182 #endif /* TABLING */
183 
184 
185 
186 
187   yamop  *debugger_p_before_spy;
188 
189   yamop  *retry_recordedp_code;
190   yamop  *retry_recorded_k_code;
191 
192   int  system_profiling;
193   int  system_call_counting;
194   int  system_pred_goal_expansion_all;
195   int  system_pred_goal_expansion_func;
196   int  system_pred_goal_expansion_on;
197   int  compiler_optimizer_on;
198   int  compiler_compile_mode;
199   int  compiler_profiling;
200   int  compiler_call_counting;
201 
202   int  compiler_compile_arrays;
203 
204 #if defined(YAPOR) || defined(THREADS)
205   lockvar  dbterms_list_lock;
206 #endif
207   struct dbterm_list  *dbterms_list;
208 
209   yamop  *expand_clauses_first;
210   yamop  *expand_clauses_last;
211   UInt  expand_clauses;
212 #if defined(YAPOR) || defined(THREADS)
213   lockvar  expand_clauses_list_lock;
214   lockvar  op_list_lock;
215 #endif
216 
217 #ifdef DEBUG
218   UInt  new_cps;
219   UInt  live_cps;
220   UInt  dirty_cps;
221   UInt  freed_cps;
222 #endif
223   UInt  expand_clauses_sz;
224 
225   struct udi_info  *udi_control_blocks;
226 
227 
228   Int  static_predicates_marked;
229 
230   Prop  *IntKeys;
231   Prop  *IntLUKeys;
232   Prop  *IntBBKeys;
233 
234   UInt  int_keys_size;
235   UInt  int_keys_timestamp;
236   UInt  int_bb_keys_size;
237 
238   int  update_mode;
239 
240   struct DB_STRUCT  *db_erased_marker;
241   struct logic_upd_clause  *logdb_erased_marker;
242 
243   struct static_clause  *dead_static_clauses;
244   struct static_mega_clause  *dead_mega_clauses;
245   struct static_index  *dead_static_indices;
246   struct logic_upd_clause  *db_erased_list;
247   struct logic_upd_index  *db_erased_ilist;
248 #if defined(YAPOR) || defined(THREADS)
249   lockvar  dead_static_clauses_lock;
250   lockvar  dead_mega_clauses_lock;
251   lockvar  dead_static_indices_lock;
252 #endif
253 #ifdef COROUTINING
254 
255   int  num_of_atts;
256 
257   UInt  atts_size;
258 #endif
259 
260   Int  yap_flags_field[NUMBER_OF_YAP_FLAGS];
261 
262   struct operator_entry  *op_list;
263 
264 
265   struct stream_desc  *yap_streams;
266 
267   UInt  n_of_file_aliases;
268   UInt  sz_of_file_aliases;
269   struct AliasDescS  *file_aliases;
270 
271   Atom  atprompt;
272   char  prompt[MAX_PROMPT];
273 
274   char  *char_conversion_table;
275   char  *char_conversion_table2;
276 
277   UInt  maxdepth;
278   UInt  axlist;
279   UInt  maxwriteargs;
280 
281   int  parser_error_style;
282 
283   char  *yap_lib_dir;
284 
285   void  *last_wtime;
286 
287   int  debugger_output_msg;
288 #if LOW_PROF
289   int  profiler_on;
290   int  offline_profiler;
291   FILE  *f_prof;
292   FILE  *f_preds;
293   UInt  prof_preds;
294 #endif /* LOW_PROF */
295 
296   struct ForeignLoadItem  *foreign_code_loaded;
297   ADDR  foreign_code_base;
298   ADDR  foreign_code_top;
299   ADDR  foreign_code_max;
300 
301   struct record_list  *yap_records;
302 
303   Atom  swi_atoms[N_SWI_ATOMS];
304   Functor  swi_functors[N_SWI_FUNCTORS];
305   struct swi_reverse_hash  swi_reverse_hash[N_SWI_HASH];
306 
307   struct PL_blob_t  *swi_blobs;
308