cocci.inria.fr archive mirror
 help / color / mirror / Atom feed
From: Jaskaran Singh <jaskaran.singh@collabora.com>
To: Markus Elfring <Markus.Elfring@web.de>
Cc: Coccinelle <cocci@systeme.lip6.fr>
Subject: Re: [Cocci] [RFC PATCH 1/3] parsing_c: includes_cache: Implement a name cache
Date: Thu, 10 Sep 2020 11:12:20 +0530	[thread overview]
Message-ID: <c0923b23a65f024393bb2388c958d39e9f848fc6.camel@collabora.com> (raw)
In-Reply-To: <b5578545-0567-8555-30db-d95a6b7bec1d@web.de>

On Wed, 2020-09-09 at 22:05 +0200, Markus Elfring wrote:
> > Implement a name cache and includes dependency graph to optimize
> > performance for recursive parsing of header files.
> 
> Can such information trigger any more evolution besides the
> contributed
> OCaml source code?
> 
> 
> >   The names of the above are stored in a "name cache", i.e. a
> > hashtable
> >   to map the name to the files it is declared in.
> 
> How much does hashing matter here?
> 

It's a hash table. I don't know how OCaml's Hashtbl works under the
hood.

> 
> > - A dependency graph is built to determine dependencies between all
> > the
> >  files in the codebase.
> 
> Can such information indicate a need for its own programming
> interface?
> 

If you mean graphs, there are entire modules for them in Coccinelle.
(commons/ograph_*.ml).

> 
> > - In the type annotation phase of the C subsystem, if a function
> > call,
> >   struct/union field or identifier is encountered, the type of
> > which is
> >   not known to the annoter, the name cache is checked for the name.
> 
> Is there anything in common with symbol tables?
> 

Kind of.

Cheers,
Jaskaran.

> Regards,
> Markus

_______________________________________________
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci

  reply	other threads:[~2020-09-10  5:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-09 20:05 [Cocci] [RFC PATCH 1/3] parsing_c: includes_cache: Implement a name cache Markus Elfring
2020-09-10  5:42 ` Jaskaran Singh [this message]
  -- strict thread matches above, loose matches on Subject: below --
2020-09-09 18:12 [Cocci] [RFC PATCH 0/3] parsing_c: Optimize recursive header file parsing Jaskaran Singh
2020-09-09 18:13 ` [Cocci] [RFC PATCH 1/3] parsing_c: includes_cache: Implement a name cache Jaskaran Singh

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c0923b23a65f024393bb2388c958d39e9f848fc6.camel@collabora.com \
    --to=jaskaran.singh@collabora.com \
    --cc=Markus.Elfring@web.de \
    --cc=cocci@systeme.lip6.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).