debase-ruby_core_source 0.10.5 → 0.10.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +22 -0
- data/README.md +1 -1
- data/debase-ruby_core_source.gemspec +3 -2
- data/lib/debase/ruby_core_source.rb +1 -1
- data/lib/debase/ruby_core_source/ruby-2.6.5-p114/addr2line.h +21 -0
- data/lib/debase/ruby_core_source/ruby-2.6.5-p114/ccan/build_assert/build_assert.h +40 -0
- data/lib/debase/ruby_core_source/ruby-2.6.5-p114/ccan/check_type/check_type.h +63 -0
- data/lib/debase/ruby_core_source/ruby-2.6.5-p114/ccan/container_of/container_of.h +142 -0
- data/lib/debase/ruby_core_source/ruby-2.6.5-p114/ccan/list/list.h +788 -0
- data/lib/debase/ruby_core_source/ruby-2.6.5-p114/ccan/str/str.h +16 -0
- data/lib/debase/ruby_core_source/ruby-2.6.5-p114/constant.h +51 -0
- data/lib/debase/ruby_core_source/ruby-2.6.5-p114/debug_counter.h +283 -0
- data/lib/debase/ruby_core_source/ruby-2.6.5-p114/dln.h +51 -0
- data/lib/debase/ruby_core_source/ruby-2.6.5-p114/encindex.h +69 -0
- data/lib/debase/ruby_core_source/ruby-2.6.5-p114/eval_intern.h +333 -0
- data/lib/debase/ruby_core_source/ruby-2.6.5-p114/gc.h +116 -0
- data/lib/debase/ruby_core_source/ruby-2.6.5-p114/hrtime.h +168 -0
- data/lib/debase/ruby_core_source/ruby-2.6.5-p114/id.h +252 -0
- data/lib/debase/ruby_core_source/ruby-2.6.5-p114/id_table.h +31 -0
- data/lib/debase/ruby_core_source/ruby-2.6.5-p114/insns.inc +249 -0
- data/lib/debase/ruby_core_source/ruby-2.6.5-p114/insns_info.inc +9374 -0
- data/lib/debase/ruby_core_source/ruby-2.6.5-p114/internal.h +2470 -0
- data/lib/debase/ruby_core_source/ruby-2.6.5-p114/iseq.h +304 -0
- data/lib/debase/ruby_core_source/ruby-2.6.5-p114/known_errors.inc +791 -0
- data/lib/debase/ruby_core_source/ruby-2.6.5-p114/method.h +229 -0
- data/lib/debase/ruby_core_source/ruby-2.6.5-p114/mjit.h +148 -0
- data/lib/debase/ruby_core_source/ruby-2.6.5-p114/mjit_compile.inc +4226 -0
- data/lib/debase/ruby_core_source/ruby-2.6.5-p114/node.h +449 -0
- data/lib/debase/ruby_core_source/ruby-2.6.5-p114/node_name.inc +200 -0
- data/lib/debase/ruby_core_source/ruby-2.6.5-p114/opt_sc.inc +109 -0
- data/lib/debase/ruby_core_source/ruby-2.6.5-p114/optinsn.inc +128 -0
- data/lib/debase/ruby_core_source/ruby-2.6.5-p114/optunifs.inc +43 -0
- data/lib/debase/ruby_core_source/ruby-2.6.5-p114/parse.h +207 -0
- data/lib/debase/ruby_core_source/ruby-2.6.5-p114/probes_helper.h +42 -0
- data/lib/debase/ruby_core_source/ruby-2.6.5-p114/regenc.h +254 -0
- data/lib/debase/ruby_core_source/ruby-2.6.5-p114/regint.h +938 -0
- data/lib/debase/ruby_core_source/ruby-2.6.5-p114/regparse.h +370 -0
- data/lib/debase/ruby_core_source/ruby-2.6.5-p114/revision.h +1 -0
- data/lib/debase/ruby_core_source/ruby-2.6.5-p114/ruby_assert.h +60 -0
- data/lib/debase/ruby_core_source/ruby-2.6.5-p114/ruby_atomic.h +244 -0
- data/lib/debase/ruby_core_source/ruby-2.6.5-p114/siphash.h +48 -0
- data/lib/debase/ruby_core_source/ruby-2.6.5-p114/symbol.h +112 -0
- data/lib/debase/ruby_core_source/ruby-2.6.5-p114/thread_pthread.h +75 -0
- data/lib/debase/ruby_core_source/ruby-2.6.5-p114/thread_win32.h +36 -0
- data/lib/debase/ruby_core_source/ruby-2.6.5-p114/timev.h +53 -0
- data/lib/debase/ruby_core_source/ruby-2.6.5-p114/transcode_data.h +139 -0
- data/lib/debase/ruby_core_source/ruby-2.6.5-p114/transient_heap.h +60 -0
- data/lib/debase/ruby_core_source/ruby-2.6.5-p114/version.h +73 -0
- data/lib/debase/ruby_core_source/ruby-2.6.5-p114/vm.inc +4504 -0
- data/lib/debase/ruby_core_source/ruby-2.6.5-p114/vm_call_iseq_optimized.inc +213 -0
- data/lib/debase/ruby_core_source/ruby-2.6.5-p114/vm_core.h +1910 -0
- data/lib/debase/ruby_core_source/ruby-2.6.5-p114/vm_debug.h +37 -0
- data/lib/debase/ruby_core_source/ruby-2.6.5-p114/vm_exec.h +202 -0
- data/lib/debase/ruby_core_source/ruby-2.6.5-p114/vm_insnhelper.h +316 -0
- data/lib/debase/ruby_core_source/ruby-2.6.5-p114/vm_opts.h +70 -0
- data/lib/debase/ruby_core_source/ruby-2.6.5-p114/vmtc.inc +243 -0
- data/lib/debase/ruby_core_source/ruby-2.7.0-p0/addr2line.h +21 -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-p0/ccan/build_assert/build_assert.h +40 -0
- data/lib/debase/ruby_core_source/ruby-2.7.0-p0/ccan/check_type/check_type.h +63 -0
- data/lib/debase/ruby_core_source/ruby-2.7.0-p0/ccan/container_of/container_of.h +142 -0
- data/lib/debase/ruby_core_source/ruby-2.7.0-p0/ccan/list/list.h +788 -0
- data/lib/debase/ruby_core_source/ruby-2.7.0-p0/ccan/str/str.h +16 -0
- data/lib/debase/ruby_core_source/ruby-2.7.0-p0/constant.h +50 -0
- data/lib/debase/ruby_core_source/ruby-2.7.0-p0/debug_counter.h +390 -0
- data/lib/debase/ruby_core_source/ruby-2.7.0-p0/dln.h +51 -0
- data/lib/debase/ruby_core_source/ruby-2.7.0-p0/encindex.h +69 -0
- data/lib/debase/ruby_core_source/ruby-2.7.0-p0/eval_intern.h +312 -0
- data/lib/debase/ruby_core_source/ruby-2.7.0-p0/gc.h +131 -0
- data/lib/debase/ruby_core_source/ruby-2.7.0-p0/hrtime.h +168 -0
- data/lib/debase/ruby_core_source/ruby-2.7.0-p0/id.h +290 -0
- data/lib/debase/ruby_core_source/ruby-2.7.0-p0/id_table.h +34 -0
- data/lib/debase/ruby_core_source/ruby-2.7.0-p0/insns.inc +253 -0
- data/lib/debase/ruby_core_source/ruby-2.7.0-p0/insns_info.inc +9197 -0
- data/lib/debase/ruby_core_source/ruby-2.7.0-p0/internal.h +2697 -0
- data/lib/debase/ruby_core_source/ruby-2.7.0-p0/iseq.h +312 -0
- data/lib/debase/ruby_core_source/ruby-2.7.0-p0/known_errors.inc +791 -0
- data/lib/debase/ruby_core_source/ruby-2.7.0-p0/method.h +229 -0
- data/lib/debase/ruby_core_source/ruby-2.7.0-p0/mjit.h +177 -0
- data/lib/debase/ruby_core_source/ruby-2.7.0-p0/mjit_compile.inc +7779 -0
- data/lib/debase/ruby_core_source/ruby-2.7.0-p0/node.h +476 -0
- data/lib/debase/ruby_core_source/ruby-2.7.0-p0/node_name.inc +208 -0
- 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-p0/optinsn.inc +128 -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-p0/parse.h +210 -0
- data/lib/debase/ruby_core_source/ruby-2.7.0-p0/probes_helper.h +42 -0
- data/lib/debase/ruby_core_source/ruby-2.7.0-p0/regenc.h +254 -0
- data/lib/debase/ruby_core_source/ruby-2.7.0-p0/regint.h +938 -0
- data/lib/debase/ruby_core_source/ruby-2.7.0-p0/regparse.h +370 -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-p0/ruby_assert.h +15 -0
- data/lib/debase/ruby_core_source/ruby-2.7.0-p0/ruby_atomic.h +244 -0
- data/lib/debase/ruby_core_source/ruby-2.7.0-p0/siphash.h +48 -0
- data/lib/debase/ruby_core_source/ruby-2.7.0-p0/symbol.h +119 -0
- data/lib/debase/ruby_core_source/ruby-2.7.0-p0/thread_pthread.h +75 -0
- data/lib/debase/ruby_core_source/ruby-2.7.0-p0/thread_win32.h +36 -0
- data/lib/debase/ruby_core_source/ruby-2.7.0-p0/timev.h +56 -0
- data/lib/debase/ruby_core_source/ruby-2.7.0-p0/transcode_data.h +139 -0
- data/lib/debase/ruby_core_source/ruby-2.7.0-p0/transient_heap.h +62 -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-p0/version.h +77 -0
- data/lib/debase/ruby_core_source/ruby-2.7.0-p0/vm.inc +5466 -0
- data/lib/debase/ruby_core_source/ruby-2.7.0-p0/vm_call_iseq_optimized.inc +237 -0
- data/lib/debase/ruby_core_source/ruby-2.7.0-p0/vm_core.h +1968 -0
- data/lib/debase/ruby_core_source/ruby-2.7.0-p0/vm_debug.h +34 -0
- data/lib/debase/ruby_core_source/ruby-2.7.0-p0/vm_exec.h +193 -0
- data/lib/debase/ruby_core_source/ruby-2.7.0-p0/vm_insnhelper.h +267 -0
- data/lib/debase/ruby_core_source/ruby-2.7.0-p0/vm_opts.h +72 -0
- data/lib/debase/ruby_core_source/ruby-2.7.0-p0/vmtc.inc +247 -0
- data/lib/debase/ruby_core_source/version.rb +1 -1
- metadata +128 -8
@@ -0,0 +1,70 @@
|
|
1
|
+
/*-*-c-*-*/
|
2
|
+
/**********************************************************************
|
3
|
+
|
4
|
+
vm_opts.h - VM optimize option
|
5
|
+
|
6
|
+
$Author: k0kubun $
|
7
|
+
|
8
|
+
Copyright (C) 2004-2007 Koichi Sasada
|
9
|
+
|
10
|
+
**********************************************************************/
|
11
|
+
|
12
|
+
|
13
|
+
#ifndef RUBY_VM_OPTS_H
|
14
|
+
#define RUBY_VM_OPTS_H
|
15
|
+
|
16
|
+
/* Compile options.
|
17
|
+
* You can change these options at runtime by VM::CompileOption.
|
18
|
+
* Following definitions are default values.
|
19
|
+
*/
|
20
|
+
|
21
|
+
#define OPT_TAILCALL_OPTIMIZATION 0
|
22
|
+
#define OPT_PEEPHOLE_OPTIMIZATION 1
|
23
|
+
#define OPT_SPECIALISED_INSTRUCTION 1
|
24
|
+
#define OPT_INLINE_CONST_CACHE 1
|
25
|
+
#define OPT_FROZEN_STRING_LITERAL 0
|
26
|
+
#define OPT_DEBUG_FROZEN_STRING_LITERAL 0
|
27
|
+
|
28
|
+
/* Build Options.
|
29
|
+
* You can't change these options at runtime.
|
30
|
+
*/
|
31
|
+
|
32
|
+
/* C compiler dependent */
|
33
|
+
|
34
|
+
/*
|
35
|
+
* 0: direct (using labeled goto using GCC special)
|
36
|
+
* 1: token (switch/case)
|
37
|
+
* 2: call (function call for each insn dispatch)
|
38
|
+
*/
|
39
|
+
#ifndef OPT_THREADED_CODE
|
40
|
+
#define OPT_THREADED_CODE 0
|
41
|
+
#endif
|
42
|
+
|
43
|
+
#define OPT_DIRECT_THREADED_CODE (OPT_THREADED_CODE == 0)
|
44
|
+
#define OPT_TOKEN_THREADED_CODE (OPT_THREADED_CODE == 1)
|
45
|
+
#define OPT_CALL_THREADED_CODE (OPT_THREADED_CODE == 2)
|
46
|
+
|
47
|
+
/* VM running option */
|
48
|
+
#define OPT_CHECKED_RUN 1
|
49
|
+
#define OPT_INLINE_METHOD_CACHE 1
|
50
|
+
#define OPT_GLOBAL_METHOD_CACHE 1
|
51
|
+
#define OPT_BLOCKINLINING 0
|
52
|
+
|
53
|
+
#ifndef OPT_IC_FOR_IVAR
|
54
|
+
#define OPT_IC_FOR_IVAR 1
|
55
|
+
#endif
|
56
|
+
|
57
|
+
/* architecture independent, affects generated code */
|
58
|
+
#define OPT_OPERANDS_UNIFICATION 1
|
59
|
+
#define OPT_INSTRUCTIONS_UNIFICATION 0
|
60
|
+
#define OPT_UNIFY_ALL_COMBINATION 0
|
61
|
+
#define OPT_STACK_CACHING 0
|
62
|
+
|
63
|
+
/* misc */
|
64
|
+
#define SUPPORT_JOKE 0
|
65
|
+
|
66
|
+
#ifndef VM_COLLECT_USAGE_DETAILS
|
67
|
+
#define VM_COLLECT_USAGE_DETAILS 0
|
68
|
+
#endif
|
69
|
+
|
70
|
+
#endif /* RUBY_VM_OPTS_H */
|
@@ -0,0 +1,243 @@
|
|
1
|
+
/* -*- mode:c; style:ruby; coding: utf-8; indent-tabs-mode: nil -*- */
|
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 consist of many small parts of codes copyrighted by each authors,
|
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 do not automatically define that of generated ones. This is
|
16
|
+
* the reason why this file is under unclear situation. All that I know is
|
17
|
+
* 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 the
|
23
|
+
* situation would become more clear in the future. */
|
24
|
+
/*******************************************************************/
|
25
|
+
/*******************************************************************/
|
26
|
+
/*******************************************************************/
|
27
|
+
/**
|
28
|
+
This file is for threaded code.
|
29
|
+
|
30
|
+
----
|
31
|
+
This file is auto generated by insns2vm.rb
|
32
|
+
DO NOT TOUCH!
|
33
|
+
|
34
|
+
If you want to fix something, you must edit "tool/ruby_vm/views/vmtc.inc.erb"
|
35
|
+
or tool/insns2vm.rb
|
36
|
+
*/
|
37
|
+
|
38
|
+
static const void *const insns_address_table[] = {
|
39
|
+
LABEL_PTR(nop),
|
40
|
+
LABEL_PTR(getlocal),
|
41
|
+
LABEL_PTR(setlocal),
|
42
|
+
LABEL_PTR(getblockparam),
|
43
|
+
LABEL_PTR(setblockparam),
|
44
|
+
LABEL_PTR(getblockparamproxy),
|
45
|
+
LABEL_PTR(getspecial),
|
46
|
+
LABEL_PTR(setspecial),
|
47
|
+
LABEL_PTR(getinstancevariable),
|
48
|
+
LABEL_PTR(setinstancevariable),
|
49
|
+
LABEL_PTR(getclassvariable),
|
50
|
+
LABEL_PTR(setclassvariable),
|
51
|
+
LABEL_PTR(getconstant),
|
52
|
+
LABEL_PTR(setconstant),
|
53
|
+
LABEL_PTR(getglobal),
|
54
|
+
LABEL_PTR(setglobal),
|
55
|
+
LABEL_PTR(putnil),
|
56
|
+
LABEL_PTR(putself),
|
57
|
+
LABEL_PTR(putobject),
|
58
|
+
LABEL_PTR(putspecialobject),
|
59
|
+
LABEL_PTR(putiseq),
|
60
|
+
LABEL_PTR(putstring),
|
61
|
+
LABEL_PTR(concatstrings),
|
62
|
+
LABEL_PTR(tostring),
|
63
|
+
LABEL_PTR(freezestring),
|
64
|
+
LABEL_PTR(toregexp),
|
65
|
+
LABEL_PTR(intern),
|
66
|
+
LABEL_PTR(newarray),
|
67
|
+
LABEL_PTR(duparray),
|
68
|
+
LABEL_PTR(duphash),
|
69
|
+
LABEL_PTR(expandarray),
|
70
|
+
LABEL_PTR(concatarray),
|
71
|
+
LABEL_PTR(splatarray),
|
72
|
+
LABEL_PTR(newhash),
|
73
|
+
LABEL_PTR(newrange),
|
74
|
+
LABEL_PTR(pop),
|
75
|
+
LABEL_PTR(dup),
|
76
|
+
LABEL_PTR(dupn),
|
77
|
+
LABEL_PTR(swap),
|
78
|
+
LABEL_PTR(reverse),
|
79
|
+
LABEL_PTR(reput),
|
80
|
+
LABEL_PTR(topn),
|
81
|
+
LABEL_PTR(setn),
|
82
|
+
LABEL_PTR(adjuststack),
|
83
|
+
LABEL_PTR(defined),
|
84
|
+
LABEL_PTR(checkmatch),
|
85
|
+
LABEL_PTR(checkkeyword),
|
86
|
+
LABEL_PTR(checktype),
|
87
|
+
LABEL_PTR(defineclass),
|
88
|
+
LABEL_PTR(send),
|
89
|
+
LABEL_PTR(opt_send_without_block),
|
90
|
+
LABEL_PTR(opt_str_freeze),
|
91
|
+
LABEL_PTR(opt_str_uminus),
|
92
|
+
LABEL_PTR(opt_newarray_max),
|
93
|
+
LABEL_PTR(opt_newarray_min),
|
94
|
+
LABEL_PTR(invokesuper),
|
95
|
+
LABEL_PTR(invokeblock),
|
96
|
+
LABEL_PTR(leave),
|
97
|
+
LABEL_PTR(throw),
|
98
|
+
LABEL_PTR(jump),
|
99
|
+
LABEL_PTR(branchif),
|
100
|
+
LABEL_PTR(branchunless),
|
101
|
+
LABEL_PTR(branchnil),
|
102
|
+
LABEL_PTR(opt_getinlinecache),
|
103
|
+
LABEL_PTR(opt_setinlinecache),
|
104
|
+
LABEL_PTR(once),
|
105
|
+
LABEL_PTR(opt_case_dispatch),
|
106
|
+
LABEL_PTR(opt_plus),
|
107
|
+
LABEL_PTR(opt_minus),
|
108
|
+
LABEL_PTR(opt_mult),
|
109
|
+
LABEL_PTR(opt_div),
|
110
|
+
LABEL_PTR(opt_mod),
|
111
|
+
LABEL_PTR(opt_eq),
|
112
|
+
LABEL_PTR(opt_neq),
|
113
|
+
LABEL_PTR(opt_lt),
|
114
|
+
LABEL_PTR(opt_le),
|
115
|
+
LABEL_PTR(opt_gt),
|
116
|
+
LABEL_PTR(opt_ge),
|
117
|
+
LABEL_PTR(opt_ltlt),
|
118
|
+
LABEL_PTR(opt_and),
|
119
|
+
LABEL_PTR(opt_or),
|
120
|
+
LABEL_PTR(opt_aref),
|
121
|
+
LABEL_PTR(opt_aset),
|
122
|
+
LABEL_PTR(opt_aset_with),
|
123
|
+
LABEL_PTR(opt_aref_with),
|
124
|
+
LABEL_PTR(opt_length),
|
125
|
+
LABEL_PTR(opt_size),
|
126
|
+
LABEL_PTR(opt_empty_p),
|
127
|
+
LABEL_PTR(opt_succ),
|
128
|
+
LABEL_PTR(opt_not),
|
129
|
+
LABEL_PTR(opt_regexpmatch1),
|
130
|
+
LABEL_PTR(opt_regexpmatch2),
|
131
|
+
LABEL_PTR(opt_call_c_function),
|
132
|
+
LABEL_PTR(bitblt),
|
133
|
+
LABEL_PTR(answer),
|
134
|
+
LABEL_PTR(getlocal_WC_0),
|
135
|
+
LABEL_PTR(getlocal_WC_1),
|
136
|
+
LABEL_PTR(setlocal_WC_0),
|
137
|
+
LABEL_PTR(setlocal_WC_1),
|
138
|
+
LABEL_PTR(putobject_INT2FIX_0_),
|
139
|
+
LABEL_PTR(putobject_INT2FIX_1_),
|
140
|
+
LABEL_PTR(trace_nop),
|
141
|
+
LABEL_PTR(trace_getlocal),
|
142
|
+
LABEL_PTR(trace_setlocal),
|
143
|
+
LABEL_PTR(trace_getblockparam),
|
144
|
+
LABEL_PTR(trace_setblockparam),
|
145
|
+
LABEL_PTR(trace_getblockparamproxy),
|
146
|
+
LABEL_PTR(trace_getspecial),
|
147
|
+
LABEL_PTR(trace_setspecial),
|
148
|
+
LABEL_PTR(trace_getinstancevariable),
|
149
|
+
LABEL_PTR(trace_setinstancevariable),
|
150
|
+
LABEL_PTR(trace_getclassvariable),
|
151
|
+
LABEL_PTR(trace_setclassvariable),
|
152
|
+
LABEL_PTR(trace_getconstant),
|
153
|
+
LABEL_PTR(trace_setconstant),
|
154
|
+
LABEL_PTR(trace_getglobal),
|
155
|
+
LABEL_PTR(trace_setglobal),
|
156
|
+
LABEL_PTR(trace_putnil),
|
157
|
+
LABEL_PTR(trace_putself),
|
158
|
+
LABEL_PTR(trace_putobject),
|
159
|
+
LABEL_PTR(trace_putspecialobject),
|
160
|
+
LABEL_PTR(trace_putiseq),
|
161
|
+
LABEL_PTR(trace_putstring),
|
162
|
+
LABEL_PTR(trace_concatstrings),
|
163
|
+
LABEL_PTR(trace_tostring),
|
164
|
+
LABEL_PTR(trace_freezestring),
|
165
|
+
LABEL_PTR(trace_toregexp),
|
166
|
+
LABEL_PTR(trace_intern),
|
167
|
+
LABEL_PTR(trace_newarray),
|
168
|
+
LABEL_PTR(trace_duparray),
|
169
|
+
LABEL_PTR(trace_duphash),
|
170
|
+
LABEL_PTR(trace_expandarray),
|
171
|
+
LABEL_PTR(trace_concatarray),
|
172
|
+
LABEL_PTR(trace_splatarray),
|
173
|
+
LABEL_PTR(trace_newhash),
|
174
|
+
LABEL_PTR(trace_newrange),
|
175
|
+
LABEL_PTR(trace_pop),
|
176
|
+
LABEL_PTR(trace_dup),
|
177
|
+
LABEL_PTR(trace_dupn),
|
178
|
+
LABEL_PTR(trace_swap),
|
179
|
+
LABEL_PTR(trace_reverse),
|
180
|
+
LABEL_PTR(trace_reput),
|
181
|
+
LABEL_PTR(trace_topn),
|
182
|
+
LABEL_PTR(trace_setn),
|
183
|
+
LABEL_PTR(trace_adjuststack),
|
184
|
+
LABEL_PTR(trace_defined),
|
185
|
+
LABEL_PTR(trace_checkmatch),
|
186
|
+
LABEL_PTR(trace_checkkeyword),
|
187
|
+
LABEL_PTR(trace_checktype),
|
188
|
+
LABEL_PTR(trace_defineclass),
|
189
|
+
LABEL_PTR(trace_send),
|
190
|
+
LABEL_PTR(trace_opt_send_without_block),
|
191
|
+
LABEL_PTR(trace_opt_str_freeze),
|
192
|
+
LABEL_PTR(trace_opt_str_uminus),
|
193
|
+
LABEL_PTR(trace_opt_newarray_max),
|
194
|
+
LABEL_PTR(trace_opt_newarray_min),
|
195
|
+
LABEL_PTR(trace_invokesuper),
|
196
|
+
LABEL_PTR(trace_invokeblock),
|
197
|
+
LABEL_PTR(trace_leave),
|
198
|
+
LABEL_PTR(trace_throw),
|
199
|
+
LABEL_PTR(trace_jump),
|
200
|
+
LABEL_PTR(trace_branchif),
|
201
|
+
LABEL_PTR(trace_branchunless),
|
202
|
+
LABEL_PTR(trace_branchnil),
|
203
|
+
LABEL_PTR(trace_opt_getinlinecache),
|
204
|
+
LABEL_PTR(trace_opt_setinlinecache),
|
205
|
+
LABEL_PTR(trace_once),
|
206
|
+
LABEL_PTR(trace_opt_case_dispatch),
|
207
|
+
LABEL_PTR(trace_opt_plus),
|
208
|
+
LABEL_PTR(trace_opt_minus),
|
209
|
+
LABEL_PTR(trace_opt_mult),
|
210
|
+
LABEL_PTR(trace_opt_div),
|
211
|
+
LABEL_PTR(trace_opt_mod),
|
212
|
+
LABEL_PTR(trace_opt_eq),
|
213
|
+
LABEL_PTR(trace_opt_neq),
|
214
|
+
LABEL_PTR(trace_opt_lt),
|
215
|
+
LABEL_PTR(trace_opt_le),
|
216
|
+
LABEL_PTR(trace_opt_gt),
|
217
|
+
LABEL_PTR(trace_opt_ge),
|
218
|
+
LABEL_PTR(trace_opt_ltlt),
|
219
|
+
LABEL_PTR(trace_opt_and),
|
220
|
+
LABEL_PTR(trace_opt_or),
|
221
|
+
LABEL_PTR(trace_opt_aref),
|
222
|
+
LABEL_PTR(trace_opt_aset),
|
223
|
+
LABEL_PTR(trace_opt_aset_with),
|
224
|
+
LABEL_PTR(trace_opt_aref_with),
|
225
|
+
LABEL_PTR(trace_opt_length),
|
226
|
+
LABEL_PTR(trace_opt_size),
|
227
|
+
LABEL_PTR(trace_opt_empty_p),
|
228
|
+
LABEL_PTR(trace_opt_succ),
|
229
|
+
LABEL_PTR(trace_opt_not),
|
230
|
+
LABEL_PTR(trace_opt_regexpmatch1),
|
231
|
+
LABEL_PTR(trace_opt_regexpmatch2),
|
232
|
+
LABEL_PTR(trace_opt_call_c_function),
|
233
|
+
LABEL_PTR(trace_bitblt),
|
234
|
+
LABEL_PTR(trace_answer),
|
235
|
+
LABEL_PTR(trace_getlocal_WC_0),
|
236
|
+
LABEL_PTR(trace_getlocal_WC_1),
|
237
|
+
LABEL_PTR(trace_setlocal_WC_0),
|
238
|
+
LABEL_PTR(trace_setlocal_WC_1),
|
239
|
+
LABEL_PTR(trace_putobject_INT2FIX_0_),
|
240
|
+
LABEL_PTR(trace_putobject_INT2FIX_1_),
|
241
|
+
};
|
242
|
+
|
243
|
+
ASSERT_VM_INSTRUCTION_SIZE(insns_address_table);
|
@@ -0,0 +1,21 @@
|
|
1
|
+
/**********************************************************************
|
2
|
+
|
3
|
+
addr2line.h -
|
4
|
+
|
5
|
+
$Author$
|
6
|
+
|
7
|
+
Copyright (C) 2010 Shinichiro Hamaji
|
8
|
+
|
9
|
+
**********************************************************************/
|
10
|
+
|
11
|
+
#ifndef RUBY_ADDR2LINE_H
|
12
|
+
#define RUBY_ADDR2LINE_H
|
13
|
+
|
14
|
+
#if (defined(USE_ELF) || defined(HAVE_MACH_O_LOADER_H))
|
15
|
+
|
16
|
+
void
|
17
|
+
rb_dump_backtrace_with_lines(int num_traces, void **traces);
|
18
|
+
|
19
|
+
#endif /* USE_ELF */
|
20
|
+
|
21
|
+
#endif /* RUBY_ADDR2LINE_H */
|
@@ -0,0 +1,78 @@
|
|
1
|
+
#ifndef BUILTIN_H_INCLUDED
|
2
|
+
#define BUILTIN_H_INCLUDED
|
3
|
+
|
4
|
+
// invoke
|
5
|
+
|
6
|
+
struct rb_builtin_function {
|
7
|
+
// for invocation
|
8
|
+
const void * const func_ptr;
|
9
|
+
const int argc;
|
10
|
+
|
11
|
+
// for load
|
12
|
+
const int index;
|
13
|
+
const char * const name;
|
14
|
+
};
|
15
|
+
|
16
|
+
#define RB_BUILTIN_FUNCTION(_i, _name, _fname, _arity) { \
|
17
|
+
.name = #_name, \
|
18
|
+
.func_ptr = (void *)_fname, \
|
19
|
+
.argc = _arity, \
|
20
|
+
.index = _i \
|
21
|
+
}
|
22
|
+
|
23
|
+
void rb_load_with_builtin_functions(const char *feature_name, const struct rb_builtin_function *table);
|
24
|
+
|
25
|
+
#ifndef VM_CORE_H_EC_DEFINED
|
26
|
+
typedef struct rb_execution_context_struct rb_execution_context_t;
|
27
|
+
#endif
|
28
|
+
|
29
|
+
/* The following code is generated by the following Ruby script:
|
30
|
+
|
31
|
+
16.times{|i|
|
32
|
+
args = (i > 0 ? ', ' : '') + (0...i).map{"VALUE"}.join(', ')
|
33
|
+
puts "static inline void rb_builtin_function_check_arity#{i}(VALUE (*f)(rb_execution_context_t *ec, VALUE self#{args})){}"
|
34
|
+
}
|
35
|
+
*/
|
36
|
+
|
37
|
+
static inline void rb_builtin_function_check_arity0(VALUE (*f)(rb_execution_context_t *ec, VALUE self)){}
|
38
|
+
static inline void rb_builtin_function_check_arity1(VALUE (*f)(rb_execution_context_t *ec, VALUE self, VALUE)){}
|
39
|
+
static inline void rb_builtin_function_check_arity2(VALUE (*f)(rb_execution_context_t *ec, VALUE self, VALUE, VALUE)){}
|
40
|
+
static inline void rb_builtin_function_check_arity3(VALUE (*f)(rb_execution_context_t *ec, VALUE self, VALUE, VALUE, VALUE)){}
|
41
|
+
static inline void rb_builtin_function_check_arity4(VALUE (*f)(rb_execution_context_t *ec, VALUE self, VALUE, VALUE, VALUE, VALUE)){}
|
42
|
+
static inline void rb_builtin_function_check_arity5(VALUE (*f)(rb_execution_context_t *ec, VALUE self, VALUE, VALUE, VALUE, VALUE, VALUE)){}
|
43
|
+
static inline void rb_builtin_function_check_arity6(VALUE (*f)(rb_execution_context_t *ec, VALUE self, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE)){}
|
44
|
+
static inline void rb_builtin_function_check_arity7(VALUE (*f)(rb_execution_context_t *ec, VALUE self, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE)){}
|
45
|
+
static inline void rb_builtin_function_check_arity8(VALUE (*f)(rb_execution_context_t *ec, VALUE self, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE)){}
|
46
|
+
static inline void rb_builtin_function_check_arity9(VALUE (*f)(rb_execution_context_t *ec, VALUE self, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE)){}
|
47
|
+
static inline void rb_builtin_function_check_arity10(VALUE (*f)(rb_execution_context_t *ec, VALUE self, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE)){}
|
48
|
+
static inline void rb_builtin_function_check_arity11(VALUE (*f)(rb_execution_context_t *ec, VALUE self, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE)){}
|
49
|
+
static inline void rb_builtin_function_check_arity12(VALUE (*f)(rb_execution_context_t *ec, VALUE self, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE)){}
|
50
|
+
static inline void rb_builtin_function_check_arity13(VALUE (*f)(rb_execution_context_t *ec, VALUE self, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE)){}
|
51
|
+
static inline void rb_builtin_function_check_arity14(VALUE (*f)(rb_execution_context_t *ec, VALUE self, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE)){}
|
52
|
+
static inline void rb_builtin_function_check_arity15(VALUE (*f)(rb_execution_context_t *ec, VALUE self, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE)){}
|
53
|
+
|
54
|
+
VALUE rb_vm_lvar_exposed(rb_execution_context_t *ec, int index);
|
55
|
+
|
56
|
+
// __builtin_inline!
|
57
|
+
|
58
|
+
PUREFUNC(static inline VALUE rb_vm_lvar(rb_execution_context_t *ec, int index));
|
59
|
+
|
60
|
+
static inline VALUE
|
61
|
+
rb_vm_lvar(rb_execution_context_t *ec, int index)
|
62
|
+
{
|
63
|
+
#if VM_CORE_H_EC_DEFINED
|
64
|
+
return ec->cfp->ep[index];
|
65
|
+
#else
|
66
|
+
return rb_vm_lvar_exposed(ec, index);
|
67
|
+
#endif
|
68
|
+
}
|
69
|
+
|
70
|
+
// dump/load
|
71
|
+
|
72
|
+
struct builtin_binary {
|
73
|
+
const char *feature; // feature name
|
74
|
+
const unsigned char *bin; // binary by ISeq#to_binary
|
75
|
+
size_t bin_size;
|
76
|
+
};
|
77
|
+
|
78
|
+
#endif // BUILTIN_H_INCLUDED
|
@@ -0,0 +1,40 @@
|
|
1
|
+
/* CC0 (Public domain) - see ccan/licenses/CC0 file for details */
|
2
|
+
#ifndef CCAN_BUILD_ASSERT_H
|
3
|
+
#define CCAN_BUILD_ASSERT_H
|
4
|
+
|
5
|
+
/**
|
6
|
+
* BUILD_ASSERT - assert a build-time dependency.
|
7
|
+
* @cond: the compile-time condition which must be true.
|
8
|
+
*
|
9
|
+
* Your compile will fail if the condition isn't true, or can't be evaluated
|
10
|
+
* by the compiler. This can only be used within a function.
|
11
|
+
*
|
12
|
+
* Example:
|
13
|
+
* #include <stddef.h>
|
14
|
+
* ...
|
15
|
+
* static char *foo_to_char(struct foo *foo)
|
16
|
+
* {
|
17
|
+
* // This code needs string to be at start of foo.
|
18
|
+
* BUILD_ASSERT(offsetof(struct foo, string) == 0);
|
19
|
+
* return (char *)foo;
|
20
|
+
* }
|
21
|
+
*/
|
22
|
+
#define BUILD_ASSERT(cond) \
|
23
|
+
do { (void) sizeof(char [1 - 2*!(cond)]); } while(0)
|
24
|
+
|
25
|
+
/**
|
26
|
+
* BUILD_ASSERT_OR_ZERO - assert a build-time dependency, as an expression.
|
27
|
+
* @cond: the compile-time condition which must be true.
|
28
|
+
*
|
29
|
+
* Your compile will fail if the condition isn't true, or can't be evaluated
|
30
|
+
* by the compiler. This can be used in an expression: its value is "0".
|
31
|
+
*
|
32
|
+
* Example:
|
33
|
+
* #define foo_to_char(foo) \
|
34
|
+
* ((char *)(foo) \
|
35
|
+
* + BUILD_ASSERT_OR_ZERO(offsetof(struct foo, string) == 0))
|
36
|
+
*/
|
37
|
+
#define BUILD_ASSERT_OR_ZERO(cond) \
|
38
|
+
(sizeof(char [1 - 2*!(cond)]) - 1)
|
39
|
+
|
40
|
+
#endif /* CCAN_BUILD_ASSERT_H */
|