[Issue 24393] New: Going into ROM operator overload
    d-bugmail at puremagic.com 
    d-bugmail at puremagic.com
       
    Tue Feb 13 19:42:31 UTC 2024
    
    
  
https://issues.dlang.org/show_bug.cgi?id=24393
          Issue ID: 24393
           Summary: Going into ROM operator overload
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: alphaglosined at gmail.com
When a block of memory goes into read only memory (cast or new), the operator
overload ``opGoingIntoROM`` should be called upon it.
Without this:
- Classes cannot have optimizations that assume that the memory is actually
immutable. As a result LDC does not apply it to ANY type causing performance
problems. https://forum.dlang.org/post/dinugxopqgwrzobrfhov@forum.dlang.org
- Reference counting types cannot be immutable and therefore turn off reference
counting. Otherwise segfaults if the memory is read only.
--
    
    
More information about the Digitalmars-d-bugs
mailing list