summaryrefslogtreecommitdiff
path: root/vm_dump.c
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-07-05 10:49:45 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-07-05 10:49:45 +0000
commit0d0ef6eccc50ed95d8babcf5381426c70c4d4b30 (patch)
tree64febf0ca7b2574ab1d65942e97c0e14a5194389 /vm_dump.c
parent6a858e554c646c52f05f38b876e97322302c5c3d (diff)
downloadbundler-0d0ef6eccc50ed95d8babcf5381426c70c4d4b30.tar.gz
* yarvcore.h: rename rb_control_frame_t#magic to flag.
* vm.h: add VM_FRAME_TYPE() and VM_FRAME_FLAG(). * cont.c, insnhelper.ci, insns.def, vm.c, vm_dump.c, vm_evalbody.ci, yarvcore.c: apply above changes. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12706 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_dump.c')
-rw-r--r--vm_dump.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/vm_dump.c b/vm_dump.c
index 76b63bd203..c72b4e1e7e 100644
--- a/vm_dump.c
+++ b/vm_dump.c
@@ -46,7 +46,7 @@ control_frame_dump(rb_thread_t *th, rb_control_frame_t *cfp)
bp = cfp->bp - th->stack;
}
- switch (cfp->magic) {
+ switch (VM_FRAME_TYPE(cfp)) {
case FRAME_MAGIC_TOP:
magic = "TOP";
break;
@@ -263,15 +263,15 @@ stack_dump_each(rb_thread_t *th, rb_control_frame_t *cfp)
/* stack trace header */
- if (cfp->magic == FRAME_MAGIC_METHOD ||
- cfp->magic == FRAME_MAGIC_TOP ||
- cfp->magic == FRAME_MAGIC_BLOCK ||
- cfp->magic == FRAME_MAGIC_CLASS ||
- cfp->magic == FRAME_MAGIC_PROC ||
- cfp->magic == FRAME_MAGIC_LAMBDA ||
- cfp->magic == FRAME_MAGIC_CFUNC ||
- cfp->magic == FRAME_MAGIC_IFUNC ||
- cfp->magic == FRAME_MAGIC_EVAL) {
+ if (VM_FRAME_TYPE(cfp) == FRAME_MAGIC_METHOD ||
+ VM_FRAME_TYPE(cfp) == FRAME_MAGIC_TOP ||
+ VM_FRAME_TYPE(cfp) == FRAME_MAGIC_BLOCK ||
+ VM_FRAME_TYPE(cfp) == FRAME_MAGIC_CLASS ||
+ VM_FRAME_TYPE(cfp) == FRAME_MAGIC_PROC ||
+ VM_FRAME_TYPE(cfp) == FRAME_MAGIC_LAMBDA ||
+ VM_FRAME_TYPE(cfp) == FRAME_MAGIC_CFUNC ||
+ VM_FRAME_TYPE(cfp) == FRAME_MAGIC_IFUNC ||
+ VM_FRAME_TYPE(cfp) == FRAME_MAGIC_EVAL) {
VALUE *ptr = dfp - local_size;
@@ -304,7 +304,7 @@ stack_dump_each(rb_thread_t *th, rb_control_frame_t *cfp)
ptr - th->stack);
}
}
- else if (cfp->magic == FRAME_MAGIC_FINISH) {
+ else if (VM_FRAME_TYPE(cfp) == FRAME_MAGIC_FINISH) {
if ((th)->stack + (th)->stack_size > (VALUE *)(cfp + 2)) {
stack_dump_each(th, cfp + 1);
}
@@ -313,7 +313,7 @@ stack_dump_each(rb_thread_t *th, rb_control_frame_t *cfp)
}
}
else {
- rb_bug("unsupport frame type: %08lx", cfp->magic);
+ rb_bug("unsupport frame type: %08lx", VM_FRAME_TYPE(cfp));
}
}
@@ -354,7 +354,7 @@ debug_print_pre(rb_thread_t *th, rb_control_frame_t *cfp)
{
rb_iseq_t *iseq = cfp->iseq;
- if (iseq != 0 && cfp->magic != FRAME_MAGIC_FINISH) {
+ if (iseq != 0 && VM_FRAME_TYPE(cfp) != FRAME_MAGIC_FINISH) {
VALUE *seq = iseq->iseq;
int pc = cfp->pc - iseq->iseq_encoded;