[ruby-core:93972] [Ruby master Feature#15833] Some refactors for shared-root array

[email protected]
Newsgroups gmane.comp.lang.ruby.core
Message-ID <redmine.journal-80164.20190729071325.1d978f058c6f7746@ruby-lang.org>
Issue #15833 has been updated by nobu (Nobuyoshi Nakada).


Eregon (Benoit Daloze) wrote:
> I think RARRAY_SHARED_ROOT_FLAG could be in internal.h, if you want to expose it outside of array.c but not as public C API.
> 
> Longer-term I think we should move struct RArray to internal.h, but that's a much bigger/riskier change so not for this issue obviously :)

I agree both.

----------------------------------------
Feature #15833: Some refactors for shared-root array
https://bugs.ruby-lang.org/issues/15833#change-80164

* Author: wanabe (_ wanabe)
* Status: Open
* Priority: Normal
* Assignee: 
* Target version: 
----------------------------------------
I wrote some patches for shared-root array.
But I can't decide whether to commit them because they include the modification of public header `include/ruby/ruby.h`.

To ruby core team (I'm not assuming anyone in particular):
Can I modify `include/ruby/ruby.h` by the patches?

The following is descriptions of the patches.

`0001-Name-RArray-member-to-count-reference-of-shared-root.patch` names reference count of shared-root array.
So far, `as.heap.aux.capa` is used as reference count but it is different from the reality, reference count.
This is a follow up of r19824.

`0002-Export-RARRAY_SHARED_ROOT_FLAG.patch` exports RARRAY_SHARED_ROOT_FLAG.
I followed other flags as in RARRAY_EMBED_FLAG or RARRAY_TRANSIENT_FLAG.

`0003-Fix-object-info-of-shared-root-array.patch` is not a refactor but feature request patch based on above ones.
`rb_obj_info` outputs shared-root array info as same as normal array currently, but its capa is not a really "capa" as I said.

---Files--------------------------------
0001-Name-RArray-member-to-count-reference-of-shared-root.patch (1.42 KB)
0002-Export-RARRAY_SHARED_ROOT_FLAG.patch (1.54 KB)
0003-Fix-object-info-of-shared-root-array.patch (1.04 KB)


-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:[email protected]?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.