Minor refactoring and docs in selector optimisation
ClosedPublic

Authored by osa1 on Jun 12 2018, 8:46 AM.

Diff Detail

Repository
rGHC Glasgow Haskell Compiler
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
osa1 created this revision.Jun 12 2018, 8:46 AM
simonmar added inline comments.Jun 12 2018, 9:59 AM
rts/sm/Evac.c
939–940

I don't think this is correct - the chain being updated here is a list of THUNK_SELECTORs that were originally nested inside each other. If you want to expand the comments here (which is a good thing I think) it would be great to have an ASCII diagram or two to show the structure of the objects throughout this process.

osa1 added inline comments.Jun 12 2018, 11:17 AM
rts/sm/Evac.c
939–940

I'm confused, which part do you think is wrong? I think we're saying the same thing. It's possible that my understanding is completely wrong though.

simonmar added inline comments.Jun 12 2018, 2:24 PM
rts/sm/Evac.c
939–940

ah, actually I misread it. But can I suggest a minor rewording : "except when there is a loop (i.e. the value of a THUNK_SELECTOR is the THUNK_SELECTOR itself)."

osa1 updated this revision to Diff 16887.Jun 13 2018, 2:44 PM
  • Apply Simon's suggestion, an example selector chain
osa1 added a comment.Jun 13 2018, 2:45 PM

@simonmar Does my example makes sense? The notation may be a bit off but hopefully I get the idea right.

osa1 marked 3 inline comments as done.Jun 13 2018, 2:46 PM
simonmar accepted this revision.Jun 14 2018, 3:12 AM

Yeah, I think that's right. As a word of advice: be very careful with this code, it tends to be a bug farm :)

This revision is now accepted and ready to land.Jun 14 2018, 3:12 AM
osa1 updated this revision to Diff 16896.Jun 14 2018, 6:26 AM
  • Minor refactoring
This revision was automatically updated to reflect the committed changes.