ruby-internal 0.7.3 → 0.8.0
Sign up to get free protection for your applications and to get access to all the features.
- data/bin/ruby-internal-node-dump +1 -1
- data/bin/ruby-internal-obfuscate +1 -1
- data/ext/cached/ruby-1.8.4/internal/method/{method.h → internal_method.h} +12 -0
- data/ext/cached/ruby-1.8.4/internal/module/getcfp.h +13 -0
- data/ext/cached/ruby-1.8.4/internal/node/global_entry.h +94 -0
- data/ext/cached/ruby-1.8.4/internal/node/node_type_descrip.c +41 -41
- data/ext/cached/ruby-1.8.4/internal/node/nodeinfo.c +288 -273
- data/ext/cached/ruby-1.8.4/internal/vm/instruction/insns_info.c +3 -0
- data/ext/cached/ruby-1.8.4/internal/vm/iseq/iseq_load.inc +21 -2
- data/ext/cached/{ruby-1.8.3/internal/method/method.h → ruby-1.8.5/internal/method/internal_method.h} +12 -0
- data/ext/cached/ruby-1.8.5/internal/module/getcfp.h +13 -0
- data/ext/cached/ruby-1.8.5/internal/node/global_entry.h +94 -0
- data/ext/cached/ruby-1.8.5/internal/node/node_type_descrip.c +45 -45
- data/ext/cached/ruby-1.8.5/internal/node/nodeinfo.c +310 -295
- data/ext/cached/ruby-1.8.5/internal/vm/instruction/insns_info.c +3 -0
- data/ext/cached/ruby-1.8.5/internal/vm/iseq/iseq_load.inc +21 -2
- data/ext/cached/{ruby-1.8.5/internal/method/method.h → ruby-1.8.6/internal/method/internal_method.h} +12 -0
- data/ext/cached/ruby-1.8.6/internal/module/getcfp.h +13 -0
- data/ext/cached/ruby-1.8.6/internal/node/global_entry.h +94 -0
- data/ext/cached/ruby-1.8.6/internal/node/node_type_descrip.c +48 -48
- data/ext/cached/ruby-1.8.6/internal/node/nodeinfo.c +323 -308
- data/ext/cached/ruby-1.8.6/internal/vm/instruction/insns_info.c +3 -0
- data/ext/cached/ruby-1.8.6/internal/vm/iseq/iseq_load.inc +21 -2
- data/ext/cached/{ruby-1.8.6/internal/method/method.h → ruby-1.8.7/internal/method/internal_method.h} +12 -0
- data/ext/cached/ruby-1.8.7/internal/module/getcfp.h +13 -0
- data/ext/cached/ruby-1.8.7/internal/node/global_entry.h +98 -0
- data/ext/cached/ruby-1.8.7/internal/node/node_type_descrip.c +42 -42
- data/ext/cached/ruby-1.8.7/internal/node/nodeinfo.c +276 -261
- data/ext/cached/ruby-1.8.7/internal/vm/instruction/insns_info.c +3 -0
- data/ext/cached/ruby-1.8.7/internal/vm/iseq/iseq_load.inc +21 -2
- data/ext/cached/{ruby-1.9.0/internal/method/method.h → ruby-1.9.1/internal/method/internal_method.h} +12 -0
- data/ext/cached/ruby-1.9.1/internal/module/classpath.c +12 -14
- data/ext/cached/ruby-1.9.1/internal/module/getcfp.h +25 -0
- data/ext/cached/ruby-1.9.1/internal/node/global_entry.h +86 -0
- data/ext/cached/ruby-1.9.1/internal/node/node_type_descrip.c +46 -48
- data/ext/cached/ruby-1.9.1/internal/node/nodeinfo.c +311 -412
- data/ext/cached/ruby-1.9.1/internal/vm/instruction/insns_info.c +3 -0
- data/ext/cached/ruby-1.9.1/internal/vm/iseq/iseq_load.inc +28 -6
- data/ext/cached/ruby-1.9.1/internal/yarv-headers/iseq.h +1 -0
- data/ext/cached/ruby-1.9.1/internal/yarv-headers/parse.h +6 -6
- data/ext/cached/ruby-1.9.1/internal/yarv-headers/revision.h +1 -1
- data/ext/cached/ruby-1.9.1/internal/yarv-headers/version.h +6 -5
- data/ext/cached/ruby-1.9.1/internal/yarv-headers/vm_core.h +3 -2
- data/ext/cached/ruby-1.9.1/internal/yarv-headers/vm_insnhelper.h +1 -0
- data/ext/cached/{ruby-1.9.0 → ruby-1.9.2}/internal/binding/block.h +0 -0
- data/ext/cached/{ruby-1.9.1/internal/method/method.h → ruby-1.9.2/internal/method/internal_method.h} +16 -5
- data/ext/cached/ruby-1.9.2/internal/module/classpath.c +40 -0
- data/ext/cached/{ruby-1.9.0 → ruby-1.9.2}/internal/module/classpath.h +0 -0
- data/ext/cached/ruby-1.9.2/internal/module/getcfp.h +25 -0
- data/ext/cached/{ruby-1.9.0 → ruby-1.9.2}/internal/node/block.h +0 -0
- data/ext/cached/ruby-1.9.2/internal/node/global_entry.h +93 -0
- data/ext/cached/{ruby-1.9.0 → ruby-1.9.2}/internal/node/node_type_descrip.c +44 -48
- data/ext/cached/{ruby-1.9.0 → ruby-1.9.2}/internal/node/nodeinfo.c +291 -439
- data/ext/cached/{ruby-1.9.0 → ruby-1.9.2}/internal/node/nodeinfo.h +0 -0
- data/ext/cached/{ruby-1.9.0 → ruby-1.9.2}/internal/proc/block.h +0 -0
- data/ext/cached/{ruby-1.9.0 → ruby-1.9.2}/internal/tag/tag.h +0 -0
- data/ext/cached/{ruby-1.9.0 → ruby-1.9.2}/internal/vm/instruction/insns_info.c +141 -64
- data/ext/cached/{ruby-1.9.0 → ruby-1.9.2}/internal/vm/instruction/insns_info.h +88 -80
- data/ext/cached/{ruby-1.9.0 → ruby-1.9.2}/internal/vm/iseq/insns_info.inc +77 -70
- data/ext/cached/ruby-1.9.2/internal/vm/iseq/iseq_load.inc +426 -0
- data/ext/cached/{ruby-1.9.0 → ruby-1.9.2}/internal/yarv-headers/debug.h +1 -1
- data/ext/cached/{ruby-1.9.0 → ruby-1.9.2}/internal/yarv-headers/dln.h +3 -3
- data/ext/cached/{ruby-1.9.0 → ruby-1.9.2}/internal/yarv-headers/encdb.h +18 -2
- data/ext/cached/{ruby-1.9.0 → ruby-1.9.2}/internal/yarv-headers/eval_intern.h +39 -28
- data/ext/cached/{ruby-1.9.0 → ruby-1.9.2}/internal/yarv-headers/gc.h +7 -5
- data/ext/cached/ruby-1.9.2/internal/yarv-headers/id.h +170 -0
- data/ext/cached/{ruby-1.9.0 → ruby-1.9.2}/internal/yarv-headers/iseq.h +20 -10
- data/ext/cached/ruby-1.9.2/internal/yarv-headers/method.h +103 -0
- data/ext/cached/{ruby-1.9.0 → ruby-1.9.2}/internal/yarv-headers/node.h +14 -47
- data/ext/cached/{ruby-1.9.0 → ruby-1.9.2}/internal/yarv-headers/parse.h +31 -148
- data/ext/cached/{ruby-1.9.0 → ruby-1.9.2}/internal/yarv-headers/regenc.h +7 -3
- data/ext/cached/{ruby-1.9.0 → ruby-1.9.2}/internal/yarv-headers/regint.h +16 -17
- data/ext/cached/{ruby-1.9.0 → ruby-1.9.2}/internal/yarv-headers/regparse.h +4 -1
- data/ext/cached/ruby-1.9.2/internal/yarv-headers/revision.h +1 -0
- data/ext/cached/{ruby-1.9.0 → ruby-1.9.2}/internal/yarv-headers/thread_pthread.h +4 -1
- data/ext/cached/{ruby-1.9.0 → ruby-1.9.2}/internal/yarv-headers/thread_win32.h +1 -1
- data/ext/cached/ruby-1.9.2/internal/yarv-headers/timev.h +21 -0
- data/ext/cached/{ruby-1.9.0 → ruby-1.9.2}/internal/yarv-headers/transcode_data.h +20 -10
- data/ext/cached/ruby-1.9.2/internal/yarv-headers/transdb.h +179 -0
- data/ext/cached/ruby-1.9.2/internal/yarv-headers/version.h +55 -0
- data/ext/cached/{ruby-1.9.0 → ruby-1.9.2}/internal/yarv-headers/vm_core.h +127 -84
- data/ext/cached/{ruby-1.9.0 → ruby-1.9.2}/internal/yarv-headers/vm_exec.h +4 -7
- data/ext/cached/{ruby-1.9.0 → ruby-1.9.2}/internal/yarv-headers/vm_insnhelper.h +53 -36
- data/ext/cached/{ruby-1.9.0 → ruby-1.9.2}/internal/yarv-headers/vm_opts.h +1 -1
- data/ext/cached/ruby-1.9.3/internal/binding/block.h +12 -0
- data/ext/cached/ruby-1.9.3/internal/method/internal_method.h +32 -0
- data/ext/cached/ruby-1.9.3/internal/module/classpath.c +40 -0
- data/ext/cached/{ruby-1.8.0 → ruby-1.9.3}/internal/module/classpath.h +5 -2
- data/ext/cached/ruby-1.9.3/internal/module/getcfp.h +25 -0
- data/ext/cached/ruby-1.9.3/internal/node/block.h +12 -0
- data/ext/cached/ruby-1.9.3/internal/node/global_entry.h +93 -0
- data/ext/cached/{ruby-1.8.3 → ruby-1.9.3}/internal/node/node_type_descrip.c +48 -57
- data/ext/cached/{ruby-1.6.8 → ruby-1.9.3}/internal/node/nodeinfo.c +589 -740
- data/ext/cached/{ruby-1.8.0 → ruby-1.9.3}/internal/node/nodeinfo.h +4 -3
- data/ext/cached/ruby-1.9.3/internal/proc/block.h +12 -0
- data/ext/cached/ruby-1.9.3/internal/tag/tag.h +6 -0
- data/ext/cached/ruby-1.9.3/internal/vm/instruction/insns_info.c +6013 -0
- data/ext/cached/ruby-1.9.3/internal/vm/instruction/insns_info.h +899 -0
- data/ext/cached/ruby-1.9.3/internal/vm/iseq/insns_info.inc +707 -0
- data/ext/cached/ruby-1.9.3/internal/vm/iseq/iseq_load.inc +423 -0
- data/ext/cached/ruby-1.9.3/internal/yarv-headers/addr2line.h +21 -0
- data/ext/cached/ruby-1.9.3/internal/yarv-headers/atomic.h +56 -0
- data/ext/cached/ruby-1.9.3/internal/yarv-headers/constant.h +34 -0
- data/ext/cached/ruby-1.9.3/internal/yarv-headers/debug.h +41 -0
- data/ext/cached/ruby-1.9.3/internal/yarv-headers/dln.h +50 -0
- data/ext/cached/ruby-1.9.3/internal/yarv-headers/encdb.h +167 -0
- data/ext/cached/ruby-1.9.3/internal/yarv-headers/eval_intern.h +234 -0
- data/ext/cached/ruby-1.9.3/internal/yarv-headers/gc.h +98 -0
- data/ext/cached/ruby-1.9.3/internal/yarv-headers/id.h +175 -0
- data/ext/cached/ruby-1.9.3/internal/yarv-headers/internal.h +232 -0
- data/ext/cached/ruby-1.9.3/internal/yarv-headers/iseq.h +125 -0
- data/ext/cached/ruby-1.9.3/internal/yarv-headers/method.h +105 -0
- data/ext/cached/ruby-1.9.3/internal/yarv-headers/node.h +503 -0
- data/ext/cached/ruby-1.9.3/internal/yarv-headers/parse.h +186 -0
- data/ext/cached/ruby-1.9.3/internal/yarv-headers/regenc.h +219 -0
- data/ext/cached/ruby-1.9.3/internal/yarv-headers/regint.h +850 -0
- data/ext/cached/ruby-1.9.3/internal/yarv-headers/regparse.h +362 -0
- data/ext/cached/ruby-1.9.3/internal/yarv-headers/revision.h +1 -0
- data/ext/cached/ruby-1.9.3/internal/yarv-headers/thread_pthread.h +51 -0
- data/ext/cached/ruby-1.9.3/internal/yarv-headers/thread_win32.h +40 -0
- data/ext/cached/ruby-1.9.3/internal/yarv-headers/timev.h +21 -0
- data/ext/cached/ruby-1.9.3/internal/yarv-headers/transcode_data.h +117 -0
- data/ext/cached/ruby-1.9.3/internal/yarv-headers/transdb.h +189 -0
- data/ext/cached/ruby-1.9.3/internal/yarv-headers/version.h +52 -0
- data/ext/cached/ruby-1.9.3/internal/yarv-headers/vm_core.h +756 -0
- data/ext/cached/ruby-1.9.3/internal/yarv-headers/vm_exec.h +184 -0
- data/ext/cached/ruby-1.9.3/internal/yarv-headers/vm_insnhelper.h +220 -0
- data/ext/cached/ruby-1.9.3/internal/yarv-headers/vm_opts.h +51 -0
- data/ext/internal/binding/block.h +20 -0
- data/ext/internal/method/internal_method.h +5 -38
- data/ext/internal/method/internal_method.h.rpp +0 -7
- data/ext/internal/method/method.c +52 -32
- data/ext/internal/module/classpath.c +18 -13
- data/ext/internal/module/classpath.h +3 -3
- data/ext/internal/module/extconf.rb +3 -2
- data/ext/internal/module/getcfp.h +13 -0
- data/ext/internal/module/getcfp.h.rpp +44 -0
- data/ext/internal/module/module.c +58 -21
- data/ext/internal/node/block.h +20 -0
- data/ext/internal/node/extconf.rb +2 -0
- data/ext/internal/node/global_entry.h +69 -13
- data/ext/internal/node/global_entry.h.rpp +11 -2
- data/ext/internal/node/node.c +30 -3
- data/ext/internal/node/node_type_descrip.c +47 -38
- data/ext/internal/node/nodeinfo.c +622 -306
- data/ext/internal/node/nodeinfo.h +1 -4
- data/ext/internal/proc/block.h +20 -0
- data/ext/internal/tag/tag.h +10 -0
- data/ext/internal/thread/thread.c +9 -3
- data/ext/internal/vm/extconf.rb +1 -0
- data/ext/internal/vm/instruction/insns_info.c +3 -5974
- data/ext/internal/vm/instruction/insns_info.h +0 -878
- data/ext/internal/vm/iseq/extconf.rb +1 -0
- data/ext/internal/vm/iseq/iseq.c +38 -4
- data/ext/internal/vm/iseq/iseq_load.inc.rpp +23 -5
- data/ext/internal/vm/vm.c +28 -0
- data/lib/internal/classtree.rb +28 -0
- data/lib/internal/debug.rb +10 -2
- data/lib/internal/method/as_code.rb +25 -0
- data/lib/internal/method/as_expression.rb +2 -3
- data/lib/internal/method/origin.rb +29 -0
- data/lib/internal/method/signature.rb +5 -300
- data/lib/internal/method/signature/argument.rb +102 -0
- data/lib/internal/method/signature/iseq.rb +52 -0
- data/lib/internal/method/signature/node.rb +160 -0
- data/lib/internal/method/signature/signature.rb +23 -0
- data/lib/internal/proc/as_code.rb +2 -0
- data/lib/internal/proc/as_expression.rb +2 -0
- data/lib/internal/vm/bytedecoder.rb +5 -5
- data/lib/internal/vm/iseq/as_code.rb +2 -2
- data/lib/internal/vm/iseq/as_expression.rb +2 -2
- data/test/test_dump_method.rb +1 -1
- data/test/test_method.rb +21 -3
- data/test/test_node.rb +20 -4
- metadata +152 -155
- data/ext/cached/ruby-1.6.8/internal/binding/block.h +0 -35
- data/ext/cached/ruby-1.6.8/internal/method/method.h +0 -19
- data/ext/cached/ruby-1.6.8/internal/module/classpath.c +0 -3
- data/ext/cached/ruby-1.6.8/internal/module/classpath.h +0 -8
- data/ext/cached/ruby-1.6.8/internal/node/block.h +0 -35
- data/ext/cached/ruby-1.6.8/internal/node/global_entry.h +0 -15
- data/ext/cached/ruby-1.6.8/internal/node/node_type_descrip.c +0 -149
- data/ext/cached/ruby-1.6.8/internal/node/nodeinfo.h +0 -69
- data/ext/cached/ruby-1.6.8/internal/proc/block.h +0 -35
- data/ext/cached/ruby-1.6.8/internal/tag/tag.h +0 -15
- data/ext/cached/ruby-1.6.8/internal/vm/instruction/insns_info.c +0 -39
- data/ext/cached/ruby-1.6.8/internal/vm/instruction/insns_info.h +0 -21
- data/ext/cached/ruby-1.6.8/internal/vm/iseq/insns_info.inc +0 -12
- data/ext/cached/ruby-1.6.8/internal/vm/iseq/iseq_load.inc +0 -9
- data/ext/cached/ruby-1.8.0/internal/binding/block.h +0 -37
- data/ext/cached/ruby-1.8.0/internal/method/method.h +0 -19
- data/ext/cached/ruby-1.8.0/internal/module/classpath.c +0 -27
- data/ext/cached/ruby-1.8.0/internal/node/block.h +0 -37
- data/ext/cached/ruby-1.8.0/internal/node/global_entry.h +0 -10
- data/ext/cached/ruby-1.8.0/internal/node/node_type_descrip.c +0 -155
- data/ext/cached/ruby-1.8.0/internal/node/nodeinfo.c +0 -5744
- data/ext/cached/ruby-1.8.0/internal/proc/block.h +0 -37
- data/ext/cached/ruby-1.8.0/internal/tag/tag.h +0 -15
- data/ext/cached/ruby-1.8.0/internal/vm/instruction/insns_info.c +0 -39
- data/ext/cached/ruby-1.8.0/internal/vm/instruction/insns_info.h +0 -21
- data/ext/cached/ruby-1.8.0/internal/vm/iseq/insns_info.inc +0 -12
- data/ext/cached/ruby-1.8.0/internal/vm/iseq/iseq_load.inc +0 -9
- data/ext/cached/ruby-1.8.1/internal/binding/block.h +0 -31
- data/ext/cached/ruby-1.8.1/internal/method/method.h +0 -19
- data/ext/cached/ruby-1.8.1/internal/module/classpath.c +0 -27
- data/ext/cached/ruby-1.8.1/internal/module/classpath.h +0 -14
- data/ext/cached/ruby-1.8.1/internal/node/block.h +0 -31
- data/ext/cached/ruby-1.8.1/internal/node/global_entry.h +0 -10
- data/ext/cached/ruby-1.8.1/internal/node/node_type_descrip.c +0 -154
- data/ext/cached/ruby-1.8.1/internal/node/nodeinfo.c +0 -5736
- data/ext/cached/ruby-1.8.1/internal/node/nodeinfo.h +0 -69
- data/ext/cached/ruby-1.8.1/internal/proc/block.h +0 -31
- data/ext/cached/ruby-1.8.1/internal/tag/tag.h +0 -16
- data/ext/cached/ruby-1.8.1/internal/vm/instruction/insns_info.c +0 -39
- data/ext/cached/ruby-1.8.1/internal/vm/instruction/insns_info.h +0 -21
- data/ext/cached/ruby-1.8.1/internal/vm/iseq/insns_info.inc +0 -12
- data/ext/cached/ruby-1.8.1/internal/vm/iseq/iseq_load.inc +0 -9
- data/ext/cached/ruby-1.8.2/internal/binding/block.h +0 -32
- data/ext/cached/ruby-1.8.2/internal/method/method.h +0 -19
- data/ext/cached/ruby-1.8.2/internal/module/classpath.c +0 -45
- data/ext/cached/ruby-1.8.2/internal/module/classpath.h +0 -17
- data/ext/cached/ruby-1.8.2/internal/node/block.h +0 -32
- data/ext/cached/ruby-1.8.2/internal/node/global_entry.h +0 -10
- data/ext/cached/ruby-1.8.2/internal/node/node_type_descrip.c +0 -154
- data/ext/cached/ruby-1.8.2/internal/node/nodeinfo.c +0 -5736
- data/ext/cached/ruby-1.8.2/internal/node/nodeinfo.h +0 -69
- data/ext/cached/ruby-1.8.2/internal/proc/block.h +0 -32
- data/ext/cached/ruby-1.8.2/internal/tag/tag.h +0 -16
- data/ext/cached/ruby-1.8.2/internal/vm/instruction/insns_info.c +0 -39
- data/ext/cached/ruby-1.8.2/internal/vm/instruction/insns_info.h +0 -21
- data/ext/cached/ruby-1.8.2/internal/vm/iseq/insns_info.inc +0 -12
- data/ext/cached/ruby-1.8.2/internal/vm/iseq/iseq_load.inc +0 -9
- data/ext/cached/ruby-1.8.3/internal/binding/block.h +0 -32
- data/ext/cached/ruby-1.8.3/internal/module/classpath.c +0 -45
- data/ext/cached/ruby-1.8.3/internal/module/classpath.h +0 -17
- data/ext/cached/ruby-1.8.3/internal/node/block.h +0 -32
- data/ext/cached/ruby-1.8.3/internal/node/global_entry.h +0 -10
- data/ext/cached/ruby-1.8.3/internal/node/nodeinfo.c +0 -5736
- data/ext/cached/ruby-1.8.3/internal/node/nodeinfo.h +0 -69
- data/ext/cached/ruby-1.8.3/internal/proc/block.h +0 -32
- data/ext/cached/ruby-1.8.3/internal/tag/tag.h +0 -16
- data/ext/cached/ruby-1.8.3/internal/vm/instruction/insns_info.c +0 -39
- data/ext/cached/ruby-1.8.3/internal/vm/instruction/insns_info.h +0 -21
- data/ext/cached/ruby-1.8.3/internal/vm/iseq/insns_info.inc +0 -12
- data/ext/cached/ruby-1.8.3/internal/vm/iseq/iseq_load.inc +0 -9
- data/ext/cached/ruby-1.8.7/internal/method/method.h +0 -20
- data/ext/cached/ruby-1.9.0/internal/module/classpath.c +0 -42
- data/ext/cached/ruby-1.9.0/internal/node/global_entry.h +0 -10
- data/ext/cached/ruby-1.9.0/internal/vm/iseq/iseq_load.inc +0 -13
- data/ext/cached/ruby-1.9.0/internal/yarv-headers/id.h +0 -83
- data/ext/cached/ruby-1.9.0/internal/yarv-headers/revision.h +0 -1
- data/ext/cached/ruby-1.9.0/internal/yarv-headers/transdb.h +0 -67
- data/ext/cached/ruby-1.9.0/internal/yarv-headers/version.h +0 -57
- data/ext/internal/module/cfp.h +0 -13
@@ -0,0 +1,899 @@
|
|
1
|
+
#ifndef insns_info__h_
|
2
|
+
#define insns_info__h_
|
3
|
+
|
4
|
+
#include "ruby.h"
|
5
|
+
|
6
|
+
#ifdef RUBY_VM
|
7
|
+
|
8
|
+
#include "vm_core.h"
|
9
|
+
|
10
|
+
#ifdef HAVE_VM_H
|
11
|
+
#include "vm.h"
|
12
|
+
#endif
|
13
|
+
|
14
|
+
/** -*-c-*-
|
15
|
+
This file contains YARV instructions list.
|
16
|
+
|
17
|
+
----
|
18
|
+
This file is auto generated by insns2vm.rb
|
19
|
+
DO NOT TOUCH!
|
20
|
+
|
21
|
+
If you want to fix something, you must edit 'template/insns.inc.tmpl'
|
22
|
+
or insns2vm.rb
|
23
|
+
*/
|
24
|
+
|
25
|
+
|
26
|
+
/* BIN : Basic Instruction Name */
|
27
|
+
#define BIN(n) YARVINSN_##n
|
28
|
+
|
29
|
+
enum ruby_vminsn_type {
|
30
|
+
BIN(nop) = 0,
|
31
|
+
|
32
|
+
BIN(getlocal) = 1,
|
33
|
+
|
34
|
+
BIN(setlocal) = 2,
|
35
|
+
|
36
|
+
BIN(getspecial) = 3,
|
37
|
+
|
38
|
+
BIN(setspecial) = 4,
|
39
|
+
|
40
|
+
BIN(getdynamic) = 5,
|
41
|
+
|
42
|
+
BIN(setdynamic) = 6,
|
43
|
+
|
44
|
+
BIN(getinstancevariable) = 7,
|
45
|
+
|
46
|
+
BIN(setinstancevariable) = 8,
|
47
|
+
|
48
|
+
BIN(getclassvariable) = 9,
|
49
|
+
|
50
|
+
BIN(setclassvariable) = 10,
|
51
|
+
|
52
|
+
BIN(getconstant) = 11,
|
53
|
+
|
54
|
+
BIN(setconstant) = 12,
|
55
|
+
|
56
|
+
BIN(getglobal) = 13,
|
57
|
+
|
58
|
+
BIN(setglobal) = 14,
|
59
|
+
|
60
|
+
BIN(putnil) = 15,
|
61
|
+
|
62
|
+
BIN(putself) = 16,
|
63
|
+
|
64
|
+
BIN(putobject) = 17,
|
65
|
+
|
66
|
+
BIN(putspecialobject) = 18,
|
67
|
+
|
68
|
+
BIN(putiseq) = 19,
|
69
|
+
|
70
|
+
BIN(putstring) = 20,
|
71
|
+
|
72
|
+
BIN(concatstrings) = 21,
|
73
|
+
|
74
|
+
BIN(tostring) = 22,
|
75
|
+
|
76
|
+
BIN(toregexp) = 23,
|
77
|
+
|
78
|
+
BIN(newarray) = 24,
|
79
|
+
|
80
|
+
BIN(duparray) = 25,
|
81
|
+
|
82
|
+
BIN(expandarray) = 26,
|
83
|
+
|
84
|
+
BIN(concatarray) = 27,
|
85
|
+
|
86
|
+
BIN(splatarray) = 28,
|
87
|
+
|
88
|
+
BIN(checkincludearray) = 29,
|
89
|
+
|
90
|
+
BIN(newhash) = 30,
|
91
|
+
|
92
|
+
BIN(newrange) = 31,
|
93
|
+
|
94
|
+
BIN(pop) = 32,
|
95
|
+
|
96
|
+
BIN(dup) = 33,
|
97
|
+
|
98
|
+
BIN(dupn) = 34,
|
99
|
+
|
100
|
+
BIN(swap) = 35,
|
101
|
+
|
102
|
+
BIN(reput) = 36,
|
103
|
+
|
104
|
+
BIN(topn) = 37,
|
105
|
+
|
106
|
+
BIN(setn) = 38,
|
107
|
+
|
108
|
+
BIN(adjuststack) = 39,
|
109
|
+
|
110
|
+
BIN(defined) = 40,
|
111
|
+
|
112
|
+
BIN(trace) = 41,
|
113
|
+
|
114
|
+
BIN(defineclass) = 42,
|
115
|
+
|
116
|
+
BIN(send) = 43,
|
117
|
+
|
118
|
+
BIN(invokesuper) = 44,
|
119
|
+
|
120
|
+
BIN(invokeblock) = 45,
|
121
|
+
|
122
|
+
BIN(leave) = 46,
|
123
|
+
|
124
|
+
BIN(finish) = 47,
|
125
|
+
|
126
|
+
BIN(throw) = 48,
|
127
|
+
|
128
|
+
BIN(jump) = 49,
|
129
|
+
|
130
|
+
BIN(branchif) = 50,
|
131
|
+
|
132
|
+
BIN(branchunless) = 51,
|
133
|
+
|
134
|
+
BIN(getinlinecache) = 52,
|
135
|
+
|
136
|
+
BIN(onceinlinecache) = 53,
|
137
|
+
|
138
|
+
BIN(setinlinecache) = 54,
|
139
|
+
|
140
|
+
BIN(opt_case_dispatch) = 55,
|
141
|
+
|
142
|
+
BIN(opt_checkenv) = 56,
|
143
|
+
|
144
|
+
BIN(opt_plus) = 57,
|
145
|
+
|
146
|
+
BIN(opt_minus) = 58,
|
147
|
+
|
148
|
+
BIN(opt_mult) = 59,
|
149
|
+
|
150
|
+
BIN(opt_div) = 60,
|
151
|
+
|
152
|
+
BIN(opt_mod) = 61,
|
153
|
+
|
154
|
+
BIN(opt_eq) = 62,
|
155
|
+
|
156
|
+
BIN(opt_neq) = 63,
|
157
|
+
|
158
|
+
BIN(opt_lt) = 64,
|
159
|
+
|
160
|
+
BIN(opt_le) = 65,
|
161
|
+
|
162
|
+
BIN(opt_gt) = 66,
|
163
|
+
|
164
|
+
BIN(opt_ge) = 67,
|
165
|
+
|
166
|
+
BIN(opt_ltlt) = 68,
|
167
|
+
|
168
|
+
BIN(opt_aref) = 69,
|
169
|
+
|
170
|
+
BIN(opt_aset) = 70,
|
171
|
+
|
172
|
+
BIN(opt_length) = 71,
|
173
|
+
|
174
|
+
BIN(opt_size) = 72,
|
175
|
+
|
176
|
+
BIN(opt_succ) = 73,
|
177
|
+
|
178
|
+
BIN(opt_not) = 74,
|
179
|
+
|
180
|
+
BIN(opt_regexpmatch1) = 75,
|
181
|
+
|
182
|
+
BIN(opt_regexpmatch2) = 76,
|
183
|
+
|
184
|
+
BIN(opt_call_c_function) = 77,
|
185
|
+
|
186
|
+
BIN(bitblt) = 78,
|
187
|
+
|
188
|
+
BIN(answer) = 79,
|
189
|
+
|
190
|
+
VM_INSTRUCTION_SIZE = 80
|
191
|
+
};
|
192
|
+
|
193
|
+
/** -*-c-*-
|
194
|
+
This file contains instruction information for yarv instruction sequence.
|
195
|
+
|
196
|
+
----
|
197
|
+
This file is auto generated by insns2vm.rb
|
198
|
+
DO NOT TOUCH!
|
199
|
+
|
200
|
+
If you want to fix something, you must edit 'template/insns_info.inc.tmpl'
|
201
|
+
or insns2vm.rb
|
202
|
+
*/
|
203
|
+
|
204
|
+
#define TS_VALUE 'V'
|
205
|
+
#define TS_GENTRY 'G'
|
206
|
+
#define TS_DINDEX 'D'
|
207
|
+
#define TS_VARIABLE '.'
|
208
|
+
#define TS_CDHASH 'H'
|
209
|
+
#define TS_IC 'C'
|
210
|
+
#define TS_ID 'I'
|
211
|
+
#define TS_LINDEX 'L'
|
212
|
+
#define TS_FUNCPTR 'F'
|
213
|
+
#define TS_ISEQ 'S'
|
214
|
+
#define TS_NUM 'N'
|
215
|
+
#define TS_OFFSET 'O'
|
216
|
+
|
217
|
+
static const char *const insn_name_info[] = {
|
218
|
+
"nop",
|
219
|
+
"getlocal",
|
220
|
+
"setlocal",
|
221
|
+
"getspecial",
|
222
|
+
"setspecial",
|
223
|
+
"getdynamic",
|
224
|
+
"setdynamic",
|
225
|
+
"getinstancevariable",
|
226
|
+
"setinstancevariable",
|
227
|
+
"getclassvariable",
|
228
|
+
"setclassvariable",
|
229
|
+
"getconstant",
|
230
|
+
"setconstant",
|
231
|
+
"getglobal",
|
232
|
+
"setglobal",
|
233
|
+
"putnil",
|
234
|
+
"putself",
|
235
|
+
"putobject",
|
236
|
+
"putspecialobject",
|
237
|
+
"putiseq",
|
238
|
+
"putstring",
|
239
|
+
"concatstrings",
|
240
|
+
"tostring",
|
241
|
+
"toregexp",
|
242
|
+
"newarray",
|
243
|
+
"duparray",
|
244
|
+
"expandarray",
|
245
|
+
"concatarray",
|
246
|
+
"splatarray",
|
247
|
+
"checkincludearray",
|
248
|
+
"newhash",
|
249
|
+
"newrange",
|
250
|
+
"pop",
|
251
|
+
"dup",
|
252
|
+
"dupn",
|
253
|
+
"swap",
|
254
|
+
"reput",
|
255
|
+
"topn",
|
256
|
+
"setn",
|
257
|
+
"adjuststack",
|
258
|
+
"defined",
|
259
|
+
"trace",
|
260
|
+
"defineclass",
|
261
|
+
"send",
|
262
|
+
"invokesuper",
|
263
|
+
"invokeblock",
|
264
|
+
"leave",
|
265
|
+
"finish",
|
266
|
+
"throw",
|
267
|
+
"jump",
|
268
|
+
"branchif",
|
269
|
+
"branchunless",
|
270
|
+
"getinlinecache",
|
271
|
+
"onceinlinecache",
|
272
|
+
"setinlinecache",
|
273
|
+
"opt_case_dispatch",
|
274
|
+
"opt_checkenv",
|
275
|
+
"opt_plus",
|
276
|
+
"opt_minus",
|
277
|
+
"opt_mult",
|
278
|
+
"opt_div",
|
279
|
+
"opt_mod",
|
280
|
+
"opt_eq",
|
281
|
+
"opt_neq",
|
282
|
+
"opt_lt",
|
283
|
+
"opt_le",
|
284
|
+
"opt_gt",
|
285
|
+
"opt_ge",
|
286
|
+
"opt_ltlt",
|
287
|
+
"opt_aref",
|
288
|
+
"opt_aset",
|
289
|
+
"opt_length",
|
290
|
+
"opt_size",
|
291
|
+
"opt_succ",
|
292
|
+
"opt_not",
|
293
|
+
"opt_regexpmatch1",
|
294
|
+
"opt_regexpmatch2",
|
295
|
+
"opt_call_c_function",
|
296
|
+
"bitblt",
|
297
|
+
"answer",
|
298
|
+
|
299
|
+
};
|
300
|
+
|
301
|
+
static const char *const insn_operand_info[] = {
|
302
|
+
"",
|
303
|
+
"L",
|
304
|
+
"L",
|
305
|
+
"VN",
|
306
|
+
"V",
|
307
|
+
"DN",
|
308
|
+
"DN",
|
309
|
+
"IC",
|
310
|
+
"IC",
|
311
|
+
"I",
|
312
|
+
"I",
|
313
|
+
"I",
|
314
|
+
"I",
|
315
|
+
"G",
|
316
|
+
"G",
|
317
|
+
"",
|
318
|
+
"",
|
319
|
+
"V",
|
320
|
+
"N",
|
321
|
+
"S",
|
322
|
+
"V",
|
323
|
+
"N",
|
324
|
+
"",
|
325
|
+
"NN",
|
326
|
+
"N",
|
327
|
+
"V",
|
328
|
+
"NN",
|
329
|
+
"",
|
330
|
+
"V",
|
331
|
+
"V",
|
332
|
+
"N",
|
333
|
+
"N",
|
334
|
+
"",
|
335
|
+
"",
|
336
|
+
"N",
|
337
|
+
"",
|
338
|
+
"",
|
339
|
+
"N",
|
340
|
+
"N",
|
341
|
+
"N",
|
342
|
+
"NVV",
|
343
|
+
"N",
|
344
|
+
"ISN",
|
345
|
+
"INSNC",
|
346
|
+
"NSN",
|
347
|
+
"NN",
|
348
|
+
"",
|
349
|
+
"",
|
350
|
+
"N",
|
351
|
+
"O",
|
352
|
+
"O",
|
353
|
+
"O",
|
354
|
+
"OC",
|
355
|
+
"OC",
|
356
|
+
"C",
|
357
|
+
"HO",
|
358
|
+
"",
|
359
|
+
"C",
|
360
|
+
"C",
|
361
|
+
"C",
|
362
|
+
"C",
|
363
|
+
"C",
|
364
|
+
"C",
|
365
|
+
"CC",
|
366
|
+
"C",
|
367
|
+
"C",
|
368
|
+
"C",
|
369
|
+
"C",
|
370
|
+
"C",
|
371
|
+
"C",
|
372
|
+
"C",
|
373
|
+
"C",
|
374
|
+
"C",
|
375
|
+
"C",
|
376
|
+
"C",
|
377
|
+
"V",
|
378
|
+
"",
|
379
|
+
"F",
|
380
|
+
"",
|
381
|
+
"",
|
382
|
+
|
383
|
+
};
|
384
|
+
|
385
|
+
static const int insn_len_info[] = {
|
386
|
+
1,
|
387
|
+
2,
|
388
|
+
2,
|
389
|
+
3,
|
390
|
+
2,
|
391
|
+
3,
|
392
|
+
3,
|
393
|
+
3,
|
394
|
+
3,
|
395
|
+
2,
|
396
|
+
2,
|
397
|
+
2,
|
398
|
+
2,
|
399
|
+
2,
|
400
|
+
2,
|
401
|
+
1,
|
402
|
+
1,
|
403
|
+
2,
|
404
|
+
2,
|
405
|
+
2,
|
406
|
+
2,
|
407
|
+
2,
|
408
|
+
1,
|
409
|
+
3,
|
410
|
+
2,
|
411
|
+
2,
|
412
|
+
3,
|
413
|
+
1,
|
414
|
+
2,
|
415
|
+
2,
|
416
|
+
2,
|
417
|
+
2,
|
418
|
+
1,
|
419
|
+
1,
|
420
|
+
2,
|
421
|
+
1,
|
422
|
+
1,
|
423
|
+
2,
|
424
|
+
2,
|
425
|
+
2,
|
426
|
+
4,
|
427
|
+
2,
|
428
|
+
4,
|
429
|
+
6,
|
430
|
+
4,
|
431
|
+
3,
|
432
|
+
1,
|
433
|
+
1,
|
434
|
+
2,
|
435
|
+
2,
|
436
|
+
2,
|
437
|
+
2,
|
438
|
+
3,
|
439
|
+
3,
|
440
|
+
2,
|
441
|
+
3,
|
442
|
+
1,
|
443
|
+
2,
|
444
|
+
2,
|
445
|
+
2,
|
446
|
+
2,
|
447
|
+
2,
|
448
|
+
2,
|
449
|
+
3,
|
450
|
+
2,
|
451
|
+
2,
|
452
|
+
2,
|
453
|
+
2,
|
454
|
+
2,
|
455
|
+
2,
|
456
|
+
2,
|
457
|
+
2,
|
458
|
+
2,
|
459
|
+
2,
|
460
|
+
2,
|
461
|
+
2,
|
462
|
+
1,
|
463
|
+
2,
|
464
|
+
1,
|
465
|
+
1,
|
466
|
+
|
467
|
+
};
|
468
|
+
|
469
|
+
#ifdef USE_INSN_RET_NUM
|
470
|
+
static const int insn_stack_push_num_info[] = {
|
471
|
+
0,
|
472
|
+
1,
|
473
|
+
0,
|
474
|
+
1,
|
475
|
+
0,
|
476
|
+
1,
|
477
|
+
0,
|
478
|
+
1,
|
479
|
+
0,
|
480
|
+
1,
|
481
|
+
0,
|
482
|
+
1,
|
483
|
+
0,
|
484
|
+
1,
|
485
|
+
0,
|
486
|
+
1,
|
487
|
+
1,
|
488
|
+
1,
|
489
|
+
1,
|
490
|
+
1,
|
491
|
+
1,
|
492
|
+
1,
|
493
|
+
1,
|
494
|
+
1,
|
495
|
+
1,
|
496
|
+
1,
|
497
|
+
1,
|
498
|
+
1,
|
499
|
+
1,
|
500
|
+
2,
|
501
|
+
1,
|
502
|
+
1,
|
503
|
+
0,
|
504
|
+
2,
|
505
|
+
1,
|
506
|
+
2,
|
507
|
+
1,
|
508
|
+
1,
|
509
|
+
1,
|
510
|
+
1,
|
511
|
+
1,
|
512
|
+
0,
|
513
|
+
1,
|
514
|
+
1,
|
515
|
+
1,
|
516
|
+
1,
|
517
|
+
1,
|
518
|
+
1,
|
519
|
+
1,
|
520
|
+
0,
|
521
|
+
0,
|
522
|
+
0,
|
523
|
+
1,
|
524
|
+
1,
|
525
|
+
1,
|
526
|
+
0,
|
527
|
+
0,
|
528
|
+
1,
|
529
|
+
1,
|
530
|
+
1,
|
531
|
+
1,
|
532
|
+
1,
|
533
|
+
1,
|
534
|
+
1,
|
535
|
+
1,
|
536
|
+
1,
|
537
|
+
1,
|
538
|
+
1,
|
539
|
+
1,
|
540
|
+
1,
|
541
|
+
1,
|
542
|
+
1,
|
543
|
+
1,
|
544
|
+
1,
|
545
|
+
1,
|
546
|
+
1,
|
547
|
+
1,
|
548
|
+
0,
|
549
|
+
1,
|
550
|
+
1,
|
551
|
+
|
552
|
+
};
|
553
|
+
#endif
|
554
|
+
|
555
|
+
#ifdef USE_INSN_STACK_INCREASE
|
556
|
+
static int
|
557
|
+
insn_stack_increase(int depth, int insn, VALUE *opes)
|
558
|
+
{
|
559
|
+
switch(insn){
|
560
|
+
case BIN(nop):{
|
561
|
+
return depth + 0;
|
562
|
+
}
|
563
|
+
case BIN(getlocal):{
|
564
|
+
return depth + 1;
|
565
|
+
}
|
566
|
+
case BIN(setlocal):{
|
567
|
+
return depth + -1;
|
568
|
+
}
|
569
|
+
case BIN(getspecial):{
|
570
|
+
return depth + 1;
|
571
|
+
}
|
572
|
+
case BIN(setspecial):{
|
573
|
+
return depth + -1;
|
574
|
+
}
|
575
|
+
case BIN(getdynamic):{
|
576
|
+
return depth + 1;
|
577
|
+
}
|
578
|
+
case BIN(setdynamic):{
|
579
|
+
return depth + -1;
|
580
|
+
}
|
581
|
+
case BIN(getinstancevariable):{
|
582
|
+
return depth + 1;
|
583
|
+
}
|
584
|
+
case BIN(setinstancevariable):{
|
585
|
+
return depth + -1;
|
586
|
+
}
|
587
|
+
case BIN(getclassvariable):{
|
588
|
+
return depth + 1;
|
589
|
+
}
|
590
|
+
case BIN(setclassvariable):{
|
591
|
+
return depth + -1;
|
592
|
+
}
|
593
|
+
case BIN(getconstant):{
|
594
|
+
return depth + 0;
|
595
|
+
}
|
596
|
+
case BIN(setconstant):{
|
597
|
+
return depth + -2;
|
598
|
+
}
|
599
|
+
case BIN(getglobal):{
|
600
|
+
return depth + 1;
|
601
|
+
}
|
602
|
+
case BIN(setglobal):{
|
603
|
+
return depth + -1;
|
604
|
+
}
|
605
|
+
case BIN(putnil):{
|
606
|
+
return depth + 1;
|
607
|
+
}
|
608
|
+
case BIN(putself):{
|
609
|
+
return depth + 1;
|
610
|
+
}
|
611
|
+
case BIN(putobject):{
|
612
|
+
return depth + 1;
|
613
|
+
}
|
614
|
+
case BIN(putspecialobject):{
|
615
|
+
return depth + 1;
|
616
|
+
}
|
617
|
+
case BIN(putiseq):{
|
618
|
+
return depth + 1;
|
619
|
+
}
|
620
|
+
case BIN(putstring):{
|
621
|
+
return depth + 1;
|
622
|
+
}
|
623
|
+
case BIN(concatstrings):{
|
624
|
+
int inc = 0;
|
625
|
+
int num = FIX2INT(opes[0]);
|
626
|
+
inc += 1 - num;;
|
627
|
+
return depth + inc;
|
628
|
+
}
|
629
|
+
case BIN(tostring):{
|
630
|
+
return depth + 0;
|
631
|
+
}
|
632
|
+
case BIN(toregexp):{
|
633
|
+
int inc = 0;
|
634
|
+
int cnt = FIX2INT(opes[1]);
|
635
|
+
inc += 1 - cnt;;
|
636
|
+
return depth + inc;
|
637
|
+
}
|
638
|
+
case BIN(newarray):{
|
639
|
+
int inc = 0;
|
640
|
+
int num = FIX2INT(opes[0]);
|
641
|
+
inc += 1 - num;;
|
642
|
+
return depth + inc;
|
643
|
+
}
|
644
|
+
case BIN(duparray):{
|
645
|
+
return depth + 1;
|
646
|
+
}
|
647
|
+
case BIN(expandarray):{
|
648
|
+
int inc = 0;
|
649
|
+
int num = FIX2INT(opes[0]);
|
650
|
+
int flag = FIX2INT(opes[1]);
|
651
|
+
inc += num - 1 + (flag & 1 ? 1 : 0);;
|
652
|
+
return depth + inc;
|
653
|
+
}
|
654
|
+
case BIN(concatarray):{
|
655
|
+
return depth + -1;
|
656
|
+
}
|
657
|
+
case BIN(splatarray):{
|
658
|
+
return depth + 0;
|
659
|
+
}
|
660
|
+
case BIN(checkincludearray):{
|
661
|
+
return depth + 0;
|
662
|
+
}
|
663
|
+
case BIN(newhash):{
|
664
|
+
int inc = 0;
|
665
|
+
int num = FIX2INT(opes[0]);
|
666
|
+
inc += 1 - num;;
|
667
|
+
return depth + inc;
|
668
|
+
}
|
669
|
+
case BIN(newrange):{
|
670
|
+
return depth + -1;
|
671
|
+
}
|
672
|
+
case BIN(pop):{
|
673
|
+
return depth + -1;
|
674
|
+
}
|
675
|
+
case BIN(dup):{
|
676
|
+
return depth + 1;
|
677
|
+
}
|
678
|
+
case BIN(dupn):{
|
679
|
+
int inc = 0;
|
680
|
+
int n = FIX2INT(opes[0]);
|
681
|
+
inc += n;;
|
682
|
+
return depth + inc;
|
683
|
+
}
|
684
|
+
case BIN(swap):{
|
685
|
+
return depth + 0;
|
686
|
+
}
|
687
|
+
case BIN(reput):{
|
688
|
+
int inc = 0;
|
689
|
+
inc += 0;;
|
690
|
+
return depth + inc;
|
691
|
+
}
|
692
|
+
case BIN(topn):{
|
693
|
+
int inc = 0;
|
694
|
+
inc += 1;;
|
695
|
+
return depth + inc;
|
696
|
+
}
|
697
|
+
case BIN(setn):{
|
698
|
+
int inc = 0;
|
699
|
+
inc += 0;
|
700
|
+
return depth + inc;
|
701
|
+
}
|
702
|
+
case BIN(adjuststack):{
|
703
|
+
int inc = 0;
|
704
|
+
int n = FIX2INT(opes[0]);
|
705
|
+
inc -= n;
|
706
|
+
return depth + inc;
|
707
|
+
}
|
708
|
+
case BIN(defined):{
|
709
|
+
return depth + 0;
|
710
|
+
}
|
711
|
+
case BIN(trace):{
|
712
|
+
return depth + 0;
|
713
|
+
}
|
714
|
+
case BIN(defineclass):{
|
715
|
+
return depth + -1;
|
716
|
+
}
|
717
|
+
case BIN(send):{
|
718
|
+
int inc = 0;
|
719
|
+
int op_argc = FIX2INT(opes[1]);
|
720
|
+
int op_flag = FIX2INT(opes[3]);
|
721
|
+
inc += - (int)(op_argc + ((op_flag & VM_CALL_ARGS_BLOCKARG_BIT) ? 1 : 0));;
|
722
|
+
return depth + inc;
|
723
|
+
}
|
724
|
+
case BIN(invokesuper):{
|
725
|
+
int inc = 0;
|
726
|
+
int op_argc = FIX2INT(opes[0]);
|
727
|
+
int op_flag = FIX2INT(opes[2]);
|
728
|
+
inc += - (int)(op_argc + ((op_flag & VM_CALL_ARGS_BLOCKARG_BIT) ? 1 : 0));;
|
729
|
+
return depth + inc;
|
730
|
+
}
|
731
|
+
case BIN(invokeblock):{
|
732
|
+
int inc = 0;
|
733
|
+
int num = FIX2INT(opes[0]);
|
734
|
+
inc += 1 - num;;
|
735
|
+
return depth + inc;
|
736
|
+
}
|
737
|
+
case BIN(leave):{
|
738
|
+
return depth + 0;
|
739
|
+
}
|
740
|
+
case BIN(finish):{
|
741
|
+
return depth + 0;
|
742
|
+
}
|
743
|
+
case BIN(throw):{
|
744
|
+
return depth + 0;
|
745
|
+
}
|
746
|
+
case BIN(jump):{
|
747
|
+
return depth + 0;
|
748
|
+
}
|
749
|
+
case BIN(branchif):{
|
750
|
+
return depth + -1;
|
751
|
+
}
|
752
|
+
case BIN(branchunless):{
|
753
|
+
return depth + -1;
|
754
|
+
}
|
755
|
+
case BIN(getinlinecache):{
|
756
|
+
return depth + 1;
|
757
|
+
}
|
758
|
+
case BIN(onceinlinecache):{
|
759
|
+
return depth + 1;
|
760
|
+
}
|
761
|
+
case BIN(setinlinecache):{
|
762
|
+
return depth + 0;
|
763
|
+
}
|
764
|
+
case BIN(opt_case_dispatch):{
|
765
|
+
int inc = 0;
|
766
|
+
inc += -1;;
|
767
|
+
return depth + inc;
|
768
|
+
}
|
769
|
+
case BIN(opt_checkenv):{
|
770
|
+
return depth + 0;
|
771
|
+
}
|
772
|
+
case BIN(opt_plus):{
|
773
|
+
return depth + -1;
|
774
|
+
}
|
775
|
+
case BIN(opt_minus):{
|
776
|
+
return depth + -1;
|
777
|
+
}
|
778
|
+
case BIN(opt_mult):{
|
779
|
+
return depth + -1;
|
780
|
+
}
|
781
|
+
case BIN(opt_div):{
|
782
|
+
return depth + -1;
|
783
|
+
}
|
784
|
+
case BIN(opt_mod):{
|
785
|
+
return depth + -1;
|
786
|
+
}
|
787
|
+
case BIN(opt_eq):{
|
788
|
+
return depth + -1;
|
789
|
+
}
|
790
|
+
case BIN(opt_neq):{
|
791
|
+
return depth + -1;
|
792
|
+
}
|
793
|
+
case BIN(opt_lt):{
|
794
|
+
return depth + -1;
|
795
|
+
}
|
796
|
+
case BIN(opt_le):{
|
797
|
+
return depth + -1;
|
798
|
+
}
|
799
|
+
case BIN(opt_gt):{
|
800
|
+
return depth + -1;
|
801
|
+
}
|
802
|
+
case BIN(opt_ge):{
|
803
|
+
return depth + -1;
|
804
|
+
}
|
805
|
+
case BIN(opt_ltlt):{
|
806
|
+
return depth + -1;
|
807
|
+
}
|
808
|
+
case BIN(opt_aref):{
|
809
|
+
return depth + -1;
|
810
|
+
}
|
811
|
+
case BIN(opt_aset):{
|
812
|
+
return depth + -2;
|
813
|
+
}
|
814
|
+
case BIN(opt_length):{
|
815
|
+
return depth + 0;
|
816
|
+
}
|
817
|
+
case BIN(opt_size):{
|
818
|
+
return depth + 0;
|
819
|
+
}
|
820
|
+
case BIN(opt_succ):{
|
821
|
+
return depth + 0;
|
822
|
+
}
|
823
|
+
case BIN(opt_not):{
|
824
|
+
return depth + 0;
|
825
|
+
}
|
826
|
+
case BIN(opt_regexpmatch1):{
|
827
|
+
return depth + 0;
|
828
|
+
}
|
829
|
+
case BIN(opt_regexpmatch2):{
|
830
|
+
return depth + -1;
|
831
|
+
}
|
832
|
+
case BIN(opt_call_c_function):{
|
833
|
+
return depth + 0;
|
834
|
+
}
|
835
|
+
case BIN(bitblt):{
|
836
|
+
return depth + 1;
|
837
|
+
}
|
838
|
+
case BIN(answer):{
|
839
|
+
return depth + 1;
|
840
|
+
}
|
841
|
+
|
842
|
+
default:
|
843
|
+
rb_bug("insn_sp_increase: unreachable");
|
844
|
+
}
|
845
|
+
return 0;
|
846
|
+
}
|
847
|
+
#endif
|
848
|
+
|
849
|
+
/* some utilities */
|
850
|
+
|
851
|
+
static int
|
852
|
+
insn_len(VALUE insn)
|
853
|
+
{
|
854
|
+
return insn_len_info[(int)insn];
|
855
|
+
}
|
856
|
+
|
857
|
+
static const char *
|
858
|
+
insn_name(VALUE insn)
|
859
|
+
{
|
860
|
+
return insn_name_info[(int)insn];
|
861
|
+
}
|
862
|
+
|
863
|
+
static const char *
|
864
|
+
insn_op_types(VALUE insn)
|
865
|
+
{
|
866
|
+
return insn_operand_info[(int)insn];
|
867
|
+
}
|
868
|
+
|
869
|
+
static int
|
870
|
+
insn_op_type(VALUE insn, long pos)
|
871
|
+
{
|
872
|
+
int len = insn_len(insn) - 1;
|
873
|
+
if(pos < len){
|
874
|
+
return insn_operand_info[(int)insn][pos];
|
875
|
+
}
|
876
|
+
else{
|
877
|
+
return 0;
|
878
|
+
}
|
879
|
+
}
|
880
|
+
|
881
|
+
#ifdef USE_INSN_RET_NUM
|
882
|
+
static int
|
883
|
+
insn_ret_num(VALUE insn)
|
884
|
+
{
|
885
|
+
return insn_stack_push_num_info[(int)insn];
|
886
|
+
}
|
887
|
+
#endif
|
888
|
+
void
|
889
|
+
make_compile_option(rb_compile_option_t *option, VALUE opt);
|
890
|
+
void
|
891
|
+
make_compile_option_value(rb_compile_option_t *option);
|
892
|
+
|
893
|
+
extern VALUE instruction_class[VM_INSTRUCTION_SIZE];
|
894
|
+
void define_instruction_subclasses(VALUE rb_cInstruction);
|
895
|
+
|
896
|
+
#endif
|
897
|
+
|
898
|
+
#endif
|
899
|
+
|