On Tue, Mar 21, 2017 at 7:02 PM Jim Ingham <jing...@apple.com> wrote:

> There's no reason why you couldn't do a C REPL, so having the framework
> for it in llvm.org seems reasonable.  Just the generic part is enough
> trickery it is worth sharing.
>
> I'm not sure why you care about the fact that Repl.h includes something
> from Command, but if you do then probably the easiest way to sort that out
> is to move REPL.h and REPL.cpp into Commands.  The REPL is really a
> modification of the expr command anyway (you can access it at any time in a
> swift debug session by "expr --repl -- " and the interactive REPL just does
> some setup and runs lldb expressions in the repl mode.

Mostly for the reasons that have been discussed before about breaking
cycles, leading to faster builds, lower binary size, and enabling c++
modules.  Currently Expression and Command depend on each other.  But only
because of this 1 include.  Without this include, Command depends on
Expression but not vice versa.

I'm still curious what unique functionality REPL provides that cannot be
accomplished with ScriptInterpreter, but mostly as a curiosity since it's
not my immediate problem



>
> So even though it is a feature of expressions, and the actual
> implementation of the REPL is properly somewhere in the Swift tree, it
> would be equally valid to consider the generic REPL code an extension of
> the CommandObjectExpression, so living in Commands and #including
> "CommandObjectExpression" seem reasonable.
>
> Jim
>
>
>
>
>
> > On Mar 21, 2017, at 6:37 PM, Jason Molenda via lldb-dev <
> lldb-dev@lists.llvm.org> wrote:
> >
> > I don't follow REPL issues very closely but I think some people may have
> hopes of doing a repl in a language other than swift in the future which is
> why it was upstreamed to llvm.
> >
> > J
> >
> >> On Mar 21, 2017, at 6:34 PM, Zachary Turner <ztur...@google.com> wrote:
> >>
> >> Thanks, I had a suspicion it might be used in Swift.  Given that swift
> seems to be the only consumer, and there are no plans for support for any
> other languages, would it be reasonable to say that it's a swift-specific
> addition and could be in the swift repo?
> >>
> >> If not, I will need to come up with a good way to get REPL.h to not
> #include code from the source tree (and ideally, not #include code from
> Commands at all).
> >>
> >> On Tue, Mar 21, 2017 at 6:24 PM Jason Molenda <jmole...@apple.com>
> wrote:
> >> It's used in the swift lldb, https://github.com/apple/swift-lldb
> >>
> >> The idea is to have any non-swift specific code in llvm.org; the
> github repository for swift specific additions.
> >>
> >>
> >>> On Mar 21, 2017, at 6:19 PM, Zachary Turner via lldb-dev <
> lldb-dev@lists.llvm.org> wrote:
> >>>
> >>> AFAICT this is all dead code.  Unless someone is using it out of
> tree?  There is a way to register repl support for various languages, but
> no code in tree is actually doing this.  It's possible I'm just not finding
> the code though.
> >>>
> >>> It appears this code was all added about 18 months ago, and if it
> hasn't found any use in that time frame, it would be great to remove it to
> reduce technical debt.
> >>>
> >>> That said, if it's actually being used in tree somewhere and I'm just
> overlooking it, let me know.
> >>> _______________________________________________
> >>> lldb-dev mailing list
> >>> lldb-dev@lists.llvm.org
> >>> http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev
> >>
> >
> > _______________________________________________
> > lldb-dev mailing list
> > lldb-dev@lists.llvm.org
> > http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev
>
>
_______________________________________________
lldb-dev mailing list
lldb-dev@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev

Reply via email to