Skip to content

Commit fdfa6ae

Browse files
committed
fix format issues
1 parent 3c31a06 commit fdfa6ae

File tree

6 files changed

+115
-185
lines changed

6 files changed

+115
-185
lines changed

src/codegen.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4251,7 +4251,7 @@ static jl_cgval_t emit_invoke(jl_codectx_t &ctx, const jl_cgval_t &lival, const
42514251
bool cache_valid = ctx.use_cache;
42524252
bool external = false;
42534253
if (ctx.external_linkage) {
4254-
if (jl_object_in_image((jl_value_t*)codeinst)) {
4254+
if (0 && jl_object_in_image((jl_value_t*)codeinst)) {
42554255
// Target is present in another pkgimage
42564256
cache_valid = true;
42574257
external = true;
@@ -5624,7 +5624,7 @@ static Function *emit_tojlinvoke(jl_code_instance_t *codeinst, Module *M, jl_cod
56245624

56255625
bool cache_valid = params.cache;
56265626
if (params.external_linkage) {
5627-
if (jl_object_in_image((jl_value_t*)codeinst)) {
5627+
if (0 && jl_object_in_image((jl_value_t*)codeinst)) {
56285628
// Target is present in another pkgimage
56295629
cache_valid = true;
56305630
}
@@ -8536,7 +8536,7 @@ void jl_compile_workqueue(
85368536
auto invoke = jl_atomic_load_relaxed(&codeinst->invoke);
85378537
bool cache_valid = params.cache;
85388538
if (params.external_linkage) {
8539-
cache_valid = jl_object_in_image((jl_value_t*)codeinst);
8539+
cache_valid = 0 && jl_object_in_image((jl_value_t*)codeinst);
85408540
}
85418541
// WARNING: isspecsig is protected by the codegen-lock. If that lock is removed, then the isspecsig load needs to be properly atomically sequenced with this.
85428542
if (cache_valid && invoke != NULL) {

src/gc.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1985,6 +1985,7 @@ STATIC_INLINE void gc_mark_array8(jl_ptls_t ptls, jl_value_t *ary8_parent, jl_va
19851985
jl_gc_markqueue_t *mq = &ptls->mark_queue;
19861986
jl_value_t *new_obj;
19871987
size_t elsize = ((jl_array_t *)ary8_parent)->elsize / sizeof(jl_value_t *);
1988+
assert(elsize > 0);
19881989
// Decide whether need to chunk ary8
19891990
size_t nrefs = (ary8_end - ary8_begin) / elsize;
19901991
if (nrefs > MAX_REFS_AT_ONCE) {
@@ -2016,6 +2017,7 @@ STATIC_INLINE void gc_mark_array16(jl_ptls_t ptls, jl_value_t *ary16_parent, jl_
20162017
jl_gc_markqueue_t *mq = &ptls->mark_queue;
20172018
jl_value_t *new_obj;
20182019
size_t elsize = ((jl_array_t *)ary16_parent)->elsize / sizeof(jl_value_t *);
2020+
assert(elsize > 0);
20192021
// Decide whether need to chunk ary16
20202022
size_t nrefs = (ary16_end - ary16_begin) / elsize;
20212023
if (nrefs > MAX_REFS_AT_ONCE) {
@@ -2668,7 +2670,6 @@ static void gc_mark_roots(jl_gc_markqueue_t *mq)
26682670
}
26692671
gc_try_claim_and_push(mq, jl_all_methods, NULL);
26702672
gc_try_claim_and_push(mq, _jl_debug_method_invalidation, NULL);
2671-
gc_try_claim_and_push(mq, jl_build_ids, NULL);
26722673
// constants
26732674
gc_try_claim_and_push(mq, jl_emptytuple_type, NULL);
26742675
gc_try_claim_and_push(mq, cmpswap_names, NULL);

src/jl_exported_data.inc

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,6 @@
128128
XX(jl_voidpointer_type) \
129129
XX(jl_void_type) \
130130
XX(jl_weakref_type) \
131-
XX(jl_build_ids) \
132-
XX(jl_linkage_blobs) \
133131

134132
// Data symbols that are defined inside the public libjulia
135133
#define JL_EXPORTED_DATA_SYMBOLS(XX) \

src/julia_internal.h

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -313,9 +313,8 @@ extern tracer_cb jl_newmeth_tracer;
313313
void jl_call_tracer(tracer_cb callback, jl_value_t *tracee);
314314
void print_func_loc(JL_STREAM *s, jl_method_t *m);
315315
extern jl_array_t *_jl_debug_method_invalidation JL_GLOBALLY_ROOTED;
316-
extern arraylist_t jl_linkage_blobs; // external linkage: sysimg/pkgimages
317-
extern jl_array_t *jl_build_ids JL_GLOBALLY_ROOTED; // external linkage: corresponding build_ids
318-
extern arraylist_t jl_image_relocs; // external linkage: sysimg/pkgimages
316+
JL_DLLEXPORT extern arraylist_t jl_linkage_blobs; // external linkage: sysimg/pkgimages
317+
JL_DLLEXPORT extern arraylist_t jl_image_relocs; // external linkage: sysimg/pkgimages
319318

320319
extern JL_DLLEXPORT size_t jl_page_size;
321320
extern jl_function_t *jl_typeinf_func JL_GLOBALLY_ROOTED;
@@ -951,10 +950,7 @@ static inline void jl_set_gc_and_wait(void)
951950
// Query if a Julia object is if a permalloc region (due to part of a sys- pkg-image)
952951
STATIC_INLINE size_t n_linkage_blobs(void) JL_NOTSAFEPOINT
953952
{
954-
if (!jl_build_ids)
955-
return 0;
956-
assert(jl_is_array(jl_build_ids));
957-
return jl_array_len(jl_build_ids);
953+
return jl_image_relocs.len;
958954
}
959955

960956
// TODO: Makes this a binary search

0 commit comments

Comments
 (0)