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
This is a quick experiment to see what it would look like to switch
Expr(:invoke) to use CodeInstance rather than MethodInstance. There
is some unresolved semantic questions here about whether this is
a good idea or if there's some other representation that's better,
but discussion might be easier with an implementation.
The larger context here is the question of whether and how to do
more general method specialization. I had written some thoughts
in [1], but as mentioned there remains ongoing discussion of whether
this is the correct direction or not.
[1] https://hackmd.io/@Og2_pcUySm6R_RPqbZ06JA/S1bqP1D_6
// TODO: Separate copy of the callsig in the CodeInstance
5010
+
mi = codeinst->def;
5011
+
}
5022
5012
5023
-
// Check if it is already compiled (either JIT or externally)
5024
-
if (cache_valid) {
5025
-
// optimization: emit the correct name immediately, if we know it
5026
-
// TODO: use `emitted` map here too to try to consolidate names?
5027
-
// WARNING: isspecsig is protected by the codegen-lock. If that lock is removed, then the isspecsig load needs to be properly atomically sequenced with this.
5028
-
auto fptr = jl_atomic_load_relaxed(&codeinst->specptr.fptr);
5029
-
if (fptr) {
5030
-
while (!(jl_atomic_load_acquire(&codeinst->specsigflags) & 0b10)) {
if (need_to_emit && it != ctx.call_targets.end()) {
5031
+
protoname = it->second.decl->getName();
5032
+
need_to_emit = cache_valid = false;
5033
+
}
5034
+
5035
+
// Check if it is already compiled (either JIT or externally)
5036
+
if (cache_valid) {
5037
+
// optimization: emit the correct name immediately, if we know it
5038
+
// TODO: use `emitted` map here too to try to consolidate names?
5039
+
// WARNING: isspecsig is protected by the codegen-lock. If that lock is removed, then the isspecsig load needs to be properly atomically sequenced with this.
5040
+
auto fptr = jl_atomic_load_relaxed(&codeinst->specptr.fptr);
5041
+
if (fptr) {
5042
+
while (!(jl_atomic_load_acquire(&codeinst->specsigflags) & 0b10)) {
0 commit comments