You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a placeholder issue for work I plan to do, probably not for Go 1.7 at this point. If anyone else wants to work on it, though, they are welcome to.
Only two gc.Types have potentially expensive to calculate width and alignments: structs and (maybe) arrays. We should move Type.Width and Type.Align into StructType and ArrayType, thus shrinking gc.Type for the vast majority of uses.
However, Width is currently overloaded to track some typechecking state. Plan is to change Deferwidth from a bool to a bitflag and start explicitly representing that state--has a width calculation been done? Is the width calculation deferred?
Also, most callsites refer to Width and Align directly. We'll need to switch them to use the Size method and a new Align method, remove unnecessary direct calls to dowidth, and teach the Size and Align methods the constant width and alignment for non-struct, non-array types.
The text was updated successfully, but these errors were encountered:
@EliCDavis I don't think so. However, it is possible that @griesemer has plans to move the typechecker over to the new AST soon enough that this would not be worth doing.
@EliCDavis Nope. There are other issues with dowith, though. I've started on moving type-checking over, but not much will be happening while we are not in the freeze.
This is a placeholder issue for work I plan to do, probably not for Go 1.7 at this point. If anyone else wants to work on it, though, they are welcome to.
Only two gc.Types have potentially expensive to calculate width and alignments: structs and (maybe) arrays. We should move Type.Width and Type.Align into StructType and ArrayType, thus shrinking gc.Type for the vast majority of uses.
However, Width is currently overloaded to track some typechecking state. Plan is to change Deferwidth from a bool to a bitflag and start explicitly representing that state--has a width calculation been done? Is the width calculation deferred?
Also, most callsites refer to Width and Align directly. We'll need to switch them to use the Size method and a new Align method, remove unnecessary direct calls to dowidth, and teach the Size and Align methods the constant width and alignment for non-struct, non-array types.
The text was updated successfully, but these errors were encountered: