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
The intention behind 8551b1f was to ensure that we add v_dont_optimize for subs called from housekeeping subs, but only if they are called from there only (in other words, if a sub is called both from housekeeping and a any other sub, we do want the compiler to optimize).
This does work for a case like
vcl 4.1;
backend foo None;
import directors;
sub a {
new d = directors.shard();
}
sub vcl_init {
call a;
}
because the new keyword makes the sub "init-only":
The reason is that the okmask allows it to be called from anywhere. But v_dont_optimize should not be determined by from where can be called, but rather by from where it actually is called.
The text was updated successfully, but these errors were encountered:
The intention behind 8551b1f was to ensure that we add
v_dont_optimize
for subs called from housekeeping subs, but only if they are called from there only (in other words, if a sub is called both from housekeeping and a any other sub, we do want the compiler to optimize).This does work for a case like
because the
new
keyword makes the sub "init-only":however, if a sub does not have
new
and is still called fromvcl_init
only, it will not get the attribute:->
The reason is that the
okmask
allows it to be called from anywhere. Butv_dont_optimize
should not be determined by from where can be called, but rather by from where it actually is called.The text was updated successfully, but these errors were encountered: