public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jeff Law <law@redhat.com>
To: David Malcolm <dmalcolm@redhat.com>, gcc-patches@gcc.gnu.org
Subject: Re: [PATCH 03/17] Core of BLT implementation
Date: Fri, 01 Sep 2017 17:32:00 -0000	[thread overview]
Message-ID: <4f53716d-a2ad-b59d-7f61-ed4a2debbe6b@redhat.com> (raw)
In-Reply-To: <1500926714-56988-4-git-send-email-dmalcolm@redhat.com>

On 07/24/2017 02:05 PM, David Malcolm wrote:
> This patch implements the core of the new "blt" type: an optional
> "on-the-side" hierarchical recording of source ranges, associated
> with grammar productions, with a sparse mapping to our regular
> "tree" type.
So I think one of the big questions here is whether or not BLT hits the
right compromise between the two syntax trees to meet the needs you
envision.  It's an area I'm not really versed in, so I'm probably not a
good judge of whether or not we're on the right track -- though it does
seem to my naive eyes that you need to have most of the tree to do
something like refactoring tools.

> 
> Caveats:
> * the name is a placeholder (see the comment in blt.h)
> * I'm ignoring memory management for now (e.g. how do these get freed?
>   possible a custom arena, or an obstack within a blt_context or
>   somesuch)
Yea, management is a real question.  It obviously depends on the use
case -- ie, are the use cases such that we expect to work on a function
level, then move on to the next function and so-on.  Or is it the case
that we are likely to need to build the BLT for function A, then analyze
some other code in function B, then go back and issue fixit hints for
function A?  ie, what are the expected lifetimes of a BLT.

My understanding is you can have nodes in the BLT pointing to trees and
vice-versa.  This may have implications on memory management :-)

Jeff

  reply	other threads:[~2017-09-01 17:32 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-24 19:31 [PATCH 00/17] RFC: New source-location representation; Language Server Protocol David Malcolm
2017-07-24 19:31 ` [PATCH 13/17] Add http-server.h and http-server.c David Malcolm
2017-07-24 19:31 ` [PATCH 17/17] Language Server Protocol: work-in-progess on testsuite David Malcolm
2017-07-24 19:31 ` [PATCH 01/17] Add param-type-mismatch.c/C testcases as a baseline David Malcolm
2017-07-24 19:56   ` Eric Gallager
2017-09-01 17:00   ` Jeff Law
2017-07-24 19:31 ` [PATCH 11/17] Add JSON implementation David Malcolm
2017-09-01 17:06   ` Jeff Law
2017-07-24 19:31 ` [PATCH 10/17] C++: provide fix-it hints in -Wsuggest-override David Malcolm
2017-07-24 19:31 ` [PATCH 12/17] Add server.h and server.c David Malcolm
2017-07-26 14:35   ` Oleg Endo
2017-07-26 14:50     ` David Malcolm
2017-07-26 21:00       ` Mike Stump
2017-09-01 17:09   ` Jeff Law
2017-07-24 19:31 ` [PATCH 02/17] diagnostics: support prefixes within diagnostic_show_locus David Malcolm
2017-09-01 17:11   ` Jeff Law
2017-07-24 19:31 ` [PATCH 15/17] Language Server Protocol: add lsp::server abstract base class David Malcolm
2017-07-27  4:14   ` Trevor Saunders
2017-07-28 14:48     ` David Malcolm
2017-07-27  7:55   ` Richard Biener
2017-07-28 16:02     ` David Malcolm
2017-07-24 19:31 ` [PATCH 03/17] Core of BLT implementation David Malcolm
2017-09-01 17:32   ` Jeff Law [this message]
2017-07-24 19:38 ` [PATCH 06/17] C: use BLT to highlight parameter of callee decl for mismatching types David Malcolm
2017-07-24 19:38 ` [PATCH 14/17] Add implementation of JSON-RPC David Malcolm
2017-07-24 19:38 ` [PATCH 07/17] C++: use BLT to highlight parameter of callee decl for mismatching types David Malcolm
2017-07-24 19:39 ` [PATCH 04/17] C frontend: capture BLT information David Malcolm
2017-07-27 19:58   ` Martin Sebor
2017-07-24 19:39 ` [PATCH 09/17] C++: highlight return types when complaining about mismatches David Malcolm
2017-07-24 19:39 ` [PATCH 08/17] C: " David Malcolm
2017-07-24 19:40 ` [PATCH 05/17] C++ frontend: capture BLT information David Malcolm
2017-07-24 19:41 ` [PATCH 16/17] Language Server Protocol: proof-of-concept GCC implementation David Malcolm
2017-07-26 17:10 ` [PATCH 00/17] RFC: New source-location representation; Language Server Protocol Jim Wilson
2017-07-28  5:12   ` Alexandre Oliva
2017-07-27 19:51 ` Martin Sebor
2017-07-28 14:28   ` David Malcolm
2017-07-28 18:32     ` Martin Sebor
2017-10-11 19:32 ` David Malcolm

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=4f53716d-a2ad-b59d-7f61-ed4a2debbe6b@redhat.com \
    --to=law@redhat.com \
    --cc=dmalcolm@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    /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 read-only IMAP folder(s) and NNTP newsgroup(s).