Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
Keno committed May 3, 2024
1 parent f712512 commit 0b70d26
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/jltypes.c
Original file line number Diff line number Diff line change
Expand Up @@ -3163,7 +3163,7 @@ void jl_init_types(void) JL_GC_DISABLED
jl_code_info_type =
jl_new_datatype(jl_symbol("CodeInfo"), core,
jl_any_type, jl_emptysvec,
jl_perm_symsvec(19,
jl_perm_symsvec(21,
"code",
"debuginfo",
"ssavaluetypes",
Expand All @@ -3176,14 +3176,16 @@ void jl_init_types(void) JL_GC_DISABLED
"edges",
"min_world",
"max_world",
"nargs",
"propagate_inbounds",
"has_fcall",
"nospecializeinfer",
"isva",
"inlining",
"constprop",
"purity",
"inlining_cost"),
jl_svec(19,
jl_svec(21,
jl_array_any_type,
jl_debuginfo_type,
jl_any_type,
Expand All @@ -3196,6 +3198,8 @@ void jl_init_types(void) JL_GC_DISABLED
jl_any_type,
jl_ulong_type,
jl_ulong_type,
jl_ulong_type,
jl_bool_type,
jl_bool_type,
jl_bool_type,
jl_bool_type,
Expand All @@ -3204,7 +3208,7 @@ void jl_init_types(void) JL_GC_DISABLED
jl_uint16_type,
jl_uint16_type),
jl_emptysvec,
0, 1, 19);
0, 1, 21);

jl_method_type =
jl_new_datatype(jl_symbol("Method"), core,
Expand Down
2 changes: 2 additions & 0 deletions src/julia.h
Original file line number Diff line number Diff line change
Expand Up @@ -320,11 +320,13 @@ typedef struct _jl_code_info_t {
jl_value_t *edges; // forward edges to method instances that must be invalidated (for copying to debuginfo)
size_t min_world;
size_t max_world;
size_t nargs;

// various boolean properties:
uint8_t propagate_inbounds;
uint8_t has_fcall;
uint8_t nospecializeinfer;
uint8_t isva;
// uint8 settings
uint8_t inlining; // 0 = default; 1 = @inline; 2 = @noinline
uint8_t constprop; // 0 = use heuristic; 1 = aggressive; 2 = none
Expand Down
2 changes: 2 additions & 0 deletions src/method.c
Original file line number Diff line number Diff line change
Expand Up @@ -643,6 +643,8 @@ JL_DLLEXPORT jl_code_info_t *jl_new_code_info_uninit(void)
src->constprop = 0;
src->inlining = 0;
src->purity.bits = 0;
src->nargs = 0;
src->isva = 0;
src->inlining_cost = UINT16_MAX;
return src;
}
Expand Down

0 comments on commit 0b70d26

Please sign in to comment.