@@ -38,18 +38,18 @@ rcs_assert_state_is_correct (rcs_record_set_t *rec_set_p __attr_unused___) /**<
38
38
JERRY_ASSERT (rcs_record_get_size (rec_p) > 0 );
39
39
record_size_sum += rcs_record_get_size (rec_p);
40
40
41
- rcs_chunked_list_t :: node_t *node_p = rec_set_p-> get_node_from_pointer ( rec_p);
41
+ rcs_chunked_list_node_t *node_p = rcs_chunked_list_get_node_from_pointer (rec_set_p, rec_p);
42
42
next_rec_p = rcs_record_get_next (rec_set_p, rec_p);
43
- rcs_chunked_list_t :: node_t *next_node_p = NULL ;
43
+ rcs_chunked_list_node_t *next_node_p = NULL ;
44
44
45
45
if (next_rec_p != NULL )
46
46
{
47
- next_node_p = rec_set_p-> get_node_from_pointer ( next_rec_p);
47
+ next_node_p = rcs_chunked_list_get_node_from_pointer (rec_set_p, next_rec_p);
48
48
}
49
49
50
50
while (node_p != next_node_p)
51
51
{
52
- node_p = rec_set_p-> get_next (node_p);
52
+ node_p = rcs_chunked_list_get_next (node_p);
53
53
node_size_sum += rcs_get_node_data_space_size ();
54
54
}
55
55
}
@@ -104,7 +104,7 @@ rcs_check_record_alignment (rcs_record_t *rec_p) /**< record */
104
104
size_t
105
105
rcs_get_node_data_space_size (void )
106
106
{
107
- return JERRY_ALIGNDOWN (rcs_chunked_list_t::get_node_data_space_size (), RCS_DYN_STORAGE_LENGTH_UNIT);
107
+ return JERRY_ALIGNDOWN (rcs_chunked_list_get_node_data_space_size (), RCS_DYN_STORAGE_LENGTH_UNIT);
108
108
} /* rcs_get_node_data_space_size */
109
109
110
110
/* *
@@ -114,13 +114,13 @@ rcs_get_node_data_space_size (void)
114
114
*/
115
115
uint8_t *
116
116
rcs_get_node_data_space (rcs_record_set_t *rec_set_p, /* *< recordset */
117
- rcs_chunked_list_t :: node_t *node_p) /* *< the node */
117
+ rcs_chunked_list_node_t *node_p) /* *< the node */
118
118
{
119
- uintptr_t unaligned_data_space_start = (uintptr_t ) rec_set_p-> get_node_data_space ( node_p);
119
+ uintptr_t unaligned_data_space_start = (uintptr_t ) rcs_chunked_list_get_node_data_space (rec_set_p, node_p);
120
120
uintptr_t aligned_data_space_start = JERRY_ALIGNUP (unaligned_data_space_start, RCS_DYN_STORAGE_LENGTH_UNIT);
121
121
122
- JERRY_ASSERT (unaligned_data_space_start + rcs_chunked_list_t::get_node_data_space_size ()
123
- == aligned_data_space_start + rcs_record_set_t::get_node_data_space_size ());
122
+ JERRY_ASSERT (unaligned_data_space_start + rcs_chunked_list_get_node_data_space_size ()
123
+ == aligned_data_space_start + rcs_chunked_list_get_node_data_space_size ());
124
124
125
125
return (uint8_t *) aligned_data_space_start;
126
126
} /* rcs_get_node_data_space */
@@ -146,7 +146,7 @@ rcs_alloc_record_in_place (rcs_record_set_t *rec_set_p, /**< recordset */
146
146
}
147
147
else
148
148
{
149
- rcs_chunked_list_t :: node_t *node_p = rec_set_p-> get_node_from_pointer ( next_record_p);
149
+ rcs_chunked_list_node_t *node_p = rcs_chunked_list_get_node_from_pointer (rec_set_p, next_record_p);
150
150
uint8_t *node_data_space_p = rcs_get_node_data_space (rec_set_p, node_p);
151
151
152
152
JERRY_ASSERT ((uint8_t *) next_record_p < node_data_space_p + node_data_space_size);
@@ -162,7 +162,7 @@ rcs_alloc_record_in_place (rcs_record_set_t *rec_set_p, /**< recordset */
162
162
size_t size_passed_back = (size_t ) ((uint8_t *) next_record_p - node_data_space_p);
163
163
JERRY_ASSERT (size_passed_back < free_size && size_passed_back + node_data_space_size > free_size);
164
164
165
- node_p = rec_set_p-> get_prev (node_p);
165
+ node_p = rcs_chunked_list_get_prev (node_p);
166
166
node_data_space_p = rcs_get_node_data_space (rec_set_p, node_p);
167
167
168
168
free_rec_p = (rcs_record_t *) (node_data_space_p + node_data_space_size - \
@@ -174,15 +174,15 @@ rcs_alloc_record_in_place (rcs_record_set_t *rec_set_p, /**< recordset */
174
174
}
175
175
else if (free_size != 0 )
176
176
{
177
- rcs_chunked_list_t :: node_t *node_p = rec_set_p-> get_node_from_pointer ( place_p);
177
+ rcs_chunked_list_node_t *node_p = rcs_chunked_list_get_node_from_pointer (rec_set_p, place_p);
178
178
JERRY_ASSERT (node_p != NULL );
179
179
180
- rcs_chunked_list_t :: node_t *next_node_p = rec_set_p-> get_next (node_p);
180
+ rcs_chunked_list_node_t *next_node_p = rcs_chunked_list_get_next (node_p);
181
181
182
182
while (next_node_p != NULL )
183
183
{
184
184
node_p = next_node_p;
185
- next_node_p = rec_set_p-> get_next (node_p);
185
+ next_node_p = rcs_chunked_list_get_next (node_p);
186
186
}
187
187
188
188
uint8_t *node_data_space_p = rcs_get_node_data_space (rec_set_p, node_p);
@@ -230,7 +230,7 @@ rcs_alloc_space_for_record (rcs_record_set_t *rec_set_p, /**< recordset */
230
230
return rec_p;
231
231
}
232
232
233
- rcs_chunked_list_t :: node_t *node_p = rec_set_p-> get_node_from_pointer ( rec_p);
233
+ rcs_chunked_list_node_t *node_p = rcs_chunked_list_get_node_from_pointer (rec_set_p, rec_p);
234
234
uint8_t *node_data_space_p = rcs_get_node_data_space (rec_set_p, node_p);
235
235
uint8_t *node_data_space_end_p = node_data_space_p + node_data_space_size;
236
236
uint8_t *rec_space_p = (uint8_t *) rec_p;
@@ -241,7 +241,7 @@ rcs_alloc_space_for_record (rcs_record_set_t *rec_set_p, /**< recordset */
241
241
* thus it can be extended up to necessary size. */
242
242
while (record_size < bytes)
243
243
{
244
- node_p = rec_set_p-> insert_new ( node_p);
244
+ node_p = rcs_chunked_list_insert_new (rec_set_p, node_p);
245
245
record_size += node_data_space_size;
246
246
}
247
247
@@ -261,15 +261,15 @@ rcs_alloc_space_for_record (rcs_record_set_t *rec_set_p, /**< recordset */
261
261
}
262
262
263
263
/* Free record of sufficient size was not found. */
264
- rcs_chunked_list_t :: node_t *node_p = rec_set_p-> append_new ( );
264
+ rcs_chunked_list_node_t *node_p = rcs_chunked_list_append_new (rec_set_p );
265
265
rcs_record_t *new_rec_p = (rcs_record_t *) rcs_get_node_data_space (rec_set_p, node_p);
266
266
267
267
size_t allocated_size = node_data_space_size;
268
268
269
269
while (allocated_size < bytes)
270
270
{
271
271
allocated_size += node_data_space_size;
272
- rec_set_p-> append_new ( );
272
+ rcs_chunked_list_append_new (rec_set_p );
273
273
}
274
274
275
275
rcs_alloc_record_in_place (rec_set_p, new_rec_p, NULL , allocated_size - bytes);
@@ -335,12 +335,12 @@ rcs_free_record (rcs_record_set_t *rec_set_p, /**< recordset */
335
335
JERRY_ASSERT (rec_from_p != NULL && RCS_RECORD_IS_FREE (rec_from_p));
336
336
JERRY_ASSERT (rec_to_p == NULL || !RCS_RECORD_IS_FREE (rec_to_p));
337
337
338
- rcs_chunked_list_t :: node_t *node_from_p = rec_set_p-> get_node_from_pointer ( rec_from_p);
339
- rcs_chunked_list_t :: node_t *node_to_p = NULL ;
338
+ rcs_chunked_list_node_t *node_from_p = rcs_chunked_list_get_node_from_pointer (rec_set_p, rec_from_p);
339
+ rcs_chunked_list_node_t *node_to_p = NULL ;
340
340
341
341
if (rec_to_p != NULL )
342
342
{
343
- node_to_p = rec_set_p-> get_node_from_pointer ( rec_to_p);
343
+ node_to_p = rcs_chunked_list_get_node_from_pointer (rec_set_p, rec_to_p);
344
344
}
345
345
346
346
const size_t node_data_space_size = rcs_get_node_data_space_size ();
@@ -356,18 +356,18 @@ rcs_free_record (rcs_record_set_t *rec_set_p, /**< recordset */
356
356
}
357
357
else
358
358
{
359
- rcs_chunked_list_t :: node_t *iter_node_p;
360
- rcs_chunked_list_t :: node_t *iter_next_node_p;
359
+ rcs_chunked_list_node_t *iter_node_p;
360
+ rcs_chunked_list_node_t *iter_next_node_p;
361
361
362
- for (iter_node_p = rec_set_p-> get_next (node_from_p);
362
+ for (iter_node_p = rcs_chunked_list_get_next (node_from_p);
363
363
iter_node_p != node_to_p;
364
364
iter_node_p = iter_next_node_p)
365
365
{
366
- iter_next_node_p = rec_set_p-> get_next (iter_node_p);
367
- rec_set_p-> remove ( iter_node_p);
366
+ iter_next_node_p = rcs_chunked_list_get_next (iter_node_p);
367
+ rcs_chunked_list_remove (rec_set_p, iter_node_p);
368
368
}
369
369
370
- JERRY_ASSERT (rec_set_p-> get_next (node_from_p) == node_to_p);
370
+ JERRY_ASSERT (rcs_chunked_list_get_next (node_from_p) == node_to_p);
371
371
372
372
size_t node_from_space = (size_t ) (rcs_get_node_data_space (rec_set_p, node_from_p) \
373
373
+ node_data_space_size - rec_from_beg_p);
@@ -385,10 +385,10 @@ rcs_free_record (rcs_record_set_t *rec_set_p, /**< recordset */
385
385
}
386
386
else if (prev_rec_p == NULL )
387
387
{
388
- rec_set_p-> remove ( node_from_p);
388
+ rcs_chunked_list_remove (rec_set_p, node_from_p);
389
389
390
390
JERRY_ASSERT (node_to_p == NULL );
391
- JERRY_ASSERT (rec_set_p-> get_first ( ) == NULL );
391
+ JERRY_ASSERT (rcs_chunked_list_get_first (rec_set_p ) == NULL );
392
392
}
393
393
394
394
rcs_assert_state_is_correct (rec_set_p);
0 commit comments