mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* vm_insnhelper.c (vm_check_frame_detail): should require me for
VM_FRAME_FLAG_BMETHOD type frame. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52366 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
4c42213c8e
commit
4b852f64da
2 changed files with 11 additions and 2 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
Fri Oct 30 06:13:10 2015 Koichi Sasada <ko1@atdot.net>
|
||||||
|
|
||||||
|
* vm_insnhelper.c (vm_check_frame_detail): should require me for
|
||||||
|
VM_FRAME_FLAG_BMETHOD type frame.
|
||||||
|
|
||||||
Thu Oct 29 18:42:30 2015 Koichi Sasada <ko1@atdot.net>
|
Thu Oct 29 18:42:30 2015 Koichi Sasada <ko1@atdot.net>
|
||||||
|
|
||||||
* gc.c (gc_mark_ptr): specify NOINLINE so that gc_mark() can return
|
* gc.c (gc_mark_ptr): specify NOINLINE so that gc_mark() can return
|
||||||
|
|
|
@ -67,13 +67,17 @@ callable_method_entry_p(const rb_callable_method_entry_t *me)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
vm_check_frame_detail(int magic, int req_block, int req_me, int req_cref, VALUE specval, VALUE cref_or_me)
|
vm_check_frame_detail(VALUE type, int req_block, int req_me, int req_cref, VALUE specval, VALUE cref_or_me)
|
||||||
{
|
{
|
||||||
|
int magic = (int)(type & VM_FRAME_MAGIC_MASK);
|
||||||
enum imemo_type cref_or_me_type = imemo_none;
|
enum imemo_type cref_or_me_type = imemo_none;
|
||||||
|
|
||||||
if (RB_TYPE_P(cref_or_me, T_IMEMO)) {
|
if (RB_TYPE_P(cref_or_me, T_IMEMO)) {
|
||||||
cref_or_me_type = imemo_type(cref_or_me);
|
cref_or_me_type = imemo_type(cref_or_me);
|
||||||
}
|
}
|
||||||
|
if (type & VM_FRAME_FLAG_BMETHOD) {
|
||||||
|
req_me = TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
if (req_block && !VM_ENVVAL_BLOCK_PTR_P(specval)) {
|
if (req_block && !VM_ENVVAL_BLOCK_PTR_P(specval)) {
|
||||||
rb_bug("vm_push_frame: specval (%p) should be a block_ptr on %x frame", (void *)specval, magic);
|
rb_bug("vm_push_frame: specval (%p) should be a block_ptr on %x frame", (void *)specval, magic);
|
||||||
|
@ -119,7 +123,7 @@ vm_check_frame(VALUE type,
|
||||||
{
|
{
|
||||||
int magic = (int)(type & VM_FRAME_MAGIC_MASK);
|
int magic = (int)(type & VM_FRAME_MAGIC_MASK);
|
||||||
|
|
||||||
#define CHECK(magic, req_block, req_me, req_cref) case magic: vm_check_frame_detail(magic, req_block, req_me, req_cref, specval, cref_or_me); break;
|
#define CHECK(magic, req_block, req_me, req_cref) case magic: vm_check_frame_detail(type, req_block, req_me, req_cref, specval, cref_or_me); break;
|
||||||
switch (magic) {
|
switch (magic) {
|
||||||
/* BLK ME CREF */
|
/* BLK ME CREF */
|
||||||
CHECK(VM_FRAME_MAGIC_METHOD, TRUE, TRUE, FALSE);
|
CHECK(VM_FRAME_MAGIC_METHOD, TRUE, TRUE, FALSE);
|
||||||
|
|
Loading…
Reference in a new issue