debase-ruby_core_source 3.2.3 → 3.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +9 -0
- data/Rakefile +2 -1
- data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/ccan/list/list.h +4 -2
- data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/dln.h +1 -0
- data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/eval_intern.h +4 -2
- data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/insns.inc +2 -0
- data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/insns_info.inc +269 -187
- data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/class.h +46 -0
- data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/cont.h +3 -0
- data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/encoding.h +3 -0
- data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/error.h +3 -0
- data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/gc.h +2 -0
- data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/object.h +1 -0
- data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/random.h +1 -0
- data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/string.h +0 -1
- data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/symbol.h +3 -0
- data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/thread.h +3 -0
- data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/transcode.h +3 -0
- data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/variable.h +5 -3
- data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/vm.h +5 -0
- data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/iseq.h +5 -1
- data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/method.h +0 -1
- data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/optunifs.inc +1 -1
- data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/parse.h +2 -2
- data/lib/debase/ruby_core_source/ruby-3.3.0-p0/prism/ast.h +4612 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-p0/prism/defines.h +94 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-p0/prism/diagnostic.h +297 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-p0/prism/encoding.h +248 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-p0/prism/extension.h +18 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-p0/prism/node.h +57 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-p0/prism/options.h +204 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-p0/prism/pack.h +152 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-p0/prism/parser.h +716 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-p0/prism/prettyprint.h +26 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-p0/prism/prism.h +272 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-p0/prism/regexp.h +33 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-p0/prism/util/pm_buffer.h +146 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-p0/prism/util/pm_char.h +205 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-p0/prism/util/pm_constant_pool.h +191 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-p0/prism/util/pm_list.h +97 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-p0/prism/util/pm_memchr.h +29 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-p0/prism/util/pm_newline_list.h +104 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-p0/prism/util/pm_state_stack.h +42 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-p0/prism/util/pm_string.h +150 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-p0/prism/util/pm_string_list.h +44 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-p0/prism/util/pm_strncasecmp.h +32 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-p0/prism/util/pm_strpbrk.h +43 -0
- data/lib/debase/ruby_core_source/ruby-3.3.0-p0/prism/version.h +29 -0
- data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/prism_compile.h +12 -1
- data/lib/debase/ruby_core_source/ruby-3.3.0-p0/revision.h +5 -0
- data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/rjit.h +6 -8
- data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/rjit_c.h +0 -1
- data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/rubyparser.h +1 -1
- data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/shape.h +2 -12
- data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/thread_pthread.h +1 -1
- data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/variable.h +2 -0
- data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/version.h +1 -1
- data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/vm.inc +189 -136
- data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/vm_callinfo.h +8 -1
- data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/vm_core.h +64 -5
- data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/vm_insnhelper.h +4 -14
- data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/vmtc.inc +2 -0
- data/lib/debase/ruby_core_source/version.rb +1 -1
- metadata +148 -124
- data/lib/debase/ruby_core_source/ruby-3.3.0-preview3/revision.h +0 -5
- /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/addr2line.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/builtin.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/ccan/build_assert/build_assert.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/ccan/check_type/check_type.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/ccan/container_of/container_of.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/ccan/str/str.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/constant.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/darray.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/debug_counter.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/encindex.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/hrtime.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/id.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/id_table.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/array.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/basic_operators.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/bignum.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/bits.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/cmdlineopt.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/compar.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/compile.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/compilers.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/complex.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/dir.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/enc.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/enum.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/enumerator.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/eval.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/file.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/fixnum.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/hash.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/imemo.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/inits.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/io.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/load.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/loadpath.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/math.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/missing.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/numeric.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/parse.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/proc.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/process.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/ractor.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/range.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/rational.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/re.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/ruby_parser.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/sanitizers.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/serial.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/signal.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/static_assert.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/struct.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/time.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/util.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal/warnings.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/internal.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/known_errors.inc +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/node.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/node_name.inc +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/optinsn.inc +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/parser_bits.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/parser_node.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/parser_st.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/parser_value.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/probes_helper.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/ractor_core.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/regenc.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/regint.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/regparse.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/ruby_assert.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/ruby_atomic.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/siphash.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/symbol.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/thread_none.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/thread_win32.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/timev.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/transcode_data.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/vm_call_iseq_optimized.inc +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/vm_debug.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/vm_exec.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/vm_opts.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/vm_sync.h +0 -0
- /data/lib/debase/ruby_core_source/{ruby-3.3.0-preview3 → ruby-3.3.0-p0}/yjit.h +0 -0
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file pm_strpbrk.h
|
|
3
|
+
*
|
|
4
|
+
* A custom strpbrk implementation.
|
|
5
|
+
*/
|
|
6
|
+
#ifndef PRISM_STRPBRK_H
|
|
7
|
+
#define PRISM_STRPBRK_H
|
|
8
|
+
|
|
9
|
+
#include "prism/defines.h"
|
|
10
|
+
#include "prism/parser.h"
|
|
11
|
+
|
|
12
|
+
#include <stddef.h>
|
|
13
|
+
#include <string.h>
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Here we have rolled our own version of strpbrk. The standard library strpbrk
|
|
17
|
+
* has undefined behavior when the source string is not null-terminated. We want
|
|
18
|
+
* to support strings that are not null-terminated because pm_parse does not
|
|
19
|
+
* have the contract that the string is null-terminated. (This is desirable
|
|
20
|
+
* because it means the extension can call pm_parse with the result of a call to
|
|
21
|
+
* mmap).
|
|
22
|
+
*
|
|
23
|
+
* The standard library strpbrk also does not support passing a maximum length
|
|
24
|
+
* to search. We want to support this for the reason mentioned above, but we
|
|
25
|
+
* also don't want it to stop on null bytes. Ruby actually allows null bytes
|
|
26
|
+
* within strings, comments, regular expressions, etc. So we need to be able to
|
|
27
|
+
* skip past them.
|
|
28
|
+
*
|
|
29
|
+
* Finally, we want to support encodings wherein the charset could contain
|
|
30
|
+
* characters that are trailing bytes of multi-byte characters. For example, in
|
|
31
|
+
* Shift-JIS, the backslash character can be a trailing byte. In that case we
|
|
32
|
+
* need to take a slower path and iterate one multi-byte character at a time.
|
|
33
|
+
*
|
|
34
|
+
* @param parser The parser.
|
|
35
|
+
* @param source The source to search.
|
|
36
|
+
* @param charset The charset to search for.
|
|
37
|
+
* @param length The maximum number of bytes to search.
|
|
38
|
+
* @return A pointer to the first character in the source string that is in the
|
|
39
|
+
* charset, or NULL if no such character exists.
|
|
40
|
+
*/
|
|
41
|
+
const uint8_t * pm_strpbrk(const pm_parser_t *parser, const uint8_t *source, const uint8_t *charset, ptrdiff_t length);
|
|
42
|
+
|
|
43
|
+
#endif
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file version.h
|
|
3
|
+
*
|
|
4
|
+
* The version of the Prism library.
|
|
5
|
+
*/
|
|
6
|
+
#ifndef PRISM_VERSION_H
|
|
7
|
+
#define PRISM_VERSION_H
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* The major version of the Prism library as an int.
|
|
11
|
+
*/
|
|
12
|
+
#define PRISM_VERSION_MAJOR 0
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* The minor version of the Prism library as an int.
|
|
16
|
+
*/
|
|
17
|
+
#define PRISM_VERSION_MINOR 19
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* The patch version of the Prism library as an int.
|
|
21
|
+
*/
|
|
22
|
+
#define PRISM_VERSION_PATCH 0
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* The version of the Prism library as a constant string.
|
|
26
|
+
*/
|
|
27
|
+
#define PRISM_VERSION "0.19.0"
|
|
28
|
+
|
|
29
|
+
#endif
|
|
@@ -6,13 +6,24 @@ typedef struct pm_scope_node {
|
|
|
6
6
|
pm_node_t base;
|
|
7
7
|
struct pm_scope_node *previous;
|
|
8
8
|
pm_node_t *ast_node;
|
|
9
|
-
|
|
9
|
+
pm_node_t *parameters;
|
|
10
10
|
pm_node_t *body;
|
|
11
11
|
pm_constant_id_list_t locals;
|
|
12
12
|
pm_parser_t *parser;
|
|
13
13
|
|
|
14
|
+
// The size of the local table
|
|
15
|
+
// on the iseq which includes
|
|
16
|
+
// locals and hidden variables
|
|
17
|
+
int local_table_for_iseq_size;
|
|
18
|
+
|
|
14
19
|
ID *constants;
|
|
15
20
|
st_table *index_lookup_table;
|
|
21
|
+
|
|
22
|
+
// Some locals are defined at higher scopes than they are used. We can use
|
|
23
|
+
// this offset to control which parent scopes local table we should be
|
|
24
|
+
// referencing from the current scope.
|
|
25
|
+
unsigned int local_depth_offset;
|
|
16
26
|
} pm_scope_node_t;
|
|
17
27
|
|
|
18
28
|
void pm_scope_node_init(const pm_node_t *node, pm_scope_node_t *scope, pm_scope_node_t *previous, pm_parser_t *parser);
|
|
29
|
+
bool *rb_ruby_prism_ptr(void);
|
|
@@ -14,10 +14,6 @@
|
|
|
14
14
|
|
|
15
15
|
# if USE_RJIT
|
|
16
16
|
|
|
17
|
-
#ifndef RJIT_STATS
|
|
18
|
-
# define RJIT_STATS RUBY_DEBUG
|
|
19
|
-
#endif
|
|
20
|
-
|
|
21
17
|
#include "ruby.h"
|
|
22
18
|
#include "vm_core.h"
|
|
23
19
|
|
|
@@ -26,20 +22,22 @@ struct rb_rjit_options {
|
|
|
26
22
|
// Converted from "rjit" feature flag to tell the enablement
|
|
27
23
|
// information to ruby_show_version().
|
|
28
24
|
bool on;
|
|
29
|
-
// Number of calls to trigger JIT compilation.
|
|
30
|
-
unsigned int call_threshold;
|
|
31
25
|
// Size of executable memory block in MiB
|
|
32
26
|
unsigned int exec_mem_size;
|
|
27
|
+
// Number of calls to trigger JIT compilation
|
|
28
|
+
unsigned int call_threshold;
|
|
33
29
|
// Collect RJIT statistics
|
|
34
30
|
bool stats;
|
|
31
|
+
// Do not start RJIT until RJIT.enable is called
|
|
32
|
+
bool disable;
|
|
33
|
+
// Allow TracePoint during JIT compilation
|
|
34
|
+
bool trace;
|
|
35
35
|
// Trace side exit locations
|
|
36
36
|
bool trace_exits;
|
|
37
37
|
// Enable disasm of all JIT code
|
|
38
38
|
bool dump_disasm;
|
|
39
39
|
// Verify context objects
|
|
40
40
|
bool verify_ctx;
|
|
41
|
-
// [experimental] Do not start RJIT until RJIT.resume is called.
|
|
42
|
-
bool pause;
|
|
43
41
|
};
|
|
44
42
|
|
|
45
43
|
RUBY_SYMBOL_EXPORT_BEGIN
|
|
@@ -276,7 +276,7 @@ typedef struct RNode_FOR_MASGN {
|
|
|
276
276
|
struct RNode *nd_var;
|
|
277
277
|
} rb_node_for_masgn_t;
|
|
278
278
|
|
|
279
|
-
/* RNode_BREAK, RNode_NEXT and
|
|
279
|
+
/* RNode_BREAK, RNode_NEXT and RNode_REDO should be same structure */
|
|
280
280
|
typedef struct RNode_BREAK {
|
|
281
281
|
NODE node;
|
|
282
282
|
|
|
@@ -9,7 +9,6 @@
|
|
|
9
9
|
#define SHAPE_IN_BASIC_FLAGS 1
|
|
10
10
|
typedef uint32_t attr_index_t;
|
|
11
11
|
typedef uint32_t shape_id_t;
|
|
12
|
-
typedef uint32_t redblack_id_t;
|
|
13
12
|
# define SHAPE_ID_NUM_BITS 32
|
|
14
13
|
|
|
15
14
|
#else
|
|
@@ -18,11 +17,12 @@ typedef uint32_t redblack_id_t;
|
|
|
18
17
|
#define SHAPE_IN_BASIC_FLAGS 0
|
|
19
18
|
typedef uint16_t attr_index_t;
|
|
20
19
|
typedef uint16_t shape_id_t;
|
|
21
|
-
typedef uint16_t redblack_id_t;
|
|
22
20
|
# define SHAPE_ID_NUM_BITS 16
|
|
23
21
|
|
|
24
22
|
#endif
|
|
25
23
|
|
|
24
|
+
typedef uint32_t redblack_id_t;
|
|
25
|
+
|
|
26
26
|
#define MAX_IVARS (attr_index_t)(-1)
|
|
27
27
|
|
|
28
28
|
# define SHAPE_MASK (((uintptr_t)1 << SHAPE_ID_NUM_BITS) - 1)
|
|
@@ -64,7 +64,6 @@ enum shape_type {
|
|
|
64
64
|
SHAPE_ROOT,
|
|
65
65
|
SHAPE_IVAR,
|
|
66
66
|
SHAPE_FROZEN,
|
|
67
|
-
SHAPE_CAPACITY_CHANGE,
|
|
68
67
|
SHAPE_T_OBJECT,
|
|
69
68
|
SHAPE_OBJ_TOO_COMPLEX,
|
|
70
69
|
};
|
|
@@ -214,20 +213,11 @@ RBASIC_IV_COUNT(VALUE obj)
|
|
|
214
213
|
return rb_shape_get_shape_by_id(rb_shape_get_shape_id(obj))->next_iv_index;
|
|
215
214
|
}
|
|
216
215
|
|
|
217
|
-
static inline uint32_t
|
|
218
|
-
RCLASS_IV_COUNT(VALUE obj)
|
|
219
|
-
{
|
|
220
|
-
RUBY_ASSERT(RB_TYPE_P(obj, RUBY_T_CLASS) || RB_TYPE_P(obj, RUBY_T_MODULE));
|
|
221
|
-
uint32_t ivc = rb_shape_get_shape_by_id(RCLASS_SHAPE_ID(obj))->next_iv_index;
|
|
222
|
-
return ivc;
|
|
223
|
-
}
|
|
224
|
-
|
|
225
216
|
rb_shape_t *rb_shape_traverse_from_new_root(rb_shape_t *initial_shape, rb_shape_t *orig_shape);
|
|
226
217
|
|
|
227
218
|
bool rb_shape_set_shape_id(VALUE obj, shape_id_t shape_id);
|
|
228
219
|
|
|
229
220
|
VALUE rb_obj_debug_shape(VALUE self, VALUE obj);
|
|
230
|
-
void rb_shape_set_too_complex(VALUE obj);
|
|
231
221
|
|
|
232
222
|
// For ext/objspace
|
|
233
223
|
RUBY_SYMBOL_EXPORT_BEGIN
|
|
@@ -134,7 +134,7 @@ struct rb_thread_sched {
|
|
|
134
134
|
|
|
135
135
|
# ifdef __APPLE__
|
|
136
136
|
// on Darwin, TLS can not be accessed across .so
|
|
137
|
-
struct rb_execution_context_struct *rb_current_ec(void);
|
|
137
|
+
NOINLINE(struct rb_execution_context_struct *rb_current_ec(void));
|
|
138
138
|
# else
|
|
139
139
|
RUBY_EXTERN RB_THREAD_LOCAL_SPECIFIER struct rb_execution_context_struct *ruby_current_ec;
|
|
140
140
|
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
# define RUBY_VERSION_MINOR RUBY_API_VERSION_MINOR
|
|
12
12
|
#define RUBY_VERSION_TEENY 0
|
|
13
13
|
#define RUBY_RELEASE_DATE RUBY_RELEASE_YEAR_STR"-"RUBY_RELEASE_MONTH_STR"-"RUBY_RELEASE_DAY_STR
|
|
14
|
-
#define RUBY_PATCHLEVEL
|
|
14
|
+
#define RUBY_PATCHLEVEL 0
|
|
15
15
|
|
|
16
16
|
#include "ruby/version.h"
|
|
17
17
|
#include "ruby/internal/abi.h"
|