-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Force compilation with @force_compile
#42379
Conversation
Maybe |
I don't understand where the actual collision occurs though. The meta from Also, there is no need to change the macro name, right? Just what meta symbol gets injected. But perhaps |
julia> macroexpand(Main, :(Base.Experimental.@compiler_options compile=min optimize=0 infer=false))
quote
$(Expr(:meta, :compile, 3))
$(Expr(:meta, :optlevel, 0))
$(Expr(:meta, :infer, 0))
end So what happens:
|
That sounds like an additional bug. Normally codegen will execute statements of this type in the interpreter. |
Right, but #42128 made anything with an |
Codecov Report
@@ Coverage Diff @@
## master #42379 +/- ##
========================================
Coverage 89.32% 89.33%
========================================
Files 343 343
Lines 79668 79435 -233
========================================
- Hits 71163 70961 -202
+ Misses 8505 8474 -31
Continue to review full report at Codecov.
|
I think the current name is the most descriptive. |
Would it be "cleaner" to piggyback on the Line 146 in 53aa65a
So |
But currently won't that affect the compile setting module-wide? How do you distinguish it from something that is intended to be passed to |
I thought the difference would be whether the annotation is made on top-level (affects the module) or on a method (only affects the method). |
No, for example with |
I think the version that affects the whole module should not be allowed inside a method, and then that will help disambiguate a bit. We can also use e.g. |
30f466f
to
2a29f50
Compare
Rebased. |
Thanks (it's been a busy month or so). Anything else needed here? Should I move this to Experimental? |
2a29f50
to
74a55dc
Compare
=# | ||
|
||
if Sys.iswindows() | ||
Experimental.@compile |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it
Experimental.@compile | |
Experimental.@force_compile |
here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The iswindows
check feels kind of artificial here as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch both of you. See #42760
There was an unintended collision in meaning between JuliaLang#42128 and JuliaLang#37041. Since both use the `Expr(:meta)` mechanism, it doesn't really seem feasible to have them both use the same name. Consequently, it's better to rename the newer meaning. Fixes JuliaLang#42373
There was an unintended collision in meaning between JuliaLang#42128 and JuliaLang#37041. Since both use the `Expr(:meta)` mechanism, it doesn't really seem feasible to have them both use the same name. Consequently, it's better to rename the newer meaning. Fixes JuliaLang#42373
There was an unintended collision in meaning between #42128 and #37041.
Since both use the
Expr(:meta)
mechanism, it doesn't really seemfeasible to have them both use the same name. Consequently, it's
better to rename the newer meaning.
Fixes #42373