Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F3046216
roots.h
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
793 B
Referenced Files
None
Subscribers
None
roots.h
View Options
#ifndef ANT_GC_ROOTS_H
#define ANT_GC_ROOTS_H
#include
"types.h"
#include
<assert.h>
#include
<stdbool.h>
#define GC_MAX_STATIC_ROOTS 128
typedef
void
(
*
gc_root_visitor_t
)(
ant_t
*
js
,
ant_value_t
v
);
size_t
gc_root_scope
(
ant_t
*
js
);
bool
gc_push_root
(
ant_t
*
js
,
ant_value_t
*
slot
);
void
gc_register_root
(
ant_value_t
*
slot
);
void
gc_pop_roots
(
ant_t
*
js
,
size_t
mark
);
void
gc_visit_roots
(
ant_t
*
js
,
gc_root_visitor_t
visitor
);
#define GC_ROOT_PIN(js, slot) do { \
bool _gc_root_ok = gc_push_root((js), &(slot)); \
assert(_gc_root_ok && "gc_push_root failed"); \
(void)_gc_root_ok; \
} while (0)
#define GC_ROOT_SAVE(name, js) size_t name = gc_root_scope((js))
#define GC_ROOT_RESTORE(js, mark) gc_pop_roots((js), (mark))
#endif
File Metadata
Details
Attached
Mime Type
text/x-c
Expires
Fri, Apr 3, 12:44 PM (1 d, 22 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
521117
Default Alt Text
roots.h (793 B)
Attached To
Mode
rANT Ant
Attached
Detach File
Event Timeline
Log In to Comment