зеркало из https://github.com/github/ruby.git
newhashfromarray should be a leaf insn.
* insns.def (newhashfromarray): `rb_hash_bulk_insert()` can call Ruby methods like #hash so that it should not be a leaf insn. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65345 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
434207e84d
Коммит
6fa2b5e8d4
|
@ -518,6 +518,7 @@ newhashfromarray
|
|||
(rb_num_t num, VALUE ary)
|
||||
()
|
||||
(VALUE hash)
|
||||
// attr bool leaf = false; /* rb_hash_bulk_insert() can call methods. */
|
||||
{
|
||||
VM_ASSERT(num * 2 == (rb_num_t)RARRAY_LEN(ary));
|
||||
hash = rb_hash_new_with_size(num);
|
||||
|
|
Загрузка…
Ссылка в новой задаче