From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS4713 221.184.0.0/13 X-Spam-Status: No, score=-3.1 required=3.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, FORGED_GMAIL_RCVD,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from neon.ruby-lang.org (neon.ruby-lang.org [221.186.184.75]) by dcvr.yhbt.net (Postfix) with ESMTP id 32DFA1F461 for ; Mon, 13 May 2019 22:42:36 +0000 (UTC) Received: from neon.ruby-lang.org (localhost [IPv6:::1]) by neon.ruby-lang.org (Postfix) with ESMTP id DA1571209A6; Tue, 14 May 2019 07:42:29 +0900 (JST) Received: from o1678948x4.outbound-mail.sendgrid.net (o1678948x4.outbound-mail.sendgrid.net [167.89.48.4]) by neon.ruby-lang.org (Postfix) with ESMTPS id D9B961208BD for ; Tue, 14 May 2019 07:42:26 +0900 (JST) Received: by filter0081p3las1.sendgrid.net with SMTP id filter0081p3las1-30555-5CD9F2D3-23 2019-05-13 22:42:27.784751833 +0000 UTC m=+16589.742424944 Received: from herokuapp.com (unknown [18.212.173.8]) by ismtpd0060p1mdw1.sendgrid.net (SG) with ESMTP id 9e_KeQRIShC4pIHBytxzyQ for ; Mon, 13 May 2019 22:42:27.517 +0000 (UTC) Date: Mon, 13 May 2019 22:42:27 +0000 (UTC) From: eregontp@gmail.com Message-ID: References: Mime-Version: 1.0 X-Redmine-MailingListIntegration-Message-Ids: 68118 X-Redmine-Project: ruby-trunk X-Redmine-Issue-Id: 15833 X-Redmine-Issue-Author: wanabe X-Redmine-Sender: Eregon X-Mailer: Redmine X-Redmine-Host: bugs.ruby-lang.org X-Redmine-Site: Ruby Issue Tracking System X-Auto-Response-Suppress: All Auto-Submitted: auto-generated X-SG-EID: =?us-ascii?Q?KippOI8ZHtTweq7XfQzW93937kJ4QNWwSBuHnaMEcr3OE8qgWK3lju7p2e6Go3?= =?us-ascii?Q?Hh9Q0ANwEZu3nwxiNsTcI9Cz3GhDbHs2mTXMfCZ?= =?us-ascii?Q?7j66qJUv4p7wzpjIqvIUJG=2F+3Ra8za7aDBtjwuo?= =?us-ascii?Q?qhMwiuvu5vUorYM2MaXkpbGat5mnA27hjg1X0ne?= =?us-ascii?Q?YOK7yuc7LP1jaOKDAl74q1CzVAGW9Mb+ZNA=3D=3D?= To: ruby-core@ruby-lang.org X-ML-Name: ruby-core X-Mail-Count: 92635 Subject: [ruby-core:92635] [Ruby trunk Feature#15833] Some refactors for shared-root array X-BeenThere: ruby-core@ruby-lang.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Ruby developers List-Id: Ruby developers List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ruby-core-bounces@ruby-lang.org Sender: "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/