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
From the docs:
```
The following statements raise the current world age:
1. An explicit invocation of Core.@latestworld
2. The start of every top-level statement
3. The start of every REPL prompt
4. Any type or struct definition
5. Any method definition
6. Any constant declaration
7. Any global variable declaration (but not a global variable assignment)
8. Any using, import, export or public statement
9. Certain other macros like eval (depends on the macro implementation)
```
This commit handles each case as follows:
```
1. = 9
2. I'm not sure this actually happens (or needs to happen, unless we're
being defensive? Doing it after each world-changing operation should
suffice). But if we need it, this would just be emitting once at the
beginning of every lowered output.
3. = 2
4. = 6
5. Emit seeing `method` in linearize
6. Emit seeing `constdecl` in linearize
7. Emit seeing `global` or `globaldecl` in linearize
8. We just defer to `eval`, but should probably go in desugaring later
- using/import recently became builtin calls, and I haven't
updated JL to use them yet. Base._import_using has an expr-based
API that may change, and our importpath destructuring is worth keeping.
- export and public (special forms) are handled in toplevel.c
9. Done for us
```
Other quirks:
- `JuliaLowering.eval_closure_type` calls eval to assign a const, so we still
need to deal with that in closure conversion.
- The `include` hack isn't mentioned in the docs, but can stay in desugaring.
I'm not certain why we don't do the same for non-macro `eval`.
0 commit comments