Ejemplo n.º 1
0
 /// <summary>
 /// Allocates the virtual register or stack slot.
 /// </summary>
 /// <param name="type">The type.</param>
 /// <returns></returns>
 public Operand AllocateVirtualRegisterOrStackSlot(MosaType type)
 {
     if (MosaTypeLayout.IsStoredOnStack(type))
     {
         return(AddStackLocal(type));
     }
     else
     {
         return(CreateVirtualRegister(type.GetStackType()));
     }
 }
Ejemplo n.º 2
0
 public static Operand CreateResultOperand(IInstructionDecoder decoder, MosaType type)
 {
     return(decoder.Compiler.CreateVirtualRegister(type.GetStackType()));
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Allocates the virtual register or stack slot.
 /// </summary>
 /// <param name="type">The type.</param>
 /// <returns></returns>
 public Operand AllocateVirtualRegisterOrStackSlot(MosaType type)
 {
     if (StoreOnStack(type))
     {
         return AddStackLocal(type);
     }
     else
     {
         return CreateVirtualRegister(type.GetStackType());
     }
 }
Ejemplo n.º 4
0
 public static Operand CreateResultOperand(IInstructionDecoder decoder, MosaType type)
 {
     return decoder.Compiler.CreateVirtualRegister(type.GetStackType());
 }