Fri, 21 Feb 2014 17:58:33 +0530
8033745: Reflect upon Nashorn reflection
Reviewed-by: ahgross, attila, jlaskey
aoqi@0 | 1 | { |
aoqi@0 | 2 | "type": "Program", |
aoqi@0 | 3 | "body": [ |
aoqi@0 | 4 | { |
aoqi@0 | 5 | "type": "ExpressionStatement", |
aoqi@0 | 6 | "expression": { |
aoqi@0 | 7 | "type": "MemberExpression", |
aoqi@0 | 8 | "object": { |
aoqi@0 | 9 | "type": "Identifier", |
aoqi@0 | 10 | "name": "a" |
aoqi@0 | 11 | }, |
aoqi@0 | 12 | "property": { |
aoqi@0 | 13 | "type": "Literal", |
aoqi@0 | 14 | "value": 3 |
aoqi@0 | 15 | }, |
aoqi@0 | 16 | "computed": true |
aoqi@0 | 17 | } |
aoqi@0 | 18 | } |
aoqi@0 | 19 | ] |
aoqi@0 | 20 | } |
aoqi@0 | 21 | { |
aoqi@0 | 22 | "type": "Program", |
aoqi@0 | 23 | "body": [ |
aoqi@0 | 24 | { |
aoqi@0 | 25 | "type": "ExpressionStatement", |
aoqi@0 | 26 | "expression": { |
aoqi@0 | 27 | "type": "MemberExpression", |
aoqi@0 | 28 | "object": { |
aoqi@0 | 29 | "type": "Identifier", |
aoqi@0 | 30 | "name": "a" |
aoqi@0 | 31 | }, |
aoqi@0 | 32 | "property": { |
aoqi@0 | 33 | "type": "Identifier", |
aoqi@0 | 34 | "name": "b" |
aoqi@0 | 35 | }, |
aoqi@0 | 36 | "computed": true |
aoqi@0 | 37 | } |
aoqi@0 | 38 | } |
aoqi@0 | 39 | ] |
aoqi@0 | 40 | } |
aoqi@0 | 41 | { |
aoqi@0 | 42 | "type": "Program", |
aoqi@0 | 43 | "body": [ |
aoqi@0 | 44 | { |
aoqi@0 | 45 | "type": "ExpressionStatement", |
aoqi@0 | 46 | "expression": { |
aoqi@0 | 47 | "type": "MemberExpression", |
aoqi@0 | 48 | "object": { |
aoqi@0 | 49 | "type": "Identifier", |
aoqi@0 | 50 | "name": "a" |
aoqi@0 | 51 | }, |
aoqi@0 | 52 | "property": { |
aoqi@0 | 53 | "type": "Literal", |
aoqi@0 | 54 | "value": "foo" |
aoqi@0 | 55 | }, |
aoqi@0 | 56 | "computed": true |
aoqi@0 | 57 | } |
aoqi@0 | 58 | } |
aoqi@0 | 59 | ] |
aoqi@0 | 60 | } |
aoqi@0 | 61 | { |
aoqi@0 | 62 | "type": "Program", |
aoqi@0 | 63 | "body": [ |
aoqi@0 | 64 | { |
aoqi@0 | 65 | "type": "ExpressionStatement", |
aoqi@0 | 66 | "expression": { |
aoqi@0 | 67 | "type": "MemberExpression", |
aoqi@0 | 68 | "object": { |
aoqi@0 | 69 | "type": "Identifier", |
aoqi@0 | 70 | "name": "obj" |
aoqi@0 | 71 | }, |
aoqi@0 | 72 | "property": { |
aoqi@0 | 73 | "type": "Identifier", |
aoqi@0 | 74 | "name": "foo" |
aoqi@0 | 75 | }, |
aoqi@0 | 76 | "computed": false |
aoqi@0 | 77 | } |
aoqi@0 | 78 | } |
aoqi@0 | 79 | ] |
aoqi@0 | 80 | } |
aoqi@0 | 81 | { |
aoqi@0 | 82 | "type": "Program", |
aoqi@0 | 83 | "body": [ |
aoqi@0 | 84 | { |
aoqi@0 | 85 | "type": "ExpressionStatement", |
aoqi@0 | 86 | "expression": { |
aoqi@0 | 87 | "type": "MemberExpression", |
aoqi@0 | 88 | "object": { |
aoqi@0 | 89 | "type": "MemberExpression", |
aoqi@0 | 90 | "object": { |
aoqi@0 | 91 | "type": "Identifier", |
aoqi@0 | 92 | "name": "obj" |
aoqi@0 | 93 | }, |
aoqi@0 | 94 | "property": { |
aoqi@0 | 95 | "type": "Identifier", |
aoqi@0 | 96 | "name": "foo" |
aoqi@0 | 97 | }, |
aoqi@0 | 98 | "computed": false |
aoqi@0 | 99 | }, |
aoqi@0 | 100 | "property": { |
aoqi@0 | 101 | "type": "Identifier", |
aoqi@0 | 102 | "name": "bar" |
aoqi@0 | 103 | }, |
aoqi@0 | 104 | "computed": false |
aoqi@0 | 105 | } |
aoqi@0 | 106 | } |
aoqi@0 | 107 | ] |
aoqi@0 | 108 | } |
aoqi@0 | 109 | { |
aoqi@0 | 110 | "type": "Program", |
aoqi@0 | 111 | "body": [ |
aoqi@0 | 112 | { |
aoqi@0 | 113 | "type": "ExpressionStatement", |
aoqi@0 | 114 | "expression": { |
aoqi@0 | 115 | "type": "NewExpression", |
aoqi@0 | 116 | "callee": { |
aoqi@0 | 117 | "type": "Identifier", |
aoqi@0 | 118 | "name": "Type" |
aoqi@0 | 119 | }, |
aoqi@0 | 120 | "arguments": [] |
aoqi@0 | 121 | } |
aoqi@0 | 122 | } |
aoqi@0 | 123 | ] |
aoqi@0 | 124 | } |
aoqi@0 | 125 | { |
aoqi@0 | 126 | "type": "Program", |
aoqi@0 | 127 | "body": [ |
aoqi@0 | 128 | { |
aoqi@0 | 129 | "type": "ExpressionStatement", |
aoqi@0 | 130 | "expression": { |
aoqi@0 | 131 | "type": "NewExpression", |
aoqi@0 | 132 | "callee": { |
aoqi@0 | 133 | "type": "Identifier", |
aoqi@0 | 134 | "name": "Type" |
aoqi@0 | 135 | }, |
aoqi@0 | 136 | "arguments": [] |
aoqi@0 | 137 | } |
aoqi@0 | 138 | } |
aoqi@0 | 139 | ] |
aoqi@0 | 140 | } |
aoqi@0 | 141 | { |
aoqi@0 | 142 | "type": "Program", |
aoqi@0 | 143 | "body": [ |
aoqi@0 | 144 | { |
aoqi@0 | 145 | "type": "ExpressionStatement", |
aoqi@0 | 146 | "expression": { |
aoqi@0 | 147 | "type": "NewExpression", |
aoqi@0 | 148 | "callee": { |
aoqi@0 | 149 | "type": "Identifier", |
aoqi@0 | 150 | "name": "Type" |
aoqi@0 | 151 | }, |
aoqi@0 | 152 | "arguments": [ |
aoqi@0 | 153 | { |
aoqi@0 | 154 | "type": "Identifier", |
aoqi@0 | 155 | "name": "a" |
aoqi@0 | 156 | }, |
aoqi@0 | 157 | { |
aoqi@0 | 158 | "type": "Literal", |
aoqi@0 | 159 | "value": "hello" |
aoqi@0 | 160 | } |
aoqi@0 | 161 | ] |
aoqi@0 | 162 | } |
aoqi@0 | 163 | } |
aoqi@0 | 164 | ] |
aoqi@0 | 165 | } |
aoqi@0 | 166 | { |
aoqi@0 | 167 | "type": "Program", |
aoqi@0 | 168 | "body": [ |
aoqi@0 | 169 | { |
aoqi@0 | 170 | "type": "ExpressionStatement", |
aoqi@0 | 171 | "expression": { |
aoqi@0 | 172 | "type": "NewExpression", |
aoqi@0 | 173 | "callee": { |
aoqi@0 | 174 | "type": "MemberExpression", |
aoqi@0 | 175 | "object": { |
aoqi@0 | 176 | "type": "Identifier", |
aoqi@0 | 177 | "name": "obj" |
aoqi@0 | 178 | }, |
aoqi@0 | 179 | "property": { |
aoqi@0 | 180 | "type": "Identifier", |
aoqi@0 | 181 | "name": "Type" |
aoqi@0 | 182 | }, |
aoqi@0 | 183 | "computed": false |
aoqi@0 | 184 | }, |
aoqi@0 | 185 | "arguments": [] |
aoqi@0 | 186 | } |
aoqi@0 | 187 | } |
aoqi@0 | 188 | ] |
aoqi@0 | 189 | } |
aoqi@0 | 190 | { |
aoqi@0 | 191 | "type": "Program", |
aoqi@0 | 192 | "body": [ |
aoqi@0 | 193 | { |
aoqi@0 | 194 | "type": "ExpressionStatement", |
aoqi@0 | 195 | "expression": { |
aoqi@0 | 196 | "type": "NewExpression", |
aoqi@0 | 197 | "callee": { |
aoqi@0 | 198 | "type": "MemberExpression", |
aoqi@0 | 199 | "object": { |
aoqi@0 | 200 | "type": "Identifier", |
aoqi@0 | 201 | "name": "obj" |
aoqi@0 | 202 | }, |
aoqi@0 | 203 | "property": { |
aoqi@0 | 204 | "type": "Identifier", |
aoqi@0 | 205 | "name": "Type" |
aoqi@0 | 206 | }, |
aoqi@0 | 207 | "computed": false |
aoqi@0 | 208 | }, |
aoqi@0 | 209 | "arguments": [] |
aoqi@0 | 210 | } |
aoqi@0 | 211 | } |
aoqi@0 | 212 | ] |
aoqi@0 | 213 | } |
aoqi@0 | 214 | { |
aoqi@0 | 215 | "type": "Program", |
aoqi@0 | 216 | "body": [ |
aoqi@0 | 217 | { |
aoqi@0 | 218 | "type": "ExpressionStatement", |
aoqi@0 | 219 | "expression": { |
aoqi@0 | 220 | "type": "NewExpression", |
aoqi@0 | 221 | "callee": { |
aoqi@0 | 222 | "type": "MemberExpression", |
aoqi@0 | 223 | "object": { |
aoqi@0 | 224 | "type": "Identifier", |
aoqi@0 | 225 | "name": "obj" |
aoqi@0 | 226 | }, |
aoqi@0 | 227 | "property": { |
aoqi@0 | 228 | "type": "Identifier", |
aoqi@0 | 229 | "name": "Type" |
aoqi@0 | 230 | }, |
aoqi@0 | 231 | "computed": false |
aoqi@0 | 232 | }, |
aoqi@0 | 233 | "arguments": [ |
aoqi@0 | 234 | { |
aoqi@0 | 235 | "type": "Identifier", |
aoqi@0 | 236 | "name": "a" |
aoqi@0 | 237 | }, |
aoqi@0 | 238 | { |
aoqi@0 | 239 | "type": "Literal", |
aoqi@0 | 240 | "value": "hello" |
aoqi@0 | 241 | } |
aoqi@0 | 242 | ] |
aoqi@0 | 243 | } |
aoqi@0 | 244 | } |
aoqi@0 | 245 | ] |
aoqi@0 | 246 | } |
aoqi@0 | 247 | { |
aoqi@0 | 248 | "type": "Program", |
aoqi@0 | 249 | "body": [ |
aoqi@0 | 250 | { |
aoqi@0 | 251 | "type": "ExpressionStatement", |
aoqi@0 | 252 | "expression": { |
aoqi@0 | 253 | "type": "CallExpression", |
aoqi@0 | 254 | "callee": { |
aoqi@0 | 255 | "type": "Identifier", |
aoqi@0 | 256 | "name": "foo" |
aoqi@0 | 257 | }, |
aoqi@0 | 258 | "arguments": [] |
aoqi@0 | 259 | } |
aoqi@0 | 260 | } |
aoqi@0 | 261 | ] |
aoqi@0 | 262 | } |
aoqi@0 | 263 | { |
aoqi@0 | 264 | "type": "Program", |
aoqi@0 | 265 | "body": [ |
aoqi@0 | 266 | { |
aoqi@0 | 267 | "type": "ExpressionStatement", |
aoqi@0 | 268 | "expression": { |
aoqi@0 | 269 | "type": "CallExpression", |
aoqi@0 | 270 | "callee": { |
aoqi@0 | 271 | "type": "MemberExpression", |
aoqi@0 | 272 | "object": { |
aoqi@0 | 273 | "type": "Identifier", |
aoqi@0 | 274 | "name": "obj" |
aoqi@0 | 275 | }, |
aoqi@0 | 276 | "property": { |
aoqi@0 | 277 | "type": "Identifier", |
aoqi@0 | 278 | "name": "foo" |
aoqi@0 | 279 | }, |
aoqi@0 | 280 | "computed": false |
aoqi@0 | 281 | }, |
aoqi@0 | 282 | "arguments": [] |
aoqi@0 | 283 | } |
aoqi@0 | 284 | } |
aoqi@0 | 285 | ] |
aoqi@0 | 286 | } |
aoqi@0 | 287 | { |
aoqi@0 | 288 | "type": "Program", |
aoqi@0 | 289 | "body": [ |
aoqi@0 | 290 | { |
aoqi@0 | 291 | "type": "ExpressionStatement", |
aoqi@0 | 292 | "expression": { |
aoqi@0 | 293 | "type": "CallExpression", |
aoqi@0 | 294 | "callee": { |
aoqi@0 | 295 | "type": "Identifier", |
aoqi@0 | 296 | "name": "foo" |
aoqi@0 | 297 | }, |
aoqi@0 | 298 | "arguments": [ |
aoqi@0 | 299 | { |
aoqi@0 | 300 | "type": "Identifier", |
aoqi@0 | 301 | "name": "a" |
aoqi@0 | 302 | }, |
aoqi@0 | 303 | { |
aoqi@0 | 304 | "type": "Identifier", |
aoqi@0 | 305 | "name": "b" |
aoqi@0 | 306 | } |
aoqi@0 | 307 | ] |
aoqi@0 | 308 | } |
aoqi@0 | 309 | } |
aoqi@0 | 310 | ] |
aoqi@0 | 311 | } |
aoqi@0 | 312 | { |
aoqi@0 | 313 | "type": "Program", |
aoqi@0 | 314 | "body": [ |
aoqi@0 | 315 | { |
aoqi@0 | 316 | "type": "ExpressionStatement", |
aoqi@0 | 317 | "expression": { |
aoqi@0 | 318 | "type": "CallExpression", |
aoqi@0 | 319 | "callee": { |
aoqi@0 | 320 | "type": "MemberExpression", |
aoqi@0 | 321 | "object": { |
aoqi@0 | 322 | "type": "Identifier", |
aoqi@0 | 323 | "name": "obj" |
aoqi@0 | 324 | }, |
aoqi@0 | 325 | "property": { |
aoqi@0 | 326 | "type": "Identifier", |
aoqi@0 | 327 | "name": "foo" |
aoqi@0 | 328 | }, |
aoqi@0 | 329 | "computed": false |
aoqi@0 | 330 | }, |
aoqi@0 | 331 | "arguments": [ |
aoqi@0 | 332 | { |
aoqi@0 | 333 | "type": "Identifier", |
aoqi@0 | 334 | "name": "a" |
aoqi@0 | 335 | }, |
aoqi@0 | 336 | { |
aoqi@0 | 337 | "type": "Identifier", |
aoqi@0 | 338 | "name": "b" |
aoqi@0 | 339 | } |
aoqi@0 | 340 | ] |
aoqi@0 | 341 | } |
aoqi@0 | 342 | } |
aoqi@0 | 343 | ] |
aoqi@0 | 344 | } |