ruby-internal 0.7.3 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
ENC_DEFINE("ASCII-8BIT");
|
|
2
2
|
ENC_DEFINE("Big5");
|
|
3
|
+
ENC_DEFINE("Big5-HKSCS");
|
|
4
|
+
ENC_DEFINE("Big5-UAO");
|
|
3
5
|
ENC_DEFINE("CP949");
|
|
4
6
|
ENC_DEFINE("Emacs-Mule");
|
|
5
7
|
ENC_DEFINE("EUC-JP");
|
|
@@ -76,7 +78,10 @@ ENC_REPLICATE("macRomania", "ASCII-8BIT");
|
|
|
76
78
|
ENC_REPLICATE("macThai", "ASCII-8BIT");
|
|
77
79
|
ENC_REPLICATE("macTurkish", "ASCII-8BIT");
|
|
78
80
|
ENC_REPLICATE("macUkraine", "ASCII-8BIT");
|
|
79
|
-
ENC_ALIAS("CP950", "
|
|
81
|
+
ENC_ALIAS("CP950", "Big5");
|
|
82
|
+
ENC_SET_BASE("Big5-HKSCS", "Big5");
|
|
83
|
+
ENC_ALIAS("CP951", "Big5-HKSCS");
|
|
84
|
+
ENC_SET_BASE("Big5-UAO", "Big5");
|
|
80
85
|
ENC_REPLICATE("stateless-ISO-2022-JP", "Emacs-Mule");
|
|
81
86
|
ENC_ALIAS("eucJP", "EUC-JP") /* UI-OSF Application Platform Profile for Japanese Environment Version 1.1 */;
|
|
82
87
|
ENC_REPLICATE("eucJP-ms", "EUC-JP") /* TOG/JVC CDE/Motif Technical WG */;
|
|
@@ -92,6 +97,8 @@ ENC_DUMMY("ISO-2022-JP");
|
|
|
92
97
|
ENC_ALIAS("ISO2022-JP", "ISO-2022-JP");
|
|
93
98
|
ENC_REPLICATE("ISO-2022-JP-2", "ISO-2022-JP");
|
|
94
99
|
ENC_ALIAS("ISO2022-JP2", "ISO-2022-JP-2");
|
|
100
|
+
ENC_REPLICATE("CP50220", "ISO-2022-JP");
|
|
101
|
+
ENC_REPLICATE("CP50221", "ISO-2022-JP");
|
|
95
102
|
ENC_ALIAS("ISO8859-1", "ISO-8859-1");
|
|
96
103
|
ENC_REPLICATE("Windows-1252", "ISO-8859-1");
|
|
97
104
|
ENC_ALIAS("CP1252", "Windows-1252");
|
|
@@ -139,9 +146,18 @@ ENC_ALIAS("CP65000", "UTF-7");
|
|
|
139
146
|
ENC_ALIAS("CP65001", "UTF-8");
|
|
140
147
|
ENC_REPLICATE("UTF8-MAC", "UTF-8");
|
|
141
148
|
ENC_ALIAS("UTF-8-MAC", "UTF8-MAC");
|
|
149
|
+
ENC_ALIAS("UTF-8-HFS", "UTF8-MAC") /* Emacs 23.2 */;
|
|
142
150
|
ENC_ALIAS("UCS-2BE", "UTF-16BE");
|
|
143
151
|
ENC_ALIAS("UCS-4BE", "UTF-32BE");
|
|
144
152
|
ENC_ALIAS("UCS-4LE", "UTF-32LE");
|
|
145
153
|
ENC_ALIAS("CP1251", "Windows-1251");
|
|
154
|
+
ENC_REPLICATE("UTF8-DoCoMo", "UTF-8");
|
|
155
|
+
ENC_REPLICATE("SJIS-DoCoMo", "Windows-31J");
|
|
156
|
+
ENC_REPLICATE("UTF8-KDDI", "UTF-8");
|
|
157
|
+
ENC_REPLICATE("SJIS-KDDI", "Windows-31J");
|
|
158
|
+
ENC_REPLICATE("ISO-2022-JP-KDDI", "ISO-2022-JP");
|
|
159
|
+
ENC_REPLICATE("stateless-ISO-2022-JP-KDDI", "stateless-ISO-2022-JP");
|
|
160
|
+
ENC_REPLICATE("UTF8-SoftBank", "UTF-8");
|
|
161
|
+
ENC_REPLICATE("SJIS-SoftBank", "Windows-31J");
|
|
146
162
|
|
|
147
|
-
#define ENCODING_COUNT
|
|
163
|
+
#define ENCODING_COUNT 95
|
|
@@ -64,28 +64,21 @@ char *strrchr(const char *, const char);
|
|
|
64
64
|
#include <net/socket.h>
|
|
65
65
|
#endif
|
|
66
66
|
|
|
67
|
-
#ifdef __MACOS__
|
|
68
|
-
#include "macruby_private.h"
|
|
69
|
-
#endif
|
|
70
|
-
|
|
71
|
-
#ifdef __VMS
|
|
72
|
-
#include "vmsruby_private.h"
|
|
73
|
-
#endif
|
|
74
|
-
|
|
75
67
|
#define ruby_setjmp(env) RUBY_SETJMP(env)
|
|
76
68
|
#define ruby_longjmp(env,val) RUBY_LONGJMP(env,val)
|
|
77
69
|
#ifdef __CYGWIN__
|
|
78
|
-
|
|
70
|
+
# ifndef _setjmp
|
|
71
|
+
int _setjmp(jmp_buf);
|
|
72
|
+
# endif
|
|
73
|
+
# ifndef _longjmp
|
|
74
|
+
NORETURN(void _longjmp(jmp_buf, int));
|
|
75
|
+
# endif
|
|
79
76
|
#endif
|
|
80
77
|
|
|
81
78
|
#include <sys/types.h>
|
|
82
79
|
#include <signal.h>
|
|
83
80
|
#include <errno.h>
|
|
84
81
|
|
|
85
|
-
#if defined(__VMS)
|
|
86
|
-
#pragma nostandard
|
|
87
|
-
#endif
|
|
88
|
-
|
|
89
82
|
#ifdef HAVE_SYS_SELECT_H
|
|
90
83
|
#include <sys/select.h>
|
|
91
84
|
#endif
|
|
@@ -164,7 +157,7 @@ enum ruby_tag_type {
|
|
|
164
157
|
#define TAG_MASK RUBY_TAG_MASK
|
|
165
158
|
|
|
166
159
|
#define NEW_THROW_OBJECT(val, pt, st) \
|
|
167
|
-
((VALUE)
|
|
160
|
+
((VALUE)rb_node_newnode(NODE_LIT, (VALUE)(val), (VALUE)(pt), (VALUE)(st)))
|
|
168
161
|
#define SET_THROWOBJ_CATCH_POINT(obj, val) \
|
|
169
162
|
(RNODE((obj))->u2.value = (val))
|
|
170
163
|
#define SET_THROWOBJ_STATE(obj, val) \
|
|
@@ -174,12 +167,12 @@ enum ruby_tag_type {
|
|
|
174
167
|
#define GET_THROWOBJ_CATCH_POINT(obj) ((VALUE*)RNODE((obj))->u2.value)
|
|
175
168
|
#define GET_THROWOBJ_STATE(obj) ((int)RNODE((obj))->u3.value)
|
|
176
169
|
|
|
177
|
-
#define SCOPE_TEST(f) (
|
|
178
|
-
#define SCOPE_CHECK(f) (
|
|
179
|
-
#define SCOPE_SET(f) (
|
|
170
|
+
#define SCOPE_TEST(f) (rb_vm_cref()->nd_visi & (f))
|
|
171
|
+
#define SCOPE_CHECK(f) (rb_vm_cref()->nd_visi == (f))
|
|
172
|
+
#define SCOPE_SET(f) (rb_vm_cref()->nd_visi = (f))
|
|
180
173
|
|
|
181
174
|
#define CHECK_STACK_OVERFLOW(cfp, margin) do \
|
|
182
|
-
if (((VALUE *)(cfp)->sp) + (margin) + sizeof(rb_control_frame_t) >= ((VALUE *)cfp)) { \
|
|
175
|
+
if ((VALUE *)((char *)(((VALUE *)(cfp)->sp) + (margin)) + sizeof(rb_control_frame_t)) >= ((VALUE *)cfp)) { \
|
|
183
176
|
rb_exc_raise(sysstack_error); \
|
|
184
177
|
} \
|
|
185
178
|
while (0)
|
|
@@ -192,8 +185,8 @@ enum {
|
|
|
192
185
|
RAISED_STACKOVERFLOW = 2,
|
|
193
186
|
RAISED_NOMEMORY = 4
|
|
194
187
|
};
|
|
195
|
-
int
|
|
196
|
-
int
|
|
188
|
+
int rb_threadptr_set_raised(rb_thread_t *th);
|
|
189
|
+
int rb_threadptr_reset_raised(rb_thread_t *th);
|
|
197
190
|
#define rb_thread_raised_set(th, f) ((th)->raised_flag |= (f))
|
|
198
191
|
#define rb_thread_raised_reset(th, f) ((th)->raised_flag &= ~(f))
|
|
199
192
|
#define rb_thread_raised_p(th, f) (((th)->raised_flag & (f)) != 0)
|
|
@@ -205,17 +198,35 @@ VALUE rb_make_exception(int argc, VALUE *argv);
|
|
|
205
198
|
NORETURN(void rb_fiber_start(void));
|
|
206
199
|
|
|
207
200
|
NORETURN(void rb_print_undef(VALUE, ID, int));
|
|
208
|
-
NORETURN(void
|
|
209
|
-
NORETURN(void
|
|
210
|
-
|
|
211
|
-
VALUE
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
VALUE rb_vm_call_cfunc(VALUE recv, VALUE (*func)(VALUE), VALUE arg, const rb_block_t *blockptr, VALUE filename);
|
|
201
|
+
NORETURN(void rb_vm_localjump_error(const char *,VALUE, int));
|
|
202
|
+
NORETURN(void rb_vm_jump_tag_but_local_jump(int, VALUE));
|
|
203
|
+
NORETURN(void rb_raise_method_missing(rb_thread_t *th, int argc, VALUE *argv,
|
|
204
|
+
VALUE obj, int call_status));
|
|
205
|
+
|
|
206
|
+
VALUE rb_vm_make_jump_tag_but_local_jump(int state, VALUE val);
|
|
207
|
+
NODE *rb_vm_cref(void);
|
|
208
|
+
VALUE rb_vm_call_cfunc(VALUE recv, VALUE (*func)(VALUE), VALUE arg, const rb_block_t *blockptr, VALUE filename, VALUE filepath);
|
|
209
|
+
void rb_vm_set_progname(VALUE filename);
|
|
216
210
|
void rb_thread_terminate_all(void);
|
|
217
211
|
VALUE rb_vm_top_self();
|
|
218
212
|
VALUE rb_vm_cbase(void);
|
|
213
|
+
int rb_vm_get_sourceline(const rb_control_frame_t *);
|
|
219
214
|
void rb_trap_restore_mask(void);
|
|
220
215
|
|
|
216
|
+
#ifndef CharNext /* defined as CharNext[AW] on Windows. */
|
|
217
|
+
#define CharNext(p) ((p) + mblen(p, RUBY_MBCHAR_MAXSIZE))
|
|
218
|
+
#endif
|
|
219
|
+
|
|
220
|
+
#if defined DOSISH || defined __CYGWIN__
|
|
221
|
+
static inline void
|
|
222
|
+
translit_char(char *p, int from, int to)
|
|
223
|
+
{
|
|
224
|
+
while (*p) {
|
|
225
|
+
if ((unsigned char)*p == from)
|
|
226
|
+
*p = to;
|
|
227
|
+
p = CharNext(p);
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
#endif
|
|
231
|
+
|
|
221
232
|
#endif /* RUBY_EVAL_INTERN_H */
|
|
@@ -2,8 +2,10 @@
|
|
|
2
2
|
#ifndef RUBY_GC_H
|
|
3
3
|
#define RUBY_GC_H 1
|
|
4
4
|
|
|
5
|
-
#if defined(
|
|
6
|
-
#define SET_MACHINE_STACK_END(p) __asm__("
|
|
5
|
+
#if defined(__x86_64__) && defined(__GNUC__)
|
|
6
|
+
#define SET_MACHINE_STACK_END(p) __asm__("movq\t%%rsp, %0" : "=r" (*p))
|
|
7
|
+
#elif defined(__i386) && defined(__GNUC__)
|
|
8
|
+
#define SET_MACHINE_STACK_END(p) __asm__("movl\t%%esp, %0" : "=r" (*p))
|
|
7
9
|
#else
|
|
8
10
|
NOINLINE(void rb_gc_set_stack_end(VALUE **stack_end_p));
|
|
9
11
|
#define SET_MACHINE_STACK_END(p) rb_gc_set_stack_end(p)
|
|
@@ -26,7 +28,7 @@ rb_gc_debug_indent(void)
|
|
|
26
28
|
}
|
|
27
29
|
|
|
28
30
|
static void
|
|
29
|
-
rb_gc_debug_body(char *mode, char *msg, int st, void *ptr)
|
|
31
|
+
rb_gc_debug_body(const char *mode, const char *msg, int st, void *ptr)
|
|
30
32
|
{
|
|
31
33
|
if (st == 0) {
|
|
32
34
|
ruby_gc_debug_indent--;
|
|
@@ -56,7 +58,7 @@ rb_gc_debug_body(char *mode, char *msg, int st, void *ptr)
|
|
|
56
58
|
#endif
|
|
57
59
|
|
|
58
60
|
#define RUBY_MARK_UNLESS_NULL(ptr) if(RTEST(ptr)){rb_gc_mark(ptr);}
|
|
59
|
-
#define RUBY_FREE_UNLESS_NULL(ptr) if(ptr){ruby_xfree(ptr);}
|
|
61
|
+
#define RUBY_FREE_UNLESS_NULL(ptr) if(ptr){ruby_xfree(ptr);(ptr)=NULL;}
|
|
60
62
|
|
|
61
63
|
#if STACK_GROW_DIRECTION > 0
|
|
62
64
|
# define STACK_UPPER(x, a, b) a
|
|
@@ -64,7 +66,7 @@ rb_gc_debug_body(char *mode, char *msg, int st, void *ptr)
|
|
|
64
66
|
# define STACK_UPPER(x, a, b) b
|
|
65
67
|
#else
|
|
66
68
|
RUBY_EXTERN int ruby_stack_grow_direction;
|
|
67
|
-
int ruby_get_stack_grow_direction(VALUE *addr);
|
|
69
|
+
int ruby_get_stack_grow_direction(volatile VALUE *addr);
|
|
68
70
|
# define stack_growup_p(x) ( \
|
|
69
71
|
(ruby_stack_grow_direction ? \
|
|
70
72
|
ruby_stack_grow_direction : \
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
/* DO NOT EDIT THIS FILE DIRECTLY */
|
|
2
|
+
/**********************************************************************
|
|
3
|
+
|
|
4
|
+
id.h -
|
|
5
|
+
|
|
6
|
+
$Author: akr $
|
|
7
|
+
created at: Sun Oct 19 21:12:51 2008
|
|
8
|
+
|
|
9
|
+
Copyright (C) 2007 Koichi Sasada
|
|
10
|
+
|
|
11
|
+
**********************************************************************/
|
|
12
|
+
|
|
13
|
+
#ifndef RUBY_ID_H
|
|
14
|
+
#define RUBY_ID_H
|
|
15
|
+
|
|
16
|
+
#define ID_SCOPE_SHIFT 3
|
|
17
|
+
#define ID_SCOPE_MASK 0x07
|
|
18
|
+
#define ID_LOCAL 0x00
|
|
19
|
+
#define ID_INSTANCE 0x01
|
|
20
|
+
#define ID_GLOBAL 0x03
|
|
21
|
+
#define ID_ATTRSET 0x04
|
|
22
|
+
#define ID_CONST 0x05
|
|
23
|
+
#define ID_CLASS 0x06
|
|
24
|
+
#define ID_JUNK 0x07
|
|
25
|
+
#define ID_INTERNAL ID_JUNK
|
|
26
|
+
|
|
27
|
+
#ifdef USE_PARSE_H
|
|
28
|
+
#include "parse.h"
|
|
29
|
+
#endif
|
|
30
|
+
|
|
31
|
+
#define symIFUNC ID2SYM(idIFUNC)
|
|
32
|
+
#define symCFUNC ID2SYM(idCFUNC)
|
|
33
|
+
|
|
34
|
+
#if !defined tLAST_TOKEN && defined YYTOKENTYPE
|
|
35
|
+
#define tLAST_TOKEN tLAST_TOKEN
|
|
36
|
+
#endif
|
|
37
|
+
|
|
38
|
+
enum ruby_method_ids {
|
|
39
|
+
#ifndef tLAST_TOKEN
|
|
40
|
+
tUPLUS = 321,
|
|
41
|
+
tUMINUS = 322,
|
|
42
|
+
tPOW = 323,
|
|
43
|
+
tCMP = 324,
|
|
44
|
+
tEQ = 325,
|
|
45
|
+
tEQQ = 326,
|
|
46
|
+
tNEQ = 327,
|
|
47
|
+
tGEQ = 328,
|
|
48
|
+
tLEQ = 329,
|
|
49
|
+
tANDOP = 330,
|
|
50
|
+
tOROP = 331,
|
|
51
|
+
tMATCH = 332,
|
|
52
|
+
tNMATCH = 333,
|
|
53
|
+
tDOT2 = 334,
|
|
54
|
+
tDOT3 = 335,
|
|
55
|
+
tAREF = 336,
|
|
56
|
+
tASET = 337,
|
|
57
|
+
tLSHFT = 338,
|
|
58
|
+
tRSHFT = 339,
|
|
59
|
+
tLAMBDA = 352,
|
|
60
|
+
idNULL = 365,
|
|
61
|
+
idRespond_to = 366,
|
|
62
|
+
idIFUNC = 367,
|
|
63
|
+
idCFUNC = 368,
|
|
64
|
+
id_core_set_method_alias = 369,
|
|
65
|
+
id_core_set_variable_alias = 370,
|
|
66
|
+
id_core_undef_method = 371,
|
|
67
|
+
id_core_define_method = 372,
|
|
68
|
+
id_core_define_singleton_method = 373,
|
|
69
|
+
id_core_set_postexe = 374,
|
|
70
|
+
tLAST_TOKEN = 375,
|
|
71
|
+
#endif
|
|
72
|
+
idDot2 = tDOT2,
|
|
73
|
+
idDot3 = tDOT3,
|
|
74
|
+
idUPlus = tUPLUS,
|
|
75
|
+
idUMinus = tUMINUS,
|
|
76
|
+
idPow = tPOW,
|
|
77
|
+
idCmp = tCMP,
|
|
78
|
+
idPLUS = '+',
|
|
79
|
+
idMINUS = '-',
|
|
80
|
+
idMULT = '*',
|
|
81
|
+
idDIV = '/',
|
|
82
|
+
idMOD = '%',
|
|
83
|
+
idLT = '<',
|
|
84
|
+
idLTLT = tLSHFT,
|
|
85
|
+
idLE = tLEQ,
|
|
86
|
+
idGT = '>',
|
|
87
|
+
idGE = tGEQ,
|
|
88
|
+
idEq = tEQ,
|
|
89
|
+
idEqq = tEQQ,
|
|
90
|
+
idNeq = tNEQ,
|
|
91
|
+
idNot = '!',
|
|
92
|
+
idBackquote = '`',
|
|
93
|
+
idEqTilde = tMATCH,
|
|
94
|
+
idNeqTilde = tNMATCH,
|
|
95
|
+
idAREF = tAREF,
|
|
96
|
+
idASET = tASET,
|
|
97
|
+
idLAST_TOKEN = tLAST_TOKEN >> ID_SCOPE_SHIFT,
|
|
98
|
+
tIntern,
|
|
99
|
+
tMethodMissing,
|
|
100
|
+
tLength,
|
|
101
|
+
tSize,
|
|
102
|
+
tGets,
|
|
103
|
+
tSucc,
|
|
104
|
+
tEach,
|
|
105
|
+
tLambda,
|
|
106
|
+
tSend,
|
|
107
|
+
t__send__,
|
|
108
|
+
tInitialize,
|
|
109
|
+
#if SUPPORT_JOKE
|
|
110
|
+
tBitblt,
|
|
111
|
+
tAnswer,
|
|
112
|
+
#endif
|
|
113
|
+
tLAST_ID,
|
|
114
|
+
#define TOKEN2ID(n) id##n = ((t##n<<ID_SCOPE_SHIFT)|ID_LOCAL)
|
|
115
|
+
#if SUPPORT_JOKE
|
|
116
|
+
TOKEN2ID(Bitblt),
|
|
117
|
+
TOKEN2ID(Answer),
|
|
118
|
+
#endif
|
|
119
|
+
TOKEN2ID(Intern),
|
|
120
|
+
TOKEN2ID(MethodMissing),
|
|
121
|
+
TOKEN2ID(Length),
|
|
122
|
+
TOKEN2ID(Size),
|
|
123
|
+
TOKEN2ID(Gets),
|
|
124
|
+
TOKEN2ID(Succ),
|
|
125
|
+
TOKEN2ID(Each),
|
|
126
|
+
TOKEN2ID(Lambda),
|
|
127
|
+
TOKEN2ID(Send),
|
|
128
|
+
TOKEN2ID(__send__),
|
|
129
|
+
TOKEN2ID(Initialize)
|
|
130
|
+
};
|
|
131
|
+
|
|
132
|
+
#ifdef tLAST_TOKEN
|
|
133
|
+
struct ruby_method_ids_check {
|
|
134
|
+
#define ruby_method_id_check_for(name, value) \
|
|
135
|
+
int checking_for_##name[name == value ? 1 : -1]
|
|
136
|
+
ruby_method_id_check_for(tUPLUS, 321);
|
|
137
|
+
ruby_method_id_check_for(tUMINUS, 322);
|
|
138
|
+
ruby_method_id_check_for(tPOW, 323);
|
|
139
|
+
ruby_method_id_check_for(tCMP, 324);
|
|
140
|
+
ruby_method_id_check_for(tEQ, 325);
|
|
141
|
+
ruby_method_id_check_for(tEQQ, 326);
|
|
142
|
+
ruby_method_id_check_for(tNEQ, 327);
|
|
143
|
+
ruby_method_id_check_for(tGEQ, 328);
|
|
144
|
+
ruby_method_id_check_for(tLEQ, 329);
|
|
145
|
+
ruby_method_id_check_for(tANDOP, 330);
|
|
146
|
+
ruby_method_id_check_for(tOROP, 331);
|
|
147
|
+
ruby_method_id_check_for(tMATCH, 332);
|
|
148
|
+
ruby_method_id_check_for(tNMATCH, 333);
|
|
149
|
+
ruby_method_id_check_for(tDOT2, 334);
|
|
150
|
+
ruby_method_id_check_for(tDOT3, 335);
|
|
151
|
+
ruby_method_id_check_for(tAREF, 336);
|
|
152
|
+
ruby_method_id_check_for(tASET, 337);
|
|
153
|
+
ruby_method_id_check_for(tLSHFT, 338);
|
|
154
|
+
ruby_method_id_check_for(tRSHFT, 339);
|
|
155
|
+
ruby_method_id_check_for(tLAMBDA, 352);
|
|
156
|
+
ruby_method_id_check_for(idNULL, 365);
|
|
157
|
+
ruby_method_id_check_for(idRespond_to, 366);
|
|
158
|
+
ruby_method_id_check_for(idIFUNC, 367);
|
|
159
|
+
ruby_method_id_check_for(idCFUNC, 368);
|
|
160
|
+
ruby_method_id_check_for(id_core_set_method_alias, 369);
|
|
161
|
+
ruby_method_id_check_for(id_core_set_variable_alias, 370);
|
|
162
|
+
ruby_method_id_check_for(id_core_undef_method, 371);
|
|
163
|
+
ruby_method_id_check_for(id_core_define_method, 372);
|
|
164
|
+
ruby_method_id_check_for(id_core_define_singleton_method, 373);
|
|
165
|
+
ruby_method_id_check_for(id_core_set_postexe, 374);
|
|
166
|
+
ruby_method_id_check_for(tLAST_TOKEN, 375);
|
|
167
|
+
};
|
|
168
|
+
#endif
|
|
169
|
+
|
|
170
|
+
#endif /* RUBY_ID_H */
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
iseq.h -
|
|
4
4
|
|
|
5
|
-
$Author:
|
|
5
|
+
$Author: mame $
|
|
6
6
|
created at: 04/01/01 23:36:57 JST
|
|
7
7
|
|
|
8
8
|
Copyright (C) 2004-2008 Koichi Sasada
|
|
@@ -12,7 +12,15 @@
|
|
|
12
12
|
#ifndef RUBY_COMPILE_H
|
|
13
13
|
#define RUBY_COMPILE_H
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
/* compile.c */
|
|
16
|
+
VALUE rb_iseq_compile_node(VALUE self, NODE *node);
|
|
17
|
+
int rb_iseq_translate_threaded_code(rb_iseq_t *iseq);
|
|
18
|
+
VALUE rb_iseq_build_from_ary(rb_iseq_t *iseq, VALUE locals, VALUE args,
|
|
19
|
+
VALUE exception, VALUE body);
|
|
20
|
+
|
|
21
|
+
/* iseq.c */
|
|
22
|
+
VALUE rb_iseq_load(VALUE data, VALUE parent, VALUE opt);
|
|
23
|
+
struct st_table *ruby_insn_make_insn_table(void);
|
|
16
24
|
|
|
17
25
|
#define ISEQ_TYPE_TOP INT2FIX(1)
|
|
18
26
|
#define ISEQ_TYPE_METHOD INT2FIX(2)
|
|
@@ -21,14 +29,15 @@ VALUE iseq_load(VALUE self, VALUE data, VALUE parent, VALUE opt);
|
|
|
21
29
|
#define ISEQ_TYPE_RESCUE INT2FIX(5)
|
|
22
30
|
#define ISEQ_TYPE_ENSURE INT2FIX(6)
|
|
23
31
|
#define ISEQ_TYPE_EVAL INT2FIX(7)
|
|
24
|
-
#define
|
|
32
|
+
#define ISEQ_TYPE_MAIN INT2FIX(8)
|
|
33
|
+
#define ISEQ_TYPE_DEFINED_GUARD INT2FIX(9)
|
|
25
34
|
|
|
26
|
-
#define CATCH_TYPE_RESCUE INT2FIX(1)
|
|
27
|
-
#define CATCH_TYPE_ENSURE INT2FIX(2)
|
|
28
|
-
#define CATCH_TYPE_RETRY INT2FIX(3)
|
|
29
|
-
#define CATCH_TYPE_BREAK INT2FIX(4)
|
|
30
|
-
#define CATCH_TYPE_REDO INT2FIX(5)
|
|
31
|
-
#define CATCH_TYPE_NEXT INT2FIX(6)
|
|
35
|
+
#define CATCH_TYPE_RESCUE ((int)INT2FIX(1))
|
|
36
|
+
#define CATCH_TYPE_ENSURE ((int)INT2FIX(2))
|
|
37
|
+
#define CATCH_TYPE_RETRY ((int)INT2FIX(3))
|
|
38
|
+
#define CATCH_TYPE_BREAK ((int)INT2FIX(4))
|
|
39
|
+
#define CATCH_TYPE_REDO ((int)INT2FIX(5))
|
|
40
|
+
#define CATCH_TYPE_NEXT ((int)INT2FIX(6))
|
|
32
41
|
|
|
33
42
|
struct iseq_insn_info_entry {
|
|
34
43
|
unsigned short position;
|
|
@@ -65,14 +74,15 @@ struct iseq_compile_data {
|
|
|
65
74
|
struct iseq_label_data *end_label;
|
|
66
75
|
struct iseq_label_data *redo_label;
|
|
67
76
|
VALUE current_block;
|
|
68
|
-
VALUE loopval_popped; /* used by NODE_BREAK */
|
|
69
77
|
VALUE ensure_node;
|
|
70
78
|
VALUE for_iseq;
|
|
71
79
|
struct iseq_compile_data_ensure_node_stack *ensure_node_stack;
|
|
80
|
+
int loopval_popped; /* used by NODE_BREAK */
|
|
72
81
|
int cached_const;
|
|
73
82
|
struct iseq_compile_data_storage *storage_head;
|
|
74
83
|
struct iseq_compile_data_storage *storage_current;
|
|
75
84
|
int last_line;
|
|
85
|
+
int last_coverable_line;
|
|
76
86
|
int flip_cnt;
|
|
77
87
|
int label_no;
|
|
78
88
|
int node_level;
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
/**********************************************************************
|
|
2
|
+
|
|
3
|
+
method.h -
|
|
4
|
+
|
|
5
|
+
$Author: ko1 $
|
|
6
|
+
created at: Wed Jul 15 20:02:33 2009
|
|
7
|
+
|
|
8
|
+
Copyright (C) 2009 Koichi Sasada
|
|
9
|
+
|
|
10
|
+
**********************************************************************/
|
|
11
|
+
#ifndef METHOD_H
|
|
12
|
+
#define METHOD_H
|
|
13
|
+
|
|
14
|
+
typedef enum {
|
|
15
|
+
NOEX_PUBLIC = 0x00,
|
|
16
|
+
NOEX_NOSUPER = 0x01,
|
|
17
|
+
NOEX_PRIVATE = 0x02,
|
|
18
|
+
NOEX_PROTECTED = 0x04,
|
|
19
|
+
NOEX_MASK = 0x06,
|
|
20
|
+
NOEX_BASIC = 0x08,
|
|
21
|
+
NOEX_UNDEF = NOEX_NOSUPER,
|
|
22
|
+
NOEX_MODFUNC = 0x12,
|
|
23
|
+
NOEX_SUPER = 0x20,
|
|
24
|
+
NOEX_VCALL = 0x40,
|
|
25
|
+
NOEX_RESPONDS = 0x80
|
|
26
|
+
} rb_method_flag_t;
|
|
27
|
+
|
|
28
|
+
#define NOEX_SAFE(n) ((int)((n) >> 8) & 0x0F)
|
|
29
|
+
#define NOEX_WITH(n, s) ((s << 8) | (n) | (ruby_running ? 0 : NOEX_BASIC))
|
|
30
|
+
#define NOEX_WITH_SAFE(n) NOEX_WITH(n, rb_safe_level())
|
|
31
|
+
|
|
32
|
+
/* method data type */
|
|
33
|
+
|
|
34
|
+
typedef enum {
|
|
35
|
+
VM_METHOD_TYPE_ISEQ,
|
|
36
|
+
VM_METHOD_TYPE_CFUNC,
|
|
37
|
+
VM_METHOD_TYPE_ATTRSET,
|
|
38
|
+
VM_METHOD_TYPE_IVAR,
|
|
39
|
+
VM_METHOD_TYPE_BMETHOD,
|
|
40
|
+
VM_METHOD_TYPE_ZSUPER,
|
|
41
|
+
VM_METHOD_TYPE_UNDEF,
|
|
42
|
+
VM_METHOD_TYPE_NOTIMPLEMENTED,
|
|
43
|
+
VM_METHOD_TYPE_OPTIMIZED, /* Kernel#send, Proc#call, etc */
|
|
44
|
+
VM_METHOD_TYPE_MISSING /* wrapper for method_missing(id) */
|
|
45
|
+
} rb_method_type_t;
|
|
46
|
+
|
|
47
|
+
typedef struct rb_method_cfunc_struct {
|
|
48
|
+
VALUE (*func)(ANYARGS);
|
|
49
|
+
int argc;
|
|
50
|
+
} rb_method_cfunc_t;
|
|
51
|
+
|
|
52
|
+
typedef struct rb_method_attr_struct {
|
|
53
|
+
ID id;
|
|
54
|
+
VALUE location;
|
|
55
|
+
} rb_method_attr_t;
|
|
56
|
+
|
|
57
|
+
typedef struct rb_iseq_struct rb_iseq_t;
|
|
58
|
+
|
|
59
|
+
typedef struct rb_method_definition_struct {
|
|
60
|
+
rb_method_type_t type; /* method type */
|
|
61
|
+
ID original_id;
|
|
62
|
+
union {
|
|
63
|
+
rb_iseq_t *iseq; /* should be mark */
|
|
64
|
+
rb_method_cfunc_t cfunc;
|
|
65
|
+
rb_method_attr_t attr;
|
|
66
|
+
VALUE proc; /* should be mark */
|
|
67
|
+
enum method_optimized_type {
|
|
68
|
+
OPTIMIZED_METHOD_TYPE_SEND,
|
|
69
|
+
OPTIMIZED_METHOD_TYPE_CALL
|
|
70
|
+
} optimize_type;
|
|
71
|
+
} body;
|
|
72
|
+
int alias_count;
|
|
73
|
+
} rb_method_definition_t;
|
|
74
|
+
|
|
75
|
+
typedef struct rb_method_entry_struct {
|
|
76
|
+
rb_method_flag_t flag;
|
|
77
|
+
char mark;
|
|
78
|
+
rb_method_definition_t *def;
|
|
79
|
+
ID called_id;
|
|
80
|
+
VALUE klass; /* should be mark */
|
|
81
|
+
} rb_method_entry_t;
|
|
82
|
+
|
|
83
|
+
struct unlinked_method_entry_list_entry {
|
|
84
|
+
struct unlinked_method_entry_list_entry *next;
|
|
85
|
+
rb_method_entry_t *me;
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
#define UNDEFINED_METHOD_ENTRY_P(me) (!(me) || !(me)->def || (me)->def->type == VM_METHOD_TYPE_UNDEF)
|
|
89
|
+
|
|
90
|
+
void rb_add_method_cfunc(VALUE klass, ID mid, VALUE (*func)(ANYARGS), int argc, rb_method_flag_t noex);
|
|
91
|
+
rb_method_entry_t *rb_add_method(VALUE klass, ID mid, rb_method_type_t type, void *option, rb_method_flag_t noex);
|
|
92
|
+
rb_method_entry_t *rb_method_entry(VALUE klass, ID id);
|
|
93
|
+
|
|
94
|
+
rb_method_entry_t *rb_method_entry_get_without_cache(VALUE klass, ID id);
|
|
95
|
+
rb_method_entry_t *rb_method_entry_set(VALUE klass, ID mid, const rb_method_entry_t *, rb_method_flag_t noex);
|
|
96
|
+
|
|
97
|
+
int rb_method_entry_arity(const rb_method_entry_t *me);
|
|
98
|
+
|
|
99
|
+
void rb_mark_method_entry(const rb_method_entry_t *me);
|
|
100
|
+
void rb_free_method_entry(rb_method_entry_t *me);
|
|
101
|
+
void rb_sweep_method_entry(void *vm);
|
|
102
|
+
|
|
103
|
+
#endif /* METHOD_H */
|