Summary: Shared cannot be implemented properly in druntime's
                    array functions (lifetime.d)
           Product: D
           Version: future
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: major
          Priority: P2
         Component: druntime

--- Comment #0 from Steven Schveighoffer <> 2010-02-18 
06:46:20 PST ---
There are several array functions which accept TypeInfo for the array type
being operated on.

However, the assumption is made that the type applies to all arguments.  This
is fine for non-shared arrays, but for shared arrays, reading data from that
array must be done with proper synchronization.

For example, it should be possible to concatenate both a shared and local array
into a new array, or append the contents of a shared array to a non-shared

Therefore, there needs to be typeinfo passed in for each argument to the array
functions, and action should be taken appropriately.  Alternatively, the
compiler could call different versions of the function depending on the shared
status of the arguments.  This should be minimal, and might help performance
since runtime checks would not be needed.

Note also that two new functions in druntime do not pass in a TypeInfo
reference because they are specific to wchar[] and char[].  Those functions
need to undergo the same issue.

Fixing this issue depends on the solidification and proper implementation of
shared in the spec and compiler respectively.

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to