Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Skip to content

Factor out "value" variants of ConstValue #59210

Closed

Description

@oli-obk

Basically create a new enum ConstKind which has all the variants of ConstValue except for Scalar, Slice, ByRef. ConstKind should then have a variant (maybe Evaluated or just Value), which contains a ConstValue.

cc #59178 (comment)

continuation of #54738

This is actually just some mechanical refactoring, but also a ton of work (since you'll be touching almost every occurrence of ConstValue).

Activity

  1. added
    E-easy
    C-cleanup
    E-mentor
    on Mar 15, 2019
  2. RalfJung commented on Mar 15, 2019

    @RalfJung
  3. oli-obk commented on Mar 15, 2019

    @oli-obk
    Author
  4. stepnivlk commented on Mar 15, 2019

    @stepnivlk

    Hey @oli-obk, happy to take this one :).

  5. oli-obk commented on Mar 15, 2019

    @oli-obk
    ContributorAuthor

    Awesome! Please do note that this is a ton of work and may get annoying with rebases, so it may require some endurance to get actually merged.

  6. varkor commented on Mar 19, 2019

    @varkor
    Contributor

    It'd also be better to wait until #59008 is merged, because there's otherwise going to be a lot of conflicts.

  7. stepnivlk commented on Mar 19, 2019

    @stepnivlk

    @varkor I see, thx for the info.

  8. yodaldevoid commented on May 6, 2019

    @yodaldevoid
    Contributor

    @stepnivlk If you did not see, #59008 got merged! Just wanted to ping you in case you are still interested in working on this.

  9. stepnivlk commented on May 6, 2019

    @stepnivlk

    @yodaldevoid great, thx for the info and I actually missed it. I'm def interested, gonna work on that.

  10. stepnivlk commented on May 12, 2019

    @stepnivlk

    hey @oli-obk I have one tiny question, @eddyb mentioned here #59178 (comment) that he wants ConstKind in ty and ConstValue in its current place, is that what we aim for? I'm asking b/c often it's necessary to bring in both ConstKind and ConstValue, mainly for pattern matching. From that perspective those two are quite coupled. I feel like it'd be cleaner to have them both together. What do you think?

  11. oli-obk commented on May 13, 2019

    @oli-obk
    ContributorAuthor

    ConstKind fits better to ty, since that's also where ty::Const is defined. It's perfectly fine that they live in different modules imo. Also, most of the time you won't import ConstKind, but use ty::ConstKind.

  12. added a commit that references this issue on Nov 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-cleanupE-easyE-mentor

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions