diff options
author | Alan Wu <XrXr@users.noreply.github.com> | 2021-03-04 15:31:37 -0500 |
---|---|---|
committer | Alan Wu <XrXr@users.noreply.github.com> | 2021-10-20 18:19:31 -0400 |
commit | 7de8ce4efcfd23515d4e4b6a6f80e142438df758 (patch) | |
tree | 843a04a1d2fced3ed7d0bf43b6eb462e1c5f91d1 /darray.h | |
parent | d6d58795a90d338ac8fb308c8a79044172778485 (diff) |
YJIT: Use 2D array to group block versions
For deferred compilation, we sometimes want to care about the order of
the block versions. Use an array instead of a linked list to do that.
Diffstat (limited to 'darray.h')
-rw-r--r-- | darray.h | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -60,6 +60,11 @@ #define rb_darray_foreach(ary, idx_name, elem_ptr_var) \ for (int idx_name = 0; idx_name < rb_darray_size(ary) && ((elem_ptr_var) = rb_darray_ref(ary, idx_name)); ++idx_name) +// Iterate over valid indicies in the array in a for loop +// +#define rb_darray_for(ary, idx_name) \ + for (int idx_name = 0; idx_name < rb_darray_size(ary); ++idx_name) + // Make a dynamic array of a certain size. All bytes backing the elements are set to zero. // Return 1 on success and 0 on failure. // |