move-stackless-bytecode 0.3.2

Move stackless bytecode
Documentation
============ initial translation from Move ================

[variant baseline]
public fun Test::update<#0>($t0|x: #0) {
     var $t1: #0
     var $t2: address
     var $t3: &mut Test::A<#0, #0>
     var $t4: &mut #0
  0: $t1 := move($t0)
  1: $t2 := 0x1
  2: $t3 := borrow_global<Test::A<#0, #0>>($t2)
  3: $t4 := borrow_field<Test::A<#0, #0>>.x1($t3)
  4: write_ref($t4, $t1)
  5: return ()
}


[variant baseline]
public fun Test::assert_assume_memory() {
  0: assume exists<Test::A<bool, u64>>(1)
  1: assert exists<Test::A<u64, bool>>(1)
  2: return ()
}


[variant baseline]
public fun Test::call_assert_assume_memory() {
  0: Test::assert_assume_memory()
  1: return ()
}


[variant baseline]
public fun Test::publish<#0>($t0|signer: &signer, $t1|x: Test::A<#0, u8>) {
     var $t2: &signer
     var $t3: Test::A<#0, u8>
  0: $t2 := move($t0)
  1: $t3 := move($t1)
  2: move_to<Test::A<#0, u8>>($t3, $t2)
  3: return ()
}


[variant baseline]
public fun Test::test<#0>(): bool {
     var $t0: address
     var $t1: bool
  0: $t0 := 0x1
  1: $t1 := exists<Test::A<u64, #0>>($t0)
  2: return $t1
}


[variant baseline]
public fun Test::update_caller() {
     var $t0: u8
  0: $t0 := 1
  1: Test::update<u8>($t0)
  2: return ()
}


[variant baseline]
public fun Test::update_ints() {
     var $t0: u64
     var $t1: address
     var $t2: &mut Test::A<u64, u128>
     var $t3: &mut u64
  0: $t0 := 22
  1: $t1 := 0x1
  2: $t2 := borrow_global<Test::A<u64, u128>>($t1)
  3: $t3 := borrow_field<Test::A<u64, u128>>.x1($t2)
  4: write_ref($t3, $t0)
  5: return ()
}

============ after pipeline `usage_analysis` ================

[variant baseline]
public fun Test::update<#0>($t0|x: #0) {
     var $t1: #0
     var $t2: address
     var $t3: &mut Test::A<#0, #0>
     var $t4: &mut #0
  0: $t1 := move($t0)
  1: $t2 := 0x1
  2: $t3 := borrow_global<Test::A<#0, #0>>($t2)
  3: $t4 := borrow_field<Test::A<#0, #0>>.x1($t3)
  4: write_ref($t4, $t1)
  5: return ()
}


[variant baseline]
public fun Test::assert_assume_memory() {
  0: assume exists<Test::A<bool, u64>>(1)
  1: assert exists<Test::A<u64, bool>>(1)
  2: return ()
}


[variant baseline]
public fun Test::call_assert_assume_memory() {
  0: Test::assert_assume_memory()
  1: return ()
}


[variant baseline]
public fun Test::publish<#0>($t0|signer: &signer, $t1|x: Test::A<#0, u8>) {
     var $t2: &signer
     var $t3: Test::A<#0, u8>
  0: $t2 := move($t0)
  1: $t3 := move($t1)
  2: move_to<Test::A<#0, u8>>($t3, $t2)
  3: return ()
}


[variant baseline]
public fun Test::test<#0>(): bool {
     var $t0: address
     var $t1: bool
  0: $t0 := 0x1
  1: $t1 := exists<Test::A<u64, #0>>($t0)
  2: return $t1
}


[variant baseline]
public fun Test::update_caller() {
     var $t0: u8
  0: $t0 := 1
  1: Test::update<u8>($t0)
  2: return ()
}


[variant baseline]
public fun Test::update_ints() {
     var $t0: u64
     var $t1: address
     var $t2: &mut Test::A<u64, u128>
     var $t3: &mut u64
  0: $t0 := 22
  1: $t1 := 0x1
  2: $t2 := borrow_global<Test::A<u64, u128>>($t1)
  3: $t3 := borrow_field<Test::A<u64, u128>>.x1($t2)
  4: write_ref($t3, $t0)
  5: return ()
}



********* Result of usage analysis *********


function Test::update [baseline] {
  accessed = {Test::A<#0, #0>}
  directly accessed = {Test::A<#0, #0>}
  modified = {Test::A<#0, #0>}
  directly modified = {Test::A<#0, #0>}
  assumed = {}
  directly assumed = {}
  asserted = {}
  directly asserted = {}
}
function Test::assert_assume_memory [baseline] {
  accessed = {Test::A<bool, u64>, Test::A<u64, bool>}
  directly accessed = {Test::A<bool, u64>, Test::A<u64, bool>}
  modified = {}
  directly modified = {}
  assumed = {Test::A<bool, u64>}
  directly assumed = {Test::A<bool, u64>}
  asserted = {Test::A<u64, bool>}
  directly asserted = {Test::A<u64, bool>}
}
function Test::call_assert_assume_memory [baseline] {
  accessed = {Test::A<bool, u64>, Test::A<u64, bool>}
  directly accessed = {}
  modified = {}
  directly modified = {}
  assumed = {Test::A<bool, u64>}
  directly assumed = {}
  asserted = {Test::A<u64, bool>}
  directly asserted = {}
}
function Test::publish [baseline] {
  accessed = {Test::A<#0, u8>}
  directly accessed = {Test::A<#0, u8>}
  modified = {Test::A<#0, u8>}
  directly modified = {Test::A<#0, u8>}
  assumed = {}
  directly assumed = {}
  asserted = {}
  directly asserted = {}
}
function Test::test [baseline] {
  accessed = {Test::A<u64, #0>}
  directly accessed = {Test::A<u64, #0>}
  modified = {}
  directly modified = {}
  assumed = {}
  directly assumed = {}
  asserted = {}
  directly asserted = {}
}
function Test::update_caller [baseline] {
  accessed = {Test::A<u8, u8>}
  directly accessed = {}
  modified = {Test::A<u8, u8>}
  directly modified = {}
  assumed = {}
  directly assumed = {}
  asserted = {}
  directly asserted = {}
}
function Test::update_ints [baseline] {
  accessed = {Test::A<u64, u128>}
  directly accessed = {Test::A<u64, u128>}
  modified = {Test::A<u64, u128>}
  directly modified = {Test::A<u64, u128>}
  assumed = {}
  directly assumed = {}
  asserted = {}
  directly asserted = {}
}