move-stackless-bytecode 0.3.2

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

[variant baseline]
public fun Footprint::reassign_cond($t0|a: address, $t1|b: bool): address {
     var $t2: bool
     var $t3: address
     var $t4: u64
     var $t5: address
  0: $t2 := move($t1)
  1: if ($t2) goto 2 else goto 6
  2: label L0
  3: $t3 := 0x2
  4: $t0 := $t3
  5: goto 6
  6: label L2
  7: $t4 := 4
  8: destroy($t4)
  9: $t5 := move($t0)
 10: return $t5
}


[variant baseline]
public fun Footprint::reassign_constant($t0|a: address): address {
     var $t1: address
     var $t2: address
  0: $t1 := 0x2
  1: $t0 := $t1
  2: $t2 := move($t0)
  3: return $t2
}


[variant baseline]
public fun Footprint::reassign_field($t0|s: &mut Footprint::S) {
     var $t1: address
     var $t2: &mut Footprint::S
     var $t3: &mut address
  0: $t1 := 0x2
  1: $t2 := move($t0)
  2: $t3 := borrow_field<Footprint::S>.f($t2)
  3: write_ref($t3, $t1)
  4: return ()
}


[variant baseline]
public fun Footprint::reassign_field_cond($t0|s: &mut Footprint::S, $t1|b: bool) {
     var $t2: bool
     var $t3: address
     var $t4: &mut Footprint::S
     var $t5: &mut address
     var $t6: &mut Footprint::S
  0: $t2 := move($t1)
  1: if ($t2) goto 2 else goto 8
  2: label L0
  3: $t3 := 0x2
  4: $t4 := move($t0)
  5: $t5 := borrow_field<Footprint::S>.f($t4)
  6: write_ref($t5, $t3)
  7: goto 12
  8: label L2
  9: $t6 := move($t0)
 10: destroy($t6)
 11: goto 12
 12: label L3
 13: return ()
}


[variant baseline]
public fun Footprint::reassign_other_param($t0|a1: address, $t1|a2: address): address {
     var $t2: address
     var $t3: address
  0: $t2 := move($t1)
  1: $t0 := $t2
  2: $t3 := move($t0)
  3: return $t3
}

============ after pipeline `read_write_set` ================

[variant baseline]
public fun Footprint::reassign_cond($t0|a: address, $t1|b: bool): address {
     var $t2: bool
     var $t3: address
     var $t4: u64
     var $t5: address
     # Accesses:
     # Formal(0): Read
     # Formal(1): Read
     #
     # Locals:
     # Ret(0): {0x2, Formal(0), }
     #
  0: $t2 := move($t1)
  1: if ($t2) goto 2 else goto 6
  2: label L0
  3: $t3 := 0x2
  4: $t0 := $t3
  5: goto 6
  6: label L2
  7: $t4 := 4
  8: destroy($t4)
  9: $t5 := move($t0)
 10: return $t5
}


[variant baseline]
public fun Footprint::reassign_constant($t0|a: address): address {
     var $t1: address
     var $t2: address
     # Accesses:
     #
     # Locals:
     # Ret(0): 0x2
     #
  0: $t1 := 0x2
  1: $t0 := $t1
  2: $t2 := move($t0)
  3: return $t2
}


[variant baseline]
public fun Footprint::reassign_field($t0|s: &mut Footprint::S) {
     var $t1: address
     var $t2: &mut Footprint::S
     var $t3: &mut address
     # Accesses:
     # Formal(0): Read
     # Formal(0)/f: Write
     #
     # Locals:
     # Formal(0)/f: 0x2
     #
  0: $t1 := 0x2
  1: $t2 := move($t0)
  2: $t3 := borrow_field<Footprint::S>.f($t2)
  3: write_ref($t3, $t1)
  4: return ()
}


[variant baseline]
public fun Footprint::reassign_field_cond($t0|s: &mut Footprint::S, $t1|b: bool) {
     var $t2: bool
     var $t3: address
     var $t4: &mut Footprint::S
     var $t5: &mut address
     var $t6: &mut Footprint::S
     # Accesses:
     # Formal(0): Read
     # Formal(0)/f: Write
     # Formal(1): Read
     #
     # Locals:
     # Formal(0)/f: {0x2, Formal(0)/f, }
     #
  0: $t2 := move($t1)
  1: if ($t2) goto 2 else goto 8
  2: label L0
  3: $t3 := 0x2
  4: $t4 := move($t0)
  5: $t5 := borrow_field<Footprint::S>.f($t4)
  6: write_ref($t5, $t3)
  7: goto 12
  8: label L2
  9: $t6 := move($t0)
 10: destroy($t6)
 11: goto 12
 12: label L3
 13: return ()
}


[variant baseline]
public fun Footprint::reassign_other_param($t0|a1: address, $t1|a2: address): address {
     var $t2: address
     var $t3: address
     # Accesses:
     # Formal(1): Read
     #
     # Locals:
     # Ret(0): Formal(1)
     #
  0: $t2 := move($t1)
  1: $t0 := $t2
  2: $t3 := move($t0)
  3: return $t3
}