diff --git a/compile.c b/compile.c index 5293b32695..303054e6de 100644 --- a/compile.c +++ b/compile.c @@ -8140,6 +8140,13 @@ rb_method_for_self_aset(VALUE name, VALUE arg, rb_insn_func_t func) /* ISeq binary format */ +#ifdef __sparc +#define IBF_ISEQ_DEBUG 1 +#endif +#ifndef IBF_ISEQ_DEBUG +#define IBF_ISEQ_DEBUG 0 +#endif + typedef unsigned int ibf_offset_t; #define IBF_OFFSET(ptr) ((ibf_offset_t)(VALUE)(ptr)) @@ -9537,6 +9544,17 @@ ibf_load_iseq_complete(rb_iseq_t *iseq) struct ibf_load *load = RTYPEDDATA_DATA(iseq->aux.loader.obj); rb_iseq_t *prev_src_iseq = load->iseq; load->iseq = iseq; +#if IBF_ISEQ_DEBUG + fprintf(stderr, "ibf_load_iseq_complete: load=%p iseq=%p prev=%p\n", + load, iseq, prev_src_iseq); + fprintf(stderr, "ibf_load_iseq_complete: list=%p(%p+%x) index=%i/%u\n", + ibf_iseq_list(load), + load->buff, load->header->iseq_list_offset, + iseq->aux.loader.index, load->header->iseq_list_size); + fprintf(stderr, "ibf_load_iseq_complete: offset=%u size=%u\n", + ibf_iseq_list(load)[iseq->aux.loader.index], + load->header->size); +#endif ibf_load_iseq_each(load, iseq, ibf_iseq_list(load)[iseq->aux.loader.index]); ISEQ_COMPILE_DATA_CLEAR(iseq); FL_UNSET(iseq, ISEQ_NOT_LOADED_YET); @@ -9552,13 +9570,6 @@ rb_iseq_complete(const rb_iseq_t *iseq) } #endif -#ifdef __sparc -#define IBF_ISEQ_DEBUG 1 -#endif -#ifndef IBF_ISEQ_DEBUG -#define IBF_ISEQ_DEBUG 0 -#endif - static rb_iseq_t * ibf_load_iseq(const struct ibf_load *load, const rb_iseq_t *index_iseq) {