Opened 4 years ago

Closed 2 years ago

#8552 closed task (fixed)

Rename StgArrWords to StgArrBytes

Reported by: Tarrasch Owned by: siddhanathan
Priority: lowest Milestone: 8.0.1
Component: Compiler Version: 7.6.3
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s): Phab:D1233
Wiki Page:

Description

Since #3800, StgArrWords contains a certain number of words and not bytes. One can easily forget this and make programming mistakes. For example if you try to store the number of words in the bytes field, the garbage collector won't honor your decision. (I learned the hard way :))

Attachments (1)

PATCH_8552 (1.2 KB) - added by Tarrasch 4 years ago.
In the meanwhile, we can apply this patch

Download all attachments as: .zip

Change History (8)

Changed 4 years ago by Tarrasch

Attachment: PATCH_8552 added

In the meanwhile, we can apply this patch

comment:1 Changed 4 years ago by Tarrasch

Status: newpatch

My attachment just adds a comment about the confusion that can happen. (And have happened :))

I bet somebody have good arguments to not rename this struct, so please comment on this suggestion.

comment:2 Changed 4 years ago by Austin Seipp <austin@…>

In ac5ff6422fb9e143c38e6cdcf16280de200cb880/ghc:

Comment on StgArrWords vs StgArrBytes

See #8552

Signed-off-by: Arash Rouhani <rarash@student.chalmers.se>
Reviewed-by: Austin Seipp <austin@well-typed.com>

comment:3 Changed 4 years ago by thoughtpolice

Status: patchnew

Seems sensible to me. Merged.

comment:4 Changed 2 years ago by siddhanathan

Owner: set to siddhanathan

comment:5 Changed 2 years ago by siddhanathan

Differential Rev(s): Phab:D1233

comment:6 Changed 2 years ago by Austin Seipp <austin@…>

In 7ad4b3c/ghc:

s/StgArrWords/StgArrBytes/

Rename StgArrWords to StgArrBytes (see Trac #8552)

Reviewed By: austin

Differential Revision: https://phabricator.haskell.org/D1233

GHC Trac Issues: #8552

comment:7 Changed 2 years ago by thomie

Milestone: 8.0.1
Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.