зеркало из https://github.com/github/ruby.git
* enum.c (sort_by_i): use NODE_DOT2 instead of NODE_MEMO to avoid
extra calls to is_pointer_to_heap() in GC. * enum.c (enum_zip): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17137 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
283826f751
Коммит
97c8c1fa0e
|
@ -1,3 +1,10 @@
|
||||||
|
Fri Jun 13 12:55:37 2008 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||||
|
|
||||||
|
* enum.c (sort_by_i): use NODE_DOT2 instead of NODE_MEMO to avoid
|
||||||
|
extra calls to is_pointer_to_heap() in GC.
|
||||||
|
|
||||||
|
* enum.c (enum_zip): ditto.
|
||||||
|
|
||||||
Fri Jun 13 00:41:58 2008 Yusuke Endoh <mame@tsg.ne.jp>
|
Fri Jun 13 00:41:58 2008 Yusuke Endoh <mame@tsg.ne.jp>
|
||||||
|
|
||||||
* test/ruby/test_thread.rb: add a test.
|
* test/ruby/test_thread.rb: add a test.
|
||||||
|
|
6
enum.c
6
enum.c
|
@ -691,7 +691,8 @@ sort_by_i(VALUE i, VALUE ary, int argc, VALUE *argv)
|
||||||
if (RBASIC(ary)->klass) {
|
if (RBASIC(ary)->klass) {
|
||||||
rb_raise(rb_eRuntimeError, "sort_by reentered");
|
rb_raise(rb_eRuntimeError, "sort_by reentered");
|
||||||
}
|
}
|
||||||
memo = rb_node_newnode(NODE_MEMO, rb_yield(i), i, 0);
|
/* use NODE_DOT2 as memo(v, v, -) */
|
||||||
|
memo = rb_node_newnode(NODE_DOT2, rb_yield(i), i, 0);
|
||||||
rb_ary_push(ary, (VALUE)memo);
|
rb_ary_push(ary, (VALUE)memo);
|
||||||
return Qnil;
|
return Qnil;
|
||||||
}
|
}
|
||||||
|
@ -1574,7 +1575,8 @@ enum_zip(int argc, VALUE *argv, VALUE obj)
|
||||||
if (!rb_block_given_p()) {
|
if (!rb_block_given_p()) {
|
||||||
result = rb_ary_new();
|
result = rb_ary_new();
|
||||||
}
|
}
|
||||||
memo = rb_node_newnode(NODE_MEMO, result, rb_ary_new4(argc, argv), 0);
|
/* use NODE_DOT2 as memo(v, v, -) */
|
||||||
|
memo = rb_node_newnode(NODE_DOT2, result, rb_ary_new4(argc, argv), 0);
|
||||||
rb_block_call(obj, id_each, 0, 0, allary ? zip_ary : zip_i, (VALUE)memo);
|
rb_block_call(obj, id_each, 0, 0, allary ? zip_ary : zip_i, (VALUE)memo);
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#define RUBY_VERSION "1.9.0"
|
#define RUBY_VERSION "1.9.0"
|
||||||
#define RUBY_RELEASE_DATE "2008-06-12"
|
#define RUBY_RELEASE_DATE "2008-06-13"
|
||||||
#define RUBY_VERSION_CODE 190
|
#define RUBY_VERSION_CODE 190
|
||||||
#define RUBY_RELEASE_CODE 20080612
|
#define RUBY_RELEASE_CODE 20080613
|
||||||
#define RUBY_PATCHLEVEL 0
|
#define RUBY_PATCHLEVEL 0
|
||||||
|
|
||||||
#define RUBY_VERSION_MAJOR 1
|
#define RUBY_VERSION_MAJOR 1
|
||||||
|
@ -9,7 +9,7 @@
|
||||||
#define RUBY_VERSION_TEENY 0
|
#define RUBY_VERSION_TEENY 0
|
||||||
#define RUBY_RELEASE_YEAR 2008
|
#define RUBY_RELEASE_YEAR 2008
|
||||||
#define RUBY_RELEASE_MONTH 6
|
#define RUBY_RELEASE_MONTH 6
|
||||||
#define RUBY_RELEASE_DAY 12
|
#define RUBY_RELEASE_DAY 13
|
||||||
|
|
||||||
#ifdef RUBY_EXTERN
|
#ifdef RUBY_EXTERN
|
||||||
RUBY_EXTERN const char ruby_version[];
|
RUBY_EXTERN const char ruby_version[];
|
||||||
|
|
Загрузка…
Ссылка в новой задаче