Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions base/Base.jl
Original file line number Diff line number Diff line change
Expand Up @@ -512,6 +512,11 @@ function __init__()
if haskey(ENV, "JULIA_MAX_NUM_PRECOMPILE_FILES")
MAX_NUM_PRECOMPILE_FILES[] = parse(Int, ENV["JULIA_MAX_NUM_PRECOMPILE_FILES"])
end
if get(ENV, "JULIA_USE_NEW_PARSER", "true") == "true"
JuliaSyntax = require(PkgId(
UUID((0x70703baa_626e_46a2, 0xa12c_08ffd08c73b4)), "JuliaSyntax"))
JuliaSyntax.enable_in_core!()
end
nothing
end

Expand Down
4 changes: 3 additions & 1 deletion base/boot.jl
Original file line number Diff line number Diff line change
Expand Up @@ -826,9 +826,11 @@ GlobalRef(m::Module, s::Symbol) = GlobalRef(m, s, bitcast(Ptr{Nothing}, 0))
# `_parse` must return an `svec` containing an `Expr` and the new offset as an
# `Int`.
#
# The internal jl_parse which will call into Core._parse if not `nothing`.
# The internal jl_parse will call into Core._parse if not `nothing`.
_parse = nothing

_setparser!(parser) = setglobal!(Core, :_parse, parser)

# support for deprecated uses of internal _apply function
_apply(x...) = Core._apply_iterate(Main.Base.iterate, x...)

Expand Down
2 changes: 1 addition & 1 deletion base/compiler/compiler.jl
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ include("compiler/bootstrap.jl")
ccall(:jl_set_typeinf_func, Cvoid, (Any,), typeinf_ext_toplevel)

include("compiler/parsing.jl")
Core.eval(Core, :(_parse = Compiler.fl_parse))
Core._setparser!(fl_parse)

end # baremodule Compiler
))
1 change: 1 addition & 0 deletions base/sysimg.jl
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ let
:Unicode,

# 1-depth packages
:JuliaSyntax,
:LinearAlgebra,
:Markdown,
:Printf,
Expand Down
7 changes: 7 additions & 0 deletions contrib/generate_precompile.jl
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,13 @@ if Artifacts !== nothing
"""
end

JuliaSyntax = get(Base.loaded_modules,
Base.PkgId(Base.UUID("70703baa-626e-46a2-a12c-08ffd08c73b4"), "JuliaSyntax"),
nothing)
if JuliaSyntax !== nothing
precompile_script *= read(joinpath(pkgdir(JuliaSyntax),
"sysimage", "precompile_exec.jl"), String) * "\n"
end

Pkg = get(Base.loaded_modules,
Base.PkgId(Base.UUID("44cfe95a-1eb2-52ea-b672-e2afdf69b78f"), "Pkg"),
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
29ccd296e538403829ffd90b3cce67d8
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
b3c26d6f7880f069b1f6f21ee3978cd3e797acd9ca6fb1e7ece28cf4dea576872bed3e8c3121d1d6cfe559518a17004595139f9978fd2591669cbe8128f7c1ac
2 changes: 2 additions & 0 deletions stdlib/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,7 @@
/SparseArrays
/SHA-*
/SHA
/JuliaSyntax-*
/JuliaSyntax
/*_jll/StdlibArtifacts.toml
/*/Manifest.toml
4 changes: 4 additions & 0 deletions stdlib/JuliaSyntax.version
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
JULIASYNTAX_BRANCH = main
JULIASYNTAX_SHA1 = 6465cceaf4b3766e66e4338c15a38e6c7281b1e3
JULIASYNTAX_GIT_URL := https://github.com/JuliaLang/JuliaSyntax.jl.git
JULIASYNTAX_TAR_URL = https://github.com/api/repos/JuliaLang/JuliaSyntax.jl/tarball/$1
2 changes: 1 addition & 1 deletion stdlib/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ STDLIBS = Artifacts Base64 CRC32c Dates Distributed FileWatching \
SharedArrays Sockets SparseArrays SuiteSparse Test TOML Unicode UUIDs \
$(JLL_NAMES)

STDLIBS_EXT = Pkg Statistics LibCURL Downloads ArgTools Tar NetworkOptions SuiteSparse SparseArrays SHA
STDLIBS_EXT = Pkg Statistics LibCURL Downloads ArgTools Tar NetworkOptions SuiteSparse SparseArrays SHA JuliaSyntax

$(foreach module, $(STDLIBS_EXT), $(eval $(call stdlib-external,$(module),$(shell echo $(module) | tr a-z A-Z))))

Expand Down