History

Created multiple pointer field iterators based on application Fix bug in vm_string class related to appending null at the end of the current string - This was recently introduced because I didn't test the case :( Scheduler had an invalid usage of std::mutex that was found using the debug version of CRT Fix heinous perf issue in GC where it was taking longer than code execution - Switch from std::queue to std::stack -> perf gain of ~20%

arr committed 9 years ago

Commit 30c4c581 parent 6f29a816 files · +102 −39Browse files

Showing the changes to src/include (1 of 6 files). Show all

Unified · Split

src/include/vm_memory.h+7−1
@@ -50,11 +50,17 @@ namespace disvm · 49 unmodified lines
5050 void dec_ref_count_and_free(vm_alloc_t *alloc);
5151
5252 // Callback for a pointer field supplying the pointer
53− using pointer_field_callback_t = std::function<void(pointer_t)>;
53+ using pointer_field_callback_t = void(*)(pointer_t);
5454
5555 // The callback will be called on all non-null pointer fields.
5656 void enum_pointer_fields(const type_descriptor_t &type_desc, void *data, pointer_field_callback_t callback);
5757
58+ // Callback for a pointer field supplying the pointer and a calling context
59+ using pointer_field_callback_ext_t = void(*)(pointer_t, void *cxt);
60+
61+ // The callback will be called on all non-null pointer fields.
62+ void enum_pointer_fields(const type_descriptor_t &type_desc, void *data, pointer_field_callback_ext_t callback, void *cxt);
63+
5864 // Callback for a pointer field supplying the pointer and byte offset
5965 using pointer_field_offset_callback_t = std::function<void(pointer_t, std::size_t)>;
6066