FAQ
I've not yet had a chance to look into actually doing this myself -- but I
wonder: does anyone else have plans to split the escape analysis code in
cmd/gc out into a separate package?

I have two use cases where such a package might be useful:

    - I want to write a tool that *checks a white-list* of functions that
    are allowed to have escaping values (maybe parsing -gcflags=-m would be
    easier, though).
    - GopherJS has it's own escape analysis
    <https://github.com/gopherjs/gopherjs/blob/master/compiler/analysis/escape.go>
    code, and I wonder if it can instead make use of the same cmd/gc ecape
    analysis code.

Cheers,
Stephen

--
You received this message because you are subscribed to the Google Groups "golang-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Search Discussions

  • Russ Cox at Apr 2, 2015 at 11:25 pm
    No, there are no such plans. The escape analysis is tied to the internal
    compiler representation. Making a package would constrain future changes,
    and it would probably have to be a separate copy and have synchronization
    problems. It hardly seems worth it. Invoking the compiler with -m sounds
    like a better bet for the first use case.

    Russ

    On Thu, Apr 2, 2015 at 5:28 PM, Stephen Gutekanst wrote:

    I've not yet had a chance to look into actually doing this myself -- but I
    wonder: does anyone else have plans to split the escape analysis code in
    cmd/gc out into a separate package?

    I have two use cases where such a package might be useful:

    - I want to write a tool that *checks a white-list* of functions that
    are allowed to have escaping values (maybe parsing -gcflags=-m would be
    easier, though).
    - GopherJS has it's own escape analysis
    <https://github.com/gopherjs/gopherjs/blob/master/compiler/analysis/escape.go>
    code, and I wonder if it can instead make use of the same cmd/gc ecape
    analysis code.

    Cheers,
    Stephen

    --
    You received this message because you are subscribed to the Google Groups
    "golang-dev" group.
    To unsubscribe from this group and stop receiving emails from it, send an
    email to golang-dev+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.
    --
    You received this message because you are subscribed to the Google Groups "golang-dev" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-dev+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupgolang-dev @
categoriesgo
postedApr 2, '15 at 9:28p
activeApr 2, '15 at 11:25p
posts2
users2
websitegolang.org

2 users in discussion

Russ Cox: 1 post Stephen Gutekanst: 1 post

People

Translate

site design / logo © 2021 Grokbase