From 51a0f04e6beae33047016204f0fd3546cc0b66e3 Mon Sep 17 00:00:00 2001 From: k0kubun Date: Tue, 30 Oct 2018 14:57:03 +0000 Subject: _mjit_compile_send.erb: do not inline tailcall ISeq because it's not supported by this file. Also, shared `def_iseq_ptr` instead of copying the main definition of it. vm_core.h: moved `def_iseq_ptr` to this place. added `inline` to avoid compiler warnings since it's not used in some files including vm_core.h. vm_insnhelper.c: moved `def_iseq_ptr` to vm_core.h. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65440 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- vm_core.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'vm_core.h') diff --git a/vm_core.h b/vm_core.h index 818a6f9707..fbcb013e46 100644 --- a/vm_core.h +++ b/vm_core.h @@ -507,6 +507,15 @@ rb_iseq_check(const rb_iseq_t *iseq) return iseq; } +static inline const rb_iseq_t * +def_iseq_ptr(rb_method_definition_t *def) +{ +#if VM_CHECK_MODE > 0 + if (def->type != VM_METHOD_TYPE_ISEQ) rb_bug("def_iseq_ptr: not iseq (%d)", def->type); +#endif + return rb_iseq_check(def->body.iseq.iseqptr); +} + enum ruby_special_exceptions { ruby_error_reenter, ruby_error_nomemory, -- cgit v1.2.3