abla/uint256

Generated from source.

Import with import "abla/uint256".

Source: abla/uint256/entry.ab

ablaU256NativeMul (extern)

noescape extern:"intrinsic" fun ablaU256NativeMul(): bool

Returns whether the target supports the wide multiply without a runtime helper.

ablaU256_fromU64 (extern)

noescape extern:"intrinsic" fun ablaU256_fromU64(value: u64): uint256

Zero-extends an unsigned 64-bit integer to 256 bits.

ablaU256_fromI64 (extern)

noescape extern:"intrinsic" fun ablaU256_fromI64(value: i64): uint256

Sign-extends a signed 64-bit integer to 256 bits.

ablaU256_toU64 (extern)

noescape extern:"intrinsic" fun ablaU256_toU64(value: uint256): u64

Returns the low 64 bits of the input.

ablaU256_not (extern)

noescape extern:"intrinsic" fun ablaU256_not(value: uint256): uint256

Returns the input with every bit flipped.

ablaU256_add (extern)

noescape extern:"intrinsic" fun ablaU256_add(a: uint256, b: uint256): uint256

Returns the sum modulo 2^256.

ablaU256_sub (extern)

noescape extern:"intrinsic" fun ablaU256_sub(a: uint256, b: uint256): uint256

Returns the difference modulo 2^256.

ablaU256_mul (extern)

noescape extern:"intrinsic" fun ablaU256_mul(a: uint256, b: uint256): uint256

Returns the product modulo 2^256.

ablaU256_udiv (extern)

noescape extern:"intrinsic" fun ablaU256_udiv(a: uint256, b: uint256): uint256

Returns the unsigned quotient for a nonzero divisor.

ablaU256_urem (extern)

noescape extern:"intrinsic" fun ablaU256_urem(a: uint256, b: uint256): uint256

Returns the unsigned remainder for a nonzero divisor.

ablaU256_and (extern)

noescape extern:"intrinsic" fun ablaU256_and(a: uint256, b: uint256): uint256

Returns the bitwise AND of the operands.

ablaU256_or (extern)

noescape extern:"intrinsic" fun ablaU256_or(a: uint256, b: uint256): uint256

Returns the bitwise OR of the operands.

ablaU256_xor (extern)

noescape extern:"intrinsic" fun ablaU256_xor(a: uint256, b: uint256): uint256

Returns the bitwise XOR of the operands.

ablaU256_shl (extern)

noescape extern:"intrinsic" fun ablaU256_shl(a: uint256, count: u32): uint256

Returns the bit pattern shifted left by a count below 256.

ablaU256_lshr (extern)

noescape extern:"intrinsic" fun ablaU256_lshr(a: uint256, count: u32): uint256

Returns the bit pattern shifted right with zero fill by a count below 256.

ablaU256_eq (extern)

noescape extern:"intrinsic" fun ablaU256_eq(a: uint256, b: uint256): bool

Returns whether the two bit patterns are equal.

ablaU256_lt (extern)

noescape extern:"intrinsic" fun ablaU256_lt(a: uint256, b: uint256): bool

Returns whether the first bit pattern is smaller when both are interpreted as unsigned.

ablaU256NarrowTarget (extern)

noescape extern:"intrinsic" fun ablaU256NarrowTarget(): bool

Returns whether the target uses 32-bit pointers outside WebAssembly.

uint256 (fun)

@inline fun uint256(value: int): uint256

As every widening: a signed source sign-extends, so uint256(-1) is the largest value, as u64(-1) is.

uint256 (fun)

@inline fun uint256(value: i32): uint256

As every widening: a signed source sign-extends, so uint256(-1) is the largest value, as u64(-1) is.

uint256 (fun)

@inline fun uint256(value: i16): uint256

As every widening: a signed source sign-extends, so uint256(-1) is the largest value, as u64(-1) is.

uint256 (fun)

@inline fun uint256(value: i8): uint256

As every widening: a signed source sign-extends, so uint256(-1) is the largest value, as u64(-1) is.

uint256 (fun)

@inline fun uint256(value: u64): uint256

As every widening: a signed source sign-extends, so uint256(-1) is the largest value, as u64(-1) is.

uint256 (fun)

@inline fun uint256(value: u32): uint256

As every widening: a signed source sign-extends, so uint256(-1) is the largest value, as u64(-1) is.

uint256 (fun)

@inline fun uint256(value: u16): uint256

As every widening: a signed source sign-extends, so uint256(-1) is the largest value, as u64(-1) is.

uint256 (fun)

@inline fun uint256(value: u8): uint256

As every widening: a signed source sign-extends, so uint256(-1) is the largest value, as u64(-1) is.

uint256Words (fun)

fun uint256Words(w7: u32, w6: u32, w5: u32, w4: u32, w3: u32, w2: u32, w1: u32, w0: u32): uint256

Eight words, most significant first: how to write a constant that doesn't fit an int.

uint256Max (fun)

@inline fun uint256Max(): uint256

2^256 - 1.

uint256OrNull (fun)

fun uint256OrNull(value: int): uint256?

Refuses what's below zero, where uint256(value) would extend the sign.

uint256Equal (fun)

@inline fun uint256Equal(a: uint256, b: uint256): bool

What the compiler calls for ==, < and the rest (bootstrapLowerArithmetic), and for "$x".

uint256NotEqual (fun)

@inline fun uint256NotEqual(a: uint256, b: uint256): bool

What the compiler calls for ==, < and the rest (bootstrapLowerArithmetic), and for "$x".

uint256Less (fun)

@inline fun uint256Less(a: uint256, b: uint256): bool

What the compiler calls for ==, < and the rest (bootstrapLowerArithmetic), and for "$x".

uint256LessEqual (fun)

@inline fun uint256LessEqual(a: uint256, b: uint256): bool

What the compiler calls for ==, < and the rest (bootstrapLowerArithmetic), and for "$x".

uint256Greater (fun)

@inline fun uint256Greater(a: uint256, b: uint256): bool

What the compiler calls for ==, < and the rest (bootstrapLowerArithmetic), and for "$x".

uint256GreaterEqual (fun)

@inline fun uint256GreaterEqual(a: uint256, b: uint256): bool

What the compiler calls for ==, < and the rest (bootstrapLowerArithmetic), and for "$x".

uint256Text (fun)

fun uint256Text(value: uint256): string

What the compiler calls for ==, < and the rest (bootstrapLowerArithmetic), and for "$x".

uint256.plus (extension fun)

@inline operator fun uint256.plus(other: uint256): uint256

Adds other to this value modulo 2^256.

uint256.minus (extension fun)

@inline operator fun uint256.minus(other: uint256): uint256

Adds other to this value modulo 2^256.

uint256.unaryMinus (extension fun)

@inline operator fun uint256.unaryMinus(): uint256

Adds other to this value modulo 2^256.

uint256.and (extension fun)

@inline operator fun uint256.and(other: uint256): uint256

Returns the intersection of this 256-bit pattern and other.

uint256.or (extension fun)

@inline operator fun uint256.or(other: uint256): uint256

Returns the union of this 256-bit pattern and other.

uint256.xor (extension fun)

@inline operator fun uint256.xor(other: uint256): uint256

Returns the union of this 256-bit pattern and other.

uint256.inv (extension fun)

@inline operator fun uint256.inv(): uint256

Returns the union of this 256-bit pattern and other.

uint256.times (extension fun)

@inline operator fun uint256.times(other: uint256): uint256

Multiplies this value by other modulo 2^256.

uint256.div (extension fun)

@inline operator fun uint256.div(other: uint256): uint256

Returns the unsigned quotient and panics for a zero divisor.

uint256.rem (extension fun)

@inline operator fun uint256.rem(other: uint256): uint256

Returns the unsigned remainder and panics for a zero divisor.

uint256ShiftLeft (fun)

fun uint256ShiftLeft(value: uint256, count: int): uint256

As every width's: a count that's negative or at least the width gives zero.

uint256ShiftRight (fun)

fun uint256ShiftRight(value: uint256, count: int): uint256

Returns the value shifted right with zero fill, or zero for a count outside 0 through 255.

uint256.shl (extension fun)

@inline operator fun uint256.shl(count: int): uint256

Returns the value shifted left, or zero for a count outside 0 through 255.

uint256.shr (extension fun)

@inline operator fun uint256.shr(count: int): uint256

Returns the value shifted right with zero fill, or zero for a count outside 0 through 255.

uint256.shl (extension fun)

@inline operator fun uint256.shl(count: i32): uint256

Returns the value shifted left, or zero for a count outside 0 through 255.

uint256.shr (extension fun)

@inline operator fun uint256.shr(count: i32): uint256

Returns the value shifted right with zero fill, or zero for a count outside 0 through 255.

uint256.shl (extension fun)

@inline operator fun uint256.shl(count: i16): uint256

Returns the value shifted left, or zero for a count outside 0 through 255.

uint256.shr (extension fun)

@inline operator fun uint256.shr(count: i16): uint256

Returns the value shifted right with zero fill, or zero for a count outside 0 through 255.

uint256.shl (extension fun)

@inline operator fun uint256.shl(count: i8): uint256

Returns the value shifted left, or zero for a count outside 0 through 255.

uint256.shr (extension fun)

@inline operator fun uint256.shr(count: i8): uint256

Returns the value shifted right with zero fill, or zero for a count outside 0 through 255.

uint256.shl (extension fun)

@inline operator fun uint256.shl(count: u64): uint256

Returns the value shifted left, or zero for a count outside 0 through 255.

uint256.shr (extension fun)

@inline operator fun uint256.shr(count: u64): uint256

Returns the value shifted right with zero fill, or zero for a count outside 0 through 255.

uint256.shl (extension fun)

@inline operator fun uint256.shl(count: u32): uint256

Returns the value shifted left, or zero for a count outside 0 through 255.

uint256.shr (extension fun)

@inline operator fun uint256.shr(count: u32): uint256

Returns the value shifted right with zero fill, or zero for a count outside 0 through 255.

uint256.shl (extension fun)

@inline operator fun uint256.shl(count: u16): uint256

Returns the value shifted left, or zero for a count outside 0 through 255.

uint256.shr (extension fun)

@inline operator fun uint256.shr(count: u16): uint256

Returns the value shifted right with zero fill, or zero for a count outside 0 through 255.

uint256.shl (extension fun)

@inline operator fun uint256.shl(count: u8): uint256

Returns the value shifted left, or zero for a count outside 0 through 255.

uint256.shr (extension fun)

@inline operator fun uint256.shr(count: u8): uint256

Returns the value shifted right with zero fill, or zero for a count outside 0 through 255.

uint256.shl (extension fun)

fun uint256.shl(count: uint256): uint256

The EVM's SHL and SHR take a 256-bit count.

uint256.shr (extension fun)

fun uint256.shr(count: uint256): uint256

Returns the value shifted right with zero fill, or zero for a count outside 0 through 255.

uint256.isZero (extension fun)

@inline fun uint256.isZero(): bool

Returns true if every bit of this value is zero.

uint256.bit (extension fun)

fun uint256.bit(index: int): bool

Bit index, the least significant being 0; beyond the width, 0.

uint256.bitLength (extension fun)

fun uint256.bitLength(): int

The fewest bits that hold it: 0 for zero.

uint256.addChecked (extension fun)

fun uint256.addChecked(other: uint256): uint256?

The sum, or null if it doesn't fit.

uint256.subChecked (extension fun)

fun uint256.subChecked(other: uint256): uint256?

The difference, or null below zero.

uint256.mulChecked (extension fun)

fun uint256.mulChecked(other: uint256): uint256?

The product, or null if it doesn't fit.

uint256.toU64 (extension fun)

@inline fun uint256.toU64(): u64

Narrowing as every width's does: keeps the low bits.

uint256.toInt (extension fun)

@inline fun uint256.toInt(): int

Narrowing as every width's does: keeps the low bits.

uint256.toU32 (extension fun)

@inline fun uint256.toU32(): u32

Narrowing as every width's does: keeps the low bits.

uint256.toU16 (extension fun)

@inline fun uint256.toU16(): u16

Narrowing as every width's does: keeps the low bits.

uint256.toU8 (extension fun)

@inline fun uint256.toU8(): u8

Narrowing as every width's does: keeps the low bits.

uint256.toU64OrNull (extension fun)

fun uint256.toU64OrNull(): u64?

Or null if it doesn't fit.

uint256.toIntOrNull (extension fun)

fun uint256.toIntOrNull(): int?

Returns the value as int, or null if it cannot be represented.

uint256.toU32OrNull (extension fun)

fun uint256.toU32OrNull(): u32?

Returns the value as u32, or null if it cannot be represented.

uint256.toU16OrNull (extension fun)

fun uint256.toU16OrNull(): u16?

Returns the value as u16, or null if it cannot be represented.

uint256.toU8OrNull (extension fun)

fun uint256.toU8OrNull(): u8?

Returns the value as u8, or null if it cannot be represented.

uint256.toDecimal (extension fun)

fun uint256.toDecimal(): string

In decimal, as "$x" writes it.

uint256.toHex (extension fun)

fun uint256.toHex(): string

In hex with 0x, in lower case, and no leading zeros: a JSON-RPC quantity.

uint256FromDecimal (fun)

fun uint256FromDecimal(text: string): uint256?

Digits only: no sign, space or point; leading zeros are allowed. Null if it isn't that, or doesn't fit.

uint256FromHex (fun)

fun uint256FromHex(text: string): uint256?

With or without 0x, in either case. Null with no digits, on anything else, or if it doesn't fit.

uint256.toBytes (extension fun)

fun uint256.toBytes(): string

32 bytes, big-endian: an EVM word.

uint256FromBytes (fun)

fun uint256FromBytes(bytes: string): uint256?

Big-endian bytes, fewer than 32 padding on the left. Null above 32.

uint256.toBytesLittleEndian (extension fun)

fun uint256.toBytesLittleEndian(): string

32 bytes, little-endian: the least significant byte first.

uint256FromBytesLittleEndian (fun)

fun uint256FromBytesLittleEndian(bytes: string): uint256?

Little-endian bytes, fewer than 32 padding at the top. Null above 32.

Built from Abla v0.2.79 source ba5d6b7d. Examples and generated signatures follow that source revision.