ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
* [ruby-core:92572] [Ruby trunk Feature#15833] Some refactors for shared-root array
       [not found] <redmine.issue-15833.20190506102939@ruby-lang.org>
@ 2019-05-06 10:29 ` s.wanabe
  2019-05-13 22:42 ` [ruby-core:92635] " eregontp
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 5+ messages in thread
From: s.wanabe @ 2019-05-06 10:29 UTC (permalink / raw)
  To: ruby-core

Issue #15833 has been reported by wanabe (_ wanabe).

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

* 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/

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [ruby-core:92635] [Ruby trunk Feature#15833] Some refactors for shared-root array
       [not found] <redmine.issue-15833.20190506102939@ruby-lang.org>
  2019-05-06 10:29 ` [ruby-core:92572] [Ruby trunk Feature#15833] Some refactors for shared-root array s.wanabe
@ 2019-05-13 22:42 ` eregontp
  2019-05-14  0:08 ` [ruby-core:92637] " s.wanabe
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 5+ messages in thread
From: eregontp @ 2019-05-13 22:42 UTC (permalink / raw)
  To: ruby-core

Issue #15833 has been updated by Eregon (Benoit Daloze).


I think nowadays RArray should be considered internal and C extensions should not access members of struct RArray directly, as that's very likely going to be incorrect or very complex.
I don't think many C extensions use RArray directly, but it would be good to check.

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

* 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/

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [ruby-core:92637] [Ruby trunk Feature#15833] Some refactors for shared-root array
       [not found] <redmine.issue-15833.20190506102939@ruby-lang.org>
  2019-05-06 10:29 ` [ruby-core:92572] [Ruby trunk Feature#15833] Some refactors for shared-root array s.wanabe
  2019-05-13 22:42 ` [ruby-core:92635] " eregontp
@ 2019-05-14  0:08 ` s.wanabe
  2019-05-15 21:05 ` [ruby-core:92669] " eregontp
  2019-07-29  7:13 ` [ruby-core:93972] [Ruby master " nobu
  4 siblings, 0 replies; 5+ messages in thread
From: s.wanabe @ 2019-05-14  0:08 UTC (permalink / raw)
  To: ruby-core

Issue #15833 has been updated by wanabe (_ wanabe).


Eregon (Benoit Daloze) wrote:
> I think nowadays RArray should be considered internal and C extensions should not access members of struct RArray directly, as that's very likely going to be incorrect or very complex.
> I don't think many C extensions use RArray directly, but it would be good to check.

Thank you to comment.
I didn't think about C extension but the readability of MRI itself.
`struct RArray` definition can't move from `include/ruby/ruby.h`, so it can't be avoided to modify `include/ruby/ruby.h` if I want to rename `struct RArray` member for readability.

But I change my mind that it may not be good to export `RARRAY_SHARED_ROOT_FLAG`.
I will drop `0002-Export-RARRAY_SHARED_ROOT_FLAG.patch`.
And I will also drop `0003-Fix-object-info-of-shared-root-array.patch` because it it based on above 0002.



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

* 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/

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [ruby-core:92669] [Ruby trunk Feature#15833] Some refactors for shared-root array
       [not found] <redmine.issue-15833.20190506102939@ruby-lang.org>
                   ` (2 preceding siblings ...)
  2019-05-14  0:08 ` [ruby-core:92637] " s.wanabe
@ 2019-05-15 21:05 ` eregontp
  2019-07-29  7:13 ` [ruby-core:93972] [Ruby master " nobu
  4 siblings, 0 replies; 5+ messages in thread
From: eregontp @ 2019-05-15 21:05 UTC (permalink / raw)
  To: ruby-core

Issue #15833 has been updated by Eregon (Benoit Daloze).


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 :)

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

* 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/

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [ruby-core:93972] [Ruby master Feature#15833] Some refactors for shared-root array
       [not found] <redmine.issue-15833.20190506102939@ruby-lang.org>
                   ` (3 preceding siblings ...)
  2019-05-15 21:05 ` [ruby-core:92669] " eregontp
@ 2019-07-29  7:13 ` nobu
  4 siblings, 0 replies; 5+ messages in thread
From: nobu @ 2019-07-29  7:13 UTC (permalink / raw)
  To: ruby-core

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/

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-07-29  7:13 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <redmine.issue-15833.20190506102939@ruby-lang.org>
2019-05-06 10:29 ` [ruby-core:92572] [Ruby trunk Feature#15833] Some refactors for shared-root array s.wanabe
2019-05-13 22:42 ` [ruby-core:92635] " eregontp
2019-05-14  0:08 ` [ruby-core:92637] " s.wanabe
2019-05-15 21:05 ` [ruby-core:92669] " eregontp
2019-07-29  7:13 ` [ruby-core:93972] [Ruby master " nobu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).