• Nils Goroll's avatar
    vcc: do not overwrite SUB symbol properties when call'ing · f5798fd1
    Nils Goroll authored
    vcc_act_call() implements use-before-define semantics. To do so, it
    needs to instantiate SUB symbols if they do not exist.
    
    However, it wrongly called VCC_GlobalSymbol() also for existing
    symbols, overwriting symbol properties.
    
    In the case of the built-in subs, the symbol's lname (historically)
    still is the unescaped literal name, while user defined subs have
    their name escaped via VCC_GlobalSymbol() -> VCC_PrintCName().
    
    This made the wrong call to VCC_GlobalSymbol() apparent when a
    built-in sub was called with an explicit "call" action.
    
    Besides fixing the VCC_GlobalSymbol() call, we also need to set the
    lname and rname attributes for built-in SUB symbols initialized in
    VCC_New().
    
    Alternatively, we could also have used VCC_GlobalSymbol() there, but
    that would have affected other places where we (still) rely on the
    known name scheme of built-in subs, e.h. EmitStruct(). While the name
    unifaction was nice in general, I found the necessary changes (look up
    SUB symbols) not worth the benefit.
    
    Fixes #3719
    f5798fd1
Name
Last commit
Last update
.circleci Loading commit data...
.github Loading commit data...
bin Loading commit data...
doc Loading commit data...
etc Loading commit data...
include Loading commit data...
lib Loading commit data...
m4 Loading commit data...
man Loading commit data...
tools Loading commit data...
vmod Loading commit data...
.dir-locals.el Loading commit data...
.gitignore Loading commit data...
.lgtm.yml Loading commit data...
.syntastic_c_config Loading commit data...
.travis.yml Loading commit data...
CONTRIBUTING Loading commit data...
ChangeLog Loading commit data...
INSTALL Loading commit data...
LICENSE Loading commit data...
Makefile.am Loading commit data...
README.Packaging Loading commit data...
README.rst Loading commit data...
autogen.des Loading commit data...
autogen.sh Loading commit data...
configure.ac Loading commit data...
flint.lnt Loading commit data...
varnish-legacy.m4 Loading commit data...
varnish.m4 Loading commit data...
varnishapi-uninstalled.pc.in Loading commit data...
varnishapi.pc.in Loading commit data...
vtc.am Loading commit data...
wflags.py Loading commit data...