Bug 17698 – ClassInfo structure is not read-only

Status
NEW
Severity
major
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2017-07-27T08:17:58Z
Last change time
2024-12-13T18:53:42Z
Assigned to
No Owner
Creator
Iain Buclaw
Moved to GitHub: dmd#19291 →

Comments

Comment #0 by ibuclaw — 2017-07-27T08:17:58Z
All generated runtime type information should go in rodata, but for TypeInfo_Class objects this can't be done as we set the monitor field on it in synchronized() statements. Take any example of synchronized(typeid(Foo)) { ... } Perhaps the __monitor field should be a static slot outside of ClassInfo. This may also pave the way for a more pay-as-you-go model too where the monitor is omitted unless the class declaration is marked with @monitor.
Comment #1 by robert.schadek — 2024-12-13T18:53:42Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/19291 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB