@@ -8,7 +8,6 @@ use std::env;
88use std:: path:: PathBuf ;
99
1010const SRC_ROOT_ENV : & str = "YJIT_SRC_ROOT_PATH" ;
11- const JIT_NAME : & str = "BINDGEN_JIT_NAME" ;
1211
1312fn 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" ,
@@ -50,7 +46,7 @@ fn main() {
5046 . header ( "vm_callinfo.h" )
5147
5248 // Our C file for glue code
53- . header ( src_root. join ( c_file ) . to_str ( ) . unwrap ( ) )
49+ . header ( src_root. join ( "yjit.c" ) . to_str ( ) . unwrap ( ) )
5450
5551 // Don't want to copy over C comment
5652 . generate_comments ( false )
@@ -93,12 +89,6 @@ fn main() {
9389 // This function prints info about a value and is useful for debugging
9490 . allowlist_function ( "rb_obj_info_dump" )
9591
96- // For testing
97- . allowlist_function ( "ruby_init" )
98- . allowlist_function ( "ruby_init_stack" )
99- . allowlist_function ( "rb_funcallv" )
100- . allowlist_function ( "rb_protect" )
101-
10292 // For crashing
10393 . allowlist_function ( "rb_bug" )
10494
@@ -116,7 +106,6 @@ fn main() {
116106 // From ruby/internal/intern/object.h
117107 . allowlist_function ( "rb_obj_is_kind_of" )
118108 . allowlist_function ( "rb_obj_frozen_p" )
119- . allowlist_function ( "rb_class_inherited_p" )
120109
121110 // From ruby/internal/encoding/encoding.h
122111 . allowlist_type ( "ruby_encoding_consts" )
@@ -157,7 +146,6 @@ fn main() {
157146 // From include/ruby/internal/intern/class.h
158147 . allowlist_function ( "rb_class_attached_object" )
159148 . allowlist_function ( "rb_singleton_class" )
160- . allowlist_function ( "rb_define_class" )
161149
162150 // From include/ruby/internal/core/rclass.h
163151 . allowlist_function ( "rb_class_get_superclass" )
@@ -171,7 +159,6 @@ fn main() {
171159 // VALUE variables for Ruby class objects
172160 // From include/ruby/internal/globals.h
173161 . allowlist_var ( "rb_cBasicObject" )
174- . allowlist_var ( "rb_cObject" )
175162 . allowlist_var ( "rb_cModule" )
176163 . allowlist_var ( "rb_cNilClass" )
177164 . allowlist_var ( "rb_cTrueClass" )
@@ -186,7 +173,6 @@ fn main() {
186173 . allowlist_var ( "rb_cArray" )
187174 . allowlist_var ( "rb_cHash" )
188175 . allowlist_var ( "rb_cClass" )
189- . allowlist_var ( "rb_cISeq" )
190176
191177 // From include/ruby/internal/fl_type.h
192178 . allowlist_type ( "ruby_fl_type" )
@@ -321,17 +307,16 @@ fn main() {
321307
322308 // From yjit.c
323309 . allowlist_function ( "rb_object_shape_count" )
324- . allowlist_function ( "rb_iseq_(get|set)_zjit_payload " )
310+ . allowlist_function ( "rb_iseq_(get|set)_yjit_payload " )
325311 . allowlist_function ( "rb_iseq_pc_at_idx" )
326312 . allowlist_function ( "rb_iseq_opcode_at_pc" )
327- . allowlist_function ( "rb_(yjit|zjit)_reserve_addr_space" )
328- . allowlist_function ( "rb_(yjit|zjit)_mark_writable" )
329- . allowlist_function ( "rb_(yjit|zjit)_mark_executable" )
330- . allowlist_function ( "rb_(yjit|zjit)_mark_unused" )
331- . allowlist_function ( "rb_(yjit|zjit)_get_page_size" )
332- . allowlist_function ( "rb_(yjit|zjit)_iseq_builtin_attrs" )
333- . allowlist_function ( "rb_(yjit|zjit)_iseq_inspect" )
334- . allowlist_function ( "rb_yjit_vm_insns_count" )
313+ . allowlist_function ( "rb_yjit_reserve_addr_space" )
314+ . allowlist_function ( "rb_yjit_mark_writable" )
315+ . allowlist_function ( "rb_yjit_mark_executable" )
316+ . allowlist_function ( "rb_yjit_mark_unused" )
317+ . allowlist_function ( "rb_yjit_get_page_size" )
318+ . allowlist_function ( "rb_yjit_iseq_builtin_attrs" )
319+ . allowlist_function ( "rb_yjit_iseq_inspect" )
335320 . allowlist_function ( "rb_yjit_builtin_function" )
336321 . allowlist_function ( "rb_set_cfp_(pc|sp)" )
337322 . allowlist_function ( "rb_yjit_multi_ractor_p" )
@@ -359,7 +344,6 @@ fn main() {
359344 . allowlist_function ( "rb_yjit_invokeblock_sp_pops" )
360345 . allowlist_function ( "rb_yjit_set_exception_return" )
361346 . allowlist_function ( "rb_yjit_str_concat_codepoint" )
362- . allowlist_function ( "rb_zjit_print_exception" )
363347 . allowlist_type ( "robject_offsets" )
364348 . allowlist_type ( "rstring_offsets" )
365349
@@ -504,7 +488,7 @@ fn main() {
504488 . expect ( "Unable to generate bindings" ) ;
505489
506490 let mut out_path: PathBuf = src_root;
507- out_path. push ( jit_name ) ;
491+ out_path. push ( "yjit" ) ;
508492 out_path. push ( "src" ) ;
509493 out_path. push ( "cruby_bindings.inc.rs" ) ;
510494
0 commit comments