debase-ruby_core_source 0.9.9 → 0.9.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
iseq.h -
|
|
4
4
|
|
|
5
|
-
$Author:
|
|
5
|
+
$Author: ko1 $
|
|
6
6
|
created at: 04/01/01 23:36:57 JST
|
|
7
7
|
|
|
8
8
|
Copyright (C) 2004-2008 Koichi Sasada
|
|
@@ -27,16 +27,15 @@ rb_call_info_kw_arg_bytes(int keyword_len)
|
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
enum iseq_mark_ary_index {
|
|
30
|
-
ISEQ_MARK_ARY_COVERAGE,
|
|
31
|
-
ISEQ_MARK_ARY_FLIP_CNT,
|
|
32
|
-
ISEQ_MARK_ARY_ORIGINAL_ISEQ,
|
|
33
|
-
ISEQ_MARK_ARY_INITIAL_SIZE
|
|
30
|
+
ISEQ_MARK_ARY_COVERAGE = 0,
|
|
31
|
+
ISEQ_MARK_ARY_FLIP_CNT = 1,
|
|
32
|
+
ISEQ_MARK_ARY_ORIGINAL_ISEQ = 2,
|
|
34
33
|
};
|
|
35
34
|
|
|
36
35
|
static inline VALUE
|
|
37
36
|
iseq_mark_ary_create(int flip_cnt)
|
|
38
37
|
{
|
|
39
|
-
VALUE ary = rb_ary_tmp_new(
|
|
38
|
+
VALUE ary = rb_ary_tmp_new(3);
|
|
40
39
|
rb_ary_push(ary, Qnil); /* ISEQ_MARK_ARY_COVERAGE */
|
|
41
40
|
rb_ary_push(ary, INT2FIX(flip_cnt)); /* ISEQ_MARK_ARY_FLIP_CNT */
|
|
42
41
|
rb_ary_push(ary, Qnil); /* ISEQ_MARK_ARY_ORIGINAL_ISEQ */
|
|
@@ -124,17 +123,16 @@ const rb_iseq_t *rb_method_iseq(VALUE body);
|
|
|
124
123
|
const rb_iseq_t *rb_proc_get_iseq(VALUE proc, int *is_proc);
|
|
125
124
|
|
|
126
125
|
struct rb_compile_option_struct {
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
unsigned int coverage_enabled: 1;
|
|
126
|
+
int inline_const_cache;
|
|
127
|
+
int peephole_optimization;
|
|
128
|
+
int tailcall_optimization;
|
|
129
|
+
int specialized_instruction;
|
|
130
|
+
int operands_unification;
|
|
131
|
+
int instructions_unification;
|
|
132
|
+
int stack_caching;
|
|
133
|
+
int trace_instruction;
|
|
134
|
+
int frozen_string_literal;
|
|
135
|
+
int debug_frozen_string_literal;
|
|
138
136
|
int debug_level;
|
|
139
137
|
};
|
|
140
138
|
|
|
@@ -213,7 +211,6 @@ struct iseq_compile_data {
|
|
|
213
211
|
unsigned int ci_index;
|
|
214
212
|
unsigned int ci_kw_index;
|
|
215
213
|
const rb_compile_option_t *option;
|
|
216
|
-
struct rb_id_table *ivar_cache_table;
|
|
217
214
|
#if SUPPORT_JOKE
|
|
218
215
|
st_table *labels_table;
|
|
219
216
|
#endif
|
|
File without changes
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
method.h -
|
|
4
4
|
|
|
5
|
-
$Author:
|
|
5
|
+
$Author: nagachika $
|
|
6
6
|
created at: Wed Jul 15 20:02:33 2009
|
|
7
7
|
|
|
8
8
|
Copyright (C) 2009 Koichi Sasada
|
|
@@ -205,7 +205,7 @@ void rb_free_method_entry(const rb_method_entry_t *me);
|
|
|
205
205
|
void rb_sweep_method_entry(void *vm);
|
|
206
206
|
|
|
207
207
|
const rb_method_entry_t *rb_method_entry_clone(const rb_method_entry_t *me);
|
|
208
|
-
const rb_callable_method_entry_t *rb_method_entry_complement_defined_class(const rb_method_entry_t *src_me, VALUE defined_class);
|
|
208
|
+
const rb_callable_method_entry_t *rb_method_entry_complement_defined_class(const rb_method_entry_t *src_me, ID called_id, VALUE defined_class);
|
|
209
209
|
void rb_method_entry_copy(rb_method_entry_t *dst, const rb_method_entry_t *src);
|
|
210
210
|
|
|
211
211
|
void rb_scope_visibility_set(rb_method_visibility_t);
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
node.h -
|
|
4
4
|
|
|
5
|
-
$Author:
|
|
5
|
+
$Author: usa $
|
|
6
6
|
created at: Fri May 28 15:14:02 JST 1993
|
|
7
7
|
|
|
8
8
|
Copyright (C) 1993-2007 Yukihiro Matsumoto
|
|
@@ -277,7 +277,7 @@ typedef struct RNode {
|
|
|
277
277
|
|
|
278
278
|
#define NODE_LSHIFT (NODE_TYPESHIFT+7)
|
|
279
279
|
#define NODE_LMASK (((SIGNED_VALUE)1<<(sizeof(VALUE)*CHAR_BIT-NODE_LSHIFT))-1)
|
|
280
|
-
#define nd_line(n) (int)(RNODE(n)->flags>>NODE_LSHIFT)
|
|
280
|
+
#define nd_line(n) (int)(((SIGNED_VALUE)RNODE(n)->flags)>>NODE_LSHIFT)
|
|
281
281
|
#define nd_set_line(n,l) \
|
|
282
282
|
RNODE(n)->flags=((RNODE(n)->flags&~((VALUE)(-1)<<NODE_LSHIFT))|((VALUE)((l)&NODE_LMASK)<<NODE_LSHIFT))
|
|
283
283
|
|
|
File without changes
|
|
@@ -659,20 +659,6 @@ SC_ERROR,
|
|
|
659
659
|
SC_ERROR,
|
|
660
660
|
SC_ERROR,
|
|
661
661
|
SC_ERROR,
|
|
662
|
-
SC_ERROR},
|
|
663
|
-
{
|
|
664
|
-
SC_ERROR,
|
|
665
|
-
SC_ERROR,
|
|
666
|
-
SC_ERROR,
|
|
667
|
-
SC_ERROR,
|
|
668
|
-
SC_ERROR,
|
|
669
|
-
SC_ERROR},
|
|
670
|
-
{
|
|
671
|
-
SC_ERROR,
|
|
672
|
-
SC_ERROR,
|
|
673
|
-
SC_ERROR,
|
|
674
|
-
SC_ERROR,
|
|
675
|
-
SC_ERROR,
|
|
676
662
|
SC_ERROR}
|
|
677
663
|
};
|
|
678
664
|
|
|
@@ -767,8 +753,6 @@ static const VALUE sc_insn_next[] = {
|
|
|
767
753
|
SCS_XX,
|
|
768
754
|
SCS_XX,
|
|
769
755
|
SCS_XX,
|
|
770
|
-
SCS_XX,
|
|
771
|
-
SCS_XX,
|
|
772
756
|
SCS_XX
|
|
773
757
|
};
|
|
774
758
|
|
|
File without changes
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
/* A Bison parser, made by GNU Bison 2.
|
|
1
|
+
/* A Bison parser, made by GNU Bison 2.5. */
|
|
2
2
|
|
|
3
3
|
/* Bison interface for Yacc-like parsers in C
|
|
4
4
|
|
|
5
|
-
Copyright (C) 1984, 1989-1990, 2000-
|
|
5
|
+
Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc.
|
|
6
6
|
|
|
7
7
|
This program is free software: you can redistribute it and/or modify
|
|
8
8
|
it under the terms of the GNU General Public License as published by
|
|
@@ -30,15 +30,6 @@
|
|
|
30
30
|
This special exception was added by the Free Software Foundation in
|
|
31
31
|
version 2.2 of Bison. */
|
|
32
32
|
|
|
33
|
-
#ifndef YY_YY_Y_TAB_H_INCLUDED
|
|
34
|
-
# define YY_YY_Y_TAB_H_INCLUDED
|
|
35
|
-
/* Enabling traces. */
|
|
36
|
-
#ifndef YYDEBUG
|
|
37
|
-
# define YYDEBUG 0
|
|
38
|
-
#endif
|
|
39
|
-
#if YYDEBUG
|
|
40
|
-
extern int yydebug;
|
|
41
|
-
#endif
|
|
42
33
|
|
|
43
34
|
/* Tokens. */
|
|
44
35
|
#ifndef YYTOKENTYPE
|
|
@@ -167,10 +158,12 @@ extern int yydebug;
|
|
|
167
158
|
#endif
|
|
168
159
|
|
|
169
160
|
|
|
161
|
+
|
|
170
162
|
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
|
|
171
163
|
typedef union YYSTYPE
|
|
172
164
|
{
|
|
173
|
-
|
|
165
|
+
|
|
166
|
+
/* Line 2068 of yacc.c */
|
|
174
167
|
|
|
175
168
|
VALUE val;
|
|
176
169
|
NODE *node;
|
|
@@ -179,7 +172,8 @@ typedef union YYSTYPE
|
|
|
179
172
|
const struct vtable *vars;
|
|
180
173
|
|
|
181
174
|
|
|
182
|
-
|
|
175
|
+
|
|
176
|
+
/* Line 2068 of yacc.c */
|
|
183
177
|
} YYSTYPE;
|
|
184
178
|
# define YYSTYPE_IS_TRIVIAL 1
|
|
185
179
|
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
|
|
@@ -187,18 +181,5 @@ typedef union YYSTYPE
|
|
|
187
181
|
#endif
|
|
188
182
|
|
|
189
183
|
|
|
190
|
-
#ifdef YYPARSE_PARAM
|
|
191
|
-
#if defined __STDC__ || defined __cplusplus
|
|
192
|
-
int yyparse (void *YYPARSE_PARAM);
|
|
193
|
-
#else
|
|
194
|
-
int yyparse ();
|
|
195
|
-
#endif
|
|
196
|
-
#else /* ! YYPARSE_PARAM */
|
|
197
|
-
#if defined __STDC__ || defined __cplusplus
|
|
198
|
-
int yyparse (struct parser_params *parser);
|
|
199
|
-
#else
|
|
200
|
-
int yyparse ();
|
|
201
|
-
#endif
|
|
202
|
-
#endif /* ! YYPARSE_PARAM */
|
|
203
184
|
|
|
204
|
-
|
|
185
|
+
|
|
File without changes
|
|
@@ -129,36 +129,33 @@ ONIG_EXTERN int onigenc_ascii_apply_all_case_fold P_((OnigCaseFoldType flag, Oni
|
|
|
129
129
|
ONIG_EXTERN int onigenc_ascii_get_case_fold_codes_by_str P_((OnigCaseFoldType flag, const OnigUChar* p, const OnigUChar* end, OnigCaseFoldCodeItem items[], OnigEncoding enc));
|
|
130
130
|
ONIG_EXTERN int onigenc_apply_all_case_fold_with_map P_((int map_size, const OnigPairCaseFoldCodes map[], int ess_tsett_flag, OnigCaseFoldType flag, OnigApplyAllCaseFoldFunc f, void* arg));
|
|
131
131
|
ONIG_EXTERN int onigenc_get_case_fold_codes_by_str_with_map P_((int map_size, const OnigPairCaseFoldCodes map[], int ess_tsett_flag, OnigCaseFoldType flag, const OnigUChar* p, const OnigUChar* end, OnigCaseFoldCodeItem items[]));
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
ONIG_EXTERN int onigenc_single_byte_ascii_only_case_map P_((OnigCaseFoldType* flagP, const OnigUChar** pp, const OnigUChar* end, OnigUChar* to, OnigUChar* to_end, const struct OnigEncodingTypeST* enc));
|
|
132
|
+
ONIG_EXTERN int onigenc_not_support_get_ctype_code_range P_((OnigCtype ctype, OnigCodePoint* sb_out, const OnigCodePoint* ranges[], OnigEncoding enc));
|
|
133
|
+
ONIG_EXTERN int onigenc_is_mbc_newline_0x0a P_((const UChar* p, const UChar* end, OnigEncoding enc));
|
|
135
134
|
|
|
136
135
|
|
|
137
136
|
/* methods for single byte encoding */
|
|
138
137
|
ONIG_EXTERN int onigenc_ascii_mbc_case_fold P_((OnigCaseFoldType flag, const UChar** p, const UChar* end, UChar* lower, OnigEncoding enc));
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
138
|
+
ONIG_EXTERN int onigenc_single_byte_mbc_enc_len P_((const UChar* p, const UChar* e, OnigEncoding enc));
|
|
139
|
+
ONIG_EXTERN OnigCodePoint onigenc_single_byte_mbc_to_code P_((const UChar* p, const UChar* end, OnigEncoding enc));
|
|
140
|
+
ONIG_EXTERN int onigenc_single_byte_code_to_mbclen P_((OnigCodePoint code, OnigEncoding enc));
|
|
142
141
|
ONIG_EXTERN int onigenc_single_byte_code_to_mbc P_((OnigCodePoint code, UChar *buf, OnigEncoding enc));
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
142
|
+
ONIG_EXTERN UChar* onigenc_single_byte_left_adjust_char_head P_((const UChar* start, const UChar* s, const OnigUChar* end, OnigEncoding enc));
|
|
143
|
+
ONIG_EXTERN int onigenc_always_true_is_allowed_reverse_match P_((const UChar* s, const UChar* end, OnigEncoding enc));
|
|
144
|
+
ONIG_EXTERN int onigenc_always_false_is_allowed_reverse_match P_((const UChar* s, const UChar* end, OnigEncoding enc));
|
|
145
|
+
ONIG_EXTERN int onigenc_ascii_is_code_ctype P_((OnigCodePoint code, unsigned int ctype, OnigEncoding enc));
|
|
147
146
|
|
|
148
147
|
/* methods for multi byte encoding */
|
|
149
148
|
ONIG_EXTERN OnigCodePoint onigenc_mbn_mbc_to_code P_((OnigEncoding enc, const UChar* p, const UChar* end));
|
|
150
149
|
ONIG_EXTERN int onigenc_mbn_mbc_case_fold P_((OnigEncoding enc, OnigCaseFoldType flag, const UChar** p, const UChar* end, UChar* lower));
|
|
151
|
-
|
|
150
|
+
ONIG_EXTERN int onigenc_mb2_code_to_mbclen P_((OnigCodePoint code, OnigEncoding enc));
|
|
152
151
|
ONIG_EXTERN int onigenc_mb2_code_to_mbc P_((OnigEncoding enc, OnigCodePoint code, UChar *buf));
|
|
153
152
|
ONIG_EXTERN int onigenc_minimum_property_name_to_ctype P_((OnigEncoding enc, const UChar* p, const UChar* end));
|
|
154
153
|
ONIG_EXTERN int onigenc_unicode_property_name_to_ctype P_((OnigEncoding enc, const UChar* p, const UChar* end));
|
|
155
154
|
ONIG_EXTERN int onigenc_mb2_is_code_ctype P_((OnigEncoding enc, OnigCodePoint code, unsigned int ctype));
|
|
156
|
-
|
|
155
|
+
ONIG_EXTERN int onigenc_mb4_code_to_mbclen P_((OnigCodePoint code, OnigEncoding enc));
|
|
157
156
|
ONIG_EXTERN int onigenc_mb4_code_to_mbc P_((OnigEncoding enc, OnigCodePoint code, UChar *buf));
|
|
158
157
|
ONIG_EXTERN int onigenc_mb4_is_code_ctype P_((OnigEncoding enc, OnigCodePoint code, unsigned int ctype));
|
|
159
158
|
|
|
160
|
-
ONIG_EXTERN int onigenc_unicode_case_map P_((OnigCaseFoldType* flagP, const OnigUChar** pp, const OnigUChar* end, OnigUChar* to, OnigUChar* to_end, const struct OnigEncodingTypeST* enc));
|
|
161
|
-
|
|
162
159
|
|
|
163
160
|
/* in enc/unicode.c */
|
|
164
161
|
ONIG_EXTERN int onigenc_unicode_is_code_ctype P_((OnigCodePoint code, unsigned int ctype, OnigEncoding enc));
|
|
@@ -172,6 +169,9 @@ ONIG_EXTERN int onigenc_unicode_apply_all_case_fold P_((OnigCaseFoldType flag, O
|
|
|
172
169
|
#define UTF16_IS_SURROGATE_FIRST(c) (((c) & 0xfc) == 0xd8)
|
|
173
170
|
#define UTF16_IS_SURROGATE_SECOND(c) (((c) & 0xfc) == 0xdc)
|
|
174
171
|
#define UTF16_IS_SURROGATE(c) (((c) & 0xf8) == 0xd8)
|
|
172
|
+
#define UNICODE_VALID_CODEPOINT_P(c) ( \
|
|
173
|
+
((c) <= 0x10ffff) && \
|
|
174
|
+
!((c) < 0x10000 && UTF16_IS_SURROGATE((c) >> 8)))
|
|
175
175
|
|
|
176
176
|
#define ONIGENC_ISO_8859_1_TO_LOWER_CASE(c) \
|
|
177
177
|
OnigEncISO_8859_1_ToLowerCaseTable[c]
|
|
@@ -48,18 +48,10 @@
|
|
|
48
48
|
#endif
|
|
49
49
|
#endif
|
|
50
50
|
|
|
51
|
-
#ifndef UNALIGNED_WORD_ACCESS
|
|
52
51
|
#if defined(__i386) || defined(__i386__) || defined(_M_IX86) || \
|
|
53
52
|
defined(__x86_64) || defined(__x86_64__) || defined(_M_AMD64) || \
|
|
54
53
|
defined(__powerpc64__) || \
|
|
55
54
|
defined(__mc68020__)
|
|
56
|
-
#define UNALIGNED_WORD_ACCESS 1
|
|
57
|
-
#else
|
|
58
|
-
#define UNALIGNED_WORD_ACCESS 0
|
|
59
|
-
#endif
|
|
60
|
-
#endif
|
|
61
|
-
|
|
62
|
-
#if UNALIGNED_WORD_ACCESS
|
|
63
55
|
#define PLATFORM_UNALIGNED_WORD_ACCESS
|
|
64
56
|
#endif
|
|
65
57
|
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
#define RUBY_REVISION 59905
|
|
File without changes
|
|
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 {
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -1,31 +1,13 @@
|
|
|
1
|
-
#define RUBY_VERSION "2.
|
|
2
|
-
#define RUBY_RELEASE_DATE
|
|
3
|
-
#define RUBY_PATCHLEVEL
|
|
1
|
+
#define RUBY_VERSION "2.3.5"
|
|
2
|
+
#define RUBY_RELEASE_DATE "2017-09-14"
|
|
3
|
+
#define RUBY_PATCHLEVEL 376
|
|
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
|
|
@@ -68,6 +50,6 @@
|
|
|
68
50
|
"["RUBY_PLATFORM"]"
|
|
69
51
|
# define RUBY_COPYRIGHT \
|
|
70
52
|
"ruby - Copyright (C) " \
|
|
71
|
-
|
|
72
|
-
|
|
53
|
+
STRINGIZE(RUBY_BIRTH_YEAR)"-" \
|
|
54
|
+
STRINGIZE(RUBY_RELEASE_YEAR)" " \
|
|
73
55
|
RUBY_AUTHOR
|
|
@@ -544,10 +544,16 @@ INSN_ENTRY(concatstrings){
|
|
|
544
544
|
COLLECT_USAGE_OPERAND(BIN(concatstrings), 0, num);
|
|
545
545
|
{
|
|
546
546
|
#line 368 "insns.def"
|
|
547
|
-
|
|
547
|
+
rb_num_t i = num - 1;
|
|
548
|
+
|
|
549
|
+
val = rb_str_resurrect(TOPN(i));
|
|
550
|
+
while (i-- > 0) {
|
|
551
|
+
const VALUE v = TOPN(i);
|
|
552
|
+
rb_str_append_literal(val, v);
|
|
553
|
+
}
|
|
548
554
|
POPN(num);
|
|
549
555
|
|
|
550
|
-
#line
|
|
556
|
+
#line 557 "vm.inc"
|
|
551
557
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
|
552
558
|
PUSH(val);
|
|
553
559
|
#undef CURRENT_INSN_concatstrings
|
|
@@ -569,10 +575,10 @@ INSN_ENTRY(tostring){
|
|
|
569
575
|
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
|
570
576
|
COLLECT_USAGE_INSN(BIN(tostring));
|
|
571
577
|
{
|
|
572
|
-
#line
|
|
578
|
+
#line 389 "insns.def"
|
|
573
579
|
val = rb_obj_as_string(val);
|
|
574
580
|
|
|
575
|
-
#line
|
|
581
|
+
#line 582 "vm.inc"
|
|
576
582
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
|
577
583
|
PUSH(val);
|
|
578
584
|
#undef CURRENT_INSN_tostring
|
|
@@ -595,13 +601,13 @@ INSN_ENTRY(freezestring){
|
|
|
595
601
|
COLLECT_USAGE_INSN(BIN(freezestring));
|
|
596
602
|
COLLECT_USAGE_OPERAND(BIN(freezestring), 0, debug_info);
|
|
597
603
|
{
|
|
598
|
-
#line
|
|
604
|
+
#line 403 "insns.def"
|
|
599
605
|
if (!NIL_P(debug_info)) {
|
|
600
606
|
rb_ivar_set(str, id_debug_created_info, debug_info);
|
|
601
607
|
}
|
|
602
608
|
rb_str_freeze(str);
|
|
603
609
|
|
|
604
|
-
#line
|
|
610
|
+
#line 611 "vm.inc"
|
|
605
611
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
|
606
612
|
PUSH(str);
|
|
607
613
|
#undef CURRENT_INSN_freezestring
|
|
@@ -626,7 +632,7 @@ INSN_ENTRY(toregexp){
|
|
|
626
632
|
COLLECT_USAGE_OPERAND(BIN(toregexp), 0, opt);
|
|
627
633
|
COLLECT_USAGE_OPERAND(BIN(toregexp), 1, cnt);
|
|
628
634
|
{
|
|
629
|
-
#line
|
|
635
|
+
#line 421 "insns.def"
|
|
630
636
|
VALUE rb_reg_new_ary(VALUE ary, int options);
|
|
631
637
|
rb_num_t i;
|
|
632
638
|
const VALUE ary = rb_ary_tmp_new(cnt);
|
|
@@ -637,7 +643,7 @@ INSN_ENTRY(toregexp){
|
|
|
637
643
|
val = rb_reg_new_ary(ary, (int)opt);
|
|
638
644
|
rb_ary_clear(ary);
|
|
639
645
|
|
|
640
|
-
#line
|
|
646
|
+
#line 647 "vm.inc"
|
|
641
647
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
|
642
648
|
PUSH(val);
|
|
643
649
|
#undef CURRENT_INSN_toregexp
|
|
@@ -660,11 +666,11 @@ INSN_ENTRY(newarray){
|
|
|
660
666
|
COLLECT_USAGE_INSN(BIN(newarray));
|
|
661
667
|
COLLECT_USAGE_OPERAND(BIN(newarray), 0, num);
|
|
662
668
|
{
|
|
663
|
-
#line
|
|
669
|
+
#line 443 "insns.def"
|
|
664
670
|
val = rb_ary_new4((long)num, STACK_ADDR_FROM_TOP(num));
|
|
665
671
|
POPN(num);
|
|
666
672
|
|
|
667
|
-
#line
|
|
673
|
+
#line 674 "vm.inc"
|
|
668
674
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
|
669
675
|
PUSH(val);
|
|
670
676
|
#undef CURRENT_INSN_newarray
|
|
@@ -687,10 +693,10 @@ INSN_ENTRY(duparray){
|
|
|
687
693
|
COLLECT_USAGE_INSN(BIN(duparray));
|
|
688
694
|
COLLECT_USAGE_OPERAND(BIN(duparray), 0, ary);
|
|
689
695
|
{
|
|
690
|
-
#line
|
|
696
|
+
#line 458 "insns.def"
|
|
691
697
|
val = rb_ary_resurrect(ary);
|
|
692
698
|
|
|
693
|
-
#line
|
|
699
|
+
#line 700 "vm.inc"
|
|
694
700
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
|
695
701
|
PUSH(val);
|
|
696
702
|
#undef CURRENT_INSN_duparray
|
|
@@ -715,10 +721,10 @@ INSN_ENTRY(expandarray){
|
|
|
715
721
|
COLLECT_USAGE_OPERAND(BIN(expandarray), 0, num);
|
|
716
722
|
COLLECT_USAGE_OPERAND(BIN(expandarray), 1, flag);
|
|
717
723
|
{
|
|
718
|
-
#line
|
|
724
|
+
#line 479 "insns.def"
|
|
719
725
|
vm_expandarray(GET_CFP(), ary, num, (int)flag);
|
|
720
726
|
|
|
721
|
-
#line
|
|
727
|
+
#line 728 "vm.inc"
|
|
722
728
|
#undef CURRENT_INSN_expandarray
|
|
723
729
|
#undef INSN_IS_SC
|
|
724
730
|
#undef INSN_LABEL
|
|
@@ -740,7 +746,7 @@ INSN_ENTRY(concatarray){
|
|
|
740
746
|
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
|
741
747
|
COLLECT_USAGE_INSN(BIN(concatarray));
|
|
742
748
|
{
|
|
743
|
-
#line
|
|
749
|
+
#line 493 "insns.def"
|
|
744
750
|
const VALUE ary2 = ary2st;
|
|
745
751
|
VALUE tmp1 = rb_check_convert_type(ary1, T_ARRAY, "Array", "to_a");
|
|
746
752
|
VALUE tmp2 = rb_check_convert_type(ary2, T_ARRAY, "Array", "to_a");
|
|
@@ -758,7 +764,7 @@ INSN_ENTRY(concatarray){
|
|
|
758
764
|
}
|
|
759
765
|
ary = rb_ary_concat(tmp1, tmp2);
|
|
760
766
|
|
|
761
|
-
#line
|
|
767
|
+
#line 768 "vm.inc"
|
|
762
768
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
|
763
769
|
PUSH(ary);
|
|
764
770
|
#undef CURRENT_INSN_concatarray
|
|
@@ -782,7 +788,7 @@ INSN_ENTRY(splatarray){
|
|
|
782
788
|
COLLECT_USAGE_INSN(BIN(splatarray));
|
|
783
789
|
COLLECT_USAGE_OPERAND(BIN(splatarray), 0, flag);
|
|
784
790
|
{
|
|
785
|
-
#line
|
|
791
|
+
#line 522 "insns.def"
|
|
786
792
|
VALUE tmp = rb_check_convert_type(ary, T_ARRAY, "Array", "to_a");
|
|
787
793
|
if (NIL_P(tmp)) {
|
|
788
794
|
tmp = rb_ary_new3(1, ary);
|
|
@@ -792,7 +798,7 @@ INSN_ENTRY(splatarray){
|
|
|
792
798
|
}
|
|
793
799
|
obj = tmp;
|
|
794
800
|
|
|
795
|
-
#line
|
|
801
|
+
#line 802 "vm.inc"
|
|
796
802
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
|
797
803
|
PUSH(obj);
|
|
798
804
|
#undef CURRENT_INSN_splatarray
|
|
@@ -815,7 +821,7 @@ INSN_ENTRY(newhash){
|
|
|
815
821
|
COLLECT_USAGE_INSN(BIN(newhash));
|
|
816
822
|
COLLECT_USAGE_OPERAND(BIN(newhash), 0, num);
|
|
817
823
|
{
|
|
818
|
-
#line
|
|
824
|
+
#line 544 "insns.def"
|
|
819
825
|
rb_num_t i;
|
|
820
826
|
|
|
821
827
|
RUBY_DTRACE_CREATE_HOOK(HASH, num);
|
|
@@ -829,7 +835,7 @@ INSN_ENTRY(newhash){
|
|
|
829
835
|
}
|
|
830
836
|
POPN(num);
|
|
831
837
|
|
|
832
|
-
#line
|
|
838
|
+
#line 839 "vm.inc"
|
|
833
839
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
|
834
840
|
PUSH(val);
|
|
835
841
|
#undef CURRENT_INSN_newhash
|
|
@@ -854,10 +860,10 @@ INSN_ENTRY(newrange){
|
|
|
854
860
|
COLLECT_USAGE_INSN(BIN(newrange));
|
|
855
861
|
COLLECT_USAGE_OPERAND(BIN(newrange), 0, flag);
|
|
856
862
|
{
|
|
857
|
-
#line
|
|
863
|
+
#line 569 "insns.def"
|
|
858
864
|
val = rb_range_new(low, high, (int)flag);
|
|
859
865
|
|
|
860
|
-
#line
|
|
866
|
+
#line 867 "vm.inc"
|
|
861
867
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
|
862
868
|
PUSH(val);
|
|
863
869
|
#undef CURRENT_INSN_newrange
|
|
@@ -879,11 +885,11 @@ INSN_ENTRY(pop){
|
|
|
879
885
|
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
|
880
886
|
COLLECT_USAGE_INSN(BIN(pop));
|
|
881
887
|
{
|
|
882
|
-
#line
|
|
888
|
+
#line 587 "insns.def"
|
|
883
889
|
(void)val;
|
|
884
890
|
/* none */
|
|
885
891
|
|
|
886
|
-
#line
|
|
892
|
+
#line 893 "vm.inc"
|
|
887
893
|
#undef CURRENT_INSN_pop
|
|
888
894
|
#undef INSN_IS_SC
|
|
889
895
|
#undef INSN_LABEL
|
|
@@ -905,10 +911,10 @@ INSN_ENTRY(dup){
|
|
|
905
911
|
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
|
906
912
|
COLLECT_USAGE_INSN(BIN(dup));
|
|
907
913
|
{
|
|
908
|
-
#line
|
|
914
|
+
#line 602 "insns.def"
|
|
909
915
|
val1 = val2 = val;
|
|
910
916
|
|
|
911
|
-
#line
|
|
917
|
+
#line 918 "vm.inc"
|
|
912
918
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 2);
|
|
913
919
|
PUSH(val1);
|
|
914
920
|
PUSH(val2);
|
|
@@ -931,7 +937,7 @@ INSN_ENTRY(dupn){
|
|
|
931
937
|
COLLECT_USAGE_INSN(BIN(dupn));
|
|
932
938
|
COLLECT_USAGE_OPERAND(BIN(dupn), 0, n);
|
|
933
939
|
{
|
|
934
|
-
#line
|
|
940
|
+
#line 616 "insns.def"
|
|
935
941
|
rb_num_t i;
|
|
936
942
|
VALUE *sp = STACK_ADDR_FROM_TOP(n);
|
|
937
943
|
for (i = 0; i < n; i++) {
|
|
@@ -939,7 +945,7 @@ INSN_ENTRY(dupn){
|
|
|
939
945
|
}
|
|
940
946
|
INC_SP(n);
|
|
941
947
|
|
|
942
|
-
#line
|
|
948
|
+
#line 949 "vm.inc"
|
|
943
949
|
#undef CURRENT_INSN_dupn
|
|
944
950
|
#undef INSN_IS_SC
|
|
945
951
|
#undef INSN_LABEL
|
|
@@ -960,10 +966,10 @@ INSN_ENTRY(swap){
|
|
|
960
966
|
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
|
961
967
|
COLLECT_USAGE_INSN(BIN(swap));
|
|
962
968
|
{
|
|
963
|
-
#line
|
|
969
|
+
#line 636 "insns.def"
|
|
964
970
|
/* none */
|
|
965
971
|
|
|
966
|
-
#line
|
|
972
|
+
#line 973 "vm.inc"
|
|
967
973
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 2);
|
|
968
974
|
PUSH(obj);
|
|
969
975
|
PUSH(val);
|
|
@@ -986,7 +992,7 @@ INSN_ENTRY(reverse){
|
|
|
986
992
|
COLLECT_USAGE_INSN(BIN(reverse));
|
|
987
993
|
COLLECT_USAGE_OPERAND(BIN(reverse), 0, n);
|
|
988
994
|
{
|
|
989
|
-
#line
|
|
995
|
+
#line 650 "insns.def"
|
|
990
996
|
rb_num_t i;
|
|
991
997
|
VALUE *sp = STACK_ADDR_FROM_TOP(n);
|
|
992
998
|
|
|
@@ -997,7 +1003,7 @@ INSN_ENTRY(reverse){
|
|
|
997
1003
|
TOPN(i) = v0;
|
|
998
1004
|
}
|
|
999
1005
|
|
|
1000
|
-
#line
|
|
1006
|
+
#line 1007 "vm.inc"
|
|
1001
1007
|
#undef CURRENT_INSN_reverse
|
|
1002
1008
|
#undef INSN_IS_SC
|
|
1003
1009
|
#undef INSN_LABEL
|
|
@@ -1017,10 +1023,10 @@ INSN_ENTRY(reput){
|
|
|
1017
1023
|
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
|
1018
1024
|
COLLECT_USAGE_INSN(BIN(reput));
|
|
1019
1025
|
{
|
|
1020
|
-
#line
|
|
1026
|
+
#line 672 "insns.def"
|
|
1021
1027
|
/* none */
|
|
1022
1028
|
|
|
1023
|
-
#line
|
|
1029
|
+
#line 1030 "vm.inc"
|
|
1024
1030
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
|
1025
1031
|
PUSH(val);
|
|
1026
1032
|
#undef CURRENT_INSN_reput
|
|
@@ -1043,10 +1049,10 @@ INSN_ENTRY(topn){
|
|
|
1043
1049
|
COLLECT_USAGE_INSN(BIN(topn));
|
|
1044
1050
|
COLLECT_USAGE_OPERAND(BIN(topn), 0, n);
|
|
1045
1051
|
{
|
|
1046
|
-
#line
|
|
1052
|
+
#line 686 "insns.def"
|
|
1047
1053
|
val = TOPN(n);
|
|
1048
1054
|
|
|
1049
|
-
#line
|
|
1055
|
+
#line 1056 "vm.inc"
|
|
1050
1056
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
|
1051
1057
|
PUSH(val);
|
|
1052
1058
|
#undef CURRENT_INSN_topn
|
|
@@ -1069,10 +1075,10 @@ INSN_ENTRY(setn){
|
|
|
1069
1075
|
COLLECT_USAGE_INSN(BIN(setn));
|
|
1070
1076
|
COLLECT_USAGE_OPERAND(BIN(setn), 0, n);
|
|
1071
1077
|
{
|
|
1072
|
-
#line
|
|
1078
|
+
#line 700 "insns.def"
|
|
1073
1079
|
TOPN(n-1) = val;
|
|
1074
1080
|
|
|
1075
|
-
#line
|
|
1081
|
+
#line 1082 "vm.inc"
|
|
1076
1082
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
|
1077
1083
|
PUSH(val);
|
|
1078
1084
|
#undef CURRENT_INSN_setn
|
|
@@ -1094,10 +1100,10 @@ INSN_ENTRY(adjuststack){
|
|
|
1094
1100
|
COLLECT_USAGE_INSN(BIN(adjuststack));
|
|
1095
1101
|
COLLECT_USAGE_OPERAND(BIN(adjuststack), 0, n);
|
|
1096
1102
|
{
|
|
1097
|
-
#line
|
|
1103
|
+
#line 714 "insns.def"
|
|
1098
1104
|
DEC_SP(n);
|
|
1099
1105
|
|
|
1100
|
-
#line
|
|
1106
|
+
#line 1107 "vm.inc"
|
|
1101
1107
|
#undef CURRENT_INSN_adjuststack
|
|
1102
1108
|
#undef INSN_IS_SC
|
|
1103
1109
|
#undef INSN_LABEL
|
|
@@ -1123,10 +1129,10 @@ INSN_ENTRY(defined){
|
|
|
1123
1129
|
COLLECT_USAGE_OPERAND(BIN(defined), 1, obj);
|
|
1124
1130
|
COLLECT_USAGE_OPERAND(BIN(defined), 2, needstr);
|
|
1125
1131
|
{
|
|
1126
|
-
#line
|
|
1132
|
+
#line 733 "insns.def"
|
|
1127
1133
|
val = vm_defined(th, GET_CFP(), op_type, obj, needstr, v);
|
|
1128
1134
|
|
|
1129
|
-
#line
|
|
1135
|
+
#line 1136 "vm.inc"
|
|
1130
1136
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
|
1131
1137
|
PUSH(val);
|
|
1132
1138
|
#undef CURRENT_INSN_defined
|
|
@@ -1151,7 +1157,7 @@ INSN_ENTRY(checkmatch){
|
|
|
1151
1157
|
COLLECT_USAGE_INSN(BIN(checkmatch));
|
|
1152
1158
|
COLLECT_USAGE_OPERAND(BIN(checkmatch), 0, flag);
|
|
1153
1159
|
{
|
|
1154
|
-
#line
|
|
1160
|
+
#line 752 "insns.def"
|
|
1155
1161
|
enum vm_check_match_type checkmatch_type =
|
|
1156
1162
|
(enum vm_check_match_type)(flag & VM_CHECKMATCH_TYPE_MASK);
|
|
1157
1163
|
result = Qfalse;
|
|
@@ -1171,7 +1177,7 @@ INSN_ENTRY(checkmatch){
|
|
|
1171
1177
|
}
|
|
1172
1178
|
}
|
|
1173
1179
|
|
|
1174
|
-
#line
|
|
1180
|
+
#line 1181 "vm.inc"
|
|
1175
1181
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
|
1176
1182
|
PUSH(result);
|
|
1177
1183
|
#undef CURRENT_INSN_checkmatch
|
|
@@ -1196,7 +1202,7 @@ INSN_ENTRY(checkkeyword){
|
|
|
1196
1202
|
COLLECT_USAGE_OPERAND(BIN(checkkeyword), 0, kw_bits_index);
|
|
1197
1203
|
COLLECT_USAGE_OPERAND(BIN(checkkeyword), 1, keyword_index);
|
|
1198
1204
|
{
|
|
1199
|
-
#line
|
|
1205
|
+
#line 783 "insns.def"
|
|
1200
1206
|
const VALUE *ep = GET_EP();
|
|
1201
1207
|
const VALUE kw_bits = *(ep - kw_bits_index);
|
|
1202
1208
|
|
|
@@ -1209,7 +1215,7 @@ INSN_ENTRY(checkkeyword){
|
|
|
1209
1215
|
ret = rb_hash_has_key(kw_bits, INT2FIX(keyword_index)) ? Qfalse : Qtrue;
|
|
1210
1216
|
}
|
|
1211
1217
|
|
|
1212
|
-
#line
|
|
1218
|
+
#line 1219 "vm.inc"
|
|
1213
1219
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
|
1214
1220
|
PUSH(ret);
|
|
1215
1221
|
#undef CURRENT_INSN_checkkeyword
|
|
@@ -1231,7 +1237,7 @@ INSN_ENTRY(trace){
|
|
|
1231
1237
|
COLLECT_USAGE_INSN(BIN(trace));
|
|
1232
1238
|
COLLECT_USAGE_OPERAND(BIN(trace), 0, nf);
|
|
1233
1239
|
{
|
|
1234
|
-
#line
|
|
1240
|
+
#line 807 "insns.def"
|
|
1235
1241
|
rb_event_flag_t flag = (rb_event_flag_t)nf;
|
|
1236
1242
|
|
|
1237
1243
|
if (RUBY_DTRACE_METHOD_ENTRY_ENABLED() ||
|
|
@@ -1258,7 +1264,7 @@ INSN_ENTRY(trace){
|
|
|
1258
1264
|
EXEC_EVENT_HOOK(th, flag, GET_SELF(), 0, 0 /* id and klass are resolved at callee */,
|
|
1259
1265
|
(flag & (RUBY_EVENT_RETURN | RUBY_EVENT_B_RETURN)) ? TOPN(0) : Qundef);
|
|
1260
1266
|
|
|
1261
|
-
#line
|
|
1267
|
+
#line 1268 "vm.inc"
|
|
1262
1268
|
#undef CURRENT_INSN_trace
|
|
1263
1269
|
#undef INSN_IS_SC
|
|
1264
1270
|
#undef INSN_LABEL
|
|
@@ -1285,7 +1291,7 @@ INSN_ENTRY(defineclass){
|
|
|
1285
1291
|
COLLECT_USAGE_OPERAND(BIN(defineclass), 1, class_iseq);
|
|
1286
1292
|
COLLECT_USAGE_OPERAND(BIN(defineclass), 2, flags);
|
|
1287
1293
|
{
|
|
1288
|
-
#line
|
|
1294
|
+
#line 853 "insns.def"
|
|
1289
1295
|
VALUE klass;
|
|
1290
1296
|
rb_vm_defineclass_type_t type = VM_DEFINECLASS_TYPE(flags);
|
|
1291
1297
|
|
|
@@ -1375,7 +1381,7 @@ INSN_ENTRY(defineclass){
|
|
|
1375
1381
|
RESTORE_REGS();
|
|
1376
1382
|
NEXT_INSN();
|
|
1377
1383
|
|
|
1378
|
-
#line
|
|
1384
|
+
#line 1385 "vm.inc"
|
|
1379
1385
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
|
1380
1386
|
PUSH(val);
|
|
1381
1387
|
#undef CURRENT_INSN_defineclass
|
|
@@ -1402,14 +1408,14 @@ INSN_ENTRY(send){
|
|
|
1402
1408
|
COLLECT_USAGE_OPERAND(BIN(send), 1, cc);
|
|
1403
1409
|
COLLECT_USAGE_OPERAND(BIN(send), 2, blockiseq);
|
|
1404
1410
|
{
|
|
1405
|
-
#line
|
|
1411
|
+
#line 959 "insns.def"
|
|
1406
1412
|
struct rb_calling_info calling;
|
|
1407
1413
|
|
|
1408
1414
|
vm_caller_setup_arg_block(th, reg_cfp, &calling, ci, blockiseq, FALSE);
|
|
1409
1415
|
vm_search_method(ci, cc, calling.recv = TOPN(calling.argc = ci->orig_argc));
|
|
1410
1416
|
CALL_METHOD(&calling, ci, cc);
|
|
1411
1417
|
|
|
1412
|
-
#line
|
|
1418
|
+
#line 1419 "vm.inc"
|
|
1413
1419
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
|
1414
1420
|
PUSH(val);
|
|
1415
1421
|
#undef CURRENT_INSN_send
|
|
@@ -1432,7 +1438,7 @@ INSN_ENTRY(opt_str_freeze){
|
|
|
1432
1438
|
COLLECT_USAGE_INSN(BIN(opt_str_freeze));
|
|
1433
1439
|
COLLECT_USAGE_OPERAND(BIN(opt_str_freeze), 0, str);
|
|
1434
1440
|
{
|
|
1435
|
-
#line
|
|
1441
|
+
#line 972 "insns.def"
|
|
1436
1442
|
if (BASIC_OP_UNREDEFINED_P(BOP_FREEZE, STRING_REDEFINED_OP_FLAG)) {
|
|
1437
1443
|
val = str;
|
|
1438
1444
|
}
|
|
@@ -1440,7 +1446,7 @@ INSN_ENTRY(opt_str_freeze){
|
|
|
1440
1446
|
val = rb_funcall(rb_str_resurrect(str), idFreeze, 0);
|
|
1441
1447
|
}
|
|
1442
1448
|
|
|
1443
|
-
#line
|
|
1449
|
+
#line 1450 "vm.inc"
|
|
1444
1450
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
|
1445
1451
|
PUSH(val);
|
|
1446
1452
|
#undef CURRENT_INSN_opt_str_freeze
|
|
@@ -1448,108 +1454,6 @@ INSN_ENTRY(opt_str_freeze){
|
|
|
1448
1454
|
#undef INSN_LABEL
|
|
1449
1455
|
#undef LABEL_IS_SC
|
|
1450
1456
|
END_INSN(opt_str_freeze);}}}
|
|
1451
|
-
INSN_ENTRY(opt_newarray_max){
|
|
1452
|
-
{
|
|
1453
|
-
VALUE val;
|
|
1454
|
-
rb_num_t num = (rb_num_t)GET_OPERAND(1);
|
|
1455
|
-
|
|
1456
|
-
DEBUG_ENTER_INSN("opt_newarray_max");
|
|
1457
|
-
ADD_PC(1+1);
|
|
1458
|
-
PREFETCH(GET_PC());
|
|
1459
|
-
#define CURRENT_INSN_opt_newarray_max 1
|
|
1460
|
-
#define INSN_IS_SC() 0
|
|
1461
|
-
#define INSN_LABEL(lab) LABEL_opt_newarray_max_##lab
|
|
1462
|
-
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
|
1463
|
-
COLLECT_USAGE_INSN(BIN(opt_newarray_max));
|
|
1464
|
-
COLLECT_USAGE_OPERAND(BIN(opt_newarray_max), 0, num);
|
|
1465
|
-
{
|
|
1466
|
-
#line 988 "insns.def"
|
|
1467
|
-
#define id_cmp idCmp
|
|
1468
|
-
if (BASIC_OP_UNREDEFINED_P(BOP_MAX, ARRAY_REDEFINED_OP_FLAG)) {
|
|
1469
|
-
if (num == 0) {
|
|
1470
|
-
val = Qnil;
|
|
1471
|
-
}
|
|
1472
|
-
else {
|
|
1473
|
-
struct cmp_opt_data cmp_opt = { 0, 0 };
|
|
1474
|
-
VALUE result = Qundef;
|
|
1475
|
-
rb_num_t i = num - 1;
|
|
1476
|
-
result = TOPN(i);
|
|
1477
|
-
while (i-- > 0) {
|
|
1478
|
-
const VALUE v = TOPN(i);
|
|
1479
|
-
if (result == Qundef || OPTIMIZED_CMP(v, result, cmp_opt) > 0) {
|
|
1480
|
-
result = v;
|
|
1481
|
-
}
|
|
1482
|
-
}
|
|
1483
|
-
val = result == Qundef ? Qnil : result;
|
|
1484
|
-
}
|
|
1485
|
-
POPN(num);
|
|
1486
|
-
}
|
|
1487
|
-
else {
|
|
1488
|
-
VALUE ary = rb_ary_new4((long)num, STACK_ADDR_FROM_TOP(num));
|
|
1489
|
-
val = rb_funcall(ary, idMax, 0);
|
|
1490
|
-
POPN(num);
|
|
1491
|
-
}
|
|
1492
|
-
#undef id_cmp
|
|
1493
|
-
|
|
1494
|
-
#line 1495 "vm.inc"
|
|
1495
|
-
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
|
1496
|
-
PUSH(val);
|
|
1497
|
-
#undef CURRENT_INSN_opt_newarray_max
|
|
1498
|
-
#undef INSN_IS_SC
|
|
1499
|
-
#undef INSN_LABEL
|
|
1500
|
-
#undef LABEL_IS_SC
|
|
1501
|
-
END_INSN(opt_newarray_max);}}}
|
|
1502
|
-
INSN_ENTRY(opt_newarray_min){
|
|
1503
|
-
{
|
|
1504
|
-
VALUE val;
|
|
1505
|
-
rb_num_t num = (rb_num_t)GET_OPERAND(1);
|
|
1506
|
-
|
|
1507
|
-
DEBUG_ENTER_INSN("opt_newarray_min");
|
|
1508
|
-
ADD_PC(1+1);
|
|
1509
|
-
PREFETCH(GET_PC());
|
|
1510
|
-
#define CURRENT_INSN_opt_newarray_min 1
|
|
1511
|
-
#define INSN_IS_SC() 0
|
|
1512
|
-
#define INSN_LABEL(lab) LABEL_opt_newarray_min_##lab
|
|
1513
|
-
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
|
1514
|
-
COLLECT_USAGE_INSN(BIN(opt_newarray_min));
|
|
1515
|
-
COLLECT_USAGE_OPERAND(BIN(opt_newarray_min), 0, num);
|
|
1516
|
-
{
|
|
1517
|
-
#line 1022 "insns.def"
|
|
1518
|
-
#define id_cmp idCmp
|
|
1519
|
-
if (BASIC_OP_UNREDEFINED_P(BOP_MIN, ARRAY_REDEFINED_OP_FLAG)) {
|
|
1520
|
-
if (num == 0) {
|
|
1521
|
-
val = Qnil;
|
|
1522
|
-
}
|
|
1523
|
-
else {
|
|
1524
|
-
struct cmp_opt_data cmp_opt = { 0, 0 };
|
|
1525
|
-
VALUE result = Qundef;
|
|
1526
|
-
rb_num_t i = num - 1;
|
|
1527
|
-
result = TOPN(i);
|
|
1528
|
-
while (i-- > 0) {
|
|
1529
|
-
const VALUE v = TOPN(i);
|
|
1530
|
-
if (result == Qundef || OPTIMIZED_CMP(v, result, cmp_opt) < 0) {
|
|
1531
|
-
result = v;
|
|
1532
|
-
}
|
|
1533
|
-
}
|
|
1534
|
-
val = result == Qundef ? Qnil : result;
|
|
1535
|
-
}
|
|
1536
|
-
POPN(num);
|
|
1537
|
-
}
|
|
1538
|
-
else {
|
|
1539
|
-
VALUE ary = rb_ary_new4((long)num, STACK_ADDR_FROM_TOP(num));
|
|
1540
|
-
val = rb_funcall(ary, idMin, 0);
|
|
1541
|
-
POPN(num);
|
|
1542
|
-
}
|
|
1543
|
-
#undef id_cmp
|
|
1544
|
-
|
|
1545
|
-
#line 1546 "vm.inc"
|
|
1546
|
-
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
|
1547
|
-
PUSH(val);
|
|
1548
|
-
#undef CURRENT_INSN_opt_newarray_min
|
|
1549
|
-
#undef INSN_IS_SC
|
|
1550
|
-
#undef INSN_LABEL
|
|
1551
|
-
#undef LABEL_IS_SC
|
|
1552
|
-
END_INSN(opt_newarray_min);}}}
|
|
1553
1457
|
INSN_ENTRY(opt_send_without_block){
|
|
1554
1458
|
{
|
|
1555
1459
|
VALUE val;
|
|
@@ -1567,13 +1471,13 @@ INSN_ENTRY(opt_send_without_block){
|
|
|
1567
1471
|
COLLECT_USAGE_OPERAND(BIN(opt_send_without_block), 0, ci);
|
|
1568
1472
|
COLLECT_USAGE_OPERAND(BIN(opt_send_without_block), 1, cc);
|
|
1569
1473
|
{
|
|
1570
|
-
#line
|
|
1474
|
+
#line 991 "insns.def"
|
|
1571
1475
|
struct rb_calling_info calling;
|
|
1572
1476
|
calling.blockptr = NULL;
|
|
1573
1477
|
vm_search_method(ci, cc, calling.recv = TOPN(calling.argc = ci->orig_argc));
|
|
1574
1478
|
CALL_METHOD(&calling, ci, cc);
|
|
1575
1479
|
|
|
1576
|
-
#line
|
|
1480
|
+
#line 1481 "vm.inc"
|
|
1577
1481
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
|
1578
1482
|
PUSH(val);
|
|
1579
1483
|
#undef CURRENT_INSN_opt_send_without_block
|
|
@@ -1600,7 +1504,7 @@ INSN_ENTRY(invokesuper){
|
|
|
1600
1504
|
COLLECT_USAGE_OPERAND(BIN(invokesuper), 1, cc);
|
|
1601
1505
|
COLLECT_USAGE_OPERAND(BIN(invokesuper), 2, blockiseq);
|
|
1602
1506
|
{
|
|
1603
|
-
#line
|
|
1507
|
+
#line 1008 "insns.def"
|
|
1604
1508
|
struct rb_calling_info calling;
|
|
1605
1509
|
calling.argc = ci->orig_argc;
|
|
1606
1510
|
|
|
@@ -1609,7 +1513,7 @@ INSN_ENTRY(invokesuper){
|
|
|
1609
1513
|
vm_search_super_method(th, GET_CFP(), &calling, ci, cc);
|
|
1610
1514
|
CALL_METHOD(&calling, ci, cc);
|
|
1611
1515
|
|
|
1612
|
-
#line
|
|
1516
|
+
#line 1517 "vm.inc"
|
|
1613
1517
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
|
1614
1518
|
PUSH(val);
|
|
1615
1519
|
#undef CURRENT_INSN_invokesuper
|
|
@@ -1632,7 +1536,7 @@ INSN_ENTRY(invokeblock){
|
|
|
1632
1536
|
COLLECT_USAGE_INSN(BIN(invokeblock));
|
|
1633
1537
|
COLLECT_USAGE_OPERAND(BIN(invokeblock), 0, ci);
|
|
1634
1538
|
{
|
|
1635
|
-
#line
|
|
1539
|
+
#line 1028 "insns.def"
|
|
1636
1540
|
struct rb_calling_info calling;
|
|
1637
1541
|
calling.argc = ci->orig_argc;
|
|
1638
1542
|
calling.blockptr = NULL;
|
|
@@ -1644,7 +1548,7 @@ INSN_ENTRY(invokeblock){
|
|
|
1644
1548
|
NEXT_INSN();
|
|
1645
1549
|
}
|
|
1646
1550
|
|
|
1647
|
-
#line
|
|
1551
|
+
#line 1552 "vm.inc"
|
|
1648
1552
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
|
1649
1553
|
PUSH(val);
|
|
1650
1554
|
#undef CURRENT_INSN_invokeblock
|
|
@@ -1666,7 +1570,7 @@ INSN_ENTRY(leave){
|
|
|
1666
1570
|
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
|
1667
1571
|
COLLECT_USAGE_INSN(BIN(leave));
|
|
1668
1572
|
{
|
|
1669
|
-
#line
|
|
1573
|
+
#line 1051 "insns.def"
|
|
1670
1574
|
if (OPT_CHECKED_RUN) {
|
|
1671
1575
|
const VALUE *const bp = vm_base_ptr(reg_cfp);
|
|
1672
1576
|
if (reg_cfp->sp != bp) {
|
|
@@ -1692,7 +1596,7 @@ INSN_ENTRY(leave){
|
|
|
1692
1596
|
RESTORE_REGS();
|
|
1693
1597
|
}
|
|
1694
1598
|
|
|
1695
|
-
#line
|
|
1599
|
+
#line 1600 "vm.inc"
|
|
1696
1600
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
|
1697
1601
|
PUSH(val);
|
|
1698
1602
|
#undef CURRENT_INSN_leave
|
|
@@ -1716,13 +1620,13 @@ INSN_ENTRY(throw){
|
|
|
1716
1620
|
COLLECT_USAGE_INSN(BIN(throw));
|
|
1717
1621
|
COLLECT_USAGE_OPERAND(BIN(throw), 0, throw_state);
|
|
1718
1622
|
{
|
|
1719
|
-
#line
|
|
1623
|
+
#line 1092 "insns.def"
|
|
1720
1624
|
RUBY_VM_CHECK_INTS(th);
|
|
1721
1625
|
val = vm_throw(th, GET_CFP(), throw_state, throwobj);
|
|
1722
1626
|
THROW_EXCEPTION(val);
|
|
1723
1627
|
/* unreachable */
|
|
1724
1628
|
|
|
1725
|
-
#line
|
|
1629
|
+
#line 1630 "vm.inc"
|
|
1726
1630
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
|
1727
1631
|
PUSH(val);
|
|
1728
1632
|
#undef CURRENT_INSN_throw
|
|
@@ -1744,11 +1648,11 @@ INSN_ENTRY(jump){
|
|
|
1744
1648
|
COLLECT_USAGE_INSN(BIN(jump));
|
|
1745
1649
|
COLLECT_USAGE_OPERAND(BIN(jump), 0, dst);
|
|
1746
1650
|
{
|
|
1747
|
-
#line
|
|
1651
|
+
#line 1113 "insns.def"
|
|
1748
1652
|
RUBY_VM_CHECK_INTS(th);
|
|
1749
1653
|
JUMP(dst);
|
|
1750
1654
|
|
|
1751
|
-
#line
|
|
1655
|
+
#line 1656 "vm.inc"
|
|
1752
1656
|
#undef CURRENT_INSN_jump
|
|
1753
1657
|
#undef INSN_IS_SC
|
|
1754
1658
|
#undef INSN_LABEL
|
|
@@ -1769,13 +1673,13 @@ INSN_ENTRY(branchif){
|
|
|
1769
1673
|
COLLECT_USAGE_INSN(BIN(branchif));
|
|
1770
1674
|
COLLECT_USAGE_OPERAND(BIN(branchif), 0, dst);
|
|
1771
1675
|
{
|
|
1772
|
-
#line
|
|
1676
|
+
#line 1128 "insns.def"
|
|
1773
1677
|
if (RTEST(val)) {
|
|
1774
1678
|
RUBY_VM_CHECK_INTS(th);
|
|
1775
1679
|
JUMP(dst);
|
|
1776
1680
|
}
|
|
1777
1681
|
|
|
1778
|
-
#line
|
|
1682
|
+
#line 1683 "vm.inc"
|
|
1779
1683
|
#undef CURRENT_INSN_branchif
|
|
1780
1684
|
#undef INSN_IS_SC
|
|
1781
1685
|
#undef INSN_LABEL
|
|
@@ -1796,13 +1700,13 @@ INSN_ENTRY(branchunless){
|
|
|
1796
1700
|
COLLECT_USAGE_INSN(BIN(branchunless));
|
|
1797
1701
|
COLLECT_USAGE_OPERAND(BIN(branchunless), 0, dst);
|
|
1798
1702
|
{
|
|
1799
|
-
#line
|
|
1703
|
+
#line 1145 "insns.def"
|
|
1800
1704
|
if (!RTEST(val)) {
|
|
1801
1705
|
RUBY_VM_CHECK_INTS(th);
|
|
1802
1706
|
JUMP(dst);
|
|
1803
1707
|
}
|
|
1804
1708
|
|
|
1805
|
-
#line
|
|
1709
|
+
#line 1710 "vm.inc"
|
|
1806
1710
|
#undef CURRENT_INSN_branchunless
|
|
1807
1711
|
#undef INSN_IS_SC
|
|
1808
1712
|
#undef INSN_LABEL
|
|
@@ -1823,13 +1727,13 @@ INSN_ENTRY(branchnil){
|
|
|
1823
1727
|
COLLECT_USAGE_INSN(BIN(branchnil));
|
|
1824
1728
|
COLLECT_USAGE_OPERAND(BIN(branchnil), 0, dst);
|
|
1825
1729
|
{
|
|
1826
|
-
#line
|
|
1730
|
+
#line 1162 "insns.def"
|
|
1827
1731
|
if (NIL_P(val)) {
|
|
1828
1732
|
RUBY_VM_CHECK_INTS(th);
|
|
1829
1733
|
JUMP(dst);
|
|
1830
1734
|
}
|
|
1831
1735
|
|
|
1832
|
-
#line
|
|
1736
|
+
#line 1737 "vm.inc"
|
|
1833
1737
|
#undef CURRENT_INSN_branchnil
|
|
1834
1738
|
#undef INSN_IS_SC
|
|
1835
1739
|
#undef INSN_LABEL
|
|
@@ -1852,7 +1756,7 @@ INSN_ENTRY(getinlinecache){
|
|
|
1852
1756
|
COLLECT_USAGE_OPERAND(BIN(getinlinecache), 0, dst);
|
|
1853
1757
|
COLLECT_USAGE_OPERAND(BIN(getinlinecache), 1, ic);
|
|
1854
1758
|
{
|
|
1855
|
-
#line
|
|
1759
|
+
#line 1184 "insns.def"
|
|
1856
1760
|
if (ic->ic_serial == GET_GLOBAL_CONSTANT_STATE() &&
|
|
1857
1761
|
(ic->ic_cref == NULL || ic->ic_cref == rb_vm_get_cref(GET_EP()))) {
|
|
1858
1762
|
val = ic->ic_value.value;
|
|
@@ -1863,7 +1767,7 @@ INSN_ENTRY(getinlinecache){
|
|
|
1863
1767
|
val = Qnil;
|
|
1864
1768
|
}
|
|
1865
1769
|
|
|
1866
|
-
#line
|
|
1770
|
+
#line 1771 "vm.inc"
|
|
1867
1771
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
|
1868
1772
|
PUSH(val);
|
|
1869
1773
|
#undef CURRENT_INSN_getinlinecache
|
|
@@ -1886,14 +1790,14 @@ INSN_ENTRY(setinlinecache){
|
|
|
1886
1790
|
COLLECT_USAGE_INSN(BIN(setinlinecache));
|
|
1887
1791
|
COLLECT_USAGE_OPERAND(BIN(setinlinecache), 0, ic);
|
|
1888
1792
|
{
|
|
1889
|
-
#line
|
|
1793
|
+
#line 1206 "insns.def"
|
|
1890
1794
|
VM_ASSERT(ic->ic_value.value != Qundef);
|
|
1891
1795
|
ic->ic_value.value = val;
|
|
1892
1796
|
ic->ic_serial = GET_GLOBAL_CONSTANT_STATE() - ruby_vm_const_missing_count;
|
|
1893
1797
|
ic->ic_cref = vm_get_const_key_cref(GET_EP());
|
|
1894
1798
|
ruby_vm_const_missing_count = 0;
|
|
1895
1799
|
|
|
1896
|
-
#line
|
|
1800
|
+
#line 1801 "vm.inc"
|
|
1897
1801
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
|
1898
1802
|
PUSH(val);
|
|
1899
1803
|
#undef CURRENT_INSN_setinlinecache
|
|
@@ -1918,7 +1822,7 @@ INSN_ENTRY(once){
|
|
|
1918
1822
|
COLLECT_USAGE_OPERAND(BIN(once), 0, iseq);
|
|
1919
1823
|
COLLECT_USAGE_OPERAND(BIN(once), 1, ic);
|
|
1920
1824
|
{
|
|
1921
|
-
#line
|
|
1825
|
+
#line 1224 "insns.def"
|
|
1922
1826
|
union iseq_inline_storage_entry *is = (union iseq_inline_storage_entry *)ic;
|
|
1923
1827
|
|
|
1924
1828
|
#define RUNNING_THREAD_ONCE_DONE ((rb_thread_t *)(0x1))
|
|
@@ -1944,7 +1848,7 @@ INSN_ENTRY(once){
|
|
|
1944
1848
|
goto retry;
|
|
1945
1849
|
}
|
|
1946
1850
|
|
|
1947
|
-
#line
|
|
1851
|
+
#line 1852 "vm.inc"
|
|
1948
1852
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
|
1949
1853
|
PUSH(val);
|
|
1950
1854
|
#undef CURRENT_INSN_once
|
|
@@ -1969,7 +1873,7 @@ INSN_ENTRY(opt_case_dispatch){
|
|
|
1969
1873
|
COLLECT_USAGE_OPERAND(BIN(opt_case_dispatch), 0, hash);
|
|
1970
1874
|
COLLECT_USAGE_OPERAND(BIN(opt_case_dispatch), 1, else_offset);
|
|
1971
1875
|
{
|
|
1972
|
-
#line
|
|
1876
|
+
#line 1261 "insns.def"
|
|
1973
1877
|
switch(TYPE(key)) {
|
|
1974
1878
|
case T_FLOAT: {
|
|
1975
1879
|
double ival;
|
|
@@ -1977,17 +1881,18 @@ INSN_ENTRY(opt_case_dispatch){
|
|
|
1977
1881
|
key = FIXABLE(ival) ? LONG2FIX((long)ival) : rb_dbl2big(ival);
|
|
1978
1882
|
}
|
|
1979
1883
|
}
|
|
1980
|
-
case T_TRUE:
|
|
1884
|
+
case T_TRUE:
|
|
1981
1885
|
case T_FALSE:
|
|
1982
1886
|
case T_NIL:
|
|
1983
|
-
case T_SYMBOL:
|
|
1887
|
+
case T_SYMBOL: /* fall through */
|
|
1984
1888
|
case T_FIXNUM:
|
|
1985
1889
|
case T_BIGNUM:
|
|
1986
1890
|
case T_STRING:
|
|
1987
1891
|
if (BASIC_OP_UNREDEFINED_P(BOP_EQQ,
|
|
1988
1892
|
SYMBOL_REDEFINED_OP_FLAG |
|
|
1989
|
-
|
|
1893
|
+
FIXNUM_REDEFINED_OP_FLAG |
|
|
1990
1894
|
FLOAT_REDEFINED_OP_FLAG |
|
|
1895
|
+
BIGNUM_REDEFINED_OP_FLAG |
|
|
1991
1896
|
NIL_REDEFINED_OP_FLAG |
|
|
1992
1897
|
TRUE_REDEFINED_OP_FLAG |
|
|
1993
1898
|
FALSE_REDEFINED_OP_FLAG |
|
|
@@ -2005,7 +1910,7 @@ INSN_ENTRY(opt_case_dispatch){
|
|
|
2005
1910
|
break;
|
|
2006
1911
|
}
|
|
2007
1912
|
|
|
2008
|
-
#line
|
|
1913
|
+
#line 1914 "vm.inc"
|
|
2009
1914
|
#undef CURRENT_INSN_opt_case_dispatch
|
|
2010
1915
|
#undef INSN_IS_SC
|
|
2011
1916
|
#undef INSN_LABEL
|
|
@@ -2030,9 +1935,9 @@ INSN_ENTRY(opt_plus){
|
|
|
2030
1935
|
COLLECT_USAGE_OPERAND(BIN(opt_plus), 0, ci);
|
|
2031
1936
|
COLLECT_USAGE_OPERAND(BIN(opt_plus), 1, cc);
|
|
2032
1937
|
{
|
|
2033
|
-
#line
|
|
1938
|
+
#line 1311 "insns.def"
|
|
2034
1939
|
if (FIXNUM_2_P(recv, obj) &&
|
|
2035
|
-
BASIC_OP_UNREDEFINED_P(BOP_PLUS,
|
|
1940
|
+
BASIC_OP_UNREDEFINED_P(BOP_PLUS,FIXNUM_REDEFINED_OP_FLAG)) {
|
|
2036
1941
|
/* fixnum + fixnum */
|
|
2037
1942
|
#ifndef LONG_LONG_VALUE
|
|
2038
1943
|
val = (recv + (obj & (~1)));
|
|
@@ -2046,7 +1951,12 @@ INSN_ENTRY(opt_plus){
|
|
|
2046
1951
|
a = FIX2LONG(recv);
|
|
2047
1952
|
b = FIX2LONG(obj);
|
|
2048
1953
|
c = a + b;
|
|
2049
|
-
|
|
1954
|
+
if (FIXABLE(c)) {
|
|
1955
|
+
val = LONG2FIX(c);
|
|
1956
|
+
}
|
|
1957
|
+
else {
|
|
1958
|
+
val = rb_big_plus(rb_int2big(a), rb_int2big(b));
|
|
1959
|
+
}
|
|
2050
1960
|
#endif
|
|
2051
1961
|
}
|
|
2052
1962
|
else if (FLONUM_2_P(recv, obj) &&
|
|
@@ -2077,7 +1987,7 @@ INSN_ENTRY(opt_plus){
|
|
|
2077
1987
|
CALL_SIMPLE_METHOD(recv);
|
|
2078
1988
|
}
|
|
2079
1989
|
|
|
2080
|
-
#line
|
|
1990
|
+
#line 1991 "vm.inc"
|
|
2081
1991
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
|
2082
1992
|
PUSH(val);
|
|
2083
1993
|
#undef CURRENT_INSN_opt_plus
|
|
@@ -2104,15 +2014,21 @@ INSN_ENTRY(opt_minus){
|
|
|
2104
2014
|
COLLECT_USAGE_OPERAND(BIN(opt_minus), 0, ci);
|
|
2105
2015
|
COLLECT_USAGE_OPERAND(BIN(opt_minus), 1, cc);
|
|
2106
2016
|
{
|
|
2107
|
-
#line
|
|
2017
|
+
#line 1374 "insns.def"
|
|
2108
2018
|
if (FIXNUM_2_P(recv, obj) &&
|
|
2109
|
-
BASIC_OP_UNREDEFINED_P(BOP_MINUS,
|
|
2019
|
+
BASIC_OP_UNREDEFINED_P(BOP_MINUS, FIXNUM_REDEFINED_OP_FLAG)) {
|
|
2110
2020
|
long a, b, c;
|
|
2111
2021
|
|
|
2112
2022
|
a = FIX2LONG(recv);
|
|
2113
2023
|
b = FIX2LONG(obj);
|
|
2114
2024
|
c = a - b;
|
|
2115
|
-
|
|
2025
|
+
|
|
2026
|
+
if (FIXABLE(c)) {
|
|
2027
|
+
val = LONG2FIX(c);
|
|
2028
|
+
}
|
|
2029
|
+
else {
|
|
2030
|
+
val = rb_big_minus(rb_int2big(a), rb_int2big(b));
|
|
2031
|
+
}
|
|
2116
2032
|
}
|
|
2117
2033
|
else if (FLONUM_2_P(recv, obj) &&
|
|
2118
2034
|
BASIC_OP_UNREDEFINED_P(BOP_MINUS, FLOAT_REDEFINED_OP_FLAG)) {
|
|
@@ -2135,7 +2051,7 @@ INSN_ENTRY(opt_minus){
|
|
|
2135
2051
|
CALL_SIMPLE_METHOD(recv);
|
|
2136
2052
|
}
|
|
2137
2053
|
|
|
2138
|
-
#line
|
|
2054
|
+
#line 2055 "vm.inc"
|
|
2139
2055
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
|
2140
2056
|
PUSH(val);
|
|
2141
2057
|
#undef CURRENT_INSN_opt_minus
|
|
@@ -2162,10 +2078,24 @@ INSN_ENTRY(opt_mult){
|
|
|
2162
2078
|
COLLECT_USAGE_OPERAND(BIN(opt_mult), 0, ci);
|
|
2163
2079
|
COLLECT_USAGE_OPERAND(BIN(opt_mult), 1, cc);
|
|
2164
2080
|
{
|
|
2165
|
-
#line
|
|
2081
|
+
#line 1422 "insns.def"
|
|
2166
2082
|
if (FIXNUM_2_P(recv, obj) &&
|
|
2167
|
-
BASIC_OP_UNREDEFINED_P(BOP_MULT,
|
|
2168
|
-
|
|
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
|
+
}
|
|
2169
2099
|
}
|
|
2170
2100
|
else if (FLONUM_2_P(recv, obj) &&
|
|
2171
2101
|
BASIC_OP_UNREDEFINED_P(BOP_MULT, FLOAT_REDEFINED_OP_FLAG)) {
|
|
@@ -2187,7 +2117,7 @@ INSN_ENTRY(opt_mult){
|
|
|
2187
2117
|
CALL_SIMPLE_METHOD(recv);
|
|
2188
2118
|
}
|
|
2189
2119
|
|
|
2190
|
-
#line
|
|
2120
|
+
#line 2121 "vm.inc"
|
|
2191
2121
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
|
2192
2122
|
PUSH(val);
|
|
2193
2123
|
#undef CURRENT_INSN_opt_mult
|
|
@@ -2214,11 +2144,37 @@ INSN_ENTRY(opt_div){
|
|
|
2214
2144
|
COLLECT_USAGE_OPERAND(BIN(opt_div), 0, ci);
|
|
2215
2145
|
COLLECT_USAGE_OPERAND(BIN(opt_div), 1, cc);
|
|
2216
2146
|
{
|
|
2217
|
-
#line
|
|
2147
|
+
#line 1472 "insns.def"
|
|
2218
2148
|
if (FIXNUM_2_P(recv, obj) &&
|
|
2219
|
-
BASIC_OP_UNREDEFINED_P(BOP_DIV,
|
|
2220
|
-
|
|
2221
|
-
|
|
2149
|
+
BASIC_OP_UNREDEFINED_P(BOP_DIV, FIXNUM_REDEFINED_OP_FLAG)) {
|
|
2150
|
+
long x, y, div;
|
|
2151
|
+
|
|
2152
|
+
x = FIX2LONG(recv);
|
|
2153
|
+
y = FIX2LONG(obj);
|
|
2154
|
+
{
|
|
2155
|
+
/* copied from numeric.c#fixdivmod */
|
|
2156
|
+
long mod;
|
|
2157
|
+
if (y == 0)
|
|
2158
|
+
goto INSN_LABEL(normal_dispatch);
|
|
2159
|
+
if (y < 0) {
|
|
2160
|
+
if (x < 0)
|
|
2161
|
+
div = -x / -y;
|
|
2162
|
+
else
|
|
2163
|
+
div = -(x / -y);
|
|
2164
|
+
}
|
|
2165
|
+
else {
|
|
2166
|
+
if (x < 0)
|
|
2167
|
+
div = -(-x / y);
|
|
2168
|
+
else
|
|
2169
|
+
div = x / y;
|
|
2170
|
+
}
|
|
2171
|
+
mod = x - div * y;
|
|
2172
|
+
if ((mod < 0 && y > 0) || (mod > 0 && y < 0)) {
|
|
2173
|
+
mod += y;
|
|
2174
|
+
div -= 1;
|
|
2175
|
+
}
|
|
2176
|
+
}
|
|
2177
|
+
val = LONG2NUM(div);
|
|
2222
2178
|
}
|
|
2223
2179
|
else if (FLONUM_2_P(recv, obj) &&
|
|
2224
2180
|
BASIC_OP_UNREDEFINED_P(BOP_DIV, FLOAT_REDEFINED_OP_FLAG)) {
|
|
@@ -2240,7 +2196,7 @@ INSN_ENTRY(opt_div){
|
|
|
2240
2196
|
CALL_SIMPLE_METHOD(recv);
|
|
2241
2197
|
}
|
|
2242
2198
|
|
|
2243
|
-
#line
|
|
2199
|
+
#line 2200 "vm.inc"
|
|
2244
2200
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
|
2245
2201
|
PUSH(val);
|
|
2246
2202
|
#undef CURRENT_INSN_opt_div
|
|
@@ -2267,11 +2223,41 @@ INSN_ENTRY(opt_mod){
|
|
|
2267
2223
|
COLLECT_USAGE_OPERAND(BIN(opt_mod), 0, ci);
|
|
2268
2224
|
COLLECT_USAGE_OPERAND(BIN(opt_mod), 1, cc);
|
|
2269
2225
|
{
|
|
2270
|
-
#line
|
|
2226
|
+
#line 1535 "insns.def"
|
|
2271
2227
|
if (FIXNUM_2_P(recv, obj) &&
|
|
2272
|
-
BASIC_OP_UNREDEFINED_P(BOP_MOD,
|
|
2273
|
-
|
|
2274
|
-
|
|
2228
|
+
BASIC_OP_UNREDEFINED_P(BOP_MOD, FIXNUM_REDEFINED_OP_FLAG )) {
|
|
2229
|
+
long x, y;
|
|
2230
|
+
|
|
2231
|
+
x = FIX2LONG(recv);
|
|
2232
|
+
y = FIX2LONG(obj);
|
|
2233
|
+
if (x > 0 && y > 0) {
|
|
2234
|
+
val = LONG2FIX(x % y);
|
|
2235
|
+
}
|
|
2236
|
+
else {
|
|
2237
|
+
/* copied from numeric.c#fixdivmod */
|
|
2238
|
+
long div, mod;
|
|
2239
|
+
|
|
2240
|
+
if (y == 0)
|
|
2241
|
+
goto INSN_LABEL(normal_dispatch);
|
|
2242
|
+
if (y < 0) {
|
|
2243
|
+
if (x < 0)
|
|
2244
|
+
div = -x / -y;
|
|
2245
|
+
else
|
|
2246
|
+
div = -(x / -y);
|
|
2247
|
+
}
|
|
2248
|
+
else {
|
|
2249
|
+
if (x < 0)
|
|
2250
|
+
div = -(-x / y);
|
|
2251
|
+
else
|
|
2252
|
+
div = x / y;
|
|
2253
|
+
}
|
|
2254
|
+
mod = x - div * y;
|
|
2255
|
+
if ((mod < 0 && y > 0) || (mod > 0 && y < 0)) {
|
|
2256
|
+
mod += y;
|
|
2257
|
+
div -= 1;
|
|
2258
|
+
}
|
|
2259
|
+
val = LONG2FIX(mod);
|
|
2260
|
+
}
|
|
2275
2261
|
}
|
|
2276
2262
|
else if (FLONUM_2_P(recv, obj) &&
|
|
2277
2263
|
BASIC_OP_UNREDEFINED_P(BOP_MOD, FLOAT_REDEFINED_OP_FLAG)) {
|
|
@@ -2293,7 +2279,7 @@ INSN_ENTRY(opt_mod){
|
|
|
2293
2279
|
CALL_SIMPLE_METHOD(recv);
|
|
2294
2280
|
}
|
|
2295
2281
|
|
|
2296
|
-
#line
|
|
2282
|
+
#line 2283 "vm.inc"
|
|
2297
2283
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
|
2298
2284
|
PUSH(val);
|
|
2299
2285
|
#undef CURRENT_INSN_opt_mod
|
|
@@ -2320,7 +2306,7 @@ INSN_ENTRY(opt_eq){
|
|
|
2320
2306
|
COLLECT_USAGE_OPERAND(BIN(opt_eq), 0, ci);
|
|
2321
2307
|
COLLECT_USAGE_OPERAND(BIN(opt_eq), 1, cc);
|
|
2322
2308
|
{
|
|
2323
|
-
#line
|
|
2309
|
+
#line 1602 "insns.def"
|
|
2324
2310
|
val = opt_eq_func(recv, obj, ci, cc);
|
|
2325
2311
|
|
|
2326
2312
|
if (val == Qundef) {
|
|
@@ -2330,7 +2316,7 @@ INSN_ENTRY(opt_eq){
|
|
|
2330
2316
|
CALL_SIMPLE_METHOD(recv);
|
|
2331
2317
|
}
|
|
2332
2318
|
|
|
2333
|
-
#line
|
|
2319
|
+
#line 2320 "vm.inc"
|
|
2334
2320
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
|
2335
2321
|
PUSH(val);
|
|
2336
2322
|
#undef CURRENT_INSN_opt_eq
|
|
@@ -2361,7 +2347,7 @@ INSN_ENTRY(opt_neq){
|
|
|
2361
2347
|
COLLECT_USAGE_OPERAND(BIN(opt_neq), 2, ci_eq);
|
|
2362
2348
|
COLLECT_USAGE_OPERAND(BIN(opt_neq), 3, cc_eq);
|
|
2363
2349
|
{
|
|
2364
|
-
#line
|
|
2350
|
+
#line 1623 "insns.def"
|
|
2365
2351
|
extern VALUE rb_obj_not_equal(VALUE obj1, VALUE obj2);
|
|
2366
2352
|
vm_search_method(ci, cc, recv);
|
|
2367
2353
|
|
|
@@ -2382,7 +2368,7 @@ INSN_ENTRY(opt_neq){
|
|
|
2382
2368
|
CALL_SIMPLE_METHOD(recv);
|
|
2383
2369
|
}
|
|
2384
2370
|
|
|
2385
|
-
#line
|
|
2371
|
+
#line 2372 "vm.inc"
|
|
2386
2372
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
|
2387
2373
|
PUSH(val);
|
|
2388
2374
|
#undef CURRENT_INSN_opt_neq
|
|
@@ -2409,9 +2395,9 @@ INSN_ENTRY(opt_lt){
|
|
|
2409
2395
|
COLLECT_USAGE_OPERAND(BIN(opt_lt), 0, ci);
|
|
2410
2396
|
COLLECT_USAGE_OPERAND(BIN(opt_lt), 1, cc);
|
|
2411
2397
|
{
|
|
2412
|
-
#line
|
|
2398
|
+
#line 1655 "insns.def"
|
|
2413
2399
|
if (FIXNUM_2_P(recv, obj) &&
|
|
2414
|
-
BASIC_OP_UNREDEFINED_P(BOP_LT,
|
|
2400
|
+
BASIC_OP_UNREDEFINED_P(BOP_LT, FIXNUM_REDEFINED_OP_FLAG)) {
|
|
2415
2401
|
SIGNED_VALUE a = recv, b = obj;
|
|
2416
2402
|
|
|
2417
2403
|
if (a < b) {
|
|
@@ -2442,7 +2428,7 @@ INSN_ENTRY(opt_lt){
|
|
|
2442
2428
|
CALL_SIMPLE_METHOD(recv);
|
|
2443
2429
|
}
|
|
2444
2430
|
|
|
2445
|
-
#line
|
|
2431
|
+
#line 2432 "vm.inc"
|
|
2446
2432
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
|
2447
2433
|
PUSH(val);
|
|
2448
2434
|
#undef CURRENT_INSN_opt_lt
|
|
@@ -2469,9 +2455,9 @@ INSN_ENTRY(opt_le){
|
|
|
2469
2455
|
COLLECT_USAGE_OPERAND(BIN(opt_le), 0, ci);
|
|
2470
2456
|
COLLECT_USAGE_OPERAND(BIN(opt_le), 1, cc);
|
|
2471
2457
|
{
|
|
2472
|
-
#line
|
|
2458
|
+
#line 1699 "insns.def"
|
|
2473
2459
|
if (FIXNUM_2_P(recv, obj) &&
|
|
2474
|
-
BASIC_OP_UNREDEFINED_P(BOP_LE,
|
|
2460
|
+
BASIC_OP_UNREDEFINED_P(BOP_LE, FIXNUM_REDEFINED_OP_FLAG)) {
|
|
2475
2461
|
SIGNED_VALUE a = recv, b = obj;
|
|
2476
2462
|
|
|
2477
2463
|
if (a <= b) {
|
|
@@ -2493,7 +2479,7 @@ INSN_ENTRY(opt_le){
|
|
|
2493
2479
|
CALL_SIMPLE_METHOD(recv);
|
|
2494
2480
|
}
|
|
2495
2481
|
|
|
2496
|
-
#line
|
|
2482
|
+
#line 2483 "vm.inc"
|
|
2497
2483
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
|
2498
2484
|
PUSH(val);
|
|
2499
2485
|
#undef CURRENT_INSN_opt_le
|
|
@@ -2520,9 +2506,9 @@ INSN_ENTRY(opt_gt){
|
|
|
2520
2506
|
COLLECT_USAGE_OPERAND(BIN(opt_gt), 0, ci);
|
|
2521
2507
|
COLLECT_USAGE_OPERAND(BIN(opt_gt), 1, cc);
|
|
2522
2508
|
{
|
|
2523
|
-
#line
|
|
2509
|
+
#line 1734 "insns.def"
|
|
2524
2510
|
if (FIXNUM_2_P(recv, obj) &&
|
|
2525
|
-
BASIC_OP_UNREDEFINED_P(BOP_GT,
|
|
2511
|
+
BASIC_OP_UNREDEFINED_P(BOP_GT, FIXNUM_REDEFINED_OP_FLAG)) {
|
|
2526
2512
|
SIGNED_VALUE a = recv, b = obj;
|
|
2527
2513
|
|
|
2528
2514
|
if (a > b) {
|
|
@@ -2553,7 +2539,7 @@ INSN_ENTRY(opt_gt){
|
|
|
2553
2539
|
CALL_SIMPLE_METHOD(recv);
|
|
2554
2540
|
}
|
|
2555
2541
|
|
|
2556
|
-
#line
|
|
2542
|
+
#line 2543 "vm.inc"
|
|
2557
2543
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
|
2558
2544
|
PUSH(val);
|
|
2559
2545
|
#undef CURRENT_INSN_opt_gt
|
|
@@ -2580,9 +2566,9 @@ INSN_ENTRY(opt_ge){
|
|
|
2580
2566
|
COLLECT_USAGE_OPERAND(BIN(opt_ge), 0, ci);
|
|
2581
2567
|
COLLECT_USAGE_OPERAND(BIN(opt_ge), 1, cc);
|
|
2582
2568
|
{
|
|
2583
|
-
#line
|
|
2569
|
+
#line 1778 "insns.def"
|
|
2584
2570
|
if (FIXNUM_2_P(recv, obj) &&
|
|
2585
|
-
BASIC_OP_UNREDEFINED_P(BOP_GE,
|
|
2571
|
+
BASIC_OP_UNREDEFINED_P(BOP_GE, FIXNUM_REDEFINED_OP_FLAG)) {
|
|
2586
2572
|
SIGNED_VALUE a = recv, b = obj;
|
|
2587
2573
|
|
|
2588
2574
|
if (a >= b) {
|
|
@@ -2603,7 +2589,7 @@ INSN_ENTRY(opt_ge){
|
|
|
2603
2589
|
CALL_SIMPLE_METHOD(recv);
|
|
2604
2590
|
}
|
|
2605
2591
|
|
|
2606
|
-
#line
|
|
2592
|
+
#line 2593 "vm.inc"
|
|
2607
2593
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
|
2608
2594
|
PUSH(val);
|
|
2609
2595
|
#undef CURRENT_INSN_opt_ge
|
|
@@ -2630,7 +2616,7 @@ INSN_ENTRY(opt_ltlt){
|
|
|
2630
2616
|
COLLECT_USAGE_OPERAND(BIN(opt_ltlt), 0, ci);
|
|
2631
2617
|
COLLECT_USAGE_OPERAND(BIN(opt_ltlt), 1, cc);
|
|
2632
2618
|
{
|
|
2633
|
-
#line
|
|
2619
|
+
#line 1812 "insns.def"
|
|
2634
2620
|
if (!SPECIAL_CONST_P(recv)) {
|
|
2635
2621
|
if (RBASIC_CLASS(recv) == rb_cString &&
|
|
2636
2622
|
BASIC_OP_UNREDEFINED_P(BOP_LTLT, STRING_REDEFINED_OP_FLAG)) {
|
|
@@ -2651,7 +2637,7 @@ INSN_ENTRY(opt_ltlt){
|
|
|
2651
2637
|
CALL_SIMPLE_METHOD(recv);
|
|
2652
2638
|
}
|
|
2653
2639
|
|
|
2654
|
-
#line
|
|
2640
|
+
#line 2641 "vm.inc"
|
|
2655
2641
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
|
2656
2642
|
PUSH(val);
|
|
2657
2643
|
#undef CURRENT_INSN_opt_ltlt
|
|
@@ -2678,7 +2664,7 @@ INSN_ENTRY(opt_aref){
|
|
|
2678
2664
|
COLLECT_USAGE_OPERAND(BIN(opt_aref), 0, ci);
|
|
2679
2665
|
COLLECT_USAGE_OPERAND(BIN(opt_aref), 1, cc);
|
|
2680
2666
|
{
|
|
2681
|
-
#line
|
|
2667
|
+
#line 1844 "insns.def"
|
|
2682
2668
|
if (!SPECIAL_CONST_P(recv)) {
|
|
2683
2669
|
if (RBASIC_CLASS(recv) == rb_cArray && BASIC_OP_UNREDEFINED_P(BOP_AREF, ARRAY_REDEFINED_OP_FLAG) && FIXNUM_P(obj)) {
|
|
2684
2670
|
val = rb_ary_entry(recv, FIX2LONG(obj));
|
|
@@ -2697,7 +2683,7 @@ INSN_ENTRY(opt_aref){
|
|
|
2697
2683
|
CALL_SIMPLE_METHOD(recv);
|
|
2698
2684
|
}
|
|
2699
2685
|
|
|
2700
|
-
#line
|
|
2686
|
+
#line 2687 "vm.inc"
|
|
2701
2687
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
|
2702
2688
|
PUSH(val);
|
|
2703
2689
|
#undef CURRENT_INSN_opt_aref
|
|
@@ -2725,7 +2711,7 @@ INSN_ENTRY(opt_aset){
|
|
|
2725
2711
|
COLLECT_USAGE_OPERAND(BIN(opt_aset), 0, ci);
|
|
2726
2712
|
COLLECT_USAGE_OPERAND(BIN(opt_aset), 1, cc);
|
|
2727
2713
|
{
|
|
2728
|
-
#line
|
|
2714
|
+
#line 1874 "insns.def"
|
|
2729
2715
|
if (!SPECIAL_CONST_P(recv)) {
|
|
2730
2716
|
if (RBASIC_CLASS(recv) == rb_cArray && BASIC_OP_UNREDEFINED_P(BOP_ASET, ARRAY_REDEFINED_OP_FLAG) && FIXNUM_P(obj)) {
|
|
2731
2717
|
rb_ary_store(recv, FIX2LONG(obj), set);
|
|
@@ -2747,7 +2733,7 @@ INSN_ENTRY(opt_aset){
|
|
|
2747
2733
|
CALL_SIMPLE_METHOD(recv);
|
|
2748
2734
|
}
|
|
2749
2735
|
|
|
2750
|
-
#line
|
|
2736
|
+
#line 2737 "vm.inc"
|
|
2751
2737
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
|
2752
2738
|
PUSH(val);
|
|
2753
2739
|
#undef CURRENT_INSN_opt_aset
|
|
@@ -2775,8 +2761,10 @@ INSN_ENTRY(opt_aset_with){
|
|
|
2775
2761
|
COLLECT_USAGE_OPERAND(BIN(opt_aset_with), 1, cc);
|
|
2776
2762
|
COLLECT_USAGE_OPERAND(BIN(opt_aset_with), 2, key);
|
|
2777
2763
|
{
|
|
2778
|
-
#line
|
|
2779
|
-
if (!SPECIAL_CONST_P(recv) && RBASIC_CLASS(recv) == rb_cHash &&
|
|
2764
|
+
#line 1907 "insns.def"
|
|
2765
|
+
if (!SPECIAL_CONST_P(recv) && RBASIC_CLASS(recv) == rb_cHash &&
|
|
2766
|
+
BASIC_OP_UNREDEFINED_P(BOP_ASET, HASH_REDEFINED_OP_FLAG) &&
|
|
2767
|
+
rb_hash_compare_by_id_p(recv) == Qfalse) {
|
|
2780
2768
|
rb_hash_aset(recv, key, val);
|
|
2781
2769
|
}
|
|
2782
2770
|
else {
|
|
@@ -2786,7 +2774,7 @@ INSN_ENTRY(opt_aset_with){
|
|
|
2786
2774
|
CALL_SIMPLE_METHOD(recv);
|
|
2787
2775
|
}
|
|
2788
2776
|
|
|
2789
|
-
#line
|
|
2777
|
+
#line 2778 "vm.inc"
|
|
2790
2778
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
|
2791
2779
|
PUSH(val);
|
|
2792
2780
|
#undef CURRENT_INSN_opt_aset_with
|
|
@@ -2814,8 +2802,10 @@ INSN_ENTRY(opt_aref_with){
|
|
|
2814
2802
|
COLLECT_USAGE_OPERAND(BIN(opt_aref_with), 1, cc);
|
|
2815
2803
|
COLLECT_USAGE_OPERAND(BIN(opt_aref_with), 2, key);
|
|
2816
2804
|
{
|
|
2817
|
-
#line
|
|
2818
|
-
if (!SPECIAL_CONST_P(recv) && RBASIC_CLASS(recv) == rb_cHash &&
|
|
2805
|
+
#line 1931 "insns.def"
|
|
2806
|
+
if (!SPECIAL_CONST_P(recv) && RBASIC_CLASS(recv) == rb_cHash &&
|
|
2807
|
+
BASIC_OP_UNREDEFINED_P(BOP_AREF, HASH_REDEFINED_OP_FLAG) &&
|
|
2808
|
+
rb_hash_compare_by_id_p(recv) == Qfalse) {
|
|
2819
2809
|
val = rb_hash_aref(recv, key);
|
|
2820
2810
|
}
|
|
2821
2811
|
else {
|
|
@@ -2824,7 +2814,7 @@ INSN_ENTRY(opt_aref_with){
|
|
|
2824
2814
|
CALL_SIMPLE_METHOD(recv);
|
|
2825
2815
|
}
|
|
2826
2816
|
|
|
2827
|
-
#line
|
|
2817
|
+
#line 2818 "vm.inc"
|
|
2828
2818
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
|
2829
2819
|
PUSH(val);
|
|
2830
2820
|
#undef CURRENT_INSN_opt_aref_with
|
|
@@ -2850,7 +2840,7 @@ INSN_ENTRY(opt_length){
|
|
|
2850
2840
|
COLLECT_USAGE_OPERAND(BIN(opt_length), 0, ci);
|
|
2851
2841
|
COLLECT_USAGE_OPERAND(BIN(opt_length), 1, cc);
|
|
2852
2842
|
{
|
|
2853
|
-
#line
|
|
2843
|
+
#line 1954 "insns.def"
|
|
2854
2844
|
if (!SPECIAL_CONST_P(recv)) {
|
|
2855
2845
|
if (RBASIC_CLASS(recv) == rb_cString &&
|
|
2856
2846
|
BASIC_OP_UNREDEFINED_P(BOP_LENGTH, STRING_REDEFINED_OP_FLAG)) {
|
|
@@ -2874,7 +2864,7 @@ INSN_ENTRY(opt_length){
|
|
|
2874
2864
|
CALL_SIMPLE_METHOD(recv);
|
|
2875
2865
|
}
|
|
2876
2866
|
|
|
2877
|
-
#line
|
|
2867
|
+
#line 2868 "vm.inc"
|
|
2878
2868
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
|
2879
2869
|
PUSH(val);
|
|
2880
2870
|
#undef CURRENT_INSN_opt_length
|
|
@@ -2900,7 +2890,7 @@ INSN_ENTRY(opt_size){
|
|
|
2900
2890
|
COLLECT_USAGE_OPERAND(BIN(opt_size), 0, ci);
|
|
2901
2891
|
COLLECT_USAGE_OPERAND(BIN(opt_size), 1, cc);
|
|
2902
2892
|
{
|
|
2903
|
-
#line
|
|
2893
|
+
#line 1989 "insns.def"
|
|
2904
2894
|
if (!SPECIAL_CONST_P(recv)) {
|
|
2905
2895
|
if (RBASIC_CLASS(recv) == rb_cString &&
|
|
2906
2896
|
BASIC_OP_UNREDEFINED_P(BOP_SIZE, STRING_REDEFINED_OP_FLAG)) {
|
|
@@ -2924,7 +2914,7 @@ INSN_ENTRY(opt_size){
|
|
|
2924
2914
|
CALL_SIMPLE_METHOD(recv);
|
|
2925
2915
|
}
|
|
2926
2916
|
|
|
2927
|
-
#line
|
|
2917
|
+
#line 2918 "vm.inc"
|
|
2928
2918
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
|
2929
2919
|
PUSH(val);
|
|
2930
2920
|
#undef CURRENT_INSN_opt_size
|
|
@@ -2950,7 +2940,7 @@ INSN_ENTRY(opt_empty_p){
|
|
|
2950
2940
|
COLLECT_USAGE_OPERAND(BIN(opt_empty_p), 0, ci);
|
|
2951
2941
|
COLLECT_USAGE_OPERAND(BIN(opt_empty_p), 1, cc);
|
|
2952
2942
|
{
|
|
2953
|
-
#line
|
|
2943
|
+
#line 2024 "insns.def"
|
|
2954
2944
|
if (!SPECIAL_CONST_P(recv)) {
|
|
2955
2945
|
if (RBASIC_CLASS(recv) == rb_cString &&
|
|
2956
2946
|
BASIC_OP_UNREDEFINED_P(BOP_EMPTY_P, STRING_REDEFINED_OP_FLAG)) {
|
|
@@ -2977,7 +2967,7 @@ INSN_ENTRY(opt_empty_p){
|
|
|
2977
2967
|
CALL_SIMPLE_METHOD(recv);
|
|
2978
2968
|
}
|
|
2979
2969
|
|
|
2980
|
-
#line
|
|
2970
|
+
#line 2971 "vm.inc"
|
|
2981
2971
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
|
2982
2972
|
PUSH(val);
|
|
2983
2973
|
#undef CURRENT_INSN_opt_empty_p
|
|
@@ -3003,10 +2993,10 @@ INSN_ENTRY(opt_succ){
|
|
|
3003
2993
|
COLLECT_USAGE_OPERAND(BIN(opt_succ), 0, ci);
|
|
3004
2994
|
COLLECT_USAGE_OPERAND(BIN(opt_succ), 1, cc);
|
|
3005
2995
|
{
|
|
3006
|
-
#line
|
|
2996
|
+
#line 2062 "insns.def"
|
|
3007
2997
|
if (SPECIAL_CONST_P(recv)) {
|
|
3008
2998
|
if (FIXNUM_P(recv) &&
|
|
3009
|
-
BASIC_OP_UNREDEFINED_P(BOP_SUCC,
|
|
2999
|
+
BASIC_OP_UNREDEFINED_P(BOP_SUCC, FIXNUM_REDEFINED_OP_FLAG)) {
|
|
3010
3000
|
const VALUE obj = INT2FIX(1);
|
|
3011
3001
|
/* fixnum + INT2FIX(1) */
|
|
3012
3002
|
val = (recv + (obj & (~1)));
|
|
@@ -3024,8 +3014,7 @@ INSN_ENTRY(opt_succ){
|
|
|
3024
3014
|
BASIC_OP_UNREDEFINED_P(BOP_SUCC, STRING_REDEFINED_OP_FLAG)) {
|
|
3025
3015
|
val = rb_str_succ(recv);
|
|
3026
3016
|
}
|
|
3027
|
-
else
|
|
3028
|
-
{
|
|
3017
|
+
else {
|
|
3029
3018
|
goto INSN_LABEL(normal_dispatch);
|
|
3030
3019
|
}
|
|
3031
3020
|
}
|
|
@@ -3035,7 +3024,7 @@ INSN_ENTRY(opt_succ){
|
|
|
3035
3024
|
CALL_SIMPLE_METHOD(recv);
|
|
3036
3025
|
}
|
|
3037
3026
|
|
|
3038
|
-
#line
|
|
3027
|
+
#line 3028 "vm.inc"
|
|
3039
3028
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
|
3040
3029
|
PUSH(val);
|
|
3041
3030
|
#undef CURRENT_INSN_opt_succ
|
|
@@ -3061,7 +3050,9 @@ INSN_ENTRY(opt_not){
|
|
|
3061
3050
|
COLLECT_USAGE_OPERAND(BIN(opt_not), 0, ci);
|
|
3062
3051
|
COLLECT_USAGE_OPERAND(BIN(opt_not), 1, cc);
|
|
3063
3052
|
{
|
|
3064
|
-
#line
|
|
3053
|
+
#line 2104 "insns.def"
|
|
3054
|
+
extern VALUE rb_obj_not(VALUE obj);
|
|
3055
|
+
|
|
3065
3056
|
vm_search_method(ci, cc, recv);
|
|
3066
3057
|
|
|
3067
3058
|
if (check_cfunc(cc->me, rb_obj_not)) {
|
|
@@ -3072,7 +3063,7 @@ INSN_ENTRY(opt_not){
|
|
|
3072
3063
|
CALL_SIMPLE_METHOD(recv);
|
|
3073
3064
|
}
|
|
3074
3065
|
|
|
3075
|
-
#line
|
|
3066
|
+
#line 3067 "vm.inc"
|
|
3076
3067
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
|
3077
3068
|
PUSH(val);
|
|
3078
3069
|
#undef CURRENT_INSN_opt_not
|
|
@@ -3096,7 +3087,7 @@ INSN_ENTRY(opt_regexpmatch1){
|
|
|
3096
3087
|
COLLECT_USAGE_INSN(BIN(opt_regexpmatch1));
|
|
3097
3088
|
COLLECT_USAGE_OPERAND(BIN(opt_regexpmatch1), 0, r);
|
|
3098
3089
|
{
|
|
3099
|
-
#line
|
|
3090
|
+
#line 2129 "insns.def"
|
|
3100
3091
|
if (BASIC_OP_UNREDEFINED_P(BOP_MATCH, REGEXP_REDEFINED_OP_FLAG)) {
|
|
3101
3092
|
val = rb_reg_match(r, obj);
|
|
3102
3093
|
}
|
|
@@ -3104,7 +3095,7 @@ INSN_ENTRY(opt_regexpmatch1){
|
|
|
3104
3095
|
val = rb_funcall(r, idEqTilde, 1, obj);
|
|
3105
3096
|
}
|
|
3106
3097
|
|
|
3107
|
-
#line
|
|
3098
|
+
#line 3099 "vm.inc"
|
|
3108
3099
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
|
3109
3100
|
PUSH(val);
|
|
3110
3101
|
#undef CURRENT_INSN_opt_regexpmatch1
|
|
@@ -3131,7 +3122,7 @@ INSN_ENTRY(opt_regexpmatch2){
|
|
|
3131
3122
|
COLLECT_USAGE_OPERAND(BIN(opt_regexpmatch2), 0, ci);
|
|
3132
3123
|
COLLECT_USAGE_OPERAND(BIN(opt_regexpmatch2), 1, cc);
|
|
3133
3124
|
{
|
|
3134
|
-
#line
|
|
3125
|
+
#line 2148 "insns.def"
|
|
3135
3126
|
if (CLASS_OF(obj2) == rb_cString &&
|
|
3136
3127
|
BASIC_OP_UNREDEFINED_P(BOP_MATCH, STRING_REDEFINED_OP_FLAG)) {
|
|
3137
3128
|
val = rb_reg_match(obj1, obj2);
|
|
@@ -3142,7 +3133,7 @@ INSN_ENTRY(opt_regexpmatch2){
|
|
|
3142
3133
|
CALL_SIMPLE_METHOD(obj2);
|
|
3143
3134
|
}
|
|
3144
3135
|
|
|
3145
|
-
#line
|
|
3136
|
+
#line 3137 "vm.inc"
|
|
3146
3137
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
|
3147
3138
|
PUSH(val);
|
|
3148
3139
|
#undef CURRENT_INSN_opt_regexpmatch2
|
|
@@ -3164,7 +3155,7 @@ INSN_ENTRY(opt_call_c_function){
|
|
|
3164
3155
|
COLLECT_USAGE_INSN(BIN(opt_call_c_function));
|
|
3165
3156
|
COLLECT_USAGE_OPERAND(BIN(opt_call_c_function), 0, funcptr);
|
|
3166
3157
|
{
|
|
3167
|
-
#line
|
|
3158
|
+
#line 2170 "insns.def"
|
|
3168
3159
|
reg_cfp = (funcptr)(th, reg_cfp);
|
|
3169
3160
|
|
|
3170
3161
|
if (reg_cfp == 0) {
|
|
@@ -3176,7 +3167,7 @@ INSN_ENTRY(opt_call_c_function){
|
|
|
3176
3167
|
RESTORE_REGS();
|
|
3177
3168
|
NEXT_INSN();
|
|
3178
3169
|
|
|
3179
|
-
#line
|
|
3170
|
+
#line 3171 "vm.inc"
|
|
3180
3171
|
#undef CURRENT_INSN_opt_call_c_function
|
|
3181
3172
|
#undef INSN_IS_SC
|
|
3182
3173
|
#undef INSN_LABEL
|
|
@@ -3196,10 +3187,10 @@ INSN_ENTRY(bitblt){
|
|
|
3196
3187
|
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
|
3197
3188
|
COLLECT_USAGE_INSN(BIN(bitblt));
|
|
3198
3189
|
{
|
|
3199
|
-
#line
|
|
3190
|
+
#line 2193 "insns.def"
|
|
3200
3191
|
ret = rb_str_new2("a bit of bacon, lettuce and tomato");
|
|
3201
3192
|
|
|
3202
|
-
#line
|
|
3193
|
+
#line 3194 "vm.inc"
|
|
3203
3194
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
|
3204
3195
|
PUSH(ret);
|
|
3205
3196
|
#undef CURRENT_INSN_bitblt
|
|
@@ -3221,10 +3212,10 @@ INSN_ENTRY(answer){
|
|
|
3221
3212
|
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
|
3222
3213
|
COLLECT_USAGE_INSN(BIN(answer));
|
|
3223
3214
|
{
|
|
3224
|
-
#line
|
|
3215
|
+
#line 2207 "insns.def"
|
|
3225
3216
|
ret = INT2FIX(42);
|
|
3226
3217
|
|
|
3227
|
-
#line
|
|
3218
|
+
#line 3219 "vm.inc"
|
|
3228
3219
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
|
3229
3220
|
PUSH(ret);
|
|
3230
3221
|
#undef CURRENT_INSN_answer
|
|
@@ -3258,7 +3249,7 @@ INSN_ENTRY(getlocal_OP__WC__0){
|
|
|
3258
3249
|
}
|
|
3259
3250
|
val = *(ep - idx);
|
|
3260
3251
|
|
|
3261
|
-
#line
|
|
3252
|
+
#line 3253 "vm.inc"
|
|
3262
3253
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
|
3263
3254
|
PUSH(val);
|
|
3264
3255
|
#undef level
|
|
@@ -3293,7 +3284,7 @@ INSN_ENTRY(getlocal_OP__WC__1){
|
|
|
3293
3284
|
}
|
|
3294
3285
|
val = *(ep - idx);
|
|
3295
3286
|
|
|
3296
|
-
#line
|
|
3287
|
+
#line 3288 "vm.inc"
|
|
3297
3288
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
|
3298
3289
|
PUSH(val);
|
|
3299
3290
|
#undef level
|
|
@@ -3328,7 +3319,7 @@ INSN_ENTRY(setlocal_OP__WC__0){
|
|
|
3328
3319
|
}
|
|
3329
3320
|
*(ep - idx) = val;
|
|
3330
3321
|
|
|
3331
|
-
#line
|
|
3322
|
+
#line 3323 "vm.inc"
|
|
3332
3323
|
#undef level
|
|
3333
3324
|
#undef CURRENT_INSN_setlocal_OP__WC__0
|
|
3334
3325
|
#undef INSN_IS_SC
|
|
@@ -3361,7 +3352,7 @@ INSN_ENTRY(setlocal_OP__WC__1){
|
|
|
3361
3352
|
}
|
|
3362
3353
|
*(ep - idx) = val;
|
|
3363
3354
|
|
|
3364
|
-
#line
|
|
3355
|
+
#line 3356 "vm.inc"
|
|
3365
3356
|
#undef level
|
|
3366
3357
|
#undef CURRENT_INSN_setlocal_OP__WC__1
|
|
3367
3358
|
#undef INSN_IS_SC
|
|
@@ -3385,7 +3376,7 @@ INSN_ENTRY(putobject_OP_INT2FIX_O_0_C_){
|
|
|
3385
3376
|
#line 297 "insns.def"
|
|
3386
3377
|
/* */
|
|
3387
3378
|
|
|
3388
|
-
#line
|
|
3379
|
+
#line 3380 "vm.inc"
|
|
3389
3380
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
|
3390
3381
|
PUSH(val);
|
|
3391
3382
|
#undef val
|
|
@@ -3411,7 +3402,7 @@ INSN_ENTRY(putobject_OP_INT2FIX_O_1_C_){
|
|
|
3411
3402
|
#line 297 "insns.def"
|
|
3412
3403
|
/* */
|
|
3413
3404
|
|
|
3414
|
-
#line
|
|
3405
|
+
#line 3406 "vm.inc"
|
|
3415
3406
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
|
3416
3407
|
PUSH(val);
|
|
3417
3408
|
#undef val
|