Search by name, SuiNS, address, digest, object ID, coin type or checkpoint.

API

table_queue

Module0x63e7…bd68
Move path
0xbde4…f47d::table_queue
Functions
1212 public, 0 entry
Structs
1
Friend modules
None
table_queue

Bytecode320 lines

The on-chain disassembly. Offsets are bytecode positions within each function.

// Move bytecode v6
module bde4ba4c2e274a60ce15c1cfff9e5c42e41654ac8b6d906a57efa4bd3c29f47d.table_queue {
use 0000000000000000000000000000000000000000000000000000000000000002::table;
use 0000000000000000000000000000000000000000000000000000000000000002::tx_context;
 
struct TableQueue<phantom Ty0: store> has store {
head: u64,
tail: u64,
contents: Table<u64, Ty0>
}
 
public empty<Ty0: store>(Arg0: &mut TxContext): TableQueue<Ty0> {
B0:
0LdU64(0)
1LdU64(0)
2MoveLoc[0](Arg0: &mut TxContext)
3Call table::new<u64, Ty0>(&mut TxContext): Table<u64, Ty0>
4PackGeneric[0](TableQueue<Ty0>)
5Ret
}
 
public length<Ty0: store>(Arg0: &TableQueue<Ty0>): u64 {
B0:
0MoveLoc[0](Arg0: &TableQueue<Ty0>)
1ImmBorrowFieldGeneric[0](TableQueue.contents: Table<u64, Ty0>)
2Call table::length<u64, Ty0>(&Table<u64, Ty0>): u64
3Ret
}
 
public is_empty<Ty0: store>(Arg0: &TableQueue<Ty0>): bool {
B0:
0MoveLoc[0](Arg0: &TableQueue<Ty0>)
1ImmBorrowFieldGeneric[0](TableQueue.contents: Table<u64, Ty0>)
2Call table::is_empty<u64, Ty0>(&Table<u64, Ty0>): bool
3Ret
}
 
public push_back<Ty0: store>(Arg0: &mut TableQueue<Ty0>, Arg1: Ty0) {
L2: loc0: u64
B0:
0CopyLoc[0](Arg0: &mut TableQueue<Ty0>)
1ImmBorrowFieldGeneric[1](TableQueue.tail: u64)
2ReadRef
3StLoc[2](loc0: u64)
4CopyLoc[0](Arg0: &mut TableQueue<Ty0>)
5ImmBorrowFieldGeneric[1](TableQueue.tail: u64)
6ReadRef
7LdU64(1)
8Add
9CopyLoc[0](Arg0: &mut TableQueue<Ty0>)
10MutBorrowFieldGeneric[1](TableQueue.tail: u64)
11WriteRef
12MoveLoc[0](Arg0: &mut TableQueue<Ty0>)
13MutBorrowFieldGeneric[0](TableQueue.contents: Table<u64, Ty0>)
14MoveLoc[2](loc0: u64)
15MoveLoc[1](Arg1: Ty0)
16Call table::add<u64, Ty0>(&mut Table<u64, Ty0>, u64, Ty0)
17Ret
}
 
public borrow_front<Ty0: store>(Arg0: &TableQueue<Ty0>): &Ty0 {
B0:
0CopyLoc[0](Arg0: &TableQueue<Ty0>)
1Call length<Ty0>(&TableQueue<Ty0>): u64
2LdU64(0)
3Gt
4BrFalse(6)
B1:
5Branch(10)
B2:
6MoveLoc[0](Arg0: &TableQueue<Ty0>)
7Pop
8LdConst[0](u64: 0)
9Abort
B3:
10CopyLoc[0](Arg0: &TableQueue<Ty0>)
11ImmBorrowFieldGeneric[0](TableQueue.contents: Table<u64, Ty0>)
12MoveLoc[0](Arg0: &TableQueue<Ty0>)
13ImmBorrowFieldGeneric[2](TableQueue.head: u64)
14ReadRef
15Call table::borrow<u64, Ty0>(&Table<u64, Ty0>, u64): &Ty0
16Ret
}
 
public borrow_front_mut<Ty0: store>(Arg0: &mut TableQueue<Ty0>): &mut Ty0 {
B0:
0CopyLoc[0](Arg0: &mut TableQueue<Ty0>)
1FreezeRef
2Call length<Ty0>(&TableQueue<Ty0>): u64
3LdU64(0)
4Gt
5BrFalse(7)
B1:
6Branch(11)
B2:
7MoveLoc[0](Arg0: &mut TableQueue<Ty0>)
8Pop
9LdConst[0](u64: 0)
10Abort
B3:
11CopyLoc[0](Arg0: &mut TableQueue<Ty0>)
12MutBorrowFieldGeneric[0](TableQueue.contents: Table<u64, Ty0>)
13MoveLoc[0](Arg0: &mut TableQueue<Ty0>)
14ImmBorrowFieldGeneric[2](TableQueue.head: u64)
15ReadRef
16Call table::borrow_mut<u64, Ty0>(&mut Table<u64, Ty0>, u64): &mut Ty0
17Ret
}
 
public pop_front<Ty0: store>(Arg0: &mut TableQueue<Ty0>): Ty0 {
L1: loc0: u64
B0:
0CopyLoc[0](Arg0: &mut TableQueue<Ty0>)
1FreezeRef
2Call length<Ty0>(&TableQueue<Ty0>): u64
3LdU64(0)
4Gt
5BrFalse(7)
B1:
6Branch(11)
B2:
7MoveLoc[0](Arg0: &mut TableQueue<Ty0>)
8Pop
9LdConst[0](u64: 0)
10Abort
B3:
11CopyLoc[0](Arg0: &mut TableQueue<Ty0>)
12ImmBorrowFieldGeneric[2](TableQueue.head: u64)
13ReadRef
14StLoc[1](loc0: u64)
15CopyLoc[0](Arg0: &mut TableQueue<Ty0>)
16ImmBorrowFieldGeneric[2](TableQueue.head: u64)
17ReadRef
18LdU64(1)
19Add
20CopyLoc[0](Arg0: &mut TableQueue<Ty0>)
21MutBorrowFieldGeneric[2](TableQueue.head: u64)
22WriteRef
23MoveLoc[0](Arg0: &mut TableQueue<Ty0>)
24MutBorrowFieldGeneric[0](TableQueue.contents: Table<u64, Ty0>)
25MoveLoc[1](loc0: u64)
26Call table::remove<u64, Ty0>(&mut Table<u64, Ty0>, u64): Ty0
27Ret
}
 
public destroy_empty<Ty0: store>(Arg0: TableQueue<Ty0>) {
L1: loc0: Table<u64, Ty0>
B0:
0ImmBorrowLoc[0](Arg0: TableQueue<Ty0>)
1Call length<Ty0>(&TableQueue<Ty0>): u64
2LdU64(0)
3Eq
4BrFalse(6)
B1:
5Branch(8)
B2:
6LdConst[1](u64: 1)
7Abort
B3:
8MoveLoc[0](Arg0: TableQueue<Ty0>)
9UnpackGeneric[0](TableQueue<Ty0>)
10StLoc[1](loc0: Table<u64, Ty0>)
11Pop
12Pop
13MoveLoc[1](loc0: Table<u64, Ty0>)
14Call table::destroy_empty<u64, Ty0>(Table<u64, Ty0>)
15Ret
}
 
public head<Ty0: store>(Arg0: &TableQueue<Ty0>): u64 {
B0:
0CopyLoc[0](Arg0: &TableQueue<Ty0>)
1Call length<Ty0>(&TableQueue<Ty0>): u64
2LdU64(0)
3Gt
4BrFalse(6)
B1:
5Branch(10)
B2:
6MoveLoc[0](Arg0: &TableQueue<Ty0>)
7Pop
8LdConst[0](u64: 0)
9Abort
B3:
10MoveLoc[0](Arg0: &TableQueue<Ty0>)
11ImmBorrowFieldGeneric[2](TableQueue.head: u64)
12ReadRef
13Ret
}
 
public tail<Ty0: store>(Arg0: &TableQueue<Ty0>): u64 {
B0:
0CopyLoc[0](Arg0: &TableQueue<Ty0>)
1Call length<Ty0>(&TableQueue<Ty0>): u64
2LdU64(0)
3Gt
4BrFalse(6)
B1:
5Branch(10)
B2:
6MoveLoc[0](Arg0: &TableQueue<Ty0>)
7Pop
8LdConst[0](u64: 0)
9Abort
B3:
10MoveLoc[0](Arg0: &TableQueue<Ty0>)
11ImmBorrowFieldGeneric[1](TableQueue.tail: u64)
12ReadRef
13Ret
}
 
public borrow<Ty0: store>(Arg0: &TableQueue<Ty0>, Arg1: u64): &Ty0 {
L2: loc0: bool
B0:
0CopyLoc[0](Arg0: &TableQueue<Ty0>)
1Call length<Ty0>(&TableQueue<Ty0>): u64
2LdU64(0)
3Gt
4BrFalse(6)
B1:
5Branch(10)
B2:
6MoveLoc[0](Arg0: &TableQueue<Ty0>)
7Pop
8LdConst[0](u64: 0)
9Abort
B3:
10CopyLoc[1](Arg1: u64)
11CopyLoc[0](Arg0: &TableQueue<Ty0>)
12ImmBorrowFieldGeneric[2](TableQueue.head: u64)
13ReadRef
14Ge
15BrFalse(23)
B4:
16CopyLoc[1](Arg1: u64)
17CopyLoc[0](Arg0: &TableQueue<Ty0>)
18ImmBorrowFieldGeneric[1](TableQueue.tail: u64)
19ReadRef
20Lt
21StLoc[2](loc0: bool)
22Branch(25)
B5:
23LdFalse
24StLoc[2](loc0: bool)
B6:
25MoveLoc[2](loc0: bool)
26BrFalse(28)
B7:
27Branch(32)
B8:
28MoveLoc[0](Arg0: &TableQueue<Ty0>)
29Pop
30LdConst[0](u64: 0)
31Abort
B9:
32MoveLoc[0](Arg0: &TableQueue<Ty0>)
33ImmBorrowFieldGeneric[0](TableQueue.contents: Table<u64, Ty0>)
34MoveLoc[1](Arg1: u64)
35Call table::borrow<u64, Ty0>(&Table<u64, Ty0>, u64): &Ty0
36Ret
}
 
public borrow_mut<Ty0: store>(Arg0: &mut TableQueue<Ty0>, Arg1: u64): &mut Ty0 {
L2: loc0: bool
B0:
0CopyLoc[0](Arg0: &mut TableQueue<Ty0>)
1FreezeRef
2Call length<Ty0>(&TableQueue<Ty0>): u64
3LdU64(0)
4Gt
5BrFalse(7)
B1:
6Branch(11)
B2:
7MoveLoc[0](Arg0: &mut TableQueue<Ty0>)
8Pop
9LdConst[0](u64: 0)
10Abort
B3:
11CopyLoc[1](Arg1: u64)
12CopyLoc[0](Arg0: &mut TableQueue<Ty0>)
13ImmBorrowFieldGeneric[2](TableQueue.head: u64)
14ReadRef
15Ge
16BrFalse(24)
B4:
17CopyLoc[1](Arg1: u64)
18CopyLoc[0](Arg0: &mut TableQueue<Ty0>)
19ImmBorrowFieldGeneric[1](TableQueue.tail: u64)
20ReadRef
21Lt
22StLoc[2](loc0: bool)
23Branch(26)
B5:
24LdFalse
25StLoc[2](loc0: bool)
B6:
26MoveLoc[2](loc0: bool)
27BrFalse(29)
B7:
28Branch(33)
B8:
29MoveLoc[0](Arg0: &mut TableQueue<Ty0>)
30Pop
31LdConst[0](u64: 0)
32Abort
B9:
33MoveLoc[0](Arg0: &mut TableQueue<Ty0>)
34MutBorrowFieldGeneric[0](TableQueue.contents: Table<u64, Ty0>)
35MoveLoc[1](Arg1: u64)
36Call table::borrow_mut<u64, Ty0>(&mut Table<u64, Ty0>, u64): &mut Ty0
37Ret
}
 
Constants [
0 => u64: 0
1 => u64: 1
]
}