public CompilerTarget(Compiler compiler, Label label) : base(compiler) { if (label == null) throw new ArgumentNullException("label"); Contract.Requires(compiler != null); Contract.EndContractBlock(); _label = label; }
private CompilerFunction(Compiler compiler, FunctionDeclaration prototype) : base(compiler) { Contract.Requires(compiler != null); Contract.Requires(prototype != null); _functionPrototype = prototype; _entryLabel = compiler.DefineLabel(); _exitLabel = compiler.DefineLabel(); _entryTarget = compiler.GetTarget(_entryLabel.Id); _exitTarget = compiler.GetTarget(_exitLabel.Id); _end = new CompilerFunctionEnd(compiler, this); }
private static Mem MemPtrBuild(Label label, GPVar index, ScalingFactor scalingFactor, int displacement, Size size) { Contract.Requires(label != null); Contract.Requires(index != null); Contract.Requires(scalingFactor >= ScalingFactor.Times1 && scalingFactor <= ScalingFactor.Times8); Contract.Ensures(Contract.Result<Mem>() != null); return new Mem(label, index, scalingFactor, (IntPtr)displacement, (int)size); }
private static Mem MemPtrBuild(Label label, int displacement, Size size) { Contract.Requires(label != null); Contract.Ensures(Contract.Result<Mem>() != null); return new Mem(label, (IntPtr)displacement, (int)size); }
public Mem(Label label, GPVar index, ScalingFactor scalingFactor, IntPtr displacement, int size = 0) : this(label, displacement, size) { if (index == null) throw new ArgumentNullException("index"); if (scalingFactor < ScalingFactor.Times1 || scalingFactor > ScalingFactor.Times8) throw new ArgumentOutOfRangeException("scalingFactor"); Contract.EndContractBlock(); _index = (RegIndex)index.Id; _scalingFactor = scalingFactor; }
public Mem(Label label, IntPtr displacement, int size = 0) : base(size: size) { if (label == null) throw new ArgumentNullException("label"); _type = MemoryType.Label; _label = label; _segmentPrefix = SegmentPrefix.None; _base = (RegIndex)label.Id; _index = RegIndex.Invalid; _scalingFactor = ScalingFactor.Times1; _target = IntPtr.Zero; _displacement = displacement; }