Skip to content

Commit

Permalink
fixup whitespace
Browse files Browse the repository at this point in the history
  • Loading branch information
nickrobinson251 committed Oct 24, 2024
1 parent 6af1a2a commit 2077fac
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 4 deletions.
1 change: 1 addition & 0 deletions src/jloptions.c
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,7 @@ static const char opts_hidden[] =
" --output-bc <name> Generate LLVM bitcode (.bc)\n"
" --output-asm <name> Generate an assembly file (.s)\n"
" --output-incremental={yes|no*} Generate an incremental output file (rather than\n"
" complete)\n"
" --trace-compile={stderr|name} Print precompile statements for methods compiled\n"
" during execution or save to stderr or a path. Methods that\n"
" were recompiled are printed in yellow or with a trailing\n"
Expand Down
10 changes: 9 additions & 1 deletion src/julia.h
Original file line number Diff line number Diff line change
Expand Up @@ -194,11 +194,13 @@ JL_EXTENSION typedef struct {
size_t dimsize[]; // length for 1-D, otherwise length is mem->length
} jl_array_t;


typedef struct _jl_datatype_t jl_tupletype_t;
struct _jl_code_instance_t;
typedef struct _jl_method_instance_t jl_method_instance_t;
typedef struct _jl_globalref_t jl_globalref_t;


// TypeMap is an implicitly defined type
// that can consist of any of the following nodes:
// typedef TypeMap Union{TypeMapLevel, TypeMapEntry, Nothing}
Expand Down Expand Up @@ -873,6 +875,7 @@ static inline jl_value_t *jl_to_typeof(uintptr_t t)
}
#endif


// kinds
extern JL_DLLIMPORT jl_datatype_t *jl_typeofbottom_type JL_GLOBALLY_ROOTED;
extern JL_DLLIMPORT jl_datatype_t *jl_datatype_type JL_GLOBALLY_ROOTED;
Expand Down Expand Up @@ -1106,6 +1109,7 @@ extern void JL_GC_POP() JL_NOTSAFEPOINT;
void *__gc_stkf[] = {(void*)JL_GC_ENCODE_PUSH(9), jl_pgcstack, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9}; \
jl_pgcstack = (jl_gcframe_t*)__gc_stkf;


#define JL_GC_PUSHARGS(rts_var,n) \
rts_var = ((jl_value_t**)alloca(((n)+2)*sizeof(jl_value_t*)))+2; \
((void**)rts_var)[-2] = (void*)JL_GC_ENCODE_PUSHARGS(n); \
Expand Down Expand Up @@ -1512,6 +1516,7 @@ static inline int jl_field_isconst(jl_datatype_t *st, int i) JL_NOTSAFEPOINT
return 0;
}


// basic predicates -----------------------------------------------------------
#define jl_is_nothing(v) (((jl_value_t*)(v)) == ((jl_value_t*)jl_nothing))
#define jl_is_tuple(v) (((jl_datatype_t*)jl_typeof(v))->name == jl_tuple_typename)
Expand Down Expand Up @@ -1669,6 +1674,7 @@ STATIC_INLINE int jl_is_addrspace(void *v) JL_NOTSAFEPOINT
return jl_is_addrspace_type(t);
}


STATIC_INLINE int jl_is_opaque_closure_type(void *t) JL_NOTSAFEPOINT
{
return (jl_is_datatype(t) &&
Expand Down Expand Up @@ -2283,7 +2289,7 @@ typedef struct _jl_task_t {
// uint8_t padding1;
// multiqueue priority
uint16_t priority;
// bool indicating whether or not this to measure the wall and cpu time of this task
// flag indicating whether or not this to measure the wall and cpu time of this task
uint8_t is_timing_enabled;
// timestamp this task first entered the run queue (TODO: int32 of ms instead?)
uint64_t first_enqueued_at;
Expand All @@ -2298,6 +2304,7 @@ typedef struct _jl_task_t {
// cached floating point environment
// only updated at task switch
fenv_t fenv;

// id of owning thread - does not need to be defined until the task runs
_Atomic(int16_t) tid;
// threadpool id
Expand Down Expand Up @@ -2417,6 +2424,7 @@ extern void (*real_siglongjmp)(jmp_buf _Buf, int _Value);
#endif
#endif


#ifdef __clang_gcanalyzer__

extern int had_exception;
Expand Down
6 changes: 6 additions & 0 deletions src/julia_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,7 @@ extern JL_DLLEXPORT void jl_typeinf_timing_end(uint64_t start, int is_recompile)
extern JL_DLLEXPORT _Atomic(uint8_t) jl_measure_compile_time_enabled;
extern JL_DLLEXPORT _Atomic(uint64_t) jl_cumulative_compile_time;
extern JL_DLLEXPORT _Atomic(uint64_t) jl_cumulative_recompile_time;

// Global *atomic* integer controlling *process-wide* task timing.
extern JL_DLLEXPORT _Atomic(uint8_t) jl_task_timing_enabled;

Expand All @@ -302,6 +303,7 @@ STATIC_INLINE uint32_t jl_int32hash_fast(uint32_t a)
return a; // identity hashing seems to work well enough here
}


// this is a version of memcpy that preserves atomic memory ordering
// which makes it safe to use for objects that can contain memory references
// without risk of creating pointers out of thin air
Expand Down Expand Up @@ -384,6 +386,7 @@ jl_value_t *jl_gc_big_alloc_noinline(jl_ptls_t ptls, size_t allocsz);
JL_DLLEXPORT int jl_gc_classify_pools(size_t sz, int *osize) JL_NOTSAFEPOINT;
void gc_sweep_sysimg(void);


// pools are 16376 bytes large (GC_POOL_SZ - GC_PAGE_OFFSET)
static const int jl_gc_sizeclasses[] = {
#ifdef _P64
Expand Down Expand Up @@ -839,6 +842,7 @@ JL_DLLEXPORT jl_value_t *jl_matching_methods(jl_tupletype_t *types, jl_value_t *
size_t world, size_t *min_valid, size_t *max_valid, int *ambig);
JL_DLLEXPORT jl_value_t *jl_gf_invoke_lookup_worlds(jl_value_t *types, jl_value_t *mt, size_t world, size_t *min_world, size_t *max_world);


jl_datatype_t *jl_nth_argument_datatype(jl_value_t *argtypes JL_PROPAGATES_ROOT, int n) JL_NOTSAFEPOINT;
JL_DLLEXPORT jl_value_t *jl_argument_datatype(jl_value_t *argt JL_PROPAGATES_ROOT) JL_NOTSAFEPOINT;
JL_DLLEXPORT jl_methtable_t *jl_method_table_for(
Expand Down Expand Up @@ -1476,6 +1480,7 @@ JL_DLLEXPORT jl_value_t *jl_get_cfunction_trampoline(
void *(*init_trampoline)(void *tramp, void **nval),
jl_unionall_t *env, jl_value_t **vals);


// Special filenames used to refer to internal julia libraries
#define JL_EXE_LIBNAME ((const char*)1)
#define JL_LIBJULIA_DL_LIBNAME ((const char*)2)
Expand Down Expand Up @@ -1921,6 +1926,7 @@ JL_DLLIMPORT uint64_t jl_getUnwindInfo(uint64_t dwBase);

#pragma GCC visibility pop


#ifdef USE_DTRACE
// Generated file, needs to be searched in include paths so that the builddir
// retains priority
Expand Down
3 changes: 0 additions & 3 deletions src/task.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
//#endif

// this is needed for !COPY_STACKS to work on linux
#include <stdint.h>
#ifdef _FORTIFY_SOURCE
// disable __longjmp_chk validation so that we can jump between stacks
// (which would normally be invalid to do with setjmp / longjmp)
Expand Down Expand Up @@ -736,7 +735,6 @@ JL_DLLEXPORT void jl_switch(void) JL_NOTSAFEPOINT_LEAVE JL_NOTSAFEPOINT_ENTER
jl_sigint_safepoint(ptls);

JL_PROBE_RT_RUN_TASK(ct);

jl_gc_unsafe_leave(ptls, gc_state);
}

Expand Down Expand Up @@ -1094,7 +1092,6 @@ void jl_rng_split(uint64_t dst[JL_RNG_SIZE], uint64_t src[JL_RNG_SIZE]) JL_NOTSA
}
}


JL_DLLEXPORT jl_task_t *jl_new_task(jl_function_t *start, jl_value_t *completion_future, size_t ssize)
{
jl_task_t *ct = jl_current_task;
Expand Down

0 comments on commit 2077fac

Please sign in to comment.