Skip to content

Commit f9ddf54

Browse files
authored
Merge branch 'master' into decrease_max_methods_setting_for_various_interface_functions
2 parents 9a5ca89 + cbea8cf commit f9ddf54

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+1500
-1119
lines changed

AGENTS.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,11 @@ If you made changes to the runtime (any files in `src/`), you will need to rebui
2727
julia. Run `make -j` to rebuild julia. This process may take up to 10 minutes
2828
depending on your changes.
2929

30-
After `make` run these static analysis checks:
31-
- `make -C src clang-sa-<filename>` (replace `<filename>` with the basename of the file you modified)
32-
- `make -C src clang-sagc-<filename>` which may require adding JL_GC_PUSH arguments, or JL_GC_PROMISE_ROOTED statements., or require fixing locks. Remember arguments are assumed rooted, so check the callers to make sure that is handled. If the value is being temporarily moved around in a struct or arraylist, `JL_GC_PROMISE_ROOTED(struct->field)` may be needed as a statement (it return void) immediately after reloading the struct before any use of struct. Put the promise as early in the code as is legal.
33-
- `make -C src clang-tidy-<filename>`
30+
After making changes, run static analysis checks:
31+
- First run `make -C src install-analysis-deps` to initialize dependencies (only needed once the first time).
32+
- Run `make -C src analyze-<filename> --output-sync -j8` (replace `<filename>` with the basename of any C or C++ file you modified, excluding headers).
33+
- Tests can also be rerun individually with `clang-sa-<filename>`, `clang-sagc-<filename>` or `clang-tidy-<filename>`.
34+
- If `clang-sagc-<filename>` fails, it may require adding `JL_GC_PUSH` statements, or `JL_GC_PROMISE_ROOTED` statements., or require fixing locks. Remember arguments are assumed rooted, so check the callers to make sure that is handled. If the value is being temporarily moved around in a struct or arraylist, `JL_GC_PROMISE_ROOTED(struct->field)` may be needed as a statement (it return void) immediately after reloading the struct before any use of struct. Put that promise as early in the code as is legal, near the definition not the use.
3435

3536
## Using Revise
3637

Compiler/src/Compiler.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ using Base: @_foldable_meta, @_gc_preserve_begin, @_gc_preserve_end, @nospeciali
5353
_array_for, _bits_findnext, _methods_by_ftype, _uniontypes, all, allocatedinline, any,
5454
argument_datatype, binding_kind, cconvert, copy_exprargs, datatype_arrayelem,
5555
datatype_fieldcount, datatype_fieldtypes, datatype_layoutsize, datatype_nfields,
56-
datatype_pointerfree, decode_effects_override, diff_names, fieldindex,
56+
datatype_pointerfree, decode_effects_override, diff_names, fieldindex, visit,
5757
generating_output, get_nospecializeinfer_sig, get_world_counter, has_free_typevars,
5858
hasgenerator, hasintersect, indexed_iterate, isType, is_file_tracked, is_function_def,
5959
is_meta_expr, is_meta_expr_head, is_nospecialized, is_nospecializeinfer, is_defined_const_binding,
@@ -187,6 +187,7 @@ include("typeinfer.jl")
187187
include("optimize.jl")
188188

189189
include("bootstrap.jl")
190+
include("precompile.jl")
190191
include("reflection_interface.jl")
191192
include("opaque_closure.jl")
192193

Compiler/src/bootstrap.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77

88
function activate_codegen!()
99
ccall(:jl_set_typeinf_func, Cvoid, (Any,), typeinf_ext_toplevel)
10+
# Register the new unified compile and emit function
11+
ccall(:jl_set_compile_and_emit_func, Cvoid, (Any,), compile_and_emit_native)
1012
Core.eval(Compiler, quote
1113
let typeinf_world_age = Base.tls_world_age()
1214
@eval Core.OptimizedGenerics.CompilerPlugins.typeinf(::Nothing, mi::MethodInstance, source_mode::UInt8) =

0 commit comments

Comments
 (0)