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