Пример #1
0
        internal override void Store(LLFunction pFunction, LLLocation pSource)
        {
            LLLocation locationElementPointer = HLArrayElementAddressLocation.LoadArrayElementPointer(pFunction, Instance, Index, ElementType);
            LLLocation locationSource         = pFunction.CurrentBlock.EmitConversion(pSource, locationElementPointer.Type.PointerDepthMinusOne);

            pFunction.CurrentBlock.EmitStore(locationElementPointer, locationSource);
        }
Пример #2
0
        internal override LLLocation Load(LLFunction pFunction)
        {
            LLLocation locationElementPointer = HLArrayElementAddressLocation.LoadArrayElementPointer(pFunction, Instance, Index, ElementType);
            LLLocation locationTemporary      = LLTemporaryLocation.Create(pFunction.CreateTemporary(locationElementPointer.Type.PointerDepthMinusOne));

            pFunction.CurrentBlock.EmitLoad(locationTemporary, locationElementPointer);
            return(locationTemporary);
        }
 public static HLArrayElementAddressLocation Create(HLLocation pInstance, HLLocation pIndex, HLType pElementType)
 {
     HLArrayElementAddressLocation location = new HLArrayElementAddressLocation(HLDomain.GetOrCreateType(MutableModelHelper.GetManagedPointerTypeReference(pElementType.Definition, HLDomain.Host.InternFactory, pElementType.Definition)));
     location.mInstance = pInstance;
     location.mIndex = pIndex;
     location.mElementType = pElementType;
     return location;
 }
        public static HLArrayElementAddressLocation Create(HLLocation pInstance, HLLocation pIndex, HLType pElementType)
        {
            HLArrayElementAddressLocation location = new HLArrayElementAddressLocation(HLDomain.GetOrCreateType(MutableModelHelper.GetManagedPointerTypeReference(pElementType.Definition, HLDomain.Host.InternFactory, pElementType.Definition)));

            location.mInstance    = pInstance;
            location.mIndex       = pIndex;
            location.mElementType = pElementType;
            return(location);
        }
Пример #5
0
 internal override HLLocation AddressOf()
 {
     return(HLArrayElementAddressLocation.Create(mInstance, mIndex, mElementType));
 }