Ejemplo n.º 1
0
 public override MemoryEntry ArrayEx(IEnumerable <KeyValuePair <MemoryEntry, MemoryEntry> > keyValuePairs)
 {
     // If the array expression does not have empty arguments, it is not supported
     foreach (var keyValue in keyValuePairs)
     {
         throw new NotImplementedException();
     }
     return(new MemoryEntry(OutSet.CreateArray()));
 }
Ejemplo n.º 2
0
        public override MemoryEntry ResolveIndexedVariable(VariableIdentifier variable)
        {
            var snapshotEntry = ResolveVariable(variable);
            var entry         = snapshotEntry.ReadMemory(OutSnapshot);

            Debug.Assert(entry.Count > 0, "Every resolved variable must give at least one value");

            // NOTE: there should be precise resolution of multiple values
            var arrayValue     = entry.PossibleValues.First();
            var undefinedValue = arrayValue as UndefinedValue;

            if (undefinedValue != null)
            {
                arrayValue = OutSet.CreateArray();
                var newEntry = new MemoryEntry(arrayValue);
                snapshotEntry.WriteMemory(OutSnapshot, newEntry);
                return(newEntry);
            }
            else
            {
                return(entry);
            }
        }