object_vec
Module0x40fc…5bb2
- Move path
- 0xed6c…9f32::object_vec
- Functions
- 1010 public, 0 entry
- Structs
- 1
- Friend modules
- None
object_vec
Bytecode145 lines
The on-chain disassembly. Offsets are bytecode positions within each function.
// Move bytecode v6
module ed6c6fe0732be937f4379bc0b471f0f6bfbe0e8741968009e0f01e6de3d59f32.object_vec {
use 0000000000000000000000000000000000000000000000000000000000000001::option;
use 0000000000000000000000000000000000000000000000000000000000000002::dynamic_object_field;
use 0000000000000000000000000000000000000000000000000000000000000002::object;
use 0000000000000000000000000000000000000000000000000000000000000002::tx_context;
struct ObjectVec<phantom Ty0: store + key> has store, key {
id: UID,
size: u64
}
public new<Ty0: store + key>(Arg0: &mut TxContext): ObjectVec<Ty0> {
B0:
0MoveLoc[0](Arg0: &mut TxContext)
1Call object::new(&mut TxContext): UID
2LdU64(0)
3PackGeneric[0](ObjectVec<Ty0>)
4Ret
}
public add<Ty0: store + key>(Arg0: &mut ObjectVec<Ty0>, Arg1: Ty0) {
B0:
0CopyLoc[0](Arg0: &mut ObjectVec<Ty0>)
1MutBorrowFieldGeneric[0](ObjectVec.id: UID)
2CopyLoc[0](Arg0: &mut ObjectVec<Ty0>)
3ImmBorrowFieldGeneric[1](ObjectVec.size: u64)
4ReadRef
5LdU64(1)
6Add
7MoveLoc[1](Arg1: Ty0)
8Call dynamic_object_field::add<u64, Ty0>(&mut UID, u64, Ty0)
9CopyLoc[0](Arg0: &mut ObjectVec<Ty0>)
10ImmBorrowFieldGeneric[1](ObjectVec.size: u64)
11ReadRef
12LdU64(1)
13Add
14MoveLoc[0](Arg0: &mut ObjectVec<Ty0>)
15MutBorrowFieldGeneric[1](ObjectVec.size: u64)
16WriteRef
17Ret
}
public borrow<Ty0: store + key>(Arg0: &ObjectVec<Ty0>, Arg1: u64): &Ty0 {
B0:
0MoveLoc[0](Arg0: &ObjectVec<Ty0>)
1ImmBorrowFieldGeneric[0](ObjectVec.id: UID)
2MoveLoc[1](Arg1: u64)
3Call dynamic_object_field::borrow<u64, Ty0>(&UID, u64): &Ty0
4Ret
}
public borrow_mut<Ty0: store + key>(Arg0: &mut ObjectVec<Ty0>, Arg1: u64): &mut Ty0 {
B0:
0MoveLoc[0](Arg0: &mut ObjectVec<Ty0>)
1MutBorrowFieldGeneric[0](ObjectVec.id: UID)
2MoveLoc[1](Arg1: u64)
3Call dynamic_object_field::borrow_mut<u64, Ty0>(&mut UID, u64): &mut Ty0
4Ret
}
public remove<Ty0: store + key>(Arg0: &mut ObjectVec<Ty0>, Arg1: u64): Ty0 {
L2: loc0: Ty0
B0:
0CopyLoc[0](Arg0: &mut ObjectVec<Ty0>)
1MutBorrowFieldGeneric[0](ObjectVec.id: UID)
2MoveLoc[1](Arg1: u64)
3Call dynamic_object_field::remove<u64, Ty0>(&mut UID, u64): Ty0
4StLoc[2](loc0: Ty0)
5CopyLoc[0](Arg0: &mut ObjectVec<Ty0>)
6ImmBorrowFieldGeneric[1](ObjectVec.size: u64)
7ReadRef
8LdU64(1)
9Sub
10MoveLoc[0](Arg0: &mut ObjectVec<Ty0>)
11MutBorrowFieldGeneric[1](ObjectVec.size: u64)
12WriteRef
13MoveLoc[2](loc0: Ty0)
14Ret
}
public contains<Ty0: store + key>(Arg0: &ObjectVec<Ty0>, Arg1: u64): bool {
B0:
0MoveLoc[0](Arg0: &ObjectVec<Ty0>)
1ImmBorrowFieldGeneric[0](ObjectVec.id: UID)
2MoveLoc[1](Arg1: u64)
3Call dynamic_object_field::exists_<u64>(&UID, u64): bool
4Ret
}
public length<Ty0: store + key>(Arg0: &ObjectVec<Ty0>): u64 {
B0:
0MoveLoc[0](Arg0: &ObjectVec<Ty0>)
1ImmBorrowFieldGeneric[1](ObjectVec.size: u64)
2ReadRef
3Ret
}
public is_empty<Ty0: store + key>(Arg0: &ObjectVec<Ty0>): bool {
B0:
0MoveLoc[0](Arg0: &ObjectVec<Ty0>)
1ImmBorrowFieldGeneric[1](ObjectVec.size: u64)
2ReadRef
3LdU64(0)
4Eq
5Ret
}
public destroy_empty<Ty0: store + key>(Arg0: ObjectVec<Ty0>) {
L1: loc0: UID
L2: loc1: u64
B0:
0MoveLoc[0](Arg0: ObjectVec<Ty0>)
1UnpackGeneric[0](ObjectVec<Ty0>)
2StLoc[2](loc1: u64)
3StLoc[1](loc0: UID)
4MoveLoc[2](loc1: u64)
5LdU64(0)
6Eq
7BrFalse(9)
B1:
8Branch(11)
B2:
9LdConst[0](u64: 524296)
10Abort
B3:
11MoveLoc[1](loc0: UID)
12Call object::delete(UID)
13Ret
}
public value_id<Ty0: store + key>(Arg0: &ObjectVec<Ty0>, Arg1: u64): Option<ID> {
B0:
0MoveLoc[0](Arg0: &ObjectVec<Ty0>)
1ImmBorrowFieldGeneric[0](ObjectVec.id: UID)
2MoveLoc[1](Arg1: u64)
3Call dynamic_object_field::id<u64>(&UID, u64): Option<ID>
4Ret
}
Constants [
0 => u64: 524296
]
}