[#37008] [Bug #705] sample/test.rb:1829: [BUG] Segmentation fault — pegacorn jp <redmine@...>
Bug #705: sample/test.rb:1829: [BUG] Segmentation fault
[#37009] add RUNRUBYOPT in mswin32 Makefile.sub — Masaki Suketa <masaki.suketa@...>
助田です。
[#37026] :FOO === "FOO" => true and case/when behavior — keiju@... (Keiju ISHITSUKA)
けいじゅ@いしつかです.
[#37027] Re: [Feature #711] M17N of irb — keiju@... (keiju ISHITSUKA)
けいじゅ@いしつかです.
[#37028] [Backport #716] Hash#key — "rubikitch ." <redmine@...>
Backport #716: Hash#key
チケット #716 が更新されました。 (by Akinori MUSHA)
[#37050] [Feature #735] Date#inspect — "rubikitch ." <redmine@...>
Feature #735: Date#inspect
> 「inspectは人間に優しい文字列化」という観点から、Date#inspectの出力はふさわしくないと思います。
[#37075] [Feature #747] /\A/u ignores BOM — Shyouhei Urabe <redmine@...>
Feature #747: /\A/u ignores BOM
卜部です。
[#37095] ruby1.9 segmentation fault — keiju@... (Keiju ISHITSUKA)
けいじゅ@いしつかです.
[#37117] test/webrick/test_server.rb doesn't finish — shinichiro.h <shinichiro.hamaji@...>
浜地といいます。
[#37126] Re: [ruby-cvs:27470] Ruby:r20251 (trunk): * lib/time.rb: according to RFC2822, -0000 means local time, +0000 — Tanaka Akira <akr@...>
In article <200811181512.mAIFC3YP006108@ci.ruby-lang.org>,
[#37142] eval with binding — "U.Nakamura" <usa@...>
こんにちは、なかむら(う)です。
[#37146] Re: [ruby-cvs:27544] Ruby:r20326 (ruby_1_9_1): merges r20298 from trunk into ruby_1_9_1. — Yukihiro Matsumoto <matz@...>
まつもと ゆきひろです
[#37156] [Bug #780] Time#strftime で、フラグ 0 が幅と解釈される — tadayoshi funaba <redmine@...>
Bug #780: Time#strftime で、フラグ 0 が幅と解釈される
[#37158] [Bug #782] 余分な外部シンボル — Tadashi Saito <redmine@...>
Bug #782: 余分な外部シンボル
[#37161] m17n of irb — "Yugui (Yuki Sonoda)" <yugui@...>
Yuguiです。
けいじゅ@いしつかです.
keiju ISHITSUKA さんは書きました:
まつもと ゆきひろです
Yuguiです。
まつもと ゆきひろです
Yukihiro Matsumoto さんは書きました:
Yuguiです。
まつもと ゆきひろです
けいじゅ@いしつかです.
まつもと ゆきひろです
けいじゅ@いしつかです.
まつもと ゆきひろです
[#37168] [Bug #786] Time#strftime で %s が負である場合に桁を間違える — tadayoshi funaba <redmine@...>
Bug #786: Time#strftime で %s が負である場合に桁を間違える
まつもと ゆきひろです
[#37187] [Bug #793] BigDecimal('Infinity').to_r が零になる — tadayoshi funaba <redmine@...>
Bug #793: BigDecimal('Infinity').to_r が零になる
まつもと ゆきひろです
[#37190] [Bug #795] test_gdbm.rb: tmptest_gdbm_,tmptest_gdbm_rdonlyが残っているとErrorになる — Kazuhiro NISHIYAMA <redmine@...>
Bug #795: test_gdbm.rb: tmptest_gdbm_,tmptest_gdbm_rdonlyが残っているとErrorになる
まつもと ゆきひろです
[#37210] RSS::Maker.create(version) — "Akinori MUSHA" <knu@...>
RSS::Maker で、 "2.0" 等の文字列でフィードのフォーマットを渡す
須藤です。
At Thu, 27 Nov 2008 19:11:01 +0900,
須藤です。
At Sat, 29 Nov 2008 17:18:20 +0900,
須藤です。
At Mon, 1 Dec 2008 21:48:34 +0900,
須藤です。
At Mon, 8 Dec 2008 20:28:44 +0900,
[#37213] Re: [ruby-cvs:27586] Ruby:r20368 (trunk): * ext/bigdecimal/bigdecimal.c (BigDecimal_div2): should return — Tadayoshi Funaba <tadf@...>
> * ext/bigdecimal/bigdecimal.c (BigDecimal_div2): should return
まつもと ゆきひろです
まつもと ゆきひろです
斎藤と申します。
まつもと ゆきひろです
斎藤です。
[ruby-dev:37106] [Feature:1.9] speed up continuation in 1.9
遠藤です。
1.9 の継続は 1.8 に比べて極端に遅いようです。
$ time ruby18 -e 'i = 0; callcc {|c| $c = c }; i += 1; $c.call if i < 1000000'
real 0m1.060s
user 0m1.050s
sys 0m0.010s
$ time ruby19 -rcontinuation -e 'i = 0; callcc {|c| $c = c }; i += 1;
$c.call if i < 1000000'
real 1m57.022s
user 1m56.780s
sys 0m0.180s
capture や call の際、VM のスタックを常に丸ごとコピーしているのが
原因で、必要なところ (先頭の sp 部分と終端の cfp 部分) だけコピー
するようにしたら、1.8 並に速くなりました。
$ time ./ruby.fast-cont -rcontinuation -e 'i = 0; callcc {|c| $c = c
}; i += 1; $c.call if i < 1000000'
real 0m0.660s
user 0m0.660s
sys 0m0.000s
私の環境で test-all が通ることは確認しています。
とくに異論がなければコミットしようと思います。
Index: cont.c
===================================================================
--- cont.c (revision 20241)
+++ cont.c (working copy)
@@ -14,6 +14,8 @@
#include "gc.h"
#include "eval_intern.h"
+#define CAPTURE_JUST_VALID_VM_STACK 1
+
enum context_type {
CONTINUATION_CONTEXT = 0,
FIBER_CONTEXT = 1,
@@ -25,6 +27,10 @@
VALUE self;
VALUE value;
VALUE *vm_stack;
+#ifdef CAPTURE_JUST_VALID_VM_STACK
+ int vm_stack_slen; /* length of stack (head of th->stack) */
+ int vm_stack_clen; /* length of control frames (tail of th->stack) */
+#endif
VALUE *machine_stack;
VALUE *machine_stack_src;
#ifdef __ia64
@@ -75,8 +81,13 @@
rb_thread_mark(&cont->saved_thread);
if (cont->vm_stack) {
+#ifdef CAPTURE_JUST_VALID_VM_STACK
rb_gc_mark_locations(cont->vm_stack,
- cont->vm_stack + cont->saved_thread.stack_size);
+ cont->vm_stack + cont->vm_stack_slen + cont->vm_stack_clen);
+#elif
+ rb_gc_mark_localtion(cont->vm_stack,
+ cont->vm_stack, cont->saved_thread.stack_size);
+#endif
}
if (cont->machine_stack) {
@@ -247,8 +258,16 @@
contval = cont->self;
sth = &cont->saved_thread;
+#ifdef CAPTURE_JUST_VALID_VM_STACK
+ cont->vm_stack_slen = th->cfp->sp + th->mark_stack_len - th->stack;
+ cont->vm_stack_clen = th->stack + th->stack_size - (VALUE*)th->cfp;
+ cont->vm_stack = ALLOC_N(VALUE, cont->vm_stack_slen + cont->vm_stack_clen);
+ MEMCPY(cont->vm_stack, th->stack, VALUE, cont->vm_stack_slen);
+ MEMCPY(cont->vm_stack + cont->vm_stack_slen, (VALUE*)th->cfp,
VALUE, cont->vm_stack_clen);
+#elif
cont->vm_stack = ALLOC_N(VALUE, th->stack_size);
MEMCPY(cont->vm_stack, th->stack, VALUE, th->stack_size);
+#endif
sth->stack = 0;
cont_save_machine_stack(th, cont);
@@ -288,7 +307,13 @@
th->stack_size = fcont->saved_thread.stack_size;
th->stack = fcont->saved_thread.stack;
}
+#ifdef CAPTURE_JUST_VALID_VM_STACK
+ MEMCPY(th->stack, cont->vm_stack, VALUE, cont->vm_stack_slen);
+ MEMCPY(th->stack + sth->stack_size - cont->vm_stack_clen,
+ cont->vm_stack + cont->vm_stack_slen, VALUE, cont->vm_stack_clen);
+#elif
MEMCPY(th->stack, cont->vm_stack, VALUE, sth->stack_size);
+#endif
}
else {
/* fiber */
--
Yusuke ENDOH <mame@tsg.ne.jp>