Ejemplo n.º 1
0
        /// <summary>
        /// Write given value at memory represented by snapshot entry and doesn't process any
        /// array copy. Is needed for correct increment/decrement semantic.
        /// </summary>
        /// <param name="context">Context snapshot where operation is proceeded</param>
        /// <param name="value">Written value</param>
        protected override void writeMemoryWithoutCopy(SnapshotBase context, MemoryEntry value)
        {
            Snapshot snapshot = ToSnapshot(context);

            SnapshotLogger.append(context, "write without copy:" + this.ToString());

            AssignCollector collector = new AssignCollector(snapshot);

            collector.ProcessPath(path);

            AssignWithoutCopyWorker worker = new AssignWithoutCopyWorker(snapshot);

            worker.Assign(collector, value);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Writes the memory information.
        /// </summary>
        /// <param name="snapshot">The snapshot.</param>
        /// <param name="value">The value.</param>
        /// <param name="forceStrongWrite">if set to <c>true</c> [force strong write].</param>
        private void writeMemoryInfo(Snapshot snapshot, MemoryEntry value, bool forceStrongWrite)
        {
            AssignCollector collector = new AssignCollector(snapshot);

            collector.ProcessPath(path);

            if (forceStrongWrite)
            {
                collector.SetAllToMust();
            }

            AssignWithoutCopyWorker worker = new AssignWithoutCopyWorker(snapshot);

            worker.Assign(collector, value);
        }