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
File without changes
|
@@ -17,10 +17,10 @@
|
|
17
17
|
#define DYNAMIC_ID_P(id) (!(id&ID_STATIC_SYM)&&id>tLAST_OP_ID)
|
18
18
|
#define STATIC_ID2SYM(id) (((VALUE)(id)<<RUBY_SPECIAL_SHIFT)|SYMBOL_FLAG)
|
19
19
|
|
20
|
-
#ifdef
|
20
|
+
#ifdef __GNUC__
|
21
21
|
#define rb_id2sym(id) \
|
22
|
-
|
23
|
-
|
22
|
+
__extension__(__builtin_constant_p(id) && !DYNAMIC_ID_P(id) ? \
|
23
|
+
STATIC_ID2SYM(id) : rb_id2sym(id))
|
24
24
|
#endif
|
25
25
|
|
26
26
|
struct RSymbol {
|
@@ -32,38 +32,23 @@ struct RSymbol {
|
|
32
32
|
|
33
33
|
#define RSYMBOL(obj) (R_CAST(RSymbol)(obj))
|
34
34
|
|
35
|
-
#define is_notop_id(id) ((id)>tLAST_OP_ID)
|
36
|
-
#define is_local_id(id) (id_type(id)==ID_LOCAL)
|
37
|
-
#define is_global_id(id) (id_type(id)==ID_GLOBAL)
|
38
|
-
#define is_instance_id(id) (id_type(id)==ID_INSTANCE)
|
39
|
-
#define is_attrset_id(id) ((id)==idASET||id_type(id)==ID_ATTRSET)
|
40
|
-
#define is_const_id(id) (id_type(id)==ID_CONST)
|
41
|
-
#define is_class_id(id) (id_type(id)==ID_CLASS)
|
42
|
-
#define is_junk_id(id) (id_type(id)==ID_JUNK)
|
43
|
-
|
44
35
|
static inline int
|
45
36
|
id_type(ID id)
|
46
37
|
{
|
47
|
-
if (
|
48
|
-
return (int)(id&ID_SCOPE_MASK);
|
49
|
-
}
|
50
|
-
else {
|
38
|
+
if (id<=tLAST_OP_ID) {
|
51
39
|
return -1;
|
52
40
|
}
|
41
|
+
return (int)(id&ID_SCOPE_MASK);
|
53
42
|
}
|
54
43
|
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
else {
|
64
|
-
return (rb_id_serial_t)id;
|
65
|
-
}
|
66
|
-
}
|
44
|
+
#define is_notop_id(id) ((id)>tLAST_OP_ID)
|
45
|
+
#define is_local_id(id) (id_type(id)==ID_LOCAL)
|
46
|
+
#define is_global_id(id) (id_type(id)==ID_GLOBAL)
|
47
|
+
#define is_instance_id(id) (id_type(id)==ID_INSTANCE)
|
48
|
+
#define is_attrset_id(id) (id_type(id)==ID_ATTRSET)
|
49
|
+
#define is_const_id(id) (id_type(id)==ID_CONST)
|
50
|
+
#define is_class_id(id) (id_type(id)==ID_CLASS)
|
51
|
+
#define is_junk_id(id) (id_type(id)==ID_JUNK)
|
67
52
|
|
68
53
|
static inline int
|
69
54
|
sym_type(VALUE sym)
|
@@ -100,9 +85,4 @@ is_global_name_punct(const int c)
|
|
100
85
|
|
101
86
|
ID rb_intern_cstr_without_pindown(const char *, long, rb_encoding *);
|
102
87
|
|
103
|
-
RUBY_SYMBOL_EXPORT_BEGIN
|
104
|
-
|
105
|
-
size_t rb_sym_immortal_count(void);
|
106
|
-
|
107
|
-
RUBY_SYMBOL_EXPORT_END
|
108
88
|
#endif
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
thread_pthread.h -
|
4
4
|
|
5
|
-
$Author:
|
5
|
+
$Author: normal $
|
6
6
|
|
7
7
|
Copyright (C) 2004-2007 Koichi Sasada
|
8
8
|
|
@@ -26,7 +26,7 @@ typedef struct rb_thread_cond_struct {
|
|
26
26
|
} rb_nativethread_cond_t;
|
27
27
|
|
28
28
|
typedef struct native_thread_data_struct {
|
29
|
-
|
29
|
+
void *signal_thread_list;
|
30
30
|
rb_nativethread_cond_t sleep_cond;
|
31
31
|
} native_thread_data_t;
|
32
32
|
|
File without changes
|
File without changes
|
@@ -46,26 +46,10 @@ RUBY_SYMBOL_EXPORT_BEGIN
|
|
46
46
|
#define makeSTR1LEN(len) ((len)-4)
|
47
47
|
|
48
48
|
#define o1(b1) (PType((((unsigned char)(b1))<<8)|ONEbt))
|
49
|
-
#define o2(b1,b2) (PType((((unsigned char)(b1))<<8)
|
50
|
-
|
51
|
-
|
52
|
-
#define
|
53
|
-
(((unsigned char)(b2))<<16)|\
|
54
|
-
(((unsigned int)(unsigned char)(b3))<<24)|\
|
55
|
-
THREEbt)&\
|
56
|
-
0xffffffffU))
|
57
|
-
#define o4(b0,b1,b2,b3) (PType(((((unsigned char)(b1))<<8)|\
|
58
|
-
(((unsigned char)(b2))<<16)|\
|
59
|
-
(((unsigned int)(unsigned char)(b3))<<24)|\
|
60
|
-
((((unsigned char)(b0))&0x07)<<5)|\
|
61
|
-
FOURbt)&\
|
62
|
-
0xffffffffU))
|
63
|
-
#define g4(b0,b1,b2,b3) (PType(((((unsigned char)(b0))<<8)|\
|
64
|
-
(((unsigned char)(b2))<<16)|\
|
65
|
-
((((unsigned char)(b1))&0x0f)<<24)|\
|
66
|
-
((((unsigned int)(unsigned char)(b3))&0x0f)<<28)|\
|
67
|
-
GB4bt)&\
|
68
|
-
0xffffffffU))
|
49
|
+
#define o2(b1,b2) (PType((((unsigned char)(b1))<<8)|(((unsigned char)(b2))<<16)|TWObt))
|
50
|
+
#define o3(b1,b2,b3) (PType(((((unsigned char)(b1))<<8)|(((unsigned char)(b2))<<16)|(((unsigned int)(unsigned char)(b3))<<24)|THREEbt)&0xffffffffU))
|
51
|
+
#define o4(b0,b1,b2,b3) (PType(((((unsigned char)(b1))<<8)|(((unsigned char)(b2))<<16)|(((unsigned char)(b3))<<24)|((((unsigned char)(b0))&0x07)<<5)|FOURbt)&0xffffffffU))
|
52
|
+
#define g4(b0,b1,b2,b3) (PType(((((unsigned char)(b0))<<8)|(((unsigned char)(b2))<<16)|((((unsigned char)(b1))&0x0f)<<24)|((((unsigned int)(unsigned char)(b3))&0x0f)<<28)|GB4bt)&0xffffffffU))
|
69
53
|
#define funsio(diff) (PType((((unsigned int)(diff))<<8)|FUNsio))
|
70
54
|
|
71
55
|
#define getBT1(a) ((unsigned char)((a)>> 8))
|
@@ -86,9 +70,9 @@ RUBY_SYMBOL_EXPORT_BEGIN
|
|
86
70
|
#define THREETRAIL /* legal but undefined if three more trailing UTF-8 */
|
87
71
|
|
88
72
|
typedef enum {
|
89
|
-
|
90
|
-
|
91
|
-
|
73
|
+
asciicompat_converter, /* ASCII-compatible -> ASCII-compatible */
|
74
|
+
asciicompat_decoder, /* ASCII-incompatible -> ASCII-compatible */
|
75
|
+
asciicompat_encoder /* ASCII-compatible -> ASCII-incompatible */
|
92
76
|
/* ASCII-incompatible -> ASCII-incompatible is intentionally omitted. */
|
93
77
|
} rb_transcoder_asciicompat_type_t;
|
94
78
|
|
@@ -1,31 +1,13 @@
|
|
1
|
-
#define RUBY_VERSION "2.
|
2
|
-
#define RUBY_RELEASE_DATE
|
3
|
-
#define RUBY_PATCHLEVEL
|
1
|
+
#define RUBY_VERSION "2.2.8"
|
2
|
+
#define RUBY_RELEASE_DATE "2017-09-14"
|
3
|
+
#define RUBY_PATCHLEVEL 477
|
4
4
|
|
5
|
-
#define RUBY_RELEASE_YEAR
|
6
|
-
#define RUBY_RELEASE_MONTH
|
7
|
-
#define RUBY_RELEASE_DAY
|
5
|
+
#define RUBY_RELEASE_YEAR 2017
|
6
|
+
#define RUBY_RELEASE_MONTH 9
|
7
|
+
#define RUBY_RELEASE_DAY 14
|
8
8
|
|
9
9
|
#include "ruby/version.h"
|
10
10
|
|
11
|
-
#ifndef TOKEN_PASTE
|
12
|
-
#define TOKEN_PASTE(x,y) x##y
|
13
|
-
#endif
|
14
|
-
#define ONLY_ONE_DIGIT(x) TOKEN_PASTE(10,x) < 1000
|
15
|
-
#define WITH_ZERO_PADDING(x) TOKEN_PASTE(0,x)
|
16
|
-
#define RUBY_BIRTH_YEAR_STR STRINGIZE(RUBY_BIRTH_YEAR)
|
17
|
-
#define RUBY_RELEASE_YEAR_STR STRINGIZE(RUBY_RELEASE_YEAR)
|
18
|
-
#if ONLY_ONE_DIGIT(RUBY_RELEASE_MONTH)
|
19
|
-
#define RUBY_RELEASE_MONTH_STR STRINGIZE(WITH_ZERO_PADDING(RUBY_RELEASE_MONTH))
|
20
|
-
#else
|
21
|
-
#define RUBY_RELEASE_MONTH_STR STRINGIZE(RUBY_RELEASE_MONTH)
|
22
|
-
#endif
|
23
|
-
#if ONLY_ONE_DIGIT(RUBY_RELEASE_DAY)
|
24
|
-
#define RUBY_RELEASE_DAY_STR STRINGIZE(WITH_ZERO_PADDING(RUBY_RELEASE_DAY))
|
25
|
-
#else
|
26
|
-
#define RUBY_RELEASE_DAY_STR STRINGIZE(RUBY_RELEASE_DAY)
|
27
|
-
#endif
|
28
|
-
|
29
11
|
#if !defined RUBY_LIB_VERSION && defined RUBY_LIB_VERSION_STYLE
|
30
12
|
# if RUBY_LIB_VERSION_STYLE == 3
|
31
13
|
# define RUBY_LIB_VERSION STRINGIZE(RUBY_API_VERSION_MAJOR)"."STRINGIZE(RUBY_API_VERSION_MINOR)"."STRINGIZE(RUBY_API_VERSION_TEENY)
|
@@ -35,7 +17,7 @@
|
|
35
17
|
#endif
|
36
18
|
|
37
19
|
#if RUBY_PATCHLEVEL == -1
|
38
|
-
#define RUBY_PATCHLEVEL_STR "
|
20
|
+
#define RUBY_PATCHLEVEL_STR "dev"
|
39
21
|
#else
|
40
22
|
#define RUBY_PATCHLEVEL_STR "p"STRINGIZE(RUBY_PATCHLEVEL)
|
41
23
|
#endif
|
@@ -48,10 +30,7 @@
|
|
48
30
|
#endif
|
49
31
|
|
50
32
|
#if RUBY_REVISION
|
51
|
-
#
|
52
|
-
# ifndef RUBY_BRANCH_NAME
|
53
|
-
# define RUBY_BRANCH_NAME "trunk"
|
54
|
-
# endif
|
33
|
+
# ifdef RUBY_BRANCH_NAME
|
55
34
|
# define RUBY_REVISION_STR " "RUBY_BRANCH_NAME" "STRINGIZE(RUBY_REVISION)
|
56
35
|
# else
|
57
36
|
# define RUBY_REVISION_STR " revision "STRINGIZE(RUBY_REVISION)
|
@@ -68,6 +47,6 @@
|
|
68
47
|
"["RUBY_PLATFORM"]"
|
69
48
|
# define RUBY_COPYRIGHT \
|
70
49
|
"ruby - Copyright (C) " \
|
71
|
-
|
72
|
-
|
50
|
+
STRINGIZE(RUBY_BIRTH_YEAR)"-" \
|
51
|
+
STRINGIZE(RUBY_RELEASE_YEAR)" " \
|
73
52
|
RUBY_AUTHOR
|
@@ -53,7 +53,7 @@ INSN_ENTRY(getlocal){
|
|
53
53
|
{
|
54
54
|
#line 60 "insns.def"
|
55
55
|
int i, lev = (int)level;
|
56
|
-
|
56
|
+
VALUE *ep = GET_EP();
|
57
57
|
|
58
58
|
/* optimized insns generated for level == (0|1) in defs/opt_operand.def */
|
59
59
|
for (i = 0; i < lev; i++) {
|
@@ -88,13 +88,13 @@ INSN_ENTRY(setlocal){
|
|
88
88
|
{
|
89
89
|
#line 83 "insns.def"
|
90
90
|
int i, lev = (int)level;
|
91
|
-
|
91
|
+
VALUE *ep = GET_EP();
|
92
92
|
|
93
93
|
/* optimized insns generated for level == (0|1) in defs/opt_operand.def */
|
94
94
|
for (i = 0; i < lev; i++) {
|
95
95
|
ep = GET_PREV_EP(ep);
|
96
96
|
}
|
97
|
-
|
97
|
+
*(ep - idx) = val;
|
98
98
|
|
99
99
|
#line 100 "vm.inc"
|
100
100
|
#undef CURRENT_INSN_setlocal
|
@@ -224,9 +224,10 @@ INSN_ENTRY(getclassvariable){
|
|
224
224
|
COLLECT_USAGE_OPERAND(BIN(getclassvariable), 0, id);
|
225
225
|
{
|
226
226
|
#line 162 "insns.def"
|
227
|
-
|
227
|
+
NODE *cref = rb_vm_get_cref(GET_ISEQ(), GET_EP());
|
228
|
+
val = rb_cvar_get(vm_get_cvar_base(cref, GET_CFP()), id);
|
228
229
|
|
229
|
-
#line
|
230
|
+
#line 231 "vm.inc"
|
230
231
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
231
232
|
PUSH(val);
|
232
233
|
#undef CURRENT_INSN_getclassvariable
|
@@ -249,11 +250,11 @@ INSN_ENTRY(setclassvariable){
|
|
249
250
|
COLLECT_USAGE_INSN(BIN(setclassvariable));
|
250
251
|
COLLECT_USAGE_OPERAND(BIN(setclassvariable), 0, id);
|
251
252
|
{
|
252
|
-
#line
|
253
|
-
|
254
|
-
rb_cvar_set(vm_get_cvar_base(
|
253
|
+
#line 177 "insns.def"
|
254
|
+
NODE *cref = rb_vm_get_cref(GET_ISEQ(), GET_EP());
|
255
|
+
rb_cvar_set(vm_get_cvar_base(cref, GET_CFP()), id, val);
|
255
256
|
|
256
|
-
#line
|
257
|
+
#line 258 "vm.inc"
|
257
258
|
#undef CURRENT_INSN_setclassvariable
|
258
259
|
#undef INSN_IS_SC
|
259
260
|
#undef INSN_LABEL
|
@@ -275,10 +276,10 @@ INSN_ENTRY(getconstant){
|
|
275
276
|
COLLECT_USAGE_INSN(BIN(getconstant));
|
276
277
|
COLLECT_USAGE_OPERAND(BIN(getconstant), 0, id);
|
277
278
|
{
|
278
|
-
#line
|
279
|
-
val = vm_get_ev_const(th, klass, id, 0);
|
279
|
+
#line 199 "insns.def"
|
280
|
+
val = vm_get_ev_const(th, GET_ISEQ(), klass, id, 0);
|
280
281
|
|
281
|
-
#line
|
282
|
+
#line 283 "vm.inc"
|
282
283
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
283
284
|
PUSH(val);
|
284
285
|
#undef CURRENT_INSN_getconstant
|
@@ -302,9 +303,8 @@ INSN_ENTRY(setconstant){
|
|
302
303
|
COLLECT_USAGE_INSN(BIN(setconstant));
|
303
304
|
COLLECT_USAGE_OPERAND(BIN(setconstant), 0, id);
|
304
305
|
{
|
305
|
-
#line
|
306
|
+
#line 221 "insns.def"
|
306
307
|
vm_check_if_namespace(cbase);
|
307
|
-
vm_ensure_not_refinement_module(GET_SELF());
|
308
308
|
rb_const_set(cbase, id, val);
|
309
309
|
|
310
310
|
#line 311 "vm.inc"
|
@@ -461,10 +461,10 @@ INSN_ENTRY(putspecialobject){
|
|
461
461
|
val = rb_mRubyVMFrozenCore;
|
462
462
|
break;
|
463
463
|
case VM_SPECIAL_OBJECT_CBASE:
|
464
|
-
val = vm_get_cbase(GET_EP());
|
464
|
+
val = vm_get_cbase(GET_ISEQ(), GET_EP());
|
465
465
|
break;
|
466
466
|
case VM_SPECIAL_OBJECT_CONST_BASE:
|
467
|
-
val = vm_get_const_base(GET_EP());
|
467
|
+
val = vm_get_const_base(GET_ISEQ(), GET_EP());
|
468
468
|
break;
|
469
469
|
default:
|
470
470
|
rb_bug("putspecialobject insn: unknown value_type");
|
@@ -494,7 +494,7 @@ INSN_ENTRY(putiseq){
|
|
494
494
|
COLLECT_USAGE_OPERAND(BIN(putiseq), 0, iseq);
|
495
495
|
{
|
496
496
|
#line 342 "insns.def"
|
497
|
-
ret =
|
497
|
+
ret = iseq->self;
|
498
498
|
|
499
499
|
#line 500 "vm.inc"
|
500
500
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
@@ -546,10 +546,16 @@ INSN_ENTRY(concatstrings){
|
|
546
546
|
COLLECT_USAGE_OPERAND(BIN(concatstrings), 0, num);
|
547
547
|
{
|
548
548
|
#line 370 "insns.def"
|
549
|
-
|
549
|
+
rb_num_t i = num - 1;
|
550
|
+
|
551
|
+
val = rb_str_resurrect(TOPN(i));
|
552
|
+
while (i-- > 0) {
|
553
|
+
const VALUE v = TOPN(i);
|
554
|
+
rb_str_append(val, v);
|
555
|
+
}
|
550
556
|
POPN(num);
|
551
557
|
|
552
|
-
#line
|
558
|
+
#line 559 "vm.inc"
|
553
559
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
554
560
|
PUSH(val);
|
555
561
|
#undef CURRENT_INSN_concatstrings
|
@@ -571,10 +577,10 @@ INSN_ENTRY(tostring){
|
|
571
577
|
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
572
578
|
COLLECT_USAGE_INSN(BIN(tostring));
|
573
579
|
{
|
574
|
-
#line
|
580
|
+
#line 391 "insns.def"
|
575
581
|
val = rb_obj_as_string(val);
|
576
582
|
|
577
|
-
#line
|
583
|
+
#line 584 "vm.inc"
|
578
584
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
579
585
|
PUSH(val);
|
580
586
|
#undef CURRENT_INSN_tostring
|
@@ -582,35 +588,6 @@ INSN_ENTRY(tostring){
|
|
582
588
|
#undef INSN_LABEL
|
583
589
|
#undef LABEL_IS_SC
|
584
590
|
END_INSN(tostring);}}}
|
585
|
-
INSN_ENTRY(freezestring){
|
586
|
-
{
|
587
|
-
VALUE debug_info = (VALUE)GET_OPERAND(1);
|
588
|
-
VALUE str = TOPN(0);
|
589
|
-
DEBUG_ENTER_INSN("freezestring");
|
590
|
-
ADD_PC(1+1);
|
591
|
-
PREFETCH(GET_PC());
|
592
|
-
POPN(1);
|
593
|
-
#define CURRENT_INSN_freezestring 1
|
594
|
-
#define INSN_IS_SC() 0
|
595
|
-
#define INSN_LABEL(lab) LABEL_freezestring_##lab
|
596
|
-
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
597
|
-
COLLECT_USAGE_INSN(BIN(freezestring));
|
598
|
-
COLLECT_USAGE_OPERAND(BIN(freezestring), 0, debug_info);
|
599
|
-
{
|
600
|
-
#line 399 "insns.def"
|
601
|
-
if (!NIL_P(debug_info)) {
|
602
|
-
rb_ivar_set(str, id_debug_created_info, debug_info);
|
603
|
-
}
|
604
|
-
rb_str_freeze(str);
|
605
|
-
|
606
|
-
#line 607 "vm.inc"
|
607
|
-
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
608
|
-
PUSH(str);
|
609
|
-
#undef CURRENT_INSN_freezestring
|
610
|
-
#undef INSN_IS_SC
|
611
|
-
#undef INSN_LABEL
|
612
|
-
#undef LABEL_IS_SC
|
613
|
-
END_INSN(freezestring);}}}
|
614
591
|
INSN_ENTRY(toregexp){
|
615
592
|
{
|
616
593
|
VALUE val;
|
@@ -628,18 +605,18 @@ INSN_ENTRY(toregexp){
|
|
628
605
|
COLLECT_USAGE_OPERAND(BIN(toregexp), 0, opt);
|
629
606
|
COLLECT_USAGE_OPERAND(BIN(toregexp), 1, cnt);
|
630
607
|
{
|
631
|
-
#line
|
608
|
+
#line 406 "insns.def"
|
632
609
|
VALUE rb_reg_new_ary(VALUE ary, int options);
|
633
610
|
rb_num_t i;
|
634
611
|
const VALUE ary = rb_ary_tmp_new(cnt);
|
635
612
|
for (i = 0; i < cnt; i++) {
|
636
|
-
|
613
|
+
rb_ary_store(ary, cnt-i-1, TOPN(i));
|
637
614
|
}
|
638
615
|
POPN(cnt);
|
639
616
|
val = rb_reg_new_ary(ary, (int)opt);
|
640
617
|
rb_ary_clear(ary);
|
641
618
|
|
642
|
-
#line
|
619
|
+
#line 620 "vm.inc"
|
643
620
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
644
621
|
PUSH(val);
|
645
622
|
#undef CURRENT_INSN_toregexp
|
@@ -662,11 +639,11 @@ INSN_ENTRY(newarray){
|
|
662
639
|
COLLECT_USAGE_INSN(BIN(newarray));
|
663
640
|
COLLECT_USAGE_OPERAND(BIN(newarray), 0, num);
|
664
641
|
{
|
665
|
-
#line
|
642
|
+
#line 428 "insns.def"
|
666
643
|
val = rb_ary_new4((long)num, STACK_ADDR_FROM_TOP(num));
|
667
644
|
POPN(num);
|
668
645
|
|
669
|
-
#line
|
646
|
+
#line 647 "vm.inc"
|
670
647
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
671
648
|
PUSH(val);
|
672
649
|
#undef CURRENT_INSN_newarray
|
@@ -689,10 +666,10 @@ INSN_ENTRY(duparray){
|
|
689
666
|
COLLECT_USAGE_INSN(BIN(duparray));
|
690
667
|
COLLECT_USAGE_OPERAND(BIN(duparray), 0, ary);
|
691
668
|
{
|
692
|
-
#line
|
669
|
+
#line 443 "insns.def"
|
693
670
|
val = rb_ary_resurrect(ary);
|
694
671
|
|
695
|
-
#line
|
672
|
+
#line 673 "vm.inc"
|
696
673
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
697
674
|
PUSH(val);
|
698
675
|
#undef CURRENT_INSN_duparray
|
@@ -717,10 +694,10 @@ INSN_ENTRY(expandarray){
|
|
717
694
|
COLLECT_USAGE_OPERAND(BIN(expandarray), 0, num);
|
718
695
|
COLLECT_USAGE_OPERAND(BIN(expandarray), 1, flag);
|
719
696
|
{
|
720
|
-
#line
|
697
|
+
#line 464 "insns.def"
|
721
698
|
vm_expandarray(GET_CFP(), ary, num, (int)flag);
|
722
699
|
|
723
|
-
#line
|
700
|
+
#line 701 "vm.inc"
|
724
701
|
#undef CURRENT_INSN_expandarray
|
725
702
|
#undef INSN_IS_SC
|
726
703
|
#undef INSN_LABEL
|
@@ -742,7 +719,7 @@ INSN_ENTRY(concatarray){
|
|
742
719
|
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
743
720
|
COLLECT_USAGE_INSN(BIN(concatarray));
|
744
721
|
{
|
745
|
-
#line
|
722
|
+
#line 478 "insns.def"
|
746
723
|
const VALUE ary2 = ary2st;
|
747
724
|
VALUE tmp1 = rb_check_convert_type(ary1, T_ARRAY, "Array", "to_a");
|
748
725
|
VALUE tmp2 = rb_check_convert_type(ary2, T_ARRAY, "Array", "to_a");
|
@@ -760,7 +737,7 @@ INSN_ENTRY(concatarray){
|
|
760
737
|
}
|
761
738
|
ary = rb_ary_concat(tmp1, tmp2);
|
762
739
|
|
763
|
-
#line
|
740
|
+
#line 741 "vm.inc"
|
764
741
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
765
742
|
PUSH(ary);
|
766
743
|
#undef CURRENT_INSN_concatarray
|
@@ -784,7 +761,7 @@ INSN_ENTRY(splatarray){
|
|
784
761
|
COLLECT_USAGE_INSN(BIN(splatarray));
|
785
762
|
COLLECT_USAGE_OPERAND(BIN(splatarray), 0, flag);
|
786
763
|
{
|
787
|
-
#line
|
764
|
+
#line 507 "insns.def"
|
788
765
|
VALUE tmp = rb_check_convert_type(ary, T_ARRAY, "Array", "to_a");
|
789
766
|
if (NIL_P(tmp)) {
|
790
767
|
tmp = rb_ary_new3(1, ary);
|
@@ -794,7 +771,7 @@ INSN_ENTRY(splatarray){
|
|
794
771
|
}
|
795
772
|
obj = tmp;
|
796
773
|
|
797
|
-
#line
|
774
|
+
#line 775 "vm.inc"
|
798
775
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
799
776
|
PUSH(obj);
|
800
777
|
#undef CURRENT_INSN_splatarray
|
@@ -817,10 +794,12 @@ INSN_ENTRY(newhash){
|
|
817
794
|
COLLECT_USAGE_INSN(BIN(newhash));
|
818
795
|
COLLECT_USAGE_OPERAND(BIN(newhash), 0, num);
|
819
796
|
{
|
820
|
-
#line
|
797
|
+
#line 529 "insns.def"
|
821
798
|
rb_num_t i;
|
822
799
|
|
823
|
-
|
800
|
+
if(RUBY_DTRACE_HASH_CREATE_ENABLED()) {
|
801
|
+
RUBY_DTRACE_HASH_CREATE(num, rb_sourcefile(), rb_sourceline());
|
802
|
+
}
|
824
803
|
|
825
804
|
val = rb_hash_new();
|
826
805
|
|
@@ -831,7 +810,7 @@ INSN_ENTRY(newhash){
|
|
831
810
|
}
|
832
811
|
POPN(num);
|
833
812
|
|
834
|
-
#line
|
813
|
+
#line 814 "vm.inc"
|
835
814
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
836
815
|
PUSH(val);
|
837
816
|
#undef CURRENT_INSN_newhash
|
@@ -856,10 +835,10 @@ INSN_ENTRY(newrange){
|
|
856
835
|
COLLECT_USAGE_INSN(BIN(newrange));
|
857
836
|
COLLECT_USAGE_OPERAND(BIN(newrange), 0, flag);
|
858
837
|
{
|
859
|
-
#line
|
838
|
+
#line 556 "insns.def"
|
860
839
|
val = rb_range_new(low, high, (int)flag);
|
861
840
|
|
862
|
-
#line
|
841
|
+
#line 842 "vm.inc"
|
863
842
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
864
843
|
PUSH(val);
|
865
844
|
#undef CURRENT_INSN_newrange
|
@@ -881,11 +860,11 @@ INSN_ENTRY(pop){
|
|
881
860
|
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
882
861
|
COLLECT_USAGE_INSN(BIN(pop));
|
883
862
|
{
|
884
|
-
#line
|
863
|
+
#line 574 "insns.def"
|
885
864
|
(void)val;
|
886
865
|
/* none */
|
887
866
|
|
888
|
-
#line
|
867
|
+
#line 868 "vm.inc"
|
889
868
|
#undef CURRENT_INSN_pop
|
890
869
|
#undef INSN_IS_SC
|
891
870
|
#undef INSN_LABEL
|
@@ -907,10 +886,10 @@ INSN_ENTRY(dup){
|
|
907
886
|
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
908
887
|
COLLECT_USAGE_INSN(BIN(dup));
|
909
888
|
{
|
910
|
-
#line
|
889
|
+
#line 589 "insns.def"
|
911
890
|
val1 = val2 = val;
|
912
891
|
|
913
|
-
#line
|
892
|
+
#line 893 "vm.inc"
|
914
893
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 2);
|
915
894
|
PUSH(val1);
|
916
895
|
PUSH(val2);
|
@@ -933,7 +912,7 @@ INSN_ENTRY(dupn){
|
|
933
912
|
COLLECT_USAGE_INSN(BIN(dupn));
|
934
913
|
COLLECT_USAGE_OPERAND(BIN(dupn), 0, n);
|
935
914
|
{
|
936
|
-
#line
|
915
|
+
#line 603 "insns.def"
|
937
916
|
rb_num_t i;
|
938
917
|
VALUE *sp = STACK_ADDR_FROM_TOP(n);
|
939
918
|
for (i = 0; i < n; i++) {
|
@@ -941,7 +920,7 @@ INSN_ENTRY(dupn){
|
|
941
920
|
}
|
942
921
|
INC_SP(n);
|
943
922
|
|
944
|
-
#line
|
923
|
+
#line 924 "vm.inc"
|
945
924
|
#undef CURRENT_INSN_dupn
|
946
925
|
#undef INSN_IS_SC
|
947
926
|
#undef INSN_LABEL
|
@@ -962,10 +941,10 @@ INSN_ENTRY(swap){
|
|
962
941
|
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
963
942
|
COLLECT_USAGE_INSN(BIN(swap));
|
964
943
|
{
|
965
|
-
#line
|
944
|
+
#line 623 "insns.def"
|
966
945
|
/* none */
|
967
946
|
|
968
|
-
#line
|
947
|
+
#line 948 "vm.inc"
|
969
948
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 2);
|
970
949
|
PUSH(obj);
|
971
950
|
PUSH(val);
|
@@ -974,37 +953,6 @@ INSN_ENTRY(swap){
|
|
974
953
|
#undef INSN_LABEL
|
975
954
|
#undef LABEL_IS_SC
|
976
955
|
END_INSN(swap);}}}
|
977
|
-
INSN_ENTRY(reverse){
|
978
|
-
{
|
979
|
-
rb_num_t n = (rb_num_t)GET_OPERAND(1);
|
980
|
-
|
981
|
-
DEBUG_ENTER_INSN("reverse");
|
982
|
-
ADD_PC(1+1);
|
983
|
-
PREFETCH(GET_PC());
|
984
|
-
#define CURRENT_INSN_reverse 1
|
985
|
-
#define INSN_IS_SC() 0
|
986
|
-
#define INSN_LABEL(lab) LABEL_reverse_##lab
|
987
|
-
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
988
|
-
COLLECT_USAGE_INSN(BIN(reverse));
|
989
|
-
COLLECT_USAGE_OPERAND(BIN(reverse), 0, n);
|
990
|
-
{
|
991
|
-
#line 654 "insns.def"
|
992
|
-
rb_num_t i;
|
993
|
-
VALUE *sp = STACK_ADDR_FROM_TOP(n);
|
994
|
-
|
995
|
-
for (i=0; i<n/2; i++) {
|
996
|
-
VALUE v0 = sp[i];
|
997
|
-
VALUE v1 = TOPN(i);
|
998
|
-
sp[i] = v1;
|
999
|
-
TOPN(i) = v0;
|
1000
|
-
}
|
1001
|
-
|
1002
|
-
#line 1003 "vm.inc"
|
1003
|
-
#undef CURRENT_INSN_reverse
|
1004
|
-
#undef INSN_IS_SC
|
1005
|
-
#undef INSN_LABEL
|
1006
|
-
#undef LABEL_IS_SC
|
1007
|
-
END_INSN(reverse);}}}
|
1008
956
|
INSN_ENTRY(reput){
|
1009
957
|
{
|
1010
958
|
|
@@ -1019,10 +967,10 @@ INSN_ENTRY(reput){
|
|
1019
967
|
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
1020
968
|
COLLECT_USAGE_INSN(BIN(reput));
|
1021
969
|
{
|
1022
|
-
#line
|
970
|
+
#line 637 "insns.def"
|
1023
971
|
/* none */
|
1024
972
|
|
1025
|
-
#line
|
973
|
+
#line 974 "vm.inc"
|
1026
974
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
1027
975
|
PUSH(val);
|
1028
976
|
#undef CURRENT_INSN_reput
|
@@ -1045,10 +993,10 @@ INSN_ENTRY(topn){
|
|
1045
993
|
COLLECT_USAGE_INSN(BIN(topn));
|
1046
994
|
COLLECT_USAGE_OPERAND(BIN(topn), 0, n);
|
1047
995
|
{
|
1048
|
-
#line
|
996
|
+
#line 651 "insns.def"
|
1049
997
|
val = TOPN(n);
|
1050
998
|
|
1051
|
-
#line
|
999
|
+
#line 1000 "vm.inc"
|
1052
1000
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
1053
1001
|
PUSH(val);
|
1054
1002
|
#undef CURRENT_INSN_topn
|
@@ -1071,10 +1019,10 @@ INSN_ENTRY(setn){
|
|
1071
1019
|
COLLECT_USAGE_INSN(BIN(setn));
|
1072
1020
|
COLLECT_USAGE_OPERAND(BIN(setn), 0, n);
|
1073
1021
|
{
|
1074
|
-
#line
|
1022
|
+
#line 665 "insns.def"
|
1075
1023
|
TOPN(n-1) = val;
|
1076
1024
|
|
1077
|
-
#line
|
1025
|
+
#line 1026 "vm.inc"
|
1078
1026
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
1079
1027
|
PUSH(val);
|
1080
1028
|
#undef CURRENT_INSN_setn
|
@@ -1096,10 +1044,10 @@ INSN_ENTRY(adjuststack){
|
|
1096
1044
|
COLLECT_USAGE_INSN(BIN(adjuststack));
|
1097
1045
|
COLLECT_USAGE_OPERAND(BIN(adjuststack), 0, n);
|
1098
1046
|
{
|
1099
|
-
#line
|
1047
|
+
#line 679 "insns.def"
|
1100
1048
|
DEC_SP(n);
|
1101
1049
|
|
1102
|
-
#line
|
1050
|
+
#line 1051 "vm.inc"
|
1103
1051
|
#undef CURRENT_INSN_adjuststack
|
1104
1052
|
#undef INSN_IS_SC
|
1105
1053
|
#undef INSN_LABEL
|
@@ -1125,10 +1073,105 @@ INSN_ENTRY(defined){
|
|
1125
1073
|
COLLECT_USAGE_OPERAND(BIN(defined), 1, obj);
|
1126
1074
|
COLLECT_USAGE_OPERAND(BIN(defined), 2, needstr);
|
1127
1075
|
{
|
1128
|
-
#line
|
1129
|
-
|
1076
|
+
#line 698 "insns.def"
|
1077
|
+
VALUE klass;
|
1078
|
+
enum defined_type expr_type = 0;
|
1079
|
+
enum defined_type type = (enum defined_type)op_type;
|
1080
|
+
|
1081
|
+
val = Qnil;
|
1082
|
+
|
1083
|
+
switch (type) {
|
1084
|
+
case DEFINED_IVAR:
|
1085
|
+
if (rb_ivar_defined(GET_SELF(), SYM2ID(obj))) {
|
1086
|
+
expr_type = DEFINED_IVAR;
|
1087
|
+
}
|
1088
|
+
break;
|
1089
|
+
case DEFINED_IVAR2:
|
1090
|
+
klass = vm_get_cbase(GET_ISEQ(), GET_EP());
|
1091
|
+
break;
|
1092
|
+
case DEFINED_GVAR:
|
1093
|
+
if (rb_gvar_defined(rb_global_entry(SYM2ID(obj)))) {
|
1094
|
+
expr_type = DEFINED_GVAR;
|
1095
|
+
}
|
1096
|
+
break;
|
1097
|
+
case DEFINED_CVAR: {
|
1098
|
+
NODE *cref = rb_vm_get_cref(GET_ISEQ(), GET_EP());
|
1099
|
+
klass = vm_get_cvar_base(cref, GET_CFP());
|
1100
|
+
if (rb_cvar_defined(klass, SYM2ID(obj))) {
|
1101
|
+
expr_type = DEFINED_CVAR;
|
1102
|
+
}
|
1103
|
+
break;
|
1104
|
+
}
|
1105
|
+
case DEFINED_CONST:
|
1106
|
+
klass = v;
|
1107
|
+
if (vm_get_ev_const(th, GET_ISEQ(), klass, SYM2ID(obj), 1)) {
|
1108
|
+
expr_type = DEFINED_CONST;
|
1109
|
+
}
|
1110
|
+
break;
|
1111
|
+
case DEFINED_FUNC:
|
1112
|
+
klass = CLASS_OF(v);
|
1113
|
+
if (rb_method_boundp(klass, SYM2ID(obj), 0)) {
|
1114
|
+
expr_type = DEFINED_METHOD;
|
1115
|
+
}
|
1116
|
+
break;
|
1117
|
+
case DEFINED_METHOD:{
|
1118
|
+
VALUE klass = CLASS_OF(v);
|
1119
|
+
const rb_method_entry_t *me = rb_method_entry(klass, SYM2ID(obj), 0);
|
1120
|
+
|
1121
|
+
if (me) {
|
1122
|
+
if (!(me->flag & NOEX_PRIVATE) &&
|
1123
|
+
!((me->flag & NOEX_PROTECTED) && !rb_obj_is_kind_of(GET_SELF(), rb_class_real(klass)))) {
|
1124
|
+
expr_type = DEFINED_METHOD;
|
1125
|
+
}
|
1126
|
+
}
|
1127
|
+
else {
|
1128
|
+
VALUE args[2];
|
1129
|
+
VALUE r;
|
1130
1130
|
|
1131
|
-
|
1131
|
+
args[0] = obj; args[1] = Qfalse;
|
1132
|
+
r = rb_check_funcall(v, idRespond_to_missing, 2, args);
|
1133
|
+
if (r != Qundef && RTEST(r))
|
1134
|
+
expr_type = DEFINED_METHOD;
|
1135
|
+
}
|
1136
|
+
break;
|
1137
|
+
}
|
1138
|
+
case DEFINED_YIELD:
|
1139
|
+
if (GET_BLOCK_PTR()) {
|
1140
|
+
expr_type = DEFINED_YIELD;
|
1141
|
+
}
|
1142
|
+
break;
|
1143
|
+
case DEFINED_ZSUPER:{
|
1144
|
+
rb_call_info_t cit;
|
1145
|
+
if (vm_search_superclass(GET_CFP(), GET_ISEQ(), Qnil, &cit) == 0) {
|
1146
|
+
VALUE klass = cit.klass;
|
1147
|
+
ID id = cit.mid;
|
1148
|
+
if (rb_method_boundp(klass, id, 0)) {
|
1149
|
+
expr_type = DEFINED_ZSUPER;
|
1150
|
+
}
|
1151
|
+
}
|
1152
|
+
break;
|
1153
|
+
}
|
1154
|
+
case DEFINED_REF:{
|
1155
|
+
val = vm_getspecial(th, GET_LEP(), Qfalse, FIX2INT(obj));
|
1156
|
+
if (val != Qnil) {
|
1157
|
+
expr_type = DEFINED_GVAR;
|
1158
|
+
}
|
1159
|
+
break;
|
1160
|
+
}
|
1161
|
+
default:
|
1162
|
+
rb_bug("unimplemented defined? type (VM)");
|
1163
|
+
break;
|
1164
|
+
}
|
1165
|
+
if (expr_type != 0) {
|
1166
|
+
if (needstr != Qfalse) {
|
1167
|
+
val = rb_iseq_defined_string(expr_type);
|
1168
|
+
}
|
1169
|
+
else {
|
1170
|
+
val = Qtrue;
|
1171
|
+
}
|
1172
|
+
}
|
1173
|
+
|
1174
|
+
#line 1175 "vm.inc"
|
1132
1175
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
1133
1176
|
PUSH(val);
|
1134
1177
|
#undef CURRENT_INSN_defined
|
@@ -1153,7 +1196,7 @@ INSN_ENTRY(checkmatch){
|
|
1153
1196
|
COLLECT_USAGE_INSN(BIN(checkmatch));
|
1154
1197
|
COLLECT_USAGE_OPERAND(BIN(checkmatch), 0, flag);
|
1155
1198
|
{
|
1156
|
-
#line
|
1199
|
+
#line 812 "insns.def"
|
1157
1200
|
enum vm_check_match_type checkmatch_type =
|
1158
1201
|
(enum vm_check_match_type)(flag & VM_CHECKMATCH_TYPE_MASK);
|
1159
1202
|
result = Qfalse;
|
@@ -1173,7 +1216,7 @@ INSN_ENTRY(checkmatch){
|
|
1173
1216
|
}
|
1174
1217
|
}
|
1175
1218
|
|
1176
|
-
#line
|
1219
|
+
#line 1220 "vm.inc"
|
1177
1220
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
1178
1221
|
PUSH(result);
|
1179
1222
|
#undef CURRENT_INSN_checkmatch
|
@@ -1198,7 +1241,7 @@ INSN_ENTRY(checkkeyword){
|
|
1198
1241
|
COLLECT_USAGE_OPERAND(BIN(checkkeyword), 0, kw_bits_index);
|
1199
1242
|
COLLECT_USAGE_OPERAND(BIN(checkkeyword), 1, keyword_index);
|
1200
1243
|
{
|
1201
|
-
#line
|
1244
|
+
#line 843 "insns.def"
|
1202
1245
|
const VALUE *ep = GET_EP();
|
1203
1246
|
const VALUE kw_bits = *(ep - kw_bits_index);
|
1204
1247
|
|
@@ -1207,11 +1250,11 @@ INSN_ENTRY(checkkeyword){
|
|
1207
1250
|
ret = (bits & (0x01 << keyword_index)) ? Qfalse : Qtrue;
|
1208
1251
|
}
|
1209
1252
|
else {
|
1210
|
-
|
1253
|
+
assert(RB_TYPE_P(kw_bits, T_HASH));
|
1211
1254
|
ret = rb_hash_has_key(kw_bits, INT2FIX(keyword_index)) ? Qfalse : Qtrue;
|
1212
1255
|
}
|
1213
1256
|
|
1214
|
-
#line
|
1257
|
+
#line 1258 "vm.inc"
|
1215
1258
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
1216
1259
|
PUSH(ret);
|
1217
1260
|
#undef CURRENT_INSN_checkkeyword
|
@@ -1233,34 +1276,34 @@ INSN_ENTRY(trace){
|
|
1233
1276
|
COLLECT_USAGE_INSN(BIN(trace));
|
1234
1277
|
COLLECT_USAGE_OPERAND(BIN(trace), 0, nf);
|
1235
1278
|
{
|
1236
|
-
#line
|
1279
|
+
#line 867 "insns.def"
|
1237
1280
|
rb_event_flag_t flag = (rb_event_flag_t)nf;
|
1238
1281
|
|
1239
1282
|
if (RUBY_DTRACE_METHOD_ENTRY_ENABLED() ||
|
1240
|
-
|
1241
|
-
|
1242
|
-
|
1243
|
-
|
1244
|
-
|
1245
|
-
|
1246
|
-
|
1247
|
-
|
1248
|
-
|
1249
|
-
|
1250
|
-
|
1251
|
-
|
1252
|
-
|
1253
|
-
|
1254
|
-
|
1255
|
-
|
1256
|
-
|
1257
|
-
|
1283
|
+
RUBY_DTRACE_METHOD_RETURN_ENABLED() ||
|
1284
|
+
RUBY_DTRACE_CMETHOD_ENTRY_ENABLED() ||
|
1285
|
+
RUBY_DTRACE_CMETHOD_RETURN_ENABLED()) {
|
1286
|
+
|
1287
|
+
switch(flag) {
|
1288
|
+
case RUBY_EVENT_CALL:
|
1289
|
+
RUBY_DTRACE_METHOD_ENTRY_HOOK(th, 0, 0);
|
1290
|
+
break;
|
1291
|
+
case RUBY_EVENT_C_CALL:
|
1292
|
+
RUBY_DTRACE_CMETHOD_ENTRY_HOOK(th, 0, 0);
|
1293
|
+
break;
|
1294
|
+
case RUBY_EVENT_RETURN:
|
1295
|
+
RUBY_DTRACE_METHOD_RETURN_HOOK(th, 0, 0);
|
1296
|
+
break;
|
1297
|
+
case RUBY_EVENT_C_RETURN:
|
1298
|
+
RUBY_DTRACE_CMETHOD_RETURN_HOOK(th, 0, 0);
|
1299
|
+
break;
|
1300
|
+
}
|
1258
1301
|
}
|
1259
1302
|
|
1260
1303
|
EXEC_EVENT_HOOK(th, flag, GET_SELF(), 0, 0 /* id and klass are resolved at callee */,
|
1261
1304
|
(flag & (RUBY_EVENT_RETURN | RUBY_EVENT_B_RETURN)) ? TOPN(0) : Qundef);
|
1262
1305
|
|
1263
|
-
#line
|
1306
|
+
#line 1307 "vm.inc"
|
1264
1307
|
#undef CURRENT_INSN_trace
|
1265
1308
|
#undef INSN_IS_SC
|
1266
1309
|
#undef INSN_LABEL
|
@@ -1287,8 +1330,10 @@ INSN_ENTRY(defineclass){
|
|
1287
1330
|
COLLECT_USAGE_OPERAND(BIN(defineclass), 1, class_iseq);
|
1288
1331
|
COLLECT_USAGE_OPERAND(BIN(defineclass), 2, flags);
|
1289
1332
|
{
|
1290
|
-
#line
|
1333
|
+
#line 913 "insns.def"
|
1291
1334
|
VALUE klass;
|
1335
|
+
VALUE class_iseq_val = class_iseq->self;
|
1336
|
+
rb_iseq_t *orig_class_iseq = NULL;
|
1292
1337
|
rb_vm_defineclass_type_t type = VM_DEFINECLASS_TYPE(flags);
|
1293
1338
|
|
1294
1339
|
switch (type) {
|
@@ -1297,8 +1342,8 @@ INSN_ENTRY(defineclass){
|
|
1297
1342
|
|
1298
1343
|
if (VM_DEFINECLASS_HAS_SUPERCLASS_P(flags) &&
|
1299
1344
|
!RB_TYPE_P(super, T_CLASS)) {
|
1300
|
-
rb_raise(rb_eTypeError, "superclass must be a Class (%
|
1301
|
-
|
1345
|
+
rb_raise(rb_eTypeError, "superclass must be a Class (%s given)",
|
1346
|
+
rb_obj_classname(super));
|
1302
1347
|
}
|
1303
1348
|
|
1304
1349
|
vm_check_if_namespace(cbase);
|
@@ -1310,7 +1355,7 @@ INSN_ENTRY(defineclass){
|
|
1310
1355
|
klass = VM_DEFINECLASS_SCOPED_P(flags) ?
|
1311
1356
|
rb_public_const_get_at(klass, id) : rb_const_get_at(klass, id);
|
1312
1357
|
if (!RB_TYPE_P(klass, T_CLASS)) {
|
1313
|
-
rb_raise(rb_eTypeError, "%
|
1358
|
+
rb_raise(rb_eTypeError, "%s is not a class", rb_id2name(id));
|
1314
1359
|
}
|
1315
1360
|
|
1316
1361
|
if (VM_DEFINECLASS_HAS_SUPERCLASS_P(flags)) {
|
@@ -1318,8 +1363,8 @@ INSN_ENTRY(defineclass){
|
|
1318
1363
|
tmp = rb_class_real(RCLASS_SUPER(klass));
|
1319
1364
|
|
1320
1365
|
if (tmp != super) {
|
1321
|
-
rb_raise(rb_eTypeError, "superclass mismatch for class %"
|
1322
|
-
|
1366
|
+
rb_raise(rb_eTypeError, "superclass mismatch for class %s",
|
1367
|
+
rb_id2name(id));
|
1323
1368
|
}
|
1324
1369
|
}
|
1325
1370
|
}
|
@@ -1337,7 +1382,18 @@ INSN_ENTRY(defineclass){
|
|
1337
1382
|
case VM_DEFINECLASS_TYPE_SINGLETON_CLASS:
|
1338
1383
|
/* val is dummy. classdef returns class scope value */
|
1339
1384
|
/* super is dummy */
|
1340
|
-
|
1385
|
+
{
|
1386
|
+
klass = rb_singleton_class(cbase);
|
1387
|
+
|
1388
|
+
/* Copy iseq to duplicate cref_stack place.
|
1389
|
+
* This is ad-hoc solution for [Bug #10871].
|
1390
|
+
* and this does not solve more complicated source code with singleton class.
|
1391
|
+
* If you need to solve everything, use Ruby 2.3 and later.
|
1392
|
+
*/
|
1393
|
+
orig_class_iseq = class_iseq;
|
1394
|
+
class_iseq_val = rb_iseq_clone(class_iseq->self, cbase);
|
1395
|
+
GetISeqPtr(class_iseq_val, class_iseq);
|
1396
|
+
}
|
1341
1397
|
break;
|
1342
1398
|
case VM_DEFINECLASS_TYPE_MODULE:
|
1343
1399
|
/* val is dummy. classdef returns class scope value */
|
@@ -1351,7 +1407,7 @@ INSN_ENTRY(defineclass){
|
|
1351
1407
|
rb_public_const_get_at(klass, id) : rb_const_get_at(klass, id);
|
1352
1408
|
/* already exist */
|
1353
1409
|
if (!RB_TYPE_P(klass, T_MODULE)) {
|
1354
|
-
rb_raise(rb_eTypeError, "%
|
1410
|
+
rb_raise(rb_eTypeError, "%s is not a module", rb_id2name(id));
|
1355
1411
|
}
|
1356
1412
|
}
|
1357
1413
|
else {
|
@@ -1365,19 +1421,23 @@ INSN_ENTRY(defineclass){
|
|
1365
1421
|
rb_bug("unknown defineclass type: %d", (int)type);
|
1366
1422
|
}
|
1367
1423
|
|
1368
|
-
|
1424
|
+
COPY_CREF(class_iseq->cref_stack, vm_cref_push(th, klass, NOEX_PUBLIC, NULL));
|
1425
|
+
if (orig_class_iseq) {
|
1426
|
+
COPY_CREF(orig_class_iseq->cref_stack, vm_cref_push(th, klass, NOEX_PUBLIC, NULL));
|
1427
|
+
}
|
1369
1428
|
|
1370
1429
|
/* enter scope */
|
1371
|
-
vm_push_frame(th, class_iseq, VM_FRAME_MAGIC_CLASS
|
1372
|
-
|
1373
|
-
|
1374
|
-
class_iseq->
|
1375
|
-
|
1376
|
-
|
1430
|
+
vm_push_frame(th, class_iseq, VM_FRAME_MAGIC_CLASS,
|
1431
|
+
klass, 0, VM_ENVVAL_BLOCK_PTR(GET_BLOCK_PTR()),
|
1432
|
+
class_iseq->iseq_encoded, GET_SP(),
|
1433
|
+
class_iseq->local_size, 0, class_iseq->stack_max);
|
1434
|
+
|
1435
|
+
RB_GC_GUARD(class_iseq_val);
|
1436
|
+
|
1377
1437
|
RESTORE_REGS();
|
1378
1438
|
NEXT_INSN();
|
1379
1439
|
|
1380
|
-
#line
|
1440
|
+
#line 1441 "vm.inc"
|
1381
1441
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
1382
1442
|
PUSH(val);
|
1383
1443
|
#undef CURRENT_INSN_defineclass
|
@@ -1388,12 +1448,10 @@ INSN_ENTRY(defineclass){
|
|
1388
1448
|
INSN_ENTRY(send){
|
1389
1449
|
{
|
1390
1450
|
VALUE val;
|
1391
|
-
ISEQ blockiseq = (ISEQ)GET_OPERAND(3);
|
1392
|
-
CALL_CACHE cc = (CALL_CACHE)GET_OPERAND(2);
|
1393
1451
|
CALL_INFO ci = (CALL_INFO)GET_OPERAND(1);
|
1394
1452
|
|
1395
1453
|
DEBUG_ENTER_INSN("send");
|
1396
|
-
ADD_PC(1+
|
1454
|
+
ADD_PC(1+1);
|
1397
1455
|
PREFETCH(GET_PC());
|
1398
1456
|
#define CURRENT_INSN_send 1
|
1399
1457
|
#define INSN_IS_SC() 0
|
@@ -1401,17 +1459,14 @@ INSN_ENTRY(send){
|
|
1401
1459
|
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
1402
1460
|
COLLECT_USAGE_INSN(BIN(send));
|
1403
1461
|
COLLECT_USAGE_OPERAND(BIN(send), 0, ci);
|
1404
|
-
COLLECT_USAGE_OPERAND(BIN(send), 1, cc);
|
1405
|
-
COLLECT_USAGE_OPERAND(BIN(send), 2, blockiseq);
|
1406
1462
|
{
|
1407
|
-
#line
|
1408
|
-
|
1409
|
-
|
1410
|
-
|
1411
|
-
|
1412
|
-
CALL_METHOD(&calling, ci, cc);
|
1463
|
+
#line 1036 "insns.def"
|
1464
|
+
ci->argc = ci->orig_argc;
|
1465
|
+
vm_caller_setup_arg_block(th, reg_cfp, ci, FALSE);
|
1466
|
+
vm_search_method(ci, ci->recv = TOPN(ci->argc));
|
1467
|
+
CALL_METHOD(ci);
|
1413
1468
|
|
1414
|
-
#line
|
1469
|
+
#line 1470 "vm.inc"
|
1415
1470
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
1416
1471
|
PUSH(val);
|
1417
1472
|
#undef CURRENT_INSN_send
|
@@ -1434,7 +1489,7 @@ INSN_ENTRY(opt_str_freeze){
|
|
1434
1489
|
COLLECT_USAGE_INSN(BIN(opt_str_freeze));
|
1435
1490
|
COLLECT_USAGE_OPERAND(BIN(opt_str_freeze), 0, str);
|
1436
1491
|
{
|
1437
|
-
#line
|
1492
|
+
#line 1048 "insns.def"
|
1438
1493
|
if (BASIC_OP_UNREDEFINED_P(BOP_FREEZE, STRING_REDEFINED_OP_FLAG)) {
|
1439
1494
|
val = str;
|
1440
1495
|
}
|
@@ -1442,7 +1497,7 @@ INSN_ENTRY(opt_str_freeze){
|
|
1442
1497
|
val = rb_funcall(rb_str_resurrect(str), idFreeze, 0);
|
1443
1498
|
}
|
1444
1499
|
|
1445
|
-
#line
|
1500
|
+
#line 1501 "vm.inc"
|
1446
1501
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
1447
1502
|
PUSH(val);
|
1448
1503
|
#undef CURRENT_INSN_opt_str_freeze
|
@@ -1450,116 +1505,13 @@ INSN_ENTRY(opt_str_freeze){
|
|
1450
1505
|
#undef INSN_LABEL
|
1451
1506
|
#undef LABEL_IS_SC
|
1452
1507
|
END_INSN(opt_str_freeze);}}}
|
1453
|
-
INSN_ENTRY(opt_newarray_max){
|
1454
|
-
{
|
1455
|
-
VALUE val;
|
1456
|
-
rb_num_t num = (rb_num_t)GET_OPERAND(1);
|
1457
|
-
|
1458
|
-
DEBUG_ENTER_INSN("opt_newarray_max");
|
1459
|
-
ADD_PC(1+1);
|
1460
|
-
PREFETCH(GET_PC());
|
1461
|
-
#define CURRENT_INSN_opt_newarray_max 1
|
1462
|
-
#define INSN_IS_SC() 0
|
1463
|
-
#define INSN_LABEL(lab) LABEL_opt_newarray_max_##lab
|
1464
|
-
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
1465
|
-
COLLECT_USAGE_INSN(BIN(opt_newarray_max));
|
1466
|
-
COLLECT_USAGE_OPERAND(BIN(opt_newarray_max), 0, num);
|
1467
|
-
{
|
1468
|
-
#line 990 "insns.def"
|
1469
|
-
#define id_cmp idCmp
|
1470
|
-
if (BASIC_OP_UNREDEFINED_P(BOP_MAX, ARRAY_REDEFINED_OP_FLAG)) {
|
1471
|
-
if (num == 0) {
|
1472
|
-
val = Qnil;
|
1473
|
-
}
|
1474
|
-
else {
|
1475
|
-
struct cmp_opt_data cmp_opt = { 0, 0 };
|
1476
|
-
VALUE result = Qundef;
|
1477
|
-
rb_num_t i = num - 1;
|
1478
|
-
result = TOPN(i);
|
1479
|
-
while (i-- > 0) {
|
1480
|
-
const VALUE v = TOPN(i);
|
1481
|
-
if (result == Qundef || OPTIMIZED_CMP(v, result, cmp_opt) > 0) {
|
1482
|
-
result = v;
|
1483
|
-
}
|
1484
|
-
}
|
1485
|
-
val = result == Qundef ? Qnil : result;
|
1486
|
-
}
|
1487
|
-
POPN(num);
|
1488
|
-
}
|
1489
|
-
else {
|
1490
|
-
VALUE ary = rb_ary_new4((long)num, STACK_ADDR_FROM_TOP(num));
|
1491
|
-
val = rb_funcall(ary, idMax, 0);
|
1492
|
-
POPN(num);
|
1493
|
-
}
|
1494
|
-
#undef id_cmp
|
1495
|
-
|
1496
|
-
#line 1497 "vm.inc"
|
1497
|
-
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
1498
|
-
PUSH(val);
|
1499
|
-
#undef CURRENT_INSN_opt_newarray_max
|
1500
|
-
#undef INSN_IS_SC
|
1501
|
-
#undef INSN_LABEL
|
1502
|
-
#undef LABEL_IS_SC
|
1503
|
-
END_INSN(opt_newarray_max);}}}
|
1504
|
-
INSN_ENTRY(opt_newarray_min){
|
1505
|
-
{
|
1506
|
-
VALUE val;
|
1507
|
-
rb_num_t num = (rb_num_t)GET_OPERAND(1);
|
1508
|
-
|
1509
|
-
DEBUG_ENTER_INSN("opt_newarray_min");
|
1510
|
-
ADD_PC(1+1);
|
1511
|
-
PREFETCH(GET_PC());
|
1512
|
-
#define CURRENT_INSN_opt_newarray_min 1
|
1513
|
-
#define INSN_IS_SC() 0
|
1514
|
-
#define INSN_LABEL(lab) LABEL_opt_newarray_min_##lab
|
1515
|
-
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
1516
|
-
COLLECT_USAGE_INSN(BIN(opt_newarray_min));
|
1517
|
-
COLLECT_USAGE_OPERAND(BIN(opt_newarray_min), 0, num);
|
1518
|
-
{
|
1519
|
-
#line 1024 "insns.def"
|
1520
|
-
#define id_cmp idCmp
|
1521
|
-
if (BASIC_OP_UNREDEFINED_P(BOP_MIN, ARRAY_REDEFINED_OP_FLAG)) {
|
1522
|
-
if (num == 0) {
|
1523
|
-
val = Qnil;
|
1524
|
-
}
|
1525
|
-
else {
|
1526
|
-
struct cmp_opt_data cmp_opt = { 0, 0 };
|
1527
|
-
VALUE result = Qundef;
|
1528
|
-
rb_num_t i = num - 1;
|
1529
|
-
result = TOPN(i);
|
1530
|
-
while (i-- > 0) {
|
1531
|
-
const VALUE v = TOPN(i);
|
1532
|
-
if (result == Qundef || OPTIMIZED_CMP(v, result, cmp_opt) < 0) {
|
1533
|
-
result = v;
|
1534
|
-
}
|
1535
|
-
}
|
1536
|
-
val = result == Qundef ? Qnil : result;
|
1537
|
-
}
|
1538
|
-
POPN(num);
|
1539
|
-
}
|
1540
|
-
else {
|
1541
|
-
VALUE ary = rb_ary_new4((long)num, STACK_ADDR_FROM_TOP(num));
|
1542
|
-
val = rb_funcall(ary, idMin, 0);
|
1543
|
-
POPN(num);
|
1544
|
-
}
|
1545
|
-
#undef id_cmp
|
1546
|
-
|
1547
|
-
#line 1548 "vm.inc"
|
1548
|
-
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
1549
|
-
PUSH(val);
|
1550
|
-
#undef CURRENT_INSN_opt_newarray_min
|
1551
|
-
#undef INSN_IS_SC
|
1552
|
-
#undef INSN_LABEL
|
1553
|
-
#undef LABEL_IS_SC
|
1554
|
-
END_INSN(opt_newarray_min);}}}
|
1555
1508
|
INSN_ENTRY(opt_send_without_block){
|
1556
1509
|
{
|
1557
1510
|
VALUE val;
|
1558
|
-
CALL_CACHE cc = (CALL_CACHE)GET_OPERAND(2);
|
1559
1511
|
CALL_INFO ci = (CALL_INFO)GET_OPERAND(1);
|
1560
1512
|
|
1561
1513
|
DEBUG_ENTER_INSN("opt_send_without_block");
|
1562
|
-
ADD_PC(1+
|
1514
|
+
ADD_PC(1+1);
|
1563
1515
|
PREFETCH(GET_PC());
|
1564
1516
|
#define CURRENT_INSN_opt_send_without_block 1
|
1565
1517
|
#define INSN_IS_SC() 0
|
@@ -1567,15 +1519,13 @@ INSN_ENTRY(opt_send_without_block){
|
|
1567
1519
|
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
1568
1520
|
COLLECT_USAGE_INSN(BIN(opt_send_without_block));
|
1569
1521
|
COLLECT_USAGE_OPERAND(BIN(opt_send_without_block), 0, ci);
|
1570
|
-
COLLECT_USAGE_OPERAND(BIN(opt_send_without_block), 1, cc);
|
1571
1522
|
{
|
1572
|
-
#line
|
1573
|
-
|
1574
|
-
|
1575
|
-
|
1576
|
-
CALL_METHOD(&calling, ci, cc);
|
1523
|
+
#line 1067 "insns.def"
|
1524
|
+
ci->argc = ci->orig_argc;
|
1525
|
+
vm_search_method(ci, ci->recv = TOPN(ci->argc));
|
1526
|
+
CALL_METHOD(ci);
|
1577
1527
|
|
1578
|
-
#line
|
1528
|
+
#line 1529 "vm.inc"
|
1579
1529
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
1580
1530
|
PUSH(val);
|
1581
1531
|
#undef CURRENT_INSN_opt_send_without_block
|
@@ -1586,12 +1536,10 @@ INSN_ENTRY(opt_send_without_block){
|
|
1586
1536
|
INSN_ENTRY(invokesuper){
|
1587
1537
|
{
|
1588
1538
|
VALUE val;
|
1589
|
-
ISEQ blockiseq = (ISEQ)GET_OPERAND(3);
|
1590
|
-
CALL_CACHE cc = (CALL_CACHE)GET_OPERAND(2);
|
1591
1539
|
CALL_INFO ci = (CALL_INFO)GET_OPERAND(1);
|
1592
1540
|
|
1593
1541
|
DEBUG_ENTER_INSN("invokesuper");
|
1594
|
-
ADD_PC(1+
|
1542
|
+
ADD_PC(1+1);
|
1595
1543
|
PREFETCH(GET_PC());
|
1596
1544
|
#define CURRENT_INSN_invokesuper 1
|
1597
1545
|
#define INSN_IS_SC() 0
|
@@ -1599,19 +1547,15 @@ INSN_ENTRY(invokesuper){
|
|
1599
1547
|
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
1600
1548
|
COLLECT_USAGE_INSN(BIN(invokesuper));
|
1601
1549
|
COLLECT_USAGE_OPERAND(BIN(invokesuper), 0, ci);
|
1602
|
-
COLLECT_USAGE_OPERAND(BIN(invokesuper), 1, cc);
|
1603
|
-
COLLECT_USAGE_OPERAND(BIN(invokesuper), 2, blockiseq);
|
1604
1550
|
{
|
1605
|
-
#line
|
1606
|
-
|
1607
|
-
|
1608
|
-
|
1609
|
-
|
1610
|
-
|
1611
|
-
vm_search_super_method(th, GET_CFP(), &calling, ci, cc);
|
1612
|
-
CALL_METHOD(&calling, ci, cc);
|
1551
|
+
#line 1083 "insns.def"
|
1552
|
+
ci->argc = ci->orig_argc;
|
1553
|
+
vm_caller_setup_arg_block(th, reg_cfp, ci, TRUE);
|
1554
|
+
ci->recv = GET_SELF();
|
1555
|
+
vm_search_super_method(th, GET_CFP(), ci);
|
1556
|
+
CALL_METHOD(ci);
|
1613
1557
|
|
1614
|
-
#line
|
1558
|
+
#line 1559 "vm.inc"
|
1615
1559
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
1616
1560
|
PUSH(val);
|
1617
1561
|
#undef CURRENT_INSN_invokesuper
|
@@ -1634,19 +1578,17 @@ INSN_ENTRY(invokeblock){
|
|
1634
1578
|
COLLECT_USAGE_INSN(BIN(invokeblock));
|
1635
1579
|
COLLECT_USAGE_OPERAND(BIN(invokeblock), 0, ci);
|
1636
1580
|
{
|
1637
|
-
#line
|
1638
|
-
|
1639
|
-
|
1640
|
-
|
1641
|
-
|
1642
|
-
|
1643
|
-
val = vm_invoke_block(th, GET_CFP(), &calling, ci);
|
1581
|
+
#line 1101 "insns.def"
|
1582
|
+
ci->argc = ci->orig_argc;
|
1583
|
+
ci->blockptr = 0;
|
1584
|
+
ci->recv = GET_SELF();
|
1585
|
+
val = vm_invoke_block(th, GET_CFP(), ci);
|
1644
1586
|
if (val == Qundef) {
|
1645
1587
|
RESTORE_REGS();
|
1646
1588
|
NEXT_INSN();
|
1647
1589
|
}
|
1648
1590
|
|
1649
|
-
#line
|
1591
|
+
#line 1592 "vm.inc"
|
1650
1592
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
1651
1593
|
PUSH(val);
|
1652
1594
|
#undef CURRENT_INSN_invokeblock
|
@@ -1668,18 +1610,19 @@ INSN_ENTRY(leave){
|
|
1668
1610
|
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
1669
1611
|
COLLECT_USAGE_INSN(BIN(leave));
|
1670
1612
|
{
|
1671
|
-
#line
|
1613
|
+
#line 1122 "insns.def"
|
1672
1614
|
if (OPT_CHECKED_RUN) {
|
1673
|
-
|
1674
|
-
if (reg_cfp->sp != bp) {
|
1615
|
+
if (reg_cfp->sp != vm_base_ptr(reg_cfp)) {
|
1675
1616
|
rb_bug("Stack consistency error (sp: %"PRIdPTRDIFF", bp: %"PRIdPTRDIFF")",
|
1676
|
-
VM_SP_CNT(th, reg_cfp->sp), VM_SP_CNT(th,
|
1617
|
+
VM_SP_CNT(th, reg_cfp->sp), VM_SP_CNT(th, vm_base_ptr(reg_cfp)));
|
1677
1618
|
}
|
1678
1619
|
}
|
1679
1620
|
|
1680
1621
|
RUBY_VM_CHECK_INTS(th);
|
1681
1622
|
|
1682
|
-
if (
|
1623
|
+
if (UNLIKELY(VM_FRAME_TYPE_FINISH_P(GET_CFP()))) {
|
1624
|
+
vm_pop_frame(th);
|
1625
|
+
|
1683
1626
|
#if OPT_CALL_THREADED_CODE
|
1684
1627
|
th->retval = val;
|
1685
1628
|
return 0;
|
@@ -1688,10 +1631,11 @@ INSN_ENTRY(leave){
|
|
1688
1631
|
#endif
|
1689
1632
|
}
|
1690
1633
|
else {
|
1634
|
+
vm_pop_frame(th);
|
1691
1635
|
RESTORE_REGS();
|
1692
1636
|
}
|
1693
1637
|
|
1694
|
-
#line
|
1638
|
+
#line 1639 "vm.inc"
|
1695
1639
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
1696
1640
|
PUSH(val);
|
1697
1641
|
#undef CURRENT_INSN_leave
|
@@ -1715,13 +1659,13 @@ INSN_ENTRY(throw){
|
|
1715
1659
|
COLLECT_USAGE_INSN(BIN(throw));
|
1716
1660
|
COLLECT_USAGE_OPERAND(BIN(throw), 0, throw_state);
|
1717
1661
|
{
|
1718
|
-
#line
|
1662
|
+
#line 1162 "insns.def"
|
1719
1663
|
RUBY_VM_CHECK_INTS(th);
|
1720
1664
|
val = vm_throw(th, GET_CFP(), throw_state, throwobj);
|
1721
1665
|
THROW_EXCEPTION(val);
|
1722
1666
|
/* unreachable */
|
1723
1667
|
|
1724
|
-
#line
|
1668
|
+
#line 1669 "vm.inc"
|
1725
1669
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
1726
1670
|
PUSH(val);
|
1727
1671
|
#undef CURRENT_INSN_throw
|
@@ -1743,11 +1687,11 @@ INSN_ENTRY(jump){
|
|
1743
1687
|
COLLECT_USAGE_INSN(BIN(jump));
|
1744
1688
|
COLLECT_USAGE_OPERAND(BIN(jump), 0, dst);
|
1745
1689
|
{
|
1746
|
-
#line
|
1690
|
+
#line 1183 "insns.def"
|
1747
1691
|
RUBY_VM_CHECK_INTS(th);
|
1748
1692
|
JUMP(dst);
|
1749
1693
|
|
1750
|
-
#line
|
1694
|
+
#line 1695 "vm.inc"
|
1751
1695
|
#undef CURRENT_INSN_jump
|
1752
1696
|
#undef INSN_IS_SC
|
1753
1697
|
#undef INSN_LABEL
|
@@ -1768,13 +1712,13 @@ INSN_ENTRY(branchif){
|
|
1768
1712
|
COLLECT_USAGE_INSN(BIN(branchif));
|
1769
1713
|
COLLECT_USAGE_OPERAND(BIN(branchif), 0, dst);
|
1770
1714
|
{
|
1771
|
-
#line
|
1715
|
+
#line 1198 "insns.def"
|
1772
1716
|
if (RTEST(val)) {
|
1773
1717
|
RUBY_VM_CHECK_INTS(th);
|
1774
1718
|
JUMP(dst);
|
1775
1719
|
}
|
1776
1720
|
|
1777
|
-
#line
|
1721
|
+
#line 1722 "vm.inc"
|
1778
1722
|
#undef CURRENT_INSN_branchif
|
1779
1723
|
#undef INSN_IS_SC
|
1780
1724
|
#undef INSN_LABEL
|
@@ -1795,45 +1739,18 @@ INSN_ENTRY(branchunless){
|
|
1795
1739
|
COLLECT_USAGE_INSN(BIN(branchunless));
|
1796
1740
|
COLLECT_USAGE_OPERAND(BIN(branchunless), 0, dst);
|
1797
1741
|
{
|
1798
|
-
#line
|
1742
|
+
#line 1215 "insns.def"
|
1799
1743
|
if (!RTEST(val)) {
|
1800
1744
|
RUBY_VM_CHECK_INTS(th);
|
1801
1745
|
JUMP(dst);
|
1802
1746
|
}
|
1803
1747
|
|
1804
|
-
#line
|
1748
|
+
#line 1749 "vm.inc"
|
1805
1749
|
#undef CURRENT_INSN_branchunless
|
1806
1750
|
#undef INSN_IS_SC
|
1807
1751
|
#undef INSN_LABEL
|
1808
1752
|
#undef LABEL_IS_SC
|
1809
1753
|
END_INSN(branchunless);}}}
|
1810
|
-
INSN_ENTRY(branchnil){
|
1811
|
-
{
|
1812
|
-
OFFSET dst = (OFFSET)GET_OPERAND(1);
|
1813
|
-
VALUE val = TOPN(0);
|
1814
|
-
DEBUG_ENTER_INSN("branchnil");
|
1815
|
-
ADD_PC(1+1);
|
1816
|
-
PREFETCH(GET_PC());
|
1817
|
-
POPN(1);
|
1818
|
-
#define CURRENT_INSN_branchnil 1
|
1819
|
-
#define INSN_IS_SC() 0
|
1820
|
-
#define INSN_LABEL(lab) LABEL_branchnil_##lab
|
1821
|
-
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
1822
|
-
COLLECT_USAGE_INSN(BIN(branchnil));
|
1823
|
-
COLLECT_USAGE_OPERAND(BIN(branchnil), 0, dst);
|
1824
|
-
{
|
1825
|
-
#line 1231 "insns.def"
|
1826
|
-
if (NIL_P(val)) {
|
1827
|
-
RUBY_VM_CHECK_INTS(th);
|
1828
|
-
JUMP(dst);
|
1829
|
-
}
|
1830
|
-
|
1831
|
-
#line 1832 "vm.inc"
|
1832
|
-
#undef CURRENT_INSN_branchnil
|
1833
|
-
#undef INSN_IS_SC
|
1834
|
-
#undef INSN_LABEL
|
1835
|
-
#undef LABEL_IS_SC
|
1836
|
-
END_INSN(branchnil);}}}
|
1837
1754
|
INSN_ENTRY(getinlinecache){
|
1838
1755
|
{
|
1839
1756
|
VALUE val;
|
@@ -1851,9 +1768,8 @@ INSN_ENTRY(getinlinecache){
|
|
1851
1768
|
COLLECT_USAGE_OPERAND(BIN(getinlinecache), 0, dst);
|
1852
1769
|
COLLECT_USAGE_OPERAND(BIN(getinlinecache), 1, ic);
|
1853
1770
|
{
|
1854
|
-
#line
|
1855
|
-
if (ic->ic_serial == GET_GLOBAL_CONSTANT_STATE()
|
1856
|
-
(ic->ic_cref == NULL || ic->ic_cref == rb_vm_get_cref(GET_EP()))) {
|
1771
|
+
#line 1237 "insns.def"
|
1772
|
+
if (ic->ic_serial == GET_GLOBAL_CONSTANT_STATE()) {
|
1857
1773
|
val = ic->ic_value.value;
|
1858
1774
|
JUMP(dst);
|
1859
1775
|
}
|
@@ -1862,7 +1778,7 @@ INSN_ENTRY(getinlinecache){
|
|
1862
1778
|
val = Qnil;
|
1863
1779
|
}
|
1864
1780
|
|
1865
|
-
#line
|
1781
|
+
#line 1782 "vm.inc"
|
1866
1782
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
1867
1783
|
PUSH(val);
|
1868
1784
|
#undef CURRENT_INSN_getinlinecache
|
@@ -1885,14 +1801,15 @@ INSN_ENTRY(setinlinecache){
|
|
1885
1801
|
COLLECT_USAGE_INSN(BIN(setinlinecache));
|
1886
1802
|
COLLECT_USAGE_OPERAND(BIN(setinlinecache), 0, ic);
|
1887
1803
|
{
|
1888
|
-
#line
|
1889
|
-
|
1804
|
+
#line 1258 "insns.def"
|
1805
|
+
if (ic->ic_value.value == Qundef) {
|
1806
|
+
rb_iseq_add_mark_object(GET_ISEQ(), val);
|
1807
|
+
}
|
1890
1808
|
ic->ic_value.value = val;
|
1891
1809
|
ic->ic_serial = GET_GLOBAL_CONSTANT_STATE() - ruby_vm_const_missing_count;
|
1892
|
-
ic->ic_cref = vm_get_const_key_cref(GET_EP());
|
1893
1810
|
ruby_vm_const_missing_count = 0;
|
1894
1811
|
|
1895
|
-
#line
|
1812
|
+
#line 1813 "vm.inc"
|
1896
1813
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
1897
1814
|
PUSH(val);
|
1898
1815
|
#undef CURRENT_INSN_setinlinecache
|
@@ -1917,7 +1834,7 @@ INSN_ENTRY(once){
|
|
1917
1834
|
COLLECT_USAGE_OPERAND(BIN(once), 0, iseq);
|
1918
1835
|
COLLECT_USAGE_OPERAND(BIN(once), 1, ic);
|
1919
1836
|
{
|
1920
|
-
#line
|
1837
|
+
#line 1277 "insns.def"
|
1921
1838
|
union iseq_inline_storage_entry *is = (union iseq_inline_storage_entry *)ic;
|
1922
1839
|
|
1923
1840
|
#define RUNNING_THREAD_ONCE_DONE ((rb_thread_t *)(0x1))
|
@@ -1943,7 +1860,7 @@ INSN_ENTRY(once){
|
|
1943
1860
|
goto retry;
|
1944
1861
|
}
|
1945
1862
|
|
1946
|
-
#line
|
1863
|
+
#line 1864 "vm.inc"
|
1947
1864
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
1948
1865
|
PUSH(val);
|
1949
1866
|
#undef CURRENT_INSN_once
|
@@ -1968,7 +1885,7 @@ INSN_ENTRY(opt_case_dispatch){
|
|
1968
1885
|
COLLECT_USAGE_OPERAND(BIN(opt_case_dispatch), 0, hash);
|
1969
1886
|
COLLECT_USAGE_OPERAND(BIN(opt_case_dispatch), 1, else_offset);
|
1970
1887
|
{
|
1971
|
-
#line
|
1888
|
+
#line 1314 "insns.def"
|
1972
1889
|
switch(TYPE(key)) {
|
1973
1890
|
case T_FLOAT: {
|
1974
1891
|
double ival;
|
@@ -1976,20 +1893,15 @@ INSN_ENTRY(opt_case_dispatch){
|
|
1976
1893
|
key = FIXABLE(ival) ? LONG2FIX((long)ival) : rb_dbl2big(ival);
|
1977
1894
|
}
|
1978
1895
|
}
|
1979
|
-
case
|
1980
|
-
case T_FALSE:
|
1981
|
-
case T_NIL:
|
1982
|
-
case T_SYMBOL:
|
1896
|
+
case T_SYMBOL: /* fall through */
|
1983
1897
|
case T_FIXNUM:
|
1984
1898
|
case T_BIGNUM:
|
1985
1899
|
case T_STRING:
|
1986
1900
|
if (BASIC_OP_UNREDEFINED_P(BOP_EQQ,
|
1987
1901
|
SYMBOL_REDEFINED_OP_FLAG |
|
1988
|
-
|
1902
|
+
FIXNUM_REDEFINED_OP_FLAG |
|
1989
1903
|
FLOAT_REDEFINED_OP_FLAG |
|
1990
|
-
|
1991
|
-
TRUE_REDEFINED_OP_FLAG |
|
1992
|
-
FALSE_REDEFINED_OP_FLAG |
|
1904
|
+
BIGNUM_REDEFINED_OP_FLAG |
|
1993
1905
|
STRING_REDEFINED_OP_FLAG)) {
|
1994
1906
|
st_data_t val;
|
1995
1907
|
if (st_lookup(RHASH_TBL_RAW(hash), key, &val)) {
|
@@ -2004,7 +1916,7 @@ INSN_ENTRY(opt_case_dispatch){
|
|
2004
1916
|
break;
|
2005
1917
|
}
|
2006
1918
|
|
2007
|
-
#line
|
1919
|
+
#line 1920 "vm.inc"
|
2008
1920
|
#undef CURRENT_INSN_opt_case_dispatch
|
2009
1921
|
#undef INSN_IS_SC
|
2010
1922
|
#undef INSN_LABEL
|
@@ -2013,12 +1925,11 @@ INSN_ENTRY(opt_case_dispatch){
|
|
2013
1925
|
INSN_ENTRY(opt_plus){
|
2014
1926
|
{
|
2015
1927
|
VALUE val;
|
2016
|
-
CALL_CACHE cc = (CALL_CACHE)GET_OPERAND(2);
|
2017
1928
|
CALL_INFO ci = (CALL_INFO)GET_OPERAND(1);
|
2018
1929
|
VALUE recv = TOPN(1);
|
2019
1930
|
VALUE obj = TOPN(0);
|
2020
1931
|
DEBUG_ENTER_INSN("opt_plus");
|
2021
|
-
ADD_PC(1+
|
1932
|
+
ADD_PC(1+1);
|
2022
1933
|
PREFETCH(GET_PC());
|
2023
1934
|
POPN(2);
|
2024
1935
|
#define CURRENT_INSN_opt_plus 1
|
@@ -2027,20 +1938,29 @@ INSN_ENTRY(opt_plus){
|
|
2027
1938
|
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
2028
1939
|
COLLECT_USAGE_INSN(BIN(opt_plus));
|
2029
1940
|
COLLECT_USAGE_OPERAND(BIN(opt_plus), 0, ci);
|
2030
|
-
COLLECT_USAGE_OPERAND(BIN(opt_plus), 1, cc);
|
2031
1941
|
{
|
2032
|
-
#line
|
1942
|
+
#line 1358 "insns.def"
|
2033
1943
|
if (FIXNUM_2_P(recv, obj) &&
|
2034
|
-
BASIC_OP_UNREDEFINED_P(BOP_PLUS,
|
1944
|
+
BASIC_OP_UNREDEFINED_P(BOP_PLUS,FIXNUM_REDEFINED_OP_FLAG)) {
|
2035
1945
|
/* fixnum + fixnum */
|
2036
1946
|
#ifndef LONG_LONG_VALUE
|
2037
|
-
|
2038
|
-
|
2039
|
-
|
2040
|
-
val = rb_int2big((
|
1947
|
+
val = (recv + (obj & (~1)));
|
1948
|
+
if ((~(recv ^ obj) & (recv ^ val)) &
|
1949
|
+
((VALUE)0x01 << ((sizeof(VALUE) * CHAR_BIT) - 1))) {
|
1950
|
+
val = rb_big_plus(rb_int2big(FIX2LONG(recv)),
|
1951
|
+
rb_int2big(FIX2LONG(obj)));
|
2041
1952
|
}
|
2042
1953
|
#else
|
2043
|
-
|
1954
|
+
long a, b, c;
|
1955
|
+
a = FIX2LONG(recv);
|
1956
|
+
b = FIX2LONG(obj);
|
1957
|
+
c = a + b;
|
1958
|
+
if (FIXABLE(c)) {
|
1959
|
+
val = LONG2FIX(c);
|
1960
|
+
}
|
1961
|
+
else {
|
1962
|
+
val = rb_big_plus(rb_int2big(a), rb_int2big(b));
|
1963
|
+
}
|
2044
1964
|
#endif
|
2045
1965
|
}
|
2046
1966
|
else if (FLONUM_2_P(recv, obj) &&
|
@@ -2071,7 +1991,7 @@ INSN_ENTRY(opt_plus){
|
|
2071
1991
|
CALL_SIMPLE_METHOD(recv);
|
2072
1992
|
}
|
2073
1993
|
|
2074
|
-
#line
|
1994
|
+
#line 1995 "vm.inc"
|
2075
1995
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
2076
1996
|
PUSH(val);
|
2077
1997
|
#undef CURRENT_INSN_opt_plus
|
@@ -2082,12 +2002,11 @@ INSN_ENTRY(opt_plus){
|
|
2082
2002
|
INSN_ENTRY(opt_minus){
|
2083
2003
|
{
|
2084
2004
|
VALUE val;
|
2085
|
-
CALL_CACHE cc = (CALL_CACHE)GET_OPERAND(2);
|
2086
2005
|
CALL_INFO ci = (CALL_INFO)GET_OPERAND(1);
|
2087
2006
|
VALUE recv = TOPN(1);
|
2088
2007
|
VALUE obj = TOPN(0);
|
2089
2008
|
DEBUG_ENTER_INSN("opt_minus");
|
2090
|
-
ADD_PC(1+
|
2009
|
+
ADD_PC(1+1);
|
2091
2010
|
PREFETCH(GET_PC());
|
2092
2011
|
POPN(2);
|
2093
2012
|
#define CURRENT_INSN_opt_minus 1
|
@@ -2096,17 +2015,22 @@ INSN_ENTRY(opt_minus){
|
|
2096
2015
|
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
2097
2016
|
COLLECT_USAGE_INSN(BIN(opt_minus));
|
2098
2017
|
COLLECT_USAGE_OPERAND(BIN(opt_minus), 0, ci);
|
2099
|
-
COLLECT_USAGE_OPERAND(BIN(opt_minus), 1, cc);
|
2100
2018
|
{
|
2101
|
-
#line
|
2019
|
+
#line 1421 "insns.def"
|
2102
2020
|
if (FIXNUM_2_P(recv, obj) &&
|
2103
|
-
BASIC_OP_UNREDEFINED_P(BOP_MINUS,
|
2021
|
+
BASIC_OP_UNREDEFINED_P(BOP_MINUS, FIXNUM_REDEFINED_OP_FLAG)) {
|
2104
2022
|
long a, b, c;
|
2105
2023
|
|
2106
2024
|
a = FIX2LONG(recv);
|
2107
2025
|
b = FIX2LONG(obj);
|
2108
2026
|
c = a - b;
|
2109
|
-
|
2027
|
+
|
2028
|
+
if (FIXABLE(c)) {
|
2029
|
+
val = LONG2FIX(c);
|
2030
|
+
}
|
2031
|
+
else {
|
2032
|
+
val = rb_big_minus(rb_int2big(a), rb_int2big(b));
|
2033
|
+
}
|
2110
2034
|
}
|
2111
2035
|
else if (FLONUM_2_P(recv, obj) &&
|
2112
2036
|
BASIC_OP_UNREDEFINED_P(BOP_MINUS, FLOAT_REDEFINED_OP_FLAG)) {
|
@@ -2129,7 +2053,7 @@ INSN_ENTRY(opt_minus){
|
|
2129
2053
|
CALL_SIMPLE_METHOD(recv);
|
2130
2054
|
}
|
2131
2055
|
|
2132
|
-
#line
|
2056
|
+
#line 2057 "vm.inc"
|
2133
2057
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
2134
2058
|
PUSH(val);
|
2135
2059
|
#undef CURRENT_INSN_opt_minus
|
@@ -2140,12 +2064,11 @@ INSN_ENTRY(opt_minus){
|
|
2140
2064
|
INSN_ENTRY(opt_mult){
|
2141
2065
|
{
|
2142
2066
|
VALUE val;
|
2143
|
-
CALL_CACHE cc = (CALL_CACHE)GET_OPERAND(2);
|
2144
2067
|
CALL_INFO ci = (CALL_INFO)GET_OPERAND(1);
|
2145
2068
|
VALUE recv = TOPN(1);
|
2146
2069
|
VALUE obj = TOPN(0);
|
2147
2070
|
DEBUG_ENTER_INSN("opt_mult");
|
2148
|
-
ADD_PC(1+
|
2071
|
+
ADD_PC(1+1);
|
2149
2072
|
PREFETCH(GET_PC());
|
2150
2073
|
POPN(2);
|
2151
2074
|
#define CURRENT_INSN_opt_mult 1
|
@@ -2154,12 +2077,25 @@ INSN_ENTRY(opt_mult){
|
|
2154
2077
|
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
2155
2078
|
COLLECT_USAGE_INSN(BIN(opt_mult));
|
2156
2079
|
COLLECT_USAGE_OPERAND(BIN(opt_mult), 0, ci);
|
2157
|
-
COLLECT_USAGE_OPERAND(BIN(opt_mult), 1, cc);
|
2158
2080
|
{
|
2159
|
-
#line
|
2081
|
+
#line 1469 "insns.def"
|
2160
2082
|
if (FIXNUM_2_P(recv, obj) &&
|
2161
|
-
BASIC_OP_UNREDEFINED_P(BOP_MULT,
|
2162
|
-
|
2083
|
+
BASIC_OP_UNREDEFINED_P(BOP_MULT, FIXNUM_REDEFINED_OP_FLAG)) {
|
2084
|
+
long a, b;
|
2085
|
+
|
2086
|
+
a = FIX2LONG(recv);
|
2087
|
+
if (a == 0) {
|
2088
|
+
val = recv;
|
2089
|
+
}
|
2090
|
+
else {
|
2091
|
+
b = FIX2LONG(obj);
|
2092
|
+
if (MUL_OVERFLOW_FIXNUM_P(a, b)) {
|
2093
|
+
val = rb_big_mul(rb_int2big(a), rb_int2big(b));
|
2094
|
+
}
|
2095
|
+
else {
|
2096
|
+
val = LONG2FIX(a * b);
|
2097
|
+
}
|
2098
|
+
}
|
2163
2099
|
}
|
2164
2100
|
else if (FLONUM_2_P(recv, obj) &&
|
2165
2101
|
BASIC_OP_UNREDEFINED_P(BOP_MULT, FLOAT_REDEFINED_OP_FLAG)) {
|
@@ -2181,7 +2117,7 @@ INSN_ENTRY(opt_mult){
|
|
2181
2117
|
CALL_SIMPLE_METHOD(recv);
|
2182
2118
|
}
|
2183
2119
|
|
2184
|
-
#line
|
2120
|
+
#line 2121 "vm.inc"
|
2185
2121
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
2186
2122
|
PUSH(val);
|
2187
2123
|
#undef CURRENT_INSN_opt_mult
|
@@ -2192,12 +2128,11 @@ INSN_ENTRY(opt_mult){
|
|
2192
2128
|
INSN_ENTRY(opt_div){
|
2193
2129
|
{
|
2194
2130
|
VALUE val;
|
2195
|
-
CALL_CACHE cc = (CALL_CACHE)GET_OPERAND(2);
|
2196
2131
|
CALL_INFO ci = (CALL_INFO)GET_OPERAND(1);
|
2197
2132
|
VALUE recv = TOPN(1);
|
2198
2133
|
VALUE obj = TOPN(0);
|
2199
2134
|
DEBUG_ENTER_INSN("opt_div");
|
2200
|
-
ADD_PC(1+
|
2135
|
+
ADD_PC(1+1);
|
2201
2136
|
PREFETCH(GET_PC());
|
2202
2137
|
POPN(2);
|
2203
2138
|
#define CURRENT_INSN_opt_div 1
|
@@ -2206,13 +2141,38 @@ INSN_ENTRY(opt_div){
|
|
2206
2141
|
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
2207
2142
|
COLLECT_USAGE_INSN(BIN(opt_div));
|
2208
2143
|
COLLECT_USAGE_OPERAND(BIN(opt_div), 0, ci);
|
2209
|
-
COLLECT_USAGE_OPERAND(BIN(opt_div), 1, cc);
|
2210
2144
|
{
|
2211
|
-
#line
|
2145
|
+
#line 1519 "insns.def"
|
2212
2146
|
if (FIXNUM_2_P(recv, obj) &&
|
2213
|
-
BASIC_OP_UNREDEFINED_P(BOP_DIV,
|
2214
|
-
|
2215
|
-
|
2147
|
+
BASIC_OP_UNREDEFINED_P(BOP_DIV, FIXNUM_REDEFINED_OP_FLAG)) {
|
2148
|
+
long x, y, div;
|
2149
|
+
|
2150
|
+
x = FIX2LONG(recv);
|
2151
|
+
y = FIX2LONG(obj);
|
2152
|
+
{
|
2153
|
+
/* copied from numeric.c#fixdivmod */
|
2154
|
+
long mod;
|
2155
|
+
if (y == 0)
|
2156
|
+
goto INSN_LABEL(normal_dispatch);
|
2157
|
+
if (y < 0) {
|
2158
|
+
if (x < 0)
|
2159
|
+
div = -x / -y;
|
2160
|
+
else
|
2161
|
+
div = -(x / -y);
|
2162
|
+
}
|
2163
|
+
else {
|
2164
|
+
if (x < 0)
|
2165
|
+
div = -(-x / y);
|
2166
|
+
else
|
2167
|
+
div = x / y;
|
2168
|
+
}
|
2169
|
+
mod = x - div * y;
|
2170
|
+
if ((mod < 0 && y > 0) || (mod > 0 && y < 0)) {
|
2171
|
+
mod += y;
|
2172
|
+
div -= 1;
|
2173
|
+
}
|
2174
|
+
}
|
2175
|
+
val = LONG2NUM(div);
|
2216
2176
|
}
|
2217
2177
|
else if (FLONUM_2_P(recv, obj) &&
|
2218
2178
|
BASIC_OP_UNREDEFINED_P(BOP_DIV, FLOAT_REDEFINED_OP_FLAG)) {
|
@@ -2234,7 +2194,7 @@ INSN_ENTRY(opt_div){
|
|
2234
2194
|
CALL_SIMPLE_METHOD(recv);
|
2235
2195
|
}
|
2236
2196
|
|
2237
|
-
#line
|
2197
|
+
#line 2198 "vm.inc"
|
2238
2198
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
2239
2199
|
PUSH(val);
|
2240
2200
|
#undef CURRENT_INSN_opt_div
|
@@ -2245,12 +2205,11 @@ INSN_ENTRY(opt_div){
|
|
2245
2205
|
INSN_ENTRY(opt_mod){
|
2246
2206
|
{
|
2247
2207
|
VALUE val;
|
2248
|
-
CALL_CACHE cc = (CALL_CACHE)GET_OPERAND(2);
|
2249
2208
|
CALL_INFO ci = (CALL_INFO)GET_OPERAND(1);
|
2250
2209
|
VALUE recv = TOPN(1);
|
2251
2210
|
VALUE obj = TOPN(0);
|
2252
2211
|
DEBUG_ENTER_INSN("opt_mod");
|
2253
|
-
ADD_PC(1+
|
2212
|
+
ADD_PC(1+1);
|
2254
2213
|
PREFETCH(GET_PC());
|
2255
2214
|
POPN(2);
|
2256
2215
|
#define CURRENT_INSN_opt_mod 1
|
@@ -2259,13 +2218,42 @@ INSN_ENTRY(opt_mod){
|
|
2259
2218
|
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
2260
2219
|
COLLECT_USAGE_INSN(BIN(opt_mod));
|
2261
2220
|
COLLECT_USAGE_OPERAND(BIN(opt_mod), 0, ci);
|
2262
|
-
COLLECT_USAGE_OPERAND(BIN(opt_mod), 1, cc);
|
2263
2221
|
{
|
2264
|
-
#line
|
2222
|
+
#line 1582 "insns.def"
|
2265
2223
|
if (FIXNUM_2_P(recv, obj) &&
|
2266
|
-
BASIC_OP_UNREDEFINED_P(BOP_MOD,
|
2267
|
-
|
2268
|
-
|
2224
|
+
BASIC_OP_UNREDEFINED_P(BOP_MOD, FIXNUM_REDEFINED_OP_FLAG )) {
|
2225
|
+
long x, y;
|
2226
|
+
|
2227
|
+
x = FIX2LONG(recv);
|
2228
|
+
y = FIX2LONG(obj);
|
2229
|
+
if (x > 0 && y > 0) {
|
2230
|
+
val = LONG2FIX(x % y);
|
2231
|
+
}
|
2232
|
+
else {
|
2233
|
+
/* copied from numeric.c#fixdivmod */
|
2234
|
+
long div, mod;
|
2235
|
+
|
2236
|
+
if (y == 0)
|
2237
|
+
goto INSN_LABEL(normal_dispatch);
|
2238
|
+
if (y < 0) {
|
2239
|
+
if (x < 0)
|
2240
|
+
div = -x / -y;
|
2241
|
+
else
|
2242
|
+
div = -(x / -y);
|
2243
|
+
}
|
2244
|
+
else {
|
2245
|
+
if (x < 0)
|
2246
|
+
div = -(-x / y);
|
2247
|
+
else
|
2248
|
+
div = x / y;
|
2249
|
+
}
|
2250
|
+
mod = x - div * y;
|
2251
|
+
if ((mod < 0 && y > 0) || (mod > 0 && y < 0)) {
|
2252
|
+
mod += y;
|
2253
|
+
div -= 1;
|
2254
|
+
}
|
2255
|
+
val = LONG2FIX(mod);
|
2256
|
+
}
|
2269
2257
|
}
|
2270
2258
|
else if (FLONUM_2_P(recv, obj) &&
|
2271
2259
|
BASIC_OP_UNREDEFINED_P(BOP_MOD, FLOAT_REDEFINED_OP_FLAG)) {
|
@@ -2287,7 +2275,7 @@ INSN_ENTRY(opt_mod){
|
|
2287
2275
|
CALL_SIMPLE_METHOD(recv);
|
2288
2276
|
}
|
2289
2277
|
|
2290
|
-
#line
|
2278
|
+
#line 2279 "vm.inc"
|
2291
2279
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
2292
2280
|
PUSH(val);
|
2293
2281
|
#undef CURRENT_INSN_opt_mod
|
@@ -2298,12 +2286,11 @@ INSN_ENTRY(opt_mod){
|
|
2298
2286
|
INSN_ENTRY(opt_eq){
|
2299
2287
|
{
|
2300
2288
|
VALUE val;
|
2301
|
-
CALL_CACHE cc = (CALL_CACHE)GET_OPERAND(2);
|
2302
2289
|
CALL_INFO ci = (CALL_INFO)GET_OPERAND(1);
|
2303
2290
|
VALUE recv = TOPN(1);
|
2304
2291
|
VALUE obj = TOPN(0);
|
2305
2292
|
DEBUG_ENTER_INSN("opt_eq");
|
2306
|
-
ADD_PC(1+
|
2293
|
+
ADD_PC(1+1);
|
2307
2294
|
PREFETCH(GET_PC());
|
2308
2295
|
POPN(2);
|
2309
2296
|
#define CURRENT_INSN_opt_eq 1
|
@@ -2312,10 +2299,9 @@ INSN_ENTRY(opt_eq){
|
|
2312
2299
|
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
2313
2300
|
COLLECT_USAGE_INSN(BIN(opt_eq));
|
2314
2301
|
COLLECT_USAGE_OPERAND(BIN(opt_eq), 0, ci);
|
2315
|
-
COLLECT_USAGE_OPERAND(BIN(opt_eq), 1, cc);
|
2316
2302
|
{
|
2317
|
-
#line
|
2318
|
-
val = opt_eq_func(recv, obj, ci
|
2303
|
+
#line 1649 "insns.def"
|
2304
|
+
val = opt_eq_func(recv, obj, ci);
|
2319
2305
|
|
2320
2306
|
if (val == Qundef) {
|
2321
2307
|
/* other */
|
@@ -2324,7 +2310,7 @@ INSN_ENTRY(opt_eq){
|
|
2324
2310
|
CALL_SIMPLE_METHOD(recv);
|
2325
2311
|
}
|
2326
2312
|
|
2327
|
-
#line
|
2313
|
+
#line 2314 "vm.inc"
|
2328
2314
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
2329
2315
|
PUSH(val);
|
2330
2316
|
#undef CURRENT_INSN_opt_eq
|
@@ -2335,14 +2321,12 @@ INSN_ENTRY(opt_eq){
|
|
2335
2321
|
INSN_ENTRY(opt_neq){
|
2336
2322
|
{
|
2337
2323
|
VALUE val;
|
2338
|
-
|
2339
|
-
CALL_INFO ci_eq = (CALL_INFO)GET_OPERAND(3);
|
2340
|
-
CALL_CACHE cc = (CALL_CACHE)GET_OPERAND(2);
|
2324
|
+
CALL_INFO ci_eq = (CALL_INFO)GET_OPERAND(2);
|
2341
2325
|
CALL_INFO ci = (CALL_INFO)GET_OPERAND(1);
|
2342
2326
|
VALUE recv = TOPN(1);
|
2343
2327
|
VALUE obj = TOPN(0);
|
2344
2328
|
DEBUG_ENTER_INSN("opt_neq");
|
2345
|
-
ADD_PC(1+
|
2329
|
+
ADD_PC(1+2);
|
2346
2330
|
PREFETCH(GET_PC());
|
2347
2331
|
POPN(2);
|
2348
2332
|
#define CURRENT_INSN_opt_neq 1
|
@@ -2351,18 +2335,15 @@ INSN_ENTRY(opt_neq){
|
|
2351
2335
|
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
2352
2336
|
COLLECT_USAGE_INSN(BIN(opt_neq));
|
2353
2337
|
COLLECT_USAGE_OPERAND(BIN(opt_neq), 0, ci);
|
2354
|
-
COLLECT_USAGE_OPERAND(BIN(opt_neq), 1,
|
2355
|
-
COLLECT_USAGE_OPERAND(BIN(opt_neq), 2, ci_eq);
|
2356
|
-
COLLECT_USAGE_OPERAND(BIN(opt_neq), 3, cc_eq);
|
2338
|
+
COLLECT_USAGE_OPERAND(BIN(opt_neq), 1, ci_eq);
|
2357
2339
|
{
|
2358
|
-
#line
|
2340
|
+
#line 1670 "insns.def"
|
2359
2341
|
extern VALUE rb_obj_not_equal(VALUE obj1, VALUE obj2);
|
2360
|
-
vm_search_method(ci,
|
2361
|
-
|
2342
|
+
vm_search_method(ci, recv);
|
2362
2343
|
val = Qundef;
|
2363
2344
|
|
2364
|
-
if (check_cfunc(
|
2365
|
-
val = opt_eq_func(recv, obj, ci_eq
|
2345
|
+
if (check_cfunc(ci->me, rb_obj_not_equal)) {
|
2346
|
+
val = opt_eq_func(recv, obj, ci_eq);
|
2366
2347
|
|
2367
2348
|
if (val != Qundef) {
|
2368
2349
|
val = RTEST(val) ? Qfalse : Qtrue;
|
@@ -2376,7 +2357,7 @@ INSN_ENTRY(opt_neq){
|
|
2376
2357
|
CALL_SIMPLE_METHOD(recv);
|
2377
2358
|
}
|
2378
2359
|
|
2379
|
-
#line
|
2360
|
+
#line 2361 "vm.inc"
|
2380
2361
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
2381
2362
|
PUSH(val);
|
2382
2363
|
#undef CURRENT_INSN_opt_neq
|
@@ -2387,12 +2368,11 @@ INSN_ENTRY(opt_neq){
|
|
2387
2368
|
INSN_ENTRY(opt_lt){
|
2388
2369
|
{
|
2389
2370
|
VALUE val;
|
2390
|
-
CALL_CACHE cc = (CALL_CACHE)GET_OPERAND(2);
|
2391
2371
|
CALL_INFO ci = (CALL_INFO)GET_OPERAND(1);
|
2392
2372
|
VALUE recv = TOPN(1);
|
2393
2373
|
VALUE obj = TOPN(0);
|
2394
2374
|
DEBUG_ENTER_INSN("opt_lt");
|
2395
|
-
ADD_PC(1+
|
2375
|
+
ADD_PC(1+1);
|
2396
2376
|
PREFETCH(GET_PC());
|
2397
2377
|
POPN(2);
|
2398
2378
|
#define CURRENT_INSN_opt_lt 1
|
@@ -2401,11 +2381,10 @@ INSN_ENTRY(opt_lt){
|
|
2401
2381
|
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
2402
2382
|
COLLECT_USAGE_INSN(BIN(opt_lt));
|
2403
2383
|
COLLECT_USAGE_OPERAND(BIN(opt_lt), 0, ci);
|
2404
|
-
COLLECT_USAGE_OPERAND(BIN(opt_lt), 1, cc);
|
2405
2384
|
{
|
2406
|
-
#line
|
2385
|
+
#line 1701 "insns.def"
|
2407
2386
|
if (FIXNUM_2_P(recv, obj) &&
|
2408
|
-
BASIC_OP_UNREDEFINED_P(BOP_LT,
|
2387
|
+
BASIC_OP_UNREDEFINED_P(BOP_LT, FIXNUM_REDEFINED_OP_FLAG)) {
|
2409
2388
|
SIGNED_VALUE a = recv, b = obj;
|
2410
2389
|
|
2411
2390
|
if (a < b) {
|
@@ -2436,7 +2415,7 @@ INSN_ENTRY(opt_lt){
|
|
2436
2415
|
CALL_SIMPLE_METHOD(recv);
|
2437
2416
|
}
|
2438
2417
|
|
2439
|
-
#line
|
2418
|
+
#line 2419 "vm.inc"
|
2440
2419
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
2441
2420
|
PUSH(val);
|
2442
2421
|
#undef CURRENT_INSN_opt_lt
|
@@ -2447,12 +2426,11 @@ INSN_ENTRY(opt_lt){
|
|
2447
2426
|
INSN_ENTRY(opt_le){
|
2448
2427
|
{
|
2449
2428
|
VALUE val;
|
2450
|
-
CALL_CACHE cc = (CALL_CACHE)GET_OPERAND(2);
|
2451
2429
|
CALL_INFO ci = (CALL_INFO)GET_OPERAND(1);
|
2452
2430
|
VALUE recv = TOPN(1);
|
2453
2431
|
VALUE obj = TOPN(0);
|
2454
2432
|
DEBUG_ENTER_INSN("opt_le");
|
2455
|
-
ADD_PC(1+
|
2433
|
+
ADD_PC(1+1);
|
2456
2434
|
PREFETCH(GET_PC());
|
2457
2435
|
POPN(2);
|
2458
2436
|
#define CURRENT_INSN_opt_le 1
|
@@ -2461,11 +2439,10 @@ INSN_ENTRY(opt_le){
|
|
2461
2439
|
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
2462
2440
|
COLLECT_USAGE_INSN(BIN(opt_le));
|
2463
2441
|
COLLECT_USAGE_OPERAND(BIN(opt_le), 0, ci);
|
2464
|
-
COLLECT_USAGE_OPERAND(BIN(opt_le), 1, cc);
|
2465
2442
|
{
|
2466
|
-
#line
|
2443
|
+
#line 1745 "insns.def"
|
2467
2444
|
if (FIXNUM_2_P(recv, obj) &&
|
2468
|
-
BASIC_OP_UNREDEFINED_P(BOP_LE,
|
2445
|
+
BASIC_OP_UNREDEFINED_P(BOP_LE, FIXNUM_REDEFINED_OP_FLAG)) {
|
2469
2446
|
SIGNED_VALUE a = recv, b = obj;
|
2470
2447
|
|
2471
2448
|
if (a <= b) {
|
@@ -2487,7 +2464,7 @@ INSN_ENTRY(opt_le){
|
|
2487
2464
|
CALL_SIMPLE_METHOD(recv);
|
2488
2465
|
}
|
2489
2466
|
|
2490
|
-
#line
|
2467
|
+
#line 2468 "vm.inc"
|
2491
2468
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
2492
2469
|
PUSH(val);
|
2493
2470
|
#undef CURRENT_INSN_opt_le
|
@@ -2498,12 +2475,11 @@ INSN_ENTRY(opt_le){
|
|
2498
2475
|
INSN_ENTRY(opt_gt){
|
2499
2476
|
{
|
2500
2477
|
VALUE val;
|
2501
|
-
CALL_CACHE cc = (CALL_CACHE)GET_OPERAND(2);
|
2502
2478
|
CALL_INFO ci = (CALL_INFO)GET_OPERAND(1);
|
2503
2479
|
VALUE recv = TOPN(1);
|
2504
2480
|
VALUE obj = TOPN(0);
|
2505
2481
|
DEBUG_ENTER_INSN("opt_gt");
|
2506
|
-
ADD_PC(1+
|
2482
|
+
ADD_PC(1+1);
|
2507
2483
|
PREFETCH(GET_PC());
|
2508
2484
|
POPN(2);
|
2509
2485
|
#define CURRENT_INSN_opt_gt 1
|
@@ -2512,11 +2488,10 @@ INSN_ENTRY(opt_gt){
|
|
2512
2488
|
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
2513
2489
|
COLLECT_USAGE_INSN(BIN(opt_gt));
|
2514
2490
|
COLLECT_USAGE_OPERAND(BIN(opt_gt), 0, ci);
|
2515
|
-
COLLECT_USAGE_OPERAND(BIN(opt_gt), 1, cc);
|
2516
2491
|
{
|
2517
|
-
#line
|
2492
|
+
#line 1780 "insns.def"
|
2518
2493
|
if (FIXNUM_2_P(recv, obj) &&
|
2519
|
-
BASIC_OP_UNREDEFINED_P(BOP_GT,
|
2494
|
+
BASIC_OP_UNREDEFINED_P(BOP_GT, FIXNUM_REDEFINED_OP_FLAG)) {
|
2520
2495
|
SIGNED_VALUE a = recv, b = obj;
|
2521
2496
|
|
2522
2497
|
if (a > b) {
|
@@ -2547,7 +2522,7 @@ INSN_ENTRY(opt_gt){
|
|
2547
2522
|
CALL_SIMPLE_METHOD(recv);
|
2548
2523
|
}
|
2549
2524
|
|
2550
|
-
#line
|
2525
|
+
#line 2526 "vm.inc"
|
2551
2526
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
2552
2527
|
PUSH(val);
|
2553
2528
|
#undef CURRENT_INSN_opt_gt
|
@@ -2558,12 +2533,11 @@ INSN_ENTRY(opt_gt){
|
|
2558
2533
|
INSN_ENTRY(opt_ge){
|
2559
2534
|
{
|
2560
2535
|
VALUE val;
|
2561
|
-
CALL_CACHE cc = (CALL_CACHE)GET_OPERAND(2);
|
2562
2536
|
CALL_INFO ci = (CALL_INFO)GET_OPERAND(1);
|
2563
2537
|
VALUE recv = TOPN(1);
|
2564
2538
|
VALUE obj = TOPN(0);
|
2565
2539
|
DEBUG_ENTER_INSN("opt_ge");
|
2566
|
-
ADD_PC(1+
|
2540
|
+
ADD_PC(1+1);
|
2567
2541
|
PREFETCH(GET_PC());
|
2568
2542
|
POPN(2);
|
2569
2543
|
#define CURRENT_INSN_opt_ge 1
|
@@ -2572,11 +2546,10 @@ INSN_ENTRY(opt_ge){
|
|
2572
2546
|
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
2573
2547
|
COLLECT_USAGE_INSN(BIN(opt_ge));
|
2574
2548
|
COLLECT_USAGE_OPERAND(BIN(opt_ge), 0, ci);
|
2575
|
-
COLLECT_USAGE_OPERAND(BIN(opt_ge), 1, cc);
|
2576
2549
|
{
|
2577
|
-
#line
|
2550
|
+
#line 1824 "insns.def"
|
2578
2551
|
if (FIXNUM_2_P(recv, obj) &&
|
2579
|
-
BASIC_OP_UNREDEFINED_P(BOP_GE,
|
2552
|
+
BASIC_OP_UNREDEFINED_P(BOP_GE, FIXNUM_REDEFINED_OP_FLAG)) {
|
2580
2553
|
SIGNED_VALUE a = recv, b = obj;
|
2581
2554
|
|
2582
2555
|
if (a >= b) {
|
@@ -2597,7 +2570,7 @@ INSN_ENTRY(opt_ge){
|
|
2597
2570
|
CALL_SIMPLE_METHOD(recv);
|
2598
2571
|
}
|
2599
2572
|
|
2600
|
-
#line
|
2573
|
+
#line 2574 "vm.inc"
|
2601
2574
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
2602
2575
|
PUSH(val);
|
2603
2576
|
#undef CURRENT_INSN_opt_ge
|
@@ -2608,12 +2581,11 @@ INSN_ENTRY(opt_ge){
|
|
2608
2581
|
INSN_ENTRY(opt_ltlt){
|
2609
2582
|
{
|
2610
2583
|
VALUE val;
|
2611
|
-
CALL_CACHE cc = (CALL_CACHE)GET_OPERAND(2);
|
2612
2584
|
CALL_INFO ci = (CALL_INFO)GET_OPERAND(1);
|
2613
2585
|
VALUE recv = TOPN(1);
|
2614
2586
|
VALUE obj = TOPN(0);
|
2615
2587
|
DEBUG_ENTER_INSN("opt_ltlt");
|
2616
|
-
ADD_PC(1+
|
2588
|
+
ADD_PC(1+1);
|
2617
2589
|
PREFETCH(GET_PC());
|
2618
2590
|
POPN(2);
|
2619
2591
|
#define CURRENT_INSN_opt_ltlt 1
|
@@ -2622,9 +2594,8 @@ INSN_ENTRY(opt_ltlt){
|
|
2622
2594
|
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
2623
2595
|
COLLECT_USAGE_INSN(BIN(opt_ltlt));
|
2624
2596
|
COLLECT_USAGE_OPERAND(BIN(opt_ltlt), 0, ci);
|
2625
|
-
COLLECT_USAGE_OPERAND(BIN(opt_ltlt), 1, cc);
|
2626
2597
|
{
|
2627
|
-
#line
|
2598
|
+
#line 1858 "insns.def"
|
2628
2599
|
if (!SPECIAL_CONST_P(recv)) {
|
2629
2600
|
if (RBASIC_CLASS(recv) == rb_cString &&
|
2630
2601
|
BASIC_OP_UNREDEFINED_P(BOP_LTLT, STRING_REDEFINED_OP_FLAG)) {
|
@@ -2645,7 +2616,7 @@ INSN_ENTRY(opt_ltlt){
|
|
2645
2616
|
CALL_SIMPLE_METHOD(recv);
|
2646
2617
|
}
|
2647
2618
|
|
2648
|
-
#line
|
2619
|
+
#line 2620 "vm.inc"
|
2649
2620
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
2650
2621
|
PUSH(val);
|
2651
2622
|
#undef CURRENT_INSN_opt_ltlt
|
@@ -2656,12 +2627,11 @@ INSN_ENTRY(opt_ltlt){
|
|
2656
2627
|
INSN_ENTRY(opt_aref){
|
2657
2628
|
{
|
2658
2629
|
VALUE val;
|
2659
|
-
CALL_CACHE cc = (CALL_CACHE)GET_OPERAND(2);
|
2660
2630
|
CALL_INFO ci = (CALL_INFO)GET_OPERAND(1);
|
2661
2631
|
VALUE recv = TOPN(1);
|
2662
2632
|
VALUE obj = TOPN(0);
|
2663
2633
|
DEBUG_ENTER_INSN("opt_aref");
|
2664
|
-
ADD_PC(1+
|
2634
|
+
ADD_PC(1+1);
|
2665
2635
|
PREFETCH(GET_PC());
|
2666
2636
|
POPN(2);
|
2667
2637
|
#define CURRENT_INSN_opt_aref 1
|
@@ -2670,9 +2640,8 @@ INSN_ENTRY(opt_aref){
|
|
2670
2640
|
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
2671
2641
|
COLLECT_USAGE_INSN(BIN(opt_aref));
|
2672
2642
|
COLLECT_USAGE_OPERAND(BIN(opt_aref), 0, ci);
|
2673
|
-
COLLECT_USAGE_OPERAND(BIN(opt_aref), 1, cc);
|
2674
2643
|
{
|
2675
|
-
#line
|
2644
|
+
#line 1890 "insns.def"
|
2676
2645
|
if (!SPECIAL_CONST_P(recv)) {
|
2677
2646
|
if (RBASIC_CLASS(recv) == rb_cArray && BASIC_OP_UNREDEFINED_P(BOP_AREF, ARRAY_REDEFINED_OP_FLAG) && FIXNUM_P(obj)) {
|
2678
2647
|
val = rb_ary_entry(recv, FIX2LONG(obj));
|
@@ -2691,7 +2660,7 @@ INSN_ENTRY(opt_aref){
|
|
2691
2660
|
CALL_SIMPLE_METHOD(recv);
|
2692
2661
|
}
|
2693
2662
|
|
2694
|
-
#line
|
2663
|
+
#line 2664 "vm.inc"
|
2695
2664
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
2696
2665
|
PUSH(val);
|
2697
2666
|
#undef CURRENT_INSN_opt_aref
|
@@ -2702,13 +2671,12 @@ INSN_ENTRY(opt_aref){
|
|
2702
2671
|
INSN_ENTRY(opt_aset){
|
2703
2672
|
{
|
2704
2673
|
VALUE val;
|
2705
|
-
CALL_CACHE cc = (CALL_CACHE)GET_OPERAND(2);
|
2706
2674
|
CALL_INFO ci = (CALL_INFO)GET_OPERAND(1);
|
2707
2675
|
VALUE recv = TOPN(2);
|
2708
2676
|
VALUE obj = TOPN(1);
|
2709
2677
|
VALUE set = TOPN(0);
|
2710
2678
|
DEBUG_ENTER_INSN("opt_aset");
|
2711
|
-
ADD_PC(1+
|
2679
|
+
ADD_PC(1+1);
|
2712
2680
|
PREFETCH(GET_PC());
|
2713
2681
|
POPN(3);
|
2714
2682
|
#define CURRENT_INSN_opt_aset 1
|
@@ -2717,9 +2685,8 @@ INSN_ENTRY(opt_aset){
|
|
2717
2685
|
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
2718
2686
|
COLLECT_USAGE_INSN(BIN(opt_aset));
|
2719
2687
|
COLLECT_USAGE_OPERAND(BIN(opt_aset), 0, ci);
|
2720
|
-
COLLECT_USAGE_OPERAND(BIN(opt_aset), 1, cc);
|
2721
2688
|
{
|
2722
|
-
#line
|
2689
|
+
#line 1920 "insns.def"
|
2723
2690
|
if (!SPECIAL_CONST_P(recv)) {
|
2724
2691
|
if (RBASIC_CLASS(recv) == rb_cArray && BASIC_OP_UNREDEFINED_P(BOP_ASET, ARRAY_REDEFINED_OP_FLAG) && FIXNUM_P(obj)) {
|
2725
2692
|
rb_ary_store(recv, FIX2LONG(obj), set);
|
@@ -2741,7 +2708,7 @@ INSN_ENTRY(opt_aset){
|
|
2741
2708
|
CALL_SIMPLE_METHOD(recv);
|
2742
2709
|
}
|
2743
2710
|
|
2744
|
-
#line
|
2711
|
+
#line 2712 "vm.inc"
|
2745
2712
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
2746
2713
|
PUSH(val);
|
2747
2714
|
#undef CURRENT_INSN_opt_aset
|
@@ -2751,13 +2718,12 @@ INSN_ENTRY(opt_aset){
|
|
2751
2718
|
END_INSN(opt_aset);}}}
|
2752
2719
|
INSN_ENTRY(opt_aset_with){
|
2753
2720
|
{
|
2754
|
-
VALUE key = (VALUE)GET_OPERAND(
|
2755
|
-
CALL_CACHE cc = (CALL_CACHE)GET_OPERAND(2);
|
2721
|
+
VALUE key = (VALUE)GET_OPERAND(2);
|
2756
2722
|
CALL_INFO ci = (CALL_INFO)GET_OPERAND(1);
|
2757
2723
|
VALUE recv = TOPN(1);
|
2758
2724
|
VALUE val = TOPN(0);
|
2759
2725
|
DEBUG_ENTER_INSN("opt_aset_with");
|
2760
|
-
ADD_PC(1+
|
2726
|
+
ADD_PC(1+2);
|
2761
2727
|
PREFETCH(GET_PC());
|
2762
2728
|
POPN(2);
|
2763
2729
|
#define CURRENT_INSN_opt_aset_with 1
|
@@ -2766,11 +2732,12 @@ INSN_ENTRY(opt_aset_with){
|
|
2766
2732
|
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
2767
2733
|
COLLECT_USAGE_INSN(BIN(opt_aset_with));
|
2768
2734
|
COLLECT_USAGE_OPERAND(BIN(opt_aset_with), 0, ci);
|
2769
|
-
COLLECT_USAGE_OPERAND(BIN(opt_aset_with), 1,
|
2770
|
-
COLLECT_USAGE_OPERAND(BIN(opt_aset_with), 2, key);
|
2735
|
+
COLLECT_USAGE_OPERAND(BIN(opt_aset_with), 1, key);
|
2771
2736
|
{
|
2772
|
-
#line
|
2773
|
-
if (!SPECIAL_CONST_P(recv) && RBASIC_CLASS(recv) == rb_cHash &&
|
2737
|
+
#line 1953 "insns.def"
|
2738
|
+
if (!SPECIAL_CONST_P(recv) && RBASIC_CLASS(recv) == rb_cHash &&
|
2739
|
+
BASIC_OP_UNREDEFINED_P(BOP_ASET, HASH_REDEFINED_OP_FLAG) &&
|
2740
|
+
rb_hash_compare_by_id_p(recv) == Qfalse) {
|
2774
2741
|
rb_hash_aset(recv, key, val);
|
2775
2742
|
}
|
2776
2743
|
else {
|
@@ -2780,7 +2747,7 @@ INSN_ENTRY(opt_aset_with){
|
|
2780
2747
|
CALL_SIMPLE_METHOD(recv);
|
2781
2748
|
}
|
2782
2749
|
|
2783
|
-
#line
|
2750
|
+
#line 2751 "vm.inc"
|
2784
2751
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
2785
2752
|
PUSH(val);
|
2786
2753
|
#undef CURRENT_INSN_opt_aset_with
|
@@ -2791,12 +2758,11 @@ INSN_ENTRY(opt_aset_with){
|
|
2791
2758
|
INSN_ENTRY(opt_aref_with){
|
2792
2759
|
{
|
2793
2760
|
VALUE val;
|
2794
|
-
VALUE key = (VALUE)GET_OPERAND(
|
2795
|
-
CALL_CACHE cc = (CALL_CACHE)GET_OPERAND(2);
|
2761
|
+
VALUE key = (VALUE)GET_OPERAND(2);
|
2796
2762
|
CALL_INFO ci = (CALL_INFO)GET_OPERAND(1);
|
2797
2763
|
VALUE recv = TOPN(0);
|
2798
2764
|
DEBUG_ENTER_INSN("opt_aref_with");
|
2799
|
-
ADD_PC(1+
|
2765
|
+
ADD_PC(1+2);
|
2800
2766
|
PREFETCH(GET_PC());
|
2801
2767
|
POPN(1);
|
2802
2768
|
#define CURRENT_INSN_opt_aref_with 1
|
@@ -2805,11 +2771,12 @@ INSN_ENTRY(opt_aref_with){
|
|
2805
2771
|
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
2806
2772
|
COLLECT_USAGE_INSN(BIN(opt_aref_with));
|
2807
2773
|
COLLECT_USAGE_OPERAND(BIN(opt_aref_with), 0, ci);
|
2808
|
-
COLLECT_USAGE_OPERAND(BIN(opt_aref_with), 1,
|
2809
|
-
COLLECT_USAGE_OPERAND(BIN(opt_aref_with), 2, key);
|
2774
|
+
COLLECT_USAGE_OPERAND(BIN(opt_aref_with), 1, key);
|
2810
2775
|
{
|
2811
|
-
#line
|
2812
|
-
if (!SPECIAL_CONST_P(recv) && RBASIC_CLASS(recv) == rb_cHash &&
|
2776
|
+
#line 1977 "insns.def"
|
2777
|
+
if (!SPECIAL_CONST_P(recv) && RBASIC_CLASS(recv) == rb_cHash &&
|
2778
|
+
BASIC_OP_UNREDEFINED_P(BOP_AREF, HASH_REDEFINED_OP_FLAG) &&
|
2779
|
+
rb_hash_compare_by_id_p(recv) == Qfalse) {
|
2813
2780
|
val = rb_hash_aref(recv, key);
|
2814
2781
|
}
|
2815
2782
|
else {
|
@@ -2818,7 +2785,7 @@ INSN_ENTRY(opt_aref_with){
|
|
2818
2785
|
CALL_SIMPLE_METHOD(recv);
|
2819
2786
|
}
|
2820
2787
|
|
2821
|
-
#line
|
2788
|
+
#line 2789 "vm.inc"
|
2822
2789
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
2823
2790
|
PUSH(val);
|
2824
2791
|
#undef CURRENT_INSN_opt_aref_with
|
@@ -2829,11 +2796,10 @@ INSN_ENTRY(opt_aref_with){
|
|
2829
2796
|
INSN_ENTRY(opt_length){
|
2830
2797
|
{
|
2831
2798
|
VALUE val;
|
2832
|
-
CALL_CACHE cc = (CALL_CACHE)GET_OPERAND(2);
|
2833
2799
|
CALL_INFO ci = (CALL_INFO)GET_OPERAND(1);
|
2834
2800
|
VALUE recv = TOPN(0);
|
2835
2801
|
DEBUG_ENTER_INSN("opt_length");
|
2836
|
-
ADD_PC(1+
|
2802
|
+
ADD_PC(1+1);
|
2837
2803
|
PREFETCH(GET_PC());
|
2838
2804
|
POPN(1);
|
2839
2805
|
#define CURRENT_INSN_opt_length 1
|
@@ -2842,9 +2808,8 @@ INSN_ENTRY(opt_length){
|
|
2842
2808
|
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
2843
2809
|
COLLECT_USAGE_INSN(BIN(opt_length));
|
2844
2810
|
COLLECT_USAGE_OPERAND(BIN(opt_length), 0, ci);
|
2845
|
-
COLLECT_USAGE_OPERAND(BIN(opt_length), 1, cc);
|
2846
2811
|
{
|
2847
|
-
#line
|
2812
|
+
#line 2000 "insns.def"
|
2848
2813
|
if (!SPECIAL_CONST_P(recv)) {
|
2849
2814
|
if (RBASIC_CLASS(recv) == rb_cString &&
|
2850
2815
|
BASIC_OP_UNREDEFINED_P(BOP_LENGTH, STRING_REDEFINED_OP_FLAG)) {
|
@@ -2868,7 +2833,7 @@ INSN_ENTRY(opt_length){
|
|
2868
2833
|
CALL_SIMPLE_METHOD(recv);
|
2869
2834
|
}
|
2870
2835
|
|
2871
|
-
#line
|
2836
|
+
#line 2837 "vm.inc"
|
2872
2837
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
2873
2838
|
PUSH(val);
|
2874
2839
|
#undef CURRENT_INSN_opt_length
|
@@ -2879,11 +2844,10 @@ INSN_ENTRY(opt_length){
|
|
2879
2844
|
INSN_ENTRY(opt_size){
|
2880
2845
|
{
|
2881
2846
|
VALUE val;
|
2882
|
-
CALL_CACHE cc = (CALL_CACHE)GET_OPERAND(2);
|
2883
2847
|
CALL_INFO ci = (CALL_INFO)GET_OPERAND(1);
|
2884
2848
|
VALUE recv = TOPN(0);
|
2885
2849
|
DEBUG_ENTER_INSN("opt_size");
|
2886
|
-
ADD_PC(1+
|
2850
|
+
ADD_PC(1+1);
|
2887
2851
|
PREFETCH(GET_PC());
|
2888
2852
|
POPN(1);
|
2889
2853
|
#define CURRENT_INSN_opt_size 1
|
@@ -2892,9 +2856,8 @@ INSN_ENTRY(opt_size){
|
|
2892
2856
|
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
2893
2857
|
COLLECT_USAGE_INSN(BIN(opt_size));
|
2894
2858
|
COLLECT_USAGE_OPERAND(BIN(opt_size), 0, ci);
|
2895
|
-
COLLECT_USAGE_OPERAND(BIN(opt_size), 1, cc);
|
2896
2859
|
{
|
2897
|
-
#line
|
2860
|
+
#line 2035 "insns.def"
|
2898
2861
|
if (!SPECIAL_CONST_P(recv)) {
|
2899
2862
|
if (RBASIC_CLASS(recv) == rb_cString &&
|
2900
2863
|
BASIC_OP_UNREDEFINED_P(BOP_SIZE, STRING_REDEFINED_OP_FLAG)) {
|
@@ -2918,7 +2881,7 @@ INSN_ENTRY(opt_size){
|
|
2918
2881
|
CALL_SIMPLE_METHOD(recv);
|
2919
2882
|
}
|
2920
2883
|
|
2921
|
-
#line
|
2884
|
+
#line 2885 "vm.inc"
|
2922
2885
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
2923
2886
|
PUSH(val);
|
2924
2887
|
#undef CURRENT_INSN_opt_size
|
@@ -2929,11 +2892,10 @@ INSN_ENTRY(opt_size){
|
|
2929
2892
|
INSN_ENTRY(opt_empty_p){
|
2930
2893
|
{
|
2931
2894
|
VALUE val;
|
2932
|
-
CALL_CACHE cc = (CALL_CACHE)GET_OPERAND(2);
|
2933
2895
|
CALL_INFO ci = (CALL_INFO)GET_OPERAND(1);
|
2934
2896
|
VALUE recv = TOPN(0);
|
2935
2897
|
DEBUG_ENTER_INSN("opt_empty_p");
|
2936
|
-
ADD_PC(1+
|
2898
|
+
ADD_PC(1+1);
|
2937
2899
|
PREFETCH(GET_PC());
|
2938
2900
|
POPN(1);
|
2939
2901
|
#define CURRENT_INSN_opt_empty_p 1
|
@@ -2942,9 +2904,8 @@ INSN_ENTRY(opt_empty_p){
|
|
2942
2904
|
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
2943
2905
|
COLLECT_USAGE_INSN(BIN(opt_empty_p));
|
2944
2906
|
COLLECT_USAGE_OPERAND(BIN(opt_empty_p), 0, ci);
|
2945
|
-
COLLECT_USAGE_OPERAND(BIN(opt_empty_p), 1, cc);
|
2946
2907
|
{
|
2947
|
-
#line
|
2908
|
+
#line 2070 "insns.def"
|
2948
2909
|
if (!SPECIAL_CONST_P(recv)) {
|
2949
2910
|
if (RBASIC_CLASS(recv) == rb_cString &&
|
2950
2911
|
BASIC_OP_UNREDEFINED_P(BOP_EMPTY_P, STRING_REDEFINED_OP_FLAG)) {
|
@@ -2971,7 +2932,7 @@ INSN_ENTRY(opt_empty_p){
|
|
2971
2932
|
CALL_SIMPLE_METHOD(recv);
|
2972
2933
|
}
|
2973
2934
|
|
2974
|
-
#line
|
2935
|
+
#line 2936 "vm.inc"
|
2975
2936
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
2976
2937
|
PUSH(val);
|
2977
2938
|
#undef CURRENT_INSN_opt_empty_p
|
@@ -2982,11 +2943,10 @@ INSN_ENTRY(opt_empty_p){
|
|
2982
2943
|
INSN_ENTRY(opt_succ){
|
2983
2944
|
{
|
2984
2945
|
VALUE val;
|
2985
|
-
CALL_CACHE cc = (CALL_CACHE)GET_OPERAND(2);
|
2986
2946
|
CALL_INFO ci = (CALL_INFO)GET_OPERAND(1);
|
2987
2947
|
VALUE recv = TOPN(0);
|
2988
2948
|
DEBUG_ENTER_INSN("opt_succ");
|
2989
|
-
ADD_PC(1+
|
2949
|
+
ADD_PC(1+1);
|
2990
2950
|
PREFETCH(GET_PC());
|
2991
2951
|
POPN(1);
|
2992
2952
|
#define CURRENT_INSN_opt_succ 1
|
@@ -2995,18 +2955,17 @@ INSN_ENTRY(opt_succ){
|
|
2995
2955
|
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
2996
2956
|
COLLECT_USAGE_INSN(BIN(opt_succ));
|
2997
2957
|
COLLECT_USAGE_OPERAND(BIN(opt_succ), 0, ci);
|
2998
|
-
COLLECT_USAGE_OPERAND(BIN(opt_succ), 1, cc);
|
2999
2958
|
{
|
3000
|
-
#line
|
2959
|
+
#line 2108 "insns.def"
|
3001
2960
|
if (SPECIAL_CONST_P(recv)) {
|
3002
2961
|
if (FIXNUM_P(recv) &&
|
3003
|
-
BASIC_OP_UNREDEFINED_P(BOP_SUCC,
|
2962
|
+
BASIC_OP_UNREDEFINED_P(BOP_SUCC, FIXNUM_REDEFINED_OP_FLAG)) {
|
2963
|
+
const VALUE obj = INT2FIX(1);
|
3004
2964
|
/* fixnum + INT2FIX(1) */
|
3005
|
-
|
3006
|
-
|
3007
|
-
|
3008
|
-
|
3009
|
-
val = LONG2NUM(FIXNUM_MAX + 1);
|
2965
|
+
val = (recv + (obj & (~1)));
|
2966
|
+
if ((~(recv ^ obj) & (recv ^ val)) & ((unsigned long)LONG_MAX + 1)) {
|
2967
|
+
val = rb_big_plus(rb_int2big(FIX2LONG(recv)),
|
2968
|
+
rb_int2big(FIX2LONG(obj)));
|
3010
2969
|
}
|
3011
2970
|
}
|
3012
2971
|
else {
|
@@ -3018,8 +2977,7 @@ INSN_ENTRY(opt_succ){
|
|
3018
2977
|
BASIC_OP_UNREDEFINED_P(BOP_SUCC, STRING_REDEFINED_OP_FLAG)) {
|
3019
2978
|
val = rb_str_succ(recv);
|
3020
2979
|
}
|
3021
|
-
else
|
3022
|
-
{
|
2980
|
+
else {
|
3023
2981
|
goto INSN_LABEL(normal_dispatch);
|
3024
2982
|
}
|
3025
2983
|
}
|
@@ -3029,7 +2987,7 @@ INSN_ENTRY(opt_succ){
|
|
3029
2987
|
CALL_SIMPLE_METHOD(recv);
|
3030
2988
|
}
|
3031
2989
|
|
3032
|
-
#line
|
2990
|
+
#line 2991 "vm.inc"
|
3033
2991
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
3034
2992
|
PUSH(val);
|
3035
2993
|
#undef CURRENT_INSN_opt_succ
|
@@ -3040,11 +2998,10 @@ INSN_ENTRY(opt_succ){
|
|
3040
2998
|
INSN_ENTRY(opt_not){
|
3041
2999
|
{
|
3042
3000
|
VALUE val;
|
3043
|
-
CALL_CACHE cc = (CALL_CACHE)GET_OPERAND(2);
|
3044
3001
|
CALL_INFO ci = (CALL_INFO)GET_OPERAND(1);
|
3045
3002
|
VALUE recv = TOPN(0);
|
3046
3003
|
DEBUG_ENTER_INSN("opt_not");
|
3047
|
-
ADD_PC(1+
|
3004
|
+
ADD_PC(1+1);
|
3048
3005
|
PREFETCH(GET_PC());
|
3049
3006
|
POPN(1);
|
3050
3007
|
#define CURRENT_INSN_opt_not 1
|
@@ -3053,12 +3010,12 @@ INSN_ENTRY(opt_not){
|
|
3053
3010
|
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
3054
3011
|
COLLECT_USAGE_INSN(BIN(opt_not));
|
3055
3012
|
COLLECT_USAGE_OPERAND(BIN(opt_not), 0, ci);
|
3056
|
-
COLLECT_USAGE_OPERAND(BIN(opt_not), 1, cc);
|
3057
3013
|
{
|
3058
|
-
#line
|
3059
|
-
|
3014
|
+
#line 2150 "insns.def"
|
3015
|
+
extern VALUE rb_obj_not(VALUE obj);
|
3016
|
+
vm_search_method(ci, recv);
|
3060
3017
|
|
3061
|
-
if (check_cfunc(
|
3018
|
+
if (check_cfunc(ci->me, rb_obj_not)) {
|
3062
3019
|
val = RTEST(recv) ? Qfalse : Qtrue;
|
3063
3020
|
}
|
3064
3021
|
else {
|
@@ -3066,7 +3023,7 @@ INSN_ENTRY(opt_not){
|
|
3066
3023
|
CALL_SIMPLE_METHOD(recv);
|
3067
3024
|
}
|
3068
3025
|
|
3069
|
-
#line
|
3026
|
+
#line 3027 "vm.inc"
|
3070
3027
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
3071
3028
|
PUSH(val);
|
3072
3029
|
#undef CURRENT_INSN_opt_not
|
@@ -3090,7 +3047,7 @@ INSN_ENTRY(opt_regexpmatch1){
|
|
3090
3047
|
COLLECT_USAGE_INSN(BIN(opt_regexpmatch1));
|
3091
3048
|
COLLECT_USAGE_OPERAND(BIN(opt_regexpmatch1), 0, r);
|
3092
3049
|
{
|
3093
|
-
#line
|
3050
|
+
#line 2174 "insns.def"
|
3094
3051
|
if (BASIC_OP_UNREDEFINED_P(BOP_MATCH, REGEXP_REDEFINED_OP_FLAG)) {
|
3095
3052
|
val = rb_reg_match(r, obj);
|
3096
3053
|
}
|
@@ -3098,7 +3055,7 @@ INSN_ENTRY(opt_regexpmatch1){
|
|
3098
3055
|
val = rb_funcall(r, idEqTilde, 1, obj);
|
3099
3056
|
}
|
3100
3057
|
|
3101
|
-
#line
|
3058
|
+
#line 3059 "vm.inc"
|
3102
3059
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
3103
3060
|
PUSH(val);
|
3104
3061
|
#undef CURRENT_INSN_opt_regexpmatch1
|
@@ -3109,12 +3066,11 @@ INSN_ENTRY(opt_regexpmatch1){
|
|
3109
3066
|
INSN_ENTRY(opt_regexpmatch2){
|
3110
3067
|
{
|
3111
3068
|
VALUE val;
|
3112
|
-
CALL_CACHE cc = (CALL_CACHE)GET_OPERAND(2);
|
3113
3069
|
CALL_INFO ci = (CALL_INFO)GET_OPERAND(1);
|
3114
3070
|
VALUE obj2 = TOPN(1);
|
3115
3071
|
VALUE obj1 = TOPN(0);
|
3116
3072
|
DEBUG_ENTER_INSN("opt_regexpmatch2");
|
3117
|
-
ADD_PC(1+
|
3073
|
+
ADD_PC(1+1);
|
3118
3074
|
PREFETCH(GET_PC());
|
3119
3075
|
POPN(2);
|
3120
3076
|
#define CURRENT_INSN_opt_regexpmatch2 1
|
@@ -3123,9 +3079,8 @@ INSN_ENTRY(opt_regexpmatch2){
|
|
3123
3079
|
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
3124
3080
|
COLLECT_USAGE_INSN(BIN(opt_regexpmatch2));
|
3125
3081
|
COLLECT_USAGE_OPERAND(BIN(opt_regexpmatch2), 0, ci);
|
3126
|
-
COLLECT_USAGE_OPERAND(BIN(opt_regexpmatch2), 1, cc);
|
3127
3082
|
{
|
3128
|
-
#line
|
3083
|
+
#line 2193 "insns.def"
|
3129
3084
|
if (CLASS_OF(obj2) == rb_cString &&
|
3130
3085
|
BASIC_OP_UNREDEFINED_P(BOP_MATCH, STRING_REDEFINED_OP_FLAG)) {
|
3131
3086
|
val = rb_reg_match(obj1, obj2);
|
@@ -3136,7 +3091,7 @@ INSN_ENTRY(opt_regexpmatch2){
|
|
3136
3091
|
CALL_SIMPLE_METHOD(obj2);
|
3137
3092
|
}
|
3138
3093
|
|
3139
|
-
#line
|
3094
|
+
#line 3095 "vm.inc"
|
3140
3095
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
3141
3096
|
PUSH(val);
|
3142
3097
|
#undef CURRENT_INSN_opt_regexpmatch2
|
@@ -3158,7 +3113,7 @@ INSN_ENTRY(opt_call_c_function){
|
|
3158
3113
|
COLLECT_USAGE_INSN(BIN(opt_call_c_function));
|
3159
3114
|
COLLECT_USAGE_OPERAND(BIN(opt_call_c_function), 0, funcptr);
|
3160
3115
|
{
|
3161
|
-
#line
|
3116
|
+
#line 2215 "insns.def"
|
3162
3117
|
reg_cfp = (funcptr)(th, reg_cfp);
|
3163
3118
|
|
3164
3119
|
if (reg_cfp == 0) {
|
@@ -3170,7 +3125,7 @@ INSN_ENTRY(opt_call_c_function){
|
|
3170
3125
|
RESTORE_REGS();
|
3171
3126
|
NEXT_INSN();
|
3172
3127
|
|
3173
|
-
#line
|
3128
|
+
#line 3129 "vm.inc"
|
3174
3129
|
#undef CURRENT_INSN_opt_call_c_function
|
3175
3130
|
#undef INSN_IS_SC
|
3176
3131
|
#undef INSN_LABEL
|
@@ -3190,10 +3145,10 @@ INSN_ENTRY(bitblt){
|
|
3190
3145
|
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
3191
3146
|
COLLECT_USAGE_INSN(BIN(bitblt));
|
3192
3147
|
{
|
3193
|
-
#line
|
3148
|
+
#line 2238 "insns.def"
|
3194
3149
|
ret = rb_str_new2("a bit of bacon, lettuce and tomato");
|
3195
3150
|
|
3196
|
-
#line
|
3151
|
+
#line 3152 "vm.inc"
|
3197
3152
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
3198
3153
|
PUSH(ret);
|
3199
3154
|
#undef CURRENT_INSN_bitblt
|
@@ -3215,10 +3170,10 @@ INSN_ENTRY(answer){
|
|
3215
3170
|
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
3216
3171
|
COLLECT_USAGE_INSN(BIN(answer));
|
3217
3172
|
{
|
3218
|
-
#line
|
3173
|
+
#line 2252 "insns.def"
|
3219
3174
|
ret = INT2FIX(42);
|
3220
3175
|
|
3221
|
-
#line
|
3176
|
+
#line 3177 "vm.inc"
|
3222
3177
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
3223
3178
|
PUSH(ret);
|
3224
3179
|
#undef CURRENT_INSN_answer
|
@@ -3244,7 +3199,7 @@ INSN_ENTRY(getlocal_OP__WC__0){
|
|
3244
3199
|
{
|
3245
3200
|
#line 60 "insns.def"
|
3246
3201
|
int i, lev = (int)level;
|
3247
|
-
|
3202
|
+
VALUE *ep = GET_EP();
|
3248
3203
|
|
3249
3204
|
/* optimized insns generated for level == (0|1) in defs/opt_operand.def */
|
3250
3205
|
for (i = 0; i < lev; i++) {
|
@@ -3252,7 +3207,7 @@ INSN_ENTRY(getlocal_OP__WC__0){
|
|
3252
3207
|
}
|
3253
3208
|
val = *(ep - idx);
|
3254
3209
|
|
3255
|
-
#line
|
3210
|
+
#line 3211 "vm.inc"
|
3256
3211
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
3257
3212
|
PUSH(val);
|
3258
3213
|
#undef level
|
@@ -3279,7 +3234,7 @@ INSN_ENTRY(getlocal_OP__WC__1){
|
|
3279
3234
|
{
|
3280
3235
|
#line 60 "insns.def"
|
3281
3236
|
int i, lev = (int)level;
|
3282
|
-
|
3237
|
+
VALUE *ep = GET_EP();
|
3283
3238
|
|
3284
3239
|
/* optimized insns generated for level == (0|1) in defs/opt_operand.def */
|
3285
3240
|
for (i = 0; i < lev; i++) {
|
@@ -3287,7 +3242,7 @@ INSN_ENTRY(getlocal_OP__WC__1){
|
|
3287
3242
|
}
|
3288
3243
|
val = *(ep - idx);
|
3289
3244
|
|
3290
|
-
#line
|
3245
|
+
#line 3246 "vm.inc"
|
3291
3246
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
3292
3247
|
PUSH(val);
|
3293
3248
|
#undef level
|
@@ -3314,15 +3269,15 @@ INSN_ENTRY(setlocal_OP__WC__0){
|
|
3314
3269
|
{
|
3315
3270
|
#line 83 "insns.def"
|
3316
3271
|
int i, lev = (int)level;
|
3317
|
-
|
3272
|
+
VALUE *ep = GET_EP();
|
3318
3273
|
|
3319
3274
|
/* optimized insns generated for level == (0|1) in defs/opt_operand.def */
|
3320
3275
|
for (i = 0; i < lev; i++) {
|
3321
3276
|
ep = GET_PREV_EP(ep);
|
3322
3277
|
}
|
3323
|
-
|
3278
|
+
*(ep - idx) = val;
|
3324
3279
|
|
3325
|
-
#line
|
3280
|
+
#line 3281 "vm.inc"
|
3326
3281
|
#undef level
|
3327
3282
|
#undef CURRENT_INSN_setlocal_OP__WC__0
|
3328
3283
|
#undef INSN_IS_SC
|
@@ -3347,15 +3302,15 @@ INSN_ENTRY(setlocal_OP__WC__1){
|
|
3347
3302
|
{
|
3348
3303
|
#line 83 "insns.def"
|
3349
3304
|
int i, lev = (int)level;
|
3350
|
-
|
3305
|
+
VALUE *ep = GET_EP();
|
3351
3306
|
|
3352
3307
|
/* optimized insns generated for level == (0|1) in defs/opt_operand.def */
|
3353
3308
|
for (i = 0; i < lev; i++) {
|
3354
3309
|
ep = GET_PREV_EP(ep);
|
3355
3310
|
}
|
3356
|
-
|
3311
|
+
*(ep - idx) = val;
|
3357
3312
|
|
3358
|
-
#line
|
3313
|
+
#line 3314 "vm.inc"
|
3359
3314
|
#undef level
|
3360
3315
|
#undef CURRENT_INSN_setlocal_OP__WC__1
|
3361
3316
|
#undef INSN_IS_SC
|
@@ -3379,7 +3334,7 @@ INSN_ENTRY(putobject_OP_INT2FIX_O_0_C_){
|
|
3379
3334
|
#line 299 "insns.def"
|
3380
3335
|
/* */
|
3381
3336
|
|
3382
|
-
#line
|
3337
|
+
#line 3338 "vm.inc"
|
3383
3338
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
3384
3339
|
PUSH(val);
|
3385
3340
|
#undef val
|
@@ -3405,7 +3360,7 @@ INSN_ENTRY(putobject_OP_INT2FIX_O_1_C_){
|
|
3405
3360
|
#line 299 "insns.def"
|
3406
3361
|
/* */
|
3407
3362
|
|
3408
|
-
#line
|
3363
|
+
#line 3364 "vm.inc"
|
3409
3364
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
3410
3365
|
PUSH(val);
|
3411
3366
|
#undef val
|