summaryrefslogtreecommitdiff
path: root/insns.def
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-10-31 01:42:54 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-10-31 01:42:54 +0000
commitb76fd8283aa28794c082c61615b57bc0e80acdc7 (patch)
treed84fa4c3e9c691b471cfe8d66cd4b40976eb0dc2 /insns.def
parent2b82e06aaf112d8ebb48c5424940cb08e738d9b4 (diff)
* vm_core.h: some refactoring.
- move decl. of rb_compile_option_struct to iseq.h. - define enum iseq_type. - define enum vm_special_object_type. * compile.c: some refactoring. - apply above changes. - (struct iseq_link_element): change value of type. - remove unused decl. - fix comment. - rename iseq_build_body and iseq_build_exception to iseq_build_from_ary_body and iseq_build_from_ary_exception. * iseq.h: define enum catch_type and enum defined_type. * insns.def: apply above changes. * iseq.c: define ISEQ_MAJOR_VERSION and ISEQ_MINOR_VERSION. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29649 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'insns.def')
-rw-r--r--insns.def18
1 files changed, 12 insertions, 6 deletions
diff --git a/insns.def b/insns.def
index b117fd5e35..ea20320e75 100644
--- a/insns.def
+++ b/insns.def
@@ -336,7 +336,9 @@ putspecialobject
()
(VALUE val)
{
- switch (value_type) {
+ enum vm_special_object_type type = value_type;
+
+ switch (type) {
case VM_SPECIAL_OBJECT_VMCORE:
val = rb_mRubyVMFrozenCore;
break;
@@ -746,12 +748,14 @@ adjuststack
*/
DEFINE_INSN
defined
-(rb_num_t type, VALUE obj, VALUE needstr)
+(rb_num_t op_type, VALUE obj, VALUE needstr)
(VALUE v)
(VALUE val)
{
VALUE klass;
const char *expr_type = 0;
+ enum defined_type type = op_type;
+
val = Qnil;
switch (type) {
@@ -994,9 +998,9 @@ send
const rb_method_entry_t *me;
VALUE recv, klass;
rb_block_t *blockptr = 0;
- int num = caller_setup_args(th, GET_CFP(), op_flag, (int)op_argc,
+ VALUE flag = op_flag;
+ int num = caller_setup_args(th, GET_CFP(), flag, (int)op_argc,
(rb_iseq_t *)blockiseq, &blockptr);
- rb_num_t flag = op_flag;
ID id = op_id;
/* get receiver */
@@ -1020,13 +1024,15 @@ invokesuper
(VALUE val) // inc += - (int)(op_argc + ((op_flag & VM_CALL_ARGS_BLOCKARG_BIT) ? 1 : 0));
{
rb_block_t *blockptr = !(op_flag & VM_CALL_ARGS_BLOCKARG_BIT) ? GET_BLOCK_PTR() : 0;
- int num = caller_setup_args(th, GET_CFP(), op_flag,
+ VALUE flag = op_flag;
+ int num = caller_setup_args(th, GET_CFP(), flag,
(int)op_argc, blockiseq, &blockptr);
VALUE recv, klass;
ID id;
- VALUE flag = VM_CALL_SUPER_BIT | VM_CALL_FCALL_BIT;
const rb_method_entry_t *me;
+ flag = VM_CALL_SUPER_BIT | VM_CALL_FCALL_BIT;
+
recv = GET_SELF();
vm_search_superclass(GET_CFP(), GET_ISEQ(), recv, TOPN(num), &id, &klass);