public void Visit(SignedIntegral s) { var cPP_type_size = (uint)Math.Max(8, Math.Pow(2, Math.Ceiling(Math.Log(this.Size) / Math.Log(2)))); Debug.Assert(cPP_type_size % 8 == 0); this.CppType = String.Format("std::int{0}_t", cPP_type_size); this.CaptureType = String.Format("std::int{0}_t", this.CaptureSize); this.SignBitMask = ((ulong)Math.Pow(2, this.Size + (this.Offset - this.ByteAlginedOfffset) - 1)); bool hasNonStandardSize = Math.Abs((Math.Log(this.Size) / Math.Log(2)) % 1) >= (double.Epsilon * 100); if (hasNonStandardSize) { this.Mask &= (~this.SignBitMask); this.NeedsSignBitStuffing = true; } }
public void Visit(SignedIntegral s) { CreateDeclaration(); CreateBody(); }