• Dridi Boukelmoune's avatar
    Register types and type methods as symbols · a82916ea
    Dridi Boukelmoune authored
    The SYM_METHOD kind of symbol was already present but never used so it
    just found its purpose.
    
    They appear in their dedicated symbol table:
    
        /*
         * Symbol Table MAIN
         *
         * reserved  VOID       41 41 acl
         * reserved  VOID       41 41 backend
         * [...]
         */
    
        /*
         * Symbol Table TYPE
         *
         * none      VOID     40 41 BACKEND
         * method    BACKEND  40 41 BACKEND.resolve
         * none      VOID     40 41 STEVEDORE
         * method    BYTES    40 41 STEVEDORE.free_space
         * method    BOOL     40 41 STEVEDORE.happy
         * method    BYTES    40 41 STEVEDORE.used_space
         * none      VOID     40 41 STRINGS
         * method    STRING   40 41 STRINGS.lower
         * method    STRING   40 41 STRINGS.upper
         */
    
    Unlike VMOD functions or object methods, native type methods are never
    invoked as a standalone statement:
    
        strings.upper();
    
    They are only evaluated atop an expression:
    
        (string expression).upper();
    
    So any VMOD named after a type, like vmod_blob, should not conflict with
    native type methods in the symbol table. Unless a symbol already exists
    in the MAIN namespace, like reserved keywords acl and backend.
    a82916ea
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...
.dir-locals.el Loading commit data...
.envrc 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...