예제 #1
0
        public override void ConstantDeclaration(ConstantDecl x, MemoryEntry constantValue)
        {
            var constantName = ".constant_" + x.Name;
            var constantVar  = new VariableIdentifier(constantName);

            OutSet.FetchFromGlobal(constantVar.DirectName);

            OutSet.GetVariable(constantVar).WriteMemory(OutSnapshot, constantValue);
        }
예제 #2
0
        public override ReadWriteSnapshotEntryBase ResolveIndirectStaticField(MemoryEntry typeNames, VariableIdentifier field)
        {
            var variables = new List <string>();

            foreach (var typeName in TypeNames(typeNames))
            {
                var varName = string.Format("{0}::{1}", typeName, field.DirectName);
                variables.Add(varName);
            }

            var identifier = new VariableIdentifier(variables.ToArray());

            return(OutSet.GetVariable(identifier));
        }
예제 #3
0
        public override ReadWriteSnapshotEntryBase ResolveStaticField(GenericQualifiedName type, VariableIdentifier field)
        {
            var varName = string.Format("{0}::{1}", type, field.DirectName);

            return(OutSet.GetVariable(new VariableIdentifier(varName)));
        }
예제 #4
0
        public override ReadWriteSnapshotEntryBase ResolveVariable(VariableIdentifier variable)
        {
            var value = OutSet.GetVariable(variable);

            return(value);
        }