[#39845] Re: [ruby-cvs:33238] Ruby:r26022 (trunk): * marshal.c (w_object): dump instance variables when using — Tanaka Akira <akr@...>
2009/12/5 <nobu@ruby-lang.org>:
3 messages
2009/12/06
[#39846] [Bug #2447] reduce GC pressure by symbol table without String instance — Yusuke Endoh <redmine@...>
Bug #2447: reduce GC pressure by symbol table without String instance
5 messages
2009/12/06
[#39847] stable find.rb — Tanaka Akira <akr@...>
ディレクトリを再帰的にたどった結果を比較することがあったのですが、
5 messages
2009/12/06
[#39851] Time.now + str と #to_r — Yukihiro Matsumoto <matz@...>
まつもと ゆきひろです
9 messages
2009/12/07
[#39852] Re: Time.now + str と #to_r
— "NARUSE, Yui" <naruse@...>
2009/12/07
成瀬です。
[#39855] [RubySpec #2460] RubySpecでFiberのSpecがおちる — 三村 益隆 <redmine@...>
RubySpec #2460: RubySpecでFiberのSpecがおちる
4 messages
2009/12/08
[#39863] [Feature #2471] want to choose a GC algorithm — _ wanabe <redmine@...>
Feature #2471: want to choose a GC algorithm
8 messages
2009/12/09
[#39874] faster Enumerator#each by rb_block_call with current block — Yusuke ENDOH <mame@...>
遠藤です。
7 messages
2009/12/13
[#39894] Re: faster Enumerator#each by rb_block_call with current block
— Yukihiro Matsumoto <matz@...>
2009/12/19
まつもと ゆきひろです
[#39897] Re: faster Enumerator#each by rb_block_call with current block
— Yusuke ENDOH <mame@...>
2009/12/20
遠藤です。
[#39912] [Bug #2522] Segmentation Fault is occurred on r26158 by running rubyspec — Kenta Murata <redmine@...>
Bug #2522: Segmentation Fault is occurred on r26158 by running rubyspec
4 messages
2009/12/23
[ruby-dev:39853] [Feature #2455] --dump=parsetree, --dump=parsetree_with_comment
From:
Yusuke Endoh <redmine@...>
Date:
2009-12-07 18:46:08 UTC
List:
ruby-dev #39853
Feature #2455: --dump=parsetree, --dump=parsetree_with_comment http://redmine.ruby-lang.org/issues/show/2455 起票者: Yusuke Endoh ステータス: Open, 優先度: Normal 担当者: Yukihiro Matsumoto, カテゴリ: core, Target version: 1.9.x 遠藤です。 Ruby をデバッグする際、node の構造をざっと把握したい場合がしばしば あります。 --dump=insns にならって、--dump=parsetree を入れてもいいでしょうか。 $ ./ruby --dump=parsetree -e '1 + 2 + 3' ############################################### ## Do NOT use this node dump for any purpose ## ## other than debug and research. ## ############################################### # @ NODE_SCOPE (line: 1) # +- nd_tbl: (empty) # +- nd_args: # | (null node) # +- nd_body: # @ NODE_CALL (line: 1) # +- nd_mid: :+ # +- nd_recv: # | @ NODE_CALL (line: 1) # | +- nd_mid: :+ # | +- nd_recv: # | | @ NODE_LIT (line: 1) # | | +- nd_lit: 1 # | +- nd_args: # | @ NODE_ARRAY (line: 1) # | +- nd_alen: 1 # | +- nd_head: # | | @ NODE_LIT (line: 1) # | | +- nd_lit: 2 # | +- nd_next: # | (null node) # +- nd_args: # @ NODE_ARRAY (line: 1) # +- nd_alen: 1 # +- nd_head: # | @ NODE_LIT (line: 1) # | +- nd_lit: 3 # +- nd_next: # (null node) $ ./ruby --dump=parsetree_with_comment -e '1 + 2 + 3' ############################################### ## Do NOT use this node dump for any purpose ## ## other than debug and research. ## ############################################### # @ NODE_SCOPE (line: 1) # | # [nd_tbl]: local table, [nd_args]: arguments, [nd_body]: body # +- nd_tbl (local table): (empty) # +- nd_args (arguments): # | (null node) # +- nd_body (body): # @ NODE_CALL (line: 1) # | # [nd_mid]([nd_args]) # +- nd_mid (method id): :+ # +- nd_recv (receiver): # | @ NODE_CALL (line: 1) # | | # [nd_mid]([nd_args]) # | +- nd_mid (method id): :+ # | +- nd_recv (receiver): # | | @ NODE_LIT (line: 1) # | | | # [nd_lit](literal) # | | +- nd_lit (literal): 1 # | +- nd_args (arguments): # | @ NODE_ARRAY (line: 1) # | | # [ [nd_head], [nd_next].. ] (length: [nd_alen]) # | +- nd_alen (length): 1 # | +- nd_head (element): # | | @ NODE_LIT (line: 1) # | | | # [nd_lit](literal) # | | +- nd_lit (literal): 2 # | +- nd_next (next element): # | (null node) # +- nd_args (arguments): # @ NODE_ARRAY (line: 1) # | # [ [nd_head], [nd_next].. ] (length: [nd_alen]) # +- nd_alen (length): 1 # +- nd_head (element): # | @ NODE_LIT (line: 1) # | | # [nd_lit](literal) # | +- nd_lit (literal): 3 # +- nd_next (next element): # (null node) Ruby のデバッグ以外にも、Ruby のコードに習熟していない人が Ruby の コードを読む際の助けになると思います。 私が昔 compile.c を読み始めていたころを思い出すと、node の構造を 理解していないことが大きな障害になっていました。(ドキュメントはなく、 nd_head, nd_body などの名前が様々な意味で転用・乱用されているので) 「デバッグと研究目的以外に使うな」と明示することで、node が非公開 API であることを再度主張する効果もあるかもしれません。 -- Yusuke Endoh <mame@tsg.ne.jp> ---------------------------------------- http://redmine.ruby-lang.org