diff options
author | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-08-08 07:52:19 +0000 |
---|---|---|
committer | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-08-08 07:52:19 +0000 |
commit | 93b6f8d6195564d0884ee00f536a951f4c26288c (patch) | |
tree | ab922f8c850c7dda9d155e52b078026b6006dcb3 /vm_core.h | |
parent | 8637eac4066dedd2c716f385e22a9d31100b68c7 (diff) |
* compile.c, insns.def (checkmatch):
remove checkincludearray instruction and
add new instruction checkmatch.
This change is to solve
[Bug #4438] "rescue args type check omitted".
* iseq.c: increment ISEQ_MAJOR_VERSION because removal of
checkincludearray instruction.
* vm_core.h: add several definitions for
the checkmatch instruction.
* vm_insnhelper.c (check_match): added.
* bootstraptest/test_exception.rb: add a test.
* test/ruby/test_exception.rb: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36658 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_core.h')
-rw-r--r-- | vm_core.h | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -598,6 +598,16 @@ typedef struct { } rb_binding_t; /* used by compile time and send insn */ + +enum vm_check_match_type { + VM_CHECKMATCH_TYPE_WHEN = 1, + VM_CHECKMATCH_TYPE_CASE = 2, + VM_CHECKMATCH_TYPE_RESCUE = 3 +}; + +#define VM_CHECKMATCH_TYPE_MASK 0x03 +#define VM_CHECKMATCH_ARRAY 0x04 + #define VM_CALL_ARGS_SPLAT_BIT (0x01 << 1) #define VM_CALL_ARGS_BLOCKARG_BIT (0x01 << 2) #define VM_CALL_FCALL_BIT (0x01 << 3) |