| ... | @@ -3359,6 +3359,8 @@ pub const Value = extern union { | ... | @@ -3359,6 +3359,8 @@ pub const Value = extern union { |
| 3359 | } | 3359 | } |
| 3360 | | 3360 | |
| 3361 | pub fn intTrunc(val: Value, allocator: Allocator, signedness: std.builtin.Signedness, bits: u16) !Value { | 3361 | pub fn intTrunc(val: Value, allocator: Allocator, signedness: std.builtin.Signedness, bits: u16) !Value { |
| | 3362 | if (bits == 0) return Value.zero; |
| | 3363 | |
| 3362 | var val_space: Value.BigIntSpace = undefined; | 3364 | var val_space: Value.BigIntSpace = undefined; |
| 3363 | const val_bigint = val.toBigInt(&val_space); | 3365 | const val_bigint = val.toBigInt(&val_space); |
| 3364 | | 3366 | |