emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Emacs contributions, C and Lisp


From: Perry E. Metzger
Subject: Re: Emacs contributions, C and Lisp
Date: Mon, 5 Jan 2015 13:36:24 -0500

On Mon, 05 Jan 2015 12:50:42 -0500 Richard Stallman <address@hidden>
wrote:
>   > I understand that. What I'm saying is: For almost five years
>   > now (since gcc 4.5 introduced plugins), access to GCC's AST is
>   > wide open for everyone. However, in all that time (and to my
>   > knowledge) no one has used that to feed non-free backends, and
>   > that is in my opinion enough evidence that your worries are
>   > unfounded. They might have been valid in the past, but not
>   > since LLVM and clang have joined the scene.
> 
> Since LLVM and Clang are not copylefted, they invite nonfree
> extensions. They are a gaping hole in the defensive wall around our
> city.
> 
>   > > To figure out just what Emacs needs, that's the task I am
>   > > talking about.
> 
>   > If you want to support things like completions, refactoring,
>   > symbol searches, etc., we need full access to the AST from
>   > inside Emacs.
> 
> With all due respect, it is so important to avoid the full AST
> that I'm not going to give up on it just because someone claims
> that is necessary.

So, I've been doing a bunch of complicated refactoring work in
conjunction with my current academic research, and I've been forced
to use clang/LLVM because I need the full AST. For example, I have to
be able to go in and do things like finding all instances of
particular kinds of pointer arithmetic and turn them into stylized
forms of array indexing (the details of why are too complicated for
even a fairly long email message.) It is only possible to do this
because I have a full AST available.

clang/LLVM also provide a very friendly set of libraries to make it
easy for people to go in, walk the AST, pattern match on it, refactor
it, etc. -- the tools are being used extensively in industry for
refactoring support.

I understand your feelings on the whole thing, but the whole reason I
use LLVM for my current work is this capability. gcc just won't give
me appropriate hooks.

The libclang AST manipulation functionality was originally created
because Apple wanted it to enable sophisticated IDE and refactoring
capabilities in XCode's editor. I have wanted to have all that stuff
in Emacs forever, but it is hard without having access to tools that
generate a full AST of the code being examined. For Emacs to be able
to compete with non-free tools, it is important that it have access
to similar capabilities as the non-free tools have.

Perry
-- 
Perry E. Metzger                address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]