зеркало из https://github.com/github/ruby.git
* vm.h (FRAME_MAGIC_MASK_BITS): bits of FRAME_MAGIC_MASK.
* insnhelper.ci (vm_call_cfunc, vm_cfunc_flags): use shift operations. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13857 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
28c0aec1d8
Коммит
6e572060eb
|
@ -1,3 +1,9 @@
|
|||
Fri Nov 9 22:04:21 2007 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* vm.h (FRAME_MAGIC_MASK_BITS): bits of FRAME_MAGIC_MASK.
|
||||
|
||||
* insnhelper.ci (vm_call_cfunc, vm_cfunc_flags): use shift operations.
|
||||
|
||||
Fri Nov 9 21:46:28 2007 Koichi Sasada <ko1@atdot.net>
|
||||
|
||||
* eval.c (eval): should be volatile value for GC.
|
||||
|
|
|
@ -355,7 +355,7 @@ vm_call_cfunc(rb_thread_t *th, rb_control_frame_t *reg_cfp, int num,
|
|||
EXEC_EVENT_HOOK(th, RUBY_EVENT_C_CALL, recv, id, klass);
|
||||
{
|
||||
rb_control_frame_t *cfp =
|
||||
vm_push_frame(th, 0, FRAME_MAGIC_CFUNC | flag * (FRAME_MAGIC_MASK + 1),
|
||||
vm_push_frame(th, 0, FRAME_MAGIC_CFUNC | (flag << FRAME_MAGIC_MASK_BITS),
|
||||
recv, (VALUE) blockptr, 0, reg_cfp->sp, 0, 1);
|
||||
|
||||
cfp->method_id = id;
|
||||
|
@ -379,7 +379,7 @@ static int
|
|||
vm_cfunc_flags(rb_control_frame_t *cfp)
|
||||
{
|
||||
if (RUBYVM_CFUNC_FRAME_P(cfp))
|
||||
return cfp->flag / (FRAME_MAGIC_MASK + 1);
|
||||
return cfp->flag >> FRAME_MAGIC_MASK_BITS;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
3
vm.h
3
vm.h
|
@ -236,7 +236,8 @@ default: \
|
|||
#define FRAME_MAGIC_IFUNC 0x81
|
||||
#define FRAME_MAGIC_EVAL 0x91
|
||||
#define FRAME_MAGIC_LAMBDA 0xa1
|
||||
#define FRAME_MAGIC_MASK 0xff
|
||||
#define FRAME_MAGIC_MASK_BITS 8
|
||||
#define FRAME_MAGIC_MASK (~(~0<<FRAME_MAGIC_MASK_BITS))
|
||||
|
||||
#define VM_FRAME_FLAG(type) ((VALUE)((type) & FRAME_MAGIC_MASK))
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче