mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
iseq: reduce array allocations for simple sequences
* compile.c (iseq_add_mark_object): Use new rb_iseq_add_mark_object(). * insns.def (setinlinecache): Ditto. * iseq.c (rb_iseq_add_mark_object): New function to allocate iseq->mark_ary on demand. [Bug #8142] * iseq.h (rb_iseq_add_mark_object): Ditto. * iseq.c (prepare_iseq_build): Avoid allocating mark_ary until needed. * iseq.c (rb_iseq_build_for_ruby2cext): Ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40336 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
ce6db8f286
commit
cbd8b09920
5 changed files with 31 additions and 7 deletions
1
iseq.h
1
iseq.h
|
|
@ -21,6 +21,7 @@ VALUE rb_iseq_build_from_ary(rb_iseq_t *iseq, VALUE locals, VALUE args,
|
|||
VALUE exception, VALUE body);
|
||||
|
||||
/* iseq.c */
|
||||
void rb_iseq_add_mark_object(rb_iseq_t *iseq, VALUE obj);
|
||||
VALUE rb_iseq_load(VALUE data, VALUE parent, VALUE opt);
|
||||
VALUE rb_iseq_parameters(const rb_iseq_t *iseq, int is_proc);
|
||||
struct st_table *ruby_insn_make_insn_table(void);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue