summaryrefslogtreecommitdiff
path: root/vaporize/tests/ex32.vaporm
blob: 85ecf13609a1fe6f0c06467e0b398ce1d6b0872c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
func Main [in 0, out 0, local 0]
  $t0 = HeapAllocZ(4)
  [$t0] = :functable_A
  $t1 = [$t0]
  $t2 = [$t1]
  $a0 = $t0
  $a1 = 12
  call $t2
  $t1 = $v0
  PrintIntS($t1)
  ret

const functable_A
   :A_foo

func A_foo [in 0, out 0, local 1]
  local[0] = $s0
  $t0 = $a0
  $s0 = $a1
  $v0 = $s0
  $s0 = local[0]
  ret