Skip to content

Commit b8a0c17

Browse files
committed
yjit-bindgen revert, workspace exclude
1 parent a8f7be7 commit b8a0c17

3 files changed

Lines changed: 9 additions & 22 deletions

File tree

yjit/bindgen/Cargo.lock

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

yjit/bindgen/Cargo.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,7 @@ edition = "2021"
66
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
77

88
[dependencies]
9-
bindgen = "0.71.1"
9+
bindgen = "0.70.1"
1010
env_logger = "0.11.5"
11+
12+
[workspace]

yjit/bindgen/src/main.rs

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ use std::env;
88
use std::path::PathBuf;
99

1010
const SRC_ROOT_ENV: &str = "YJIT_SRC_ROOT_PATH";
11-
const JIT_NAME: &str = "BINDGEN_JIT_NAME";
1211

1312
fn main() {
1413
// Path to repo is a required input for supporting running `configure`
@@ -22,9 +21,6 @@ fn main() {
2221
);
2322
let src_root = PathBuf::from(src_root);
2423

25-
let jit_name = env::var(JIT_NAME).expect(JIT_NAME);
26-
let c_file = format!("{}.c", jit_name);
27-
2824
assert!(
2925
src_root.is_dir(),
3026
"{} must be set to a path to a directory",
@@ -94,12 +90,6 @@ fn main() {
9490
// This function prints info about a value and is useful for debugging
9591
.allowlist_function("rb_obj_info_dump")
9692

97-
// For testing
98-
.allowlist_function("ruby_init")
99-
.allowlist_function("ruby_init_stack")
100-
.allowlist_function("rb_funcallv")
101-
.allowlist_function("rb_protect")
102-
10393
// For crashing
10494
.allowlist_function("rb_bug")
10595

@@ -117,7 +107,6 @@ fn main() {
117107
// From ruby/internal/intern/object.h
118108
.allowlist_function("rb_obj_is_kind_of")
119109
.allowlist_function("rb_obj_frozen_p")
120-
.allowlist_function("rb_class_inherited_p")
121110

122111
// From ruby/internal/encoding/encoding.h
123112
.allowlist_type("ruby_encoding_consts")
@@ -158,7 +147,6 @@ fn main() {
158147
// From include/ruby/internal/intern/class.h
159148
.allowlist_function("rb_class_attached_object")
160149
.allowlist_function("rb_singleton_class")
161-
.allowlist_function("rb_define_class")
162150

163151
// From include/ruby/internal/core/rclass.h
164152
.allowlist_function("rb_class_get_superclass")
@@ -172,7 +160,6 @@ fn main() {
172160
// VALUE variables for Ruby class objects
173161
// From include/ruby/internal/globals.h
174162
.allowlist_var("rb_cBasicObject")
175-
.allowlist_var("rb_cObject")
176163
.allowlist_var("rb_cModule")
177164
.allowlist_var("rb_cNilClass")
178165
.allowlist_var("rb_cTrueClass")
@@ -187,7 +174,6 @@ fn main() {
187174
.allowlist_var("rb_cArray")
188175
.allowlist_var("rb_cHash")
189176
.allowlist_var("rb_cClass")
190-
.allowlist_var("rb_cISeq")
191177

192178
// From include/ruby/internal/fl_type.h
193179
.allowlist_type("ruby_fl_type")
@@ -322,7 +308,7 @@ fn main() {
322308

323309
// From yjit.c
324310
.allowlist_function("rb_object_shape_count")
325-
.allowlist_function("rb_iseq_(get|set)_zjit_payload")
311+
.allowlist_function("rb_iseq_(get|set)_yjit_payload")
326312
.allowlist_function("rb_iseq_pc_at_idx")
327313
.allowlist_function("rb_iseq_opcode_at_pc")
328314
.allowlist_function("rb_yjit_reserve_addr_space")
@@ -359,7 +345,6 @@ fn main() {
359345
.allowlist_function("rb_yjit_invokeblock_sp_pops")
360346
.allowlist_function("rb_yjit_set_exception_return")
361347
.allowlist_function("rb_yjit_str_concat_codepoint")
362-
.allowlist_function("rb_zjit_print_exception")
363348
.allowlist_type("robject_offsets")
364349
.allowlist_type("rstring_offsets")
365350

@@ -506,7 +491,7 @@ fn main() {
506491
.expect("Unable to generate bindings");
507492

508493
let mut out_path: PathBuf = src_root;
509-
out_path.push(jit_name);
494+
out_path.push("yjit");
510495
out_path.push("src");
511496
out_path.push("cruby_bindings.inc.rs");
512497

0 commit comments

Comments
 (0)