debase-ruby_core_source 0.10.7 → 0.10.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +12 -0
- data/README.md +1 -1
- data/Rakefile +6 -3
- data/debase-ruby_core_source.gemspec +2 -1
- data/lib/debase/ruby_core_source.rb +0 -1
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-2.7.0-p0}/addr2line.h +0 -0
- data/lib/debase/ruby_core_source/ruby-2.7.0-p0/builtin.h +78 -0
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-2.7.0-p0}/ccan/build_assert/build_assert.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-2.7.0-p0}/ccan/check_type/check_type.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-2.7.0-p0}/ccan/container_of/container_of.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-2.7.0-p0}/ccan/list/list.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-2.7.0-p0}/ccan/str/str.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-2.7.0-p0}/constant.h +0 -4
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-2.7.0-p0}/debug_counter.h +21 -9
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-2.7.0-p0}/dln.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-2.7.0-p0}/encindex.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-2.7.0-p0}/eval_intern.h +1 -3
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-2.7.0-p0}/gc.h +2 -0
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-2.7.0-p0}/hrtime.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-2.7.0-p0}/id.h +1 -3
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-2.7.0-p0}/id_table.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-2.7.0-p0}/insns.inc +6 -2
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-2.7.0-p0}/insns_info.inc +1471 -1888
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-2.7.0-p0}/internal.h +106 -91
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-2.7.0-p0}/iseq.h +5 -5
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-2.7.0-p0}/known_errors.inc +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-2.7.0-p0}/method.h +1 -4
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-2.7.0-p0}/mjit.h +3 -5
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-2.7.0-p0}/mjit_compile.inc +768 -872
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-2.7.0-p0}/node.h +4 -11
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-2.7.0-p0}/node_name.inc +0 -2
- data/lib/debase/ruby_core_source/ruby-2.7.0-p0/opt_sc.inc +109 -0
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-2.7.0-p0}/optinsn.inc +0 -0
- data/lib/debase/ruby_core_source/ruby-2.7.0-p0/optunifs.inc +43 -0
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-2.7.0-p0}/parse.h +1 -1
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-2.7.0-p0}/probes_helper.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-2.7.0-p0}/regenc.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-2.7.0-p0}/regint.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-2.7.0-p0}/regparse.h +0 -0
- data/lib/debase/ruby_core_source/ruby-2.7.0-p0/revision.h +2 -0
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-2.7.0-p0}/ruby_assert.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-2.7.0-p0}/ruby_atomic.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-2.7.0-p0}/siphash.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-2.7.0-p0}/symbol.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-2.7.0-p0}/thread_pthread.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-2.7.0-p0}/thread_win32.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-2.7.0-p0}/timev.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-2.7.0-p0}/transcode_data.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-2.7.0-p0}/transient_heap.h +0 -0
- data/lib/debase/ruby_core_source/ruby-2.7.0-p0/variable.h +9 -0
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-2.7.0-p0}/version.h +4 -4
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-2.7.0-p0}/vm.inc +604 -407
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-2.7.0-p0}/vm_call_iseq_optimized.inc +49 -49
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-2.7.0-p0}/vm_core.h +42 -29
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-2.7.0-p0}/vm_debug.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-2.7.0-p0}/vm_exec.h +0 -0
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-2.7.0-p0}/vm_insnhelper.h +16 -4
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-2.7.0-p0}/vm_opts.h +2 -0
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-2.7.0-p0}/vmtc.inc +6 -2
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/addr2line.h +20 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/builtin.h +83 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/ccan/build_assert/build_assert.h +40 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/ccan/check_type/check_type.h +63 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/ccan/container_of/container_of.h +142 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/ccan/list/list.h +788 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/ccan/str/str.h +16 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/constant.h +55 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/debug_counter.h +457 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/dln.h +36 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/encindex.h +70 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/eval_intern.h +323 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/gc.h +140 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/hrtime.h +168 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/id.h +290 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/id_table.h +36 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/insns.inc +249 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/insns_info.inc +8983 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal.h +107 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/array.h +119 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/bignum.h +246 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/bits.h +566 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/class.h +174 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/compar.h +50 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/compile.h +32 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/compilers.h +108 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/complex.h +29 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/cont.h +25 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/dir.h +17 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/enc.h +20 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/encoding.h +28 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/enum.h +19 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/enumerator.h +22 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/error.h +124 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/eval.h +33 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/file.h +39 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/fixnum.h +185 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/gc.h +161 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/hash.h +241 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/imemo.h +243 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/inits.h +51 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/io.h +35 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/load.h +19 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/loadpath.h +17 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/math.h +24 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/missing.h +19 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/numeric.h +255 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/object.h +83 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/parse.h +23 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/proc.h +33 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/process.h +136 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/random.h +17 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/range.h +41 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/rational.h +71 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/re.h +29 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/sanitizers.h +191 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/scheduler.h +44 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/serial.h +24 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/signal.h +22 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/static_assert.h +17 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/string.h +140 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/struct.h +154 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/symbol.h +41 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/thread.h +54 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/time.h +35 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/transcode.h +21 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/util.h +31 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/variable.h +84 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/vm.h +136 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/warnings.h +17 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/iseq.h +305 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/known_errors.inc +791 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/method.h +245 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/mjit.h +220 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/mjit_compile.inc +8240 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/node.h +484 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/node_name.inc +210 -0
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-3.0.0-p0}/opt_sc.inc +0 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/optinsn.inc +128 -0
- data/lib/debase/ruby_core_source/{ruby-2.7.0-preview2 → ruby-3.0.0-p0}/optunifs.inc +0 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/parse.h +211 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/probes_helper.h +44 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/ractor_core.h +343 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/regenc.h +254 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/regint.h +938 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/regparse.h +370 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/revision.h +2 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/ruby_assert.h +15 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/ruby_atomic.h +23 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/siphash.h +48 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/symbol.h +119 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/thread_pthread.h +115 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/thread_win32.h +61 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/timev.h +57 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/transcode_data.h +138 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/transient_heap.h +65 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/variable.h +22 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/version.h +89 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/vm.inc +5355 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/vm_call_iseq_optimized.inc +244 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/vm_callinfo.h +456 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/vm_core.h +2023 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/vm_debug.h +116 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/vm_exec.h +196 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/vm_insnhelper.h +257 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/vm_opts.h +73 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/vm_sync.h +136 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/vmtc.inc +243 -0
- data/lib/debase/ruby_core_source/version.rb +1 -1
- metadata +181 -57
- data/lib/debase/ruby_core_source/ruby-2.7.0-preview2/revision.h +0 -2
@@ -122,7 +122,6 @@ enum node_type {
|
|
122
122
|
NODE_DSYM,
|
123
123
|
NODE_ATTRASGN,
|
124
124
|
NODE_LAMBDA,
|
125
|
-
NODE_METHREF,
|
126
125
|
NODE_ARYPTN,
|
127
126
|
NODE_HSHPTN,
|
128
127
|
NODE_LAST
|
@@ -176,7 +175,7 @@ typedef struct RNode {
|
|
176
175
|
|
177
176
|
#define RNODE(obj) (R_CAST(RNode)(obj))
|
178
177
|
|
179
|
-
/* FL : 0..4: T_TYPES, 5: KEEP_WB, 6: PROMOTED, 7: FINALIZE, 8:
|
178
|
+
/* FL : 0..4: T_TYPES, 5: KEEP_WB, 6: PROMOTED, 7: FINALIZE, 8: UNUSED, 9: UNUSED, 10: EXIVAR, 11: FREEZE */
|
180
179
|
/* NODE_FL: 0..4: T_TYPES, 5: KEEP_WB, 6: PROMOTED, 7: NODE_FL_NEWLINE,
|
181
180
|
* 8..14: nd_type,
|
182
181
|
* 15..: nd_line
|
@@ -378,7 +377,6 @@ typedef struct RNode {
|
|
378
377
|
#define NEW_PREEXE(b,loc) NEW_SCOPE(b,loc)
|
379
378
|
#define NEW_POSTEXE(b,loc) NEW_NODE(NODE_POSTEXE,0,b,0,loc)
|
380
379
|
#define NEW_ATTRASGN(r,m,a,loc) NEW_NODE(NODE_ATTRASGN,r,m,a,loc)
|
381
|
-
#define NEW_METHREF(r,m,loc) NEW_NODE(NODE_METHREF,r,m,0,loc)
|
382
380
|
|
383
381
|
#define NODE_SPECIAL_REQUIRED_KEYWORD ((NODE *)-1)
|
384
382
|
#define NODE_REQUIRED_KEYWORD_P(node) ((node)->nd_value == NODE_SPECIAL_REQUIRED_KEYWORD)
|
@@ -416,22 +414,15 @@ void rb_ast_delete_node(rb_ast_t*, NODE *n);
|
|
416
414
|
VALUE rb_parser_new(void);
|
417
415
|
VALUE rb_parser_end_seen_p(VALUE);
|
418
416
|
VALUE rb_parser_encoding(VALUE);
|
419
|
-
VALUE rb_parser_get_yydebug(VALUE);
|
420
417
|
VALUE rb_parser_set_yydebug(VALUE, VALUE);
|
421
418
|
VALUE rb_parser_dump_tree(const NODE *node, int comment);
|
422
419
|
void rb_parser_set_options(VALUE, int, int, int, int);
|
423
420
|
|
424
|
-
rb_ast_t *rb_parser_compile_cstr(VALUE, const char*, const char*, int, int);
|
425
421
|
rb_ast_t *rb_parser_compile_string(VALUE, const char*, VALUE, int);
|
426
|
-
rb_ast_t *rb_parser_compile_file(VALUE, const char*, VALUE, int);
|
427
422
|
rb_ast_t *rb_parser_compile_string_path(VALUE vparser, VALUE fname, VALUE src, int line);
|
428
423
|
rb_ast_t *rb_parser_compile_file_path(VALUE vparser, VALUE fname, VALUE input, int line);
|
429
424
|
rb_ast_t *rb_parser_compile_generic(VALUE vparser, VALUE (*lex_gets)(VALUE, int), VALUE fname, VALUE input, int line);
|
430
425
|
|
431
|
-
rb_ast_t *rb_compile_cstr(const char*, const char*, int, int);
|
432
|
-
rb_ast_t *rb_compile_string(const char*, VALUE, int);
|
433
|
-
rb_ast_t *rb_compile_file(const char*, VALUE, int);
|
434
|
-
|
435
426
|
void rb_node_init(NODE *n, enum node_type type, VALUE a0, VALUE a1, VALUE a2);
|
436
427
|
const char *ruby_node_name(int node);
|
437
428
|
|
@@ -453,7 +444,9 @@ struct rb_args_info {
|
|
453
444
|
NODE *kw_rest_arg;
|
454
445
|
|
455
446
|
NODE *opt_args;
|
456
|
-
int no_kwarg;
|
447
|
+
unsigned int no_kwarg: 1;
|
448
|
+
unsigned int ruby2_keywords: 1;
|
449
|
+
|
457
450
|
VALUE imemo;
|
458
451
|
};
|
459
452
|
|
@@ -0,0 +1,109 @@
|
|
1
|
+
/* -*- C -*- */
|
2
|
+
|
3
|
+
/* This is an auto-generated file and is a part of the programming language
|
4
|
+
* Ruby. The person who created a program to generate this file (``I''
|
5
|
+
* hereafter) would like to refrain from defining licensing of this generated
|
6
|
+
* source code.
|
7
|
+
*
|
8
|
+
* This file consists of many small parts of codes copyrighted by each author,
|
9
|
+
* not only the ``I'' person. Those original authors agree with some
|
10
|
+
* open-source license. I believe that the license we agree is the condition
|
11
|
+
* mentioned in the file COPYING. It states "4. You may modify and include
|
12
|
+
* the part of the software into any other software ...". But the problem is,
|
13
|
+
* the license never makes it clear if such modified parts still remain in the
|
14
|
+
* same license, or not. The fact that we agree with the source code's
|
15
|
+
* licensing terms does not automatically define that of generated ones. This
|
16
|
+
* is the reason why this file is under an unclear situation. All what I know
|
17
|
+
* is that above provision guarantees this file to exist.
|
18
|
+
*
|
19
|
+
* Please let me hesitate to declare something about this nuanced contract. I
|
20
|
+
* am not in the position to take over other authors' license to merge into my
|
21
|
+
* one. Changing them to (say) GPLv3 is not doable by myself. Perhaps someday
|
22
|
+
* it might turn out to be okay to say this file is under a license. I wish
|
23
|
+
* the situation would become more clear in the future. */
|
24
|
+
|
25
|
+
/*******************************************************************/
|
26
|
+
/*******************************************************************/
|
27
|
+
/*******************************************************************/
|
28
|
+
/**
|
29
|
+
This file is for threaded code.
|
30
|
+
|
31
|
+
----
|
32
|
+
This file is auto generated by insns2vm.rb
|
33
|
+
DO NOT TOUCH!
|
34
|
+
|
35
|
+
If you want to fix something, you must edit "tool/ruby_vm/views/opt_sc.inc.erb"
|
36
|
+
or tool/insns2vm.rb
|
37
|
+
*/
|
38
|
+
|
39
|
+
#define SC_STATE_SIZE 6
|
40
|
+
|
41
|
+
#define SCS_XX 1
|
42
|
+
#define SCS_AX 2
|
43
|
+
#define SCS_BX 3
|
44
|
+
#define SCS_AB 4
|
45
|
+
#define SCS_BA 5
|
46
|
+
|
47
|
+
#define SC_ERROR 0xffffffff
|
48
|
+
|
49
|
+
static const VALUE sc_insn_info[][SC_STATE_SIZE] = {
|
50
|
+
#define NO_SC { SC_ERROR, SC_ERROR, SC_ERROR, SC_ERROR, SC_ERROR, SC_ERROR }
|
51
|
+
NO_SC, NO_SC, NO_SC, NO_SC, NO_SC, NO_SC, NO_SC, NO_SC,
|
52
|
+
NO_SC, NO_SC, NO_SC, NO_SC, NO_SC, NO_SC, NO_SC, NO_SC,
|
53
|
+
NO_SC, NO_SC, NO_SC, NO_SC, NO_SC, NO_SC, NO_SC, NO_SC,
|
54
|
+
NO_SC, NO_SC, NO_SC, NO_SC, NO_SC, NO_SC, NO_SC, NO_SC,
|
55
|
+
NO_SC, NO_SC, NO_SC, NO_SC, NO_SC, NO_SC, NO_SC, NO_SC,
|
56
|
+
NO_SC, NO_SC, NO_SC, NO_SC, NO_SC, NO_SC, NO_SC, NO_SC,
|
57
|
+
NO_SC, NO_SC, NO_SC, NO_SC, NO_SC, NO_SC, NO_SC, NO_SC,
|
58
|
+
NO_SC, NO_SC, NO_SC, NO_SC, NO_SC, NO_SC, NO_SC, NO_SC,
|
59
|
+
NO_SC, NO_SC, NO_SC, NO_SC, NO_SC, NO_SC, NO_SC, NO_SC,
|
60
|
+
NO_SC, NO_SC, NO_SC, NO_SC, NO_SC, NO_SC, NO_SC, NO_SC,
|
61
|
+
NO_SC, NO_SC, NO_SC, NO_SC, NO_SC, NO_SC, NO_SC, NO_SC,
|
62
|
+
NO_SC, NO_SC, NO_SC, NO_SC, NO_SC, NO_SC, NO_SC, NO_SC,
|
63
|
+
NO_SC, NO_SC, NO_SC, NO_SC, NO_SC, NO_SC, NO_SC, NO_SC,
|
64
|
+
NO_SC, NO_SC, NO_SC, NO_SC, NO_SC, NO_SC, NO_SC, NO_SC,
|
65
|
+
NO_SC, NO_SC, NO_SC, NO_SC, NO_SC, NO_SC, NO_SC, NO_SC,
|
66
|
+
NO_SC, NO_SC, NO_SC, NO_SC, NO_SC, NO_SC, NO_SC, NO_SC,
|
67
|
+
NO_SC, NO_SC, NO_SC, NO_SC, NO_SC, NO_SC, NO_SC, NO_SC,
|
68
|
+
NO_SC, NO_SC, NO_SC, NO_SC, NO_SC, NO_SC, NO_SC, NO_SC,
|
69
|
+
NO_SC, NO_SC, NO_SC, NO_SC, NO_SC, NO_SC, NO_SC, NO_SC,
|
70
|
+
NO_SC, NO_SC, NO_SC, NO_SC, NO_SC, NO_SC, NO_SC, NO_SC,
|
71
|
+
NO_SC, NO_SC, NO_SC, NO_SC, NO_SC, NO_SC, NO_SC, NO_SC,
|
72
|
+
NO_SC, NO_SC, NO_SC, NO_SC, NO_SC, NO_SC, NO_SC, NO_SC,
|
73
|
+
NO_SC, NO_SC, NO_SC, NO_SC, NO_SC, NO_SC, NO_SC, NO_SC,
|
74
|
+
NO_SC, NO_SC, NO_SC, NO_SC, NO_SC, NO_SC, NO_SC, NO_SC,
|
75
|
+
NO_SC, NO_SC, NO_SC, NO_SC, NO_SC, NO_SC, NO_SC, NO_SC,
|
76
|
+
NO_SC, NO_SC, NO_SC, NO_SC, NO_SC, NO_SC,
|
77
|
+
#undef NO_SC
|
78
|
+
};
|
79
|
+
|
80
|
+
static const VALUE sc_insn_next[] = {
|
81
|
+
SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX,
|
82
|
+
SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX,
|
83
|
+
SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX,
|
84
|
+
SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX,
|
85
|
+
SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX,
|
86
|
+
SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX,
|
87
|
+
SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX,
|
88
|
+
SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX,
|
89
|
+
SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX,
|
90
|
+
SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX,
|
91
|
+
SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX,
|
92
|
+
SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX,
|
93
|
+
SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX,
|
94
|
+
SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX,
|
95
|
+
SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX,
|
96
|
+
SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX,
|
97
|
+
SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX,
|
98
|
+
SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX,
|
99
|
+
SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX,
|
100
|
+
SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX,
|
101
|
+
SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX,
|
102
|
+
SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX,
|
103
|
+
SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX,
|
104
|
+
SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX,
|
105
|
+
SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX,
|
106
|
+
SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX, SCS_XX,
|
107
|
+
};
|
108
|
+
|
109
|
+
ASSERT_VM_INSTRUCTION_SIZE(sc_insn_next);
|
File without changes
|
@@ -0,0 +1,43 @@
|
|
1
|
+
/* -*- C -*- */
|
2
|
+
|
3
|
+
/* This is an auto-generated file and is a part of the programming language
|
4
|
+
* Ruby. The person who created a program to generate this file (``I''
|
5
|
+
* hereafter) would like to refrain from defining licensing of this generated
|
6
|
+
* source code.
|
7
|
+
*
|
8
|
+
* This file consists of many small parts of codes copyrighted by each author,
|
9
|
+
* not only the ``I'' person. Those original authors agree with some
|
10
|
+
* open-source license. I believe that the license we agree is the condition
|
11
|
+
* mentioned in the file COPYING. It states "4. You may modify and include
|
12
|
+
* the part of the software into any other software ...". But the problem is,
|
13
|
+
* the license never makes it clear if such modified parts still remain in the
|
14
|
+
* same license, or not. The fact that we agree with the source code's
|
15
|
+
* licensing terms does not automatically define that of generated ones. This
|
16
|
+
* is the reason why this file is under an unclear situation. All what I know
|
17
|
+
* is that above provision guarantees this file to exist.
|
18
|
+
*
|
19
|
+
* Please let me hesitate to declare something about this nuanced contract. I
|
20
|
+
* am not in the position to take over other authors' license to merge into my
|
21
|
+
* one. Changing them to (say) GPLv3 is not doable by myself. Perhaps someday
|
22
|
+
* it might turn out to be okay to say this file is under a license. I wish
|
23
|
+
* the situation would become more clear in the future. */
|
24
|
+
|
25
|
+
/*******************************************************************/
|
26
|
+
/*******************************************************************/
|
27
|
+
/*******************************************************************/
|
28
|
+
/**
|
29
|
+
This file is for threaded code.
|
30
|
+
|
31
|
+
----
|
32
|
+
This file is auto generated by insns2vm.rb
|
33
|
+
DO NOT TOUCH!
|
34
|
+
|
35
|
+
If you want to fix something, you must edit "tool/ruby_vm/views/optunifs.inc.erb"
|
36
|
+
or tool/insns2vm.rb
|
37
|
+
*/
|
38
|
+
|
39
|
+
/* Let .bss section automatically initialize this variable */
|
40
|
+
/* cf. Section 6.7.8 of ISO/IEC 9899:1999 */
|
41
|
+
static const int *const *const unified_insns_data[206];
|
42
|
+
|
43
|
+
ASSERT_VM_INSTRUCTION_SIZE(unified_insns_data);
|
@@ -135,7 +135,6 @@ extern int yydebug;
|
|
135
135
|
tRSHFT = 137,
|
136
136
|
tANDDOT = 150,
|
137
137
|
tCOLON2 = 147,
|
138
|
-
tMETHREF = 151,
|
139
138
|
tCOLON3 = 324,
|
140
139
|
tOP_ASGN = 325,
|
141
140
|
tASSOC = 326,
|
@@ -179,6 +178,7 @@ union YYSTYPE
|
|
179
178
|
NODE *node;
|
180
179
|
ID id;
|
181
180
|
int num;
|
181
|
+
st_table *tbl;
|
182
182
|
const struct vtable *vars;
|
183
183
|
struct rb_strterm_struct *strterm;
|
184
184
|
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -2,11 +2,11 @@
|
|
2
2
|
# define RUBY_VERSION_MINOR RUBY_API_VERSION_MINOR
|
3
3
|
#define RUBY_VERSION_TEENY 0
|
4
4
|
#define RUBY_RELEASE_DATE RUBY_RELEASE_YEAR_STR"-"RUBY_RELEASE_MONTH_STR"-"RUBY_RELEASE_DAY_STR
|
5
|
-
#define RUBY_PATCHLEVEL
|
5
|
+
#define RUBY_PATCHLEVEL 0
|
6
6
|
|
7
7
|
#define RUBY_RELEASE_YEAR 2019
|
8
|
-
#define RUBY_RELEASE_MONTH
|
9
|
-
#define RUBY_RELEASE_DAY
|
8
|
+
#define RUBY_RELEASE_MONTH 12
|
9
|
+
#define RUBY_RELEASE_DAY 25
|
10
10
|
|
11
11
|
#include "ruby/version.h"
|
12
12
|
|
@@ -37,7 +37,7 @@
|
|
37
37
|
#endif
|
38
38
|
|
39
39
|
#if RUBY_PATCHLEVEL == -1
|
40
|
-
#define RUBY_PATCHLEVEL_STR "
|
40
|
+
#define RUBY_PATCHLEVEL_STR "dev"
|
41
41
|
#else
|
42
42
|
#define RUBY_PATCHLEVEL_STR "p"STRINGIZE(RUBY_PATCHLEVEL)
|
43
43
|
#endif
|
@@ -100,6 +100,8 @@ INSN_ENTRY(getlocal)
|
|
100
100
|
CHECK_CANARY();
|
101
101
|
INC_SP(INSN_ATTR(sp_inc));
|
102
102
|
TOPN(0) = val;
|
103
|
+
VM_ASSERT(!RB_TYPE_P(TOPN(0), T_NONE));
|
104
|
+
VM_ASSERT(!RB_TYPE_P(TOPN(0), T_MOVED));
|
103
105
|
if (leaf) ADD_PC(INSN_ATTR(width));
|
104
106
|
# undef INSN_ATTR
|
105
107
|
|
@@ -136,7 +138,7 @@ INSN_ENTRY(setlocal)
|
|
136
138
|
RB_DEBUG_COUNTER_INC(lvar_set);
|
137
139
|
(void)RB_DEBUG_COUNTER_INC_IF(lvar_set_dynamic, level > 0);
|
138
140
|
}
|
139
|
-
# line
|
141
|
+
# line 142 "vm.inc"
|
140
142
|
# undef NAME_OF_CURRENT_INSN
|
141
143
|
|
142
144
|
/* ### Instruction trailers. ### */
|
@@ -189,7 +191,7 @@ INSN_ENTRY(getblockparam)
|
|
189
191
|
(void)RB_DEBUG_COUNTER_INC_IF(lvar_get_dynamic, level > 0);
|
190
192
|
}
|
191
193
|
}
|
192
|
-
# line
|
194
|
+
# line 195 "vm.inc"
|
193
195
|
# undef NAME_OF_CURRENT_INSN
|
194
196
|
|
195
197
|
/* ### Instruction trailers. ### */
|
@@ -197,6 +199,8 @@ INSN_ENTRY(getblockparam)
|
|
197
199
|
CHECK_CANARY();
|
198
200
|
INC_SP(INSN_ATTR(sp_inc));
|
199
201
|
TOPN(0) = val;
|
202
|
+
VM_ASSERT(!RB_TYPE_P(TOPN(0), T_NONE));
|
203
|
+
VM_ASSERT(!RB_TYPE_P(TOPN(0), T_MOVED));
|
200
204
|
if (leaf) ADD_PC(INSN_ATTR(width));
|
201
205
|
# undef INSN_ATTR
|
202
206
|
|
@@ -238,7 +242,7 @@ INSN_ENTRY(setblockparam)
|
|
238
242
|
|
239
243
|
VM_ENV_FLAGS_SET(ep, VM_FRAME_FLAG_MODIFIED_BLOCK_PARAM);
|
240
244
|
}
|
241
|
-
# line
|
245
|
+
# line 246 "vm.inc"
|
242
246
|
# undef NAME_OF_CURRENT_INSN
|
243
247
|
|
244
248
|
/* ### Instruction trailers. ### */
|
@@ -312,7 +316,7 @@ INSN_ENTRY(getblockparamproxy)
|
|
312
316
|
(void)RB_DEBUG_COUNTER_INC_IF(lvar_get_dynamic, level > 0);
|
313
317
|
}
|
314
318
|
}
|
315
|
-
# line
|
319
|
+
# line 320 "vm.inc"
|
316
320
|
# undef NAME_OF_CURRENT_INSN
|
317
321
|
|
318
322
|
/* ### Instruction trailers. ### */
|
@@ -320,6 +324,8 @@ INSN_ENTRY(getblockparamproxy)
|
|
320
324
|
CHECK_CANARY();
|
321
325
|
INC_SP(INSN_ATTR(sp_inc));
|
322
326
|
TOPN(0) = val;
|
327
|
+
VM_ASSERT(!RB_TYPE_P(TOPN(0), T_NONE));
|
328
|
+
VM_ASSERT(!RB_TYPE_P(TOPN(0), T_MOVED));
|
323
329
|
if (leaf) ADD_PC(INSN_ATTR(width));
|
324
330
|
# undef INSN_ATTR
|
325
331
|
|
@@ -354,7 +360,7 @@ INSN_ENTRY(getspecial)
|
|
354
360
|
{
|
355
361
|
val = vm_getspecial(ec, GET_LEP(), key, type);
|
356
362
|
}
|
357
|
-
# line
|
363
|
+
# line 364 "vm.inc"
|
358
364
|
# undef NAME_OF_CURRENT_INSN
|
359
365
|
|
360
366
|
/* ### Instruction trailers. ### */
|
@@ -362,6 +368,8 @@ INSN_ENTRY(getspecial)
|
|
362
368
|
CHECK_CANARY();
|
363
369
|
INC_SP(INSN_ATTR(sp_inc));
|
364
370
|
TOPN(0) = val;
|
371
|
+
VM_ASSERT(!RB_TYPE_P(TOPN(0), T_NONE));
|
372
|
+
VM_ASSERT(!RB_TYPE_P(TOPN(0), T_MOVED));
|
365
373
|
if (leaf) ADD_PC(INSN_ATTR(width));
|
366
374
|
# undef INSN_ATTR
|
367
375
|
|
@@ -394,7 +402,7 @@ INSN_ENTRY(setspecial)
|
|
394
402
|
{
|
395
403
|
lep_svar_set(ec, GET_LEP(), key, obj);
|
396
404
|
}
|
397
|
-
# line
|
405
|
+
# line 406 "vm.inc"
|
398
406
|
# undef NAME_OF_CURRENT_INSN
|
399
407
|
|
400
408
|
/* ### Instruction trailers. ### */
|
@@ -417,7 +425,7 @@ INSN_ENTRY(getinstancevariable)
|
|
417
425
|
|
418
426
|
/* ### Declare and assign variables. ### */
|
419
427
|
ID id = (ID)GET_OPERAND(1);
|
420
|
-
|
428
|
+
IVC ic = (IVC)GET_OPERAND(2);
|
421
429
|
# define INSN_ATTR(x) attr_ ## x ## _getinstancevariable(id, ic)
|
422
430
|
bool leaf = INSN_ATTR(leaf);
|
423
431
|
VALUE val;
|
@@ -435,7 +443,7 @@ INSN_ENTRY(getinstancevariable)
|
|
435
443
|
{
|
436
444
|
val = vm_getinstancevariable(GET_SELF(), id, ic);
|
437
445
|
}
|
438
|
-
# line
|
446
|
+
# line 447 "vm.inc"
|
439
447
|
# undef NAME_OF_CURRENT_INSN
|
440
448
|
|
441
449
|
/* ### Instruction trailers. ### */
|
@@ -443,6 +451,8 @@ INSN_ENTRY(getinstancevariable)
|
|
443
451
|
CHECK_CANARY();
|
444
452
|
INC_SP(INSN_ATTR(sp_inc));
|
445
453
|
TOPN(0) = val;
|
454
|
+
VM_ASSERT(!RB_TYPE_P(TOPN(0), T_NONE));
|
455
|
+
VM_ASSERT(!RB_TYPE_P(TOPN(0), T_MOVED));
|
446
456
|
if (leaf) ADD_PC(INSN_ATTR(width));
|
447
457
|
# undef INSN_ATTR
|
448
458
|
|
@@ -459,7 +469,7 @@ INSN_ENTRY(setinstancevariable)
|
|
459
469
|
|
460
470
|
/* ### Declare and assign variables. ### */
|
461
471
|
ID id = (ID)GET_OPERAND(1);
|
462
|
-
|
472
|
+
IVC ic = (IVC)GET_OPERAND(2);
|
463
473
|
# define INSN_ATTR(x) attr_ ## x ## _setinstancevariable(id, ic)
|
464
474
|
bool leaf = INSN_ATTR(leaf);
|
465
475
|
VALUE val = TOPN(0);
|
@@ -477,7 +487,7 @@ INSN_ENTRY(setinstancevariable)
|
|
477
487
|
{
|
478
488
|
vm_setinstancevariable(GET_SELF(), id, val, ic);
|
479
489
|
}
|
480
|
-
# line
|
490
|
+
# line 491 "vm.inc"
|
481
491
|
# undef NAME_OF_CURRENT_INSN
|
482
492
|
|
483
493
|
/* ### Instruction trailers. ### */
|
@@ -516,7 +526,7 @@ INSN_ENTRY(getclassvariable)
|
|
516
526
|
{
|
517
527
|
val = rb_cvar_get(vm_get_cvar_base(vm_get_cref(GET_EP()), GET_CFP()), id);
|
518
528
|
}
|
519
|
-
# line
|
529
|
+
# line 530 "vm.inc"
|
520
530
|
# undef NAME_OF_CURRENT_INSN
|
521
531
|
|
522
532
|
/* ### Instruction trailers. ### */
|
@@ -524,6 +534,8 @@ INSN_ENTRY(getclassvariable)
|
|
524
534
|
CHECK_CANARY();
|
525
535
|
INC_SP(INSN_ATTR(sp_inc));
|
526
536
|
TOPN(0) = val;
|
537
|
+
VM_ASSERT(!RB_TYPE_P(TOPN(0), T_NONE));
|
538
|
+
VM_ASSERT(!RB_TYPE_P(TOPN(0), T_MOVED));
|
527
539
|
if (leaf) ADD_PC(INSN_ATTR(width));
|
528
540
|
# undef INSN_ATTR
|
529
541
|
|
@@ -557,7 +569,7 @@ INSN_ENTRY(setclassvariable)
|
|
557
569
|
vm_ensure_not_refinement_module(GET_SELF());
|
558
570
|
rb_cvar_set(vm_get_cvar_base(vm_get_cref(GET_EP()), GET_CFP()), id, val);
|
559
571
|
}
|
560
|
-
# line
|
572
|
+
# line 573 "vm.inc"
|
561
573
|
# undef NAME_OF_CURRENT_INSN
|
562
574
|
|
563
575
|
/* ### Instruction trailers. ### */
|
@@ -598,7 +610,7 @@ INSN_ENTRY(getconstant)
|
|
598
610
|
{
|
599
611
|
val = vm_get_ev_const(ec, klass, id, allow_nil == Qtrue, 0);
|
600
612
|
}
|
601
|
-
# line
|
613
|
+
# line 614 "vm.inc"
|
602
614
|
# undef NAME_OF_CURRENT_INSN
|
603
615
|
|
604
616
|
/* ### Instruction trailers. ### */
|
@@ -606,6 +618,8 @@ INSN_ENTRY(getconstant)
|
|
606
618
|
CHECK_CANARY();
|
607
619
|
INC_SP(INSN_ATTR(sp_inc));
|
608
620
|
TOPN(0) = val;
|
621
|
+
VM_ASSERT(!RB_TYPE_P(TOPN(0), T_NONE));
|
622
|
+
VM_ASSERT(!RB_TYPE_P(TOPN(0), T_MOVED));
|
609
623
|
if (leaf) ADD_PC(INSN_ATTR(width));
|
610
624
|
# undef INSN_ATTR
|
611
625
|
|
@@ -641,7 +655,7 @@ INSN_ENTRY(setconstant)
|
|
641
655
|
vm_ensure_not_refinement_module(GET_SELF());
|
642
656
|
rb_const_set(cbase, id, val);
|
643
657
|
}
|
644
|
-
# line
|
658
|
+
# line 659 "vm.inc"
|
645
659
|
# undef NAME_OF_CURRENT_INSN
|
646
660
|
|
647
661
|
/* ### Instruction trailers. ### */
|
@@ -681,7 +695,7 @@ INSN_ENTRY(getglobal)
|
|
681
695
|
struct rb_global_entry *gentry = (void *)entry;
|
682
696
|
val = rb_gvar_get(gentry);
|
683
697
|
}
|
684
|
-
# line
|
698
|
+
# line 699 "vm.inc"
|
685
699
|
# undef NAME_OF_CURRENT_INSN
|
686
700
|
|
687
701
|
/* ### Instruction trailers. ### */
|
@@ -689,6 +703,8 @@ INSN_ENTRY(getglobal)
|
|
689
703
|
CHECK_CANARY();
|
690
704
|
INC_SP(INSN_ATTR(sp_inc));
|
691
705
|
TOPN(0) = val;
|
706
|
+
VM_ASSERT(!RB_TYPE_P(TOPN(0), T_NONE));
|
707
|
+
VM_ASSERT(!RB_TYPE_P(TOPN(0), T_MOVED));
|
692
708
|
if (leaf) ADD_PC(INSN_ATTR(width));
|
693
709
|
# undef INSN_ATTR
|
694
710
|
|
@@ -722,7 +738,7 @@ INSN_ENTRY(setglobal)
|
|
722
738
|
struct rb_global_entry *gentry = (void *)entry;
|
723
739
|
rb_gvar_set(gentry, val);
|
724
740
|
}
|
725
|
-
# line
|
741
|
+
# line 742 "vm.inc"
|
726
742
|
# undef NAME_OF_CURRENT_INSN
|
727
743
|
|
728
744
|
/* ### Instruction trailers. ### */
|
@@ -759,7 +775,7 @@ INSN_ENTRY(putnil)
|
|
759
775
|
{
|
760
776
|
val = Qnil;
|
761
777
|
}
|
762
|
-
# line
|
778
|
+
# line 779 "vm.inc"
|
763
779
|
# undef NAME_OF_CURRENT_INSN
|
764
780
|
|
765
781
|
/* ### Instruction trailers. ### */
|
@@ -767,6 +783,8 @@ INSN_ENTRY(putnil)
|
|
767
783
|
CHECK_CANARY();
|
768
784
|
INC_SP(INSN_ATTR(sp_inc));
|
769
785
|
TOPN(0) = val;
|
786
|
+
VM_ASSERT(!RB_TYPE_P(TOPN(0), T_NONE));
|
787
|
+
VM_ASSERT(!RB_TYPE_P(TOPN(0), T_MOVED));
|
770
788
|
if (leaf) ADD_PC(INSN_ATTR(width));
|
771
789
|
# undef INSN_ATTR
|
772
790
|
|
@@ -797,7 +815,7 @@ INSN_ENTRY(putself)
|
|
797
815
|
{
|
798
816
|
val = GET_SELF();
|
799
817
|
}
|
800
|
-
# line
|
818
|
+
# line 819 "vm.inc"
|
801
819
|
# undef NAME_OF_CURRENT_INSN
|
802
820
|
|
803
821
|
/* ### Instruction trailers. ### */
|
@@ -805,6 +823,8 @@ INSN_ENTRY(putself)
|
|
805
823
|
CHECK_CANARY();
|
806
824
|
INC_SP(INSN_ATTR(sp_inc));
|
807
825
|
TOPN(0) = val;
|
826
|
+
VM_ASSERT(!RB_TYPE_P(TOPN(0), T_NONE));
|
827
|
+
VM_ASSERT(!RB_TYPE_P(TOPN(0), T_MOVED));
|
808
828
|
if (leaf) ADD_PC(INSN_ATTR(width));
|
809
829
|
# undef INSN_ATTR
|
810
830
|
|
@@ -833,6 +853,8 @@ INSN_ENTRY(putobject)
|
|
833
853
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(VM_REG_CFP, INSN_ATTR(retn));
|
834
854
|
INC_SP(INSN_ATTR(sp_inc));
|
835
855
|
TOPN(0) = val;
|
856
|
+
VM_ASSERT(!RB_TYPE_P(TOPN(0), T_NONE));
|
857
|
+
VM_ASSERT(!RB_TYPE_P(TOPN(0), T_MOVED));
|
836
858
|
if (leaf) ADD_PC(INSN_ATTR(width));
|
837
859
|
# undef INSN_ATTR
|
838
860
|
|
@@ -868,7 +890,7 @@ INSN_ENTRY(putspecialobject)
|
|
868
890
|
type = (enum vm_special_object_type)value_type;
|
869
891
|
val = vm_get_special_object(GET_EP(), type);
|
870
892
|
}
|
871
|
-
# line
|
893
|
+
# line 894 "vm.inc"
|
872
894
|
# undef NAME_OF_CURRENT_INSN
|
873
895
|
|
874
896
|
/* ### Instruction trailers. ### */
|
@@ -876,6 +898,8 @@ INSN_ENTRY(putspecialobject)
|
|
876
898
|
CHECK_CANARY();
|
877
899
|
INC_SP(INSN_ATTR(sp_inc));
|
878
900
|
TOPN(0) = val;
|
901
|
+
VM_ASSERT(!RB_TYPE_P(TOPN(0), T_NONE));
|
902
|
+
VM_ASSERT(!RB_TYPE_P(TOPN(0), T_MOVED));
|
879
903
|
if (leaf) ADD_PC(INSN_ATTR(width));
|
880
904
|
# undef INSN_ATTR
|
881
905
|
|
@@ -908,7 +932,7 @@ INSN_ENTRY(putstring)
|
|
908
932
|
{
|
909
933
|
val = rb_str_resurrect(str);
|
910
934
|
}
|
911
|
-
# line
|
935
|
+
# line 936 "vm.inc"
|
912
936
|
# undef NAME_OF_CURRENT_INSN
|
913
937
|
|
914
938
|
/* ### Instruction trailers. ### */
|
@@ -916,6 +940,8 @@ INSN_ENTRY(putstring)
|
|
916
940
|
CHECK_CANARY();
|
917
941
|
INC_SP(INSN_ATTR(sp_inc));
|
918
942
|
TOPN(0) = val;
|
943
|
+
VM_ASSERT(!RB_TYPE_P(TOPN(0), T_NONE));
|
944
|
+
VM_ASSERT(!RB_TYPE_P(TOPN(0), T_MOVED));
|
919
945
|
if (leaf) ADD_PC(INSN_ATTR(width));
|
920
946
|
# undef INSN_ATTR
|
921
947
|
|
@@ -948,7 +974,7 @@ INSN_ENTRY(concatstrings)
|
|
948
974
|
{
|
949
975
|
val = rb_str_concat_literals(num, STACK_ADDR_FROM_TOP(num));
|
950
976
|
}
|
951
|
-
# line
|
977
|
+
# line 978 "vm.inc"
|
952
978
|
# undef NAME_OF_CURRENT_INSN
|
953
979
|
|
954
980
|
/* ### Instruction trailers. ### */
|
@@ -956,6 +982,8 @@ INSN_ENTRY(concatstrings)
|
|
956
982
|
CHECK_CANARY();
|
957
983
|
INC_SP(INSN_ATTR(sp_inc));
|
958
984
|
TOPN(0) = val;
|
985
|
+
VM_ASSERT(!RB_TYPE_P(TOPN(0), T_NONE));
|
986
|
+
VM_ASSERT(!RB_TYPE_P(TOPN(0), T_MOVED));
|
959
987
|
if (leaf) ADD_PC(INSN_ATTR(width));
|
960
988
|
# undef INSN_ATTR
|
961
989
|
|
@@ -987,7 +1015,7 @@ INSN_ENTRY(tostring)
|
|
987
1015
|
{
|
988
1016
|
val = rb_obj_as_string_result(str, val);
|
989
1017
|
}
|
990
|
-
# line
|
1018
|
+
# line 1019 "vm.inc"
|
991
1019
|
# undef NAME_OF_CURRENT_INSN
|
992
1020
|
|
993
1021
|
/* ### Instruction trailers. ### */
|
@@ -995,6 +1023,8 @@ INSN_ENTRY(tostring)
|
|
995
1023
|
CHECK_CANARY();
|
996
1024
|
INC_SP(INSN_ATTR(sp_inc));
|
997
1025
|
TOPN(0) = val;
|
1026
|
+
VM_ASSERT(!RB_TYPE_P(TOPN(0), T_NONE));
|
1027
|
+
VM_ASSERT(!RB_TYPE_P(TOPN(0), T_MOVED));
|
998
1028
|
if (leaf) ADD_PC(INSN_ATTR(width));
|
999
1029
|
# undef INSN_ATTR
|
1000
1030
|
|
@@ -1027,7 +1057,7 @@ INSN_ENTRY(freezestring)
|
|
1027
1057
|
{
|
1028
1058
|
vm_freezestring(str, debug_info);
|
1029
1059
|
}
|
1030
|
-
# line
|
1060
|
+
# line 1061 "vm.inc"
|
1031
1061
|
# undef NAME_OF_CURRENT_INSN
|
1032
1062
|
|
1033
1063
|
/* ### Instruction trailers. ### */
|
@@ -1035,6 +1065,8 @@ INSN_ENTRY(freezestring)
|
|
1035
1065
|
CHECK_CANARY();
|
1036
1066
|
INC_SP(INSN_ATTR(sp_inc));
|
1037
1067
|
TOPN(0) = str;
|
1068
|
+
VM_ASSERT(!RB_TYPE_P(TOPN(0), T_NONE));
|
1069
|
+
VM_ASSERT(!RB_TYPE_P(TOPN(0), T_MOVED));
|
1038
1070
|
if (leaf) ADD_PC(INSN_ATTR(width));
|
1039
1071
|
# undef INSN_ATTR
|
1040
1072
|
|
@@ -1071,7 +1103,7 @@ INSN_ENTRY(toregexp)
|
|
1071
1103
|
val = rb_reg_new_ary(ary, (int)opt);
|
1072
1104
|
rb_ary_clear(ary);
|
1073
1105
|
}
|
1074
|
-
# line
|
1106
|
+
# line 1107 "vm.inc"
|
1075
1107
|
# undef NAME_OF_CURRENT_INSN
|
1076
1108
|
|
1077
1109
|
/* ### Instruction trailers. ### */
|
@@ -1079,6 +1111,8 @@ INSN_ENTRY(toregexp)
|
|
1079
1111
|
CHECK_CANARY();
|
1080
1112
|
INC_SP(INSN_ATTR(sp_inc));
|
1081
1113
|
TOPN(0) = val;
|
1114
|
+
VM_ASSERT(!RB_TYPE_P(TOPN(0), T_NONE));
|
1115
|
+
VM_ASSERT(!RB_TYPE_P(TOPN(0), T_MOVED));
|
1082
1116
|
if (leaf) ADD_PC(INSN_ATTR(width));
|
1083
1117
|
# undef INSN_ATTR
|
1084
1118
|
|
@@ -1110,7 +1144,7 @@ INSN_ENTRY(intern)
|
|
1110
1144
|
{
|
1111
1145
|
sym = rb_str_intern(str);
|
1112
1146
|
}
|
1113
|
-
# line
|
1147
|
+
# line 1148 "vm.inc"
|
1114
1148
|
# undef NAME_OF_CURRENT_INSN
|
1115
1149
|
|
1116
1150
|
/* ### Instruction trailers. ### */
|
@@ -1118,6 +1152,8 @@ INSN_ENTRY(intern)
|
|
1118
1152
|
CHECK_CANARY();
|
1119
1153
|
INC_SP(INSN_ATTR(sp_inc));
|
1120
1154
|
TOPN(0) = sym;
|
1155
|
+
VM_ASSERT(!RB_TYPE_P(TOPN(0), T_NONE));
|
1156
|
+
VM_ASSERT(!RB_TYPE_P(TOPN(0), T_MOVED));
|
1121
1157
|
if (leaf) ADD_PC(INSN_ATTR(width));
|
1122
1158
|
# undef INSN_ATTR
|
1123
1159
|
|
@@ -1150,7 +1186,7 @@ INSN_ENTRY(newarray)
|
|
1150
1186
|
{
|
1151
1187
|
val = rb_ary_new4(num, STACK_ADDR_FROM_TOP(num));
|
1152
1188
|
}
|
1153
|
-
# line
|
1189
|
+
# line 1190 "vm.inc"
|
1154
1190
|
# undef NAME_OF_CURRENT_INSN
|
1155
1191
|
|
1156
1192
|
/* ### Instruction trailers. ### */
|
@@ -1158,6 +1194,8 @@ INSN_ENTRY(newarray)
|
|
1158
1194
|
CHECK_CANARY();
|
1159
1195
|
INC_SP(INSN_ATTR(sp_inc));
|
1160
1196
|
TOPN(0) = val;
|
1197
|
+
VM_ASSERT(!RB_TYPE_P(TOPN(0), T_NONE));
|
1198
|
+
VM_ASSERT(!RB_TYPE_P(TOPN(0), T_MOVED));
|
1161
1199
|
if (leaf) ADD_PC(INSN_ATTR(width));
|
1162
1200
|
# undef INSN_ATTR
|
1163
1201
|
|
@@ -1195,7 +1233,7 @@ INSN_ENTRY(newarraykwsplat)
|
|
1195
1233
|
val = rb_ary_new4(num, STACK_ADDR_FROM_TOP(num));
|
1196
1234
|
}
|
1197
1235
|
}
|
1198
|
-
# line
|
1236
|
+
# line 1237 "vm.inc"
|
1199
1237
|
# undef NAME_OF_CURRENT_INSN
|
1200
1238
|
|
1201
1239
|
/* ### Instruction trailers. ### */
|
@@ -1203,6 +1241,8 @@ INSN_ENTRY(newarraykwsplat)
|
|
1203
1241
|
CHECK_CANARY();
|
1204
1242
|
INC_SP(INSN_ATTR(sp_inc));
|
1205
1243
|
TOPN(0) = val;
|
1244
|
+
VM_ASSERT(!RB_TYPE_P(TOPN(0), T_NONE));
|
1245
|
+
VM_ASSERT(!RB_TYPE_P(TOPN(0), T_MOVED));
|
1206
1246
|
if (leaf) ADD_PC(INSN_ATTR(width));
|
1207
1247
|
# undef INSN_ATTR
|
1208
1248
|
|
@@ -1236,7 +1276,7 @@ INSN_ENTRY(duparray)
|
|
1236
1276
|
RUBY_DTRACE_CREATE_HOOK(ARRAY, RARRAY_LEN(ary));
|
1237
1277
|
val = rb_ary_resurrect(ary);
|
1238
1278
|
}
|
1239
|
-
# line
|
1279
|
+
# line 1280 "vm.inc"
|
1240
1280
|
# undef NAME_OF_CURRENT_INSN
|
1241
1281
|
|
1242
1282
|
/* ### Instruction trailers. ### */
|
@@ -1244,6 +1284,8 @@ INSN_ENTRY(duparray)
|
|
1244
1284
|
CHECK_CANARY();
|
1245
1285
|
INC_SP(INSN_ATTR(sp_inc));
|
1246
1286
|
TOPN(0) = val;
|
1287
|
+
VM_ASSERT(!RB_TYPE_P(TOPN(0), T_NONE));
|
1288
|
+
VM_ASSERT(!RB_TYPE_P(TOPN(0), T_MOVED));
|
1247
1289
|
if (leaf) ADD_PC(INSN_ATTR(width));
|
1248
1290
|
# undef INSN_ATTR
|
1249
1291
|
|
@@ -1277,7 +1319,7 @@ INSN_ENTRY(duphash)
|
|
1277
1319
|
RUBY_DTRACE_CREATE_HOOK(HASH, RHASH_SIZE(hash) << 1);
|
1278
1320
|
val = rb_hash_resurrect(hash);
|
1279
1321
|
}
|
1280
|
-
# line
|
1322
|
+
# line 1323 "vm.inc"
|
1281
1323
|
# undef NAME_OF_CURRENT_INSN
|
1282
1324
|
|
1283
1325
|
/* ### Instruction trailers. ### */
|
@@ -1285,6 +1327,8 @@ INSN_ENTRY(duphash)
|
|
1285
1327
|
CHECK_CANARY();
|
1286
1328
|
INC_SP(INSN_ATTR(sp_inc));
|
1287
1329
|
TOPN(0) = val;
|
1330
|
+
VM_ASSERT(!RB_TYPE_P(TOPN(0), T_NONE));
|
1331
|
+
VM_ASSERT(!RB_TYPE_P(TOPN(0), T_MOVED));
|
1288
1332
|
if (leaf) ADD_PC(INSN_ATTR(width));
|
1289
1333
|
# undef INSN_ATTR
|
1290
1334
|
|
@@ -1318,7 +1362,7 @@ INSN_ENTRY(expandarray)
|
|
1318
1362
|
{
|
1319
1363
|
vm_expandarray(GET_SP(), ary, num, (int)flag);
|
1320
1364
|
}
|
1321
|
-
# line
|
1365
|
+
# line 1366 "vm.inc"
|
1322
1366
|
# undef NAME_OF_CURRENT_INSN
|
1323
1367
|
|
1324
1368
|
/* ### Instruction trailers. ### */
|
@@ -1356,7 +1400,7 @@ INSN_ENTRY(concatarray)
|
|
1356
1400
|
{
|
1357
1401
|
ary = vm_concat_array(ary1, ary2);
|
1358
1402
|
}
|
1359
|
-
# line
|
1403
|
+
# line 1404 "vm.inc"
|
1360
1404
|
# undef NAME_OF_CURRENT_INSN
|
1361
1405
|
|
1362
1406
|
/* ### Instruction trailers. ### */
|
@@ -1364,6 +1408,8 @@ INSN_ENTRY(concatarray)
|
|
1364
1408
|
CHECK_CANARY();
|
1365
1409
|
INC_SP(INSN_ATTR(sp_inc));
|
1366
1410
|
TOPN(0) = ary;
|
1411
|
+
VM_ASSERT(!RB_TYPE_P(TOPN(0), T_NONE));
|
1412
|
+
VM_ASSERT(!RB_TYPE_P(TOPN(0), T_MOVED));
|
1367
1413
|
if (leaf) ADD_PC(INSN_ATTR(width));
|
1368
1414
|
# undef INSN_ATTR
|
1369
1415
|
|
@@ -1397,7 +1443,7 @@ INSN_ENTRY(splatarray)
|
|
1397
1443
|
{
|
1398
1444
|
obj = vm_splat_array(flag, ary);
|
1399
1445
|
}
|
1400
|
-
# line
|
1446
|
+
# line 1447 "vm.inc"
|
1401
1447
|
# undef NAME_OF_CURRENT_INSN
|
1402
1448
|
|
1403
1449
|
/* ### Instruction trailers. ### */
|
@@ -1405,6 +1451,8 @@ INSN_ENTRY(splatarray)
|
|
1405
1451
|
CHECK_CANARY();
|
1406
1452
|
INC_SP(INSN_ATTR(sp_inc));
|
1407
1453
|
TOPN(0) = obj;
|
1454
|
+
VM_ASSERT(!RB_TYPE_P(TOPN(0), T_NONE));
|
1455
|
+
VM_ASSERT(!RB_TYPE_P(TOPN(0), T_MOVED));
|
1408
1456
|
if (leaf) ADD_PC(INSN_ATTR(width));
|
1409
1457
|
# undef INSN_ATTR
|
1410
1458
|
|
@@ -1443,7 +1491,7 @@ INSN_ENTRY(newhash)
|
|
1443
1491
|
rb_hash_bulk_insert(num, STACK_ADDR_FROM_TOP(num), val);
|
1444
1492
|
}
|
1445
1493
|
}
|
1446
|
-
# line
|
1494
|
+
# line 1495 "vm.inc"
|
1447
1495
|
# undef NAME_OF_CURRENT_INSN
|
1448
1496
|
|
1449
1497
|
/* ### Instruction trailers. ### */
|
@@ -1451,6 +1499,8 @@ INSN_ENTRY(newhash)
|
|
1451
1499
|
CHECK_CANARY();
|
1452
1500
|
INC_SP(INSN_ATTR(sp_inc));
|
1453
1501
|
TOPN(0) = val;
|
1502
|
+
VM_ASSERT(!RB_TYPE_P(TOPN(0), T_NONE));
|
1503
|
+
VM_ASSERT(!RB_TYPE_P(TOPN(0), T_MOVED));
|
1454
1504
|
if (leaf) ADD_PC(INSN_ATTR(width));
|
1455
1505
|
# undef INSN_ATTR
|
1456
1506
|
|
@@ -1485,7 +1535,7 @@ INSN_ENTRY(newrange)
|
|
1485
1535
|
{
|
1486
1536
|
val = rb_range_new(low, high, (int)flag);
|
1487
1537
|
}
|
1488
|
-
# line
|
1538
|
+
# line 1539 "vm.inc"
|
1489
1539
|
# undef NAME_OF_CURRENT_INSN
|
1490
1540
|
|
1491
1541
|
/* ### Instruction trailers. ### */
|
@@ -1493,6 +1543,8 @@ INSN_ENTRY(newrange)
|
|
1493
1543
|
CHECK_CANARY();
|
1494
1544
|
INC_SP(INSN_ATTR(sp_inc));
|
1495
1545
|
TOPN(0) = val;
|
1546
|
+
VM_ASSERT(!RB_TYPE_P(TOPN(0), T_NONE));
|
1547
|
+
VM_ASSERT(!RB_TYPE_P(TOPN(0), T_MOVED));
|
1496
1548
|
if (leaf) ADD_PC(INSN_ATTR(width));
|
1497
1549
|
# undef INSN_ATTR
|
1498
1550
|
|
@@ -1524,7 +1576,7 @@ INSN_ENTRY(pop)
|
|
1524
1576
|
(void)val;
|
1525
1577
|
/* none */
|
1526
1578
|
}
|
1527
|
-
# line
|
1579
|
+
# line 1580 "vm.inc"
|
1528
1580
|
# undef NAME_OF_CURRENT_INSN
|
1529
1581
|
|
1530
1582
|
/* ### Instruction trailers. ### */
|
@@ -1563,7 +1615,7 @@ INSN_ENTRY(dup)
|
|
1563
1615
|
{
|
1564
1616
|
val1 = val2 = val;
|
1565
1617
|
}
|
1566
|
-
# line
|
1618
|
+
# line 1619 "vm.inc"
|
1567
1619
|
# undef NAME_OF_CURRENT_INSN
|
1568
1620
|
|
1569
1621
|
/* ### Instruction trailers. ### */
|
@@ -1571,7 +1623,11 @@ INSN_ENTRY(dup)
|
|
1571
1623
|
CHECK_CANARY();
|
1572
1624
|
INC_SP(INSN_ATTR(sp_inc));
|
1573
1625
|
TOPN(0) = val2;
|
1626
|
+
VM_ASSERT(!RB_TYPE_P(TOPN(0), T_NONE));
|
1627
|
+
VM_ASSERT(!RB_TYPE_P(TOPN(0), T_MOVED));
|
1574
1628
|
TOPN(1) = val1;
|
1629
|
+
VM_ASSERT(!RB_TYPE_P(TOPN(1), T_NONE));
|
1630
|
+
VM_ASSERT(!RB_TYPE_P(TOPN(1), T_MOVED));
|
1575
1631
|
if (leaf) ADD_PC(INSN_ATTR(width));
|
1576
1632
|
# undef INSN_ATTR
|
1577
1633
|
|
@@ -1605,7 +1661,7 @@ INSN_ENTRY(dupn)
|
|
1605
1661
|
|
1606
1662
|
MEMCPY(dst, src, VALUE, n);
|
1607
1663
|
}
|
1608
|
-
# line
|
1664
|
+
# line 1665 "vm.inc"
|
1609
1665
|
# undef NAME_OF_CURRENT_INSN
|
1610
1666
|
|
1611
1667
|
/* ### Instruction trailers. ### */
|
@@ -1639,7 +1695,11 @@ INSN_ENTRY(swap)
|
|
1639
1695
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(VM_REG_CFP, INSN_ATTR(retn));
|
1640
1696
|
INC_SP(INSN_ATTR(sp_inc));
|
1641
1697
|
TOPN(0) = val;
|
1698
|
+
VM_ASSERT(!RB_TYPE_P(TOPN(0), T_NONE));
|
1699
|
+
VM_ASSERT(!RB_TYPE_P(TOPN(0), T_MOVED));
|
1642
1700
|
TOPN(1) = obj;
|
1701
|
+
VM_ASSERT(!RB_TYPE_P(TOPN(1), T_NONE));
|
1702
|
+
VM_ASSERT(!RB_TYPE_P(TOPN(1), T_MOVED));
|
1643
1703
|
if (leaf) ADD_PC(INSN_ATTR(width));
|
1644
1704
|
# undef INSN_ATTR
|
1645
1705
|
|
@@ -1678,7 +1738,7 @@ INSN_ENTRY(reverse)
|
|
1678
1738
|
TOPN(i) = v0;
|
1679
1739
|
}
|
1680
1740
|
}
|
1681
|
-
# line
|
1741
|
+
# line 1742 "vm.inc"
|
1682
1742
|
# undef NAME_OF_CURRENT_INSN
|
1683
1743
|
|
1684
1744
|
/* ### Instruction trailers. ### */
|
@@ -1716,7 +1776,7 @@ INSN_ENTRY(topn)
|
|
1716
1776
|
{
|
1717
1777
|
val = TOPN(n);
|
1718
1778
|
}
|
1719
|
-
# line
|
1779
|
+
# line 1780 "vm.inc"
|
1720
1780
|
# undef NAME_OF_CURRENT_INSN
|
1721
1781
|
|
1722
1782
|
/* ### Instruction trailers. ### */
|
@@ -1724,6 +1784,8 @@ INSN_ENTRY(topn)
|
|
1724
1784
|
CHECK_CANARY();
|
1725
1785
|
INC_SP(INSN_ATTR(sp_inc));
|
1726
1786
|
TOPN(0) = val;
|
1787
|
+
VM_ASSERT(!RB_TYPE_P(TOPN(0), T_NONE));
|
1788
|
+
VM_ASSERT(!RB_TYPE_P(TOPN(0), T_MOVED));
|
1727
1789
|
if (leaf) ADD_PC(INSN_ATTR(width));
|
1728
1790
|
# undef INSN_ATTR
|
1729
1791
|
|
@@ -1756,7 +1818,7 @@ INSN_ENTRY(setn)
|
|
1756
1818
|
{
|
1757
1819
|
TOPN(n) = val;
|
1758
1820
|
}
|
1759
|
-
# line
|
1821
|
+
# line 1822 "vm.inc"
|
1760
1822
|
# undef NAME_OF_CURRENT_INSN
|
1761
1823
|
|
1762
1824
|
/* ### Instruction trailers. ### */
|
@@ -1764,6 +1826,8 @@ INSN_ENTRY(setn)
|
|
1764
1826
|
CHECK_CANARY();
|
1765
1827
|
INC_SP(INSN_ATTR(sp_inc));
|
1766
1828
|
TOPN(0) = val;
|
1829
|
+
VM_ASSERT(!RB_TYPE_P(TOPN(0), T_NONE));
|
1830
|
+
VM_ASSERT(!RB_TYPE_P(TOPN(0), T_MOVED));
|
1767
1831
|
if (leaf) ADD_PC(INSN_ATTR(width));
|
1768
1832
|
# undef INSN_ATTR
|
1769
1833
|
|
@@ -1828,7 +1892,7 @@ INSN_ENTRY(defined)
|
|
1828
1892
|
{
|
1829
1893
|
val = vm_defined(ec, GET_CFP(), op_type, obj, needstr, v);
|
1830
1894
|
}
|
1831
|
-
# line
|
1895
|
+
# line 1896 "vm.inc"
|
1832
1896
|
# undef NAME_OF_CURRENT_INSN
|
1833
1897
|
|
1834
1898
|
/* ### Instruction trailers. ### */
|
@@ -1836,6 +1900,8 @@ INSN_ENTRY(defined)
|
|
1836
1900
|
CHECK_CANARY();
|
1837
1901
|
INC_SP(INSN_ATTR(sp_inc));
|
1838
1902
|
TOPN(0) = val;
|
1903
|
+
VM_ASSERT(!RB_TYPE_P(TOPN(0), T_NONE));
|
1904
|
+
VM_ASSERT(!RB_TYPE_P(TOPN(0), T_MOVED));
|
1839
1905
|
if (leaf) ADD_PC(INSN_ATTR(width));
|
1840
1906
|
# undef INSN_ATTR
|
1841
1907
|
|
@@ -1870,7 +1936,7 @@ INSN_ENTRY(checkmatch)
|
|
1870
1936
|
{
|
1871
1937
|
result = vm_check_match(ec, target, pattern, flag);
|
1872
1938
|
}
|
1873
|
-
# line
|
1939
|
+
# line 1940 "vm.inc"
|
1874
1940
|
# undef NAME_OF_CURRENT_INSN
|
1875
1941
|
|
1876
1942
|
/* ### Instruction trailers. ### */
|
@@ -1878,6 +1944,8 @@ INSN_ENTRY(checkmatch)
|
|
1878
1944
|
CHECK_CANARY();
|
1879
1945
|
INC_SP(INSN_ATTR(sp_inc));
|
1880
1946
|
TOPN(0) = result;
|
1947
|
+
VM_ASSERT(!RB_TYPE_P(TOPN(0), T_NONE));
|
1948
|
+
VM_ASSERT(!RB_TYPE_P(TOPN(0), T_MOVED));
|
1881
1949
|
if (leaf) ADD_PC(INSN_ATTR(width));
|
1882
1950
|
# undef INSN_ATTR
|
1883
1951
|
|
@@ -1912,7 +1980,7 @@ INSN_ENTRY(checkkeyword)
|
|
1912
1980
|
{
|
1913
1981
|
ret = vm_check_keyword(kw_bits_index, keyword_index, GET_EP());
|
1914
1982
|
}
|
1915
|
-
# line
|
1983
|
+
# line 1984 "vm.inc"
|
1916
1984
|
# undef NAME_OF_CURRENT_INSN
|
1917
1985
|
|
1918
1986
|
/* ### Instruction trailers. ### */
|
@@ -1920,6 +1988,8 @@ INSN_ENTRY(checkkeyword)
|
|
1920
1988
|
CHECK_CANARY();
|
1921
1989
|
INC_SP(INSN_ATTR(sp_inc));
|
1922
1990
|
TOPN(0) = ret;
|
1991
|
+
VM_ASSERT(!RB_TYPE_P(TOPN(0), T_NONE));
|
1992
|
+
VM_ASSERT(!RB_TYPE_P(TOPN(0), T_MOVED));
|
1923
1993
|
if (leaf) ADD_PC(INSN_ATTR(width));
|
1924
1994
|
# undef INSN_ATTR
|
1925
1995
|
|
@@ -1953,7 +2023,7 @@ INSN_ENTRY(checktype)
|
|
1953
2023
|
{
|
1954
2024
|
ret = (TYPE(val) == (int)type) ? Qtrue : Qfalse;
|
1955
2025
|
}
|
1956
|
-
# line
|
2026
|
+
# line 2027 "vm.inc"
|
1957
2027
|
# undef NAME_OF_CURRENT_INSN
|
1958
2028
|
|
1959
2029
|
/* ### Instruction trailers. ### */
|
@@ -1961,6 +2031,8 @@ INSN_ENTRY(checktype)
|
|
1961
2031
|
CHECK_CANARY();
|
1962
2032
|
INC_SP(INSN_ATTR(sp_inc));
|
1963
2033
|
TOPN(0) = ret;
|
2034
|
+
VM_ASSERT(!RB_TYPE_P(TOPN(0), T_NONE));
|
2035
|
+
VM_ASSERT(!RB_TYPE_P(TOPN(0), T_MOVED));
|
1964
2036
|
if (leaf) ADD_PC(INSN_ATTR(width));
|
1965
2037
|
# undef INSN_ATTR
|
1966
2038
|
|
@@ -1968,48 +2040,6 @@ INSN_ENTRY(checktype)
|
|
1968
2040
|
END_INSN(checktype);
|
1969
2041
|
}
|
1970
2042
|
|
1971
|
-
/* insn methodref(id)(val)(ret) */
|
1972
|
-
INSN_ENTRY(methodref)
|
1973
|
-
{
|
1974
|
-
/* ### Declare that we have just entered into an instruction. ### */
|
1975
|
-
START_OF_ORIGINAL_INSN(methodref);
|
1976
|
-
DEBUG_ENTER_INSN("methodref");
|
1977
|
-
|
1978
|
-
/* ### Declare and assign variables. ### */
|
1979
|
-
ID id = (ID)GET_OPERAND(1);
|
1980
|
-
# define INSN_ATTR(x) attr_ ## x ## _methodref(id)
|
1981
|
-
bool leaf = INSN_ATTR(leaf);
|
1982
|
-
VALUE val = TOPN(0);
|
1983
|
-
VALUE ret;
|
1984
|
-
|
1985
|
-
/* ### Instruction preambles. ### */
|
1986
|
-
if (! leaf) ADD_PC(INSN_ATTR(width));
|
1987
|
-
SETUP_CANARY();
|
1988
|
-
COLLECT_USAGE_INSN(INSN_ATTR(bin));
|
1989
|
-
COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 0, id);
|
1990
|
-
|
1991
|
-
/* ### Here we do the instruction body. ### */
|
1992
|
-
# define NAME_OF_CURRENT_INSN methodref
|
1993
|
-
# line 728 "insns.def"
|
1994
|
-
{
|
1995
|
-
ret = rb_obj_method(val, ID2SYM(id));
|
1996
|
-
RB_OBJ_FREEZE_RAW(ret);
|
1997
|
-
}
|
1998
|
-
# line 1999 "vm.inc"
|
1999
|
-
# undef NAME_OF_CURRENT_INSN
|
2000
|
-
|
2001
|
-
/* ### Instruction trailers. ### */
|
2002
|
-
CHECK_VM_STACK_OVERFLOW_FOR_INSN(VM_REG_CFP, INSN_ATTR(retn));
|
2003
|
-
CHECK_CANARY();
|
2004
|
-
INC_SP(INSN_ATTR(sp_inc));
|
2005
|
-
TOPN(0) = ret;
|
2006
|
-
if (leaf) ADD_PC(INSN_ATTR(width));
|
2007
|
-
# undef INSN_ATTR
|
2008
|
-
|
2009
|
-
/* ### Leave the instruction. ### */
|
2010
|
-
END_INSN(methodref);
|
2011
|
-
}
|
2012
|
-
|
2013
2043
|
/* insn defineclass(id, class_iseq, flags)(cbase, super)(val) */
|
2014
2044
|
INSN_ENTRY(defineclass)
|
2015
2045
|
{
|
@@ -2038,7 +2068,7 @@ INSN_ENTRY(defineclass)
|
|
2038
2068
|
|
2039
2069
|
/* ### Here we do the instruction body. ### */
|
2040
2070
|
# define NAME_OF_CURRENT_INSN defineclass
|
2041
|
-
# line
|
2071
|
+
# line 734 "insns.def"
|
2042
2072
|
{
|
2043
2073
|
VALUE klass = vm_find_or_create_class_by_id(id, flags, cbase, super);
|
2044
2074
|
|
@@ -2054,7 +2084,7 @@ INSN_ENTRY(defineclass)
|
|
2054
2084
|
RESTORE_REGS();
|
2055
2085
|
NEXT_INSN();
|
2056
2086
|
}
|
2057
|
-
# line
|
2087
|
+
# line 2088 "vm.inc"
|
2058
2088
|
# undef NAME_OF_CURRENT_INSN
|
2059
2089
|
|
2060
2090
|
/* ### Instruction trailers. ### */
|
@@ -2091,11 +2121,11 @@ INSN_ENTRY(definemethod)
|
|
2091
2121
|
|
2092
2122
|
/* ### Here we do the instruction body. ### */
|
2093
2123
|
# define NAME_OF_CURRENT_INSN definemethod
|
2094
|
-
# line
|
2124
|
+
# line 755 "insns.def"
|
2095
2125
|
{
|
2096
2126
|
vm_define_method(ec, Qnil, id, (VALUE)iseq, FALSE);
|
2097
2127
|
}
|
2098
|
-
# line
|
2128
|
+
# line 2129 "vm.inc"
|
2099
2129
|
# undef NAME_OF_CURRENT_INSN
|
2100
2130
|
|
2101
2131
|
/* ### Instruction trailers. ### */
|
@@ -2132,11 +2162,11 @@ INSN_ENTRY(definesmethod)
|
|
2132
2162
|
|
2133
2163
|
/* ### Here we do the instruction body. ### */
|
2134
2164
|
# define NAME_OF_CURRENT_INSN definesmethod
|
2135
|
-
# line
|
2165
|
+
# line 764 "insns.def"
|
2136
2166
|
{
|
2137
2167
|
vm_define_method(ec, obj, id, (VALUE)iseq, TRUE);
|
2138
2168
|
}
|
2139
|
-
# line
|
2169
|
+
# line 2170 "vm.inc"
|
2140
2170
|
# undef NAME_OF_CURRENT_INSN
|
2141
2171
|
|
2142
2172
|
/* ### Instruction trailers. ### */
|
@@ -2149,7 +2179,7 @@ INSN_ENTRY(definesmethod)
|
|
2149
2179
|
END_INSN(definesmethod);
|
2150
2180
|
}
|
2151
2181
|
|
2152
|
-
/* insn send(
|
2182
|
+
/* insn send(cd, blockiseq)(...)(val) */
|
2153
2183
|
INSN_ENTRY(send)
|
2154
2184
|
{
|
2155
2185
|
/* ### Declare that we have just entered into an instruction. ### */
|
@@ -2157,10 +2187,9 @@ INSN_ENTRY(send)
|
|
2157
2187
|
DEBUG_ENTER_INSN("send");
|
2158
2188
|
|
2159
2189
|
/* ### Declare and assign variables. ### */
|
2160
|
-
|
2161
|
-
|
2162
|
-
|
2163
|
-
# define INSN_ATTR(x) attr_ ## x ## _send(ci, cc, blockiseq)
|
2190
|
+
CALL_DATA cd = (CALL_DATA)GET_OPERAND(1);
|
2191
|
+
ISEQ blockiseq = (ISEQ)GET_OPERAND(2);
|
2192
|
+
# define INSN_ATTR(x) attr_ ## x ## _send(cd, blockiseq)
|
2164
2193
|
bool leaf = INSN_ATTR(leaf);
|
2165
2194
|
VALUE val;
|
2166
2195
|
|
@@ -2169,23 +2198,22 @@ INSN_ENTRY(send)
|
|
2169
2198
|
POPN(INSN_ATTR(popn));
|
2170
2199
|
SETUP_CANARY();
|
2171
2200
|
COLLECT_USAGE_INSN(INSN_ATTR(bin));
|
2172
|
-
COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 0,
|
2173
|
-
COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 1,
|
2174
|
-
COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 2, blockiseq);
|
2201
|
+
COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 0, cd);
|
2202
|
+
COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 1, blockiseq);
|
2175
2203
|
|
2176
2204
|
/* ### Here we do the instruction body. ### */
|
2177
2205
|
# define NAME_OF_CURRENT_INSN send
|
2178
|
-
# line
|
2206
|
+
# line 780 "insns.def"
|
2179
2207
|
{
|
2180
|
-
VALUE bh = vm_caller_setup_arg_block(ec, GET_CFP(), ci, blockiseq, false);
|
2181
|
-
val = vm_sendish(ec, GET_CFP(),
|
2208
|
+
VALUE bh = vm_caller_setup_arg_block(ec, GET_CFP(), &cd->ci, blockiseq, false);
|
2209
|
+
val = vm_sendish(ec, GET_CFP(), cd, bh, vm_search_method_wrap);
|
2182
2210
|
|
2183
2211
|
if (val == Qundef) {
|
2184
2212
|
RESTORE_REGS();
|
2185
2213
|
NEXT_INSN();
|
2186
2214
|
}
|
2187
2215
|
}
|
2188
|
-
# line
|
2216
|
+
# line 2217 "vm.inc"
|
2189
2217
|
# undef NAME_OF_CURRENT_INSN
|
2190
2218
|
|
2191
2219
|
/* ### Instruction trailers. ### */
|
@@ -2199,7 +2227,7 @@ INSN_ENTRY(send)
|
|
2199
2227
|
END_INSN(send);
|
2200
2228
|
}
|
2201
2229
|
|
2202
|
-
/* insn opt_send_without_block(
|
2230
|
+
/* insn opt_send_without_block(cd)(...)(val) */
|
2203
2231
|
INSN_ENTRY(opt_send_without_block)
|
2204
2232
|
{
|
2205
2233
|
/* ### Declare that we have just entered into an instruction. ### */
|
@@ -2207,9 +2235,8 @@ INSN_ENTRY(opt_send_without_block)
|
|
2207
2235
|
DEBUG_ENTER_INSN("opt_send_without_block");
|
2208
2236
|
|
2209
2237
|
/* ### Declare and assign variables. ### */
|
2210
|
-
|
2211
|
-
|
2212
|
-
# define INSN_ATTR(x) attr_ ## x ## _opt_send_without_block(ci, cc)
|
2238
|
+
CALL_DATA cd = (CALL_DATA)GET_OPERAND(1);
|
2239
|
+
# define INSN_ATTR(x) attr_ ## x ## _opt_send_without_block(cd)
|
2213
2240
|
bool leaf = INSN_ATTR(leaf);
|
2214
2241
|
VALUE val;
|
2215
2242
|
|
@@ -2218,22 +2245,21 @@ INSN_ENTRY(opt_send_without_block)
|
|
2218
2245
|
POPN(INSN_ATTR(popn));
|
2219
2246
|
SETUP_CANARY();
|
2220
2247
|
COLLECT_USAGE_INSN(INSN_ATTR(bin));
|
2221
|
-
COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 0,
|
2222
|
-
COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 1, cc);
|
2248
|
+
COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 0, cd);
|
2223
2249
|
|
2224
2250
|
/* ### Here we do the instruction body. ### */
|
2225
2251
|
# define NAME_OF_CURRENT_INSN opt_send_without_block
|
2226
|
-
# line
|
2252
|
+
# line 799 "insns.def"
|
2227
2253
|
{
|
2228
2254
|
VALUE bh = VM_BLOCK_HANDLER_NONE;
|
2229
|
-
val = vm_sendish(ec, GET_CFP(),
|
2255
|
+
val = vm_sendish(ec, GET_CFP(), cd, bh, vm_search_method_wrap);
|
2230
2256
|
|
2231
2257
|
if (val == Qundef) {
|
2232
2258
|
RESTORE_REGS();
|
2233
2259
|
NEXT_INSN();
|
2234
2260
|
}
|
2235
2261
|
}
|
2236
|
-
# line
|
2262
|
+
# line 2263 "vm.inc"
|
2237
2263
|
# undef NAME_OF_CURRENT_INSN
|
2238
2264
|
|
2239
2265
|
/* ### Instruction trailers. ### */
|
@@ -2247,7 +2273,7 @@ INSN_ENTRY(opt_send_without_block)
|
|
2247
2273
|
END_INSN(opt_send_without_block);
|
2248
2274
|
}
|
2249
2275
|
|
2250
|
-
/* insn opt_str_freeze(str,
|
2276
|
+
/* insn opt_str_freeze(str, cd)()(val) */
|
2251
2277
|
INSN_ENTRY(opt_str_freeze)
|
2252
2278
|
{
|
2253
2279
|
/* ### Declare that we have just entered into an instruction. ### */
|
@@ -2256,9 +2282,8 @@ INSN_ENTRY(opt_str_freeze)
|
|
2256
2282
|
|
2257
2283
|
/* ### Declare and assign variables. ### */
|
2258
2284
|
VALUE str = (VALUE)GET_OPERAND(1);
|
2259
|
-
|
2260
|
-
|
2261
|
-
# define INSN_ATTR(x) attr_ ## x ## _opt_str_freeze(str, ci, cc)
|
2285
|
+
CALL_DATA cd = (CALL_DATA)GET_OPERAND(2);
|
2286
|
+
# define INSN_ATTR(x) attr_ ## x ## _opt_str_freeze(str, cd)
|
2262
2287
|
bool leaf = INSN_ATTR(leaf);
|
2263
2288
|
VALUE val;
|
2264
2289
|
|
@@ -2267,12 +2292,11 @@ INSN_ENTRY(opt_str_freeze)
|
|
2267
2292
|
SETUP_CANARY();
|
2268
2293
|
COLLECT_USAGE_INSN(INSN_ATTR(bin));
|
2269
2294
|
COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 0, str);
|
2270
|
-
COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 1,
|
2271
|
-
COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 2, cc);
|
2295
|
+
COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 1, cd);
|
2272
2296
|
|
2273
2297
|
/* ### Here we do the instruction body. ### */
|
2274
2298
|
# define NAME_OF_CURRENT_INSN opt_str_freeze
|
2275
|
-
# line
|
2299
|
+
# line 814 "insns.def"
|
2276
2300
|
{
|
2277
2301
|
val = vm_opt_str_freeze(str, BOP_FREEZE, idFreeze);
|
2278
2302
|
|
@@ -2281,7 +2305,7 @@ INSN_ENTRY(opt_str_freeze)
|
|
2281
2305
|
CALL_SIMPLE_METHOD();
|
2282
2306
|
}
|
2283
2307
|
}
|
2284
|
-
# line
|
2308
|
+
# line 2309 "vm.inc"
|
2285
2309
|
# undef NAME_OF_CURRENT_INSN
|
2286
2310
|
|
2287
2311
|
/* ### Instruction trailers. ### */
|
@@ -2289,6 +2313,8 @@ INSN_ENTRY(opt_str_freeze)
|
|
2289
2313
|
CHECK_CANARY();
|
2290
2314
|
INC_SP(INSN_ATTR(sp_inc));
|
2291
2315
|
TOPN(0) = val;
|
2316
|
+
VM_ASSERT(!RB_TYPE_P(TOPN(0), T_NONE));
|
2317
|
+
VM_ASSERT(!RB_TYPE_P(TOPN(0), T_MOVED));
|
2292
2318
|
if (leaf) ADD_PC(INSN_ATTR(width));
|
2293
2319
|
# undef INSN_ATTR
|
2294
2320
|
|
@@ -2296,7 +2322,7 @@ INSN_ENTRY(opt_str_freeze)
|
|
2296
2322
|
END_INSN(opt_str_freeze);
|
2297
2323
|
}
|
2298
2324
|
|
2299
|
-
/* insn opt_nil_p(
|
2325
|
+
/* insn opt_nil_p(cd)(recv)(val) */
|
2300
2326
|
INSN_ENTRY(opt_nil_p)
|
2301
2327
|
{
|
2302
2328
|
/* ### Declare that we have just entered into an instruction. ### */
|
@@ -2304,9 +2330,8 @@ INSN_ENTRY(opt_nil_p)
|
|
2304
2330
|
DEBUG_ENTER_INSN("opt_nil_p");
|
2305
2331
|
|
2306
2332
|
/* ### Declare and assign variables. ### */
|
2307
|
-
|
2308
|
-
|
2309
|
-
# define INSN_ATTR(x) attr_ ## x ## _opt_nil_p(ci, cc)
|
2333
|
+
CALL_DATA cd = (CALL_DATA)GET_OPERAND(1);
|
2334
|
+
# define INSN_ATTR(x) attr_ ## x ## _opt_nil_p(cd)
|
2310
2335
|
bool leaf = INSN_ATTR(leaf);
|
2311
2336
|
VALUE recv = TOPN(0);
|
2312
2337
|
VALUE val;
|
@@ -2315,20 +2340,19 @@ INSN_ENTRY(opt_nil_p)
|
|
2315
2340
|
if (! leaf) ADD_PC(INSN_ATTR(width));
|
2316
2341
|
SETUP_CANARY();
|
2317
2342
|
COLLECT_USAGE_INSN(INSN_ATTR(bin));
|
2318
|
-
COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 0,
|
2319
|
-
COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 1, cc);
|
2343
|
+
COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 0, cd);
|
2320
2344
|
|
2321
2345
|
/* ### Here we do the instruction body. ### */
|
2322
2346
|
# define NAME_OF_CURRENT_INSN opt_nil_p
|
2323
|
-
# line
|
2347
|
+
# line 829 "insns.def"
|
2324
2348
|
{
|
2325
|
-
val = vm_opt_nil_p(
|
2349
|
+
val = vm_opt_nil_p(cd, recv);
|
2326
2350
|
|
2327
2351
|
if (val == Qundef) {
|
2328
2352
|
CALL_SIMPLE_METHOD();
|
2329
2353
|
}
|
2330
2354
|
}
|
2331
|
-
# line
|
2355
|
+
# line 2356 "vm.inc"
|
2332
2356
|
# undef NAME_OF_CURRENT_INSN
|
2333
2357
|
|
2334
2358
|
/* ### Instruction trailers. ### */
|
@@ -2336,6 +2360,8 @@ INSN_ENTRY(opt_nil_p)
|
|
2336
2360
|
CHECK_CANARY();
|
2337
2361
|
INC_SP(INSN_ATTR(sp_inc));
|
2338
2362
|
TOPN(0) = val;
|
2363
|
+
VM_ASSERT(!RB_TYPE_P(TOPN(0), T_NONE));
|
2364
|
+
VM_ASSERT(!RB_TYPE_P(TOPN(0), T_MOVED));
|
2339
2365
|
if (leaf) ADD_PC(INSN_ATTR(width));
|
2340
2366
|
# undef INSN_ATTR
|
2341
2367
|
|
@@ -2343,7 +2369,7 @@ INSN_ENTRY(opt_nil_p)
|
|
2343
2369
|
END_INSN(opt_nil_p);
|
2344
2370
|
}
|
2345
2371
|
|
2346
|
-
/* insn opt_str_uminus(str,
|
2372
|
+
/* insn opt_str_uminus(str, cd)()(val) */
|
2347
2373
|
INSN_ENTRY(opt_str_uminus)
|
2348
2374
|
{
|
2349
2375
|
/* ### Declare that we have just entered into an instruction. ### */
|
@@ -2352,9 +2378,8 @@ INSN_ENTRY(opt_str_uminus)
|
|
2352
2378
|
|
2353
2379
|
/* ### Declare and assign variables. ### */
|
2354
2380
|
VALUE str = (VALUE)GET_OPERAND(1);
|
2355
|
-
|
2356
|
-
|
2357
|
-
# define INSN_ATTR(x) attr_ ## x ## _opt_str_uminus(str, ci, cc)
|
2381
|
+
CALL_DATA cd = (CALL_DATA)GET_OPERAND(2);
|
2382
|
+
# define INSN_ATTR(x) attr_ ## x ## _opt_str_uminus(str, cd)
|
2358
2383
|
bool leaf = INSN_ATTR(leaf);
|
2359
2384
|
VALUE val;
|
2360
2385
|
|
@@ -2363,12 +2388,11 @@ INSN_ENTRY(opt_str_uminus)
|
|
2363
2388
|
SETUP_CANARY();
|
2364
2389
|
COLLECT_USAGE_INSN(INSN_ATTR(bin));
|
2365
2390
|
COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 0, str);
|
2366
|
-
COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 1,
|
2367
|
-
COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 2, cc);
|
2391
|
+
COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 1, cd);
|
2368
2392
|
|
2369
2393
|
/* ### Here we do the instruction body. ### */
|
2370
2394
|
# define NAME_OF_CURRENT_INSN opt_str_uminus
|
2371
|
-
# line
|
2395
|
+
# line 842 "insns.def"
|
2372
2396
|
{
|
2373
2397
|
val = vm_opt_str_freeze(str, BOP_UMINUS, idUMinus);
|
2374
2398
|
|
@@ -2377,7 +2401,7 @@ INSN_ENTRY(opt_str_uminus)
|
|
2377
2401
|
CALL_SIMPLE_METHOD();
|
2378
2402
|
}
|
2379
2403
|
}
|
2380
|
-
# line
|
2404
|
+
# line 2405 "vm.inc"
|
2381
2405
|
# undef NAME_OF_CURRENT_INSN
|
2382
2406
|
|
2383
2407
|
/* ### Instruction trailers. ### */
|
@@ -2385,6 +2409,8 @@ INSN_ENTRY(opt_str_uminus)
|
|
2385
2409
|
CHECK_CANARY();
|
2386
2410
|
INC_SP(INSN_ATTR(sp_inc));
|
2387
2411
|
TOPN(0) = val;
|
2412
|
+
VM_ASSERT(!RB_TYPE_P(TOPN(0), T_NONE));
|
2413
|
+
VM_ASSERT(!RB_TYPE_P(TOPN(0), T_MOVED));
|
2388
2414
|
if (leaf) ADD_PC(INSN_ATTR(width));
|
2389
2415
|
# undef INSN_ATTR
|
2390
2416
|
|
@@ -2413,11 +2439,11 @@ INSN_ENTRY(opt_newarray_max)
|
|
2413
2439
|
|
2414
2440
|
/* ### Here we do the instruction body. ### */
|
2415
2441
|
# define NAME_OF_CURRENT_INSN opt_newarray_max
|
2416
|
-
# line
|
2442
|
+
# line 862 "insns.def"
|
2417
2443
|
{
|
2418
2444
|
val = vm_opt_newarray_max(num, STACK_ADDR_FROM_TOP(num));
|
2419
2445
|
}
|
2420
|
-
# line
|
2446
|
+
# line 2447 "vm.inc"
|
2421
2447
|
# undef NAME_OF_CURRENT_INSN
|
2422
2448
|
|
2423
2449
|
/* ### Instruction trailers. ### */
|
@@ -2425,6 +2451,8 @@ INSN_ENTRY(opt_newarray_max)
|
|
2425
2451
|
CHECK_CANARY();
|
2426
2452
|
INC_SP(INSN_ATTR(sp_inc));
|
2427
2453
|
TOPN(0) = val;
|
2454
|
+
VM_ASSERT(!RB_TYPE_P(TOPN(0), T_NONE));
|
2455
|
+
VM_ASSERT(!RB_TYPE_P(TOPN(0), T_MOVED));
|
2428
2456
|
if (leaf) ADD_PC(INSN_ATTR(width));
|
2429
2457
|
# undef INSN_ATTR
|
2430
2458
|
|
@@ -2453,11 +2481,11 @@ INSN_ENTRY(opt_newarray_min)
|
|
2453
2481
|
|
2454
2482
|
/* ### Here we do the instruction body. ### */
|
2455
2483
|
# define NAME_OF_CURRENT_INSN opt_newarray_min
|
2456
|
-
# line
|
2484
|
+
# line 874 "insns.def"
|
2457
2485
|
{
|
2458
2486
|
val = vm_opt_newarray_min(num, STACK_ADDR_FROM_TOP(num));
|
2459
2487
|
}
|
2460
|
-
# line
|
2488
|
+
# line 2489 "vm.inc"
|
2461
2489
|
# undef NAME_OF_CURRENT_INSN
|
2462
2490
|
|
2463
2491
|
/* ### Instruction trailers. ### */
|
@@ -2465,6 +2493,8 @@ INSN_ENTRY(opt_newarray_min)
|
|
2465
2493
|
CHECK_CANARY();
|
2466
2494
|
INC_SP(INSN_ATTR(sp_inc));
|
2467
2495
|
TOPN(0) = val;
|
2496
|
+
VM_ASSERT(!RB_TYPE_P(TOPN(0), T_NONE));
|
2497
|
+
VM_ASSERT(!RB_TYPE_P(TOPN(0), T_MOVED));
|
2468
2498
|
if (leaf) ADD_PC(INSN_ATTR(width));
|
2469
2499
|
# undef INSN_ATTR
|
2470
2500
|
|
@@ -2472,7 +2502,7 @@ INSN_ENTRY(opt_newarray_min)
|
|
2472
2502
|
END_INSN(opt_newarray_min);
|
2473
2503
|
}
|
2474
2504
|
|
2475
|
-
/* insn invokesuper(
|
2505
|
+
/* insn invokesuper(cd, blockiseq)(...)(val) */
|
2476
2506
|
INSN_ENTRY(invokesuper)
|
2477
2507
|
{
|
2478
2508
|
/* ### Declare that we have just entered into an instruction. ### */
|
@@ -2480,10 +2510,9 @@ INSN_ENTRY(invokesuper)
|
|
2480
2510
|
DEBUG_ENTER_INSN("invokesuper");
|
2481
2511
|
|
2482
2512
|
/* ### Declare and assign variables. ### */
|
2483
|
-
|
2484
|
-
|
2485
|
-
|
2486
|
-
# define INSN_ATTR(x) attr_ ## x ## _invokesuper(ci, cc, blockiseq)
|
2513
|
+
CALL_DATA cd = (CALL_DATA)GET_OPERAND(1);
|
2514
|
+
ISEQ blockiseq = (ISEQ)GET_OPERAND(2);
|
2515
|
+
# define INSN_ATTR(x) attr_ ## x ## _invokesuper(cd, blockiseq)
|
2487
2516
|
bool leaf = INSN_ATTR(leaf);
|
2488
2517
|
VALUE val;
|
2489
2518
|
|
@@ -2492,23 +2521,22 @@ INSN_ENTRY(invokesuper)
|
|
2492
2521
|
POPN(INSN_ATTR(popn));
|
2493
2522
|
SETUP_CANARY();
|
2494
2523
|
COLLECT_USAGE_INSN(INSN_ATTR(bin));
|
2495
|
-
COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 0,
|
2496
|
-
COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 1,
|
2497
|
-
COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 2, blockiseq);
|
2524
|
+
COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 0, cd);
|
2525
|
+
COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 1, blockiseq);
|
2498
2526
|
|
2499
2527
|
/* ### Here we do the instruction body. ### */
|
2500
2528
|
# define NAME_OF_CURRENT_INSN invokesuper
|
2501
|
-
# line
|
2529
|
+
# line 886 "insns.def"
|
2502
2530
|
{
|
2503
|
-
VALUE bh = vm_caller_setup_arg_block(ec, GET_CFP(), ci, blockiseq, true);
|
2504
|
-
val = vm_sendish(ec, GET_CFP(),
|
2531
|
+
VALUE bh = vm_caller_setup_arg_block(ec, GET_CFP(), &cd->ci, blockiseq, true);
|
2532
|
+
val = vm_sendish(ec, GET_CFP(), cd, bh, vm_search_super_method);
|
2505
2533
|
|
2506
2534
|
if (val == Qundef) {
|
2507
2535
|
RESTORE_REGS();
|
2508
2536
|
NEXT_INSN();
|
2509
2537
|
}
|
2510
2538
|
}
|
2511
|
-
# line
|
2539
|
+
# line 2540 "vm.inc"
|
2512
2540
|
# undef NAME_OF_CURRENT_INSN
|
2513
2541
|
|
2514
2542
|
/* ### Instruction trailers. ### */
|
@@ -2522,7 +2550,7 @@ INSN_ENTRY(invokesuper)
|
|
2522
2550
|
END_INSN(invokesuper);
|
2523
2551
|
}
|
2524
2552
|
|
2525
|
-
/* insn invokeblock(
|
2553
|
+
/* insn invokeblock(cd)(...)(val) */
|
2526
2554
|
INSN_ENTRY(invokeblock)
|
2527
2555
|
{
|
2528
2556
|
/* ### Declare that we have just entered into an instruction. ### */
|
@@ -2530,8 +2558,8 @@ INSN_ENTRY(invokeblock)
|
|
2530
2558
|
DEBUG_ENTER_INSN("invokeblock");
|
2531
2559
|
|
2532
2560
|
/* ### Declare and assign variables. ### */
|
2533
|
-
|
2534
|
-
# define INSN_ATTR(x) attr_ ## x ## _invokeblock(
|
2561
|
+
CALL_DATA cd = (CALL_DATA)GET_OPERAND(1);
|
2562
|
+
# define INSN_ATTR(x) attr_ ## x ## _invokeblock(cd)
|
2535
2563
|
bool leaf = INSN_ATTR(leaf);
|
2536
2564
|
VALUE val;
|
2537
2565
|
|
@@ -2540,25 +2568,25 @@ INSN_ENTRY(invokeblock)
|
|
2540
2568
|
POPN(INSN_ATTR(popn));
|
2541
2569
|
SETUP_CANARY();
|
2542
2570
|
COLLECT_USAGE_INSN(INSN_ATTR(bin));
|
2543
|
-
COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 0,
|
2571
|
+
COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 0, cd);
|
2544
2572
|
|
2545
2573
|
/* ### Here we do the instruction body. ### */
|
2546
2574
|
# define NAME_OF_CURRENT_INSN invokeblock
|
2547
|
-
# line
|
2575
|
+
# line 905 "insns.def"
|
2548
2576
|
{
|
2549
|
-
|
2550
|
-
|
2551
|
-
}
|
2577
|
+
if (UNLIKELY(cd->cc.call != vm_invokeblock_i)) {
|
2578
|
+
cd->cc.call = vm_invokeblock_i; // check before setting to avoid CoW
|
2579
|
+
}
|
2552
2580
|
|
2553
2581
|
VALUE bh = VM_BLOCK_HANDLER_NONE;
|
2554
|
-
val = vm_sendish(ec, GET_CFP(),
|
2582
|
+
val = vm_sendish(ec, GET_CFP(), cd, bh, vm_search_invokeblock);
|
2555
2583
|
|
2556
2584
|
if (val == Qundef) {
|
2557
2585
|
RESTORE_REGS();
|
2558
2586
|
NEXT_INSN();
|
2559
2587
|
}
|
2560
2588
|
}
|
2561
|
-
# line
|
2589
|
+
# line 2590 "vm.inc"
|
2562
2590
|
# undef NAME_OF_CURRENT_INSN
|
2563
2591
|
|
2564
2592
|
/* ### Instruction trailers. ### */
|
@@ -2592,7 +2620,7 @@ INSN_ENTRY(leave)
|
|
2592
2620
|
|
2593
2621
|
/* ### Here we do the instruction body. ### */
|
2594
2622
|
# define NAME_OF_CURRENT_INSN leave
|
2595
|
-
# line
|
2623
|
+
# line 930 "insns.def"
|
2596
2624
|
{
|
2597
2625
|
if (OPT_CHECKED_RUN) {
|
2598
2626
|
const VALUE *const bp = vm_base_ptr(GET_CFP());
|
@@ -2601,8 +2629,6 @@ INSN_ENTRY(leave)
|
|
2601
2629
|
}
|
2602
2630
|
}
|
2603
2631
|
|
2604
|
-
RUBY_VM_CHECK_INTS(ec);
|
2605
|
-
|
2606
2632
|
if (vm_pop_frame(ec, GET_CFP(), GET_EP())) {
|
2607
2633
|
# if OPT_CALL_THREADED_CODE
|
2608
2634
|
rb_ec_thread_ptr(ec)->retval = val;
|
@@ -2615,7 +2641,7 @@ INSN_ENTRY(leave)
|
|
2615
2641
|
RESTORE_REGS();
|
2616
2642
|
}
|
2617
2643
|
}
|
2618
|
-
# line
|
2644
|
+
# line 2645 "vm.inc"
|
2619
2645
|
# undef NAME_OF_CURRENT_INSN
|
2620
2646
|
|
2621
2647
|
/* ### Instruction trailers. ### */
|
@@ -2651,14 +2677,13 @@ INSN_ENTRY(throw)
|
|
2651
2677
|
|
2652
2678
|
/* ### Here we do the instruction body. ### */
|
2653
2679
|
# define NAME_OF_CURRENT_INSN throw
|
2654
|
-
# line
|
2680
|
+
# line 963 "insns.def"
|
2655
2681
|
{
|
2656
|
-
RUBY_VM_CHECK_INTS(ec);
|
2657
2682
|
val = vm_throw(ec, GET_CFP(), throw_state, throwobj);
|
2658
2683
|
THROW_EXCEPTION(val);
|
2659
2684
|
/* unreachable */
|
2660
2685
|
}
|
2661
|
-
# line
|
2686
|
+
# line 2687 "vm.inc"
|
2662
2687
|
# undef NAME_OF_CURRENT_INSN
|
2663
2688
|
|
2664
2689
|
/* ### Instruction trailers. ### */
|
@@ -2666,6 +2691,8 @@ INSN_ENTRY(throw)
|
|
2666
2691
|
CHECK_CANARY();
|
2667
2692
|
INC_SP(INSN_ATTR(sp_inc));
|
2668
2693
|
TOPN(0) = val;
|
2694
|
+
VM_ASSERT(!RB_TYPE_P(TOPN(0), T_NONE));
|
2695
|
+
VM_ASSERT(!RB_TYPE_P(TOPN(0), T_MOVED));
|
2669
2696
|
if (leaf) ADD_PC(INSN_ATTR(width));
|
2670
2697
|
# undef INSN_ATTR
|
2671
2698
|
|
@@ -2693,12 +2720,12 @@ INSN_ENTRY(jump)
|
|
2693
2720
|
|
2694
2721
|
/* ### Here we do the instruction body. ### */
|
2695
2722
|
# define NAME_OF_CURRENT_INSN jump
|
2696
|
-
# line
|
2723
|
+
# line 981 "insns.def"
|
2697
2724
|
{
|
2698
2725
|
RUBY_VM_CHECK_INTS(ec);
|
2699
2726
|
JUMP(dst);
|
2700
2727
|
}
|
2701
|
-
# line
|
2728
|
+
# line 2729 "vm.inc"
|
2702
2729
|
# undef NAME_OF_CURRENT_INSN
|
2703
2730
|
|
2704
2731
|
/* ### Instruction trailers. ### */
|
@@ -2733,14 +2760,14 @@ INSN_ENTRY(branchif)
|
|
2733
2760
|
|
2734
2761
|
/* ### Here we do the instruction body. ### */
|
2735
2762
|
# define NAME_OF_CURRENT_INSN branchif
|
2736
|
-
# line
|
2763
|
+
# line 994 "insns.def"
|
2737
2764
|
{
|
2738
2765
|
if (RTEST(val)) {
|
2739
2766
|
RUBY_VM_CHECK_INTS(ec);
|
2740
2767
|
JUMP(dst);
|
2741
2768
|
}
|
2742
2769
|
}
|
2743
|
-
# line
|
2770
|
+
# line 2771 "vm.inc"
|
2744
2771
|
# undef NAME_OF_CURRENT_INSN
|
2745
2772
|
|
2746
2773
|
/* ### Instruction trailers. ### */
|
@@ -2775,14 +2802,14 @@ INSN_ENTRY(branchunless)
|
|
2775
2802
|
|
2776
2803
|
/* ### Here we do the instruction body. ### */
|
2777
2804
|
# define NAME_OF_CURRENT_INSN branchunless
|
2778
|
-
# line
|
2805
|
+
# line 1009 "insns.def"
|
2779
2806
|
{
|
2780
2807
|
if (!RTEST(val)) {
|
2781
2808
|
RUBY_VM_CHECK_INTS(ec);
|
2782
2809
|
JUMP(dst);
|
2783
2810
|
}
|
2784
2811
|
}
|
2785
|
-
# line
|
2812
|
+
# line 2813 "vm.inc"
|
2786
2813
|
# undef NAME_OF_CURRENT_INSN
|
2787
2814
|
|
2788
2815
|
/* ### Instruction trailers. ### */
|
@@ -2817,14 +2844,14 @@ INSN_ENTRY(branchnil)
|
|
2817
2844
|
|
2818
2845
|
/* ### Here we do the instruction body. ### */
|
2819
2846
|
# define NAME_OF_CURRENT_INSN branchnil
|
2820
|
-
# line
|
2847
|
+
# line 1024 "insns.def"
|
2821
2848
|
{
|
2822
2849
|
if (NIL_P(val)) {
|
2823
2850
|
RUBY_VM_CHECK_INTS(ec);
|
2824
2851
|
JUMP(dst);
|
2825
2852
|
}
|
2826
2853
|
}
|
2827
|
-
# line
|
2854
|
+
# line 2855 "vm.inc"
|
2828
2855
|
# undef NAME_OF_CURRENT_INSN
|
2829
2856
|
|
2830
2857
|
/* ### Instruction trailers. ### */
|
@@ -2861,17 +2888,17 @@ INSN_ENTRY(opt_getinlinecache)
|
|
2861
2888
|
|
2862
2889
|
/* ### Here we do the instruction body. ### */
|
2863
2890
|
# define NAME_OF_CURRENT_INSN opt_getinlinecache
|
2864
|
-
# line
|
2891
|
+
# line 1041 "insns.def"
|
2865
2892
|
{
|
2866
2893
|
if (vm_ic_hit_p(ic, GET_EP())) {
|
2867
|
-
val = ic->
|
2894
|
+
val = ic->value;
|
2868
2895
|
JUMP(dst);
|
2869
2896
|
}
|
2870
2897
|
else {
|
2871
2898
|
val = Qnil;
|
2872
2899
|
}
|
2873
2900
|
}
|
2874
|
-
# line
|
2901
|
+
# line 2902 "vm.inc"
|
2875
2902
|
# undef NAME_OF_CURRENT_INSN
|
2876
2903
|
|
2877
2904
|
/* ### Instruction trailers. ### */
|
@@ -2879,6 +2906,8 @@ INSN_ENTRY(opt_getinlinecache)
|
|
2879
2906
|
CHECK_CANARY();
|
2880
2907
|
INC_SP(INSN_ATTR(sp_inc));
|
2881
2908
|
TOPN(0) = val;
|
2909
|
+
VM_ASSERT(!RB_TYPE_P(TOPN(0), T_NONE));
|
2910
|
+
VM_ASSERT(!RB_TYPE_P(TOPN(0), T_MOVED));
|
2882
2911
|
if (leaf) ADD_PC(INSN_ATTR(width));
|
2883
2912
|
# undef INSN_ATTR
|
2884
2913
|
|
@@ -2907,11 +2936,11 @@ INSN_ENTRY(opt_setinlinecache)
|
|
2907
2936
|
|
2908
2937
|
/* ### Here we do the instruction body. ### */
|
2909
2938
|
# define NAME_OF_CURRENT_INSN opt_setinlinecache
|
2910
|
-
# line
|
2939
|
+
# line 1057 "insns.def"
|
2911
2940
|
{
|
2912
2941
|
vm_ic_update(ic, val, GET_EP());
|
2913
2942
|
}
|
2914
|
-
# line
|
2943
|
+
# line 2944 "vm.inc"
|
2915
2944
|
# undef NAME_OF_CURRENT_INSN
|
2916
2945
|
|
2917
2946
|
/* ### Instruction trailers. ### */
|
@@ -2919,6 +2948,8 @@ INSN_ENTRY(opt_setinlinecache)
|
|
2919
2948
|
CHECK_CANARY();
|
2920
2949
|
INC_SP(INSN_ATTR(sp_inc));
|
2921
2950
|
TOPN(0) = val;
|
2951
|
+
VM_ASSERT(!RB_TYPE_P(TOPN(0), T_NONE));
|
2952
|
+
VM_ASSERT(!RB_TYPE_P(TOPN(0), T_MOVED));
|
2922
2953
|
if (leaf) ADD_PC(INSN_ATTR(width));
|
2923
2954
|
# undef INSN_ATTR
|
2924
2955
|
|
@@ -2950,11 +2981,11 @@ INSN_ENTRY(once)
|
|
2950
2981
|
|
2951
2982
|
/* ### Here we do the instruction body. ### */
|
2952
2983
|
# define NAME_OF_CURRENT_INSN once
|
2953
|
-
# line
|
2984
|
+
# line 1067 "insns.def"
|
2954
2985
|
{
|
2955
2986
|
val = vm_once_dispatch(ec, iseq, ise);
|
2956
2987
|
}
|
2957
|
-
# line
|
2988
|
+
# line 2989 "vm.inc"
|
2958
2989
|
# undef NAME_OF_CURRENT_INSN
|
2959
2990
|
|
2960
2991
|
/* ### Instruction trailers. ### */
|
@@ -2991,7 +3022,7 @@ INSN_ENTRY(opt_case_dispatch)
|
|
2991
3022
|
|
2992
3023
|
/* ### Here we do the instruction body. ### */
|
2993
3024
|
# define NAME_OF_CURRENT_INSN opt_case_dispatch
|
2994
|
-
# line
|
3025
|
+
# line 1078 "insns.def"
|
2995
3026
|
{
|
2996
3027
|
OFFSET dst = vm_case_dispatch(hash, else_offset, key);
|
2997
3028
|
|
@@ -2999,7 +3030,7 @@ INSN_ENTRY(opt_case_dispatch)
|
|
2999
3030
|
JUMP(dst);
|
3000
3031
|
}
|
3001
3032
|
}
|
3002
|
-
# line
|
3033
|
+
# line 3034 "vm.inc"
|
3003
3034
|
# undef NAME_OF_CURRENT_INSN
|
3004
3035
|
|
3005
3036
|
/* ### Instruction trailers. ### */
|
@@ -3013,7 +3044,7 @@ INSN_ENTRY(opt_case_dispatch)
|
|
3013
3044
|
END_INSN(opt_case_dispatch);
|
3014
3045
|
}
|
3015
3046
|
|
3016
|
-
/* insn opt_plus(
|
3047
|
+
/* insn opt_plus(cd)(recv, obj)(val) */
|
3017
3048
|
INSN_ENTRY(opt_plus)
|
3018
3049
|
{
|
3019
3050
|
/* ### Declare that we have just entered into an instruction. ### */
|
@@ -3021,9 +3052,8 @@ INSN_ENTRY(opt_plus)
|
|
3021
3052
|
DEBUG_ENTER_INSN("opt_plus");
|
3022
3053
|
|
3023
3054
|
/* ### Declare and assign variables. ### */
|
3024
|
-
|
3025
|
-
|
3026
|
-
# define INSN_ATTR(x) attr_ ## x ## _opt_plus(ci, cc)
|
3055
|
+
CALL_DATA cd = (CALL_DATA)GET_OPERAND(1);
|
3056
|
+
# define INSN_ATTR(x) attr_ ## x ## _opt_plus(cd)
|
3027
3057
|
bool leaf = INSN_ATTR(leaf);
|
3028
3058
|
VALUE recv = TOPN(1);
|
3029
3059
|
VALUE obj = TOPN(0);
|
@@ -3033,12 +3063,11 @@ INSN_ENTRY(opt_plus)
|
|
3033
3063
|
if (! leaf) ADD_PC(INSN_ATTR(width));
|
3034
3064
|
SETUP_CANARY();
|
3035
3065
|
COLLECT_USAGE_INSN(INSN_ATTR(bin));
|
3036
|
-
COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 0,
|
3037
|
-
COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 1, cc);
|
3066
|
+
COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 0, cd);
|
3038
3067
|
|
3039
3068
|
/* ### Here we do the instruction body. ### */
|
3040
3069
|
# define NAME_OF_CURRENT_INSN opt_plus
|
3041
|
-
# line
|
3070
|
+
# line 1094 "insns.def"
|
3042
3071
|
{
|
3043
3072
|
val = vm_opt_plus(recv, obj);
|
3044
3073
|
|
@@ -3046,7 +3075,7 @@ INSN_ENTRY(opt_plus)
|
|
3046
3075
|
CALL_SIMPLE_METHOD();
|
3047
3076
|
}
|
3048
3077
|
}
|
3049
|
-
# line
|
3078
|
+
# line 3079 "vm.inc"
|
3050
3079
|
# undef NAME_OF_CURRENT_INSN
|
3051
3080
|
|
3052
3081
|
/* ### Instruction trailers. ### */
|
@@ -3054,6 +3083,8 @@ INSN_ENTRY(opt_plus)
|
|
3054
3083
|
CHECK_CANARY();
|
3055
3084
|
INC_SP(INSN_ATTR(sp_inc));
|
3056
3085
|
TOPN(0) = val;
|
3086
|
+
VM_ASSERT(!RB_TYPE_P(TOPN(0), T_NONE));
|
3087
|
+
VM_ASSERT(!RB_TYPE_P(TOPN(0), T_MOVED));
|
3057
3088
|
if (leaf) ADD_PC(INSN_ATTR(width));
|
3058
3089
|
# undef INSN_ATTR
|
3059
3090
|
|
@@ -3061,7 +3092,7 @@ INSN_ENTRY(opt_plus)
|
|
3061
3092
|
END_INSN(opt_plus);
|
3062
3093
|
}
|
3063
3094
|
|
3064
|
-
/* insn opt_minus(
|
3095
|
+
/* insn opt_minus(cd)(recv, obj)(val) */
|
3065
3096
|
INSN_ENTRY(opt_minus)
|
3066
3097
|
{
|
3067
3098
|
/* ### Declare that we have just entered into an instruction. ### */
|
@@ -3069,9 +3100,8 @@ INSN_ENTRY(opt_minus)
|
|
3069
3100
|
DEBUG_ENTER_INSN("opt_minus");
|
3070
3101
|
|
3071
3102
|
/* ### Declare and assign variables. ### */
|
3072
|
-
|
3073
|
-
|
3074
|
-
# define INSN_ATTR(x) attr_ ## x ## _opt_minus(ci, cc)
|
3103
|
+
CALL_DATA cd = (CALL_DATA)GET_OPERAND(1);
|
3104
|
+
# define INSN_ATTR(x) attr_ ## x ## _opt_minus(cd)
|
3075
3105
|
bool leaf = INSN_ATTR(leaf);
|
3076
3106
|
VALUE recv = TOPN(1);
|
3077
3107
|
VALUE obj = TOPN(0);
|
@@ -3081,12 +3111,11 @@ INSN_ENTRY(opt_minus)
|
|
3081
3111
|
if (! leaf) ADD_PC(INSN_ATTR(width));
|
3082
3112
|
SETUP_CANARY();
|
3083
3113
|
COLLECT_USAGE_INSN(INSN_ATTR(bin));
|
3084
|
-
COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 0,
|
3085
|
-
COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 1, cc);
|
3114
|
+
COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 0, cd);
|
3086
3115
|
|
3087
3116
|
/* ### Here we do the instruction body. ### */
|
3088
3117
|
# define NAME_OF_CURRENT_INSN opt_minus
|
3089
|
-
# line
|
3118
|
+
# line 1108 "insns.def"
|
3090
3119
|
{
|
3091
3120
|
val = vm_opt_minus(recv, obj);
|
3092
3121
|
|
@@ -3094,7 +3123,7 @@ INSN_ENTRY(opt_minus)
|
|
3094
3123
|
CALL_SIMPLE_METHOD();
|
3095
3124
|
}
|
3096
3125
|
}
|
3097
|
-
# line
|
3126
|
+
# line 3127 "vm.inc"
|
3098
3127
|
# undef NAME_OF_CURRENT_INSN
|
3099
3128
|
|
3100
3129
|
/* ### Instruction trailers. ### */
|
@@ -3102,6 +3131,8 @@ INSN_ENTRY(opt_minus)
|
|
3102
3131
|
CHECK_CANARY();
|
3103
3132
|
INC_SP(INSN_ATTR(sp_inc));
|
3104
3133
|
TOPN(0) = val;
|
3134
|
+
VM_ASSERT(!RB_TYPE_P(TOPN(0), T_NONE));
|
3135
|
+
VM_ASSERT(!RB_TYPE_P(TOPN(0), T_MOVED));
|
3105
3136
|
if (leaf) ADD_PC(INSN_ATTR(width));
|
3106
3137
|
# undef INSN_ATTR
|
3107
3138
|
|
@@ -3109,7 +3140,7 @@ INSN_ENTRY(opt_minus)
|
|
3109
3140
|
END_INSN(opt_minus);
|
3110
3141
|
}
|
3111
3142
|
|
3112
|
-
/* insn opt_mult(
|
3143
|
+
/* insn opt_mult(cd)(recv, obj)(val) */
|
3113
3144
|
INSN_ENTRY(opt_mult)
|
3114
3145
|
{
|
3115
3146
|
/* ### Declare that we have just entered into an instruction. ### */
|
@@ -3117,9 +3148,8 @@ INSN_ENTRY(opt_mult)
|
|
3117
3148
|
DEBUG_ENTER_INSN("opt_mult");
|
3118
3149
|
|
3119
3150
|
/* ### Declare and assign variables. ### */
|
3120
|
-
|
3121
|
-
|
3122
|
-
# define INSN_ATTR(x) attr_ ## x ## _opt_mult(ci, cc)
|
3151
|
+
CALL_DATA cd = (CALL_DATA)GET_OPERAND(1);
|
3152
|
+
# define INSN_ATTR(x) attr_ ## x ## _opt_mult(cd)
|
3123
3153
|
bool leaf = INSN_ATTR(leaf);
|
3124
3154
|
VALUE recv = TOPN(1);
|
3125
3155
|
VALUE obj = TOPN(0);
|
@@ -3129,12 +3159,11 @@ INSN_ENTRY(opt_mult)
|
|
3129
3159
|
if (! leaf) ADD_PC(INSN_ATTR(width));
|
3130
3160
|
SETUP_CANARY();
|
3131
3161
|
COLLECT_USAGE_INSN(INSN_ATTR(bin));
|
3132
|
-
COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 0,
|
3133
|
-
COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 1, cc);
|
3162
|
+
COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 0, cd);
|
3134
3163
|
|
3135
3164
|
/* ### Here we do the instruction body. ### */
|
3136
3165
|
# define NAME_OF_CURRENT_INSN opt_mult
|
3137
|
-
# line
|
3166
|
+
# line 1122 "insns.def"
|
3138
3167
|
{
|
3139
3168
|
val = vm_opt_mult(recv, obj);
|
3140
3169
|
|
@@ -3142,7 +3171,7 @@ INSN_ENTRY(opt_mult)
|
|
3142
3171
|
CALL_SIMPLE_METHOD();
|
3143
3172
|
}
|
3144
3173
|
}
|
3145
|
-
# line
|
3174
|
+
# line 3175 "vm.inc"
|
3146
3175
|
# undef NAME_OF_CURRENT_INSN
|
3147
3176
|
|
3148
3177
|
/* ### Instruction trailers. ### */
|
@@ -3150,6 +3179,8 @@ INSN_ENTRY(opt_mult)
|
|
3150
3179
|
CHECK_CANARY();
|
3151
3180
|
INC_SP(INSN_ATTR(sp_inc));
|
3152
3181
|
TOPN(0) = val;
|
3182
|
+
VM_ASSERT(!RB_TYPE_P(TOPN(0), T_NONE));
|
3183
|
+
VM_ASSERT(!RB_TYPE_P(TOPN(0), T_MOVED));
|
3153
3184
|
if (leaf) ADD_PC(INSN_ATTR(width));
|
3154
3185
|
# undef INSN_ATTR
|
3155
3186
|
|
@@ -3157,7 +3188,7 @@ INSN_ENTRY(opt_mult)
|
|
3157
3188
|
END_INSN(opt_mult);
|
3158
3189
|
}
|
3159
3190
|
|
3160
|
-
/* insn opt_div(
|
3191
|
+
/* insn opt_div(cd)(recv, obj)(val) */
|
3161
3192
|
INSN_ENTRY(opt_div)
|
3162
3193
|
{
|
3163
3194
|
/* ### Declare that we have just entered into an instruction. ### */
|
@@ -3165,9 +3196,8 @@ INSN_ENTRY(opt_div)
|
|
3165
3196
|
DEBUG_ENTER_INSN("opt_div");
|
3166
3197
|
|
3167
3198
|
/* ### Declare and assign variables. ### */
|
3168
|
-
|
3169
|
-
|
3170
|
-
# define INSN_ATTR(x) attr_ ## x ## _opt_div(ci, cc)
|
3199
|
+
CALL_DATA cd = (CALL_DATA)GET_OPERAND(1);
|
3200
|
+
# define INSN_ATTR(x) attr_ ## x ## _opt_div(cd)
|
3171
3201
|
bool leaf = INSN_ATTR(leaf);
|
3172
3202
|
VALUE recv = TOPN(1);
|
3173
3203
|
VALUE obj = TOPN(0);
|
@@ -3177,12 +3207,11 @@ INSN_ENTRY(opt_div)
|
|
3177
3207
|
if (! leaf) ADD_PC(INSN_ATTR(width));
|
3178
3208
|
SETUP_CANARY();
|
3179
3209
|
COLLECT_USAGE_INSN(INSN_ATTR(bin));
|
3180
|
-
COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 0,
|
3181
|
-
COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 1, cc);
|
3210
|
+
COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 0, cd);
|
3182
3211
|
|
3183
3212
|
/* ### Here we do the instruction body. ### */
|
3184
3213
|
# define NAME_OF_CURRENT_INSN opt_div
|
3185
|
-
# line
|
3214
|
+
# line 1139 "insns.def"
|
3186
3215
|
{
|
3187
3216
|
val = vm_opt_div(recv, obj);
|
3188
3217
|
|
@@ -3190,7 +3219,7 @@ INSN_ENTRY(opt_div)
|
|
3190
3219
|
CALL_SIMPLE_METHOD();
|
3191
3220
|
}
|
3192
3221
|
}
|
3193
|
-
# line
|
3222
|
+
# line 3223 "vm.inc"
|
3194
3223
|
# undef NAME_OF_CURRENT_INSN
|
3195
3224
|
|
3196
3225
|
/* ### Instruction trailers. ### */
|
@@ -3198,6 +3227,8 @@ INSN_ENTRY(opt_div)
|
|
3198
3227
|
CHECK_CANARY();
|
3199
3228
|
INC_SP(INSN_ATTR(sp_inc));
|
3200
3229
|
TOPN(0) = val;
|
3230
|
+
VM_ASSERT(!RB_TYPE_P(TOPN(0), T_NONE));
|
3231
|
+
VM_ASSERT(!RB_TYPE_P(TOPN(0), T_MOVED));
|
3201
3232
|
if (leaf) ADD_PC(INSN_ATTR(width));
|
3202
3233
|
# undef INSN_ATTR
|
3203
3234
|
|
@@ -3205,7 +3236,7 @@ INSN_ENTRY(opt_div)
|
|
3205
3236
|
END_INSN(opt_div);
|
3206
3237
|
}
|
3207
3238
|
|
3208
|
-
/* insn opt_mod(
|
3239
|
+
/* insn opt_mod(cd)(recv, obj)(val) */
|
3209
3240
|
INSN_ENTRY(opt_mod)
|
3210
3241
|
{
|
3211
3242
|
/* ### Declare that we have just entered into an instruction. ### */
|
@@ -3213,9 +3244,8 @@ INSN_ENTRY(opt_mod)
|
|
3213
3244
|
DEBUG_ENTER_INSN("opt_mod");
|
3214
3245
|
|
3215
3246
|
/* ### Declare and assign variables. ### */
|
3216
|
-
|
3217
|
-
|
3218
|
-
# define INSN_ATTR(x) attr_ ## x ## _opt_mod(ci, cc)
|
3247
|
+
CALL_DATA cd = (CALL_DATA)GET_OPERAND(1);
|
3248
|
+
# define INSN_ATTR(x) attr_ ## x ## _opt_mod(cd)
|
3219
3249
|
bool leaf = INSN_ATTR(leaf);
|
3220
3250
|
VALUE recv = TOPN(1);
|
3221
3251
|
VALUE obj = TOPN(0);
|
@@ -3225,12 +3255,11 @@ INSN_ENTRY(opt_mod)
|
|
3225
3255
|
if (! leaf) ADD_PC(INSN_ATTR(width));
|
3226
3256
|
SETUP_CANARY();
|
3227
3257
|
COLLECT_USAGE_INSN(INSN_ATTR(bin));
|
3228
|
-
COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 0,
|
3229
|
-
COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 1, cc);
|
3258
|
+
COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 0, cd);
|
3230
3259
|
|
3231
3260
|
/* ### Here we do the instruction body. ### */
|
3232
3261
|
# define NAME_OF_CURRENT_INSN opt_mod
|
3233
|
-
# line
|
3262
|
+
# line 1155 "insns.def"
|
3234
3263
|
{
|
3235
3264
|
val = vm_opt_mod(recv, obj);
|
3236
3265
|
|
@@ -3238,7 +3267,7 @@ INSN_ENTRY(opt_mod)
|
|
3238
3267
|
CALL_SIMPLE_METHOD();
|
3239
3268
|
}
|
3240
3269
|
}
|
3241
|
-
# line
|
3270
|
+
# line 3271 "vm.inc"
|
3242
3271
|
# undef NAME_OF_CURRENT_INSN
|
3243
3272
|
|
3244
3273
|
/* ### Instruction trailers. ### */
|
@@ -3246,6 +3275,8 @@ INSN_ENTRY(opt_mod)
|
|
3246
3275
|
CHECK_CANARY();
|
3247
3276
|
INC_SP(INSN_ATTR(sp_inc));
|
3248
3277
|
TOPN(0) = val;
|
3278
|
+
VM_ASSERT(!RB_TYPE_P(TOPN(0), T_NONE));
|
3279
|
+
VM_ASSERT(!RB_TYPE_P(TOPN(0), T_MOVED));
|
3249
3280
|
if (leaf) ADD_PC(INSN_ATTR(width));
|
3250
3281
|
# undef INSN_ATTR
|
3251
3282
|
|
@@ -3253,7 +3284,7 @@ INSN_ENTRY(opt_mod)
|
|
3253
3284
|
END_INSN(opt_mod);
|
3254
3285
|
}
|
3255
3286
|
|
3256
|
-
/* insn opt_eq(
|
3287
|
+
/* insn opt_eq(cd)(recv, obj)(val) */
|
3257
3288
|
INSN_ENTRY(opt_eq)
|
3258
3289
|
{
|
3259
3290
|
/* ### Declare that we have just entered into an instruction. ### */
|
@@ -3261,9 +3292,8 @@ INSN_ENTRY(opt_eq)
|
|
3261
3292
|
DEBUG_ENTER_INSN("opt_eq");
|
3262
3293
|
|
3263
3294
|
/* ### Declare and assign variables. ### */
|
3264
|
-
|
3265
|
-
|
3266
|
-
# define INSN_ATTR(x) attr_ ## x ## _opt_eq(ci, cc)
|
3295
|
+
CALL_DATA cd = (CALL_DATA)GET_OPERAND(1);
|
3296
|
+
# define INSN_ATTR(x) attr_ ## x ## _opt_eq(cd)
|
3267
3297
|
bool leaf = INSN_ATTR(leaf);
|
3268
3298
|
VALUE recv = TOPN(1);
|
3269
3299
|
VALUE obj = TOPN(0);
|
@@ -3273,20 +3303,19 @@ INSN_ENTRY(opt_eq)
|
|
3273
3303
|
if (! leaf) ADD_PC(INSN_ATTR(width));
|
3274
3304
|
SETUP_CANARY();
|
3275
3305
|
COLLECT_USAGE_INSN(INSN_ATTR(bin));
|
3276
|
-
COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 0,
|
3277
|
-
COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 1, cc);
|
3306
|
+
COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 0, cd);
|
3278
3307
|
|
3279
3308
|
/* ### Here we do the instruction body. ### */
|
3280
3309
|
# define NAME_OF_CURRENT_INSN opt_eq
|
3281
|
-
# line
|
3310
|
+
# line 1169 "insns.def"
|
3282
3311
|
{
|
3283
|
-
val = opt_eq_func(recv, obj,
|
3312
|
+
val = opt_eq_func(recv, obj, cd);
|
3284
3313
|
|
3285
3314
|
if (val == Qundef) {
|
3286
3315
|
CALL_SIMPLE_METHOD();
|
3287
3316
|
}
|
3288
3317
|
}
|
3289
|
-
# line
|
3318
|
+
# line 3319 "vm.inc"
|
3290
3319
|
# undef NAME_OF_CURRENT_INSN
|
3291
3320
|
|
3292
3321
|
/* ### Instruction trailers. ### */
|
@@ -3294,6 +3323,8 @@ INSN_ENTRY(opt_eq)
|
|
3294
3323
|
CHECK_CANARY();
|
3295
3324
|
INC_SP(INSN_ATTR(sp_inc));
|
3296
3325
|
TOPN(0) = val;
|
3326
|
+
VM_ASSERT(!RB_TYPE_P(TOPN(0), T_NONE));
|
3327
|
+
VM_ASSERT(!RB_TYPE_P(TOPN(0), T_MOVED));
|
3297
3328
|
if (leaf) ADD_PC(INSN_ATTR(width));
|
3298
3329
|
# undef INSN_ATTR
|
3299
3330
|
|
@@ -3301,7 +3332,7 @@ INSN_ENTRY(opt_eq)
|
|
3301
3332
|
END_INSN(opt_eq);
|
3302
3333
|
}
|
3303
3334
|
|
3304
|
-
/* insn opt_neq(
|
3335
|
+
/* insn opt_neq(cd_eq, cd)(recv, obj)(val) */
|
3305
3336
|
INSN_ENTRY(opt_neq)
|
3306
3337
|
{
|
3307
3338
|
/* ### Declare that we have just entered into an instruction. ### */
|
@@ -3309,11 +3340,9 @@ INSN_ENTRY(opt_neq)
|
|
3309
3340
|
DEBUG_ENTER_INSN("opt_neq");
|
3310
3341
|
|
3311
3342
|
/* ### Declare and assign variables. ### */
|
3312
|
-
|
3313
|
-
|
3314
|
-
|
3315
|
-
CALL_CACHE cc = (CALL_CACHE)GET_OPERAND(4);
|
3316
|
-
# define INSN_ATTR(x) attr_ ## x ## _opt_neq(ci_eq, cc_eq, ci, cc)
|
3343
|
+
CALL_DATA cd_eq = (CALL_DATA)GET_OPERAND(1);
|
3344
|
+
CALL_DATA cd = (CALL_DATA)GET_OPERAND(2);
|
3345
|
+
# define INSN_ATTR(x) attr_ ## x ## _opt_neq(cd_eq, cd)
|
3317
3346
|
bool leaf = INSN_ATTR(leaf);
|
3318
3347
|
VALUE recv = TOPN(1);
|
3319
3348
|
VALUE obj = TOPN(0);
|
@@ -3323,22 +3352,20 @@ INSN_ENTRY(opt_neq)
|
|
3323
3352
|
if (! leaf) ADD_PC(INSN_ATTR(width));
|
3324
3353
|
SETUP_CANARY();
|
3325
3354
|
COLLECT_USAGE_INSN(INSN_ATTR(bin));
|
3326
|
-
COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 0,
|
3327
|
-
COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 1,
|
3328
|
-
COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 2, ci);
|
3329
|
-
COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 3, cc);
|
3355
|
+
COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 0, cd_eq);
|
3356
|
+
COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 1, cd);
|
3330
3357
|
|
3331
3358
|
/* ### Here we do the instruction body. ### */
|
3332
3359
|
# define NAME_OF_CURRENT_INSN opt_neq
|
3333
|
-
# line
|
3360
|
+
# line 1183 "insns.def"
|
3334
3361
|
{
|
3335
|
-
val = vm_opt_neq(
|
3362
|
+
val = vm_opt_neq(cd, cd_eq, recv, obj);
|
3336
3363
|
|
3337
3364
|
if (val == Qundef) {
|
3338
3365
|
CALL_SIMPLE_METHOD();
|
3339
3366
|
}
|
3340
3367
|
}
|
3341
|
-
# line
|
3368
|
+
# line 3369 "vm.inc"
|
3342
3369
|
# undef NAME_OF_CURRENT_INSN
|
3343
3370
|
|
3344
3371
|
/* ### Instruction trailers. ### */
|
@@ -3346,6 +3373,8 @@ INSN_ENTRY(opt_neq)
|
|
3346
3373
|
CHECK_CANARY();
|
3347
3374
|
INC_SP(INSN_ATTR(sp_inc));
|
3348
3375
|
TOPN(0) = val;
|
3376
|
+
VM_ASSERT(!RB_TYPE_P(TOPN(0), T_NONE));
|
3377
|
+
VM_ASSERT(!RB_TYPE_P(TOPN(0), T_MOVED));
|
3349
3378
|
if (leaf) ADD_PC(INSN_ATTR(width));
|
3350
3379
|
# undef INSN_ATTR
|
3351
3380
|
|
@@ -3353,7 +3382,7 @@ INSN_ENTRY(opt_neq)
|
|
3353
3382
|
END_INSN(opt_neq);
|
3354
3383
|
}
|
3355
3384
|
|
3356
|
-
/* insn opt_lt(
|
3385
|
+
/* insn opt_lt(cd)(recv, obj)(val) */
|
3357
3386
|
INSN_ENTRY(opt_lt)
|
3358
3387
|
{
|
3359
3388
|
/* ### Declare that we have just entered into an instruction. ### */
|
@@ -3361,9 +3390,8 @@ INSN_ENTRY(opt_lt)
|
|
3361
3390
|
DEBUG_ENTER_INSN("opt_lt");
|
3362
3391
|
|
3363
3392
|
/* ### Declare and assign variables. ### */
|
3364
|
-
|
3365
|
-
|
3366
|
-
# define INSN_ATTR(x) attr_ ## x ## _opt_lt(ci, cc)
|
3393
|
+
CALL_DATA cd = (CALL_DATA)GET_OPERAND(1);
|
3394
|
+
# define INSN_ATTR(x) attr_ ## x ## _opt_lt(cd)
|
3367
3395
|
bool leaf = INSN_ATTR(leaf);
|
3368
3396
|
VALUE recv = TOPN(1);
|
3369
3397
|
VALUE obj = TOPN(0);
|
@@ -3373,12 +3401,11 @@ INSN_ENTRY(opt_lt)
|
|
3373
3401
|
if (! leaf) ADD_PC(INSN_ATTR(width));
|
3374
3402
|
SETUP_CANARY();
|
3375
3403
|
COLLECT_USAGE_INSN(INSN_ATTR(bin));
|
3376
|
-
COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 0,
|
3377
|
-
COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 1, cc);
|
3404
|
+
COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 0, cd);
|
3378
3405
|
|
3379
3406
|
/* ### Here we do the instruction body. ### */
|
3380
3407
|
# define NAME_OF_CURRENT_INSN opt_lt
|
3381
|
-
# line
|
3408
|
+
# line 1197 "insns.def"
|
3382
3409
|
{
|
3383
3410
|
val = vm_opt_lt(recv, obj);
|
3384
3411
|
|
@@ -3386,7 +3413,7 @@ INSN_ENTRY(opt_lt)
|
|
3386
3413
|
CALL_SIMPLE_METHOD();
|
3387
3414
|
}
|
3388
3415
|
}
|
3389
|
-
# line
|
3416
|
+
# line 3417 "vm.inc"
|
3390
3417
|
# undef NAME_OF_CURRENT_INSN
|
3391
3418
|
|
3392
3419
|
/* ### Instruction trailers. ### */
|
@@ -3394,6 +3421,8 @@ INSN_ENTRY(opt_lt)
|
|
3394
3421
|
CHECK_CANARY();
|
3395
3422
|
INC_SP(INSN_ATTR(sp_inc));
|
3396
3423
|
TOPN(0) = val;
|
3424
|
+
VM_ASSERT(!RB_TYPE_P(TOPN(0), T_NONE));
|
3425
|
+
VM_ASSERT(!RB_TYPE_P(TOPN(0), T_MOVED));
|
3397
3426
|
if (leaf) ADD_PC(INSN_ATTR(width));
|
3398
3427
|
# undef INSN_ATTR
|
3399
3428
|
|
@@ -3401,7 +3430,7 @@ INSN_ENTRY(opt_lt)
|
|
3401
3430
|
END_INSN(opt_lt);
|
3402
3431
|
}
|
3403
3432
|
|
3404
|
-
/* insn opt_le(
|
3433
|
+
/* insn opt_le(cd)(recv, obj)(val) */
|
3405
3434
|
INSN_ENTRY(opt_le)
|
3406
3435
|
{
|
3407
3436
|
/* ### Declare that we have just entered into an instruction. ### */
|
@@ -3409,9 +3438,8 @@ INSN_ENTRY(opt_le)
|
|
3409
3438
|
DEBUG_ENTER_INSN("opt_le");
|
3410
3439
|
|
3411
3440
|
/* ### Declare and assign variables. ### */
|
3412
|
-
|
3413
|
-
|
3414
|
-
# define INSN_ATTR(x) attr_ ## x ## _opt_le(ci, cc)
|
3441
|
+
CALL_DATA cd = (CALL_DATA)GET_OPERAND(1);
|
3442
|
+
# define INSN_ATTR(x) attr_ ## x ## _opt_le(cd)
|
3415
3443
|
bool leaf = INSN_ATTR(leaf);
|
3416
3444
|
VALUE recv = TOPN(1);
|
3417
3445
|
VALUE obj = TOPN(0);
|
@@ -3421,12 +3449,11 @@ INSN_ENTRY(opt_le)
|
|
3421
3449
|
if (! leaf) ADD_PC(INSN_ATTR(width));
|
3422
3450
|
SETUP_CANARY();
|
3423
3451
|
COLLECT_USAGE_INSN(INSN_ATTR(bin));
|
3424
|
-
COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 0,
|
3425
|
-
COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 1, cc);
|
3452
|
+
COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 0, cd);
|
3426
3453
|
|
3427
3454
|
/* ### Here we do the instruction body. ### */
|
3428
3455
|
# define NAME_OF_CURRENT_INSN opt_le
|
3429
|
-
# line
|
3456
|
+
# line 1211 "insns.def"
|
3430
3457
|
{
|
3431
3458
|
val = vm_opt_le(recv, obj);
|
3432
3459
|
|
@@ -3434,7 +3461,7 @@ INSN_ENTRY(opt_le)
|
|
3434
3461
|
CALL_SIMPLE_METHOD();
|
3435
3462
|
}
|
3436
3463
|
}
|
3437
|
-
# line
|
3464
|
+
# line 3465 "vm.inc"
|
3438
3465
|
# undef NAME_OF_CURRENT_INSN
|
3439
3466
|
|
3440
3467
|
/* ### Instruction trailers. ### */
|
@@ -3442,6 +3469,8 @@ INSN_ENTRY(opt_le)
|
|
3442
3469
|
CHECK_CANARY();
|
3443
3470
|
INC_SP(INSN_ATTR(sp_inc));
|
3444
3471
|
TOPN(0) = val;
|
3472
|
+
VM_ASSERT(!RB_TYPE_P(TOPN(0), T_NONE));
|
3473
|
+
VM_ASSERT(!RB_TYPE_P(TOPN(0), T_MOVED));
|
3445
3474
|
if (leaf) ADD_PC(INSN_ATTR(width));
|
3446
3475
|
# undef INSN_ATTR
|
3447
3476
|
|
@@ -3449,7 +3478,7 @@ INSN_ENTRY(opt_le)
|
|
3449
3478
|
END_INSN(opt_le);
|
3450
3479
|
}
|
3451
3480
|
|
3452
|
-
/* insn opt_gt(
|
3481
|
+
/* insn opt_gt(cd)(recv, obj)(val) */
|
3453
3482
|
INSN_ENTRY(opt_gt)
|
3454
3483
|
{
|
3455
3484
|
/* ### Declare that we have just entered into an instruction. ### */
|
@@ -3457,9 +3486,8 @@ INSN_ENTRY(opt_gt)
|
|
3457
3486
|
DEBUG_ENTER_INSN("opt_gt");
|
3458
3487
|
|
3459
3488
|
/* ### Declare and assign variables. ### */
|
3460
|
-
|
3461
|
-
|
3462
|
-
# define INSN_ATTR(x) attr_ ## x ## _opt_gt(ci, cc)
|
3489
|
+
CALL_DATA cd = (CALL_DATA)GET_OPERAND(1);
|
3490
|
+
# define INSN_ATTR(x) attr_ ## x ## _opt_gt(cd)
|
3463
3491
|
bool leaf = INSN_ATTR(leaf);
|
3464
3492
|
VALUE recv = TOPN(1);
|
3465
3493
|
VALUE obj = TOPN(0);
|
@@ -3469,12 +3497,11 @@ INSN_ENTRY(opt_gt)
|
|
3469
3497
|
if (! leaf) ADD_PC(INSN_ATTR(width));
|
3470
3498
|
SETUP_CANARY();
|
3471
3499
|
COLLECT_USAGE_INSN(INSN_ATTR(bin));
|
3472
|
-
COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 0,
|
3473
|
-
COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 1, cc);
|
3500
|
+
COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 0, cd);
|
3474
3501
|
|
3475
3502
|
/* ### Here we do the instruction body. ### */
|
3476
3503
|
# define NAME_OF_CURRENT_INSN opt_gt
|
3477
|
-
# line
|
3504
|
+
# line 1225 "insns.def"
|
3478
3505
|
{
|
3479
3506
|
val = vm_opt_gt(recv, obj);
|
3480
3507
|
|
@@ -3482,7 +3509,7 @@ INSN_ENTRY(opt_gt)
|
|
3482
3509
|
CALL_SIMPLE_METHOD();
|
3483
3510
|
}
|
3484
3511
|
}
|
3485
|
-
# line
|
3512
|
+
# line 3513 "vm.inc"
|
3486
3513
|
# undef NAME_OF_CURRENT_INSN
|
3487
3514
|
|
3488
3515
|
/* ### Instruction trailers. ### */
|
@@ -3490,6 +3517,8 @@ INSN_ENTRY(opt_gt)
|
|
3490
3517
|
CHECK_CANARY();
|
3491
3518
|
INC_SP(INSN_ATTR(sp_inc));
|
3492
3519
|
TOPN(0) = val;
|
3520
|
+
VM_ASSERT(!RB_TYPE_P(TOPN(0), T_NONE));
|
3521
|
+
VM_ASSERT(!RB_TYPE_P(TOPN(0), T_MOVED));
|
3493
3522
|
if (leaf) ADD_PC(INSN_ATTR(width));
|
3494
3523
|
# undef INSN_ATTR
|
3495
3524
|
|
@@ -3497,7 +3526,7 @@ INSN_ENTRY(opt_gt)
|
|
3497
3526
|
END_INSN(opt_gt);
|
3498
3527
|
}
|
3499
3528
|
|
3500
|
-
/* insn opt_ge(
|
3529
|
+
/* insn opt_ge(cd)(recv, obj)(val) */
|
3501
3530
|
INSN_ENTRY(opt_ge)
|
3502
3531
|
{
|
3503
3532
|
/* ### Declare that we have just entered into an instruction. ### */
|
@@ -3505,9 +3534,8 @@ INSN_ENTRY(opt_ge)
|
|
3505
3534
|
DEBUG_ENTER_INSN("opt_ge");
|
3506
3535
|
|
3507
3536
|
/* ### Declare and assign variables. ### */
|
3508
|
-
|
3509
|
-
|
3510
|
-
# define INSN_ATTR(x) attr_ ## x ## _opt_ge(ci, cc)
|
3537
|
+
CALL_DATA cd = (CALL_DATA)GET_OPERAND(1);
|
3538
|
+
# define INSN_ATTR(x) attr_ ## x ## _opt_ge(cd)
|
3511
3539
|
bool leaf = INSN_ATTR(leaf);
|
3512
3540
|
VALUE recv = TOPN(1);
|
3513
3541
|
VALUE obj = TOPN(0);
|
@@ -3517,12 +3545,11 @@ INSN_ENTRY(opt_ge)
|
|
3517
3545
|
if (! leaf) ADD_PC(INSN_ATTR(width));
|
3518
3546
|
SETUP_CANARY();
|
3519
3547
|
COLLECT_USAGE_INSN(INSN_ATTR(bin));
|
3520
|
-
COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 0,
|
3521
|
-
COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 1, cc);
|
3548
|
+
COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 0, cd);
|
3522
3549
|
|
3523
3550
|
/* ### Here we do the instruction body. ### */
|
3524
3551
|
# define NAME_OF_CURRENT_INSN opt_ge
|
3525
|
-
# line
|
3552
|
+
# line 1239 "insns.def"
|
3526
3553
|
{
|
3527
3554
|
val = vm_opt_ge(recv, obj);
|
3528
3555
|
|
@@ -3530,7 +3557,7 @@ INSN_ENTRY(opt_ge)
|
|
3530
3557
|
CALL_SIMPLE_METHOD();
|
3531
3558
|
}
|
3532
3559
|
}
|
3533
|
-
# line
|
3560
|
+
# line 3561 "vm.inc"
|
3534
3561
|
# undef NAME_OF_CURRENT_INSN
|
3535
3562
|
|
3536
3563
|
/* ### Instruction trailers. ### */
|
@@ -3538,6 +3565,8 @@ INSN_ENTRY(opt_ge)
|
|
3538
3565
|
CHECK_CANARY();
|
3539
3566
|
INC_SP(INSN_ATTR(sp_inc));
|
3540
3567
|
TOPN(0) = val;
|
3568
|
+
VM_ASSERT(!RB_TYPE_P(TOPN(0), T_NONE));
|
3569
|
+
VM_ASSERT(!RB_TYPE_P(TOPN(0), T_MOVED));
|
3541
3570
|
if (leaf) ADD_PC(INSN_ATTR(width));
|
3542
3571
|
# undef INSN_ATTR
|
3543
3572
|
|
@@ -3545,7 +3574,7 @@ INSN_ENTRY(opt_ge)
|
|
3545
3574
|
END_INSN(opt_ge);
|
3546
3575
|
}
|
3547
3576
|
|
3548
|
-
/* insn opt_ltlt(
|
3577
|
+
/* insn opt_ltlt(cd)(recv, obj)(val) */
|
3549
3578
|
INSN_ENTRY(opt_ltlt)
|
3550
3579
|
{
|
3551
3580
|
/* ### Declare that we have just entered into an instruction. ### */
|
@@ -3553,9 +3582,8 @@ INSN_ENTRY(opt_ltlt)
|
|
3553
3582
|
DEBUG_ENTER_INSN("opt_ltlt");
|
3554
3583
|
|
3555
3584
|
/* ### Declare and assign variables. ### */
|
3556
|
-
|
3557
|
-
|
3558
|
-
# define INSN_ATTR(x) attr_ ## x ## _opt_ltlt(ci, cc)
|
3585
|
+
CALL_DATA cd = (CALL_DATA)GET_OPERAND(1);
|
3586
|
+
# define INSN_ATTR(x) attr_ ## x ## _opt_ltlt(cd)
|
3559
3587
|
bool leaf = INSN_ATTR(leaf);
|
3560
3588
|
VALUE recv = TOPN(1);
|
3561
3589
|
VALUE obj = TOPN(0);
|
@@ -3565,12 +3593,11 @@ INSN_ENTRY(opt_ltlt)
|
|
3565
3593
|
if (! leaf) ADD_PC(INSN_ATTR(width));
|
3566
3594
|
SETUP_CANARY();
|
3567
3595
|
COLLECT_USAGE_INSN(INSN_ATTR(bin));
|
3568
|
-
COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 0,
|
3569
|
-
COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 1, cc);
|
3596
|
+
COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 0, cd);
|
3570
3597
|
|
3571
3598
|
/* ### Here we do the instruction body. ### */
|
3572
3599
|
# define NAME_OF_CURRENT_INSN opt_ltlt
|
3573
|
-
# line
|
3600
|
+
# line 1257 "insns.def"
|
3574
3601
|
{
|
3575
3602
|
val = vm_opt_ltlt(recv, obj);
|
3576
3603
|
|
@@ -3578,7 +3605,7 @@ INSN_ENTRY(opt_ltlt)
|
|
3578
3605
|
CALL_SIMPLE_METHOD();
|
3579
3606
|
}
|
3580
3607
|
}
|
3581
|
-
# line
|
3608
|
+
# line 3609 "vm.inc"
|
3582
3609
|
# undef NAME_OF_CURRENT_INSN
|
3583
3610
|
|
3584
3611
|
/* ### Instruction trailers. ### */
|
@@ -3586,6 +3613,8 @@ INSN_ENTRY(opt_ltlt)
|
|
3586
3613
|
CHECK_CANARY();
|
3587
3614
|
INC_SP(INSN_ATTR(sp_inc));
|
3588
3615
|
TOPN(0) = val;
|
3616
|
+
VM_ASSERT(!RB_TYPE_P(TOPN(0), T_NONE));
|
3617
|
+
VM_ASSERT(!RB_TYPE_P(TOPN(0), T_MOVED));
|
3589
3618
|
if (leaf) ADD_PC(INSN_ATTR(width));
|
3590
3619
|
# undef INSN_ATTR
|
3591
3620
|
|
@@ -3593,7 +3622,7 @@ INSN_ENTRY(opt_ltlt)
|
|
3593
3622
|
END_INSN(opt_ltlt);
|
3594
3623
|
}
|
3595
3624
|
|
3596
|
-
/* insn opt_and(
|
3625
|
+
/* insn opt_and(cd)(recv, obj)(val) */
|
3597
3626
|
INSN_ENTRY(opt_and)
|
3598
3627
|
{
|
3599
3628
|
/* ### Declare that we have just entered into an instruction. ### */
|
@@ -3601,9 +3630,8 @@ INSN_ENTRY(opt_and)
|
|
3601
3630
|
DEBUG_ENTER_INSN("opt_and");
|
3602
3631
|
|
3603
3632
|
/* ### Declare and assign variables. ### */
|
3604
|
-
|
3605
|
-
|
3606
|
-
# define INSN_ATTR(x) attr_ ## x ## _opt_and(ci, cc)
|
3633
|
+
CALL_DATA cd = (CALL_DATA)GET_OPERAND(1);
|
3634
|
+
# define INSN_ATTR(x) attr_ ## x ## _opt_and(cd)
|
3607
3635
|
bool leaf = INSN_ATTR(leaf);
|
3608
3636
|
VALUE recv = TOPN(1);
|
3609
3637
|
VALUE obj = TOPN(0);
|
@@ -3613,12 +3641,11 @@ INSN_ENTRY(opt_and)
|
|
3613
3641
|
if (! leaf) ADD_PC(INSN_ATTR(width));
|
3614
3642
|
SETUP_CANARY();
|
3615
3643
|
COLLECT_USAGE_INSN(INSN_ATTR(bin));
|
3616
|
-
COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 0,
|
3617
|
-
COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 1, cc);
|
3644
|
+
COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 0, cd);
|
3618
3645
|
|
3619
3646
|
/* ### Here we do the instruction body. ### */
|
3620
3647
|
# define NAME_OF_CURRENT_INSN opt_and
|
3621
|
-
# line
|
3648
|
+
# line 1271 "insns.def"
|
3622
3649
|
{
|
3623
3650
|
val = vm_opt_and(recv, obj);
|
3624
3651
|
|
@@ -3626,7 +3653,7 @@ INSN_ENTRY(opt_and)
|
|
3626
3653
|
CALL_SIMPLE_METHOD();
|
3627
3654
|
}
|
3628
3655
|
}
|
3629
|
-
# line
|
3656
|
+
# line 3657 "vm.inc"
|
3630
3657
|
# undef NAME_OF_CURRENT_INSN
|
3631
3658
|
|
3632
3659
|
/* ### Instruction trailers. ### */
|
@@ -3634,6 +3661,8 @@ INSN_ENTRY(opt_and)
|
|
3634
3661
|
CHECK_CANARY();
|
3635
3662
|
INC_SP(INSN_ATTR(sp_inc));
|
3636
3663
|
TOPN(0) = val;
|
3664
|
+
VM_ASSERT(!RB_TYPE_P(TOPN(0), T_NONE));
|
3665
|
+
VM_ASSERT(!RB_TYPE_P(TOPN(0), T_MOVED));
|
3637
3666
|
if (leaf) ADD_PC(INSN_ATTR(width));
|
3638
3667
|
# undef INSN_ATTR
|
3639
3668
|
|
@@ -3641,7 +3670,7 @@ INSN_ENTRY(opt_and)
|
|
3641
3670
|
END_INSN(opt_and);
|
3642
3671
|
}
|
3643
3672
|
|
3644
|
-
/* insn opt_or(
|
3673
|
+
/* insn opt_or(cd)(recv, obj)(val) */
|
3645
3674
|
INSN_ENTRY(opt_or)
|
3646
3675
|
{
|
3647
3676
|
/* ### Declare that we have just entered into an instruction. ### */
|
@@ -3649,9 +3678,8 @@ INSN_ENTRY(opt_or)
|
|
3649
3678
|
DEBUG_ENTER_INSN("opt_or");
|
3650
3679
|
|
3651
3680
|
/* ### Declare and assign variables. ### */
|
3652
|
-
|
3653
|
-
|
3654
|
-
# define INSN_ATTR(x) attr_ ## x ## _opt_or(ci, cc)
|
3681
|
+
CALL_DATA cd = (CALL_DATA)GET_OPERAND(1);
|
3682
|
+
# define INSN_ATTR(x) attr_ ## x ## _opt_or(cd)
|
3655
3683
|
bool leaf = INSN_ATTR(leaf);
|
3656
3684
|
VALUE recv = TOPN(1);
|
3657
3685
|
VALUE obj = TOPN(0);
|
@@ -3661,12 +3689,11 @@ INSN_ENTRY(opt_or)
|
|
3661
3689
|
if (! leaf) ADD_PC(INSN_ATTR(width));
|
3662
3690
|
SETUP_CANARY();
|
3663
3691
|
COLLECT_USAGE_INSN(INSN_ATTR(bin));
|
3664
|
-
COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 0,
|
3665
|
-
COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 1, cc);
|
3692
|
+
COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 0, cd);
|
3666
3693
|
|
3667
3694
|
/* ### Here we do the instruction body. ### */
|
3668
3695
|
# define NAME_OF_CURRENT_INSN opt_or
|
3669
|
-
# line
|
3696
|
+
# line 1285 "insns.def"
|
3670
3697
|
{
|
3671
3698
|
val = vm_opt_or(recv, obj);
|
3672
3699
|
|
@@ -3674,7 +3701,7 @@ INSN_ENTRY(opt_or)
|
|
3674
3701
|
CALL_SIMPLE_METHOD();
|
3675
3702
|
}
|
3676
3703
|
}
|
3677
|
-
# line
|
3704
|
+
# line 3705 "vm.inc"
|
3678
3705
|
# undef NAME_OF_CURRENT_INSN
|
3679
3706
|
|
3680
3707
|
/* ### Instruction trailers. ### */
|
@@ -3682,6 +3709,8 @@ INSN_ENTRY(opt_or)
|
|
3682
3709
|
CHECK_CANARY();
|
3683
3710
|
INC_SP(INSN_ATTR(sp_inc));
|
3684
3711
|
TOPN(0) = val;
|
3712
|
+
VM_ASSERT(!RB_TYPE_P(TOPN(0), T_NONE));
|
3713
|
+
VM_ASSERT(!RB_TYPE_P(TOPN(0), T_MOVED));
|
3685
3714
|
if (leaf) ADD_PC(INSN_ATTR(width));
|
3686
3715
|
# undef INSN_ATTR
|
3687
3716
|
|
@@ -3689,7 +3718,7 @@ INSN_ENTRY(opt_or)
|
|
3689
3718
|
END_INSN(opt_or);
|
3690
3719
|
}
|
3691
3720
|
|
3692
|
-
/* insn opt_aref(
|
3721
|
+
/* insn opt_aref(cd)(recv, obj)(val) */
|
3693
3722
|
INSN_ENTRY(opt_aref)
|
3694
3723
|
{
|
3695
3724
|
/* ### Declare that we have just entered into an instruction. ### */
|
@@ -3697,9 +3726,8 @@ INSN_ENTRY(opt_aref)
|
|
3697
3726
|
DEBUG_ENTER_INSN("opt_aref");
|
3698
3727
|
|
3699
3728
|
/* ### Declare and assign variables. ### */
|
3700
|
-
|
3701
|
-
|
3702
|
-
# define INSN_ATTR(x) attr_ ## x ## _opt_aref(ci, cc)
|
3729
|
+
CALL_DATA cd = (CALL_DATA)GET_OPERAND(1);
|
3730
|
+
# define INSN_ATTR(x) attr_ ## x ## _opt_aref(cd)
|
3703
3731
|
bool leaf = INSN_ATTR(leaf);
|
3704
3732
|
VALUE recv = TOPN(1);
|
3705
3733
|
VALUE obj = TOPN(0);
|
@@ -3709,12 +3737,11 @@ INSN_ENTRY(opt_aref)
|
|
3709
3737
|
if (! leaf) ADD_PC(INSN_ATTR(width));
|
3710
3738
|
SETUP_CANARY();
|
3711
3739
|
COLLECT_USAGE_INSN(INSN_ATTR(bin));
|
3712
|
-
COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 0,
|
3713
|
-
COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 1, cc);
|
3740
|
+
COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 0, cd);
|
3714
3741
|
|
3715
3742
|
/* ### Here we do the instruction body. ### */
|
3716
3743
|
# define NAME_OF_CURRENT_INSN opt_aref
|
3717
|
-
# line
|
3744
|
+
# line 1304 "insns.def"
|
3718
3745
|
{
|
3719
3746
|
val = vm_opt_aref(recv, obj);
|
3720
3747
|
|
@@ -3722,7 +3749,7 @@ INSN_ENTRY(opt_aref)
|
|
3722
3749
|
CALL_SIMPLE_METHOD();
|
3723
3750
|
}
|
3724
3751
|
}
|
3725
|
-
# line
|
3752
|
+
# line 3753 "vm.inc"
|
3726
3753
|
# undef NAME_OF_CURRENT_INSN
|
3727
3754
|
|
3728
3755
|
/* ### Instruction trailers. ### */
|
@@ -3730,6 +3757,8 @@ INSN_ENTRY(opt_aref)
|
|
3730
3757
|
CHECK_CANARY();
|
3731
3758
|
INC_SP(INSN_ATTR(sp_inc));
|
3732
3759
|
TOPN(0) = val;
|
3760
|
+
VM_ASSERT(!RB_TYPE_P(TOPN(0), T_NONE));
|
3761
|
+
VM_ASSERT(!RB_TYPE_P(TOPN(0), T_MOVED));
|
3733
3762
|
if (leaf) ADD_PC(INSN_ATTR(width));
|
3734
3763
|
# undef INSN_ATTR
|
3735
3764
|
|
@@ -3737,7 +3766,7 @@ INSN_ENTRY(opt_aref)
|
|
3737
3766
|
END_INSN(opt_aref);
|
3738
3767
|
}
|
3739
3768
|
|
3740
|
-
/* insn opt_aset(
|
3769
|
+
/* insn opt_aset(cd)(recv, obj, set)(val) */
|
3741
3770
|
INSN_ENTRY(opt_aset)
|
3742
3771
|
{
|
3743
3772
|
/* ### Declare that we have just entered into an instruction. ### */
|
@@ -3745,9 +3774,8 @@ INSN_ENTRY(opt_aset)
|
|
3745
3774
|
DEBUG_ENTER_INSN("opt_aset");
|
3746
3775
|
|
3747
3776
|
/* ### Declare and assign variables. ### */
|
3748
|
-
|
3749
|
-
|
3750
|
-
# define INSN_ATTR(x) attr_ ## x ## _opt_aset(ci, cc)
|
3777
|
+
CALL_DATA cd = (CALL_DATA)GET_OPERAND(1);
|
3778
|
+
# define INSN_ATTR(x) attr_ ## x ## _opt_aset(cd)
|
3751
3779
|
bool leaf = INSN_ATTR(leaf);
|
3752
3780
|
VALUE recv = TOPN(2);
|
3753
3781
|
VALUE obj = TOPN(1);
|
@@ -3758,12 +3786,11 @@ INSN_ENTRY(opt_aset)
|
|
3758
3786
|
if (! leaf) ADD_PC(INSN_ATTR(width));
|
3759
3787
|
SETUP_CANARY();
|
3760
3788
|
COLLECT_USAGE_INSN(INSN_ATTR(bin));
|
3761
|
-
COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 0,
|
3762
|
-
COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 1, cc);
|
3789
|
+
COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 0, cd);
|
3763
3790
|
|
3764
3791
|
/* ### Here we do the instruction body. ### */
|
3765
3792
|
# define NAME_OF_CURRENT_INSN opt_aset
|
3766
|
-
# line
|
3793
|
+
# line 1321 "insns.def"
|
3767
3794
|
{
|
3768
3795
|
val = vm_opt_aset(recv, obj, set);
|
3769
3796
|
|
@@ -3771,7 +3798,7 @@ INSN_ENTRY(opt_aset)
|
|
3771
3798
|
CALL_SIMPLE_METHOD();
|
3772
3799
|
}
|
3773
3800
|
}
|
3774
|
-
# line
|
3801
|
+
# line 3802 "vm.inc"
|
3775
3802
|
# undef NAME_OF_CURRENT_INSN
|
3776
3803
|
|
3777
3804
|
/* ### Instruction trailers. ### */
|
@@ -3779,6 +3806,8 @@ INSN_ENTRY(opt_aset)
|
|
3779
3806
|
CHECK_CANARY();
|
3780
3807
|
INC_SP(INSN_ATTR(sp_inc));
|
3781
3808
|
TOPN(0) = val;
|
3809
|
+
VM_ASSERT(!RB_TYPE_P(TOPN(0), T_NONE));
|
3810
|
+
VM_ASSERT(!RB_TYPE_P(TOPN(0), T_MOVED));
|
3782
3811
|
if (leaf) ADD_PC(INSN_ATTR(width));
|
3783
3812
|
# undef INSN_ATTR
|
3784
3813
|
|
@@ -3786,7 +3815,7 @@ INSN_ENTRY(opt_aset)
|
|
3786
3815
|
END_INSN(opt_aset);
|
3787
3816
|
}
|
3788
3817
|
|
3789
|
-
/* insn opt_aset_with(key,
|
3818
|
+
/* insn opt_aset_with(key, cd)(recv, val)(val) */
|
3790
3819
|
INSN_ENTRY(opt_aset_with)
|
3791
3820
|
{
|
3792
3821
|
/* ### Declare that we have just entered into an instruction. ### */
|
@@ -3795,9 +3824,8 @@ INSN_ENTRY(opt_aset_with)
|
|
3795
3824
|
|
3796
3825
|
/* ### Declare and assign variables. ### */
|
3797
3826
|
VALUE key = (VALUE)GET_OPERAND(1);
|
3798
|
-
|
3799
|
-
|
3800
|
-
# define INSN_ATTR(x) attr_ ## x ## _opt_aset_with(key, ci, cc)
|
3827
|
+
CALL_DATA cd = (CALL_DATA)GET_OPERAND(2);
|
3828
|
+
# define INSN_ATTR(x) attr_ ## x ## _opt_aset_with(key, cd)
|
3801
3829
|
bool leaf = INSN_ATTR(leaf);
|
3802
3830
|
VALUE recv = TOPN(1);
|
3803
3831
|
VALUE val = TOPN(0);
|
@@ -3807,12 +3835,11 @@ INSN_ENTRY(opt_aset_with)
|
|
3807
3835
|
SETUP_CANARY();
|
3808
3836
|
COLLECT_USAGE_INSN(INSN_ATTR(bin));
|
3809
3837
|
COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 0, key);
|
3810
|
-
COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 1,
|
3811
|
-
COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 2, cc);
|
3838
|
+
COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 1, cd);
|
3812
3839
|
|
3813
3840
|
/* ### Here we do the instruction body. ### */
|
3814
3841
|
# define NAME_OF_CURRENT_INSN opt_aset_with
|
3815
|
-
# line
|
3842
|
+
# line 1337 "insns.def"
|
3816
3843
|
{
|
3817
3844
|
VALUE tmp = vm_opt_aset_with(recv, key, val);
|
3818
3845
|
|
@@ -3827,7 +3854,7 @@ INSN_ENTRY(opt_aset_with)
|
|
3827
3854
|
CALL_SIMPLE_METHOD();
|
3828
3855
|
}
|
3829
3856
|
}
|
3830
|
-
# line
|
3857
|
+
# line 3858 "vm.inc"
|
3831
3858
|
# undef NAME_OF_CURRENT_INSN
|
3832
3859
|
|
3833
3860
|
/* ### Instruction trailers. ### */
|
@@ -3835,6 +3862,8 @@ INSN_ENTRY(opt_aset_with)
|
|
3835
3862
|
CHECK_CANARY();
|
3836
3863
|
INC_SP(INSN_ATTR(sp_inc));
|
3837
3864
|
TOPN(0) = val;
|
3865
|
+
VM_ASSERT(!RB_TYPE_P(TOPN(0), T_NONE));
|
3866
|
+
VM_ASSERT(!RB_TYPE_P(TOPN(0), T_MOVED));
|
3838
3867
|
if (leaf) ADD_PC(INSN_ATTR(width));
|
3839
3868
|
# undef INSN_ATTR
|
3840
3869
|
|
@@ -3842,7 +3871,7 @@ INSN_ENTRY(opt_aset_with)
|
|
3842
3871
|
END_INSN(opt_aset_with);
|
3843
3872
|
}
|
3844
3873
|
|
3845
|
-
/* insn opt_aref_with(key,
|
3874
|
+
/* insn opt_aref_with(key, cd)(recv)(val) */
|
3846
3875
|
INSN_ENTRY(opt_aref_with)
|
3847
3876
|
{
|
3848
3877
|
/* ### Declare that we have just entered into an instruction. ### */
|
@@ -3851,9 +3880,8 @@ INSN_ENTRY(opt_aref_with)
|
|
3851
3880
|
|
3852
3881
|
/* ### Declare and assign variables. ### */
|
3853
3882
|
VALUE key = (VALUE)GET_OPERAND(1);
|
3854
|
-
|
3855
|
-
|
3856
|
-
# define INSN_ATTR(x) attr_ ## x ## _opt_aref_with(key, ci, cc)
|
3883
|
+
CALL_DATA cd = (CALL_DATA)GET_OPERAND(2);
|
3884
|
+
# define INSN_ATTR(x) attr_ ## x ## _opt_aref_with(key, cd)
|
3857
3885
|
bool leaf = INSN_ATTR(leaf);
|
3858
3886
|
VALUE recv = TOPN(0);
|
3859
3887
|
VALUE val;
|
@@ -3863,12 +3891,11 @@ INSN_ENTRY(opt_aref_with)
|
|
3863
3891
|
SETUP_CANARY();
|
3864
3892
|
COLLECT_USAGE_INSN(INSN_ATTR(bin));
|
3865
3893
|
COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 0, key);
|
3866
|
-
COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 1,
|
3867
|
-
COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 2, cc);
|
3894
|
+
COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 1, cd);
|
3868
3895
|
|
3869
3896
|
/* ### Here we do the instruction body. ### */
|
3870
3897
|
# define NAME_OF_CURRENT_INSN opt_aref_with
|
3871
|
-
# line
|
3898
|
+
# line 1360 "insns.def"
|
3872
3899
|
{
|
3873
3900
|
val = vm_opt_aref_with(recv, key);
|
3874
3901
|
|
@@ -3879,7 +3906,7 @@ INSN_ENTRY(opt_aref_with)
|
|
3879
3906
|
CALL_SIMPLE_METHOD();
|
3880
3907
|
}
|
3881
3908
|
}
|
3882
|
-
# line
|
3909
|
+
# line 3910 "vm.inc"
|
3883
3910
|
# undef NAME_OF_CURRENT_INSN
|
3884
3911
|
|
3885
3912
|
/* ### Instruction trailers. ### */
|
@@ -3887,6 +3914,8 @@ INSN_ENTRY(opt_aref_with)
|
|
3887
3914
|
CHECK_CANARY();
|
3888
3915
|
INC_SP(INSN_ATTR(sp_inc));
|
3889
3916
|
TOPN(0) = val;
|
3917
|
+
VM_ASSERT(!RB_TYPE_P(TOPN(0), T_NONE));
|
3918
|
+
VM_ASSERT(!RB_TYPE_P(TOPN(0), T_MOVED));
|
3890
3919
|
if (leaf) ADD_PC(INSN_ATTR(width));
|
3891
3920
|
# undef INSN_ATTR
|
3892
3921
|
|
@@ -3894,7 +3923,7 @@ INSN_ENTRY(opt_aref_with)
|
|
3894
3923
|
END_INSN(opt_aref_with);
|
3895
3924
|
}
|
3896
3925
|
|
3897
|
-
/* insn opt_length(
|
3926
|
+
/* insn opt_length(cd)(recv)(val) */
|
3898
3927
|
INSN_ENTRY(opt_length)
|
3899
3928
|
{
|
3900
3929
|
/* ### Declare that we have just entered into an instruction. ### */
|
@@ -3902,9 +3931,8 @@ INSN_ENTRY(opt_length)
|
|
3902
3931
|
DEBUG_ENTER_INSN("opt_length");
|
3903
3932
|
|
3904
3933
|
/* ### Declare and assign variables. ### */
|
3905
|
-
|
3906
|
-
|
3907
|
-
# define INSN_ATTR(x) attr_ ## x ## _opt_length(ci, cc)
|
3934
|
+
CALL_DATA cd = (CALL_DATA)GET_OPERAND(1);
|
3935
|
+
# define INSN_ATTR(x) attr_ ## x ## _opt_length(cd)
|
3908
3936
|
bool leaf = INSN_ATTR(leaf);
|
3909
3937
|
VALUE recv = TOPN(0);
|
3910
3938
|
VALUE val;
|
@@ -3913,12 +3941,11 @@ INSN_ENTRY(opt_length)
|
|
3913
3941
|
if (! leaf) ADD_PC(INSN_ATTR(width));
|
3914
3942
|
SETUP_CANARY();
|
3915
3943
|
COLLECT_USAGE_INSN(INSN_ATTR(bin));
|
3916
|
-
COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 0,
|
3917
|
-
COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 1, cc);
|
3944
|
+
COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 0, cd);
|
3918
3945
|
|
3919
3946
|
/* ### Here we do the instruction body. ### */
|
3920
3947
|
# define NAME_OF_CURRENT_INSN opt_length
|
3921
|
-
# line
|
3948
|
+
# line 1377 "insns.def"
|
3922
3949
|
{
|
3923
3950
|
val = vm_opt_length(recv, BOP_LENGTH);
|
3924
3951
|
|
@@ -3926,7 +3953,7 @@ INSN_ENTRY(opt_length)
|
|
3926
3953
|
CALL_SIMPLE_METHOD();
|
3927
3954
|
}
|
3928
3955
|
}
|
3929
|
-
# line
|
3956
|
+
# line 3957 "vm.inc"
|
3930
3957
|
# undef NAME_OF_CURRENT_INSN
|
3931
3958
|
|
3932
3959
|
/* ### Instruction trailers. ### */
|
@@ -3934,6 +3961,8 @@ INSN_ENTRY(opt_length)
|
|
3934
3961
|
CHECK_CANARY();
|
3935
3962
|
INC_SP(INSN_ATTR(sp_inc));
|
3936
3963
|
TOPN(0) = val;
|
3964
|
+
VM_ASSERT(!RB_TYPE_P(TOPN(0), T_NONE));
|
3965
|
+
VM_ASSERT(!RB_TYPE_P(TOPN(0), T_MOVED));
|
3937
3966
|
if (leaf) ADD_PC(INSN_ATTR(width));
|
3938
3967
|
# undef INSN_ATTR
|
3939
3968
|
|
@@ -3941,7 +3970,7 @@ INSN_ENTRY(opt_length)
|
|
3941
3970
|
END_INSN(opt_length);
|
3942
3971
|
}
|
3943
3972
|
|
3944
|
-
/* insn opt_size(
|
3973
|
+
/* insn opt_size(cd)(recv)(val) */
|
3945
3974
|
INSN_ENTRY(opt_size)
|
3946
3975
|
{
|
3947
3976
|
/* ### Declare that we have just entered into an instruction. ### */
|
@@ -3949,9 +3978,8 @@ INSN_ENTRY(opt_size)
|
|
3949
3978
|
DEBUG_ENTER_INSN("opt_size");
|
3950
3979
|
|
3951
3980
|
/* ### Declare and assign variables. ### */
|
3952
|
-
|
3953
|
-
|
3954
|
-
# define INSN_ATTR(x) attr_ ## x ## _opt_size(ci, cc)
|
3981
|
+
CALL_DATA cd = (CALL_DATA)GET_OPERAND(1);
|
3982
|
+
# define INSN_ATTR(x) attr_ ## x ## _opt_size(cd)
|
3955
3983
|
bool leaf = INSN_ATTR(leaf);
|
3956
3984
|
VALUE recv = TOPN(0);
|
3957
3985
|
VALUE val;
|
@@ -3960,12 +3988,11 @@ INSN_ENTRY(opt_size)
|
|
3960
3988
|
if (! leaf) ADD_PC(INSN_ATTR(width));
|
3961
3989
|
SETUP_CANARY();
|
3962
3990
|
COLLECT_USAGE_INSN(INSN_ATTR(bin));
|
3963
|
-
COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 0,
|
3964
|
-
COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 1, cc);
|
3991
|
+
COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 0, cd);
|
3965
3992
|
|
3966
3993
|
/* ### Here we do the instruction body. ### */
|
3967
3994
|
# define NAME_OF_CURRENT_INSN opt_size
|
3968
|
-
# line
|
3995
|
+
# line 1391 "insns.def"
|
3969
3996
|
{
|
3970
3997
|
val = vm_opt_length(recv, BOP_SIZE);
|
3971
3998
|
|
@@ -3973,7 +4000,7 @@ INSN_ENTRY(opt_size)
|
|
3973
4000
|
CALL_SIMPLE_METHOD();
|
3974
4001
|
}
|
3975
4002
|
}
|
3976
|
-
# line
|
4003
|
+
# line 4004 "vm.inc"
|
3977
4004
|
# undef NAME_OF_CURRENT_INSN
|
3978
4005
|
|
3979
4006
|
/* ### Instruction trailers. ### */
|
@@ -3981,6 +4008,8 @@ INSN_ENTRY(opt_size)
|
|
3981
4008
|
CHECK_CANARY();
|
3982
4009
|
INC_SP(INSN_ATTR(sp_inc));
|
3983
4010
|
TOPN(0) = val;
|
4011
|
+
VM_ASSERT(!RB_TYPE_P(TOPN(0), T_NONE));
|
4012
|
+
VM_ASSERT(!RB_TYPE_P(TOPN(0), T_MOVED));
|
3984
4013
|
if (leaf) ADD_PC(INSN_ATTR(width));
|
3985
4014
|
# undef INSN_ATTR
|
3986
4015
|
|
@@ -3988,7 +4017,7 @@ INSN_ENTRY(opt_size)
|
|
3988
4017
|
END_INSN(opt_size);
|
3989
4018
|
}
|
3990
4019
|
|
3991
|
-
/* insn opt_empty_p(
|
4020
|
+
/* insn opt_empty_p(cd)(recv)(val) */
|
3992
4021
|
INSN_ENTRY(opt_empty_p)
|
3993
4022
|
{
|
3994
4023
|
/* ### Declare that we have just entered into an instruction. ### */
|
@@ -3996,9 +4025,8 @@ INSN_ENTRY(opt_empty_p)
|
|
3996
4025
|
DEBUG_ENTER_INSN("opt_empty_p");
|
3997
4026
|
|
3998
4027
|
/* ### Declare and assign variables. ### */
|
3999
|
-
|
4000
|
-
|
4001
|
-
# define INSN_ATTR(x) attr_ ## x ## _opt_empty_p(ci, cc)
|
4028
|
+
CALL_DATA cd = (CALL_DATA)GET_OPERAND(1);
|
4029
|
+
# define INSN_ATTR(x) attr_ ## x ## _opt_empty_p(cd)
|
4002
4030
|
bool leaf = INSN_ATTR(leaf);
|
4003
4031
|
VALUE recv = TOPN(0);
|
4004
4032
|
VALUE val;
|
@@ -4007,12 +4035,11 @@ INSN_ENTRY(opt_empty_p)
|
|
4007
4035
|
if (! leaf) ADD_PC(INSN_ATTR(width));
|
4008
4036
|
SETUP_CANARY();
|
4009
4037
|
COLLECT_USAGE_INSN(INSN_ATTR(bin));
|
4010
|
-
COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 0,
|
4011
|
-
COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 1, cc);
|
4038
|
+
COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 0, cd);
|
4012
4039
|
|
4013
4040
|
/* ### Here we do the instruction body. ### */
|
4014
4041
|
# define NAME_OF_CURRENT_INSN opt_empty_p
|
4015
|
-
# line
|
4042
|
+
# line 1405 "insns.def"
|
4016
4043
|
{
|
4017
4044
|
val = vm_opt_empty_p(recv);
|
4018
4045
|
|
@@ -4020,7 +4047,7 @@ INSN_ENTRY(opt_empty_p)
|
|
4020
4047
|
CALL_SIMPLE_METHOD();
|
4021
4048
|
}
|
4022
4049
|
}
|
4023
|
-
# line
|
4050
|
+
# line 4051 "vm.inc"
|
4024
4051
|
# undef NAME_OF_CURRENT_INSN
|
4025
4052
|
|
4026
4053
|
/* ### Instruction trailers. ### */
|
@@ -4028,6 +4055,8 @@ INSN_ENTRY(opt_empty_p)
|
|
4028
4055
|
CHECK_CANARY();
|
4029
4056
|
INC_SP(INSN_ATTR(sp_inc));
|
4030
4057
|
TOPN(0) = val;
|
4058
|
+
VM_ASSERT(!RB_TYPE_P(TOPN(0), T_NONE));
|
4059
|
+
VM_ASSERT(!RB_TYPE_P(TOPN(0), T_MOVED));
|
4031
4060
|
if (leaf) ADD_PC(INSN_ATTR(width));
|
4032
4061
|
# undef INSN_ATTR
|
4033
4062
|
|
@@ -4035,7 +4064,7 @@ INSN_ENTRY(opt_empty_p)
|
|
4035
4064
|
END_INSN(opt_empty_p);
|
4036
4065
|
}
|
4037
4066
|
|
4038
|
-
/* insn opt_succ(
|
4067
|
+
/* insn opt_succ(cd)(recv)(val) */
|
4039
4068
|
INSN_ENTRY(opt_succ)
|
4040
4069
|
{
|
4041
4070
|
/* ### Declare that we have just entered into an instruction. ### */
|
@@ -4043,9 +4072,8 @@ INSN_ENTRY(opt_succ)
|
|
4043
4072
|
DEBUG_ENTER_INSN("opt_succ");
|
4044
4073
|
|
4045
4074
|
/* ### Declare and assign variables. ### */
|
4046
|
-
|
4047
|
-
|
4048
|
-
# define INSN_ATTR(x) attr_ ## x ## _opt_succ(ci, cc)
|
4075
|
+
CALL_DATA cd = (CALL_DATA)GET_OPERAND(1);
|
4076
|
+
# define INSN_ATTR(x) attr_ ## x ## _opt_succ(cd)
|
4049
4077
|
bool leaf = INSN_ATTR(leaf);
|
4050
4078
|
VALUE recv = TOPN(0);
|
4051
4079
|
VALUE val;
|
@@ -4054,12 +4082,11 @@ INSN_ENTRY(opt_succ)
|
|
4054
4082
|
if (! leaf) ADD_PC(INSN_ATTR(width));
|
4055
4083
|
SETUP_CANARY();
|
4056
4084
|
COLLECT_USAGE_INSN(INSN_ATTR(bin));
|
4057
|
-
COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 0,
|
4058
|
-
COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 1, cc);
|
4085
|
+
COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 0, cd);
|
4059
4086
|
|
4060
4087
|
/* ### Here we do the instruction body. ### */
|
4061
4088
|
# define NAME_OF_CURRENT_INSN opt_succ
|
4062
|
-
# line
|
4089
|
+
# line 1419 "insns.def"
|
4063
4090
|
{
|
4064
4091
|
val = vm_opt_succ(recv);
|
4065
4092
|
|
@@ -4067,7 +4094,7 @@ INSN_ENTRY(opt_succ)
|
|
4067
4094
|
CALL_SIMPLE_METHOD();
|
4068
4095
|
}
|
4069
4096
|
}
|
4070
|
-
# line
|
4097
|
+
# line 4098 "vm.inc"
|
4071
4098
|
# undef NAME_OF_CURRENT_INSN
|
4072
4099
|
|
4073
4100
|
/* ### Instruction trailers. ### */
|
@@ -4075,6 +4102,8 @@ INSN_ENTRY(opt_succ)
|
|
4075
4102
|
CHECK_CANARY();
|
4076
4103
|
INC_SP(INSN_ATTR(sp_inc));
|
4077
4104
|
TOPN(0) = val;
|
4105
|
+
VM_ASSERT(!RB_TYPE_P(TOPN(0), T_NONE));
|
4106
|
+
VM_ASSERT(!RB_TYPE_P(TOPN(0), T_MOVED));
|
4078
4107
|
if (leaf) ADD_PC(INSN_ATTR(width));
|
4079
4108
|
# undef INSN_ATTR
|
4080
4109
|
|
@@ -4082,7 +4111,7 @@ INSN_ENTRY(opt_succ)
|
|
4082
4111
|
END_INSN(opt_succ);
|
4083
4112
|
}
|
4084
4113
|
|
4085
|
-
/* insn opt_not(
|
4114
|
+
/* insn opt_not(cd)(recv)(val) */
|
4086
4115
|
INSN_ENTRY(opt_not)
|
4087
4116
|
{
|
4088
4117
|
/* ### Declare that we have just entered into an instruction. ### */
|
@@ -4090,9 +4119,8 @@ INSN_ENTRY(opt_not)
|
|
4090
4119
|
DEBUG_ENTER_INSN("opt_not");
|
4091
4120
|
|
4092
4121
|
/* ### Declare and assign variables. ### */
|
4093
|
-
|
4094
|
-
|
4095
|
-
# define INSN_ATTR(x) attr_ ## x ## _opt_not(ci, cc)
|
4122
|
+
CALL_DATA cd = (CALL_DATA)GET_OPERAND(1);
|
4123
|
+
# define INSN_ATTR(x) attr_ ## x ## _opt_not(cd)
|
4096
4124
|
bool leaf = INSN_ATTR(leaf);
|
4097
4125
|
VALUE recv = TOPN(0);
|
4098
4126
|
VALUE val;
|
@@ -4101,20 +4129,19 @@ INSN_ENTRY(opt_not)
|
|
4101
4129
|
if (! leaf) ADD_PC(INSN_ATTR(width));
|
4102
4130
|
SETUP_CANARY();
|
4103
4131
|
COLLECT_USAGE_INSN(INSN_ATTR(bin));
|
4104
|
-
COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 0,
|
4105
|
-
COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 1, cc);
|
4132
|
+
COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 0, cd);
|
4106
4133
|
|
4107
4134
|
/* ### Here we do the instruction body. ### */
|
4108
4135
|
# define NAME_OF_CURRENT_INSN opt_not
|
4109
|
-
# line
|
4136
|
+
# line 1433 "insns.def"
|
4110
4137
|
{
|
4111
|
-
val = vm_opt_not(
|
4138
|
+
val = vm_opt_not(cd, recv);
|
4112
4139
|
|
4113
4140
|
if (val == Qundef) {
|
4114
4141
|
CALL_SIMPLE_METHOD();
|
4115
4142
|
}
|
4116
4143
|
}
|
4117
|
-
# line
|
4144
|
+
# line 4145 "vm.inc"
|
4118
4145
|
# undef NAME_OF_CURRENT_INSN
|
4119
4146
|
|
4120
4147
|
/* ### Instruction trailers. ### */
|
@@ -4122,6 +4149,8 @@ INSN_ENTRY(opt_not)
|
|
4122
4149
|
CHECK_CANARY();
|
4123
4150
|
INC_SP(INSN_ATTR(sp_inc));
|
4124
4151
|
TOPN(0) = val;
|
4152
|
+
VM_ASSERT(!RB_TYPE_P(TOPN(0), T_NONE));
|
4153
|
+
VM_ASSERT(!RB_TYPE_P(TOPN(0), T_MOVED));
|
4125
4154
|
if (leaf) ADD_PC(INSN_ATTR(width));
|
4126
4155
|
# undef INSN_ATTR
|
4127
4156
|
|
@@ -4129,7 +4158,7 @@ INSN_ENTRY(opt_not)
|
|
4129
4158
|
END_INSN(opt_not);
|
4130
4159
|
}
|
4131
4160
|
|
4132
|
-
/* insn opt_regexpmatch2(
|
4161
|
+
/* insn opt_regexpmatch2(cd)(obj2, obj1)(val) */
|
4133
4162
|
INSN_ENTRY(opt_regexpmatch2)
|
4134
4163
|
{
|
4135
4164
|
/* ### Declare that we have just entered into an instruction. ### */
|
@@ -4137,9 +4166,8 @@ INSN_ENTRY(opt_regexpmatch2)
|
|
4137
4166
|
DEBUG_ENTER_INSN("opt_regexpmatch2");
|
4138
4167
|
|
4139
4168
|
/* ### Declare and assign variables. ### */
|
4140
|
-
|
4141
|
-
|
4142
|
-
# define INSN_ATTR(x) attr_ ## x ## _opt_regexpmatch2(ci, cc)
|
4169
|
+
CALL_DATA cd = (CALL_DATA)GET_OPERAND(1);
|
4170
|
+
# define INSN_ATTR(x) attr_ ## x ## _opt_regexpmatch2(cd)
|
4143
4171
|
bool leaf = INSN_ATTR(leaf);
|
4144
4172
|
VALUE obj2 = TOPN(1);
|
4145
4173
|
VALUE obj1 = TOPN(0);
|
@@ -4149,12 +4177,11 @@ INSN_ENTRY(opt_regexpmatch2)
|
|
4149
4177
|
if (! leaf) ADD_PC(INSN_ATTR(width));
|
4150
4178
|
SETUP_CANARY();
|
4151
4179
|
COLLECT_USAGE_INSN(INSN_ATTR(bin));
|
4152
|
-
COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 0,
|
4153
|
-
COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 1, cc);
|
4180
|
+
COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 0, cd);
|
4154
4181
|
|
4155
4182
|
/* ### Here we do the instruction body. ### */
|
4156
4183
|
# define NAME_OF_CURRENT_INSN opt_regexpmatch2
|
4157
|
-
# line
|
4184
|
+
# line 1448 "insns.def"
|
4158
4185
|
{
|
4159
4186
|
val = vm_opt_regexpmatch2(obj2, obj1);
|
4160
4187
|
|
@@ -4162,7 +4189,7 @@ INSN_ENTRY(opt_regexpmatch2)
|
|
4162
4189
|
CALL_SIMPLE_METHOD();
|
4163
4190
|
}
|
4164
4191
|
}
|
4165
|
-
# line
|
4192
|
+
# line 4193 "vm.inc"
|
4166
4193
|
# undef NAME_OF_CURRENT_INSN
|
4167
4194
|
|
4168
4195
|
/* ### Instruction trailers. ### */
|
@@ -4170,6 +4197,8 @@ INSN_ENTRY(opt_regexpmatch2)
|
|
4170
4197
|
CHECK_CANARY();
|
4171
4198
|
INC_SP(INSN_ATTR(sp_inc));
|
4172
4199
|
TOPN(0) = val;
|
4200
|
+
VM_ASSERT(!RB_TYPE_P(TOPN(0), T_NONE));
|
4201
|
+
VM_ASSERT(!RB_TYPE_P(TOPN(0), T_MOVED));
|
4173
4202
|
if (leaf) ADD_PC(INSN_ATTR(width));
|
4174
4203
|
# undef INSN_ATTR
|
4175
4204
|
|
@@ -4198,7 +4227,7 @@ INSN_ENTRY(opt_call_c_function)
|
|
4198
4227
|
|
4199
4228
|
/* ### Here we do the instruction body. ### */
|
4200
4229
|
# define NAME_OF_CURRENT_INSN opt_call_c_function
|
4201
|
-
# line
|
4230
|
+
# line 1464 "insns.def"
|
4202
4231
|
{
|
4203
4232
|
reg_cfp = (funcptr)(ec, reg_cfp);
|
4204
4233
|
|
@@ -4211,7 +4240,7 @@ INSN_ENTRY(opt_call_c_function)
|
|
4211
4240
|
RESTORE_REGS();
|
4212
4241
|
NEXT_INSN();
|
4213
4242
|
}
|
4214
|
-
# line
|
4243
|
+
# line 4244 "vm.inc"
|
4215
4244
|
# undef NAME_OF_CURRENT_INSN
|
4216
4245
|
|
4217
4246
|
/* ### Instruction trailers. ### */
|
@@ -4224,6 +4253,150 @@ INSN_ENTRY(opt_call_c_function)
|
|
4224
4253
|
END_INSN(opt_call_c_function);
|
4225
4254
|
}
|
4226
4255
|
|
4256
|
+
/* insn invokebuiltin(bf)(...)(ret) */
|
4257
|
+
INSN_ENTRY(invokebuiltin)
|
4258
|
+
{
|
4259
|
+
/* ### Declare that we have just entered into an instruction. ### */
|
4260
|
+
START_OF_ORIGINAL_INSN(invokebuiltin);
|
4261
|
+
DEBUG_ENTER_INSN("invokebuiltin");
|
4262
|
+
|
4263
|
+
/* ### Declare and assign variables. ### */
|
4264
|
+
RB_BUILTIN bf = (RB_BUILTIN)GET_OPERAND(1);
|
4265
|
+
# define INSN_ATTR(x) attr_ ## x ## _invokebuiltin(bf)
|
4266
|
+
bool leaf = INSN_ATTR(leaf);
|
4267
|
+
VALUE ret;
|
4268
|
+
|
4269
|
+
/* ### Instruction preambles. ### */
|
4270
|
+
if (! leaf) ADD_PC(INSN_ATTR(width));
|
4271
|
+
SETUP_CANARY();
|
4272
|
+
COLLECT_USAGE_INSN(INSN_ATTR(bin));
|
4273
|
+
COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 0, bf);
|
4274
|
+
|
4275
|
+
/* ### Here we do the instruction body. ### */
|
4276
|
+
# define NAME_OF_CURRENT_INSN invokebuiltin
|
4277
|
+
# line 1485 "insns.def"
|
4278
|
+
{
|
4279
|
+
ret = vm_invoke_builtin(ec, reg_cfp, bf, STACK_ADDR_FROM_TOP(bf->argc));
|
4280
|
+
}
|
4281
|
+
# line 4282 "vm.inc"
|
4282
|
+
# undef NAME_OF_CURRENT_INSN
|
4283
|
+
|
4284
|
+
/* ### Instruction trailers. ### */
|
4285
|
+
CHECK_VM_STACK_OVERFLOW_FOR_INSN(VM_REG_CFP, INSN_ATTR(retn));
|
4286
|
+
CHECK_CANARY();
|
4287
|
+
INC_SP(INSN_ATTR(sp_inc));
|
4288
|
+
TOPN(0) = ret;
|
4289
|
+
VM_ASSERT(!RB_TYPE_P(TOPN(0), T_NONE));
|
4290
|
+
VM_ASSERT(!RB_TYPE_P(TOPN(0), T_MOVED));
|
4291
|
+
if (leaf) ADD_PC(INSN_ATTR(width));
|
4292
|
+
# undef INSN_ATTR
|
4293
|
+
|
4294
|
+
/* ### Leave the instruction. ### */
|
4295
|
+
END_INSN(invokebuiltin);
|
4296
|
+
}
|
4297
|
+
|
4298
|
+
/* insn opt_invokebuiltin_delegate(bf, index)()(ret) */
|
4299
|
+
INSN_ENTRY(opt_invokebuiltin_delegate)
|
4300
|
+
{
|
4301
|
+
/* ### Declare that we have just entered into an instruction. ### */
|
4302
|
+
START_OF_ORIGINAL_INSN(opt_invokebuiltin_delegate);
|
4303
|
+
DEBUG_ENTER_INSN("opt_invokebuiltin_delegate");
|
4304
|
+
|
4305
|
+
/* ### Declare and assign variables. ### */
|
4306
|
+
RB_BUILTIN bf = (RB_BUILTIN)GET_OPERAND(1);
|
4307
|
+
rb_num_t index = (rb_num_t)GET_OPERAND(2);
|
4308
|
+
# define INSN_ATTR(x) attr_ ## x ## _opt_invokebuiltin_delegate(bf, index)
|
4309
|
+
bool leaf = INSN_ATTR(leaf);
|
4310
|
+
VALUE ret;
|
4311
|
+
|
4312
|
+
/* ### Instruction preambles. ### */
|
4313
|
+
if (! leaf) ADD_PC(INSN_ATTR(width));
|
4314
|
+
SETUP_CANARY();
|
4315
|
+
COLLECT_USAGE_INSN(INSN_ATTR(bin));
|
4316
|
+
COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 0, bf);
|
4317
|
+
COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 1, index);
|
4318
|
+
|
4319
|
+
/* ### Here we do the instruction body. ### */
|
4320
|
+
# define NAME_OF_CURRENT_INSN opt_invokebuiltin_delegate
|
4321
|
+
# line 1496 "insns.def"
|
4322
|
+
{
|
4323
|
+
ret = vm_invoke_builtin_delegate(ec, reg_cfp, bf, (unsigned int)index);
|
4324
|
+
}
|
4325
|
+
# line 4326 "vm.inc"
|
4326
|
+
# undef NAME_OF_CURRENT_INSN
|
4327
|
+
|
4328
|
+
/* ### Instruction trailers. ### */
|
4329
|
+
CHECK_VM_STACK_OVERFLOW_FOR_INSN(VM_REG_CFP, INSN_ATTR(retn));
|
4330
|
+
CHECK_CANARY();
|
4331
|
+
INC_SP(INSN_ATTR(sp_inc));
|
4332
|
+
TOPN(0) = ret;
|
4333
|
+
VM_ASSERT(!RB_TYPE_P(TOPN(0), T_NONE));
|
4334
|
+
VM_ASSERT(!RB_TYPE_P(TOPN(0), T_MOVED));
|
4335
|
+
if (leaf) ADD_PC(INSN_ATTR(width));
|
4336
|
+
# undef INSN_ATTR
|
4337
|
+
|
4338
|
+
/* ### Leave the instruction. ### */
|
4339
|
+
END_INSN(opt_invokebuiltin_delegate);
|
4340
|
+
}
|
4341
|
+
|
4342
|
+
/* insn opt_invokebuiltin_delegate_leave(bf, index)()(val) */
|
4343
|
+
INSN_ENTRY(opt_invokebuiltin_delegate_leave)
|
4344
|
+
{
|
4345
|
+
/* ### Declare that we have just entered into an instruction. ### */
|
4346
|
+
START_OF_ORIGINAL_INSN(opt_invokebuiltin_delegate_leave);
|
4347
|
+
DEBUG_ENTER_INSN("opt_invokebuiltin_delegate_leave");
|
4348
|
+
|
4349
|
+
/* ### Declare and assign variables. ### */
|
4350
|
+
RB_BUILTIN bf = (RB_BUILTIN)GET_OPERAND(1);
|
4351
|
+
rb_num_t index = (rb_num_t)GET_OPERAND(2);
|
4352
|
+
# define INSN_ATTR(x) attr_ ## x ## _opt_invokebuiltin_delegate_leave(bf, index)
|
4353
|
+
bool leaf = INSN_ATTR(leaf);
|
4354
|
+
VALUE val;
|
4355
|
+
|
4356
|
+
/* ### Instruction preambles. ### */
|
4357
|
+
if (! leaf) ADD_PC(INSN_ATTR(width));
|
4358
|
+
SETUP_CANARY();
|
4359
|
+
COLLECT_USAGE_INSN(INSN_ATTR(bin));
|
4360
|
+
COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 0, bf);
|
4361
|
+
COLLECT_USAGE_OPERAND(INSN_ATTR(bin), 1, index);
|
4362
|
+
|
4363
|
+
/* ### Here we do the instruction body. ### */
|
4364
|
+
# define NAME_OF_CURRENT_INSN opt_invokebuiltin_delegate_leave
|
4365
|
+
# line 1507 "insns.def"
|
4366
|
+
{
|
4367
|
+
val = vm_invoke_builtin_delegate(ec, reg_cfp, bf, (unsigned int)index);
|
4368
|
+
|
4369
|
+
/* leave fastpath */
|
4370
|
+
/* TracePoint/return should fallback this insn to opt_invokebuiltin_delegate */
|
4371
|
+
if (vm_pop_frame(ec, GET_CFP(), GET_EP())) {
|
4372
|
+
# if OPT_CALL_THREADED_CODE
|
4373
|
+
rb_ec_thread_ptr(ec)->retval = val;
|
4374
|
+
return 0;
|
4375
|
+
# else
|
4376
|
+
return val;
|
4377
|
+
# endif
|
4378
|
+
}
|
4379
|
+
else {
|
4380
|
+
RESTORE_REGS();
|
4381
|
+
}
|
4382
|
+
}
|
4383
|
+
# line 4384 "vm.inc"
|
4384
|
+
# undef NAME_OF_CURRENT_INSN
|
4385
|
+
|
4386
|
+
/* ### Instruction trailers. ### */
|
4387
|
+
CHECK_VM_STACK_OVERFLOW_FOR_INSN(VM_REG_CFP, INSN_ATTR(retn));
|
4388
|
+
CHECK_CANARY();
|
4389
|
+
INC_SP(INSN_ATTR(sp_inc));
|
4390
|
+
TOPN(0) = val;
|
4391
|
+
VM_ASSERT(!RB_TYPE_P(TOPN(0), T_NONE));
|
4392
|
+
VM_ASSERT(!RB_TYPE_P(TOPN(0), T_MOVED));
|
4393
|
+
if (leaf) ADD_PC(INSN_ATTR(width));
|
4394
|
+
# undef INSN_ATTR
|
4395
|
+
|
4396
|
+
/* ### Leave the instruction. ### */
|
4397
|
+
END_INSN(opt_invokebuiltin_delegate_leave);
|
4398
|
+
}
|
4399
|
+
|
4227
4400
|
/* insn getlocal_WC_0(idx)()(val) */
|
4228
4401
|
INSN_ENTRY(getlocal_WC_0)
|
4229
4402
|
{
|
@@ -4234,7 +4407,7 @@ INSN_ENTRY(getlocal_WC_0)
|
|
4234
4407
|
/* ### Declare and assign variables. ### */
|
4235
4408
|
#line 10 "defs/opt_operand.def"
|
4236
4409
|
const rb_num_t level = 0;
|
4237
|
-
#line
|
4410
|
+
#line 4411 "vm.inc"
|
4238
4411
|
lindex_t idx = (lindex_t)GET_OPERAND(1);
|
4239
4412
|
# define INSN_ATTR(x) attr_ ## x ## _getlocal_WC_0(idx)
|
4240
4413
|
bool leaf = INSN_ATTR(leaf);
|
@@ -4254,7 +4427,7 @@ INSN_ENTRY(getlocal_WC_0)
|
|
4254
4427
|
RB_DEBUG_COUNTER_INC(lvar_get);
|
4255
4428
|
(void)RB_DEBUG_COUNTER_INC_IF(lvar_get_dynamic, level > 0);
|
4256
4429
|
}
|
4257
|
-
# line
|
4430
|
+
# line 4431 "vm.inc"
|
4258
4431
|
# undef NAME_OF_CURRENT_INSN
|
4259
4432
|
|
4260
4433
|
/* ### Instruction trailers. ### */
|
@@ -4262,6 +4435,8 @@ INSN_ENTRY(getlocal_WC_0)
|
|
4262
4435
|
CHECK_CANARY();
|
4263
4436
|
INC_SP(INSN_ATTR(sp_inc));
|
4264
4437
|
TOPN(0) = val;
|
4438
|
+
VM_ASSERT(!RB_TYPE_P(TOPN(0), T_NONE));
|
4439
|
+
VM_ASSERT(!RB_TYPE_P(TOPN(0), T_MOVED));
|
4265
4440
|
if (leaf) ADD_PC(INSN_ATTR(width));
|
4266
4441
|
# undef INSN_ATTR
|
4267
4442
|
|
@@ -4279,7 +4454,7 @@ INSN_ENTRY(getlocal_WC_1)
|
|
4279
4454
|
/* ### Declare and assign variables. ### */
|
4280
4455
|
#line 11 "defs/opt_operand.def"
|
4281
4456
|
const rb_num_t level = 1;
|
4282
|
-
#line
|
4457
|
+
#line 4458 "vm.inc"
|
4283
4458
|
lindex_t idx = (lindex_t)GET_OPERAND(1);
|
4284
4459
|
# define INSN_ATTR(x) attr_ ## x ## _getlocal_WC_1(idx)
|
4285
4460
|
bool leaf = INSN_ATTR(leaf);
|
@@ -4299,7 +4474,7 @@ INSN_ENTRY(getlocal_WC_1)
|
|
4299
4474
|
RB_DEBUG_COUNTER_INC(lvar_get);
|
4300
4475
|
(void)RB_DEBUG_COUNTER_INC_IF(lvar_get_dynamic, level > 0);
|
4301
4476
|
}
|
4302
|
-
# line
|
4477
|
+
# line 4478 "vm.inc"
|
4303
4478
|
# undef NAME_OF_CURRENT_INSN
|
4304
4479
|
|
4305
4480
|
/* ### Instruction trailers. ### */
|
@@ -4307,6 +4482,8 @@ INSN_ENTRY(getlocal_WC_1)
|
|
4307
4482
|
CHECK_CANARY();
|
4308
4483
|
INC_SP(INSN_ATTR(sp_inc));
|
4309
4484
|
TOPN(0) = val;
|
4485
|
+
VM_ASSERT(!RB_TYPE_P(TOPN(0), T_NONE));
|
4486
|
+
VM_ASSERT(!RB_TYPE_P(TOPN(0), T_MOVED));
|
4310
4487
|
if (leaf) ADD_PC(INSN_ATTR(width));
|
4311
4488
|
# undef INSN_ATTR
|
4312
4489
|
|
@@ -4324,7 +4501,7 @@ INSN_ENTRY(setlocal_WC_0)
|
|
4324
4501
|
/* ### Declare and assign variables. ### */
|
4325
4502
|
#line 12 "defs/opt_operand.def"
|
4326
4503
|
const rb_num_t level = 0;
|
4327
|
-
#line
|
4504
|
+
#line 4505 "vm.inc"
|
4328
4505
|
lindex_t idx = (lindex_t)GET_OPERAND(1);
|
4329
4506
|
# define INSN_ATTR(x) attr_ ## x ## _setlocal_WC_0(idx)
|
4330
4507
|
bool leaf = INSN_ATTR(leaf);
|
@@ -4344,7 +4521,7 @@ INSN_ENTRY(setlocal_WC_0)
|
|
4344
4521
|
RB_DEBUG_COUNTER_INC(lvar_set);
|
4345
4522
|
(void)RB_DEBUG_COUNTER_INC_IF(lvar_set_dynamic, level > 0);
|
4346
4523
|
}
|
4347
|
-
# line
|
4524
|
+
# line 4525 "vm.inc"
|
4348
4525
|
# undef NAME_OF_CURRENT_INSN
|
4349
4526
|
|
4350
4527
|
/* ### Instruction trailers. ### */
|
@@ -4368,7 +4545,7 @@ INSN_ENTRY(setlocal_WC_1)
|
|
4368
4545
|
/* ### Declare and assign variables. ### */
|
4369
4546
|
#line 13 "defs/opt_operand.def"
|
4370
4547
|
const rb_num_t level = 1;
|
4371
|
-
#line
|
4548
|
+
#line 4549 "vm.inc"
|
4372
4549
|
lindex_t idx = (lindex_t)GET_OPERAND(1);
|
4373
4550
|
# define INSN_ATTR(x) attr_ ## x ## _setlocal_WC_1(idx)
|
4374
4551
|
bool leaf = INSN_ATTR(leaf);
|
@@ -4388,7 +4565,7 @@ INSN_ENTRY(setlocal_WC_1)
|
|
4388
4565
|
RB_DEBUG_COUNTER_INC(lvar_set);
|
4389
4566
|
(void)RB_DEBUG_COUNTER_INC_IF(lvar_set_dynamic, level > 0);
|
4390
4567
|
}
|
4391
|
-
# line
|
4568
|
+
# line 4569 "vm.inc"
|
4392
4569
|
# undef NAME_OF_CURRENT_INSN
|
4393
4570
|
|
4394
4571
|
/* ### Instruction trailers. ### */
|
@@ -4412,7 +4589,7 @@ INSN_ENTRY(putobject_INT2FIX_0_)
|
|
4412
4589
|
/* ### Declare and assign variables. ### */
|
4413
4590
|
#line 15 "defs/opt_operand.def"
|
4414
4591
|
const VALUE val = INT2FIX(0);
|
4415
|
-
#line
|
4592
|
+
#line 4593 "vm.inc"
|
4416
4593
|
# define INSN_ATTR(x) attr_ ## x ## _putobject_INT2FIX_0_()
|
4417
4594
|
bool leaf = INSN_ATTR(leaf);
|
4418
4595
|
|
@@ -4424,6 +4601,8 @@ INSN_ENTRY(putobject_INT2FIX_0_)
|
|
4424
4601
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(VM_REG_CFP, INSN_ATTR(retn));
|
4425
4602
|
INC_SP(INSN_ATTR(sp_inc));
|
4426
4603
|
TOPN(0) = val;
|
4604
|
+
VM_ASSERT(!RB_TYPE_P(TOPN(0), T_NONE));
|
4605
|
+
VM_ASSERT(!RB_TYPE_P(TOPN(0), T_MOVED));
|
4427
4606
|
if (leaf) ADD_PC(INSN_ATTR(width));
|
4428
4607
|
# undef INSN_ATTR
|
4429
4608
|
|
@@ -4441,7 +4620,7 @@ INSN_ENTRY(putobject_INT2FIX_1_)
|
|
4441
4620
|
/* ### Declare and assign variables. ### */
|
4442
4621
|
#line 16 "defs/opt_operand.def"
|
4443
4622
|
const VALUE val = INT2FIX(1);
|
4444
|
-
#line
|
4623
|
+
#line 4624 "vm.inc"
|
4445
4624
|
# define INSN_ATTR(x) attr_ ## x ## _putobject_INT2FIX_1_()
|
4446
4625
|
bool leaf = INSN_ATTR(leaf);
|
4447
4626
|
|
@@ -4453,6 +4632,8 @@ INSN_ENTRY(putobject_INT2FIX_1_)
|
|
4453
4632
|
CHECK_VM_STACK_OVERFLOW_FOR_INSN(VM_REG_CFP, INSN_ATTR(retn));
|
4454
4633
|
INC_SP(INSN_ATTR(sp_inc));
|
4455
4634
|
TOPN(0) = val;
|
4635
|
+
VM_ASSERT(!RB_TYPE_P(TOPN(0), T_NONE));
|
4636
|
+
VM_ASSERT(!RB_TYPE_P(TOPN(0), T_MOVED));
|
4456
4637
|
if (leaf) ADD_PC(INSN_ATTR(width));
|
4457
4638
|
# undef INSN_ATTR
|
4458
4639
|
|
@@ -4836,14 +5017,6 @@ INSN_ENTRY(trace_checktype)
|
|
4836
5017
|
END_INSN(trace_checktype);
|
4837
5018
|
}
|
4838
5019
|
|
4839
|
-
/* insn trace_methodref(...)(...)(...) */
|
4840
|
-
INSN_ENTRY(trace_methodref)
|
4841
|
-
{
|
4842
|
-
vm_trace(ec, GET_CFP(), GET_PC());
|
4843
|
-
DISPATCH_ORIGINAL_INSN(methodref);
|
4844
|
-
END_INSN(trace_methodref);
|
4845
|
-
}
|
4846
|
-
|
4847
5020
|
/* insn trace_defineclass(...)(...)(...) */
|
4848
5021
|
INSN_ENTRY(trace_defineclass)
|
4849
5022
|
{
|
@@ -5220,6 +5393,30 @@ INSN_ENTRY(trace_opt_call_c_function)
|
|
5220
5393
|
END_INSN(trace_opt_call_c_function);
|
5221
5394
|
}
|
5222
5395
|
|
5396
|
+
/* insn trace_invokebuiltin(...)(...)(...) */
|
5397
|
+
INSN_ENTRY(trace_invokebuiltin)
|
5398
|
+
{
|
5399
|
+
vm_trace(ec, GET_CFP(), GET_PC());
|
5400
|
+
DISPATCH_ORIGINAL_INSN(invokebuiltin);
|
5401
|
+
END_INSN(trace_invokebuiltin);
|
5402
|
+
}
|
5403
|
+
|
5404
|
+
/* insn trace_opt_invokebuiltin_delegate(...)(...)(...) */
|
5405
|
+
INSN_ENTRY(trace_opt_invokebuiltin_delegate)
|
5406
|
+
{
|
5407
|
+
vm_trace(ec, GET_CFP(), GET_PC());
|
5408
|
+
DISPATCH_ORIGINAL_INSN(opt_invokebuiltin_delegate);
|
5409
|
+
END_INSN(trace_opt_invokebuiltin_delegate);
|
5410
|
+
}
|
5411
|
+
|
5412
|
+
/* insn trace_opt_invokebuiltin_delegate_leave(...)(...)(...) */
|
5413
|
+
INSN_ENTRY(trace_opt_invokebuiltin_delegate_leave)
|
5414
|
+
{
|
5415
|
+
vm_trace(ec, GET_CFP(), GET_PC());
|
5416
|
+
DISPATCH_ORIGINAL_INSN(opt_invokebuiltin_delegate_leave);
|
5417
|
+
END_INSN(trace_opt_invokebuiltin_delegate_leave);
|
5418
|
+
}
|
5419
|
+
|
5223
5420
|
/* insn trace_getlocal_WC_0(...)(...)(...) */
|
5224
5421
|
INSN_ENTRY(trace_getlocal_WC_0)
|
5225
5422
|
{
|