示例#1
0
        // store by address
        public void Store(SymbolicSlot value)
        {
            if (IsConstAfterSimplification() || value.IsConstAfterSimplification())
            {
                return;
            }

            // store like a field because we should create a snapshot in the moment
            // and avoid cycled references in the "values" field
            MaterializeFields();
            value.MaterializeFields();

            if (IsConstAfterSimplification() || value.IsConstAfterSimplification())
            {
                return;
            }

            var mergedEntity = SymbolicReference.Merge(entities, value.entities);

            entities       = new[] { mergedEntity };
            value.entities = new[] { mergedEntity };
        }
示例#2
0
        public void StoreField(string name, SymbolicSlot value)
        {
            if (IsConstAfterSimplification() || value.IsConstAfterSimplification())
            {
                return;
            }

            MaterializeFields();
            value.MaterializeFields();

            if (IsConstAfterSimplification() || value.IsConstAfterSimplification())
            {
                return;
            }

            var targetEntity = SymbolicReference.Merge(value.entities);

            for (int i = 0; i < entities.Length; i++)
            {
                var entity = entities[i];
                entity.StoreField(name, targetEntity);
            }
        }