mirror of
https://git.743378673.xyz/MeloNX/MeloNX.git
synced 2025-06-28 03:16:23 +02:00

* Removed unused usings. * Added back using, now that it's used. * Removed extra whitespace.
25 lines
No EOL
491 B
C#
25 lines
No EOL
491 B
C#
using ARMeilleure.IntermediateRepresentation;
|
|
|
|
namespace ARMeilleure.CodeGen.RegisterAllocators
|
|
{
|
|
class StackAllocator
|
|
{
|
|
private int _offset;
|
|
|
|
public int TotalSize => _offset;
|
|
|
|
public int Allocate(OperandType type)
|
|
{
|
|
return Allocate(type.GetSizeInBytes());
|
|
}
|
|
|
|
public int Allocate(int sizeInBytes)
|
|
{
|
|
int offset = _offset;
|
|
|
|
_offset += sizeInBytes;
|
|
|
|
return offset;
|
|
}
|
|
}
|
|
} |