YJIT: Upgrade bindgen to stabilize and reduce output

The new version has an option to merge everything into a big
`extern "C"` block and it's nicer.

More importantly, this upgrade fixes an issue where Ubuntu with Clang 12
and macOS with Clang 14 gave a one line diff for `rb_shape_t`. It was
slightly annoying because we use macOS locally.
This commit is contained in:
Alan Wu 2022-12-08 15:03:47 -05:00
Родитель 51ef991d8d
Коммит e714907d82
4 изменённых файлов: 159 добавлений и 561 удалений

138
yjit/bindgen/Cargo.lock сгенерированный
Просмотреть файл

@ -4,9 +4,9 @@ version = 3
[[package]]
name = "aho-corasick"
version = "0.7.18"
version = "0.7.20"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1e37cfd5e7657ada45f742d6e99ca5788580b5c529dc78faf11ece6dc702656f"
checksum = "cc936419f96fa211c1b9166887b38e5e40b19958e5b895be7c1f93adec7071ac"
dependencies = [
"memchr",
]
@ -22,23 +22,15 @@ dependencies = [
"winapi",
]
[[package]]
name = "autocfg"
version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa"
[[package]]
name = "bindgen"
version = "0.60.1"
version = "0.63.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "062dddbc1ba4aca46de6338e2bf87771414c335f7b2f2036e8f3e9befebf88e6"
checksum = "36d860121800b2a9a94f9b5604b332d5cffb234ce17609ea479d723dbc9d3885"
dependencies = [
"bitflags",
"cexpr",
"clang-sys",
"clap",
"env_logger",
"lazy_static",
"lazycell",
"log",
@ -48,6 +40,7 @@ dependencies = [
"regex",
"rustc-hash",
"shlex",
"syn",
"which",
]
@ -74,50 +67,26 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
[[package]]
name = "clang-sys"
version = "1.3.1"
version = "1.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4cc00842eed744b858222c4c9faf7243aafc6d33f92f96935263ef4d8a41ce21"
checksum = "fa2e27ae6ab525c3d369ded447057bca5438d86dc3a68f6faafb8269ba82ebf3"
dependencies = [
"glob",
"libc",
"libloading",
]
[[package]]
name = "clap"
version = "3.2.22"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "86447ad904c7fb335a790c9d7fe3d0d971dc523b8ccd1561a520de9a85302750"
dependencies = [
"atty",
"bitflags",
"clap_lex",
"indexmap",
"strsim",
"termcolor",
"textwrap",
]
[[package]]
name = "clap_lex"
version = "0.2.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2850f2f5a82cbf437dd5af4d49848fbdfc27c157c3d010345776f952765261c5"
dependencies = [
"os_str_bytes",
]
[[package]]
name = "either"
version = "1.6.1"
version = "1.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457"
checksum = "90e5c1c8368803113bf0c9584fc495a58b86dc8a29edbf8fe877d21d9507e797"
[[package]]
name = "env_logger"
version = "0.9.0"
version = "0.9.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0b2cf0344971ee6c64c31be0d530793fba457d322dfec2810c453d0ef228f9c3"
checksum = "a12e6657c4c97ebab115a42dcee77225f7f482cdd841cf7088c657a42e9e00e7"
dependencies = [
"atty",
"humantime",
@ -132,12 +101,6 @@ version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9b919933a397b79c37e33b77bb2aa3dc8eb6e165ad809e58ff75bc7db2e34574"
[[package]]
name = "hashbrown"
version = "0.12.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888"
[[package]]
name = "hermit-abi"
version = "0.1.19"
@ -153,16 +116,6 @@ version = "2.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4"
[[package]]
name = "indexmap"
version = "1.9.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "10a35a97730320ffe8e2d410b5d3b69279b98d2c14bdb8b70ea89ecf7888d41e"
dependencies = [
"autocfg",
"hashbrown",
]
[[package]]
name = "lazy_static"
version = "1.4.0"
@ -177,15 +130,15 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55"
[[package]]
name = "libc"
version = "0.2.124"
version = "0.2.138"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "21a41fed9d98f27ab1c6d161da622a4fa35e8a54a8adc24bbf3ddd0ef70b0e50"
checksum = "db6d7e329c562c5dfab7a46a2afabc8b987ab9a4834c9d1ca04dc54c1546cef8"
[[package]]
name = "libloading"
version = "0.7.3"
version = "0.7.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "efbc0f03f9a775e9f6aed295c6a1ba2253c5757a9e03d55c6caa46a681abcddd"
checksum = "b67380fd3b2fbe7527a606e18729d21c6f3951633d0500574c4dc22d2d638b9f"
dependencies = [
"cfg-if",
"winapi",
@ -193,18 +146,18 @@ dependencies = [
[[package]]
name = "log"
version = "0.4.16"
version = "0.4.17"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6389c490849ff5bc16be905ae24bc913a9c8892e19b2341dbc175e14c341c2b8"
checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e"
dependencies = [
"cfg-if",
]
[[package]]
name = "memchr"
version = "2.4.1"
version = "2.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "308cc39be01b73d0d18f82a0e7b2a3df85245f84af96fdddc5d202d27e47b86a"
checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d"
[[package]]
name = "minimal-lexical"
@ -223,10 +176,10 @@ dependencies = [
]
[[package]]
name = "os_str_bytes"
version = "6.3.0"
name = "once_cell"
version = "1.16.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9ff7415e9ae3fff1225851df9e0d9e4e5479f947619774677a63572e55e80eff"
checksum = "86f0b0d4bf799edbc74508c1e8bf170ff5f41238e5f8225603ca7caaae2b7860"
[[package]]
name = "peeking_take_while"
@ -236,27 +189,27 @@ checksum = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099"
[[package]]
name = "proc-macro2"
version = "1.0.37"
version = "1.0.47"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ec757218438d5fda206afc041538b2f6d889286160d649a86a24d37e1235afd1"
checksum = "5ea3d908b0e36316caf9e9e2c4625cdde190a7e6f440d794667ed17a1855e725"
dependencies = [
"unicode-xid",
"unicode-ident",
]
[[package]]
name = "quote"
version = "1.0.18"
version = "1.0.21"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a1feb54ed693b93a84e14094943b84b7c4eae204c512b7ccb95ab0c66d278ad1"
checksum = "bbe448f377a7d6961e30f5955f9b8d106c3f5e449d493ee1b125c1d43c2b5179"
dependencies = [
"proc-macro2",
]
[[package]]
name = "regex"
version = "1.5.5"
version = "1.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1a11647b6b25ff05a515cb92c365cec08801e83423a235b51e231e1808747286"
checksum = "e076559ef8e241f2ae3479e36f97bd5741c0330689e217ad51ce2c76808b868a"
dependencies = [
"aho-corasick",
"memchr",
@ -265,9 +218,9 @@ dependencies = [
[[package]]
name = "regex-syntax"
version = "0.6.25"
version = "0.6.28"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f497285884f3fcff424ffc933e56d7cbca511def0c9831a7f9b5f6153e3cc89b"
checksum = "456c603be3e8d448b072f410900c09faf164fbce2d480456f50eea6e25f9c848"
[[package]]
name = "rustc-hash"
@ -282,10 +235,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "43b2853a4d09f215c24cc5489c992ce46052d359b5109343cbafbf26bc62f8a3"
[[package]]
name = "strsim"
version = "0.10.0"
name = "syn"
version = "1.0.105"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623"
checksum = "60b9b43d45702de4c839cb9b51d9f529c5dd26a4aff255b42b1ebc03e88ee908"
dependencies = [
"proc-macro2",
"quote",
"unicode-ident",
]
[[package]]
name = "termcolor"
@ -297,26 +255,20 @@ dependencies = [
]
[[package]]
name = "textwrap"
version = "0.15.1"
name = "unicode-ident"
version = "1.0.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "949517c0cf1bf4ee812e2e07e08ab448e3ae0d23472aee8a06c985f0c8815b16"
[[package]]
name = "unicode-xid"
version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8ccb82d61f80a663efe1f787a51b16b5a51e3314d6ac365b08639f52387b33f3"
checksum = "6ceab39d59e4c9499d4e5a8ee0e2735b891bb7308ac83dfb4e80cad195c9f6f3"
[[package]]
name = "which"
version = "4.2.5"
version = "4.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5c4fb54e6113b6a8772ee41c3404fb0301ac79604489467e0a9ce1f3e97c24ae"
checksum = "1c831fbbee9e129a8cf93e7747a82da9d95ba8e16621cae60ec2cdc849bacb7b"
dependencies = [
"either",
"lazy_static",
"libc",
"once_cell",
]
[[package]]

Просмотреть файл

@ -6,5 +6,5 @@ edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
bindgen = "0.60.1"
bindgen = "0.63.0"
env_logger = "0.9.0"

Просмотреть файл

@ -50,6 +50,9 @@ fn main() {
// Don't want to copy over C comment
.generate_comments(false)
// Makes the output more compact
.merge_extern_blocks(true)
// Don't want layout tests as they are platform dependent
.layout_tests(false)

Просмотреть файл

@ -1,4 +1,4 @@
/* automatically generated by rust-bindgen 0.60.1 */
/* automatically generated by rust-bindgen 0.63.0 */
#[repr(C)]
#[derive(Copy, Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)]
@ -142,16 +142,7 @@ pub const VM_ENV_DATA_INDEX_SPECVAL: i32 = -1;
pub const VM_ENV_DATA_INDEX_FLAGS: u32 = 0;
pub const VM_BLOCK_HANDLER_NONE: u32 = 0;
pub type ID = ::std::os::raw::c_ulong;
extern "C" {
pub fn rb_singleton_class(obj: VALUE) -> VALUE;
}
pub type rb_alloc_func_t = ::std::option::Option<unsafe extern "C" fn(klass: VALUE) -> VALUE>;
extern "C" {
pub fn rb_get_alloc_func(klass: VALUE) -> rb_alloc_func_t;
}
extern "C" {
pub fn rb_method_basic_definition_p(klass: VALUE, mid: ID) -> ::std::os::raw::c_int;
}
pub const RUBY_Qfalse: ruby_special_consts = 0;
pub const RUBY_Qnil: ruby_special_consts = 4;
pub const RUBY_Qtrue: ruby_special_consts = 20;
@ -248,9 +239,6 @@ pub type st_foreach_callback_func = ::std::option::Option<
arg3: st_data_t,
) -> ::std::os::raw::c_int,
>;
extern "C" {
pub fn rb_gc_writebarrier(old: VALUE, young: VALUE);
}
pub const RARRAY_EMBED_FLAG: ruby_rarray_flags = 8192;
pub const RARRAY_EMBED_LEN_MASK: ruby_rarray_flags = 4161536;
pub const RARRAY_TRANSIENT_FLAG: ruby_rarray_flags = 33554432;
@ -259,53 +247,11 @@ pub const RARRAY_EMBED_LEN_SHIFT: ruby_rarray_consts = 15;
pub type ruby_rarray_consts = u32;
pub const RMODULE_IS_REFINEMENT: ruby_rmodule_flags = 32768;
pub type ruby_rmodule_flags = u32;
extern "C" {
pub fn rb_class_get_superclass(klass: VALUE) -> VALUE;
}
pub const ROBJECT_EMBED: ruby_robject_flags = 8192;
pub type ruby_robject_flags = u32;
pub const ROBJECT_OFFSET_AS_HEAP_IVPTR: i32 = 16;
pub const ROBJECT_OFFSET_AS_HEAP_IV_INDEX_TBL: i32 = 24;
pub const ROBJECT_OFFSET_AS_ARY: i32 = 16;
extern "C" {
pub static mut rb_mKernel: VALUE;
}
extern "C" {
pub static mut rb_cBasicObject: VALUE;
}
extern "C" {
pub static mut rb_cArray: VALUE;
}
extern "C" {
pub static mut rb_cFalseClass: VALUE;
}
extern "C" {
pub static mut rb_cFloat: VALUE;
}
extern "C" {
pub static mut rb_cHash: VALUE;
}
extern "C" {
pub static mut rb_cInteger: VALUE;
}
extern "C" {
pub static mut rb_cModule: VALUE;
}
extern "C" {
pub static mut rb_cNilClass: VALUE;
}
extern "C" {
pub static mut rb_cString: VALUE;
}
extern "C" {
pub static mut rb_cSymbol: VALUE;
}
extern "C" {
pub static mut rb_cThread: VALUE;
}
extern "C" {
pub static mut rb_cTrueClass: VALUE;
}
pub type rb_block_call_func = ::std::option::Option<
unsafe extern "C" fn(
yielded_arg: VALUE,
@ -316,96 +262,6 @@ pub type rb_block_call_func = ::std::option::Option<
) -> VALUE,
>;
pub type rb_block_call_func_t = rb_block_call_func;
extern "C" {
pub fn rb_ary_new_capa(capa: ::std::os::raw::c_long) -> VALUE;
}
extern "C" {
pub fn rb_ary_store(ary: VALUE, key: ::std::os::raw::c_long, val: VALUE);
}
extern "C" {
pub fn rb_ary_resurrect(ary: VALUE) -> VALUE;
}
extern "C" {
pub fn rb_ary_clear(ary: VALUE) -> VALUE;
}
extern "C" {
pub fn rb_hash_new() -> VALUE;
}
extern "C" {
pub fn rb_hash_aref(hash: VALUE, key: VALUE) -> VALUE;
}
extern "C" {
pub fn rb_hash_aset(hash: VALUE, key: VALUE, val: VALUE) -> VALUE;
}
extern "C" {
pub fn rb_hash_bulk_insert(argc: ::std::os::raw::c_long, argv: *const VALUE, hash: VALUE);
}
extern "C" {
pub fn rb_sym2id(obj: VALUE) -> ID;
}
extern "C" {
pub fn rb_id2sym(id: ID) -> VALUE;
}
extern "C" {
pub fn rb_intern(name: *const ::std::os::raw::c_char) -> ID;
}
extern "C" {
pub fn rb_gc_mark(obj: VALUE);
}
extern "C" {
pub fn rb_gc_mark_movable(obj: VALUE);
}
extern "C" {
pub fn rb_gc_location(obj: VALUE) -> VALUE;
}
extern "C" {
pub fn rb_obj_is_kind_of(obj: VALUE, klass: VALUE) -> VALUE;
}
extern "C" {
pub fn rb_obj_frozen_p(obj: VALUE) -> VALUE;
}
extern "C" {
pub fn rb_backref_get() -> VALUE;
}
extern "C" {
pub fn rb_range_new(beg: VALUE, end: VALUE, excl: ::std::os::raw::c_int) -> VALUE;
}
extern "C" {
pub fn rb_reg_nth_match(n: ::std::os::raw::c_int, md: VALUE) -> VALUE;
}
extern "C" {
pub fn rb_reg_last_match(md: VALUE) -> VALUE;
}
extern "C" {
pub fn rb_reg_match_pre(md: VALUE) -> VALUE;
}
extern "C" {
pub fn rb_reg_match_post(md: VALUE) -> VALUE;
}
extern "C" {
pub fn rb_reg_match_last(md: VALUE) -> VALUE;
}
extern "C" {
pub fn rb_utf8_str_new(
ptr: *const ::std::os::raw::c_char,
len: ::std::os::raw::c_long,
) -> VALUE;
}
extern "C" {
pub fn rb_str_buf_append(dst: VALUE, src: VALUE) -> VALUE;
}
extern "C" {
pub fn rb_str_dup(str_: VALUE) -> VALUE;
}
extern "C" {
pub fn rb_str_intern(str_: VALUE) -> VALUE;
}
extern "C" {
pub fn rb_ivar_get(obj: VALUE, name: ID) -> VALUE;
}
extern "C" {
pub fn rb_attr_get(obj: VALUE, name: ID) -> VALUE;
}
pub const RUBY_ENCODING_INLINE_MAX: ruby_encoding_consts = 127;
pub const RUBY_ENCODING_SHIFT: ruby_encoding_consts = 22;
pub const RUBY_ENCODING_MASK: ruby_encoding_consts = 532676608;
@ -425,15 +281,10 @@ pub const RUBY_ENCINDEX_EUC_JP: ruby_preserved_encindex = 10;
pub const RUBY_ENCINDEX_Windows_31J: ruby_preserved_encindex = 11;
pub const RUBY_ENCINDEX_BUILTIN_MAX: ruby_preserved_encindex = 12;
pub type ruby_preserved_encindex = u32;
extern "C" {
pub fn rb_obj_info_dump(obj: VALUE);
}
extern "C" {
pub fn rb_reg_new_ary(ary: VALUE, options: ::std::os::raw::c_int) -> VALUE;
}
pub type attr_index_t = u32;
pub type shape_id_t = u32;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct rb_shape {
pub edges: *mut rb_id_table,
pub edge_name: ID,
@ -444,30 +295,6 @@ pub struct rb_shape {
pub parent_id: shape_id_t,
}
pub type rb_shape_t = rb_shape;
extern "C" {
pub fn rb_shape_id_offset() -> i32;
}
extern "C" {
pub fn rb_shape_get_shape_by_id(shape_id: shape_id_t) -> *mut rb_shape_t;
}
extern "C" {
pub fn rb_shape_get_shape_id(obj: VALUE) -> shape_id_t;
}
extern "C" {
pub fn rb_shape_transition_shape_capa(
shape: *mut rb_shape_t,
new_capacity: u32,
) -> *mut rb_shape_t;
}
extern "C" {
pub fn rb_shape_get_next(shape: *mut rb_shape_t, obj: VALUE, id: ID) -> *mut rb_shape_t;
}
extern "C" {
pub fn rb_shape_get_iv_index(shape: *mut rb_shape_t, id: ID, value: *mut attr_index_t) -> bool;
}
extern "C" {
pub fn rb_shape_id(shape: *mut rb_shape_t) -> shape_id_t;
}
pub const idDot2: ruby_method_ids = 128;
pub const idDot3: ruby_method_ids = 129;
pub const idUPlus: ruby_method_ids = 132;
@ -679,20 +506,6 @@ pub const idERROR_INFO: ruby_method_ids = 3847;
pub const tLAST_OP_ID: ruby_method_ids = 169;
pub const idLAST_OP_ID: ruby_method_ids = 10;
pub type ruby_method_ids = u32;
extern "C" {
pub fn rb_ary_tmp_new_from_values(
arg1: VALUE,
arg2: ::std::os::raw::c_long,
arg3: *const VALUE,
) -> VALUE;
}
extern "C" {
pub fn rb_ec_ary_new_from_values(
ec: *mut rb_execution_context_struct,
n: ::std::os::raw::c_long,
elts: *const VALUE,
) -> VALUE;
}
pub const BOP_PLUS: ruby_basic_operators = 0;
pub const BOP_MINUS: ruby_basic_operators = 1;
pub const BOP_MULT: ruby_basic_operators = 2;
@ -726,12 +539,6 @@ pub const BOP_CMP: ruby_basic_operators = 29;
pub const BOP_LAST_: ruby_basic_operators = 30;
pub type ruby_basic_operators = u32;
pub type rb_serial_t = ::std::os::raw::c_ulonglong;
extern "C" {
pub fn rb_class_allocate_instance(klass: VALUE) -> VALUE;
}
extern "C" {
pub fn rb_obj_info(obj: VALUE) -> *const ::std::os::raw::c_char;
}
pub const imemo_env: imemo_type = 0;
pub const imemo_cref: imemo_type = 1;
pub const imemo_svar: imemo_type = 2;
@ -824,18 +631,6 @@ pub type method_optimized_type = u32;
pub struct rb_id_table {
_unused: [u8; 0],
}
extern "C" {
pub fn rb_method_entry_at(obj: VALUE, id: ID) -> *const rb_method_entry_t;
}
extern "C" {
pub fn rb_callable_method_entry(klass: VALUE, id: ID) -> *const rb_callable_method_entry_t;
}
extern "C" {
pub fn rb_callable_method_entry_or_negative(
klass: VALUE,
id: ID,
) -> *const rb_callable_method_entry_t;
}
pub type rb_num_t = ::std::os::raw::c_ulong;
#[repr(C)]
pub struct iseq_inline_constant_cache_entry {
@ -903,12 +698,6 @@ pub struct rb_block__bindgen_ty_1 {
pub bindgen_union_field: [u64; 3usize],
}
pub type rb_control_frame_t = rb_control_frame_struct;
extern "C" {
pub static mut rb_mRubyVMFrozenCore: VALUE;
}
extern "C" {
pub static mut rb_block_param_proxy: VALUE;
}
#[repr(C)]
pub struct rb_proc_t {
pub block: rb_block,
@ -1001,20 +790,6 @@ pub const VM_ENV_FLAG_ESCAPED: vm_frame_env_flags = 4;
pub const VM_ENV_FLAG_WB_REQUIRED: vm_frame_env_flags = 8;
pub const VM_ENV_FLAG_ISOLATED: vm_frame_env_flags = 16;
pub type vm_frame_env_flags = u32;
extern "C" {
pub fn rb_vm_ep_local_ep(ep: *const VALUE) -> *const VALUE;
}
extern "C" {
pub fn rb_iseq_path(iseq: *const rb_iseq_t) -> VALUE;
}
extern "C" {
pub fn rb_vm_bh_to_procval(ec: *const rb_execution_context_t, block_handler: VALUE) -> VALUE;
}
extern "C" {
pub fn rb_vm_frame_method_entry(
cfp: *const rb_control_frame_t,
) -> *const rb_callable_method_entry_t;
}
#[repr(C)]
pub struct rb_cvar_class_tbl_entry {
pub index: u32,
@ -1050,47 +825,6 @@ pub struct rb_call_data {
pub ci: *const rb_callinfo,
pub cc: *const rb_callcache,
}
extern "C" {
pub fn rb_obj_as_string_result(str_: VALUE, obj: VALUE) -> VALUE;
}
extern "C" {
pub fn rb_str_concat_literals(num: size_t, strary: *const VALUE) -> VALUE;
}
extern "C" {
pub fn rb_ec_str_resurrect(ec: *mut rb_execution_context_struct, str_: VALUE) -> VALUE;
}
extern "C" {
pub fn rb_hash_stlike_foreach(
hash: VALUE,
func: st_foreach_callback_func,
arg: st_data_t,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn rb_hash_new_with_size(size: st_index_t) -> VALUE;
}
extern "C" {
pub fn rb_hash_resurrect(hash: VALUE) -> VALUE;
}
extern "C" {
pub fn rb_hash_stlike_lookup(
hash: VALUE,
key: st_data_t,
pval: *mut st_data_t,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn rb_gvar_get(arg1: ID) -> VALUE;
}
extern "C" {
pub fn rb_gvar_set(arg1: ID, arg2: VALUE) -> VALUE;
}
extern "C" {
pub fn rb_ensure_iv_list_size(obj: VALUE, len: u32, newsize: u32);
}
extern "C" {
pub fn rb_vm_insn_decode(encoded: VALUE) -> ::std::os::raw::c_int;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct rb_builtin_function {
@ -1314,226 +1048,203 @@ pub type ruby_vminsn_type = u32;
pub type rb_iseq_callback = ::std::option::Option<
unsafe extern "C" fn(arg1: *const rb_iseq_t, arg2: *mut ::std::os::raw::c_void),
>;
pub type rb_seq_param_keyword_struct = rb_iseq_constant_body__bindgen_ty_1_rb_iseq_param_keyword;
extern "C" {
pub fn rb_singleton_class(obj: VALUE) -> VALUE;
pub fn rb_get_alloc_func(klass: VALUE) -> rb_alloc_func_t;
pub fn rb_method_basic_definition_p(klass: VALUE, mid: ID) -> ::std::os::raw::c_int;
pub fn rb_gc_writebarrier(old: VALUE, young: VALUE);
pub fn rb_class_get_superclass(klass: VALUE) -> VALUE;
pub static mut rb_mKernel: VALUE;
pub static mut rb_cBasicObject: VALUE;
pub static mut rb_cArray: VALUE;
pub static mut rb_cFalseClass: VALUE;
pub static mut rb_cFloat: VALUE;
pub static mut rb_cHash: VALUE;
pub static mut rb_cInteger: VALUE;
pub static mut rb_cModule: VALUE;
pub static mut rb_cNilClass: VALUE;
pub static mut rb_cString: VALUE;
pub static mut rb_cSymbol: VALUE;
pub static mut rb_cThread: VALUE;
pub static mut rb_cTrueClass: VALUE;
pub fn rb_ary_new_capa(capa: ::std::os::raw::c_long) -> VALUE;
pub fn rb_ary_store(ary: VALUE, key: ::std::os::raw::c_long, val: VALUE);
pub fn rb_ary_resurrect(ary: VALUE) -> VALUE;
pub fn rb_ary_clear(ary: VALUE) -> VALUE;
pub fn rb_hash_new() -> VALUE;
pub fn rb_hash_aref(hash: VALUE, key: VALUE) -> VALUE;
pub fn rb_hash_aset(hash: VALUE, key: VALUE, val: VALUE) -> VALUE;
pub fn rb_hash_bulk_insert(argc: ::std::os::raw::c_long, argv: *const VALUE, hash: VALUE);
pub fn rb_sym2id(obj: VALUE) -> ID;
pub fn rb_id2sym(id: ID) -> VALUE;
pub fn rb_intern(name: *const ::std::os::raw::c_char) -> ID;
pub fn rb_gc_mark(obj: VALUE);
pub fn rb_gc_mark_movable(obj: VALUE);
pub fn rb_gc_location(obj: VALUE) -> VALUE;
pub fn rb_obj_is_kind_of(obj: VALUE, klass: VALUE) -> VALUE;
pub fn rb_obj_frozen_p(obj: VALUE) -> VALUE;
pub fn rb_backref_get() -> VALUE;
pub fn rb_range_new(beg: VALUE, end: VALUE, excl: ::std::os::raw::c_int) -> VALUE;
pub fn rb_reg_nth_match(n: ::std::os::raw::c_int, md: VALUE) -> VALUE;
pub fn rb_reg_last_match(md: VALUE) -> VALUE;
pub fn rb_reg_match_pre(md: VALUE) -> VALUE;
pub fn rb_reg_match_post(md: VALUE) -> VALUE;
pub fn rb_reg_match_last(md: VALUE) -> VALUE;
pub fn rb_utf8_str_new(
ptr: *const ::std::os::raw::c_char,
len: ::std::os::raw::c_long,
) -> VALUE;
pub fn rb_str_buf_append(dst: VALUE, src: VALUE) -> VALUE;
pub fn rb_str_dup(str_: VALUE) -> VALUE;
pub fn rb_str_intern(str_: VALUE) -> VALUE;
pub fn rb_ivar_get(obj: VALUE, name: ID) -> VALUE;
pub fn rb_attr_get(obj: VALUE, name: ID) -> VALUE;
pub fn rb_obj_info_dump(obj: VALUE);
pub fn rb_reg_new_ary(ary: VALUE, options: ::std::os::raw::c_int) -> VALUE;
pub fn rb_shape_id_offset() -> i32;
pub fn rb_shape_get_shape_by_id(shape_id: shape_id_t) -> *mut rb_shape_t;
pub fn rb_shape_get_shape_id(obj: VALUE) -> shape_id_t;
pub fn rb_shape_transition_shape_capa(
shape: *mut rb_shape_t,
new_capacity: u32,
) -> *mut rb_shape_t;
pub fn rb_shape_get_next(shape: *mut rb_shape_t, obj: VALUE, id: ID) -> *mut rb_shape_t;
pub fn rb_shape_get_iv_index(shape: *mut rb_shape_t, id: ID, value: *mut attr_index_t) -> bool;
pub fn rb_shape_id(shape: *mut rb_shape_t) -> shape_id_t;
pub fn rb_ary_tmp_new_from_values(
arg1: VALUE,
arg2: ::std::os::raw::c_long,
arg3: *const VALUE,
) -> VALUE;
pub fn rb_ec_ary_new_from_values(
ec: *mut rb_execution_context_struct,
n: ::std::os::raw::c_long,
elts: *const VALUE,
) -> VALUE;
pub fn rb_class_allocate_instance(klass: VALUE) -> VALUE;
pub fn rb_obj_info(obj: VALUE) -> *const ::std::os::raw::c_char;
pub fn rb_method_entry_at(obj: VALUE, id: ID) -> *const rb_method_entry_t;
pub fn rb_callable_method_entry(klass: VALUE, id: ID) -> *const rb_callable_method_entry_t;
pub fn rb_callable_method_entry_or_negative(
klass: VALUE,
id: ID,
) -> *const rb_callable_method_entry_t;
pub static mut rb_mRubyVMFrozenCore: VALUE;
pub static mut rb_block_param_proxy: VALUE;
pub fn rb_vm_ep_local_ep(ep: *const VALUE) -> *const VALUE;
pub fn rb_iseq_path(iseq: *const rb_iseq_t) -> VALUE;
pub fn rb_vm_bh_to_procval(ec: *const rb_execution_context_t, block_handler: VALUE) -> VALUE;
pub fn rb_vm_frame_method_entry(
cfp: *const rb_control_frame_t,
) -> *const rb_callable_method_entry_t;
pub fn rb_obj_as_string_result(str_: VALUE, obj: VALUE) -> VALUE;
pub fn rb_str_concat_literals(num: usize, strary: *const VALUE) -> VALUE;
pub fn rb_ec_str_resurrect(ec: *mut rb_execution_context_struct, str_: VALUE) -> VALUE;
pub fn rb_hash_stlike_foreach(
hash: VALUE,
func: st_foreach_callback_func,
arg: st_data_t,
) -> ::std::os::raw::c_int;
pub fn rb_hash_new_with_size(size: st_index_t) -> VALUE;
pub fn rb_hash_resurrect(hash: VALUE) -> VALUE;
pub fn rb_hash_stlike_lookup(
hash: VALUE,
key: st_data_t,
pval: *mut st_data_t,
) -> ::std::os::raw::c_int;
pub fn rb_gvar_get(arg1: ID) -> VALUE;
pub fn rb_gvar_set(arg1: ID, arg2: VALUE) -> VALUE;
pub fn rb_ensure_iv_list_size(obj: VALUE, len: u32, newsize: u32);
pub fn rb_vm_insn_decode(encoded: VALUE) -> ::std::os::raw::c_int;
pub fn rb_vm_insn_addr2opcode(addr: *const ::std::os::raw::c_void) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn rb_iseqw_to_iseq(iseqw: VALUE) -> *const rb_iseq_t;
}
extern "C" {
pub fn rb_iseq_method_name(iseq: *const rb_iseq_t) -> VALUE;
}
extern "C" {
pub fn rb_vm_barrier();
}
extern "C" {
pub fn rb_profile_frames(
start: ::std::os::raw::c_int,
limit: ::std::os::raw::c_int,
buff: *mut VALUE,
lines: *mut ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn rb_jit_cont_each_iseq(callback: rb_iseq_callback, data: *mut ::std::os::raw::c_void);
}
extern "C" {
pub fn rb_yjit_mark_writable(mem_block: *mut ::std::os::raw::c_void, mem_size: u32) -> bool;
}
extern "C" {
pub fn rb_yjit_mark_executable(mem_block: *mut ::std::os::raw::c_void, mem_size: u32);
}
extern "C" {
pub fn rb_yjit_mark_unused(mem_block: *mut ::std::os::raw::c_void, mem_size: u32) -> bool;
}
extern "C" {
pub fn rb_yjit_icache_invalidate(
start: *mut ::std::os::raw::c_void,
end: *mut ::std::os::raw::c_void,
);
}
extern "C" {
pub fn rb_yjit_exit_locations_dict(
yjit_raw_samples: *mut VALUE,
yjit_line_samples: *mut ::std::os::raw::c_int,
samples_len: ::std::os::raw::c_int,
) -> VALUE;
}
extern "C" {
pub fn rb_yjit_get_page_size() -> u32;
}
extern "C" {
pub fn rb_yjit_reserve_addr_space(mem_size: u32) -> *mut u8;
}
extern "C" {
pub fn rb_c_method_tracing_currently_enabled(ec: *mut rb_execution_context_t) -> bool;
}
extern "C" {
pub fn rb_full_cfunc_return(ec: *mut rb_execution_context_t, return_value: VALUE);
}
extern "C" {
pub fn rb_iseq_encoded_size(iseq: *const rb_iseq_t) -> ::std::os::raw::c_uint;
}
extern "C" {
pub fn rb_iseq_get_yjit_payload(iseq: *const rb_iseq_t) -> *mut ::std::os::raw::c_void;
}
extern "C" {
pub fn rb_iseq_set_yjit_payload(iseq: *const rb_iseq_t, payload: *mut ::std::os::raw::c_void);
}
extern "C" {
pub fn rb_iseq_reset_jit_func(iseq: *const rb_iseq_t);
}
extern "C" {
pub fn rb_iseq_pc_at_idx(iseq: *const rb_iseq_t, insn_idx: u32) -> *mut VALUE;
}
extern "C" {
pub fn rb_iseq_opcode_at_pc(iseq: *const rb_iseq_t, pc: *const VALUE) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn rb_RSTRING_LEN(str_: VALUE) -> ::std::os::raw::c_ulong;
}
extern "C" {
pub fn rb_RSTRING_PTR(str_: VALUE) -> *mut ::std::os::raw::c_char;
}
extern "C" {
pub fn rb_yjit_get_proc_ptr(procv: VALUE) -> *mut rb_proc_t;
}
pub type rb_seq_param_keyword_struct = rb_iseq_constant_body__bindgen_ty_1_rb_iseq_param_keyword;
extern "C" {
pub fn rb_insn_name(insn: VALUE) -> *const ::std::os::raw::c_char;
}
extern "C" {
pub fn rb_insn_len(insn: VALUE) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn rb_vm_ci_argc(ci: *const rb_callinfo) -> ::std::os::raw::c_uint;
}
extern "C" {
pub fn rb_vm_ci_mid(ci: *const rb_callinfo) -> ID;
}
extern "C" {
pub fn rb_vm_ci_flag(ci: *const rb_callinfo) -> ::std::os::raw::c_uint;
}
extern "C" {
pub fn rb_vm_ci_kwarg(ci: *const rb_callinfo) -> *const rb_callinfo_kwarg;
}
extern "C" {
pub fn rb_get_cikw_keyword_len(cikw: *const rb_callinfo_kwarg) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn rb_get_cikw_keywords_idx(
cikw: *const rb_callinfo_kwarg,
idx: ::std::os::raw::c_int,
) -> VALUE;
}
extern "C" {
pub fn rb_METHOD_ENTRY_VISI(me: *const rb_callable_method_entry_t) -> rb_method_visibility_t;
}
extern "C" {
pub fn rb_get_cme_def_type(cme: *const rb_callable_method_entry_t) -> rb_method_type_t;
}
extern "C" {
pub fn rb_get_cme_def_body_attr_id(cme: *const rb_callable_method_entry_t) -> ID;
}
extern "C" {
pub fn rb_get_symbol_id(namep: VALUE) -> ID;
}
extern "C" {
pub fn rb_get_cme_def_body_optimized_type(
cme: *const rb_callable_method_entry_t,
) -> method_optimized_type;
}
extern "C" {
pub fn rb_get_cme_def_body_optimized_index(
cme: *const rb_callable_method_entry_t,
) -> ::std::os::raw::c_uint;
}
extern "C" {
pub fn rb_get_cme_def_body_cfunc(
cme: *const rb_callable_method_entry_t,
) -> *mut rb_method_cfunc_t;
}
extern "C" {
pub fn rb_get_def_method_serial(def: *const rb_method_definition_t) -> usize;
}
extern "C" {
pub fn rb_get_def_original_id(def: *const rb_method_definition_t) -> ID;
}
extern "C" {
pub fn rb_get_mct_argc(mct: *const rb_method_cfunc_t) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn rb_get_mct_func(mct: *const rb_method_cfunc_t) -> *mut ::std::os::raw::c_void;
}
extern "C" {
pub fn rb_get_def_iseq_ptr(def: *mut rb_method_definition_t) -> *const rb_iseq_t;
}
extern "C" {
pub fn rb_get_def_bmethod_proc(def: *mut rb_method_definition_t) -> VALUE;
}
extern "C" {
pub fn rb_get_iseq_body_local_iseq(iseq: *const rb_iseq_t) -> *const rb_iseq_t;
}
extern "C" {
pub fn rb_get_iseq_body_parent_iseq(iseq: *const rb_iseq_t) -> *const rb_iseq_t;
}
extern "C" {
pub fn rb_get_iseq_body_local_table_size(iseq: *const rb_iseq_t) -> ::std::os::raw::c_uint;
}
extern "C" {
pub fn rb_get_iseq_body_iseq_encoded(iseq: *const rb_iseq_t) -> *mut VALUE;
}
extern "C" {
pub fn rb_get_iseq_body_stack_max(iseq: *const rb_iseq_t) -> ::std::os::raw::c_uint;
}
extern "C" {
pub fn rb_get_iseq_flags_has_lead(iseq: *const rb_iseq_t) -> bool;
}
extern "C" {
pub fn rb_get_iseq_flags_has_opt(iseq: *const rb_iseq_t) -> bool;
}
extern "C" {
pub fn rb_get_iseq_flags_has_kw(iseq: *const rb_iseq_t) -> bool;
}
extern "C" {
pub fn rb_get_iseq_flags_has_post(iseq: *const rb_iseq_t) -> bool;
}
extern "C" {
pub fn rb_get_iseq_flags_has_kwrest(iseq: *const rb_iseq_t) -> bool;
}
extern "C" {
pub fn rb_get_iseq_flags_has_rest(iseq: *const rb_iseq_t) -> bool;
}
extern "C" {
pub fn rb_get_iseq_flags_ruby2_keywords(iseq: *const rb_iseq_t) -> bool;
}
extern "C" {
pub fn rb_get_iseq_flags_has_block(iseq: *const rb_iseq_t) -> bool;
}
extern "C" {
pub fn rb_get_iseq_flags_ambiguous_param0(iseq: *const rb_iseq_t) -> bool;
}
extern "C" {
pub fn rb_get_iseq_flags_accepts_no_kwarg(iseq: *const rb_iseq_t) -> bool;
}
extern "C" {
pub fn rb_get_iseq_body_param_keyword(
iseq: *const rb_iseq_t,
) -> *const rb_seq_param_keyword_struct;
}
extern "C" {
pub fn rb_get_iseq_body_param_size(iseq: *const rb_iseq_t) -> ::std::os::raw::c_uint;
}
extern "C" {
pub fn rb_get_iseq_body_param_lead_num(iseq: *const rb_iseq_t) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn rb_get_iseq_body_param_opt_num(iseq: *const rb_iseq_t) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn rb_get_iseq_body_param_opt_table(iseq: *const rb_iseq_t) -> *const VALUE;
}
extern "C" {
pub fn rb_optimized_call(
recv: *mut VALUE,
ec: *mut rb_execution_context_t,
@ -1542,116 +1253,48 @@ extern "C" {
kw_splat: ::std::os::raw::c_int,
block_handler: VALUE,
) -> VALUE;
}
extern "C" {
pub fn rb_leaf_invokebuiltin_iseq_p(iseq: *const rb_iseq_t) -> bool;
}
extern "C" {
pub fn rb_leaf_builtin_function(iseq: *const rb_iseq_t) -> *const rb_builtin_function;
}
extern "C" {
pub fn rb_yjit_str_simple_append(str1: VALUE, str2: VALUE) -> VALUE;
}
extern "C" {
pub fn rb_get_ec_cfp(ec: *const rb_execution_context_t) -> *mut rb_control_frame_struct;
}
extern "C" {
pub fn rb_get_cfp_pc(cfp: *mut rb_control_frame_struct) -> *mut VALUE;
}
extern "C" {
pub fn rb_get_cfp_sp(cfp: *mut rb_control_frame_struct) -> *mut VALUE;
}
extern "C" {
pub fn rb_set_cfp_pc(cfp: *mut rb_control_frame_struct, pc: *const VALUE);
}
extern "C" {
pub fn rb_set_cfp_sp(cfp: *mut rb_control_frame_struct, sp: *mut VALUE);
}
extern "C" {
pub fn rb_cfp_get_iseq(cfp: *mut rb_control_frame_struct) -> *mut rb_iseq_t;
}
extern "C" {
pub fn rb_get_cfp_self(cfp: *mut rb_control_frame_struct) -> VALUE;
}
extern "C" {
pub fn rb_get_cfp_ep(cfp: *mut rb_control_frame_struct) -> *mut VALUE;
}
extern "C" {
pub fn rb_get_cfp_ep_level(cfp: *mut rb_control_frame_struct, lv: u32) -> *const VALUE;
}
extern "C" {
pub fn rb_yarv_class_of(obj: VALUE) -> VALUE;
}
extern "C" {
pub fn rb_yarv_str_eql_internal(str1: VALUE, str2: VALUE) -> VALUE;
}
extern "C" {
pub fn rb_yarv_ary_entry_internal(ary: VALUE, offset: ::std::os::raw::c_long) -> VALUE;
}
extern "C" {
pub fn rb_yarv_fix_mod_fix(recv: VALUE, obj: VALUE) -> VALUE;
}
extern "C" {
pub fn rb_yjit_dump_iseq_loc(iseq: *const rb_iseq_t, insn_idx: u32);
}
extern "C" {
pub fn rb_FL_TEST(obj: VALUE, flags: VALUE) -> VALUE;
}
extern "C" {
pub fn rb_FL_TEST_RAW(obj: VALUE, flags: VALUE) -> VALUE;
}
extern "C" {
pub fn rb_RB_TYPE_P(obj: VALUE, t: ruby_value_type) -> bool;
}
extern "C" {
pub fn rb_RSTRUCT_LEN(st: VALUE) -> ::std::os::raw::c_long;
}
extern "C" {
pub fn rb_RSTRUCT_SET(st: VALUE, k: ::std::os::raw::c_int, v: VALUE);
}
extern "C" {
pub fn rb_get_call_data_ci(cd: *const rb_call_data) -> *const rb_callinfo;
}
extern "C" {
pub fn rb_BASIC_OP_UNREDEFINED_P(bop: ruby_basic_operators, klass: u32) -> bool;
}
extern "C" {
pub fn rb_RCLASS_ORIGIN(c: VALUE) -> VALUE;
}
extern "C" {
pub fn rb_ENCODING_GET(obj: VALUE) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn rb_yjit_multi_ractor_p() -> bool;
}
extern "C" {
pub fn rb_assert_iseq_handle(handle: VALUE);
}
extern "C" {
pub fn rb_IMEMO_TYPE_P(imemo: VALUE, imemo_type: imemo_type) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn rb_assert_cme_handle(handle: VALUE);
}
extern "C" {
pub fn rb_yjit_for_each_iseq(callback: rb_iseq_callback, data: *mut ::std::os::raw::c_void);
}
extern "C" {
pub fn rb_yjit_obj_written(
old: VALUE,
young: VALUE,
file: *const ::std::os::raw::c_char,
line: ::std::os::raw::c_int,
);
}
extern "C" {
pub fn rb_yjit_vm_lock_then_barrier(
recursive_lock_level: *mut ::std::os::raw::c_uint,
file: *const ::std::os::raw::c_char,
line: ::std::os::raw::c_int,
);
}
extern "C" {
pub fn rb_yjit_vm_unlock(
recursive_lock_level: *mut ::std::os::raw::c_uint,
file: *const ::std::os::raw::c_char,