summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-10-29 21:14:29 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-10-29 21:14:29 +0000
commit4b852f64da6872eea2f85e5f31eaf3c0452b310e (patch)
treecdd22e0671cdcfdb71effc5b68aef459631af5e8
parent4c42213c8e58a26cba6314c000abdf2ff0ce340e (diff)
* 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
-rw-r--r--ChangeLog5
-rw-r--r--vm_insnhelper.c8
2 files changed, 11 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 1247c73..4506b6d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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
diff --git a/vm_insnhelper.c b/vm_insnhelper.c
index b4af140..7fbdcd9 100644
--- a/vm_insnhelper.c
+++ b/vm_insnhelper.c
@@ -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);
@@ -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);