From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: poffice@blade.nagaokaut.ac.jp Delivered-To: poffice@blade.nagaokaut.ac.jp Received: from kankan.nagaokaut.ac.jp (kankan.nagaokaut.ac.jp [133.44.2.24]) by blade.nagaokaut.ac.jp (Postfix) with ESMTP id 2B77B17DF319 for ; Thu, 2 Jul 2015 08:48:45 +0900 (JST) Received: from funfun.nagaokaut.ac.jp (funfun.nagaokaut.ac.jp [133.44.2.201]) by kankan.nagaokaut.ac.jp (Postfix) with ESMTP id 5C87DB5D90E for ; Thu, 2 Jul 2015 09:14:24 +0900 (JST) Received: from funfun.nagaokaut.ac.jp (localhost.nagaokaut.ac.jp [127.0.0.1]) by funfun.nagaokaut.ac.jp (Postfix) with ESMTP id 5524297A827 for ; Thu, 2 Jul 2015 09:14:25 +0900 (JST) X-Virus-Scanned: amavisd-new at nagaokaut.ac.jp Authentication-Results: funfun.nagaokaut.ac.jp (amavisd-new); dkim=fail (1024-bit key) reason="fail (message has been altered)" header.d=sendgrid.me Received: from funfun.nagaokaut.ac.jp ([127.0.0.1]) by funfun.nagaokaut.ac.jp (funfun.nagaokaut.ac.jp [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Xl-0KnQDSrtu for ; Thu, 2 Jul 2015 09:14:24 +0900 (JST) Received: from voscc.nagaokaut.ac.jp (voscc.nagaokaut.ac.jp [133.44.1.100]) by funfun.nagaokaut.ac.jp (Postfix) with ESMTP id D60B497A826 for ; Thu, 2 Jul 2015 09:14:24 +0900 (JST) Received: from neon.ruby-lang.org (neon.ruby-lang.org [221.186.184.75]) by voscc.nagaokaut.ac.jp (Postfix) with ESMTP id BCA0E95243E for ; Thu, 2 Jul 2015 09:14:23 +0900 (JST) Received: from [221.186.184.76] (localhost [IPv6:::1]) by neon.ruby-lang.org (Postfix) with ESMTP id 37F1C120468; Thu, 2 Jul 2015 09:14:21 +0900 (JST) X-Original-To: ruby-core@ruby-lang.org Delivered-To: ruby-core@ruby-lang.org Received: from o2.heroku.sendgrid.net (o2.heroku.sendgrid.net [67.228.50.55]) by neon.ruby-lang.org (Postfix) with ESMTPS id 841E81203F8 for ; Thu, 2 Jul 2015 09:14:17 +0900 (JST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sendgrid.me; h=from:to:references:subject:mime-version:content-type:content-transfer-encoding:list-id; s=smtpapi; bh=aDPWR5+rHfOwT+nkWXFSXxuSNK0=; b=kfvYWMURkKOjs6Bi4h /ZJmfvO/PuWWMbesTvpzz3ZO5kLDhXJuzHVy9syubTQsRsjbUabRuh25x/3cU6rA HxPb4K8nmzmfItlfbl84rBQ3Y4FG/QzAEa5kkMYJXFPjR1Nmou4mJjsdlBQcTA1P l4lCkqtpd1MWKaZC8B3KDayV4= Received: by filter0793p1mdw1.sendgrid.net with SMTP id filter0793p1mdw1.27608.559482542 2015-07-02 00:14:12.250464654 +0000 UTC Received: from herokuapp.com (ec2-54-204-246-107.compute-1.amazonaws.com [54.204.246.107]) by ismtpd-001 (SG) with ESMTP id 14e4c1d17f3.21c8.4b4422 for ; Thu, 02 Jul 2015 00:14:11 +0000 (UTC) Date: Thu, 02 Jul 2015 00:14:11 +0000 From: nagachika00@gmail.com To: ruby-core@ruby-lang.org Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Redmine-MailingListIntegration-Message-Ids: 44431 X-Redmine-Project: ruby-trunk X-Redmine-Issue-Id: 11203 X-Redmine-Issue-Author: ko1 X-Redmine-Sender: nagachika 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: ync6xU2WACa70kv/Ymy4QrNMhiuLXJG8OTL2vJD1yS6E1ZKgu9eyaMXe1ufHG4otjp4t4i+6yVr5L7 H4s21/+lLQW3ovVY7gTA9mdbIVab2m4Jq9iGB4s5BUbLbBnGzvx0Jc5qellMOV0Gc9Lz9kzkjBEn5D 4IYmYQ0jhTBCZyaifIAspIk5WcA82I8RfKfg X-ML-Name: ruby-core X-Mail-Count: 69834 Subject: [ruby-core:69834] [Ruby trunk - Bug #11203] Change method entries into VALUE 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: , Errors-To: ruby-core-bounces@ruby-lang.org Sender: "ruby-core" Issue #11203 has been updated by Tomoyuki Chikanaga. Backport changed from 2.0.0: WONTFIX, 2.1: WONTFIX, 2.2: UNKNOWN to 2.0.0: WONTFIX, 2.1: WONTFIX, 2.2: WONTFIX ---------------------------------------- Bug #11203: Change method entries into VALUE https://bugs.ruby-lang.org/issues/11203#change-53232 * Author: Koichi Sasada * Status: Closed * Priority: Normal * Assignee: * ruby -v: * Backport: 2.0.0: WONTFIX, 2.1: WONTFIX, 2.2: WONTFIX ---------------------------------------- Now, `rb_method_entry_t` is an allocated data pointed from method tables (`class/module` has) and from control frame stacks. I will change this data structure to make `VALUE` (`T_IMEMO/ment`). And I put them onto value frames instead of control frame stacks. This change has several advantages. * Solve these issues. * [Bug #11200] Memory leak of method entries * [Bug #11046] `__callee__` returns incorrect method name in orphan proc * Simplify sweeping process of method entry * We can remove `rb_control_frame_t::me` * No need to push CREF for every method invocation. Method entries know required CREF. * We can share per method CREF only for make them public visibility scope. * We can introduce other optimization techniques. * We can remove `rb_control_frame_t::klass` field because method entries can manipulate this information. * We can introduce new method cache mechanism (maybe). The following pictures show how SVAR/CREF/MENT are located at value stacks. ![before-value-stack](1.PNG) ![after-value-stack](2.PNG) The following picture shows how alias was implemented. ![alias-relation](3.PNG) ---Files-------------------------------- 1.PNG (46.6 KB) 2.PNG (43.4 KB) 3.png (31.8 KB) -- https://bugs.ruby-lang.org/