1 /* This C header file is generated by NIT to compile modules and programs that requires hash_collection. */
2 #ifndef hash_collection_sep
3 #define hash_collection_sep
4 #include "array._sep.h"
6 #include <nit_common.h>
8 extern const classtable_elt_t VFT_HashCollection
[];
10 extern const classtable_elt_t VFT_HashNode
[];
12 extern const classtable_elt_t VFT_HashMap
[];
14 extern const classtable_elt_t VFT_HashMapNode
[];
16 extern const classtable_elt_t VFT_HashMapIterator
[];
18 extern const classtable_elt_t VFT_HashSet
[];
20 extern const classtable_elt_t VFT_HashSetNode
[];
22 extern const classtable_elt_t VFT_HashSetIterator
[];
23 extern const char *LOCATE_hash_collection
;
24 extern const int SFT_hash_collection
[];
25 #define ID_HashCollection (SFT_hash_collection[0])
26 #define COLOR_HashCollection (SFT_hash_collection[1])
27 #define ATTR_hash_collection___HashCollection____array(recv) ATTR(recv, (SFT_hash_collection[2] + 0))
28 #define ATTR_hash_collection___HashCollection____capacity(recv) ATTR(recv, (SFT_hash_collection[2] + 1))
29 #define ATTR_hash_collection___HashCollection____length(recv) ATTR(recv, (SFT_hash_collection[2] + 2))
30 #define ATTR_hash_collection___HashCollection____first_item(recv) ATTR(recv, (SFT_hash_collection[2] + 3))
31 #define ATTR_hash_collection___HashCollection____last_item(recv) ATTR(recv, (SFT_hash_collection[2] + 4))
32 #define ATTR_hash_collection___HashCollection____last_accessed_key(recv) ATTR(recv, (SFT_hash_collection[2] + 5))
33 #define ATTR_hash_collection___HashCollection____last_accessed_node(recv) ATTR(recv, (SFT_hash_collection[2] + 6))
34 #define INIT_TABLE_POS_HashCollection (SFT_hash_collection[3] + 0)
35 #define CALL_hash_collection___HashCollection___first_item(recv) ((hash_collection___HashCollection___first_item_t)CALL((recv), (SFT_hash_collection[3] + 1)))
36 #define CALL_hash_collection___HashCollection___index_at(recv) ((hash_collection___HashCollection___index_at_t)CALL((recv), (SFT_hash_collection[3] + 2)))
37 #define CALL_hash_collection___HashCollection___node_at(recv) ((hash_collection___HashCollection___node_at_t)CALL((recv), (SFT_hash_collection[3] + 3)))
38 #define CALL_hash_collection___HashCollection___node_at_idx(recv) ((hash_collection___HashCollection___node_at_idx_t)CALL((recv), (SFT_hash_collection[3] + 4)))
39 #define CALL_hash_collection___HashCollection___store(recv) ((hash_collection___HashCollection___store_t)CALL((recv), (SFT_hash_collection[3] + 5)))
40 #define CALL_hash_collection___HashCollection___remove_node(recv) ((hash_collection___HashCollection___remove_node_t)CALL((recv), (SFT_hash_collection[3] + 6)))
41 #define CALL_hash_collection___HashCollection___raz(recv) ((hash_collection___HashCollection___raz_t)CALL((recv), (SFT_hash_collection[3] + 7)))
42 #define CALL_hash_collection___HashCollection___enlarge(recv) ((hash_collection___HashCollection___enlarge_t)CALL((recv), (SFT_hash_collection[3] + 8)))
43 #define CALL_hash_collection___HashCollection___init(recv) ((hash_collection___HashCollection___init_t)CALL((recv), (SFT_hash_collection[3] + 9)))
44 #define ID_HashNode (SFT_hash_collection[4])
45 #define COLOR_HashNode (SFT_hash_collection[5])
46 #define ATTR_hash_collection___HashNode____key(recv) ATTR(recv, (SFT_hash_collection[6] + 0))
47 #define ATTR_hash_collection___HashNode____next_item(recv) ATTR(recv, (SFT_hash_collection[6] + 1))
48 #define ATTR_hash_collection___HashNode____prev_item(recv) ATTR(recv, (SFT_hash_collection[6] + 2))
49 #define ATTR_hash_collection___HashNode____prev_in_bucklet(recv) ATTR(recv, (SFT_hash_collection[6] + 3))
50 #define ATTR_hash_collection___HashNode____next_in_bucklet(recv) ATTR(recv, (SFT_hash_collection[6] + 4))
51 #define INIT_TABLE_POS_HashNode (SFT_hash_collection[7] + 0)
52 #define CALL_hash_collection___HashNode___next_item(recv) ((hash_collection___HashNode___next_item_t)CALL((recv), (SFT_hash_collection[7] + 1)))
53 #define CALL_hash_collection___HashNode___next_item__eq(recv) ((hash_collection___HashNode___next_item__eq_t)CALL((recv), (SFT_hash_collection[7] + 2)))
54 #define CALL_hash_collection___HashNode___prev_item(recv) ((hash_collection___HashNode___prev_item_t)CALL((recv), (SFT_hash_collection[7] + 3)))
55 #define CALL_hash_collection___HashNode___prev_item__eq(recv) ((hash_collection___HashNode___prev_item__eq_t)CALL((recv), (SFT_hash_collection[7] + 4)))
56 #define CALL_hash_collection___HashNode___init(recv) ((hash_collection___HashNode___init_t)CALL((recv), (SFT_hash_collection[7] + 5)))
57 #define ID_HashMap (SFT_hash_collection[8])
58 #define COLOR_HashMap (SFT_hash_collection[9])
59 #define INIT_TABLE_POS_HashMap (SFT_hash_collection[10] + 0)
60 #define CALL_hash_collection___HashMap___init(recv) ((hash_collection___HashMap___init_t)CALL((recv), (SFT_hash_collection[10] + 1)))
61 #define ID_HashMapNode (SFT_hash_collection[11])
62 #define COLOR_HashMapNode (SFT_hash_collection[12])
63 #define ATTR_hash_collection___HashMapNode____value(recv) ATTR(recv, (SFT_hash_collection[13] + 0))
64 #define INIT_TABLE_POS_HashMapNode (SFT_hash_collection[14] + 0)
65 #define CALL_hash_collection___HashMapNode___init(recv) ((hash_collection___HashMapNode___init_t)CALL((recv), (SFT_hash_collection[14] + 1)))
66 #define ID_HashMapIterator (SFT_hash_collection[15])
67 #define COLOR_HashMapIterator (SFT_hash_collection[16])
68 #define ATTR_hash_collection___HashMapIterator____map(recv) ATTR(recv, (SFT_hash_collection[17] + 0))
69 #define ATTR_hash_collection___HashMapIterator____node(recv) ATTR(recv, (SFT_hash_collection[17] + 1))
70 #define INIT_TABLE_POS_HashMapIterator (SFT_hash_collection[18] + 0)
71 #define CALL_hash_collection___HashMapIterator___init(recv) ((hash_collection___HashMapIterator___init_t)CALL((recv), (SFT_hash_collection[18] + 1)))
72 #define ID_HashSet (SFT_hash_collection[19])
73 #define COLOR_HashSet (SFT_hash_collection[20])
74 #define INIT_TABLE_POS_HashSet (SFT_hash_collection[21] + 0)
75 #define CALL_hash_collection___HashSet___init(recv) ((hash_collection___HashSet___init_t)CALL((recv), (SFT_hash_collection[21] + 1)))
76 #define ID_HashSetNode (SFT_hash_collection[22])
77 #define COLOR_HashSetNode (SFT_hash_collection[23])
78 #define INIT_TABLE_POS_HashSetNode (SFT_hash_collection[24] + 0)
79 #define CALL_hash_collection___HashSetNode___init(recv) ((hash_collection___HashSetNode___init_t)CALL((recv), (SFT_hash_collection[24] + 1)))
80 #define ID_HashSetIterator (SFT_hash_collection[25])
81 #define COLOR_HashSetIterator (SFT_hash_collection[26])
82 #define ATTR_hash_collection___HashSetIterator____set(recv) ATTR(recv, (SFT_hash_collection[27] + 0))
83 #define ATTR_hash_collection___HashSetIterator____node(recv) ATTR(recv, (SFT_hash_collection[27] + 1))
84 #define INIT_TABLE_POS_HashSetIterator (SFT_hash_collection[28] + 0)
85 #define CALL_hash_collection___HashSetIterator___init(recv) ((hash_collection___HashSetIterator___init_t)CALL((recv), (SFT_hash_collection[28] + 1)))
86 static const char * const LOCATE_hash_collection___HashCollection___length
= "hash_collection::HashCollection::(abstract_collection::Collection::length)";
87 val_t
hash_collection___HashCollection___length(val_t p0
);
88 typedef val_t (*hash_collection___HashCollection___length_t
)(val_t p0
);
89 static const char * const LOCATE_hash_collection___HashCollection___first_item
= "hash_collection::HashCollection::first_item";
90 val_t
hash_collection___HashCollection___first_item(val_t p0
);
91 typedef val_t (*hash_collection___HashCollection___first_item_t
)(val_t p0
);
92 static const char * const LOCATE_hash_collection___HashCollection___index_at
= "hash_collection::HashCollection::index_at";
93 val_t
hash_collection___HashCollection___index_at(val_t p0
, val_t p1
);
94 typedef val_t (*hash_collection___HashCollection___index_at_t
)(val_t p0
, val_t p1
);
95 static const char * const LOCATE_hash_collection___HashCollection___node_at
= "hash_collection::HashCollection::node_at";
96 val_t
hash_collection___HashCollection___node_at(val_t p0
, val_t p1
);
97 typedef val_t (*hash_collection___HashCollection___node_at_t
)(val_t p0
, val_t p1
);
98 static const char * const LOCATE_hash_collection___HashCollection___node_at_idx
= "hash_collection::HashCollection::node_at_idx";
99 val_t
hash_collection___HashCollection___node_at_idx(val_t p0
, val_t p1
, val_t p2
);
100 typedef val_t (*hash_collection___HashCollection___node_at_idx_t
)(val_t p0
, val_t p1
, val_t p2
);
101 static const char * const LOCATE_hash_collection___HashCollection___store
= "hash_collection::HashCollection::store";
102 void hash_collection___HashCollection___store(val_t p0
, val_t p1
, val_t p2
);
103 typedef void (*hash_collection___HashCollection___store_t
)(val_t p0
, val_t p1
, val_t p2
);
104 static const char * const LOCATE_hash_collection___HashCollection___remove_node
= "hash_collection::HashCollection::remove_node";
105 void hash_collection___HashCollection___remove_node(val_t p0
, val_t p1
);
106 typedef void (*hash_collection___HashCollection___remove_node_t
)(val_t p0
, val_t p1
);
107 static const char * const LOCATE_hash_collection___HashCollection___raz
= "hash_collection::HashCollection::raz";
108 void hash_collection___HashCollection___raz(val_t p0
);
109 typedef void (*hash_collection___HashCollection___raz_t
)(val_t p0
);
110 static const char * const LOCATE_hash_collection___HashCollection___enlarge
= "hash_collection::HashCollection::enlarge";
111 void hash_collection___HashCollection___enlarge(val_t p0
, val_t p1
);
112 typedef void (*hash_collection___HashCollection___enlarge_t
)(val_t p0
, val_t p1
);
113 static const char * const LOCATE_hash_collection___HashCollection___init
= "hash_collection::HashCollection::init";
114 void hash_collection___HashCollection___init(val_t p0
, int* init_table
);
115 typedef void (*hash_collection___HashCollection___init_t
)(val_t p0
, int* init_table
);
116 val_t
NEW_HashCollection_hash_collection___HashCollection___init();
117 static const char * const LOCATE_hash_collection___HashNode___next_item
= "hash_collection::HashNode::next_item";
118 val_t
hash_collection___HashNode___next_item(val_t p0
);
119 typedef val_t (*hash_collection___HashNode___next_item_t
)(val_t p0
);
120 static const char * const LOCATE_hash_collection___HashNode___next_item__eq
= "hash_collection::HashNode::next_item=";
121 void hash_collection___HashNode___next_item__eq(val_t p0
, val_t p1
);
122 typedef void (*hash_collection___HashNode___next_item__eq_t
)(val_t p0
, val_t p1
);
123 static const char * const LOCATE_hash_collection___HashNode___prev_item
= "hash_collection::HashNode::prev_item";
124 val_t
hash_collection___HashNode___prev_item(val_t p0
);
125 typedef val_t (*hash_collection___HashNode___prev_item_t
)(val_t p0
);
126 static const char * const LOCATE_hash_collection___HashNode___prev_item__eq
= "hash_collection::HashNode::prev_item=";
127 void hash_collection___HashNode___prev_item__eq(val_t p0
, val_t p1
);
128 typedef void (*hash_collection___HashNode___prev_item__eq_t
)(val_t p0
, val_t p1
);
129 static const char * const LOCATE_hash_collection___HashNode___init
= "hash_collection::HashNode::init";
130 void hash_collection___HashNode___init(val_t p0
, val_t p1
, int* init_table
);
131 typedef void (*hash_collection___HashNode___init_t
)(val_t p0
, val_t p1
, int* init_table
);
132 val_t
NEW_HashNode_hash_collection___HashNode___init(val_t p0
);
133 static const char * const LOCATE_hash_collection___HashMap_____bra
= "hash_collection::HashMap::(abstract_collection::MapRead::[])";
134 val_t
hash_collection___HashMap_____bra(val_t p0
, val_t p1
);
135 typedef val_t (*hash_collection___HashMap_____bra_t
)(val_t p0
, val_t p1
);
136 static const char * const LOCATE_hash_collection___HashMap___has_key
= "hash_collection::HashMap::(abstract_collection::MapRead::has_key)";
137 val_t
hash_collection___HashMap___has_key(val_t p0
, val_t p1
);
138 typedef val_t (*hash_collection___HashMap___has_key_t
)(val_t p0
, val_t p1
);
139 static const char * const LOCATE_hash_collection___HashMap___iterator
= "hash_collection::HashMap::(abstract_collection::Collection::iterator)";
140 val_t
hash_collection___HashMap___iterator(val_t p0
);
141 typedef val_t (*hash_collection___HashMap___iterator_t
)(val_t p0
);
142 typedef void (*CLOS_hash_collection___HashMap___iterate_0
)(struct stack_frame_t
*, val_t
);
143 static const char * const LOCATE_hash_collection___HashMap___iterate
= "hash_collection::HashMap::(abstract_collection::Collection::iterate)";
144 void hash_collection___HashMap___iterate(val_t p0
, struct stack_frame_t
*closctx_param
, fun_t clos_fun0
);
145 typedef void (*hash_collection___HashMap___iterate_t
)(val_t p0
, struct stack_frame_t
*closctx_param
, fun_t clos_fun0
);
146 static const char * const LOCATE_hash_collection___HashMap___first
= "hash_collection::HashMap::(abstract_collection::Collection::first)";
147 val_t
hash_collection___HashMap___first(val_t p0
);
148 typedef val_t (*hash_collection___HashMap___first_t
)(val_t p0
);
149 static const char * const LOCATE_hash_collection___HashMap___is_empty
= "hash_collection::HashMap::(abstract_collection::Collection::is_empty)";
150 val_t
hash_collection___HashMap___is_empty(val_t p0
);
151 typedef val_t (*hash_collection___HashMap___is_empty_t
)(val_t p0
);
152 static const char * const LOCATE_hash_collection___HashMap___count
= "hash_collection::HashMap::(abstract_collection::Collection::count)";
153 val_t
hash_collection___HashMap___count(val_t p0
, val_t p1
);
154 typedef val_t (*hash_collection___HashMap___count_t
)(val_t p0
, val_t p1
);
155 static const char * const LOCATE_hash_collection___HashMap___has
= "hash_collection::HashMap::(abstract_collection::Collection::has)";
156 val_t
hash_collection___HashMap___has(val_t p0
, val_t p1
);
157 typedef val_t (*hash_collection___HashMap___has_t
)(val_t p0
, val_t p1
);
158 static const char * const LOCATE_hash_collection___HashMap___has_only
= "hash_collection::HashMap::(abstract_collection::Collection::has_only)";
159 val_t
hash_collection___HashMap___has_only(val_t p0
, val_t p1
);
160 typedef val_t (*hash_collection___HashMap___has_only_t
)(val_t p0
, val_t p1
);
161 static const char * const LOCATE_hash_collection___HashMap_____braeq
= "hash_collection::HashMap::(abstract_collection::Map::[]=)";
162 void hash_collection___HashMap_____braeq(val_t p0
, val_t p1
, val_t p2
);
163 typedef void (*hash_collection___HashMap_____braeq_t
)(val_t p0
, val_t p1
, val_t p2
);
164 static const char * const LOCATE_hash_collection___HashMap___remove
= "hash_collection::HashMap::(abstract_collection::RemovableCollection::remove)";
165 void hash_collection___HashMap___remove(val_t p0
, val_t p1
);
166 typedef void (*hash_collection___HashMap___remove_t
)(val_t p0
, val_t p1
);
167 static const char * const LOCATE_hash_collection___HashMap___remove_at
= "hash_collection::HashMap::(abstract_collection::Map::remove_at)";
168 void hash_collection___HashMap___remove_at(val_t p0
, val_t p1
);
169 typedef void (*hash_collection___HashMap___remove_at_t
)(val_t p0
, val_t p1
);
170 static const char * const LOCATE_hash_collection___HashMap___clear
= "hash_collection::HashMap::(abstract_collection::RemovableCollection::clear)";
171 void hash_collection___HashMap___clear(val_t p0
);
172 typedef void (*hash_collection___HashMap___clear_t
)(val_t p0
);
173 static const char * const LOCATE_hash_collection___HashMap___init
= "hash_collection::HashMap::init";
174 void hash_collection___HashMap___init(val_t p0
, int* init_table
);
175 typedef void (*hash_collection___HashMap___init_t
)(val_t p0
, int* init_table
);
176 val_t
NEW_HashMap_hash_collection___HashMap___init();
177 static const char * const LOCATE_hash_collection___HashMapNode___init
= "hash_collection::HashMapNode::init";
178 void hash_collection___HashMapNode___init(val_t p0
, val_t p1
, val_t p2
, int* init_table
);
179 typedef void (*hash_collection___HashMapNode___init_t
)(val_t p0
, val_t p1
, val_t p2
, int* init_table
);
180 val_t
NEW_HashMapNode_hash_collection___HashMapNode___init(val_t p0
, val_t p1
);
181 static const char * const LOCATE_hash_collection___HashMapIterator___is_ok
= "hash_collection::HashMapIterator::(abstract_collection::Iterator::is_ok)";
182 val_t
hash_collection___HashMapIterator___is_ok(val_t p0
);
183 typedef val_t (*hash_collection___HashMapIterator___is_ok_t
)(val_t p0
);
184 static const char * const LOCATE_hash_collection___HashMapIterator___item
= "hash_collection::HashMapIterator::(abstract_collection::Iterator::item)";
185 val_t
hash_collection___HashMapIterator___item(val_t p0
);
186 typedef val_t (*hash_collection___HashMapIterator___item_t
)(val_t p0
);
187 static const char * const LOCATE_hash_collection___HashMapIterator___key
= "hash_collection::HashMapIterator::(abstract_collection::MapIterator::key)";
188 val_t
hash_collection___HashMapIterator___key(val_t p0
);
189 typedef val_t (*hash_collection___HashMapIterator___key_t
)(val_t p0
);
190 static const char * const LOCATE_hash_collection___HashMapIterator___next
= "hash_collection::HashMapIterator::(abstract_collection::Iterator::next)";
191 void hash_collection___HashMapIterator___next(val_t p0
);
192 typedef void (*hash_collection___HashMapIterator___next_t
)(val_t p0
);
193 static const char * const LOCATE_hash_collection___HashMapIterator___init
= "hash_collection::HashMapIterator::init";
194 void hash_collection___HashMapIterator___init(val_t p0
, val_t p1
, int* init_table
);
195 typedef void (*hash_collection___HashMapIterator___init_t
)(val_t p0
, val_t p1
, int* init_table
);
196 val_t
NEW_HashMapIterator_hash_collection___HashMapIterator___init(val_t p0
);
197 static const char * const LOCATE_hash_collection___HashSet___is_empty
= "hash_collection::HashSet::(abstract_collection::Collection::is_empty)";
198 val_t
hash_collection___HashSet___is_empty(val_t p0
);
199 typedef val_t (*hash_collection___HashSet___is_empty_t
)(val_t p0
);
200 static const char * const LOCATE_hash_collection___HashSet___first
= "hash_collection::HashSet::(abstract_collection::Collection::first)";
201 val_t
hash_collection___HashSet___first(val_t p0
);
202 typedef val_t (*hash_collection___HashSet___first_t
)(val_t p0
);
203 static const char * const LOCATE_hash_collection___HashSet___has
= "hash_collection::HashSet::(abstract_collection::Collection::has)";
204 val_t
hash_collection___HashSet___has(val_t p0
, val_t p1
);
205 typedef val_t (*hash_collection___HashSet___has_t
)(val_t p0
, val_t p1
);
206 static const char * const LOCATE_hash_collection___HashSet___add
= "hash_collection::HashSet::(abstract_collection::SimpleCollection::add)";
207 void hash_collection___HashSet___add(val_t p0
, val_t p1
);
208 typedef void (*hash_collection___HashSet___add_t
)(val_t p0
, val_t p1
);
209 static const char * const LOCATE_hash_collection___HashSet___remove
= "hash_collection::HashSet::(abstract_collection::RemovableCollection::remove)";
210 void hash_collection___HashSet___remove(val_t p0
, val_t p1
);
211 typedef void (*hash_collection___HashSet___remove_t
)(val_t p0
, val_t p1
);
212 static const char * const LOCATE_hash_collection___HashSet___clear
= "hash_collection::HashSet::(abstract_collection::RemovableCollection::clear)";
213 void hash_collection___HashSet___clear(val_t p0
);
214 typedef void (*hash_collection___HashSet___clear_t
)(val_t p0
);
215 static const char * const LOCATE_hash_collection___HashSet___iterator
= "hash_collection::HashSet::(abstract_collection::Collection::iterator)";
216 val_t
hash_collection___HashSet___iterator(val_t p0
);
217 typedef val_t (*hash_collection___HashSet___iterator_t
)(val_t p0
);
218 static const char * const LOCATE_hash_collection___HashSet___init
= "hash_collection::HashSet::init";
219 void hash_collection___HashSet___init(val_t p0
, int* init_table
);
220 typedef void (*hash_collection___HashSet___init_t
)(val_t p0
, int* init_table
);
221 val_t
NEW_HashSet_hash_collection___HashSet___init();
222 static const char * const LOCATE_hash_collection___HashSetNode___init
= "hash_collection::HashSetNode::init";
223 void hash_collection___HashSetNode___init(val_t p0
, val_t p1
, int* init_table
);
224 typedef void (*hash_collection___HashSetNode___init_t
)(val_t p0
, val_t p1
, int* init_table
);
225 val_t
NEW_HashSetNode_hash_collection___HashSetNode___init(val_t p0
);
226 static const char * const LOCATE_hash_collection___HashSetIterator___is_ok
= "hash_collection::HashSetIterator::(abstract_collection::Iterator::is_ok)";
227 val_t
hash_collection___HashSetIterator___is_ok(val_t p0
);
228 typedef val_t (*hash_collection___HashSetIterator___is_ok_t
)(val_t p0
);
229 static const char * const LOCATE_hash_collection___HashSetIterator___item
= "hash_collection::HashSetIterator::(abstract_collection::Iterator::item)";
230 val_t
hash_collection___HashSetIterator___item(val_t p0
);
231 typedef val_t (*hash_collection___HashSetIterator___item_t
)(val_t p0
);
232 static const char * const LOCATE_hash_collection___HashSetIterator___next
= "hash_collection::HashSetIterator::(abstract_collection::Iterator::next)";
233 void hash_collection___HashSetIterator___next(val_t p0
);
234 typedef void (*hash_collection___HashSetIterator___next_t
)(val_t p0
);
235 static const char * const LOCATE_hash_collection___HashSetIterator___init
= "hash_collection::HashSetIterator::init";
236 void hash_collection___HashSetIterator___init(val_t p0
, val_t p1
, int* init_table
);
237 typedef void (*hash_collection___HashSetIterator___init_t
)(val_t p0
, val_t p1
, int* init_table
);
238 val_t
NEW_HashSetIterator_hash_collection___HashSetIterator___init(val_t p0
);