global statement removal: hphp/test [7/x]
[hiphop-php.git] / hphp / test / quick / asm_dvinit_fault.hhas
blob4ef596fd38200c648060edb7c4bbd9e6add5defa
2 # Try/catch in a DV initializer.
4 # HHVM doesn't generate code like this, but it's legal bytecode.
7 .main {
8   FPushFuncD 1 "var_dump"
9     FPushFuncD 0 "main"
10     FCall <> 0 1 "" - "" ""
11   FCall <> 1 1 "" - "" ""
12   PopC
13   Int 1
14   RetC
17 .function main($x = dv_init1, $y = dv_init2) {
18 main_entry:
19   CGetL $x
20   CGetL2 $y
21   Add
22   RetC
24 dv_init1:
25   Int 0
26   SetL $x
27   PopC
28 dv_init2:
29   .try {
30     .try {
31       Int 1
32       SetL $y
33       PopC
35       NewObjD "Exception"
36       Dup
37       FPushCtor 0
38       FCall <> 0 1 "" - "" ""
39       PopC
40       Throw
41     } .catch {
42       Int 4321
43       SetL $x
44       PopC
45       Throw
46     }
47   } .catch {
48     PopC
49     Jmp out_of_catch
50   }
52 out_of_catch:
53   Jmp main_entry