Skip to content

Commit

Permalink
* vm_insnhelper.c (vm_check_frame_detail): should require me for
Browse files Browse the repository at this point in the history
  VM_FRAME_FLAG_BMETHOD type frame.




git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52366 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information
ko1 committed Oct 29, 2015
1 parent 4c42213 commit 4b852f6
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
5 changes: 5 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -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>

* gc.c (gc_mark_ptr): specify NOINLINE so that gc_mark() can return
Expand Down
8 changes: 6 additions & 2 deletions vm_insnhelper.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,17 @@ callable_method_entry_p(const rb_callable_method_entry_t *me)
}

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;

if (RB_TYPE_P(cref_or_me, T_IMEMO)) {
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)) {
rb_bug("vm_push_frame: specval (%p) should be a block_ptr on %x frame", (void *)specval, magic);
Expand Down Expand Up @@ -119,7 +123,7 @@ vm_check_frame(VALUE type,
{
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) {
/* BLK ME CREF */
CHECK(VM_FRAME_MAGIC_METHOD, TRUE, TRUE, FALSE);
Expand Down

0 comments on commit 4b852f6

Please sign in to comment.