debase-ruby_core_source 0.9.0 → 0.9.1
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 +5 -0
- data/lib/debase/ruby_core_source.rb +1 -1
- data/lib/debase/ruby_core_source/{ruby-2.3.0-preview2 → ruby-2.4.0-preview1}/addr2line.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.3.0-preview2 → ruby-2.4.0-preview1}/ccan/build_assert/build_assert.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.3.0-preview2 → ruby-2.4.0-preview1}/ccan/check_type/check_type.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.3.0-preview2 → ruby-2.4.0-preview1}/ccan/container_of/container_of.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.3.0-preview2 → ruby-2.4.0-preview1}/ccan/list/list.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.3.0-preview2 → ruby-2.4.0-preview1}/ccan/str/str.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.3.0-preview2 → ruby-2.4.0-preview1}/constant.h +1 -1
- data/lib/debase/ruby_core_source/{ruby-2.3.0-preview2 → ruby-2.4.0-preview1}/dln.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.3.0-preview2 → ruby-2.4.0-preview1}/encindex.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.3.0-preview2 → ruby-2.4.0-preview1}/eval_intern.h +3 -2
- data/lib/debase/ruby_core_source/{ruby-2.3.0-preview2 → ruby-2.4.0-preview1}/gc.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.3.0-preview2 → ruby-2.4.0-preview1}/id.h +9 -0
- data/lib/debase/ruby_core_source/{ruby-2.3.0-preview2 → ruby-2.4.0-preview1}/id_table.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.3.0-preview2 → ruby-2.4.0-preview1}/insns.inc +48 -46
- data/lib/debase/ruby_core_source/{ruby-2.3.0-preview2 → ruby-2.4.0-preview1}/insns_info.inc +20 -0
- data/lib/debase/ruby_core_source/{ruby-2.3.0-preview2 → ruby-2.4.0-preview1}/internal.h +292 -52
- data/lib/debase/ruby_core_source/{ruby-2.3.0-preview2 → ruby-2.4.0-preview1}/iseq.h +18 -15
- data/lib/debase/ruby_core_source/{ruby-2.3.0-preview2 → ruby-2.4.0-preview1}/known_errors.inc +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.3.0-preview2 → ruby-2.4.0-preview1}/method.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.3.0-preview2 → ruby-2.4.0-preview1}/node.h +3 -2
- data/lib/debase/ruby_core_source/{ruby-2.3.0-preview2 → ruby-2.4.0-preview1}/node_name.inc +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.3.0-preview2 → ruby-2.4.0-preview1}/opt_sc.inc +16 -0
- data/lib/debase/ruby_core_source/{ruby-2.3.0-preview2 → ruby-2.4.0-preview1}/optinsn.inc +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.3.0-preview2 → ruby-2.4.0-preview1}/optunifs.inc +2 -0
- data/lib/debase/ruby_core_source/{ruby-2.3.0-preview2 → ruby-2.4.0-preview1}/parse.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.3.0-preview2 → ruby-2.4.0-preview1}/probes_helper.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.3.0-preview2 → ruby-2.4.0-preview1}/regenc.h +19 -11
- data/lib/debase/ruby_core_source/{ruby-2.3.0-preview2 → ruby-2.4.0-preview1}/regint.h +8 -0
- data/lib/debase/ruby_core_source/{ruby-2.3.0-preview2 → ruby-2.4.0-preview1}/regparse.h +0 -0
- data/lib/debase/ruby_core_source/ruby-2.4.0-preview1/revision.h +1 -0
- data/lib/debase/ruby_core_source/ruby-2.4.0-preview1/ruby_assert.h +54 -0
- data/lib/debase/ruby_core_source/{ruby-2.3.0-preview2 → ruby-2.4.0-preview1}/ruby_atomic.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.3.0-preview2 → ruby-2.4.0-preview1}/siphash.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.3.0-preview2 → ruby-2.4.0-preview1}/symbol.h +4 -4
- data/lib/debase/ruby_core_source/{ruby-2.3.0-preview2 → ruby-2.4.0-preview1}/thread_pthread.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.3.0-preview2 → ruby-2.4.0-preview1}/thread_win32.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.3.0-preview2 → ruby-2.4.0-preview1}/timev.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.3.0-preview2 → ruby-2.4.0-preview1}/transcode_data.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.3.0-preview2 → ruby-2.4.0-preview1}/version.h +26 -8
- data/lib/debase/ruby_core_source/{ruby-2.3.0-preview2 → ruby-2.4.0-preview1}/vm.inc +265 -254
- data/lib/debase/ruby_core_source/{ruby-2.3.0-preview2 → ruby-2.4.0-preview1}/vm_call_iseq_optimized.inc +5 -5
- data/lib/debase/ruby_core_source/{ruby-2.3.0-preview2 → ruby-2.4.0-preview1}/vm_core.h +35 -42
- data/lib/debase/ruby_core_source/{ruby-2.3.0-preview2 → ruby-2.4.0-preview1}/vm_debug.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.3.0-preview2 → ruby-2.4.0-preview1}/vm_exec.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.3.0-preview2 → ruby-2.4.0-preview1}/vm_insnhelper.h +3 -3
- data/lib/debase/ruby_core_source/{ruby-2.3.0-preview2 → ruby-2.4.0-preview1}/vm_opts.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.3.0-preview2 → ruby-2.4.0-preview1}/vmtc.inc +2 -0
- data/lib/debase/ruby_core_source/version.rb +1 -1
- metadata +49 -48
- data/lib/debase/ruby_core_source/ruby-2.3.0-preview2/revision.h +0 -1
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
iseq.h -
|
|
4
4
|
|
|
5
|
-
$Author:
|
|
5
|
+
$Author: naruse $
|
|
6
6
|
created at: 04/01/01 23:36:57 JST
|
|
7
7
|
|
|
8
8
|
Copyright (C) 2004-2008 Koichi Sasada
|
|
@@ -27,15 +27,16 @@ 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
|
|
30
|
+
ISEQ_MARK_ARY_COVERAGE,
|
|
31
|
+
ISEQ_MARK_ARY_FLIP_CNT,
|
|
32
|
+
ISEQ_MARK_ARY_ORIGINAL_ISEQ,
|
|
33
|
+
ISEQ_MARK_ARY_INITIAL_SIZE
|
|
33
34
|
};
|
|
34
35
|
|
|
35
36
|
static inline VALUE
|
|
36
37
|
iseq_mark_ary_create(int flip_cnt)
|
|
37
38
|
{
|
|
38
|
-
VALUE ary = rb_ary_tmp_new(
|
|
39
|
+
VALUE ary = rb_ary_tmp_new(ISEQ_MARK_ARY_INITIAL_SIZE);
|
|
39
40
|
rb_ary_push(ary, Qnil); /* ISEQ_MARK_ARY_COVERAGE */
|
|
40
41
|
rb_ary_push(ary, INT2FIX(flip_cnt)); /* ISEQ_MARK_ARY_FLIP_CNT */
|
|
41
42
|
rb_ary_push(ary, Qnil); /* ISEQ_MARK_ARY_ORIGINAL_ISEQ */
|
|
@@ -123,16 +124,17 @@ const rb_iseq_t *rb_method_iseq(VALUE body);
|
|
|
123
124
|
const rb_iseq_t *rb_proc_get_iseq(VALUE proc, int *is_proc);
|
|
124
125
|
|
|
125
126
|
struct rb_compile_option_struct {
|
|
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;
|
|
127
|
+
unsigned int inline_const_cache: 1;
|
|
128
|
+
unsigned int peephole_optimization: 1;
|
|
129
|
+
unsigned int tailcall_optimization: 1;
|
|
130
|
+
unsigned int specialized_instruction: 1;
|
|
131
|
+
unsigned int operands_unification: 1;
|
|
132
|
+
unsigned int instructions_unification: 1;
|
|
133
|
+
unsigned int stack_caching: 1;
|
|
134
|
+
unsigned int trace_instruction: 1;
|
|
135
|
+
unsigned int frozen_string_literal: 1;
|
|
136
|
+
unsigned int debug_frozen_string_literal: 1;
|
|
137
|
+
unsigned int coverage_enabled: 1;
|
|
136
138
|
int debug_level;
|
|
137
139
|
};
|
|
138
140
|
|
|
@@ -211,6 +213,7 @@ struct iseq_compile_data {
|
|
|
211
213
|
unsigned int ci_index;
|
|
212
214
|
unsigned int ci_kw_index;
|
|
213
215
|
const rb_compile_option_t *option;
|
|
216
|
+
struct rb_id_table *ivar_cache_table;
|
|
214
217
|
#if SUPPORT_JOKE
|
|
215
218
|
st_table *labels_table;
|
|
216
219
|
#endif
|
data/lib/debase/ruby_core_source/{ruby-2.3.0-preview2 → ruby-2.4.0-preview1}/known_errors.inc
RENAMED
|
File without changes
|
|
File without changes
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
node.h -
|
|
4
4
|
|
|
5
|
-
$Author:
|
|
5
|
+
$Author: hsbt $
|
|
6
6
|
created at: Fri May 28 15:14:02 JST 1993
|
|
7
7
|
|
|
8
8
|
Copyright (C) 1993-2007 Yukihiro Matsumoto
|
|
@@ -261,7 +261,7 @@ typedef struct RNode {
|
|
|
261
261
|
|
|
262
262
|
#define RNODE(obj) (R_CAST(RNode)(obj))
|
|
263
263
|
|
|
264
|
-
/* FL : 0..4: T_TYPES, 5: KEEP_WB, 6: PROMOTED, 7: FINALIZE, 8: TAINT, 9:
|
|
264
|
+
/* FL : 0..4: T_TYPES, 5: KEEP_WB, 6: PROMOTED, 7: FINALIZE, 8: TAINT, 9: UNTRUSTED, 10: EXIVAR, 11: FREEZE */
|
|
265
265
|
/* NODE_FL: 0..4: T_TYPES, 5: KEEP_WB, 6: PROMOTED, 7: NODE_FL_NEWLINE|NODE_FL_CREF_PUSHED_BY_EVAL,
|
|
266
266
|
* 8..14: nd_type,
|
|
267
267
|
* 15..: nd_line
|
|
@@ -506,6 +506,7 @@ void *rb_parser_malloc(struct parser_params *, size_t);
|
|
|
506
506
|
void *rb_parser_realloc(struct parser_params *, void *, size_t);
|
|
507
507
|
void *rb_parser_calloc(struct parser_params *, size_t, size_t);
|
|
508
508
|
void rb_parser_free(struct parser_params *, void *);
|
|
509
|
+
void rb_parser_printf(struct parser_params *parser, const char *fmt, ...);
|
|
509
510
|
|
|
510
511
|
RUBY_SYMBOL_EXPORT_END
|
|
511
512
|
|
|
File without changes
|
|
@@ -659,6 +659,20 @@ 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,
|
|
662
676
|
SC_ERROR}
|
|
663
677
|
};
|
|
664
678
|
|
|
@@ -753,6 +767,8 @@ static const VALUE sc_insn_next[] = {
|
|
|
753
767
|
SCS_XX,
|
|
754
768
|
SCS_XX,
|
|
755
769
|
SCS_XX,
|
|
770
|
+
SCS_XX,
|
|
771
|
+
SCS_XX,
|
|
756
772
|
SCS_XX
|
|
757
773
|
};
|
|
758
774
|
|
|
File without changes
|
|
File without changes
|
data/lib/debase/ruby_core_source/{ruby-2.3.0-preview2 → ruby-2.4.0-preview1}/probes_helper.h
RENAMED
|
File without changes
|
|
@@ -129,33 +129,41 @@ 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
|
-
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));
|
|
132
|
+
CONSTFUNC(ONIG_EXTERN int onigenc_not_support_get_ctype_code_range P_((OnigCtype ctype, OnigCodePoint* sb_out, const OnigCodePoint* ranges[], OnigEncoding enc)));
|
|
133
|
+
PUREFUNC(ONIG_EXTERN int onigenc_is_mbc_newline_0x0a P_((const UChar* p, const UChar* end, OnigEncoding enc)));
|
|
134
|
+
|
|
135
|
+
#ifdef ONIG_CASE_MAPPING
|
|
136
|
+
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));
|
|
137
|
+
#endif /* ONIG_CASE_MAPPING */
|
|
134
138
|
|
|
135
139
|
|
|
136
140
|
/* methods for single byte encoding */
|
|
137
141
|
ONIG_EXTERN int onigenc_ascii_mbc_case_fold P_((OnigCaseFoldType flag, const UChar** p, const UChar* end, UChar* lower, OnigEncoding enc));
|
|
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
|
+
CONSTFUNC(ONIG_EXTERN int onigenc_single_byte_mbc_enc_len P_((const UChar* p, const UChar* e, OnigEncoding enc)));
|
|
143
|
+
PUREFUNC(ONIG_EXTERN OnigCodePoint onigenc_single_byte_mbc_to_code P_((const UChar* p, const UChar* end, OnigEncoding enc)));
|
|
144
|
+
CONSTFUNC(ONIG_EXTERN int onigenc_single_byte_code_to_mbclen P_((OnigCodePoint code, OnigEncoding enc)));
|
|
141
145
|
ONIG_EXTERN int onigenc_single_byte_code_to_mbc P_((OnigCodePoint code, UChar *buf, OnigEncoding enc));
|
|
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));
|
|
146
|
+
CONSTFUNC(ONIG_EXTERN UChar* onigenc_single_byte_left_adjust_char_head P_((const UChar* start, const UChar* s, const OnigUChar* end, OnigEncoding enc)));
|
|
147
|
+
CONSTFUNC(ONIG_EXTERN int onigenc_always_true_is_allowed_reverse_match P_((const UChar* s, const UChar* end, OnigEncoding enc)));
|
|
148
|
+
CONSTFUNC(ONIG_EXTERN int onigenc_always_false_is_allowed_reverse_match P_((const UChar* s, const UChar* end, OnigEncoding enc)));
|
|
149
|
+
CONSTFUNC(ONIG_EXTERN int onigenc_ascii_is_code_ctype P_((OnigCodePoint code, unsigned int ctype, OnigEncoding enc)));
|
|
146
150
|
|
|
147
151
|
/* methods for multi byte encoding */
|
|
148
152
|
ONIG_EXTERN OnigCodePoint onigenc_mbn_mbc_to_code P_((OnigEncoding enc, const UChar* p, const UChar* end));
|
|
149
153
|
ONIG_EXTERN int onigenc_mbn_mbc_case_fold P_((OnigEncoding enc, OnigCaseFoldType flag, const UChar** p, const UChar* end, UChar* lower));
|
|
150
|
-
ONIG_EXTERN int onigenc_mb2_code_to_mbclen P_((OnigCodePoint code, OnigEncoding enc));
|
|
154
|
+
CONSTFUNC(ONIG_EXTERN int onigenc_mb2_code_to_mbclen P_((OnigCodePoint code, OnigEncoding enc)));
|
|
151
155
|
ONIG_EXTERN int onigenc_mb2_code_to_mbc P_((OnigEncoding enc, OnigCodePoint code, UChar *buf));
|
|
152
156
|
ONIG_EXTERN int onigenc_minimum_property_name_to_ctype P_((OnigEncoding enc, const UChar* p, const UChar* end));
|
|
153
157
|
ONIG_EXTERN int onigenc_unicode_property_name_to_ctype P_((OnigEncoding enc, const UChar* p, const UChar* end));
|
|
154
158
|
ONIG_EXTERN int onigenc_mb2_is_code_ctype P_((OnigEncoding enc, OnigCodePoint code, unsigned int ctype));
|
|
155
|
-
ONIG_EXTERN int onigenc_mb4_code_to_mbclen P_((OnigCodePoint code, OnigEncoding enc));
|
|
159
|
+
CONSTFUNC(ONIG_EXTERN int onigenc_mb4_code_to_mbclen P_((OnigCodePoint code, OnigEncoding enc)));
|
|
156
160
|
ONIG_EXTERN int onigenc_mb4_code_to_mbc P_((OnigEncoding enc, OnigCodePoint code, UChar *buf));
|
|
157
161
|
ONIG_EXTERN int onigenc_mb4_is_code_ctype P_((OnigEncoding enc, OnigCodePoint code, unsigned int ctype));
|
|
158
162
|
|
|
163
|
+
#ifdef ONIG_CASE_MAPPING
|
|
164
|
+
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));
|
|
165
|
+
#endif /* ONIG_CASE_MAPPING */
|
|
166
|
+
|
|
159
167
|
|
|
160
168
|
/* in enc/unicode.c */
|
|
161
169
|
ONIG_EXTERN int onigenc_unicode_is_code_ctype P_((OnigCodePoint code, unsigned int ctype, OnigEncoding enc));
|
|
@@ -48,10 +48,18 @@
|
|
|
48
48
|
#endif
|
|
49
49
|
#endif
|
|
50
50
|
|
|
51
|
+
#ifndef UNALIGNED_WORD_ACCESS
|
|
51
52
|
#if defined(__i386) || defined(__i386__) || defined(_M_IX86) || \
|
|
52
53
|
defined(__x86_64) || defined(__x86_64__) || defined(_M_AMD64) || \
|
|
53
54
|
defined(__powerpc64__) || \
|
|
54
55
|
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
|
|
55
63
|
#define PLATFORM_UNALIGNED_WORD_ACCESS
|
|
56
64
|
#endif
|
|
57
65
|
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
#define RUBY_REVISION 55466
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
#ifndef RUBY_ASSERT_H
|
|
2
|
+
#define RUBY_ASSERT_H
|
|
3
|
+
|
|
4
|
+
#include "ruby/ruby.h"
|
|
5
|
+
|
|
6
|
+
#if defined(__cplusplus)
|
|
7
|
+
extern "C" {
|
|
8
|
+
#if 0
|
|
9
|
+
} /* satisfy cc-mode */
|
|
10
|
+
#endif
|
|
11
|
+
#endif
|
|
12
|
+
|
|
13
|
+
NORETURN(void rb_assert_failure(const char *, int, const char *, const char *));
|
|
14
|
+
#ifdef RUBY_FUNCTION_NAME_STRING
|
|
15
|
+
# define RUBY_ASSERT_FAIL(expr) \
|
|
16
|
+
rb_assert_failure(__FILE__, __LINE__, RUBY_FUNCTION_NAME_STRING, expr)
|
|
17
|
+
#else
|
|
18
|
+
# define RUBY_ASSERT_FAIL(expr) \
|
|
19
|
+
rb_assert_failure(__FILE__, __LINE__, NULL, expr)
|
|
20
|
+
#endif
|
|
21
|
+
#define RUBY_ASSERT_MESG(expr, mesg) \
|
|
22
|
+
((expr) ? (void)0 : RUBY_ASSERT_FAIL(mesg))
|
|
23
|
+
#ifdef HAVE_BUILTIN___BUILTIN_CHOOSE_EXPR_CONSTANT_P
|
|
24
|
+
# define RUBY_ASSERT_MESG_WHEN(cond, expr, mesg) \
|
|
25
|
+
__builtin_choose_expr( \
|
|
26
|
+
__builtin_constant_p(cond), \
|
|
27
|
+
__builtin_choose_expr(cond, RUBY_ASSERT_MESG(expr, mesg), (void)0), \
|
|
28
|
+
RUBY_ASSERT_MESG(!(cond) || (expr), mesg))
|
|
29
|
+
#else
|
|
30
|
+
# define RUBY_ASSERT_MESG_WHEN(cond, expr, mesg) \
|
|
31
|
+
RUBY_ASSERT_MESG(!(cond) || (expr), mesg)
|
|
32
|
+
#endif
|
|
33
|
+
#define RUBY_ASSERT(expr) RUBY_ASSERT_MESG_WHEN(!RUBY_NDEBUG+0, expr, #expr)
|
|
34
|
+
#define RUBY_ASSERT_WHEN(cond, expr) RUBY_ASSERT_MESG_WHEN(cond, expr, #expr)
|
|
35
|
+
|
|
36
|
+
#undef assert
|
|
37
|
+
#define assert RUBY_ASSERT
|
|
38
|
+
|
|
39
|
+
#ifndef RUBY_NDEBUG
|
|
40
|
+
# ifdef NDEBUG
|
|
41
|
+
# define RUBY_NDEBUG 1
|
|
42
|
+
# else
|
|
43
|
+
# define RUBY_NDEBUG 0
|
|
44
|
+
# endif
|
|
45
|
+
#endif
|
|
46
|
+
|
|
47
|
+
#if defined(__cplusplus)
|
|
48
|
+
#if 0
|
|
49
|
+
{ /* satisfy cc-mode */
|
|
50
|
+
#endif
|
|
51
|
+
} /* extern "C" { */
|
|
52
|
+
#endif
|
|
53
|
+
|
|
54
|
+
#endif
|
|
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 HAVE_BUILTIN___BUILTIN_CONSTANT_P
|
|
21
21
|
#define rb_id2sym(id) \
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
RB_GNUC_EXTENSION_BLOCK(__builtin_constant_p(id) && !DYNAMIC_ID_P(id) ? \
|
|
23
|
+
STATIC_ID2SYM(id) : rb_id2sym(id))
|
|
24
24
|
#endif
|
|
25
25
|
|
|
26
26
|
struct RSymbol {
|
|
@@ -36,7 +36,7 @@ struct RSymbol {
|
|
|
36
36
|
#define is_local_id(id) (id_type(id)==ID_LOCAL)
|
|
37
37
|
#define is_global_id(id) (id_type(id)==ID_GLOBAL)
|
|
38
38
|
#define is_instance_id(id) (id_type(id)==ID_INSTANCE)
|
|
39
|
-
#define is_attrset_id(id) (id_type(id)==ID_ATTRSET)
|
|
39
|
+
#define is_attrset_id(id) ((id)==idASET||id_type(id)==ID_ATTRSET)
|
|
40
40
|
#define is_const_id(id) (id_type(id)==ID_CONST)
|
|
41
41
|
#define is_class_id(id) (id_type(id)==ID_CLASS)
|
|
42
42
|
#define is_junk_id(id) (id_type(id)==ID_JUNK)
|
data/lib/debase/ruby_core_source/{ruby-2.3.0-preview2 → ruby-2.4.0-preview1}/thread_pthread.h
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
data/lib/debase/ruby_core_source/{ruby-2.3.0-preview2 → ruby-2.4.0-preview1}/transcode_data.h
RENAMED
|
File without changes
|
|
@@ -1,13 +1,31 @@
|
|
|
1
|
-
#define RUBY_VERSION "2.
|
|
2
|
-
#define RUBY_RELEASE_DATE "
|
|
1
|
+
#define RUBY_VERSION "2.4.0"
|
|
2
|
+
#define RUBY_RELEASE_DATE RUBY_RELEASE_YEAR_STR"-"RUBY_RELEASE_MONTH_STR"-"RUBY_RELEASE_DAY_STR
|
|
3
3
|
#define RUBY_PATCHLEVEL -1
|
|
4
4
|
|
|
5
|
-
#define RUBY_RELEASE_YEAR
|
|
6
|
-
#define RUBY_RELEASE_MONTH
|
|
7
|
-
#define RUBY_RELEASE_DAY
|
|
5
|
+
#define RUBY_RELEASE_YEAR 2016
|
|
6
|
+
#define RUBY_RELEASE_MONTH 6
|
|
7
|
+
#define RUBY_RELEASE_DAY 20
|
|
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
|
+
|
|
11
29
|
#if !defined RUBY_LIB_VERSION && defined RUBY_LIB_VERSION_STYLE
|
|
12
30
|
# if RUBY_LIB_VERSION_STYLE == 3
|
|
13
31
|
# define RUBY_LIB_VERSION STRINGIZE(RUBY_API_VERSION_MAJOR)"."STRINGIZE(RUBY_API_VERSION_MINOR)"."STRINGIZE(RUBY_API_VERSION_TEENY)
|
|
@@ -17,7 +35,7 @@
|
|
|
17
35
|
#endif
|
|
18
36
|
|
|
19
37
|
#if RUBY_PATCHLEVEL == -1
|
|
20
|
-
#define RUBY_PATCHLEVEL_STR "
|
|
38
|
+
#define RUBY_PATCHLEVEL_STR "preview1"
|
|
21
39
|
#else
|
|
22
40
|
#define RUBY_PATCHLEVEL_STR "p"STRINGIZE(RUBY_PATCHLEVEL)
|
|
23
41
|
#endif
|
|
@@ -50,6 +68,6 @@
|
|
|
50
68
|
"["RUBY_PLATFORM"]"
|
|
51
69
|
# define RUBY_COPYRIGHT \
|
|
52
70
|
"ruby - Copyright (C) " \
|
|
53
|
-
|
|
54
|
-
|
|
71
|
+
RUBY_BIRTH_YEAR_STR"-" \
|
|
72
|
+
RUBY_RELEASE_YEAR_STR" " \
|
|
55
73
|
RUBY_AUTHOR
|
|
@@ -544,16 +544,10 @@ INSN_ENTRY(concatstrings){
|
|
|
544
544
|
COLLECT_USAGE_OPERAND(BIN(concatstrings), 0, num);
|
|
545
545
|
{
|
|
546
546
|
#line 368 "insns.def"
|
|
547
|
-
|
|
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
|
-
}
|
|
547
|
+
val = rb_str_concat_literals(num, &TOPN(num-1));
|
|
554
548
|
POPN(num);
|
|
555
549
|
|
|
556
|
-
#line
|
|
550
|
+
#line 551 "vm.inc"
|
|
557
551
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
|
558
552
|
PUSH(val);
|
|
559
553
|
#undef CURRENT_INSN_concatstrings
|
|
@@ -575,10 +569,10 @@ INSN_ENTRY(tostring){
|
|
|
575
569
|
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
|
576
570
|
COLLECT_USAGE_INSN(BIN(tostring));
|
|
577
571
|
{
|
|
578
|
-
#line
|
|
572
|
+
#line 383 "insns.def"
|
|
579
573
|
val = rb_obj_as_string(val);
|
|
580
574
|
|
|
581
|
-
#line
|
|
575
|
+
#line 576 "vm.inc"
|
|
582
576
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
|
583
577
|
PUSH(val);
|
|
584
578
|
#undef CURRENT_INSN_tostring
|
|
@@ -601,13 +595,13 @@ INSN_ENTRY(freezestring){
|
|
|
601
595
|
COLLECT_USAGE_INSN(BIN(freezestring));
|
|
602
596
|
COLLECT_USAGE_OPERAND(BIN(freezestring), 0, debug_info);
|
|
603
597
|
{
|
|
604
|
-
#line
|
|
598
|
+
#line 397 "insns.def"
|
|
605
599
|
if (!NIL_P(debug_info)) {
|
|
606
600
|
rb_ivar_set(str, id_debug_created_info, debug_info);
|
|
607
601
|
}
|
|
608
602
|
rb_str_freeze(str);
|
|
609
603
|
|
|
610
|
-
#line
|
|
604
|
+
#line 605 "vm.inc"
|
|
611
605
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
|
612
606
|
PUSH(str);
|
|
613
607
|
#undef CURRENT_INSN_freezestring
|
|
@@ -632,7 +626,7 @@ INSN_ENTRY(toregexp){
|
|
|
632
626
|
COLLECT_USAGE_OPERAND(BIN(toregexp), 0, opt);
|
|
633
627
|
COLLECT_USAGE_OPERAND(BIN(toregexp), 1, cnt);
|
|
634
628
|
{
|
|
635
|
-
#line
|
|
629
|
+
#line 416 "insns.def"
|
|
636
630
|
VALUE rb_reg_new_ary(VALUE ary, int options);
|
|
637
631
|
rb_num_t i;
|
|
638
632
|
const VALUE ary = rb_ary_tmp_new(cnt);
|
|
@@ -643,7 +637,7 @@ INSN_ENTRY(toregexp){
|
|
|
643
637
|
val = rb_reg_new_ary(ary, (int)opt);
|
|
644
638
|
rb_ary_clear(ary);
|
|
645
639
|
|
|
646
|
-
#line
|
|
640
|
+
#line 641 "vm.inc"
|
|
647
641
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
|
648
642
|
PUSH(val);
|
|
649
643
|
#undef CURRENT_INSN_toregexp
|
|
@@ -666,11 +660,11 @@ INSN_ENTRY(newarray){
|
|
|
666
660
|
COLLECT_USAGE_INSN(BIN(newarray));
|
|
667
661
|
COLLECT_USAGE_OPERAND(BIN(newarray), 0, num);
|
|
668
662
|
{
|
|
669
|
-
#line
|
|
663
|
+
#line 438 "insns.def"
|
|
670
664
|
val = rb_ary_new4((long)num, STACK_ADDR_FROM_TOP(num));
|
|
671
665
|
POPN(num);
|
|
672
666
|
|
|
673
|
-
#line
|
|
667
|
+
#line 668 "vm.inc"
|
|
674
668
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
|
675
669
|
PUSH(val);
|
|
676
670
|
#undef CURRENT_INSN_newarray
|
|
@@ -693,10 +687,10 @@ INSN_ENTRY(duparray){
|
|
|
693
687
|
COLLECT_USAGE_INSN(BIN(duparray));
|
|
694
688
|
COLLECT_USAGE_OPERAND(BIN(duparray), 0, ary);
|
|
695
689
|
{
|
|
696
|
-
#line
|
|
690
|
+
#line 453 "insns.def"
|
|
697
691
|
val = rb_ary_resurrect(ary);
|
|
698
692
|
|
|
699
|
-
#line
|
|
693
|
+
#line 694 "vm.inc"
|
|
700
694
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
|
701
695
|
PUSH(val);
|
|
702
696
|
#undef CURRENT_INSN_duparray
|
|
@@ -721,10 +715,10 @@ INSN_ENTRY(expandarray){
|
|
|
721
715
|
COLLECT_USAGE_OPERAND(BIN(expandarray), 0, num);
|
|
722
716
|
COLLECT_USAGE_OPERAND(BIN(expandarray), 1, flag);
|
|
723
717
|
{
|
|
724
|
-
#line
|
|
718
|
+
#line 481 "insns.def"
|
|
725
719
|
vm_expandarray(GET_CFP(), ary, num, (int)flag);
|
|
726
720
|
|
|
727
|
-
#line
|
|
721
|
+
#line 722 "vm.inc"
|
|
728
722
|
#undef CURRENT_INSN_expandarray
|
|
729
723
|
#undef INSN_IS_SC
|
|
730
724
|
#undef INSN_LABEL
|
|
@@ -746,7 +740,7 @@ INSN_ENTRY(concatarray){
|
|
|
746
740
|
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
|
747
741
|
COLLECT_USAGE_INSN(BIN(concatarray));
|
|
748
742
|
{
|
|
749
|
-
#line
|
|
743
|
+
#line 495 "insns.def"
|
|
750
744
|
const VALUE ary2 = ary2st;
|
|
751
745
|
VALUE tmp1 = rb_check_convert_type(ary1, T_ARRAY, "Array", "to_a");
|
|
752
746
|
VALUE tmp2 = rb_check_convert_type(ary2, T_ARRAY, "Array", "to_a");
|
|
@@ -764,7 +758,7 @@ INSN_ENTRY(concatarray){
|
|
|
764
758
|
}
|
|
765
759
|
ary = rb_ary_concat(tmp1, tmp2);
|
|
766
760
|
|
|
767
|
-
#line
|
|
761
|
+
#line 762 "vm.inc"
|
|
768
762
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
|
769
763
|
PUSH(ary);
|
|
770
764
|
#undef CURRENT_INSN_concatarray
|
|
@@ -788,7 +782,7 @@ INSN_ENTRY(splatarray){
|
|
|
788
782
|
COLLECT_USAGE_INSN(BIN(splatarray));
|
|
789
783
|
COLLECT_USAGE_OPERAND(BIN(splatarray), 0, flag);
|
|
790
784
|
{
|
|
791
|
-
#line
|
|
785
|
+
#line 524 "insns.def"
|
|
792
786
|
VALUE tmp = rb_check_convert_type(ary, T_ARRAY, "Array", "to_a");
|
|
793
787
|
if (NIL_P(tmp)) {
|
|
794
788
|
tmp = rb_ary_new3(1, ary);
|
|
@@ -798,7 +792,7 @@ INSN_ENTRY(splatarray){
|
|
|
798
792
|
}
|
|
799
793
|
obj = tmp;
|
|
800
794
|
|
|
801
|
-
#line
|
|
795
|
+
#line 796 "vm.inc"
|
|
802
796
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
|
803
797
|
PUSH(obj);
|
|
804
798
|
#undef CURRENT_INSN_splatarray
|
|
@@ -821,7 +815,7 @@ INSN_ENTRY(newhash){
|
|
|
821
815
|
COLLECT_USAGE_INSN(BIN(newhash));
|
|
822
816
|
COLLECT_USAGE_OPERAND(BIN(newhash), 0, num);
|
|
823
817
|
{
|
|
824
|
-
#line
|
|
818
|
+
#line 546 "insns.def"
|
|
825
819
|
rb_num_t i;
|
|
826
820
|
|
|
827
821
|
RUBY_DTRACE_CREATE_HOOK(HASH, num);
|
|
@@ -835,7 +829,7 @@ INSN_ENTRY(newhash){
|
|
|
835
829
|
}
|
|
836
830
|
POPN(num);
|
|
837
831
|
|
|
838
|
-
#line
|
|
832
|
+
#line 833 "vm.inc"
|
|
839
833
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
|
840
834
|
PUSH(val);
|
|
841
835
|
#undef CURRENT_INSN_newhash
|
|
@@ -860,10 +854,10 @@ INSN_ENTRY(newrange){
|
|
|
860
854
|
COLLECT_USAGE_INSN(BIN(newrange));
|
|
861
855
|
COLLECT_USAGE_OPERAND(BIN(newrange), 0, flag);
|
|
862
856
|
{
|
|
863
|
-
#line
|
|
857
|
+
#line 571 "insns.def"
|
|
864
858
|
val = rb_range_new(low, high, (int)flag);
|
|
865
859
|
|
|
866
|
-
#line
|
|
860
|
+
#line 861 "vm.inc"
|
|
867
861
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
|
868
862
|
PUSH(val);
|
|
869
863
|
#undef CURRENT_INSN_newrange
|
|
@@ -885,11 +879,11 @@ INSN_ENTRY(pop){
|
|
|
885
879
|
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
|
886
880
|
COLLECT_USAGE_INSN(BIN(pop));
|
|
887
881
|
{
|
|
888
|
-
#line
|
|
882
|
+
#line 589 "insns.def"
|
|
889
883
|
(void)val;
|
|
890
884
|
/* none */
|
|
891
885
|
|
|
892
|
-
#line
|
|
886
|
+
#line 887 "vm.inc"
|
|
893
887
|
#undef CURRENT_INSN_pop
|
|
894
888
|
#undef INSN_IS_SC
|
|
895
889
|
#undef INSN_LABEL
|
|
@@ -911,10 +905,10 @@ INSN_ENTRY(dup){
|
|
|
911
905
|
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
|
912
906
|
COLLECT_USAGE_INSN(BIN(dup));
|
|
913
907
|
{
|
|
914
|
-
#line
|
|
908
|
+
#line 604 "insns.def"
|
|
915
909
|
val1 = val2 = val;
|
|
916
910
|
|
|
917
|
-
#line
|
|
911
|
+
#line 912 "vm.inc"
|
|
918
912
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 2);
|
|
919
913
|
PUSH(val1);
|
|
920
914
|
PUSH(val2);
|
|
@@ -937,7 +931,7 @@ INSN_ENTRY(dupn){
|
|
|
937
931
|
COLLECT_USAGE_INSN(BIN(dupn));
|
|
938
932
|
COLLECT_USAGE_OPERAND(BIN(dupn), 0, n);
|
|
939
933
|
{
|
|
940
|
-
#line
|
|
934
|
+
#line 618 "insns.def"
|
|
941
935
|
rb_num_t i;
|
|
942
936
|
VALUE *sp = STACK_ADDR_FROM_TOP(n);
|
|
943
937
|
for (i = 0; i < n; i++) {
|
|
@@ -945,7 +939,7 @@ INSN_ENTRY(dupn){
|
|
|
945
939
|
}
|
|
946
940
|
INC_SP(n);
|
|
947
941
|
|
|
948
|
-
#line
|
|
942
|
+
#line 943 "vm.inc"
|
|
949
943
|
#undef CURRENT_INSN_dupn
|
|
950
944
|
#undef INSN_IS_SC
|
|
951
945
|
#undef INSN_LABEL
|
|
@@ -966,10 +960,10 @@ INSN_ENTRY(swap){
|
|
|
966
960
|
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
|
967
961
|
COLLECT_USAGE_INSN(BIN(swap));
|
|
968
962
|
{
|
|
969
|
-
#line
|
|
963
|
+
#line 638 "insns.def"
|
|
970
964
|
/* none */
|
|
971
965
|
|
|
972
|
-
#line
|
|
966
|
+
#line 967 "vm.inc"
|
|
973
967
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 2);
|
|
974
968
|
PUSH(obj);
|
|
975
969
|
PUSH(val);
|
|
@@ -992,7 +986,7 @@ INSN_ENTRY(reverse){
|
|
|
992
986
|
COLLECT_USAGE_INSN(BIN(reverse));
|
|
993
987
|
COLLECT_USAGE_OPERAND(BIN(reverse), 0, n);
|
|
994
988
|
{
|
|
995
|
-
#line
|
|
989
|
+
#line 652 "insns.def"
|
|
996
990
|
rb_num_t i;
|
|
997
991
|
VALUE *sp = STACK_ADDR_FROM_TOP(n);
|
|
998
992
|
|
|
@@ -1003,7 +997,7 @@ INSN_ENTRY(reverse){
|
|
|
1003
997
|
TOPN(i) = v0;
|
|
1004
998
|
}
|
|
1005
999
|
|
|
1006
|
-
#line
|
|
1000
|
+
#line 1001 "vm.inc"
|
|
1007
1001
|
#undef CURRENT_INSN_reverse
|
|
1008
1002
|
#undef INSN_IS_SC
|
|
1009
1003
|
#undef INSN_LABEL
|
|
@@ -1023,10 +1017,10 @@ INSN_ENTRY(reput){
|
|
|
1023
1017
|
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
|
1024
1018
|
COLLECT_USAGE_INSN(BIN(reput));
|
|
1025
1019
|
{
|
|
1026
|
-
#line
|
|
1020
|
+
#line 674 "insns.def"
|
|
1027
1021
|
/* none */
|
|
1028
1022
|
|
|
1029
|
-
#line
|
|
1023
|
+
#line 1024 "vm.inc"
|
|
1030
1024
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
|
1031
1025
|
PUSH(val);
|
|
1032
1026
|
#undef CURRENT_INSN_reput
|
|
@@ -1049,10 +1043,10 @@ INSN_ENTRY(topn){
|
|
|
1049
1043
|
COLLECT_USAGE_INSN(BIN(topn));
|
|
1050
1044
|
COLLECT_USAGE_OPERAND(BIN(topn), 0, n);
|
|
1051
1045
|
{
|
|
1052
|
-
#line
|
|
1046
|
+
#line 688 "insns.def"
|
|
1053
1047
|
val = TOPN(n);
|
|
1054
1048
|
|
|
1055
|
-
#line
|
|
1049
|
+
#line 1050 "vm.inc"
|
|
1056
1050
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
|
1057
1051
|
PUSH(val);
|
|
1058
1052
|
#undef CURRENT_INSN_topn
|
|
@@ -1075,10 +1069,10 @@ INSN_ENTRY(setn){
|
|
|
1075
1069
|
COLLECT_USAGE_INSN(BIN(setn));
|
|
1076
1070
|
COLLECT_USAGE_OPERAND(BIN(setn), 0, n);
|
|
1077
1071
|
{
|
|
1078
|
-
#line
|
|
1072
|
+
#line 702 "insns.def"
|
|
1079
1073
|
TOPN(n-1) = val;
|
|
1080
1074
|
|
|
1081
|
-
#line
|
|
1075
|
+
#line 1076 "vm.inc"
|
|
1082
1076
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
|
1083
1077
|
PUSH(val);
|
|
1084
1078
|
#undef CURRENT_INSN_setn
|
|
@@ -1100,10 +1094,10 @@ INSN_ENTRY(adjuststack){
|
|
|
1100
1094
|
COLLECT_USAGE_INSN(BIN(adjuststack));
|
|
1101
1095
|
COLLECT_USAGE_OPERAND(BIN(adjuststack), 0, n);
|
|
1102
1096
|
{
|
|
1103
|
-
#line
|
|
1097
|
+
#line 716 "insns.def"
|
|
1104
1098
|
DEC_SP(n);
|
|
1105
1099
|
|
|
1106
|
-
#line
|
|
1100
|
+
#line 1101 "vm.inc"
|
|
1107
1101
|
#undef CURRENT_INSN_adjuststack
|
|
1108
1102
|
#undef INSN_IS_SC
|
|
1109
1103
|
#undef INSN_LABEL
|
|
@@ -1129,10 +1123,10 @@ INSN_ENTRY(defined){
|
|
|
1129
1123
|
COLLECT_USAGE_OPERAND(BIN(defined), 1, obj);
|
|
1130
1124
|
COLLECT_USAGE_OPERAND(BIN(defined), 2, needstr);
|
|
1131
1125
|
{
|
|
1132
|
-
#line
|
|
1126
|
+
#line 735 "insns.def"
|
|
1133
1127
|
val = vm_defined(th, GET_CFP(), op_type, obj, needstr, v);
|
|
1134
1128
|
|
|
1135
|
-
#line
|
|
1129
|
+
#line 1130 "vm.inc"
|
|
1136
1130
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
|
1137
1131
|
PUSH(val);
|
|
1138
1132
|
#undef CURRENT_INSN_defined
|
|
@@ -1157,7 +1151,7 @@ INSN_ENTRY(checkmatch){
|
|
|
1157
1151
|
COLLECT_USAGE_INSN(BIN(checkmatch));
|
|
1158
1152
|
COLLECT_USAGE_OPERAND(BIN(checkmatch), 0, flag);
|
|
1159
1153
|
{
|
|
1160
|
-
#line
|
|
1154
|
+
#line 754 "insns.def"
|
|
1161
1155
|
enum vm_check_match_type checkmatch_type =
|
|
1162
1156
|
(enum vm_check_match_type)(flag & VM_CHECKMATCH_TYPE_MASK);
|
|
1163
1157
|
result = Qfalse;
|
|
@@ -1177,7 +1171,7 @@ INSN_ENTRY(checkmatch){
|
|
|
1177
1171
|
}
|
|
1178
1172
|
}
|
|
1179
1173
|
|
|
1180
|
-
#line
|
|
1174
|
+
#line 1175 "vm.inc"
|
|
1181
1175
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
|
1182
1176
|
PUSH(result);
|
|
1183
1177
|
#undef CURRENT_INSN_checkmatch
|
|
@@ -1202,7 +1196,7 @@ INSN_ENTRY(checkkeyword){
|
|
|
1202
1196
|
COLLECT_USAGE_OPERAND(BIN(checkkeyword), 0, kw_bits_index);
|
|
1203
1197
|
COLLECT_USAGE_OPERAND(BIN(checkkeyword), 1, keyword_index);
|
|
1204
1198
|
{
|
|
1205
|
-
#line
|
|
1199
|
+
#line 785 "insns.def"
|
|
1206
1200
|
const VALUE *ep = GET_EP();
|
|
1207
1201
|
const VALUE kw_bits = *(ep - kw_bits_index);
|
|
1208
1202
|
|
|
@@ -1215,7 +1209,7 @@ INSN_ENTRY(checkkeyword){
|
|
|
1215
1209
|
ret = rb_hash_has_key(kw_bits, INT2FIX(keyword_index)) ? Qfalse : Qtrue;
|
|
1216
1210
|
}
|
|
1217
1211
|
|
|
1218
|
-
#line
|
|
1212
|
+
#line 1213 "vm.inc"
|
|
1219
1213
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
|
1220
1214
|
PUSH(ret);
|
|
1221
1215
|
#undef CURRENT_INSN_checkkeyword
|
|
@@ -1237,7 +1231,7 @@ INSN_ENTRY(trace){
|
|
|
1237
1231
|
COLLECT_USAGE_INSN(BIN(trace));
|
|
1238
1232
|
COLLECT_USAGE_OPERAND(BIN(trace), 0, nf);
|
|
1239
1233
|
{
|
|
1240
|
-
#line
|
|
1234
|
+
#line 809 "insns.def"
|
|
1241
1235
|
rb_event_flag_t flag = (rb_event_flag_t)nf;
|
|
1242
1236
|
|
|
1243
1237
|
if (RUBY_DTRACE_METHOD_ENTRY_ENABLED() ||
|
|
@@ -1264,7 +1258,7 @@ INSN_ENTRY(trace){
|
|
|
1264
1258
|
EXEC_EVENT_HOOK(th, flag, GET_SELF(), 0, 0 /* id and klass are resolved at callee */,
|
|
1265
1259
|
(flag & (RUBY_EVENT_RETURN | RUBY_EVENT_B_RETURN)) ? TOPN(0) : Qundef);
|
|
1266
1260
|
|
|
1267
|
-
#line
|
|
1261
|
+
#line 1262 "vm.inc"
|
|
1268
1262
|
#undef CURRENT_INSN_trace
|
|
1269
1263
|
#undef INSN_IS_SC
|
|
1270
1264
|
#undef INSN_LABEL
|
|
@@ -1291,7 +1285,7 @@ INSN_ENTRY(defineclass){
|
|
|
1291
1285
|
COLLECT_USAGE_OPERAND(BIN(defineclass), 1, class_iseq);
|
|
1292
1286
|
COLLECT_USAGE_OPERAND(BIN(defineclass), 2, flags);
|
|
1293
1287
|
{
|
|
1294
|
-
#line
|
|
1288
|
+
#line 855 "insns.def"
|
|
1295
1289
|
VALUE klass;
|
|
1296
1290
|
rb_vm_defineclass_type_t type = VM_DEFINECLASS_TYPE(flags);
|
|
1297
1291
|
|
|
@@ -1305,10 +1299,6 @@ INSN_ENTRY(defineclass){
|
|
|
1305
1299
|
rb_obj_class(super));
|
|
1306
1300
|
}
|
|
1307
1301
|
|
|
1308
|
-
if (super == Qnil) {
|
|
1309
|
-
super = rb_cObject;
|
|
1310
|
-
}
|
|
1311
|
-
|
|
1312
1302
|
vm_check_if_namespace(cbase);
|
|
1313
1303
|
|
|
1314
1304
|
/* find klass */
|
|
@@ -1321,7 +1311,7 @@ INSN_ENTRY(defineclass){
|
|
|
1321
1311
|
rb_raise(rb_eTypeError, "%"PRIsVALUE" is not a class", rb_id2str(id));
|
|
1322
1312
|
}
|
|
1323
1313
|
|
|
1324
|
-
if (
|
|
1314
|
+
if (VM_DEFINECLASS_HAS_SUPERCLASS_P(flags)) {
|
|
1325
1315
|
VALUE tmp;
|
|
1326
1316
|
tmp = rb_class_real(RCLASS_SUPER(klass));
|
|
1327
1317
|
|
|
@@ -1332,6 +1322,9 @@ INSN_ENTRY(defineclass){
|
|
|
1332
1322
|
}
|
|
1333
1323
|
}
|
|
1334
1324
|
else {
|
|
1325
|
+
if (!VM_DEFINECLASS_HAS_SUPERCLASS_P(flags)) {
|
|
1326
|
+
super = rb_cObject;
|
|
1327
|
+
}
|
|
1335
1328
|
/* new class declaration */
|
|
1336
1329
|
klass = rb_define_class_id(id, super);
|
|
1337
1330
|
rb_set_class_path_string(klass, cbase, rb_id2str(id));
|
|
@@ -1382,7 +1375,7 @@ INSN_ENTRY(defineclass){
|
|
|
1382
1375
|
RESTORE_REGS();
|
|
1383
1376
|
NEXT_INSN();
|
|
1384
1377
|
|
|
1385
|
-
#line
|
|
1378
|
+
#line 1379 "vm.inc"
|
|
1386
1379
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
|
1387
1380
|
PUSH(val);
|
|
1388
1381
|
#undef CURRENT_INSN_defineclass
|
|
@@ -1409,14 +1402,14 @@ INSN_ENTRY(send){
|
|
|
1409
1402
|
COLLECT_USAGE_OPERAND(BIN(send), 1, cc);
|
|
1410
1403
|
COLLECT_USAGE_OPERAND(BIN(send), 2, blockiseq);
|
|
1411
1404
|
{
|
|
1412
|
-
#line
|
|
1405
|
+
#line 961 "insns.def"
|
|
1413
1406
|
struct rb_calling_info calling;
|
|
1414
1407
|
|
|
1415
1408
|
vm_caller_setup_arg_block(th, reg_cfp, &calling, ci, blockiseq, FALSE);
|
|
1416
1409
|
vm_search_method(ci, cc, calling.recv = TOPN(calling.argc = ci->orig_argc));
|
|
1417
1410
|
CALL_METHOD(&calling, ci, cc);
|
|
1418
1411
|
|
|
1419
|
-
#line
|
|
1412
|
+
#line 1413 "vm.inc"
|
|
1420
1413
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
|
1421
1414
|
PUSH(val);
|
|
1422
1415
|
#undef CURRENT_INSN_send
|
|
@@ -1439,7 +1432,7 @@ INSN_ENTRY(opt_str_freeze){
|
|
|
1439
1432
|
COLLECT_USAGE_INSN(BIN(opt_str_freeze));
|
|
1440
1433
|
COLLECT_USAGE_OPERAND(BIN(opt_str_freeze), 0, str);
|
|
1441
1434
|
{
|
|
1442
|
-
#line
|
|
1435
|
+
#line 974 "insns.def"
|
|
1443
1436
|
if (BASIC_OP_UNREDEFINED_P(BOP_FREEZE, STRING_REDEFINED_OP_FLAG)) {
|
|
1444
1437
|
val = str;
|
|
1445
1438
|
}
|
|
@@ -1447,7 +1440,7 @@ INSN_ENTRY(opt_str_freeze){
|
|
|
1447
1440
|
val = rb_funcall(rb_str_resurrect(str), idFreeze, 0);
|
|
1448
1441
|
}
|
|
1449
1442
|
|
|
1450
|
-
#line
|
|
1443
|
+
#line 1444 "vm.inc"
|
|
1451
1444
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
|
1452
1445
|
PUSH(val);
|
|
1453
1446
|
#undef CURRENT_INSN_opt_str_freeze
|
|
@@ -1455,6 +1448,108 @@ INSN_ENTRY(opt_str_freeze){
|
|
|
1455
1448
|
#undef INSN_LABEL
|
|
1456
1449
|
#undef LABEL_IS_SC
|
|
1457
1450
|
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);}}}
|
|
1458
1553
|
INSN_ENTRY(opt_send_without_block){
|
|
1459
1554
|
{
|
|
1460
1555
|
VALUE val;
|
|
@@ -1472,13 +1567,13 @@ INSN_ENTRY(opt_send_without_block){
|
|
|
1472
1567
|
COLLECT_USAGE_OPERAND(BIN(opt_send_without_block), 0, ci);
|
|
1473
1568
|
COLLECT_USAGE_OPERAND(BIN(opt_send_without_block), 1, cc);
|
|
1474
1569
|
{
|
|
1475
|
-
#line
|
|
1570
|
+
#line 1061 "insns.def"
|
|
1476
1571
|
struct rb_calling_info calling;
|
|
1477
1572
|
calling.blockptr = NULL;
|
|
1478
1573
|
vm_search_method(ci, cc, calling.recv = TOPN(calling.argc = ci->orig_argc));
|
|
1479
1574
|
CALL_METHOD(&calling, ci, cc);
|
|
1480
1575
|
|
|
1481
|
-
#line
|
|
1576
|
+
#line 1577 "vm.inc"
|
|
1482
1577
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
|
1483
1578
|
PUSH(val);
|
|
1484
1579
|
#undef CURRENT_INSN_opt_send_without_block
|
|
@@ -1505,7 +1600,7 @@ INSN_ENTRY(invokesuper){
|
|
|
1505
1600
|
COLLECT_USAGE_OPERAND(BIN(invokesuper), 1, cc);
|
|
1506
1601
|
COLLECT_USAGE_OPERAND(BIN(invokesuper), 2, blockiseq);
|
|
1507
1602
|
{
|
|
1508
|
-
#line
|
|
1603
|
+
#line 1078 "insns.def"
|
|
1509
1604
|
struct rb_calling_info calling;
|
|
1510
1605
|
calling.argc = ci->orig_argc;
|
|
1511
1606
|
|
|
@@ -1514,7 +1609,7 @@ INSN_ENTRY(invokesuper){
|
|
|
1514
1609
|
vm_search_super_method(th, GET_CFP(), &calling, ci, cc);
|
|
1515
1610
|
CALL_METHOD(&calling, ci, cc);
|
|
1516
1611
|
|
|
1517
|
-
#line
|
|
1612
|
+
#line 1613 "vm.inc"
|
|
1518
1613
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
|
1519
1614
|
PUSH(val);
|
|
1520
1615
|
#undef CURRENT_INSN_invokesuper
|
|
@@ -1537,7 +1632,7 @@ INSN_ENTRY(invokeblock){
|
|
|
1537
1632
|
COLLECT_USAGE_INSN(BIN(invokeblock));
|
|
1538
1633
|
COLLECT_USAGE_OPERAND(BIN(invokeblock), 0, ci);
|
|
1539
1634
|
{
|
|
1540
|
-
#line
|
|
1635
|
+
#line 1098 "insns.def"
|
|
1541
1636
|
struct rb_calling_info calling;
|
|
1542
1637
|
calling.argc = ci->orig_argc;
|
|
1543
1638
|
calling.blockptr = NULL;
|
|
@@ -1549,7 +1644,7 @@ INSN_ENTRY(invokeblock){
|
|
|
1549
1644
|
NEXT_INSN();
|
|
1550
1645
|
}
|
|
1551
1646
|
|
|
1552
|
-
#line
|
|
1647
|
+
#line 1648 "vm.inc"
|
|
1553
1648
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
|
1554
1649
|
PUSH(val);
|
|
1555
1650
|
#undef CURRENT_INSN_invokeblock
|
|
@@ -1571,7 +1666,7 @@ INSN_ENTRY(leave){
|
|
|
1571
1666
|
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
|
1572
1667
|
COLLECT_USAGE_INSN(BIN(leave));
|
|
1573
1668
|
{
|
|
1574
|
-
#line
|
|
1669
|
+
#line 1121 "insns.def"
|
|
1575
1670
|
if (OPT_CHECKED_RUN) {
|
|
1576
1671
|
const VALUE *const bp = vm_base_ptr(reg_cfp);
|
|
1577
1672
|
if (reg_cfp->sp != bp) {
|
|
@@ -1597,7 +1692,7 @@ INSN_ENTRY(leave){
|
|
|
1597
1692
|
RESTORE_REGS();
|
|
1598
1693
|
}
|
|
1599
1694
|
|
|
1600
|
-
#line
|
|
1695
|
+
#line 1696 "vm.inc"
|
|
1601
1696
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
|
1602
1697
|
PUSH(val);
|
|
1603
1698
|
#undef CURRENT_INSN_leave
|
|
@@ -1621,13 +1716,13 @@ INSN_ENTRY(throw){
|
|
|
1621
1716
|
COLLECT_USAGE_INSN(BIN(throw));
|
|
1622
1717
|
COLLECT_USAGE_OPERAND(BIN(throw), 0, throw_state);
|
|
1623
1718
|
{
|
|
1624
|
-
#line
|
|
1719
|
+
#line 1162 "insns.def"
|
|
1625
1720
|
RUBY_VM_CHECK_INTS(th);
|
|
1626
1721
|
val = vm_throw(th, GET_CFP(), throw_state, throwobj);
|
|
1627
1722
|
THROW_EXCEPTION(val);
|
|
1628
1723
|
/* unreachable */
|
|
1629
1724
|
|
|
1630
|
-
#line
|
|
1725
|
+
#line 1726 "vm.inc"
|
|
1631
1726
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
|
1632
1727
|
PUSH(val);
|
|
1633
1728
|
#undef CURRENT_INSN_throw
|
|
@@ -1649,11 +1744,11 @@ INSN_ENTRY(jump){
|
|
|
1649
1744
|
COLLECT_USAGE_INSN(BIN(jump));
|
|
1650
1745
|
COLLECT_USAGE_OPERAND(BIN(jump), 0, dst);
|
|
1651
1746
|
{
|
|
1652
|
-
#line
|
|
1747
|
+
#line 1183 "insns.def"
|
|
1653
1748
|
RUBY_VM_CHECK_INTS(th);
|
|
1654
1749
|
JUMP(dst);
|
|
1655
1750
|
|
|
1656
|
-
#line
|
|
1751
|
+
#line 1752 "vm.inc"
|
|
1657
1752
|
#undef CURRENT_INSN_jump
|
|
1658
1753
|
#undef INSN_IS_SC
|
|
1659
1754
|
#undef INSN_LABEL
|
|
@@ -1674,13 +1769,13 @@ INSN_ENTRY(branchif){
|
|
|
1674
1769
|
COLLECT_USAGE_INSN(BIN(branchif));
|
|
1675
1770
|
COLLECT_USAGE_OPERAND(BIN(branchif), 0, dst);
|
|
1676
1771
|
{
|
|
1677
|
-
#line
|
|
1772
|
+
#line 1198 "insns.def"
|
|
1678
1773
|
if (RTEST(val)) {
|
|
1679
1774
|
RUBY_VM_CHECK_INTS(th);
|
|
1680
1775
|
JUMP(dst);
|
|
1681
1776
|
}
|
|
1682
1777
|
|
|
1683
|
-
#line
|
|
1778
|
+
#line 1779 "vm.inc"
|
|
1684
1779
|
#undef CURRENT_INSN_branchif
|
|
1685
1780
|
#undef INSN_IS_SC
|
|
1686
1781
|
#undef INSN_LABEL
|
|
@@ -1701,13 +1796,13 @@ INSN_ENTRY(branchunless){
|
|
|
1701
1796
|
COLLECT_USAGE_INSN(BIN(branchunless));
|
|
1702
1797
|
COLLECT_USAGE_OPERAND(BIN(branchunless), 0, dst);
|
|
1703
1798
|
{
|
|
1704
|
-
#line
|
|
1799
|
+
#line 1215 "insns.def"
|
|
1705
1800
|
if (!RTEST(val)) {
|
|
1706
1801
|
RUBY_VM_CHECK_INTS(th);
|
|
1707
1802
|
JUMP(dst);
|
|
1708
1803
|
}
|
|
1709
1804
|
|
|
1710
|
-
#line
|
|
1805
|
+
#line 1806 "vm.inc"
|
|
1711
1806
|
#undef CURRENT_INSN_branchunless
|
|
1712
1807
|
#undef INSN_IS_SC
|
|
1713
1808
|
#undef INSN_LABEL
|
|
@@ -1728,13 +1823,13 @@ INSN_ENTRY(branchnil){
|
|
|
1728
1823
|
COLLECT_USAGE_INSN(BIN(branchnil));
|
|
1729
1824
|
COLLECT_USAGE_OPERAND(BIN(branchnil), 0, dst);
|
|
1730
1825
|
{
|
|
1731
|
-
#line
|
|
1826
|
+
#line 1232 "insns.def"
|
|
1732
1827
|
if (NIL_P(val)) {
|
|
1733
1828
|
RUBY_VM_CHECK_INTS(th);
|
|
1734
1829
|
JUMP(dst);
|
|
1735
1830
|
}
|
|
1736
1831
|
|
|
1737
|
-
#line
|
|
1832
|
+
#line 1833 "vm.inc"
|
|
1738
1833
|
#undef CURRENT_INSN_branchnil
|
|
1739
1834
|
#undef INSN_IS_SC
|
|
1740
1835
|
#undef INSN_LABEL
|
|
@@ -1757,7 +1852,7 @@ INSN_ENTRY(getinlinecache){
|
|
|
1757
1852
|
COLLECT_USAGE_OPERAND(BIN(getinlinecache), 0, dst);
|
|
1758
1853
|
COLLECT_USAGE_OPERAND(BIN(getinlinecache), 1, ic);
|
|
1759
1854
|
{
|
|
1760
|
-
#line
|
|
1855
|
+
#line 1254 "insns.def"
|
|
1761
1856
|
if (ic->ic_serial == GET_GLOBAL_CONSTANT_STATE() &&
|
|
1762
1857
|
(ic->ic_cref == NULL || ic->ic_cref == rb_vm_get_cref(GET_EP()))) {
|
|
1763
1858
|
val = ic->ic_value.value;
|
|
@@ -1768,7 +1863,7 @@ INSN_ENTRY(getinlinecache){
|
|
|
1768
1863
|
val = Qnil;
|
|
1769
1864
|
}
|
|
1770
1865
|
|
|
1771
|
-
#line
|
|
1866
|
+
#line 1867 "vm.inc"
|
|
1772
1867
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
|
1773
1868
|
PUSH(val);
|
|
1774
1869
|
#undef CURRENT_INSN_getinlinecache
|
|
@@ -1791,14 +1886,14 @@ INSN_ENTRY(setinlinecache){
|
|
|
1791
1886
|
COLLECT_USAGE_INSN(BIN(setinlinecache));
|
|
1792
1887
|
COLLECT_USAGE_OPERAND(BIN(setinlinecache), 0, ic);
|
|
1793
1888
|
{
|
|
1794
|
-
#line
|
|
1889
|
+
#line 1276 "insns.def"
|
|
1795
1890
|
VM_ASSERT(ic->ic_value.value != Qundef);
|
|
1796
1891
|
ic->ic_value.value = val;
|
|
1797
1892
|
ic->ic_serial = GET_GLOBAL_CONSTANT_STATE() - ruby_vm_const_missing_count;
|
|
1798
1893
|
ic->ic_cref = vm_get_const_key_cref(GET_EP());
|
|
1799
1894
|
ruby_vm_const_missing_count = 0;
|
|
1800
1895
|
|
|
1801
|
-
#line
|
|
1896
|
+
#line 1897 "vm.inc"
|
|
1802
1897
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
|
1803
1898
|
PUSH(val);
|
|
1804
1899
|
#undef CURRENT_INSN_setinlinecache
|
|
@@ -1823,7 +1918,7 @@ INSN_ENTRY(once){
|
|
|
1823
1918
|
COLLECT_USAGE_OPERAND(BIN(once), 0, iseq);
|
|
1824
1919
|
COLLECT_USAGE_OPERAND(BIN(once), 1, ic);
|
|
1825
1920
|
{
|
|
1826
|
-
#line
|
|
1921
|
+
#line 1294 "insns.def"
|
|
1827
1922
|
union iseq_inline_storage_entry *is = (union iseq_inline_storage_entry *)ic;
|
|
1828
1923
|
|
|
1829
1924
|
#define RUNNING_THREAD_ONCE_DONE ((rb_thread_t *)(0x1))
|
|
@@ -1849,7 +1944,7 @@ INSN_ENTRY(once){
|
|
|
1849
1944
|
goto retry;
|
|
1850
1945
|
}
|
|
1851
1946
|
|
|
1852
|
-
#line
|
|
1947
|
+
#line 1948 "vm.inc"
|
|
1853
1948
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
|
1854
1949
|
PUSH(val);
|
|
1855
1950
|
#undef CURRENT_INSN_once
|
|
@@ -1874,26 +1969,25 @@ INSN_ENTRY(opt_case_dispatch){
|
|
|
1874
1969
|
COLLECT_USAGE_OPERAND(BIN(opt_case_dispatch), 0, hash);
|
|
1875
1970
|
COLLECT_USAGE_OPERAND(BIN(opt_case_dispatch), 1, else_offset);
|
|
1876
1971
|
{
|
|
1877
|
-
#line
|
|
1972
|
+
#line 1331 "insns.def"
|
|
1878
1973
|
switch(TYPE(key)) {
|
|
1879
1974
|
case T_FLOAT: {
|
|
1880
1975
|
double ival;
|
|
1881
|
-
if (modf(RFLOAT_VALUE(key), &ival) == 0.0) {
|
|
1976
|
+
if (modf(RFLOAT_VALUE(key), &ival) == 0.0 && !isinf(ival)) {
|
|
1882
1977
|
key = FIXABLE(ival) ? LONG2FIX((long)ival) : rb_dbl2big(ival);
|
|
1883
1978
|
}
|
|
1884
1979
|
}
|
|
1885
|
-
case T_TRUE:
|
|
1980
|
+
case T_TRUE: /* fall through */
|
|
1886
1981
|
case T_FALSE:
|
|
1887
1982
|
case T_NIL:
|
|
1888
|
-
case T_SYMBOL:
|
|
1983
|
+
case T_SYMBOL:
|
|
1889
1984
|
case T_FIXNUM:
|
|
1890
1985
|
case T_BIGNUM:
|
|
1891
1986
|
case T_STRING:
|
|
1892
1987
|
if (BASIC_OP_UNREDEFINED_P(BOP_EQQ,
|
|
1893
1988
|
SYMBOL_REDEFINED_OP_FLAG |
|
|
1894
|
-
|
|
1989
|
+
INTEGER_REDEFINED_OP_FLAG |
|
|
1895
1990
|
FLOAT_REDEFINED_OP_FLAG |
|
|
1896
|
-
BIGNUM_REDEFINED_OP_FLAG |
|
|
1897
1991
|
NIL_REDEFINED_OP_FLAG |
|
|
1898
1992
|
TRUE_REDEFINED_OP_FLAG |
|
|
1899
1993
|
FALSE_REDEFINED_OP_FLAG |
|
|
@@ -1911,7 +2005,7 @@ INSN_ENTRY(opt_case_dispatch){
|
|
|
1911
2005
|
break;
|
|
1912
2006
|
}
|
|
1913
2007
|
|
|
1914
|
-
#line
|
|
2008
|
+
#line 2009 "vm.inc"
|
|
1915
2009
|
#undef CURRENT_INSN_opt_case_dispatch
|
|
1916
2010
|
#undef INSN_IS_SC
|
|
1917
2011
|
#undef INSN_LABEL
|
|
@@ -1936,9 +2030,9 @@ INSN_ENTRY(opt_plus){
|
|
|
1936
2030
|
COLLECT_USAGE_OPERAND(BIN(opt_plus), 0, ci);
|
|
1937
2031
|
COLLECT_USAGE_OPERAND(BIN(opt_plus), 1, cc);
|
|
1938
2032
|
{
|
|
1939
|
-
#line
|
|
2033
|
+
#line 1380 "insns.def"
|
|
1940
2034
|
if (FIXNUM_2_P(recv, obj) &&
|
|
1941
|
-
BASIC_OP_UNREDEFINED_P(BOP_PLUS,
|
|
2035
|
+
BASIC_OP_UNREDEFINED_P(BOP_PLUS,INTEGER_REDEFINED_OP_FLAG)) {
|
|
1942
2036
|
/* fixnum + fixnum */
|
|
1943
2037
|
#ifndef LONG_LONG_VALUE
|
|
1944
2038
|
val = (recv + (obj & (~1)));
|
|
@@ -1952,12 +2046,7 @@ INSN_ENTRY(opt_plus){
|
|
|
1952
2046
|
a = FIX2LONG(recv);
|
|
1953
2047
|
b = FIX2LONG(obj);
|
|
1954
2048
|
c = a + b;
|
|
1955
|
-
|
|
1956
|
-
val = LONG2FIX(c);
|
|
1957
|
-
}
|
|
1958
|
-
else {
|
|
1959
|
-
val = rb_big_plus(rb_int2big(a), rb_int2big(b));
|
|
1960
|
-
}
|
|
2049
|
+
val = LONG2NUM(c);
|
|
1961
2050
|
#endif
|
|
1962
2051
|
}
|
|
1963
2052
|
else if (FLONUM_2_P(recv, obj) &&
|
|
@@ -1988,7 +2077,7 @@ INSN_ENTRY(opt_plus){
|
|
|
1988
2077
|
CALL_SIMPLE_METHOD(recv);
|
|
1989
2078
|
}
|
|
1990
2079
|
|
|
1991
|
-
#line
|
|
2080
|
+
#line 2081 "vm.inc"
|
|
1992
2081
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
|
1993
2082
|
PUSH(val);
|
|
1994
2083
|
#undef CURRENT_INSN_opt_plus
|
|
@@ -2015,21 +2104,15 @@ INSN_ENTRY(opt_minus){
|
|
|
2015
2104
|
COLLECT_USAGE_OPERAND(BIN(opt_minus), 0, ci);
|
|
2016
2105
|
COLLECT_USAGE_OPERAND(BIN(opt_minus), 1, cc);
|
|
2017
2106
|
{
|
|
2018
|
-
#line
|
|
2107
|
+
#line 1438 "insns.def"
|
|
2019
2108
|
if (FIXNUM_2_P(recv, obj) &&
|
|
2020
|
-
BASIC_OP_UNREDEFINED_P(BOP_MINUS,
|
|
2109
|
+
BASIC_OP_UNREDEFINED_P(BOP_MINUS, INTEGER_REDEFINED_OP_FLAG)) {
|
|
2021
2110
|
long a, b, c;
|
|
2022
2111
|
|
|
2023
2112
|
a = FIX2LONG(recv);
|
|
2024
2113
|
b = FIX2LONG(obj);
|
|
2025
2114
|
c = a - b;
|
|
2026
|
-
|
|
2027
|
-
if (FIXABLE(c)) {
|
|
2028
|
-
val = LONG2FIX(c);
|
|
2029
|
-
}
|
|
2030
|
-
else {
|
|
2031
|
-
val = rb_big_minus(rb_int2big(a), rb_int2big(b));
|
|
2032
|
-
}
|
|
2115
|
+
val = LONG2NUM(c);
|
|
2033
2116
|
}
|
|
2034
2117
|
else if (FLONUM_2_P(recv, obj) &&
|
|
2035
2118
|
BASIC_OP_UNREDEFINED_P(BOP_MINUS, FLOAT_REDEFINED_OP_FLAG)) {
|
|
@@ -2052,7 +2135,7 @@ INSN_ENTRY(opt_minus){
|
|
|
2052
2135
|
CALL_SIMPLE_METHOD(recv);
|
|
2053
2136
|
}
|
|
2054
2137
|
|
|
2055
|
-
#line
|
|
2138
|
+
#line 2139 "vm.inc"
|
|
2056
2139
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
|
2057
2140
|
PUSH(val);
|
|
2058
2141
|
#undef CURRENT_INSN_opt_minus
|
|
@@ -2079,24 +2162,10 @@ INSN_ENTRY(opt_mult){
|
|
|
2079
2162
|
COLLECT_USAGE_OPERAND(BIN(opt_mult), 0, ci);
|
|
2080
2163
|
COLLECT_USAGE_OPERAND(BIN(opt_mult), 1, cc);
|
|
2081
2164
|
{
|
|
2082
|
-
#line
|
|
2165
|
+
#line 1480 "insns.def"
|
|
2083
2166
|
if (FIXNUM_2_P(recv, obj) &&
|
|
2084
|
-
BASIC_OP_UNREDEFINED_P(BOP_MULT,
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
a = FIX2LONG(recv);
|
|
2088
|
-
if (a == 0) {
|
|
2089
|
-
val = recv;
|
|
2090
|
-
}
|
|
2091
|
-
else {
|
|
2092
|
-
b = FIX2LONG(obj);
|
|
2093
|
-
if (MUL_OVERFLOW_FIXNUM_P(a, b)) {
|
|
2094
|
-
val = rb_big_mul(rb_int2big(a), rb_int2big(b));
|
|
2095
|
-
}
|
|
2096
|
-
else {
|
|
2097
|
-
val = LONG2FIX(a * b);
|
|
2098
|
-
}
|
|
2099
|
-
}
|
|
2167
|
+
BASIC_OP_UNREDEFINED_P(BOP_MULT, INTEGER_REDEFINED_OP_FLAG)) {
|
|
2168
|
+
val = rb_fix_mul_fix(recv, obj);
|
|
2100
2169
|
}
|
|
2101
2170
|
else if (FLONUM_2_P(recv, obj) &&
|
|
2102
2171
|
BASIC_OP_UNREDEFINED_P(BOP_MULT, FLOAT_REDEFINED_OP_FLAG)) {
|
|
@@ -2118,7 +2187,7 @@ INSN_ENTRY(opt_mult){
|
|
|
2118
2187
|
CALL_SIMPLE_METHOD(recv);
|
|
2119
2188
|
}
|
|
2120
2189
|
|
|
2121
|
-
#line
|
|
2190
|
+
#line 2191 "vm.inc"
|
|
2122
2191
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
|
2123
2192
|
PUSH(val);
|
|
2124
2193
|
#undef CURRENT_INSN_opt_mult
|
|
@@ -2145,37 +2214,11 @@ INSN_ENTRY(opt_div){
|
|
|
2145
2214
|
COLLECT_USAGE_OPERAND(BIN(opt_div), 0, ci);
|
|
2146
2215
|
COLLECT_USAGE_OPERAND(BIN(opt_div), 1, cc);
|
|
2147
2216
|
{
|
|
2148
|
-
#line
|
|
2217
|
+
#line 1516 "insns.def"
|
|
2149
2218
|
if (FIXNUM_2_P(recv, obj) &&
|
|
2150
|
-
BASIC_OP_UNREDEFINED_P(BOP_DIV,
|
|
2151
|
-
|
|
2152
|
-
|
|
2153
|
-
x = FIX2LONG(recv);
|
|
2154
|
-
y = FIX2LONG(obj);
|
|
2155
|
-
{
|
|
2156
|
-
/* copied from numeric.c#fixdivmod */
|
|
2157
|
-
long mod;
|
|
2158
|
-
if (y == 0)
|
|
2159
|
-
goto INSN_LABEL(normal_dispatch);
|
|
2160
|
-
if (y < 0) {
|
|
2161
|
-
if (x < 0)
|
|
2162
|
-
div = -x / -y;
|
|
2163
|
-
else
|
|
2164
|
-
div = -(x / -y);
|
|
2165
|
-
}
|
|
2166
|
-
else {
|
|
2167
|
-
if (x < 0)
|
|
2168
|
-
div = -(-x / y);
|
|
2169
|
-
else
|
|
2170
|
-
div = x / y;
|
|
2171
|
-
}
|
|
2172
|
-
mod = x - div * y;
|
|
2173
|
-
if ((mod < 0 && y > 0) || (mod > 0 && y < 0)) {
|
|
2174
|
-
mod += y;
|
|
2175
|
-
div -= 1;
|
|
2176
|
-
}
|
|
2177
|
-
}
|
|
2178
|
-
val = LONG2NUM(div);
|
|
2219
|
+
BASIC_OP_UNREDEFINED_P(BOP_DIV, INTEGER_REDEFINED_OP_FLAG)) {
|
|
2220
|
+
if (FIX2LONG(obj) == 0) goto INSN_LABEL(normal_dispatch);
|
|
2221
|
+
val = rb_fix_div_fix(recv, obj);
|
|
2179
2222
|
}
|
|
2180
2223
|
else if (FLONUM_2_P(recv, obj) &&
|
|
2181
2224
|
BASIC_OP_UNREDEFINED_P(BOP_DIV, FLOAT_REDEFINED_OP_FLAG)) {
|
|
@@ -2197,7 +2240,7 @@ INSN_ENTRY(opt_div){
|
|
|
2197
2240
|
CALL_SIMPLE_METHOD(recv);
|
|
2198
2241
|
}
|
|
2199
2242
|
|
|
2200
|
-
#line
|
|
2243
|
+
#line 2244 "vm.inc"
|
|
2201
2244
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
|
2202
2245
|
PUSH(val);
|
|
2203
2246
|
#undef CURRENT_INSN_opt_div
|
|
@@ -2224,41 +2267,11 @@ INSN_ENTRY(opt_mod){
|
|
|
2224
2267
|
COLLECT_USAGE_OPERAND(BIN(opt_mod), 0, ci);
|
|
2225
2268
|
COLLECT_USAGE_OPERAND(BIN(opt_mod), 1, cc);
|
|
2226
2269
|
{
|
|
2227
|
-
#line
|
|
2270
|
+
#line 1553 "insns.def"
|
|
2228
2271
|
if (FIXNUM_2_P(recv, obj) &&
|
|
2229
|
-
BASIC_OP_UNREDEFINED_P(BOP_MOD,
|
|
2230
|
-
|
|
2231
|
-
|
|
2232
|
-
x = FIX2LONG(recv);
|
|
2233
|
-
y = FIX2LONG(obj);
|
|
2234
|
-
if (x > 0 && y > 0) {
|
|
2235
|
-
val = LONG2FIX(x % y);
|
|
2236
|
-
}
|
|
2237
|
-
else {
|
|
2238
|
-
/* copied from numeric.c#fixdivmod */
|
|
2239
|
-
long div, mod;
|
|
2240
|
-
|
|
2241
|
-
if (y == 0)
|
|
2242
|
-
rb_num_zerodiv();
|
|
2243
|
-
if (y < 0) {
|
|
2244
|
-
if (x < 0)
|
|
2245
|
-
div = -x / -y;
|
|
2246
|
-
else
|
|
2247
|
-
div = -(x / -y);
|
|
2248
|
-
}
|
|
2249
|
-
else {
|
|
2250
|
-
if (x < 0)
|
|
2251
|
-
div = -(-x / y);
|
|
2252
|
-
else
|
|
2253
|
-
div = x / y;
|
|
2254
|
-
}
|
|
2255
|
-
mod = x - div * y;
|
|
2256
|
-
if ((mod < 0 && y > 0) || (mod > 0 && y < 0)) {
|
|
2257
|
-
mod += y;
|
|
2258
|
-
div -= 1;
|
|
2259
|
-
}
|
|
2260
|
-
val = LONG2FIX(mod);
|
|
2261
|
-
}
|
|
2272
|
+
BASIC_OP_UNREDEFINED_P(BOP_MOD, INTEGER_REDEFINED_OP_FLAG )) {
|
|
2273
|
+
if (FIX2LONG(obj) == 0) goto INSN_LABEL(normal_dispatch);
|
|
2274
|
+
val = rb_fix_mod_fix(recv, obj);
|
|
2262
2275
|
}
|
|
2263
2276
|
else if (FLONUM_2_P(recv, obj) &&
|
|
2264
2277
|
BASIC_OP_UNREDEFINED_P(BOP_MOD, FLOAT_REDEFINED_OP_FLAG)) {
|
|
@@ -2280,7 +2293,7 @@ INSN_ENTRY(opt_mod){
|
|
|
2280
2293
|
CALL_SIMPLE_METHOD(recv);
|
|
2281
2294
|
}
|
|
2282
2295
|
|
|
2283
|
-
#line
|
|
2296
|
+
#line 2297 "vm.inc"
|
|
2284
2297
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
|
2285
2298
|
PUSH(val);
|
|
2286
2299
|
#undef CURRENT_INSN_opt_mod
|
|
@@ -2307,7 +2320,7 @@ INSN_ENTRY(opt_eq){
|
|
|
2307
2320
|
COLLECT_USAGE_OPERAND(BIN(opt_eq), 0, ci);
|
|
2308
2321
|
COLLECT_USAGE_OPERAND(BIN(opt_eq), 1, cc);
|
|
2309
2322
|
{
|
|
2310
|
-
#line
|
|
2323
|
+
#line 1590 "insns.def"
|
|
2311
2324
|
val = opt_eq_func(recv, obj, ci, cc);
|
|
2312
2325
|
|
|
2313
2326
|
if (val == Qundef) {
|
|
@@ -2317,7 +2330,7 @@ INSN_ENTRY(opt_eq){
|
|
|
2317
2330
|
CALL_SIMPLE_METHOD(recv);
|
|
2318
2331
|
}
|
|
2319
2332
|
|
|
2320
|
-
#line
|
|
2333
|
+
#line 2334 "vm.inc"
|
|
2321
2334
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
|
2322
2335
|
PUSH(val);
|
|
2323
2336
|
#undef CURRENT_INSN_opt_eq
|
|
@@ -2348,7 +2361,7 @@ INSN_ENTRY(opt_neq){
|
|
|
2348
2361
|
COLLECT_USAGE_OPERAND(BIN(opt_neq), 2, ci_eq);
|
|
2349
2362
|
COLLECT_USAGE_OPERAND(BIN(opt_neq), 3, cc_eq);
|
|
2350
2363
|
{
|
|
2351
|
-
#line
|
|
2364
|
+
#line 1611 "insns.def"
|
|
2352
2365
|
extern VALUE rb_obj_not_equal(VALUE obj1, VALUE obj2);
|
|
2353
2366
|
vm_search_method(ci, cc, recv);
|
|
2354
2367
|
|
|
@@ -2369,7 +2382,7 @@ INSN_ENTRY(opt_neq){
|
|
|
2369
2382
|
CALL_SIMPLE_METHOD(recv);
|
|
2370
2383
|
}
|
|
2371
2384
|
|
|
2372
|
-
#line
|
|
2385
|
+
#line 2386 "vm.inc"
|
|
2373
2386
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
|
2374
2387
|
PUSH(val);
|
|
2375
2388
|
#undef CURRENT_INSN_opt_neq
|
|
@@ -2396,9 +2409,9 @@ INSN_ENTRY(opt_lt){
|
|
|
2396
2409
|
COLLECT_USAGE_OPERAND(BIN(opt_lt), 0, ci);
|
|
2397
2410
|
COLLECT_USAGE_OPERAND(BIN(opt_lt), 1, cc);
|
|
2398
2411
|
{
|
|
2399
|
-
#line
|
|
2412
|
+
#line 1643 "insns.def"
|
|
2400
2413
|
if (FIXNUM_2_P(recv, obj) &&
|
|
2401
|
-
BASIC_OP_UNREDEFINED_P(BOP_LT,
|
|
2414
|
+
BASIC_OP_UNREDEFINED_P(BOP_LT, INTEGER_REDEFINED_OP_FLAG)) {
|
|
2402
2415
|
SIGNED_VALUE a = recv, b = obj;
|
|
2403
2416
|
|
|
2404
2417
|
if (a < b) {
|
|
@@ -2429,7 +2442,7 @@ INSN_ENTRY(opt_lt){
|
|
|
2429
2442
|
CALL_SIMPLE_METHOD(recv);
|
|
2430
2443
|
}
|
|
2431
2444
|
|
|
2432
|
-
#line
|
|
2445
|
+
#line 2446 "vm.inc"
|
|
2433
2446
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
|
2434
2447
|
PUSH(val);
|
|
2435
2448
|
#undef CURRENT_INSN_opt_lt
|
|
@@ -2456,9 +2469,9 @@ INSN_ENTRY(opt_le){
|
|
|
2456
2469
|
COLLECT_USAGE_OPERAND(BIN(opt_le), 0, ci);
|
|
2457
2470
|
COLLECT_USAGE_OPERAND(BIN(opt_le), 1, cc);
|
|
2458
2471
|
{
|
|
2459
|
-
#line
|
|
2472
|
+
#line 1687 "insns.def"
|
|
2460
2473
|
if (FIXNUM_2_P(recv, obj) &&
|
|
2461
|
-
BASIC_OP_UNREDEFINED_P(BOP_LE,
|
|
2474
|
+
BASIC_OP_UNREDEFINED_P(BOP_LE, INTEGER_REDEFINED_OP_FLAG)) {
|
|
2462
2475
|
SIGNED_VALUE a = recv, b = obj;
|
|
2463
2476
|
|
|
2464
2477
|
if (a <= b) {
|
|
@@ -2480,7 +2493,7 @@ INSN_ENTRY(opt_le){
|
|
|
2480
2493
|
CALL_SIMPLE_METHOD(recv);
|
|
2481
2494
|
}
|
|
2482
2495
|
|
|
2483
|
-
#line
|
|
2496
|
+
#line 2497 "vm.inc"
|
|
2484
2497
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
|
2485
2498
|
PUSH(val);
|
|
2486
2499
|
#undef CURRENT_INSN_opt_le
|
|
@@ -2507,9 +2520,9 @@ INSN_ENTRY(opt_gt){
|
|
|
2507
2520
|
COLLECT_USAGE_OPERAND(BIN(opt_gt), 0, ci);
|
|
2508
2521
|
COLLECT_USAGE_OPERAND(BIN(opt_gt), 1, cc);
|
|
2509
2522
|
{
|
|
2510
|
-
#line
|
|
2523
|
+
#line 1722 "insns.def"
|
|
2511
2524
|
if (FIXNUM_2_P(recv, obj) &&
|
|
2512
|
-
BASIC_OP_UNREDEFINED_P(BOP_GT,
|
|
2525
|
+
BASIC_OP_UNREDEFINED_P(BOP_GT, INTEGER_REDEFINED_OP_FLAG)) {
|
|
2513
2526
|
SIGNED_VALUE a = recv, b = obj;
|
|
2514
2527
|
|
|
2515
2528
|
if (a > b) {
|
|
@@ -2540,7 +2553,7 @@ INSN_ENTRY(opt_gt){
|
|
|
2540
2553
|
CALL_SIMPLE_METHOD(recv);
|
|
2541
2554
|
}
|
|
2542
2555
|
|
|
2543
|
-
#line
|
|
2556
|
+
#line 2557 "vm.inc"
|
|
2544
2557
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
|
2545
2558
|
PUSH(val);
|
|
2546
2559
|
#undef CURRENT_INSN_opt_gt
|
|
@@ -2567,9 +2580,9 @@ INSN_ENTRY(opt_ge){
|
|
|
2567
2580
|
COLLECT_USAGE_OPERAND(BIN(opt_ge), 0, ci);
|
|
2568
2581
|
COLLECT_USAGE_OPERAND(BIN(opt_ge), 1, cc);
|
|
2569
2582
|
{
|
|
2570
|
-
#line
|
|
2583
|
+
#line 1766 "insns.def"
|
|
2571
2584
|
if (FIXNUM_2_P(recv, obj) &&
|
|
2572
|
-
BASIC_OP_UNREDEFINED_P(BOP_GE,
|
|
2585
|
+
BASIC_OP_UNREDEFINED_P(BOP_GE, INTEGER_REDEFINED_OP_FLAG)) {
|
|
2573
2586
|
SIGNED_VALUE a = recv, b = obj;
|
|
2574
2587
|
|
|
2575
2588
|
if (a >= b) {
|
|
@@ -2590,7 +2603,7 @@ INSN_ENTRY(opt_ge){
|
|
|
2590
2603
|
CALL_SIMPLE_METHOD(recv);
|
|
2591
2604
|
}
|
|
2592
2605
|
|
|
2593
|
-
#line
|
|
2606
|
+
#line 2607 "vm.inc"
|
|
2594
2607
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
|
2595
2608
|
PUSH(val);
|
|
2596
2609
|
#undef CURRENT_INSN_opt_ge
|
|
@@ -2617,7 +2630,7 @@ INSN_ENTRY(opt_ltlt){
|
|
|
2617
2630
|
COLLECT_USAGE_OPERAND(BIN(opt_ltlt), 0, ci);
|
|
2618
2631
|
COLLECT_USAGE_OPERAND(BIN(opt_ltlt), 1, cc);
|
|
2619
2632
|
{
|
|
2620
|
-
#line
|
|
2633
|
+
#line 1800 "insns.def"
|
|
2621
2634
|
if (!SPECIAL_CONST_P(recv)) {
|
|
2622
2635
|
if (RBASIC_CLASS(recv) == rb_cString &&
|
|
2623
2636
|
BASIC_OP_UNREDEFINED_P(BOP_LTLT, STRING_REDEFINED_OP_FLAG)) {
|
|
@@ -2638,7 +2651,7 @@ INSN_ENTRY(opt_ltlt){
|
|
|
2638
2651
|
CALL_SIMPLE_METHOD(recv);
|
|
2639
2652
|
}
|
|
2640
2653
|
|
|
2641
|
-
#line
|
|
2654
|
+
#line 2655 "vm.inc"
|
|
2642
2655
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
|
2643
2656
|
PUSH(val);
|
|
2644
2657
|
#undef CURRENT_INSN_opt_ltlt
|
|
@@ -2665,7 +2678,7 @@ INSN_ENTRY(opt_aref){
|
|
|
2665
2678
|
COLLECT_USAGE_OPERAND(BIN(opt_aref), 0, ci);
|
|
2666
2679
|
COLLECT_USAGE_OPERAND(BIN(opt_aref), 1, cc);
|
|
2667
2680
|
{
|
|
2668
|
-
#line
|
|
2681
|
+
#line 1832 "insns.def"
|
|
2669
2682
|
if (!SPECIAL_CONST_P(recv)) {
|
|
2670
2683
|
if (RBASIC_CLASS(recv) == rb_cArray && BASIC_OP_UNREDEFINED_P(BOP_AREF, ARRAY_REDEFINED_OP_FLAG) && FIXNUM_P(obj)) {
|
|
2671
2684
|
val = rb_ary_entry(recv, FIX2LONG(obj));
|
|
@@ -2684,7 +2697,7 @@ INSN_ENTRY(opt_aref){
|
|
|
2684
2697
|
CALL_SIMPLE_METHOD(recv);
|
|
2685
2698
|
}
|
|
2686
2699
|
|
|
2687
|
-
#line
|
|
2700
|
+
#line 2701 "vm.inc"
|
|
2688
2701
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
|
2689
2702
|
PUSH(val);
|
|
2690
2703
|
#undef CURRENT_INSN_opt_aref
|
|
@@ -2712,7 +2725,7 @@ INSN_ENTRY(opt_aset){
|
|
|
2712
2725
|
COLLECT_USAGE_OPERAND(BIN(opt_aset), 0, ci);
|
|
2713
2726
|
COLLECT_USAGE_OPERAND(BIN(opt_aset), 1, cc);
|
|
2714
2727
|
{
|
|
2715
|
-
#line
|
|
2728
|
+
#line 1862 "insns.def"
|
|
2716
2729
|
if (!SPECIAL_CONST_P(recv)) {
|
|
2717
2730
|
if (RBASIC_CLASS(recv) == rb_cArray && BASIC_OP_UNREDEFINED_P(BOP_ASET, ARRAY_REDEFINED_OP_FLAG) && FIXNUM_P(obj)) {
|
|
2718
2731
|
rb_ary_store(recv, FIX2LONG(obj), set);
|
|
@@ -2734,7 +2747,7 @@ INSN_ENTRY(opt_aset){
|
|
|
2734
2747
|
CALL_SIMPLE_METHOD(recv);
|
|
2735
2748
|
}
|
|
2736
2749
|
|
|
2737
|
-
#line
|
|
2750
|
+
#line 2751 "vm.inc"
|
|
2738
2751
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
|
2739
2752
|
PUSH(val);
|
|
2740
2753
|
#undef CURRENT_INSN_opt_aset
|
|
@@ -2762,7 +2775,7 @@ INSN_ENTRY(opt_aset_with){
|
|
|
2762
2775
|
COLLECT_USAGE_OPERAND(BIN(opt_aset_with), 1, cc);
|
|
2763
2776
|
COLLECT_USAGE_OPERAND(BIN(opt_aset_with), 2, key);
|
|
2764
2777
|
{
|
|
2765
|
-
#line
|
|
2778
|
+
#line 1895 "insns.def"
|
|
2766
2779
|
if (!SPECIAL_CONST_P(recv) && RBASIC_CLASS(recv) == rb_cHash && BASIC_OP_UNREDEFINED_P(BOP_ASET, HASH_REDEFINED_OP_FLAG)) {
|
|
2767
2780
|
rb_hash_aset(recv, key, val);
|
|
2768
2781
|
}
|
|
@@ -2773,7 +2786,7 @@ INSN_ENTRY(opt_aset_with){
|
|
|
2773
2786
|
CALL_SIMPLE_METHOD(recv);
|
|
2774
2787
|
}
|
|
2775
2788
|
|
|
2776
|
-
#line
|
|
2789
|
+
#line 2790 "vm.inc"
|
|
2777
2790
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
|
2778
2791
|
PUSH(val);
|
|
2779
2792
|
#undef CURRENT_INSN_opt_aset_with
|
|
@@ -2801,7 +2814,7 @@ INSN_ENTRY(opt_aref_with){
|
|
|
2801
2814
|
COLLECT_USAGE_OPERAND(BIN(opt_aref_with), 1, cc);
|
|
2802
2815
|
COLLECT_USAGE_OPERAND(BIN(opt_aref_with), 2, key);
|
|
2803
2816
|
{
|
|
2804
|
-
#line
|
|
2817
|
+
#line 1917 "insns.def"
|
|
2805
2818
|
if (!SPECIAL_CONST_P(recv) && RBASIC_CLASS(recv) == rb_cHash && BASIC_OP_UNREDEFINED_P(BOP_AREF, HASH_REDEFINED_OP_FLAG)) {
|
|
2806
2819
|
val = rb_hash_aref(recv, key);
|
|
2807
2820
|
}
|
|
@@ -2811,7 +2824,7 @@ INSN_ENTRY(opt_aref_with){
|
|
|
2811
2824
|
CALL_SIMPLE_METHOD(recv);
|
|
2812
2825
|
}
|
|
2813
2826
|
|
|
2814
|
-
#line
|
|
2827
|
+
#line 2828 "vm.inc"
|
|
2815
2828
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
|
2816
2829
|
PUSH(val);
|
|
2817
2830
|
#undef CURRENT_INSN_opt_aref_with
|
|
@@ -2837,7 +2850,7 @@ INSN_ENTRY(opt_length){
|
|
|
2837
2850
|
COLLECT_USAGE_OPERAND(BIN(opt_length), 0, ci);
|
|
2838
2851
|
COLLECT_USAGE_OPERAND(BIN(opt_length), 1, cc);
|
|
2839
2852
|
{
|
|
2840
|
-
#line
|
|
2853
|
+
#line 1938 "insns.def"
|
|
2841
2854
|
if (!SPECIAL_CONST_P(recv)) {
|
|
2842
2855
|
if (RBASIC_CLASS(recv) == rb_cString &&
|
|
2843
2856
|
BASIC_OP_UNREDEFINED_P(BOP_LENGTH, STRING_REDEFINED_OP_FLAG)) {
|
|
@@ -2861,7 +2874,7 @@ INSN_ENTRY(opt_length){
|
|
|
2861
2874
|
CALL_SIMPLE_METHOD(recv);
|
|
2862
2875
|
}
|
|
2863
2876
|
|
|
2864
|
-
#line
|
|
2877
|
+
#line 2878 "vm.inc"
|
|
2865
2878
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
|
2866
2879
|
PUSH(val);
|
|
2867
2880
|
#undef CURRENT_INSN_opt_length
|
|
@@ -2887,7 +2900,7 @@ INSN_ENTRY(opt_size){
|
|
|
2887
2900
|
COLLECT_USAGE_OPERAND(BIN(opt_size), 0, ci);
|
|
2888
2901
|
COLLECT_USAGE_OPERAND(BIN(opt_size), 1, cc);
|
|
2889
2902
|
{
|
|
2890
|
-
#line
|
|
2903
|
+
#line 1973 "insns.def"
|
|
2891
2904
|
if (!SPECIAL_CONST_P(recv)) {
|
|
2892
2905
|
if (RBASIC_CLASS(recv) == rb_cString &&
|
|
2893
2906
|
BASIC_OP_UNREDEFINED_P(BOP_SIZE, STRING_REDEFINED_OP_FLAG)) {
|
|
@@ -2911,7 +2924,7 @@ INSN_ENTRY(opt_size){
|
|
|
2911
2924
|
CALL_SIMPLE_METHOD(recv);
|
|
2912
2925
|
}
|
|
2913
2926
|
|
|
2914
|
-
#line
|
|
2927
|
+
#line 2928 "vm.inc"
|
|
2915
2928
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
|
2916
2929
|
PUSH(val);
|
|
2917
2930
|
#undef CURRENT_INSN_opt_size
|
|
@@ -2937,7 +2950,7 @@ INSN_ENTRY(opt_empty_p){
|
|
|
2937
2950
|
COLLECT_USAGE_OPERAND(BIN(opt_empty_p), 0, ci);
|
|
2938
2951
|
COLLECT_USAGE_OPERAND(BIN(opt_empty_p), 1, cc);
|
|
2939
2952
|
{
|
|
2940
|
-
#line
|
|
2953
|
+
#line 2008 "insns.def"
|
|
2941
2954
|
if (!SPECIAL_CONST_P(recv)) {
|
|
2942
2955
|
if (RBASIC_CLASS(recv) == rb_cString &&
|
|
2943
2956
|
BASIC_OP_UNREDEFINED_P(BOP_EMPTY_P, STRING_REDEFINED_OP_FLAG)) {
|
|
@@ -2964,7 +2977,7 @@ INSN_ENTRY(opt_empty_p){
|
|
|
2964
2977
|
CALL_SIMPLE_METHOD(recv);
|
|
2965
2978
|
}
|
|
2966
2979
|
|
|
2967
|
-
#line
|
|
2980
|
+
#line 2981 "vm.inc"
|
|
2968
2981
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
|
2969
2982
|
PUSH(val);
|
|
2970
2983
|
#undef CURRENT_INSN_opt_empty_p
|
|
@@ -2990,10 +3003,10 @@ INSN_ENTRY(opt_succ){
|
|
|
2990
3003
|
COLLECT_USAGE_OPERAND(BIN(opt_succ), 0, ci);
|
|
2991
3004
|
COLLECT_USAGE_OPERAND(BIN(opt_succ), 1, cc);
|
|
2992
3005
|
{
|
|
2993
|
-
#line
|
|
3006
|
+
#line 2046 "insns.def"
|
|
2994
3007
|
if (SPECIAL_CONST_P(recv)) {
|
|
2995
3008
|
if (FIXNUM_P(recv) &&
|
|
2996
|
-
BASIC_OP_UNREDEFINED_P(BOP_SUCC,
|
|
3009
|
+
BASIC_OP_UNREDEFINED_P(BOP_SUCC, INTEGER_REDEFINED_OP_FLAG)) {
|
|
2997
3010
|
const VALUE obj = INT2FIX(1);
|
|
2998
3011
|
/* fixnum + INT2FIX(1) */
|
|
2999
3012
|
val = (recv + (obj & (~1)));
|
|
@@ -3022,7 +3035,7 @@ INSN_ENTRY(opt_succ){
|
|
|
3022
3035
|
CALL_SIMPLE_METHOD(recv);
|
|
3023
3036
|
}
|
|
3024
3037
|
|
|
3025
|
-
#line
|
|
3038
|
+
#line 3039 "vm.inc"
|
|
3026
3039
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
|
3027
3040
|
PUSH(val);
|
|
3028
3041
|
#undef CURRENT_INSN_opt_succ
|
|
@@ -3048,9 +3061,7 @@ INSN_ENTRY(opt_not){
|
|
|
3048
3061
|
COLLECT_USAGE_OPERAND(BIN(opt_not), 0, ci);
|
|
3049
3062
|
COLLECT_USAGE_OPERAND(BIN(opt_not), 1, cc);
|
|
3050
3063
|
{
|
|
3051
|
-
#line
|
|
3052
|
-
extern VALUE rb_obj_not(VALUE obj);
|
|
3053
|
-
|
|
3064
|
+
#line 2089 "insns.def"
|
|
3054
3065
|
vm_search_method(ci, cc, recv);
|
|
3055
3066
|
|
|
3056
3067
|
if (check_cfunc(cc->me, rb_obj_not)) {
|
|
@@ -3061,7 +3072,7 @@ INSN_ENTRY(opt_not){
|
|
|
3061
3072
|
CALL_SIMPLE_METHOD(recv);
|
|
3062
3073
|
}
|
|
3063
3074
|
|
|
3064
|
-
#line
|
|
3075
|
+
#line 3076 "vm.inc"
|
|
3065
3076
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
|
3066
3077
|
PUSH(val);
|
|
3067
3078
|
#undef CURRENT_INSN_opt_not
|
|
@@ -3085,7 +3096,7 @@ INSN_ENTRY(opt_regexpmatch1){
|
|
|
3085
3096
|
COLLECT_USAGE_INSN(BIN(opt_regexpmatch1));
|
|
3086
3097
|
COLLECT_USAGE_OPERAND(BIN(opt_regexpmatch1), 0, r);
|
|
3087
3098
|
{
|
|
3088
|
-
#line
|
|
3099
|
+
#line 2112 "insns.def"
|
|
3089
3100
|
if (BASIC_OP_UNREDEFINED_P(BOP_MATCH, REGEXP_REDEFINED_OP_FLAG)) {
|
|
3090
3101
|
val = rb_reg_match(r, obj);
|
|
3091
3102
|
}
|
|
@@ -3093,7 +3104,7 @@ INSN_ENTRY(opt_regexpmatch1){
|
|
|
3093
3104
|
val = rb_funcall(r, idEqTilde, 1, obj);
|
|
3094
3105
|
}
|
|
3095
3106
|
|
|
3096
|
-
#line
|
|
3107
|
+
#line 3108 "vm.inc"
|
|
3097
3108
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
|
3098
3109
|
PUSH(val);
|
|
3099
3110
|
#undef CURRENT_INSN_opt_regexpmatch1
|
|
@@ -3120,7 +3131,7 @@ INSN_ENTRY(opt_regexpmatch2){
|
|
|
3120
3131
|
COLLECT_USAGE_OPERAND(BIN(opt_regexpmatch2), 0, ci);
|
|
3121
3132
|
COLLECT_USAGE_OPERAND(BIN(opt_regexpmatch2), 1, cc);
|
|
3122
3133
|
{
|
|
3123
|
-
#line
|
|
3134
|
+
#line 2131 "insns.def"
|
|
3124
3135
|
if (CLASS_OF(obj2) == rb_cString &&
|
|
3125
3136
|
BASIC_OP_UNREDEFINED_P(BOP_MATCH, STRING_REDEFINED_OP_FLAG)) {
|
|
3126
3137
|
val = rb_reg_match(obj1, obj2);
|
|
@@ -3131,7 +3142,7 @@ INSN_ENTRY(opt_regexpmatch2){
|
|
|
3131
3142
|
CALL_SIMPLE_METHOD(obj2);
|
|
3132
3143
|
}
|
|
3133
3144
|
|
|
3134
|
-
#line
|
|
3145
|
+
#line 3146 "vm.inc"
|
|
3135
3146
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
|
3136
3147
|
PUSH(val);
|
|
3137
3148
|
#undef CURRENT_INSN_opt_regexpmatch2
|
|
@@ -3153,7 +3164,7 @@ INSN_ENTRY(opt_call_c_function){
|
|
|
3153
3164
|
COLLECT_USAGE_INSN(BIN(opt_call_c_function));
|
|
3154
3165
|
COLLECT_USAGE_OPERAND(BIN(opt_call_c_function), 0, funcptr);
|
|
3155
3166
|
{
|
|
3156
|
-
#line
|
|
3167
|
+
#line 2153 "insns.def"
|
|
3157
3168
|
reg_cfp = (funcptr)(th, reg_cfp);
|
|
3158
3169
|
|
|
3159
3170
|
if (reg_cfp == 0) {
|
|
@@ -3165,7 +3176,7 @@ INSN_ENTRY(opt_call_c_function){
|
|
|
3165
3176
|
RESTORE_REGS();
|
|
3166
3177
|
NEXT_INSN();
|
|
3167
3178
|
|
|
3168
|
-
#line
|
|
3179
|
+
#line 3180 "vm.inc"
|
|
3169
3180
|
#undef CURRENT_INSN_opt_call_c_function
|
|
3170
3181
|
#undef INSN_IS_SC
|
|
3171
3182
|
#undef INSN_LABEL
|
|
@@ -3185,10 +3196,10 @@ INSN_ENTRY(bitblt){
|
|
|
3185
3196
|
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
|
3186
3197
|
COLLECT_USAGE_INSN(BIN(bitblt));
|
|
3187
3198
|
{
|
|
3188
|
-
#line
|
|
3199
|
+
#line 2176 "insns.def"
|
|
3189
3200
|
ret = rb_str_new2("a bit of bacon, lettuce and tomato");
|
|
3190
3201
|
|
|
3191
|
-
#line
|
|
3202
|
+
#line 3203 "vm.inc"
|
|
3192
3203
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
|
3193
3204
|
PUSH(ret);
|
|
3194
3205
|
#undef CURRENT_INSN_bitblt
|
|
@@ -3210,10 +3221,10 @@ INSN_ENTRY(answer){
|
|
|
3210
3221
|
#define LABEL_IS_SC(lab) LABEL_##lab##_##t
|
|
3211
3222
|
COLLECT_USAGE_INSN(BIN(answer));
|
|
3212
3223
|
{
|
|
3213
|
-
#line
|
|
3224
|
+
#line 2190 "insns.def"
|
|
3214
3225
|
ret = INT2FIX(42);
|
|
3215
3226
|
|
|
3216
|
-
#line
|
|
3227
|
+
#line 3228 "vm.inc"
|
|
3217
3228
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
|
3218
3229
|
PUSH(ret);
|
|
3219
3230
|
#undef CURRENT_INSN_answer
|
|
@@ -3247,7 +3258,7 @@ INSN_ENTRY(getlocal_OP__WC__0){
|
|
|
3247
3258
|
}
|
|
3248
3259
|
val = *(ep - idx);
|
|
3249
3260
|
|
|
3250
|
-
#line
|
|
3261
|
+
#line 3262 "vm.inc"
|
|
3251
3262
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
|
3252
3263
|
PUSH(val);
|
|
3253
3264
|
#undef level
|
|
@@ -3282,7 +3293,7 @@ INSN_ENTRY(getlocal_OP__WC__1){
|
|
|
3282
3293
|
}
|
|
3283
3294
|
val = *(ep - idx);
|
|
3284
3295
|
|
|
3285
|
-
#line
|
|
3296
|
+
#line 3297 "vm.inc"
|
|
3286
3297
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
|
3287
3298
|
PUSH(val);
|
|
3288
3299
|
#undef level
|
|
@@ -3317,7 +3328,7 @@ INSN_ENTRY(setlocal_OP__WC__0){
|
|
|
3317
3328
|
}
|
|
3318
3329
|
*(ep - idx) = val;
|
|
3319
3330
|
|
|
3320
|
-
#line
|
|
3331
|
+
#line 3332 "vm.inc"
|
|
3321
3332
|
#undef level
|
|
3322
3333
|
#undef CURRENT_INSN_setlocal_OP__WC__0
|
|
3323
3334
|
#undef INSN_IS_SC
|
|
@@ -3350,7 +3361,7 @@ INSN_ENTRY(setlocal_OP__WC__1){
|
|
|
3350
3361
|
}
|
|
3351
3362
|
*(ep - idx) = val;
|
|
3352
3363
|
|
|
3353
|
-
#line
|
|
3364
|
+
#line 3365 "vm.inc"
|
|
3354
3365
|
#undef level
|
|
3355
3366
|
#undef CURRENT_INSN_setlocal_OP__WC__1
|
|
3356
3367
|
#undef INSN_IS_SC
|
|
@@ -3374,7 +3385,7 @@ INSN_ENTRY(putobject_OP_INT2FIX_O_0_C_){
|
|
|
3374
3385
|
#line 297 "insns.def"
|
|
3375
3386
|
/* */
|
|
3376
3387
|
|
|
3377
|
-
#line
|
|
3388
|
+
#line 3389 "vm.inc"
|
|
3378
3389
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
|
3379
3390
|
PUSH(val);
|
|
3380
3391
|
#undef val
|
|
@@ -3400,7 +3411,7 @@ INSN_ENTRY(putobject_OP_INT2FIX_O_1_C_){
|
|
|
3400
3411
|
#line 297 "insns.def"
|
|
3401
3412
|
/* */
|
|
3402
3413
|
|
|
3403
|
-
#line
|
|
3414
|
+
#line 3415 "vm.inc"
|
|
3404
3415
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(REG_CFP, 1);
|
|
3405
3416
|
PUSH(val);
|
|
3406
3417
|
#undef val
|