[#45174] [ruby-trunk - Feature #5959][Assigned] Addrinfo#inspectname — Yui NARUSE <naruse@...>
9 messages
2012/02/02
[#45177] Re: [ruby-trunk - Feature #5959][Assigned] Addrinfo#inspectname
— Tanaka Akira <akr@...>
2012/02/02
2012年2月2日17:16 Yui NARUSE <naruse@airemix.jp>:
[#45178] Re: [ruby-trunk - Feature #5959][Assigned] Addrinfo#inspectname
— Tanaka Akira <akr@...>
2012/02/02
2012年2月2日18:12 Tanaka Akira <akr@fsij.org>:
[#45179] Re: [ruby-trunk - Feature #5959][Assigned] Addrinfo#inspectname
— "NARUSE, Yui" <naruse@...>
2012/02/02
(2012/02/02 18:33), Tanaka Akira wrote:
[#45192] Re: [ruby-trunk - Feature #5959][Assigned] Addrinfo#inspectname
— Tanaka Akira <akr@...>
2012/02/05
2012年2月2日19:13 NARUSE, Yui <naruse@airemix.jp>:
[#45183] Plan to 1.9.3 1st patch release — "NARUSE, Yui" <naruse@...>
もう気分は 2.0 なので正直 1.9.3 とかどうでもいいんですけど(ぇー)、
8 messages
2012/02/03
[#45184] Re: Plan to 1.9.3 1st patch release
— KOSAKI Motohiro <kosaki.motohiro@...>
2012/02/03
> = backport 時のレビューの廃止
[ruby-dev:45208] [ruby-trunk - Feature #490][Closed] relayouting struct RNode
From:
Motohiro KOSAKI <kosaki.motohiro@...>
Date:
2012-02-07 17:52:43 UTC
List:
ruby-dev #45208
Issue #490 has been updated by Motohiro KOSAKI.
Status changed from Assigned to Closed
ええと nd_file を reservedに変える変更はすでに入ってるので、これ閉じていいですよね?
魅力的な新機能を思いついた人がチケットを切り直してください
----------------------------------------
Feature #490: relayouting struct RNode
https://bugs.ruby-lang.org/issues/490
Author: Yuki Sonoda
Status: Closed
Priority: Low
Assignee: Yukihiro Matsumoto
Category: core
Target version: 2.0.0
=begin
Yuguiです。
「第7回RHGの逆襲」(http://qwik.jp/rhg-strikes-back/78.html )の結果とし
て、RNode::nd_fileは誰も利用していないことが分かりました。
よって、RNodeのレイアウトにおいてポインタ長だけ空間が余っています。添付
のパッチでは、とりあえずこの空間をvoid *reservedとして、YARVに残っている
無駄なNULL pointer代入を削除してみました。
さて、この空間を何らかの形で有益に活用したいと思います。関係者に聞いてみ
たところでは次のような案が出てきました。
1) 行番号に使う
行番号のMAXが15bit増えます。現状では32bit環境でも2**17あるので現実的に
特に困ることはないと思いますが、もう少し増えても悪くはないかもしれません。
2) RNodeを4分木にする
ASTの分岐の数を増やします。笹田さんによれば、これで楽になるケースが少
しはあるとのことです。
どのようにしたら良いか、ご意見をいただければと思います。
--
Yugui <yugui@yugui.jp>
http://yugui.jp
私は私をDumpする
diff --git a/include/ruby/node.h b/include/ruby/node.h
index d83f550..6621ac1 100644
--- a/include/ruby/node.h
+++ b/include/ruby/node.h
@@ -242,7 +242,7 @@ enum node_type {
typedef struct RNode {
unsigned long flags;
- char *nd_file;
+ void *reserved;
union {
struct RNode *node;
ID id;
diff --git a/iseq.c b/iseq.c
index b964176..9de648b 100644
--- a/iseq.c
+++ b/iseq.c
@@ -118,12 +118,10 @@ set_relation(rb_iseq_t *iseq, const VALUE parent)
if (type == ISEQ_TYPE_TOP) {
/* toplevel is private */
iseq->cref_stack = NEW_BLOCK(th->top_wrapper ? th->top_wrapper : rb_cObject);
- iseq->cref_stack->nd_file = 0;
iseq->cref_stack->nd_visi = NOEX_PRIVATE;
}
else if (type == ISEQ_TYPE_METHOD || type == ISEQ_TYPE_CLASS) {
iseq->cref_stack = NEW_BLOCK(0); /* place holder */
- iseq->cref_stack->nd_file = 0;
}
else if (RTEST(parent)) {
rb_iseq_t *piseq;
diff --git a/vm.c b/vm.c
index 730d89c..b1b67d8 100644
--- a/vm.c
+++ b/vm.c
@@ -748,7 +748,6 @@ vm_cref_push(rb_thread_t *th, VALUE klass, int noex)
{
rb_control_frame_t *cfp = vm_get_ruby_level_caller_cfp(th, th->cfp);
NODE *cref = NEW_BLOCK(klass);
- cref->nd_file = 0;
cref->nd_visi = noex;
if (cfp) {
=end
--
http://bugs.ruby-lang.org/