Commit dc6d77d
committed
Lower cglobal to GlobalRef(Core.Intrinsics, :cglobal) (#86)
Fix the lowering of `cglobal` to produce `GlobalRef(Core.Intrinsics, :cglobal)`
instead of a bare symbol `:cglobal`. The inference validator requires cglobal
to be a GlobalRef:
https://github.com/JuliaLang/julia/blob/7a8cd6e202f1d1216a6c0c0b928fb43a123cada8/Compiler/src/validation.jl#L87
With this commit `_to_lowered_expr` resolves `cglobal` to `GlobalRef(Core.Intrinsics, :cglobal)`,
matching Julia's builtin lowerer behavior and satisfying the inference
validator's requirements.1 parent 3f2a520 commit dc6d77d
1 file changed
+4
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
331 | 331 | | |
332 | 332 | | |
333 | 333 | | |
334 | | - | |
335 | | - | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
336 | 338 | | |
337 | 339 | | |
338 | 340 | | |
| |||
0 commit comments