summaryrefslogtreecommitdiff
path: root/vm.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.c
parent6a858e554c646c52f05f38b876e97322302c5c3d (diff)
* 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.c')
-rw-r--r--vm.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/vm.c b/vm.c
index fd7bd4f372..736494fe86 100644
--- a/vm.c
+++ b/vm.c
@@ -547,7 +547,7 @@ invoke_block(rb_thread_t *th, rb_block_t *block, VALUE self, int argc, VALUE *ar
if (BUILTIN_TYPE(block->iseq) != T_NODE) {
rb_iseq_t *iseq = block->iseq;
int i, opt_pc;
- int magic = block_proc_is_lambda(block->proc) ?
+ int type = block_proc_is_lambda(block->proc) ?
FRAME_MAGIC_LAMBDA : FRAME_MAGIC_BLOCK;
rb_vm_set_finish_env(th);
@@ -559,11 +559,11 @@ invoke_block(rb_thread_t *th, rb_block_t *block, VALUE self, int argc, VALUE *ar
th->cfp->sp[i] = argv[i];
}
- opt_pc = vm_yield_setup_args(th, iseq, argc, th->cfp->sp, magic == FRAME_MAGIC_LAMBDA);
+ opt_pc = vm_yield_setup_args(th, iseq, argc, th->cfp->sp, type == FRAME_MAGIC_LAMBDA);
argc = iseq->arg_size;
th->cfp->sp += argc;
- vm_push_frame(th, iseq, magic,
+ vm_push_frame(th, iseq, type,
self, GC_GUARDED_PTR(block->dfp),
iseq->iseq_encoded + opt_pc, th->cfp->sp, block->lfp,
iseq->local_size - argc);
@@ -783,7 +783,7 @@ check_svar(void)
rb_thread_t *th = GET_THREAD();
rb_control_frame_t *cfp = th->cfp;
while ((void *)(cfp + 1) < (void *)(th->stack + th->stack_size)) {
- /* printf("cfp: %p\n", cfp->magic); */
+ /* printf("cfp: %p\n", cfp->type); */
if (cfp->lfp && cfp->lfp[-1] != Qnil &&
TYPE(cfp->lfp[-1]) != T_VALUES) {
/* dp(cfp->lfp[-1]); */
@@ -1050,12 +1050,12 @@ yarv_init_redefined_flag(void)
VALUE *pc; // cfp[0]
VALUE *sp; // cfp[1]
VALUE *bp; // cfp[2]
- rb_iseq_t *iseq; // cfp[3]
- VALUE magic; // cfp[4]
+ rb_iseq_t *iseq; // cfp[3]
+ VALUE flag; // cfp[4]
VALUE self; // cfp[5]
VALUE *lfp; // cfp[6]
VALUE *dfp; // cfp[7]
- rb_iseq_t * block_iseq; // cfp[8]
+ rb_iseq_t * block_iseq; // cfp[8]
VALUE proc; // cfp[9] always 0
};