You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Unify flisp parsing to always parse from string rather than file.
* Put all code-loading functions together into toplevel.c
* Remove flisp code from jl_parse_eval_all. This makes the top level
parse-lower-eval loop independent of flisp internals.
* Keep jl_load and jl_load_file_string from julia.h unchanged for
compatibility with the existing C API. (No julia code `ccall`s
these anymore)
* Replaceable jl_parse as single parser entry point. `jl_parse` calls a
C function pointer which can be replaced with jl_set_parser(). This
makes it possible to replace all use of the flisp parser with julia
code at runtime. Create frontend.c to contain the shim code for this
and as a place to move non-flisp related frontend code in the
future.
....
Move include() implementation to Julia; add Meta.parseall()
Move the implementation include into Julia, essentially replacing
jl_parse_eval_all (except for within bootstrap).
This also reunifies the versions of include() in MainInclude and Base
which have started diverging after being duplicated for improved stack
traces.
As part of this, add `Meta.parseall()` for top-level parsing. For now as
an internal function, but this will likely be made public shortly.
....
Remove include mapexpr handling from C code
mapexpr is now handled in Julia code so we can use a simplified version
of include during bootstrap.
....
General parser options for improved flexibility
This change allows general options to be passed through to the parser.
....
Apply suggestions from code review
Co-Authored-By: Jameson Nash <[email protected]>
....
Move code back into ast.c from frontend.c.
....
Julia ABI and implementation for swappable parser
This moves the parser-swapping implementation almost entirely into
Julia, leaving only a few generic pieces in C and some code which is
required to call into the Julia parser.
* Add Core.Compiler.parse as the internal entry point for parsing, and
move parser-swapping machinery there.
* New builtin Core._apply_in_world to allow frozen-world APIs to be
implemented in pure Julia code.
* Make filename a String for convenience (no big deal if it needs to be
copied, compared to copying the source text itself).
* Rename some variables in parser APIs (particularly pos vs offset) for
consistency.
....
Use latest world for calling Core.Compiler.parse (fixup! Julia ABI and implementation for swappable parser)
Restoring the world age this way doesn't seem entirely consistent with
the dynamically scoped way it's used elsewhere.
....
More flexibility in freezing parser world age
This separates the decision about whether to freeze the parser world age
from Core.Compiler.parse. The builtin _apply_in_world allows this to be
done with more flexibility from outside (for example, one might want to
do some argument conversion in the current world before calling through
to a fixed world for the parser internals.
....
Apply suggestions from code review
Co-authored-by: Jameson Nash <[email protected]>
....
Put replaceable parser shim in Core
Avoids introducing (more?) dependency between Base and Core.Compiler.
....
Simplify Core._parse
0 commit comments