Remove FPass[CV]Nop opcodes
[hiphop-php.git] / hphp / hack / test / semdiff / attributes_on_params.1.hhas
blob630b76e788ee77c50fa6b759d98fc6d9ec5b38d1
1 #starts here
3 .main {
4   DefCls 0
5   FPushFuncD 0 "run"
6   FCall 0
7   PopR
8   Int 1
9   RetC
12 .function <"" N  > f(["A1"("""a:0:{}""")]$p1, ["A2"("""a:0:{}""")]$p2) {
13   Null
14   RetC
17 .function <"" N  > test($caption, $parameters, $i, $attribute) {
18   .declvars $p;
19   BaseL $parameters Warn
20   QueryM 0 CGet EL:$i
21   FPushObjMethodD 1 "getAttribute" NullThrows
22   CGetL $attribute
23   FCall 1
24   UnboxR
25   SetL $p
26   PopC
27   String ":"
28   CGetL2 $caption
29   Concat
30   IssetL $p
31   JmpZ L0
32   String "SET"
33   Jmp L1
34 L0:
35   String "NOTSET"
36 L1:
37   Concat
38   Print
39   PopC
40   String "\\n"
41   Print
42   PopC
43   Null
44   RetC
47 .function <"" N  > run() {
48   .declvars $cls $ctor $func;
49   FPushCtorD 1 "ReflectionClass"
50   String "A"
51   FCall 1
52   PopR
53   SetL $cls
54   PopC
55   CGetL $cls
56   FPushObjMethodD 0 "getConstructor" NullThrows
57   FCall 0
58   UnboxR
59   SetL $ctor
60   PopC
61   FPushFuncD 4 "test"
62   String "1. existing attribute"
63   CGetL $ctor
64   FPushObjMethodD 0 "getParameters" NullThrows
65   FCall 0
66   UnboxR
67   Int 0
68   String "Annotation"
69   FCall 4
70   PopR
71   FPushFuncD 4 "test"
72   String "2. missing attribute"
73   CGetL $ctor
74   FPushObjMethodD 0 "getParameters" NullThrows
75   FCall 0
76   UnboxR
77   Int 0
78   String "Annotation-missing"
79   FCall 4
80   PopR
81   FPushCtorD 1 "ReflectionFunction"
82   String "f"
83   FCall 1
84   PopR
85   SetL $func
86   PopC
87   FPushFuncD 4 "test"
88   String "3. existing attribute"
89   CGetL $func
90   FPushObjMethodD 0 "getParameters" NullThrows
91   FCall 0
92   UnboxR
93   Int 0
94   String "A1"
95   FCall 4
96   PopR
97   FPushFuncD 4 "test"
98   String "4. missing attribute"
99   CGetL $func
100   FPushObjMethodD 0 "getParameters" NullThrows
101   FCall 0
102   UnboxR
103   Int 0
104   String "A1-missing"
105   FCall 4
106   PopR
107   FPushFuncD 4 "test"
108   String "5. existing attribute"
109   CGetL $func
110   FPushObjMethodD 0 "getParameters" NullThrows
111   FCall 0
112   UnboxR
113   Int 1
114   String "A2"
115   FCall 4
116   PopR
117   FPushFuncD 4 "test"
118   String "6. missing attribute"
119   CGetL $func
120   FPushObjMethodD 0 "getParameters" NullThrows
121   FCall 0
122   UnboxR
123   Int 1
124   String "A2-missing"
125   FCall 4
126   PopR
127   Null
128   RetC
131 .class A {
132   .method [public] <"" N  > __construct(["Annotation"("""a:0:{}""")]$property) {
133     Null
134     RetC
135   }
138 #ends here