Project

General

Profile

Feature #15833 » 0002-Export-RARRAY_SHARED_ROOT_FLAG.patch

wanabe (_ wanabe), 05/06/2019 10:02 AM

View differences:

array.c
assert(ARY_SHARED_ROOT_P(_value_)); \
RB_OBJ_WRITE(_ary_, &RARRAY(_ary_)->as.heap.aux.shared, _value_); \
} while (0)
#define RARRAY_SHARED_ROOT_FLAG FL_USER5
#define ARY_SHARED_ROOT_P(ary) (FL_TEST((ary), RARRAY_SHARED_ROOT_FLAG))
#define ARY_SHARED_NUM(ary) \
(assert(ARY_SHARED_ROOT_P(ary)), RARRAY(ary)->as.heap.aux.shared_num)
include/ruby/ruby.h
/* RUBY_FL_USER2 is for ELTS_SHARED */
RARRAY_EMBED_LEN_MASK = (RUBY_FL_USER4|RUBY_FL_USER3),
RARRAY_EMBED_LEN_SHIFT = (RUBY_FL_USHIFT+3),
RARRAY_SHARED_ROOT_FLAG = RUBY_FL_USER5,
#if USE_TRANSIENT_HEAP
RARRAY_TRANSIENT_FLAG = RUBY_FL_USER13,
......
#define RARRAY_EMBED_LEN_MASK (VALUE)RARRAY_EMBED_LEN_MASK
#define RARRAY_EMBED_LEN_MAX RARRAY_EMBED_LEN_MAX
#define RARRAY_EMBED_LEN_SHIFT RARRAY_EMBED_LEN_SHIFT
#define RARRAY_SHARED_ROOT_FLAG (VALUE)RARRAY_SHARED_ROOT_FLAG
struct RArray {
struct RBasic basic;
(2-2/3)