debase-ruby_core_source 0.9.9 → 0.9.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -0
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview1 → ruby-2.2.8-p477}/addr2line.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview1 → ruby-2.2.8-p477}/ccan/build_assert/build_assert.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview1 → ruby-2.2.8-p477}/ccan/check_type/check_type.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview1 → ruby-2.2.8-p477}/ccan/container_of/container_of.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview3 → ruby-2.2.8-p477}/ccan/list/list.h +28 -166
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview1 → ruby-2.2.8-p477}/ccan/str/str.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview3 → ruby-2.2.8-p477}/constant.h +3 -10
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview1 → ruby-2.2.8-p477}/dln.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview2 → ruby-2.2.8-p477}/eval_intern.h +49 -89
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview3 → ruby-2.2.8-p477}/gc.h +1 -8
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview2 → ruby-2.2.8-p477}/id.h +5 -15
- data/lib/debase/ruby_core_source/ruby-2.2.8-p477/insns.inc +107 -0
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview3 → ruby-2.2.8-p477}/insns_info.inc +45 -89
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview2 → ruby-2.2.8-p477}/internal.h +164 -666
- data/lib/debase/ruby_core_source/ruby-2.2.8-p477/iseq.h +158 -0
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview1 → ruby-2.2.8-p477}/known_errors.inc +0 -0
- data/lib/debase/ruby_core_source/ruby-2.2.8-p477/method.h +144 -0
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview1 → ruby-2.2.8-p477}/node.h +42 -18
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview3 → ruby-2.2.8-p477}/node_name.inc +6 -2
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview2 → ruby-2.2.8-p477}/opt_sc.inc +0 -40
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview1 → ruby-2.2.8-p477}/optinsn.inc +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview2 → ruby-2.2.8-p477}/optunifs.inc +0 -5
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview1 → ruby-2.2.8-p477}/parse.h +8 -28
- data/lib/debase/ruby_core_source/ruby-2.2.8-p477/probes_helper.h +67 -0
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview3 → ruby-2.2.8-p477}/regenc.h +16 -16
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview3 → ruby-2.2.8-p477}/regint.h +10 -33
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview3 → ruby-2.2.8-p477}/regparse.h +1 -5
- data/lib/debase/ruby_core_source/ruby-2.2.8-p477/revision.h +1 -0
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview3 → ruby-2.2.8-p477}/ruby_atomic.h +5 -68
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview1 → ruby-2.2.8-p477}/siphash.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview2 → ruby-2.2.8-p477}/symbol.h +13 -33
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview3 → ruby-2.2.8-p477}/thread_pthread.h +2 -2
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview1 → ruby-2.2.8-p477}/thread_win32.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview1 → ruby-2.2.8-p477}/timev.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview3 → ruby-2.2.8-p477}/transcode_data.h +7 -23
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview1 → ruby-2.2.8-p477}/version.h +10 -31
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview2 → ruby-2.2.8-p477}/vm.inc +497 -542
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview2 → ruby-2.2.8-p477}/vm_core.h +305 -784
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview1 → ruby-2.2.8-p477}/vm_debug.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview1 → ruby-2.2.8-p477}/vm_exec.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview2 → ruby-2.2.8-p477}/vm_insnhelper.h +56 -50
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview3 → ruby-2.2.8-p477}/vm_opts.h +7 -8
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview3 → ruby-2.2.8-p477}/vmtc.inc +0 -5
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview2 → ruby-2.3.5-p376}/addr2line.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview2 → ruby-2.3.5-p376}/ccan/build_assert/build_assert.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview2 → ruby-2.3.5-p376}/ccan/check_type/check_type.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview2 → ruby-2.3.5-p376}/ccan/container_of/container_of.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview1 → ruby-2.3.5-p376}/ccan/list/list.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview2 → ruby-2.3.5-p376}/ccan/str/str.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview2 → ruby-2.3.5-p376}/constant.h +1 -1
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview2 → ruby-2.3.5-p376}/dln.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview1 → ruby-2.3.5-p376}/encindex.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview1 → ruby-2.3.5-p376}/eval_intern.h +3 -4
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview1 → ruby-2.3.5-p376}/gc.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview3 → ruby-2.3.5-p376}/id.h +0 -9
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview1 → ruby-2.3.5-p376}/id_table.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview2 → ruby-2.3.5-p376}/insns.inc +46 -48
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview2 → ruby-2.3.5-p376}/insns_info.inc +0 -20
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview1 → ruby-2.3.5-p376}/internal.h +58 -290
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview2 → ruby-2.3.5-p376}/iseq.h +15 -18
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview2 → ruby-2.3.5-p376}/known_errors.inc +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview2 → ruby-2.3.5-p376}/method.h +2 -2
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview3 → ruby-2.3.5-p376}/node.h +2 -2
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview1 → ruby-2.3.5-p376}/node_name.inc +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview3 → ruby-2.3.5-p376}/opt_sc.inc +0 -16
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview2 → ruby-2.3.5-p376}/optinsn.inc +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview3 → ruby-2.3.5-p376}/optunifs.inc +0 -2
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview3 → ruby-2.3.5-p376}/parse.h +8 -27
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview1 → ruby-2.3.5-p376}/probes_helper.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview2 → ruby-2.3.5-p376}/regenc.h +14 -14
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview2 → ruby-2.3.5-p376}/regint.h +0 -8
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview1 → ruby-2.3.5-p376}/regparse.h +0 -0
- data/lib/debase/ruby_core_source/ruby-2.3.5-p376/revision.h +1 -0
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview1 → ruby-2.3.5-p376}/ruby_atomic.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview2 → ruby-2.3.5-p376}/siphash.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview3 → ruby-2.3.5-p376}/symbol.h +3 -3
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview1 → ruby-2.3.5-p376}/thread_pthread.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview2 → ruby-2.3.5-p376}/thread_win32.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview2 → ruby-2.3.5-p376}/timev.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview1 → ruby-2.3.5-p376}/transcode_data.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview3 → ruby-2.3.5-p376}/version.h +9 -27
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview1 → ruby-2.3.5-p376}/vm.inc +255 -264
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview1 → ruby-2.3.5-p376}/vm_call_iseq_optimized.inc +5 -5
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview1 → ruby-2.3.5-p376}/vm_core.h +37 -28
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview2 → ruby-2.3.5-p376}/vm_debug.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview2 → ruby-2.3.5-p376}/vm_exec.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview1 → ruby-2.3.5-p376}/vm_insnhelper.h +32 -16
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview1 → ruby-2.3.5-p376}/vm_opts.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview2 → ruby-2.3.5-p376}/vmtc.inc +0 -2
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview3 → ruby-2.4.2-p198}/addr2line.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview3 → ruby-2.4.2-p198}/ccan/build_assert/build_assert.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview3 → ruby-2.4.2-p198}/ccan/check_type/check_type.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview3 → ruby-2.4.2-p198}/ccan/container_of/container_of.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview2 → ruby-2.4.2-p198}/ccan/list/list.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview3 → ruby-2.4.2-p198}/ccan/str/str.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview1 → ruby-2.4.2-p198}/constant.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview3 → ruby-2.4.2-p198}/dln.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview2 → ruby-2.4.2-p198}/encindex.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview3 → ruby-2.4.2-p198}/eval_intern.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview2 → ruby-2.4.2-p198}/gc.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview1 → ruby-2.4.2-p198}/id.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview2 → ruby-2.4.2-p198}/id_table.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview1 → ruby-2.4.2-p198}/insns.inc +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview1 → ruby-2.4.2-p198}/insns_info.inc +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview3 → ruby-2.4.2-p198}/internal.h +116 -51
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview1 → ruby-2.4.2-p198}/iseq.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview3 → ruby-2.4.2-p198}/known_errors.inc +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview3 → ruby-2.4.2-p198}/method.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview2 → ruby-2.4.2-p198}/node.h +2 -2
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview2 → ruby-2.4.2-p198}/node_name.inc +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview1 → ruby-2.4.2-p198}/opt_sc.inc +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview3 → ruby-2.4.2-p198}/optinsn.inc +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview1 → ruby-2.4.2-p198}/optunifs.inc +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview2 → ruby-2.4.2-p198}/parse.h +8 -27
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview2 → ruby-2.4.2-p198}/probes_helper.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview1 → ruby-2.4.2-p198}/regenc.h +79 -67
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview1 → ruby-2.4.2-p198}/regint.h +187 -244
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview2 → ruby-2.4.2-p198}/regparse.h +30 -27
- data/lib/debase/ruby_core_source/ruby-2.4.2-p198/revision.h +1 -0
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview1 → ruby-2.4.2-p198}/ruby_assert.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview2 → ruby-2.4.2-p198}/ruby_atomic.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview3 → ruby-2.4.2-p198}/siphash.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview1 → ruby-2.4.2-p198}/symbol.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview2 → ruby-2.4.2-p198}/thread_pthread.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview3 → ruby-2.4.2-p198}/thread_win32.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview3 → ruby-2.4.2-p198}/timev.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview2 → ruby-2.4.2-p198}/transcode_data.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview2 → ruby-2.4.2-p198}/version.h +6 -6
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview3 → ruby-2.4.2-p198}/vm.inc +37 -34
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview2 → ruby-2.4.2-p198}/vm_call_iseq_optimized.inc +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview3 → ruby-2.4.2-p198}/vm_core.h +9 -7
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview3 → ruby-2.4.2-p198}/vm_debug.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview3 → ruby-2.4.2-p198}/vm_exec.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview3 → ruby-2.4.2-p198}/vm_insnhelper.h +30 -14
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview2 → ruby-2.4.2-p198}/vm_opts.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.4.0-preview1 → ruby-2.4.2-p198}/vmtc.inc +0 -0
- data/lib/debase/ruby_core_source/version.rb +1 -1
- metadata +138 -143
- data/lib/debase/ruby_core_source/ruby-2.4.0-preview1/method.h +0 -213
- data/lib/debase/ruby_core_source/ruby-2.4.0-preview1/revision.h +0 -1
- data/lib/debase/ruby_core_source/ruby-2.4.0-preview2/revision.h +0 -1
- data/lib/debase/ruby_core_source/ruby-2.4.0-preview2/ruby_assert.h +0 -54
- data/lib/debase/ruby_core_source/ruby-2.4.0-preview3/encindex.h +0 -67
- data/lib/debase/ruby_core_source/ruby-2.4.0-preview3/id_table.h +0 -31
- data/lib/debase/ruby_core_source/ruby-2.4.0-preview3/insns.inc +0 -112
- data/lib/debase/ruby_core_source/ruby-2.4.0-preview3/iseq.h +0 -252
- data/lib/debase/ruby_core_source/ruby-2.4.0-preview3/probes_helper.h +0 -43
- data/lib/debase/ruby_core_source/ruby-2.4.0-preview3/revision.h +0 -1
- data/lib/debase/ruby_core_source/ruby-2.4.0-preview3/ruby_assert.h +0 -54
- data/lib/debase/ruby_core_source/ruby-2.4.0-preview3/vm_call_iseq_optimized.inc +0 -212
@@ -74,8 +74,6 @@
|
|
74
74
|
return "NODE_FCALL";
|
75
75
|
case NODE_VCALL:
|
76
76
|
return "NODE_VCALL";
|
77
|
-
case NODE_QCALL:
|
78
|
-
return "NODE_QCALL";
|
79
77
|
case NODE_SUPER:
|
80
78
|
return "NODE_SUPER";
|
81
79
|
case NODE_ZSUPER:
|
@@ -172,6 +170,8 @@
|
|
172
170
|
return "NODE_COLON2";
|
173
171
|
case NODE_COLON3:
|
174
172
|
return "NODE_COLON3";
|
173
|
+
case NODE_CREF:
|
174
|
+
return "NODE_CREF";
|
175
175
|
case NODE_DOT2:
|
176
176
|
return "NODE_DOT2";
|
177
177
|
case NODE_DOT3:
|
@@ -198,6 +198,10 @@
|
|
198
198
|
return "NODE_ALLOCA";
|
199
199
|
case NODE_BMETHOD:
|
200
200
|
return "NODE_BMETHOD";
|
201
|
+
case NODE_MEMO:
|
202
|
+
return "NODE_MEMO";
|
203
|
+
case NODE_IFUNC:
|
204
|
+
return "NODE_IFUNC";
|
201
205
|
case NODE_DSYM:
|
202
206
|
return "NODE_DSYM";
|
203
207
|
case NODE_ATTRASGN:
|
@@ -638,41 +638,6 @@ SC_ERROR,
|
|
638
638
|
SC_ERROR,
|
639
639
|
SC_ERROR,
|
640
640
|
SC_ERROR,
|
641
|
-
SC_ERROR},
|
642
|
-
{
|
643
|
-
SC_ERROR,
|
644
|
-
SC_ERROR,
|
645
|
-
SC_ERROR,
|
646
|
-
SC_ERROR,
|
647
|
-
SC_ERROR,
|
648
|
-
SC_ERROR},
|
649
|
-
{
|
650
|
-
SC_ERROR,
|
651
|
-
SC_ERROR,
|
652
|
-
SC_ERROR,
|
653
|
-
SC_ERROR,
|
654
|
-
SC_ERROR,
|
655
|
-
SC_ERROR},
|
656
|
-
{
|
657
|
-
SC_ERROR,
|
658
|
-
SC_ERROR,
|
659
|
-
SC_ERROR,
|
660
|
-
SC_ERROR,
|
661
|
-
SC_ERROR,
|
662
|
-
SC_ERROR},
|
663
|
-
{
|
664
|
-
SC_ERROR,
|
665
|
-
SC_ERROR,
|
666
|
-
SC_ERROR,
|
667
|
-
SC_ERROR,
|
668
|
-
SC_ERROR,
|
669
|
-
SC_ERROR},
|
670
|
-
{
|
671
|
-
SC_ERROR,
|
672
|
-
SC_ERROR,
|
673
|
-
SC_ERROR,
|
674
|
-
SC_ERROR,
|
675
|
-
SC_ERROR,
|
676
641
|
SC_ERROR}
|
677
642
|
};
|
678
643
|
|
@@ -764,11 +729,6 @@ static const VALUE sc_insn_next[] = {
|
|
764
729
|
SCS_XX,
|
765
730
|
SCS_XX,
|
766
731
|
SCS_XX,
|
767
|
-
SCS_XX,
|
768
|
-
SCS_XX,
|
769
|
-
SCS_XX,
|
770
|
-
SCS_XX,
|
771
|
-
SCS_XX,
|
772
732
|
SCS_XX
|
773
733
|
};
|
774
734
|
|
File without changes
|
@@ -1,8 +1,8 @@
|
|
1
|
-
/* A Bison parser, made by GNU Bison 2.
|
1
|
+
/* A Bison parser, made by GNU Bison 2.5. */
|
2
2
|
|
3
3
|
/* Bison interface for Yacc-like parsers in C
|
4
4
|
|
5
|
-
Copyright (C) 1984, 1989-1990, 2000-
|
5
|
+
Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc.
|
6
6
|
|
7
7
|
This program is free software: you can redistribute it and/or modify
|
8
8
|
it under the terms of the GNU General Public License as published by
|
@@ -30,15 +30,6 @@
|
|
30
30
|
This special exception was added by the Free Software Foundation in
|
31
31
|
version 2.2 of Bison. */
|
32
32
|
|
33
|
-
#ifndef YY_YY_Y_TAB_H_INCLUDED
|
34
|
-
# define YY_YY_Y_TAB_H_INCLUDED
|
35
|
-
/* Enabling traces. */
|
36
|
-
#ifndef YYDEBUG
|
37
|
-
# define YYDEBUG 0
|
38
|
-
#endif
|
39
|
-
#if YYDEBUG
|
40
|
-
extern int yydebug;
|
41
|
-
#endif
|
42
33
|
|
43
34
|
/* Tokens. */
|
44
35
|
#ifndef YYTOKENTYPE
|
@@ -131,7 +122,6 @@ extern int yydebug;
|
|
131
122
|
tASET = 145,
|
132
123
|
tLSHFT = 135,
|
133
124
|
tRSHFT = 136,
|
134
|
-
tANDDOT = 150,
|
135
125
|
tCOLON2 = 323,
|
136
126
|
tCOLON3 = 324,
|
137
127
|
tOP_ASGN = 325,
|
@@ -167,10 +157,12 @@ extern int yydebug;
|
|
167
157
|
#endif
|
168
158
|
|
169
159
|
|
160
|
+
|
170
161
|
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
|
171
162
|
typedef union YYSTYPE
|
172
163
|
{
|
173
|
-
|
164
|
+
|
165
|
+
/* Line 2068 of yacc.c */
|
174
166
|
|
175
167
|
VALUE val;
|
176
168
|
NODE *node;
|
@@ -179,7 +171,8 @@ typedef union YYSTYPE
|
|
179
171
|
const struct vtable *vars;
|
180
172
|
|
181
173
|
|
182
|
-
|
174
|
+
|
175
|
+
/* Line 2068 of yacc.c */
|
183
176
|
} YYSTYPE;
|
184
177
|
# define YYSTYPE_IS_TRIVIAL 1
|
185
178
|
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
|
@@ -187,18 +180,5 @@ typedef union YYSTYPE
|
|
187
180
|
#endif
|
188
181
|
|
189
182
|
|
190
|
-
#ifdef YYPARSE_PARAM
|
191
|
-
#if defined __STDC__ || defined __cplusplus
|
192
|
-
int yyparse (void *YYPARSE_PARAM);
|
193
|
-
#else
|
194
|
-
int yyparse ();
|
195
|
-
#endif
|
196
|
-
#else /* ! YYPARSE_PARAM */
|
197
|
-
#if defined __STDC__ || defined __cplusplus
|
198
|
-
int yyparse (struct parser_params *parser);
|
199
|
-
#else
|
200
|
-
int yyparse ();
|
201
|
-
#endif
|
202
|
-
#endif /* ! YYPARSE_PARAM */
|
203
183
|
|
204
|
-
|
184
|
+
|
@@ -0,0 +1,67 @@
|
|
1
|
+
#ifndef RUBY_PROBES_HELPER_H
|
2
|
+
#define RUBY_PROBES_HELPER_H
|
3
|
+
|
4
|
+
#include "ruby/ruby.h"
|
5
|
+
#include "probes.h"
|
6
|
+
|
7
|
+
VALUE rb_class_path_no_cache(VALUE _klass);
|
8
|
+
|
9
|
+
#define RUBY_DTRACE_HOOK(name, th, klazz, id) \
|
10
|
+
do { \
|
11
|
+
if (RUBY_DTRACE_##name##_ENABLED()) { \
|
12
|
+
VALUE _klass = (klazz); \
|
13
|
+
ID _id = (id); \
|
14
|
+
const char * classname; \
|
15
|
+
const char * methodname; \
|
16
|
+
const char * filename; \
|
17
|
+
if (!_klass) { \
|
18
|
+
rb_thread_method_id_and_class((th), &_id, &_klass); \
|
19
|
+
} \
|
20
|
+
if (_klass) { \
|
21
|
+
if (RB_TYPE_P(_klass, T_ICLASS)) { \
|
22
|
+
_klass = RBASIC(_klass)->klass; \
|
23
|
+
} \
|
24
|
+
else if (FL_TEST(_klass, FL_SINGLETON)) { \
|
25
|
+
_klass = rb_iv_get(_klass, "__attached__"); \
|
26
|
+
} \
|
27
|
+
switch (TYPE(_klass)) { \
|
28
|
+
case T_CLASS: \
|
29
|
+
case T_ICLASS: \
|
30
|
+
case T_MODULE: \
|
31
|
+
{ \
|
32
|
+
VALUE _name = rb_class_path_no_cache(_klass); \
|
33
|
+
if (!NIL_P(_name)) { \
|
34
|
+
classname = StringValuePtr(_name); \
|
35
|
+
} \
|
36
|
+
else { \
|
37
|
+
classname = "<unknown>"; \
|
38
|
+
} \
|
39
|
+
methodname = rb_id2name(_id); \
|
40
|
+
filename = rb_sourcefile(); \
|
41
|
+
if (classname && methodname && filename) { \
|
42
|
+
RUBY_DTRACE_##name( \
|
43
|
+
classname, \
|
44
|
+
methodname, \
|
45
|
+
filename, \
|
46
|
+
rb_sourceline()); \
|
47
|
+
} \
|
48
|
+
break; \
|
49
|
+
} \
|
50
|
+
} \
|
51
|
+
} \
|
52
|
+
} \
|
53
|
+
} while (0)
|
54
|
+
|
55
|
+
#define RUBY_DTRACE_METHOD_ENTRY_HOOK(th, klass, id) \
|
56
|
+
RUBY_DTRACE_HOOK(METHOD_ENTRY, th, klass, id)
|
57
|
+
|
58
|
+
#define RUBY_DTRACE_METHOD_RETURN_HOOK(th, klass, id) \
|
59
|
+
RUBY_DTRACE_HOOK(METHOD_RETURN, th, klass, id)
|
60
|
+
|
61
|
+
#define RUBY_DTRACE_CMETHOD_ENTRY_HOOK(th, klass, id) \
|
62
|
+
RUBY_DTRACE_HOOK(CMETHOD_ENTRY, th, klass, id)
|
63
|
+
|
64
|
+
#define RUBY_DTRACE_CMETHOD_RETURN_HOOK(th, klass, id) \
|
65
|
+
RUBY_DTRACE_HOOK(CMETHOD_RETURN, th, klass, id)
|
66
|
+
|
67
|
+
#endif /* RUBY_PROBES_HELPER_H */
|
@@ -129,36 +129,33 @@ ONIG_EXTERN int onigenc_ascii_apply_all_case_fold P_((OnigCaseFoldType flag, Oni
|
|
129
129
|
ONIG_EXTERN int onigenc_ascii_get_case_fold_codes_by_str P_((OnigCaseFoldType flag, const OnigUChar* p, const OnigUChar* end, OnigCaseFoldCodeItem items[], OnigEncoding enc));
|
130
130
|
ONIG_EXTERN int onigenc_apply_all_case_fold_with_map P_((int map_size, const OnigPairCaseFoldCodes map[], int ess_tsett_flag, OnigCaseFoldType flag, OnigApplyAllCaseFoldFunc f, void* arg));
|
131
131
|
ONIG_EXTERN int onigenc_get_case_fold_codes_by_str_with_map P_((int map_size, const OnigPairCaseFoldCodes map[], int ess_tsett_flag, OnigCaseFoldType flag, const OnigUChar* p, const OnigUChar* end, OnigCaseFoldCodeItem items[]));
|
132
|
-
|
133
|
-
|
134
|
-
ONIG_EXTERN int onigenc_single_byte_ascii_only_case_map P_((OnigCaseFoldType* flagP, const OnigUChar** pp, const OnigUChar* end, OnigUChar* to, OnigUChar* to_end, const struct OnigEncodingTypeST* enc));
|
132
|
+
ONIG_EXTERN int onigenc_not_support_get_ctype_code_range P_((OnigCtype ctype, OnigCodePoint* sb_out, const OnigCodePoint* ranges[], OnigEncoding enc));
|
133
|
+
ONIG_EXTERN int onigenc_is_mbc_newline_0x0a P_((const UChar* p, const UChar* end, OnigEncoding enc));
|
135
134
|
|
136
135
|
|
137
136
|
/* methods for single byte encoding */
|
138
137
|
ONIG_EXTERN int onigenc_ascii_mbc_case_fold P_((OnigCaseFoldType flag, const UChar** p, const UChar* end, UChar* lower, OnigEncoding enc));
|
139
|
-
|
140
|
-
|
141
|
-
|
138
|
+
ONIG_EXTERN int onigenc_single_byte_mbc_enc_len P_((const UChar* p, const UChar* e, OnigEncoding enc));
|
139
|
+
ONIG_EXTERN OnigCodePoint onigenc_single_byte_mbc_to_code P_((const UChar* p, const UChar* end, OnigEncoding enc));
|
140
|
+
ONIG_EXTERN int onigenc_single_byte_code_to_mbclen P_((OnigCodePoint code, OnigEncoding enc));
|
142
141
|
ONIG_EXTERN int onigenc_single_byte_code_to_mbc P_((OnigCodePoint code, UChar *buf, OnigEncoding enc));
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
142
|
+
ONIG_EXTERN UChar* onigenc_single_byte_left_adjust_char_head P_((const UChar* start, const UChar* s, const OnigUChar* end, OnigEncoding enc));
|
143
|
+
ONIG_EXTERN int onigenc_always_true_is_allowed_reverse_match P_((const UChar* s, const UChar* end, OnigEncoding enc));
|
144
|
+
ONIG_EXTERN int onigenc_always_false_is_allowed_reverse_match P_((const UChar* s, const UChar* end, OnigEncoding enc));
|
145
|
+
ONIG_EXTERN int onigenc_ascii_is_code_ctype P_((OnigCodePoint code, unsigned int ctype, OnigEncoding enc));
|
147
146
|
|
148
147
|
/* methods for multi byte encoding */
|
149
148
|
ONIG_EXTERN OnigCodePoint onigenc_mbn_mbc_to_code P_((OnigEncoding enc, const UChar* p, const UChar* end));
|
150
149
|
ONIG_EXTERN int onigenc_mbn_mbc_case_fold P_((OnigEncoding enc, OnigCaseFoldType flag, const UChar** p, const UChar* end, UChar* lower));
|
151
|
-
|
150
|
+
ONIG_EXTERN int onigenc_mb2_code_to_mbclen P_((OnigCodePoint code, OnigEncoding enc));
|
152
151
|
ONIG_EXTERN int onigenc_mb2_code_to_mbc P_((OnigEncoding enc, OnigCodePoint code, UChar *buf));
|
153
|
-
ONIG_EXTERN int onigenc_minimum_property_name_to_ctype P_((OnigEncoding enc,
|
154
|
-
ONIG_EXTERN int onigenc_unicode_property_name_to_ctype P_((OnigEncoding enc,
|
152
|
+
ONIG_EXTERN int onigenc_minimum_property_name_to_ctype P_((OnigEncoding enc, UChar* p, UChar* end));
|
153
|
+
ONIG_EXTERN int onigenc_unicode_property_name_to_ctype P_((OnigEncoding enc, UChar* p, UChar* end));
|
155
154
|
ONIG_EXTERN int onigenc_mb2_is_code_ctype P_((OnigEncoding enc, OnigCodePoint code, unsigned int ctype));
|
156
|
-
|
155
|
+
ONIG_EXTERN int onigenc_mb4_code_to_mbclen P_((OnigCodePoint code, OnigEncoding enc));
|
157
156
|
ONIG_EXTERN int onigenc_mb4_code_to_mbc P_((OnigEncoding enc, OnigCodePoint code, UChar *buf));
|
158
157
|
ONIG_EXTERN int onigenc_mb4_is_code_ctype P_((OnigEncoding enc, OnigCodePoint code, unsigned int ctype));
|
159
158
|
|
160
|
-
ONIG_EXTERN int onigenc_unicode_case_map P_((OnigCaseFoldType* flagP, const OnigUChar** pp, const OnigUChar* end, OnigUChar* to, OnigUChar* to_end, const struct OnigEncodingTypeST* enc));
|
161
|
-
|
162
159
|
|
163
160
|
/* in enc/unicode.c */
|
164
161
|
ONIG_EXTERN int onigenc_unicode_is_code_ctype P_((OnigCodePoint code, unsigned int ctype, OnigEncoding enc));
|
@@ -172,6 +169,9 @@ ONIG_EXTERN int onigenc_unicode_apply_all_case_fold P_((OnigCaseFoldType flag, O
|
|
172
169
|
#define UTF16_IS_SURROGATE_FIRST(c) (((c) & 0xfc) == 0xd8)
|
173
170
|
#define UTF16_IS_SURROGATE_SECOND(c) (((c) & 0xfc) == 0xdc)
|
174
171
|
#define UTF16_IS_SURROGATE(c) (((c) & 0xf8) == 0xd8)
|
172
|
+
#define UNICODE_VALID_CODEPOINT_P(c) ( \
|
173
|
+
((c) <= 0x10ffff) && \
|
174
|
+
!((c) < 0x10000 && UTF16_IS_SURROGATE((c) >> 8)))
|
175
175
|
|
176
176
|
#define ONIGENC_ISO_8859_1_TO_LOWER_CASE(c) \
|
177
177
|
OnigEncISO_8859_1_ToLowerCaseTable[c]
|
@@ -4,7 +4,7 @@
|
|
4
4
|
regint.h - Onigmo (Oniguruma-mod) (regular expression library)
|
5
5
|
**********************************************************************/
|
6
6
|
/*-
|
7
|
-
* Copyright (c) 2002-
|
7
|
+
* Copyright (c) 2002-2008 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
|
8
8
|
* Copyright (c) 2011-2014 K.Takata <kentkt AT csc DOT jp>
|
9
9
|
* All rights reserved.
|
10
10
|
*
|
@@ -48,18 +48,10 @@
|
|
48
48
|
#endif
|
49
49
|
#endif
|
50
50
|
|
51
|
-
#ifndef UNALIGNED_WORD_ACCESS
|
52
51
|
#if defined(__i386) || defined(__i386__) || defined(_M_IX86) || \
|
53
52
|
defined(__x86_64) || defined(__x86_64__) || defined(_M_AMD64) || \
|
54
53
|
defined(__powerpc64__) || \
|
55
54
|
defined(__mc68020__)
|
56
|
-
#define UNALIGNED_WORD_ACCESS 1
|
57
|
-
#else
|
58
|
-
#define UNALIGNED_WORD_ACCESS 0
|
59
|
-
#endif
|
60
|
-
#endif
|
61
|
-
|
62
|
-
#if UNALIGNED_WORD_ACCESS
|
63
55
|
#define PLATFORM_UNALIGNED_WORD_ACCESS
|
64
56
|
#endif
|
65
57
|
|
@@ -400,17 +392,17 @@ typedef unsigned int BitStatusType;
|
|
400
392
|
#define BIT_STATUS_CLEAR(stats) (stats) = 0
|
401
393
|
#define BIT_STATUS_ON_ALL(stats) (stats) = ~((BitStatusType )0)
|
402
394
|
#define BIT_STATUS_AT(stats,n) \
|
403
|
-
((n) < (int )BIT_STATUS_BITS_NUM ? ((stats) & ((BitStatusType
|
395
|
+
((n) < (int )BIT_STATUS_BITS_NUM ? ((stats) & ((BitStatusType)1 << n)) : ((stats) & 1))
|
404
396
|
|
405
397
|
#define BIT_STATUS_ON_AT(stats,n) do {\
|
406
|
-
|
398
|
+
if ((n) < (int )BIT_STATUS_BITS_NUM) \
|
407
399
|
(stats) |= (1 << (n));\
|
408
400
|
else\
|
409
401
|
(stats) |= 1;\
|
410
402
|
} while (0)
|
411
403
|
|
412
404
|
#define BIT_STATUS_ON_AT_SIMPLE(stats,n) do {\
|
413
|
-
|
405
|
+
if ((n) < (int )BIT_STATUS_BITS_NUM)\
|
414
406
|
(stats) |= (1 << (n));\
|
415
407
|
} while (0)
|
416
408
|
|
@@ -493,29 +485,23 @@ typedef struct _BBuf {
|
|
493
485
|
#define BBUF_INIT(buf,size) onig_bbuf_init((BBuf* )(buf), (size))
|
494
486
|
|
495
487
|
#define BBUF_SIZE_INC(buf,inc) do{\
|
496
|
-
UChar *tmp;\
|
497
488
|
(buf)->alloc += (inc);\
|
498
|
-
|
499
|
-
if (IS_NULL(
|
500
|
-
(buf)->p = tmp;\
|
489
|
+
(buf)->p = (UChar* )xrealloc((buf)->p, (buf)->alloc);\
|
490
|
+
if (IS_NULL((buf)->p)) return(ONIGERR_MEMORY);\
|
501
491
|
} while (0)
|
502
492
|
|
503
493
|
#define BBUF_EXPAND(buf,low) do{\
|
504
|
-
UChar *tmp;\
|
505
494
|
do { (buf)->alloc *= 2; } while ((buf)->alloc < (unsigned int )low);\
|
506
|
-
|
507
|
-
if (IS_NULL(
|
508
|
-
(buf)->p = tmp;\
|
495
|
+
(buf)->p = (UChar* )xrealloc((buf)->p, (buf)->alloc);\
|
496
|
+
if (IS_NULL((buf)->p)) return(ONIGERR_MEMORY);\
|
509
497
|
} while (0)
|
510
498
|
|
511
499
|
#define BBUF_ENSURE_SIZE(buf,size) do{\
|
512
500
|
unsigned int new_alloc = (buf)->alloc;\
|
513
501
|
while (new_alloc < (unsigned int )(size)) { new_alloc *= 2; }\
|
514
502
|
if ((buf)->alloc != new_alloc) {\
|
515
|
-
UChar
|
516
|
-
|
517
|
-
if (IS_NULL(tmp)) return(ONIGERR_MEMORY);\
|
518
|
-
(buf)->p = tmp;\
|
503
|
+
(buf)->p = (UChar* )xrealloc((buf)->p, new_alloc);\
|
504
|
+
if (IS_NULL((buf)->p)) return(ONIGERR_MEMORY);\
|
519
505
|
(buf)->alloc = new_alloc;\
|
520
506
|
}\
|
521
507
|
} while (0)
|
@@ -917,14 +903,6 @@ typedef struct {
|
|
917
903
|
#define IS_CODE_SB_WORD(enc,code) \
|
918
904
|
(ONIGENC_IS_CODE_ASCII(code) && ONIGENC_IS_CODE_WORD(enc,code))
|
919
905
|
|
920
|
-
typedef struct OnigEndCallListItem {
|
921
|
-
struct OnigEndCallListItem* next;
|
922
|
-
void (*func)(void);
|
923
|
-
} OnigEndCallListItemType;
|
924
|
-
|
925
|
-
extern void onig_add_end_call(void (*func)(void));
|
926
|
-
|
927
|
-
|
928
906
|
#ifdef ONIG_DEBUG
|
929
907
|
|
930
908
|
typedef struct {
|
@@ -935,7 +913,6 @@ typedef struct {
|
|
935
913
|
|
936
914
|
extern OnigOpInfoType OnigOpInfo[];
|
937
915
|
|
938
|
-
|
939
916
|
extern void onig_print_compiled_byte_code P_((FILE* f, UChar* bp, UChar* bpend, UChar** nextp, OnigEncoding enc));
|
940
917
|
|
941
918
|
#ifdef ONIG_DEBUG_STATISTICS
|
@@ -67,11 +67,7 @@ RUBY_SYMBOL_EXPORT_BEGIN
|
|
67
67
|
BIT_NT_CANY | BIT_NT_BREF)) != 0)
|
68
68
|
|
69
69
|
#define NTYPE(node) ((node)->u.base.type)
|
70
|
-
#define SET_NTYPE(node, ntype)
|
71
|
-
do { \
|
72
|
-
int value = ntype; \
|
73
|
-
memcpy(&((node)->u.base.type), &value, sizeof(int)); \
|
74
|
-
} while (0)
|
70
|
+
#define SET_NTYPE(node, ntype) (node)->u.base.type = (ntype)
|
75
71
|
|
76
72
|
#define NSTR(node) (&((node)->u.str))
|
77
73
|
#define NCCLASS(node) (&((node)->u.cclass))
|
@@ -0,0 +1 @@
|
|
1
|
+
#define RUBY_REVISION 59906
|
@@ -10,14 +10,14 @@ typedef unsigned int rb_atomic_t;
|
|
10
10
|
# define ATOMIC_OR(var, val) __atomic_fetch_or(&(var), (val), __ATOMIC_SEQ_CST)
|
11
11
|
# define ATOMIC_EXCHANGE(var, val) __atomic_exchange_n(&(var), (val), __ATOMIC_SEQ_CST)
|
12
12
|
# define ATOMIC_CAS(var, oldval, newval) \
|
13
|
-
({ __typeof__(
|
13
|
+
({ __typeof__(oldval) oldvaldup = (oldval); /* oldval should not be modified */ \
|
14
14
|
__atomic_compare_exchange_n(&(var), &oldvaldup, (newval), 0, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST); \
|
15
15
|
oldvaldup; })
|
16
16
|
|
17
17
|
# define ATOMIC_SIZE_ADD(var, val) __atomic_fetch_add(&(var), (val), __ATOMIC_SEQ_CST)
|
18
18
|
# define ATOMIC_SIZE_SUB(var, val) __atomic_fetch_sub(&(var), (val), __ATOMIC_SEQ_CST)
|
19
19
|
|
20
|
-
# define
|
20
|
+
# define ATOMIC_PTR_EXCHANGE(var, val) __atomic_exchange_n(&(var), (val), __ATOMIC_SEQ_CST)
|
21
21
|
|
22
22
|
#elif defined HAVE_GCC_SYNC_BUILTINS
|
23
23
|
/* @shyouhei hack to support atomic operations in case of gcc. Gcc
|
@@ -35,7 +35,7 @@ typedef unsigned int rb_atomic_t; /* Anything OK */
|
|
35
35
|
# define ATOMIC_SIZE_ADD(var, val) __sync_fetch_and_add(&(var), (val))
|
36
36
|
# define ATOMIC_SIZE_SUB(var, val) __sync_fetch_and_sub(&(var), (val))
|
37
37
|
|
38
|
-
# define
|
38
|
+
# define ATOMIC_PTR_EXCHANGE(var, val) __sync_lock_test_and_set(&(var), (val))
|
39
39
|
|
40
40
|
#elif defined _WIN32
|
41
41
|
#if defined _MSC_VER && _MSC_VER > 1200
|
@@ -133,9 +133,9 @@ extern rb_atomic_t ruby_atomic_compare_and_swap(rb_atomic_t *ptr,
|
|
133
133
|
|
134
134
|
# define ATOMIC_SIZE_ADD(var, val) (void)((var) += (val))
|
135
135
|
# define ATOMIC_SIZE_SUB(var, val) (void)((var) -= (val))
|
136
|
-
# define ATOMIC_SIZE_EXCHANGE(var, val)
|
136
|
+
# define ATOMIC_SIZE_EXCHANGE(var, val) atomic_size_exchange(&(var), (val))
|
137
137
|
static inline size_t
|
138
|
-
|
138
|
+
atomic_size_exchange(size_t *ptr, size_t val)
|
139
139
|
{
|
140
140
|
size_t old = *ptr;
|
141
141
|
*ptr = val;
|
@@ -156,77 +156,14 @@ ruby_atomic_size_exchange(size_t *ptr, size_t val)
|
|
156
156
|
# define ATOMIC_SIZE_CAS(var, oldval, val) ATOMIC_CAS(var, oldval, val)
|
157
157
|
#endif
|
158
158
|
|
159
|
-
#if RUBY_ATOMIC_GENERIC_MACRO
|
160
|
-
# ifndef ATOMIC_PTR_EXCHANGE
|
161
|
-
# define ATOMIC_PTR_EXCHANGE(var, val) ATOMIC_EXCHANGE(var, val)
|
162
|
-
# endif
|
163
|
-
# ifndef ATOMIC_PTR_CAS
|
164
|
-
# define ATOMIC_PTR_CAS(var, oldval, newval) ATOMIC_CAS(var, oldval, newval)
|
165
|
-
# endif
|
166
|
-
|
167
|
-
# ifndef ATOMIC_VALUE_EXCHANGE
|
168
|
-
# define ATOMIC_VALUE_EXCHANGE(var, val) ATOMIC_EXCHANGE(var, val)
|
169
|
-
# endif
|
170
|
-
# ifndef ATOMIC_VALUE_CAS
|
171
|
-
# define ATOMIC_VALUE_CAS(var, oldval, val) ATOMIC_CAS(var, oldval, val)
|
172
|
-
# endif
|
173
|
-
#endif
|
174
|
-
|
175
159
|
#ifndef ATOMIC_PTR_EXCHANGE
|
176
160
|
# if SIZEOF_VOIDP == SIZEOF_SIZE_T
|
177
161
|
# define ATOMIC_PTR_EXCHANGE(var, val) (void *)ATOMIC_SIZE_EXCHANGE(*(size_t *)&(var), (size_t)(val))
|
178
|
-
# else
|
179
|
-
# define ATOMIC_PTR_EXCHANGE(var, val) ruby_atomic_ptr_exchange((const void **)&(var), (val))
|
180
|
-
static inline void *
|
181
|
-
ruby_atomic_ptr_exchange(const void **ptr, const void *val)
|
182
|
-
{
|
183
|
-
const void *const old = *ptr;
|
184
|
-
*ptr = val;
|
185
|
-
return (void *)old;
|
186
|
-
}
|
187
162
|
# endif
|
188
163
|
#endif
|
189
164
|
#ifndef ATOMIC_PTR_CAS
|
190
165
|
# if SIZEOF_VOIDP == SIZEOF_SIZE_T
|
191
166
|
# define ATOMIC_PTR_CAS(var, oldval, val) (void *)ATOMIC_SIZE_CAS(*(size_t *)&(var), (size_t)(oldval), (size_t)(val))
|
192
|
-
# else
|
193
|
-
# define ATOMIC_PTR_CAS(var, oldval, val) ruby_atomic_ptr_cas(&(var), (oldval), (val))
|
194
|
-
static inline void *
|
195
|
-
ruby_atomic_ptr_cas(const void **ptr, const void *oldval, const void *val)
|
196
|
-
{
|
197
|
-
const void *const old = *ptr;
|
198
|
-
if (old == oldval) *ptr = val;
|
199
|
-
return (void *)old;
|
200
|
-
}
|
201
|
-
# endif
|
202
|
-
#endif
|
203
|
-
|
204
|
-
#ifndef ATOMIC_VALUE_EXCHANGE
|
205
|
-
# if SIZEOF_VALUE == SIZEOF_SIZE_T
|
206
|
-
# define ATOMIC_VALUE_EXCHANGE(var, val) ATOMIC_SIZE_EXCHANGE(*(size_t *)&(var), (size_t)(val))
|
207
|
-
# else
|
208
|
-
# define ATOMIC_VALUE_EXCHANGE(var, val) ruby_atomic_value_exchange(&(var), (val))
|
209
|
-
static inline VALUE
|
210
|
-
ruby_atomic_value_exchange(VALUE *ptr, VALUE val)
|
211
|
-
{
|
212
|
-
const VALUE old = *ptr;
|
213
|
-
*ptr = val;
|
214
|
-
return old;
|
215
|
-
}
|
216
|
-
# endif
|
217
|
-
#endif
|
218
|
-
#ifndef ATOMIC_VALUE_CAS
|
219
|
-
# if SIZEOF_VALUE == SIZEOF_SIZE_T
|
220
|
-
# define ATOMIC_VALUE_CAS(var, oldval, val) ATOMIC_SIZE_CAS(*(size_t *)&(var), (size_t)(oldval), (size_t)(val))
|
221
|
-
# else
|
222
|
-
# define ATOMIC_VALUE_CAS(var, oldval, val) ruby_atomic_value_cas(&(var), (oldval), (val))
|
223
|
-
static inline VALUE
|
224
|
-
ruby_atomic_value_cas(VALUE *ptr, VALUE oldval, VALUE val)
|
225
|
-
{
|
226
|
-
const VALUE old = *ptr;
|
227
|
-
if (old == oldval) *ptr = val;
|
228
|
-
return old;
|
229
|
-
}
|
230
167
|
# endif
|
231
168
|
#endif
|
232
169
|
|