[#46689] [IMPORTANT] 2.0.0 release plan — Yusuke Endoh <mame@...>
ALL COMMITTERS SHOULD READ THIS MAIL! コミッタはこのメール読んで!
5 messages
2012/12/02
[#46707] [ruby-trunk - Feature #7510][Open] irb --help が古い — "sho-h (Sho Hashimoto)" <sho-h@...>
6 messages
2012/12/04
[#46710] [ruby-trunk - Bug #7520][Assigned] irb/completion でインスタンス変数がチェックされていない — "tarui (Masaya Tarui)" <tarui@...>
4 messages
2012/12/05
[#46747] [ruby-trunk - Bug #7572][Open] クラス定義においてスーパークラスとしてクラスでないものを指定してもエラーにならない事がある — "tadf (tadayoshi funaba)" <redmine@...>
6 messages
2012/12/16
[#46750] [ruby-trunk - Bug #7575][Open] Struct のメンバーをアクセサで参照できない事がある — "tadf (tadayoshi funaba)" <redmine@...>
4 messages
2012/12/16
[#46766] [ruby-trunk - Bug #7590][Open] parallel test-all で test_settracefunc が cfp consistency error — "tarui (Masaya Tarui)" <tarui@...>
5 messages
2012/12/19
[#46797] [ruby-trunk - Bug #7603][Open] app_factorial と so_ackermann が動かない — "authorNari (Narihiro Nakamura)" <authorNari@...>
5 messages
2012/12/22
[#46798] Re: [ruby-dev:46797] [ruby-trunk - Bug #7603][Open] app_factorial と so_ackermann が動かない
— SASADA Koichi <ko1@...>
2012/12/22
あれぇ,以前よりも増やしたつもりだったんだけど....
[#46807] [ruby-trunk - Bug #7625][Open] Arrayを継承したオブジェクトのcompactがArrayを返す — "mogya@... (Daisuke Furukawa)" <mogya@...>
19 messages
2012/12/26
[#46813] backport93からの移動 [Re: [ruby-core:51175] [Backport93 - Backport #7632] IRB autocompletion bug] — keiju@... (keiju ISHITSUKA)
けいじゅ@いしつかです.
3 messages
2012/12/29
[ruby-dev:46727] [ruby-trunk - Feature #6993] Class#allocate の仕様変更(Cレベル)
From:
"agrimm (Andrew Grimm)" <andrew.j.grimm@...>
Date:
2012-12-12 12:06:45 UTC
List:
ruby-dev #46727
Issue #6993 has been updated by agrimm (Andrew Grimm).
preview2もはちょっとです:
(Preview 2 is also bad)
$ gem install ruby-prof
Building native extensions. This could take a while...
ERROR: Error installing ruby-prof:
ERROR: Failed to build gem native extension.
/Users/agrimm/.rvm/rubies/ruby-head/bin/ruby extconf.rb
checking for sys/times.h... yes
checking for rb_os_allocated_objects()... no
checking for rb_gc_allocated_size()... no
checking for rb_gc_collections()... no
checking for rb_gc_time()... no
checking for rb_class_superclass()... yes
checking for rb_heap_total_mem()... no
checking for rb_gc_heap_info()... no
creating Makefile
make
compiling rp_call_info.c
compiling rp_measure.c
compiling rp_measure_allocations.c
compiling rp_measure_cpu_time.c
compiling rp_measure_gc_runs.c
compiling rp_measure_gc_time.c
compiling rp_measure_memory.c
compiling rp_measure_process_time.c
compiling rp_measure_wall_time.c
compiling rp_method.c
rp_method.c: In function ‘method_name’:
rp_method.c:101: error: ‘ID_ALLOCATOR’ undeclared (first use in this function)
rp_method.c:101: error: (Each undeclared identifier is reported only once
rp_method.c:101: error: for each function it appears in.)
make: *** [rp_method.o] Error 1
Gem files will remain installed in /Users/agrimm/.rvm/gems/ruby-head/gems/ruby-prof-0.11.2 for inspection.
Results logged to /Users/agrimm/.rvm/gems/ruby-head/gems/ruby-prof-0.11.2/ext/ruby_prof/gem_make.out
$ ruby --version
ruby 2.0.0dev (2012-12-12) [x86_64-darwin10.8.0]
Mame-san, were you saying "if it doesn't work on preview2, please re-open the issue"? Apologies for re-opening if I misunderstood you.
----------------------------------------
Feature #6993: Class#allocate の仕様変更(Cレベル)
https://bugs.ruby-lang.org/issues/6993#change-34656
Author: ko1 (Koichi Sasada)
Status: Closed
Priority: Normal
Assignee: nobu (Nobuyoshi Nakada)
Category: core
Target version: 2.0.0
=begin
ささだです.
現在,Class#new を呼び出すと,Class#allocate が呼ばれます.Class#allocate は,次のような特徴を持つ,ちょっと特殊なメソッドになっています.
* 普通に定義しても Class#new からは使われない
* 実際に動かす処理 func は rb_define_alloc_func(klass, func) として登録する
* func は ID_ALLOCATOR という特殊なメソッド名で登録される(対応するシンボル名はなし,つまり rb_id2name(ID_ALLOCATOR) は NULL を返す
* func は rb_funcall(klass, ID_ALLOCATOR, ...) で呼ばれる
これは,変な allocator を定義出来ないようにするための処置だったと思います(多分).
他にも,
* backtrace には現れない
* set_trace_func ではスキップする
という特殊な処理をしており,Ruby からは見えないようになっています.ただし,set_trace_func には現れませんが,C で trace_func を登録すると呼べてしまう,という中途半端な感じになっています.
これについて,中田さんと協議したんですが,そもそも allocator function はメソッド呼び出し(rb_funcall)で呼ばないでもいいんでないか,という結論を得ました.具体的には,rb_classext_t に allocator function を登録するようにして,それを呼び出す,ということになります.
あり得る問題点としては,allocator function から super が出来ない,という話がありました.ただし,そんなことやる奴はいないだろう,ということで allocator function の制限とするのがいいのではないか,という議論になりました.
副次的な効果として,allocator function のためにメソッドフレームを積む必要がなくなり,ユーザ定義クラスの生成が若干速くなる,ということがあります.
なお,もう一方の選択肢としては,allocator function を backtrace や set_trace_func などで特別扱いしない,というものがありましたが,今まで見えなかったものが見えると互換性的にまずいかもしれない,という話がありました.
というわけで,こんな感じで(中田さんが)進めようと思うのですが,何かお気づきの点がありましたらご指摘下さい.
=end
--
http://bugs.ruby-lang.org/