Пример #1
0
        unsafe public String ToString_Francesco_0(bool b)
        {
            Repro_ToString chunk = this;

            do
            {
                // if (chunk.m_ChunkLength > 0)
                {
                    char[] sourceArray = chunk.m_ChunkChars;
                    int    chunkLength = chunk.m_ChunkLength;

                    // Check that we will not overrun our boundaries.
                    // if (/*(uint)*/chunkLength <= /*(uint)*/sourceArray.Length)
                    {
                        fixed(char *sourcePtr = sourceArray)
                        {
                            if (/*(uint)*/ chunkLength <= /*(uint)*/ sourceArray.Length)
                            {
                                Dummy(sourcePtr, chunkLength);
                            }
                        }
                    }
                }
                // chunk = chunk.m_ChunkPrevious;
            }while (b);

            return("");
        }
Пример #2
0
        unsafe public String ToString_Francesco(bool b)
        {
            Repro_ToString chunk = this;

            do
            {
                if (chunk.m_ChunkLength > 0)
                {
                    char[] sourceArray = chunk.m_ChunkChars;
                    int    chunkLength = chunk.m_ChunkLength;

                    // Check that we will not overrun our boundaries.
                    if (/*(uint)*/ chunkLength <= /*(uint)*/ sourceArray.Length)
                    {
                        fixed(char *sourcePtr = sourceArray)
                        {
                            Contract.Assume(chunkLength <= sourceArray.Length); // F: should add the assume, as the join in subpolyhedra loses it. In a more general case, it can be proven by bounds
                            Dummy(sourcePtr, chunkLength);
                        }
                    }
                }
                //chunk = chunk.m_ChunkPrevious;
            }while (b);

            return("");
        }