summaryrefslogtreecommitdiff
path: root/yjit/bindgen
diff options
context:
space:
mode:
-rw-r--r--yjit/bindgen/Cargo.lock8
-rw-r--r--yjit/bindgen/Cargo.toml2
-rw-r--r--yjit/bindgen/src/main.rs36
3 files changed, 15 insertions, 31 deletions
@@ -62,9 +62,9 @@ dependencies = [
[[package]]
name = "bindgen"
-version = "0.71.1"
source = "registry+https://.com/rust-lang/crates.io-index"
-checksum = "5f58bf3d7db68cfbac37cfc485a8d711e87e064c3d0fe0435b92f7a407f9d6b3"
dependencies = [
"bitflags",
"cexpr",
@@ -277,9 +277,9 @@ checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c"
[[package]]
name = "rustc-hash"
-version = "2.1.1"
source = "registry+https://.com/rust-lang/crates.io-index"
-checksum = "357703d41365b4b27c590e3ed91eabb1b663f07c4c084095e60cbed4362dff0d"
[[package]]
name = "shlex"
@@ -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.71.1"
env_logger = "0.11.5"
@@ -8,7 +8,6 @@ use std::env;
use std::path::PathBuf;
const SRC_ROOT_ENV: &str = "YJIT_SRC_ROOT_PATH";
-const JIT_NAME: &str = "BINDGEN_JIT_NAME";
fn main() {
// Path to repo is a required input for supporting running `configure`
@@ -22,9 +21,6 @@ fn main() {
);
let src_root = PathBuf::from(src_root);
- let jit_name = env::var(JIT_NAME).expect(JIT_NAME);
- let c_file = format!("{}.c", jit_name);
-
assert!(
src_root.is_dir(),
"{} must be set to a path to a directory",
@@ -50,7 +46,7 @@ fn main() {
.header("vm_callinfo.h")
// Our C file for glue code
- .header(src_root.join(c_file).to_str().unwrap())
// Don't want to copy over C comment
.generate_comments(false)
@@ -93,12 +89,6 @@ fn main() {
// This function prints info about a value and is useful for debugging
.allowlist_function("rb_obj_info_dump")
- // For testing
- .allowlist_function("ruby_init")
- .allowlist_function("ruby_init_stack")
- .allowlist_function("rb_funcallv")
- .allowlist_function("rb_protect")
-
// For crashing
.allowlist_function("rb_bug")
@@ -116,7 +106,6 @@ fn main() {
// From ruby/internal/intern/object.h
.allowlist_function("rb_obj_is_kind_of")
.allowlist_function("rb_obj_frozen_p")
- .allowlist_function("rb_class_inherited_p")
// From ruby/internal/encoding/encoding.h
.allowlist_type("ruby_encoding_consts")
@@ -157,7 +146,6 @@ fn main() {
// From include/ruby/internal/intern/class.h
.allowlist_function("rb_class_attached_object")
.allowlist_function("rb_singleton_class")
- .allowlist_function("rb_define_class")
// From include/ruby/internal/core/rclass.h
.allowlist_function("rb_class_get_superclass")
@@ -171,7 +159,6 @@ fn main() {
// VALUE variables for Ruby class objects
// From include/ruby/internal/globals.h
.allowlist_var("rb_cBasicObject")
- .allowlist_var("rb_cObject")
.allowlist_var("rb_cModule")
.allowlist_var("rb_cNilClass")
.allowlist_var("rb_cTrueClass")
@@ -186,7 +173,6 @@ fn main() {
.allowlist_var("rb_cArray")
.allowlist_var("rb_cHash")
.allowlist_var("rb_cClass")
- .allowlist_var("rb_cISeq")
// From include/ruby/internal/fl_type.h
.allowlist_type("ruby_fl_type")
@@ -321,17 +307,16 @@ fn main() {
// From yjit.c
.allowlist_function("rb_object_shape_count")
- .allowlist_function("rb_iseq_(get|set)_zjit_payload")
.allowlist_function("rb_iseq_pc_at_idx")
.allowlist_function("rb_iseq_opcode_at_pc")
- .allowlist_function("rb_(yjit|zjit)_reserve_addr_space")
- .allowlist_function("rb_(yjit|zjit)_mark_writable")
- .allowlist_function("rb_(yjit|zjit)_mark_executable")
- .allowlist_function("rb_(yjit|zjit)_mark_unused")
- .allowlist_function("rb_(yjit|zjit)_get_page_size")
- .allowlist_function("rb_(yjit|zjit)_iseq_builtin_attrs")
- .allowlist_function("rb_(yjit|zjit)_iseq_inspect")
- .allowlist_function("rb_yjit_vm_insns_count")
.allowlist_function("rb_yjit_builtin_function")
.allowlist_function("rb_set_cfp_(pc|sp)")
.allowlist_function("rb_yjit_multi_ractor_p")
@@ -359,7 +344,6 @@ fn main() {
.allowlist_function("rb_yjit_invokeblock_sp_pops")
.allowlist_function("rb_yjit_set_exception_return")
.allowlist_function("rb_yjit_str_concat_codepoint")
- .allowlist_function("rb_zjit_print_exception")
.allowlist_type("robject_offsets")
.allowlist_type("rstring_offsets")
@@ -504,7 +488,7 @@ fn main() {
.expect("Unable to generate bindings");
let mut out_path: PathBuf = src_root;
- out_path.push(jit_name);
out_path.push("src");
out_path.push("cruby_bindings.inc.rs");