www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 3811] New: Shared cannot be implemented properly in druntime's array functions (lifetime.d)

http://d.puremagic.com/issues/show_bug.cgi?id=3811

           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
        AssignedTo: sean invisibleduck.org
        ReportedBy: schveiguy yahoo.com



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
array.

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: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Feb 18 2010