aboutsummaryrefslogtreecommitdiff
path: root/lib/std/math/big.zig
AgeCommit message (Collapse)Author
2020-12-31Year++Frank Denis
2020-11-19Add builtin.Signedness, use it instead of is_signedTadeo Kondrak
2020-10-17Make std.meta.Int accept a signedness parameterJan Prudil
2020-09-03update uses of deprecated type field accessVexu
2020-08-20add license header to all std lib filesAndrew Kelley
add SPDX license identifier copyright ownership is zig contributors
2020-05-01rework std.math.big.IntAndrew Kelley
Now there are 3 types: * std.math.big.int.Const - the memory is immutable, only stores limbs and is_positive - all methods operating on constant data go here * std.math.big.int.Mutable - the memory is mutable, stores capacity in addition to limbs and is_positive - methods here have some Mutable parameters and some Const parameters. These methods expect callers to pre-calculate the amount of resources required, and asserts that the resources are available. * std.math.big.int.Managed - the memory is mutable and additionally stores an allocator. - methods here perform the resource calculations for the programmer. - this is the high level abstraction from before Each of these 3 types can be converted to the other ones. You can see the use case for this in the self-hosted compiler, where we only store limbs, and construct the big ints as needed. This gets rid of the hack where the allocator was optional and the notion of "fixed" versions of the struct. Such things are now modeled with the `big.int.Const` type.
2019-09-25mv std/ lib/Andrew Kelley
that's all this commit does. further commits will fix cli flags and such. see #2221