Exemple #1
0
        internal void ExtendAsCall(SnapshotBase callerContext, ProgramPointGraph callee, MemoryEntry thisObject, MemoryEntry[] arguments)
        {
            checkCanUpdate();

            _statistics.Report(Statistic.AsCallExtendings);
            extendAsCall(callerContext, callee, thisObject, arguments);
        }
Exemple #2
0
 /// <summary>
 /// Creates snapshot entry containing given value. Created entry doesn't have
 /// explicit memory storage. But it still can be asked for saving indexes, fields, resolving aliases,... !!!
 /// </summary>
 /// <param name="entry">Value wrapped in snapshot entry</param>
 /// <returns>Created value entry</returns>
 protected abstract ReadWriteSnapshotEntryBase createSnapshotEntry(MemoryEntry entry);
Exemple #3
0
 /// <summary>
 /// Extend snapshot as a call to function/method callee from given callerContext
 /// </summary>
 /// <param name="callerContext">The caller context.</param>
 /// <param name="callee">Program point graph of the callee (identification of function or method that was called).</param>
 /// <param name="thisObject">The this object.</param>
 /// <param name="arguments">The arguments.</param>
 protected abstract void extendAsCall(SnapshotBase callerContext, ProgramPointGraph callee, MemoryEntry thisObject, MemoryEntry[] arguments);
Exemple #4
0
 /// <summary>
 /// Write at index of value (that is not array, string, undefined or anyvalue)
 /// </summary>
 /// <param name="indexed">Value which index is written</param>
 /// <param name="index">Index used for given value</param>
 /// <param name="writtenValue">Value that is written at specified index</param>
 /// <returns>Values that should be written back into value container</returns>
 public abstract IEnumerable <Value> WriteValueIndex(Value indexed, MemberIdentifier index, MemoryEntry writtenValue);
Exemple #5
0
 /// <summary>
 /// Creates snapshot entry containing given value. Created entry doesn't have
 /// explicit memory storage. But it still can be asked for saving indexes, fields, resolving aliases,... !!!
 /// </summary>
 /// <param name="value">Value wrapped in snapshot entry</param>
 /// <returns>Created value entry</returns>
 public ReadSnapshotEntryBase CreateSnapshotEntry(MemoryEntry value)
 {
     return(createSnapshotEntry(value));
 }
Exemple #6
0
 /// <summary>
 /// Widening operation between old and current memory entries
 /// </summary>
 /// <param name="old">Initial value before transaction has been started</param>
 /// <param name="current">Value computed during transaction</param>
 /// <returns>Widened memory entry</returns>
 public abstract MemoryEntry Widen(MemoryEntry old, MemoryEntry current);
Exemple #7
0
 /// <summary>
 /// Simplify handler that is used during commit on entries having more than SimplifyLimit possible values
 /// </summary>
 /// <param name="entry">Value computed during transaction</param>
 /// <returns>Simplified memory entry</returns>
 public abstract MemoryEntry Simplify(MemoryEntry entry);
Exemple #8
0
 /// <summary>
 /// Write at field of value (that is not object, undefined or anyvalue)
 /// </summary>
 /// <param name="fielded">Value which field is written</param>
 /// <param name="field">Field used for given value</param>
 /// <param name="writtenValue">Value that is written at specified field</param>
 /// <returns>Values that should be written back into value container</returns>
 public abstract IEnumerable <Value> WriteValueField(Value fielded, VariableIdentifier field, MemoryEntry writtenValue);
Exemple #9
0
 /// <summary>
 /// Write given value at memory represent by snasphot entry. No value copy operations can be proceeded
 /// </summary>
 /// <param name="context">Context snapshot where operation is proceeded</param>
 /// <param name="value">Written value</param>
 public void WriteMemoryWithoutCopy(SnapshotBase context, MemoryEntry value)
 {
     //TODO statistics reporting
     writeMemoryWithoutCopy(context, value);
 }
Exemple #10
0
 /// <summary>
 /// Write given value at memory represented by snapshot entry
 /// </summary>
 /// <param name="value">Written value</param>
 /// <param name="context">Context snapshot where operation is proceeded</param>
 /// <param name="forceStrongWrite">Determine that current write should be processed as strong</param>
 public void WriteMemory(SnapshotBase context, MemoryEntry value, bool forceStrongWrite = false)
 {
     //TODO statistics reporting
     writeMemory(context, value, forceStrongWrite);
 }
Exemple #11
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="value">Written value</param>
 /// <param name="context">Context snapshot where operation is proceeded</param>
 protected abstract void writeMemoryWithoutCopy(SnapshotBase context, MemoryEntry value);
Exemple #12
0
 /// <summary>
 /// Write given value at memory represented by snapshot entry
 /// </summary>
 /// <param name="value">Written value</param>
 /// <param name="context">Context snapshot where operation is proceeded</param>
 /// <param name="forceStrongWrite">Determine that current write should be processed as strong</param>
 protected abstract void writeMemory(SnapshotBase context, MemoryEntry value, bool forceStrongWrite);