Skip to content

Commit

Permalink
Merge branch 'dev' into gc-preserve-hook
Browse files Browse the repository at this point in the history
  • Loading branch information
qinsoon committed Nov 7, 2024
2 parents f8388ba + 7a953be commit b39b690
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/julia.h
Original file line number Diff line number Diff line change
Expand Up @@ -1054,13 +1054,12 @@ struct _jl_gcframe_t {
#define jl_pgcstack (jl_current_task->gcstack)

#ifndef MMTK_GC

#define JL_GC_ENCODE_PUSHARGS(n) (((size_t)(n))<<2)
#define JL_GC_ENCODE_PUSH(n) ((((size_t)(n))<<2)|1)
#define JL_GC_DECODE_NROOTS(n) (n >> 2)

#define JL_GC_ENCODE_PUSHARGS_NO_TPIN(n) JL_GC_ENCODE_PUSHARGS(n)
#define JL_GC_ENCODE_PUSH_NO_TPIN(n) JL_GC_ENCODE_PUSH(n)

#else

// We use an extra bit (100) in the nroots value from the frame to indicate that the roots
Expand All @@ -1084,10 +1083,10 @@ struct _jl_gcframe_t {
#define JL_GC_ENCODE_PUSHARGS(n) (((size_t)(n))<<3)
#define JL_GC_ENCODE_PUSH(n) ((((size_t)(n))<<3)|1)
#define JL_GC_DECODE_NROOTS(n) (n >> 3)

// these only pin the root object itself
#define JL_GC_ENCODE_PUSHARGS_NO_TPIN(n) (((size_t)(n))<<3|4)
#define JL_GC_ENCODE_PUSH_NO_TPIN(n) ((((size_t)(n))<<3)|5)

#endif

#ifdef __clang_gcanalyzer__
Expand Down

0 comments on commit b39b690

Please sign in to comment.