react / wstein / node_modules / browserify / node_modules / module-deps / node_modules / detective / node_modules / escodegen / node_modules / esprima / test / reflect.js
80621 views// This is modified from Mozilla Reflect.parse test suite (the file is located1// at js/src/tests/js1_8_5/extensions/reflect-parse.js in the source tree).2//3// Some notable changes:4// * Removed unsupported features (destructuring, let, comprehensions...).5// * Removed tests for E4X (ECMAScript for XML).6// * Removed everything related to builder.7// * Enclosed every 'Pattern' construct with a scope.8// * Tweaked some expected tree to remove generator field.9// * Removed the test for bug 632030 and bug 632024.1011/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */12/*13* Any copyright is dedicated to the Public Domain.14* http://creativecommons.org/licenses/publicdomain/15*/1617(function (exports) {1819function testReflect(Reflect, Pattern) {2021function program(elts) { return Pattern({ type: "Program", body: elts }) }22function exprStmt(expr) { return Pattern({ type: "ExpressionStatement", expression: expr }) }23function throwStmt(expr) { return Pattern({ type: "ThrowStatement", argument: expr }) }24function returnStmt(expr) { return Pattern({ type: "ReturnStatement", argument: expr }) }25function yieldExpr(expr) { return Pattern({ type: "YieldExpression", argument: expr }) }26function lit(val) { return Pattern({ type: "Literal", value: val }) }27var thisExpr = Pattern({ type: "ThisExpression" });28function funDecl(id, params, body) { return Pattern({ type: "FunctionDeclaration",29id: id,30params: params,31defaults: [],32body: body,33rest: null,34generator: false,35expression: false36}) }37function genFunDecl(id, params, body) { return Pattern({ type: "FunctionDeclaration",38id: id,39params: params,40defaults: [],41body: body,42rest: null,43generator: false,44expression: false45}) }46function declarator(id, init) { return Pattern({ type: "VariableDeclarator", id: id, init: init }) }47function varDecl(decls) { return Pattern({ type: "VariableDeclaration", declarations: decls, kind: "var" }) }48function letDecl(decls) { return Pattern({ type: "VariableDeclaration", declarations: decls, kind: "let" }) }49function constDecl(decls) { return Pattern({ type: "VariableDeclaration", declarations: decls, kind: "const" }) }50function ident(name) { return Pattern({ type: "Identifier", name: name }) }51function dotExpr(obj, id) { return Pattern({ type: "MemberExpression", computed: false, object: obj, property: id }) }52function memExpr(obj, id) { return Pattern({ type: "MemberExpression", computed: true, object: obj, property: id }) }53function forStmt(init, test, update, body) { return Pattern({ type: "ForStatement", init: init, test: test, update: update, body: body }) }54function forInStmt(lhs, rhs, body) { return Pattern({ type: "ForInStatement", left: lhs, right: rhs, body: body, each: false }) }55function forEachInStmt(lhs, rhs, body) { return Pattern({ type: "ForInStatement", left: lhs, right: rhs, body: body, each: true }) }56function breakStmt(lab) { return Pattern({ type: "BreakStatement", label: lab }) }57function continueStmt(lab) { return Pattern({ type: "ContinueStatement", label: lab }) }58function blockStmt(body) { return Pattern({ type: "BlockStatement", body: body }) }59var emptyStmt = Pattern({ type: "EmptyStatement" });60function ifStmt(test, cons, alt) { return Pattern({ type: "IfStatement", test: test, alternate: alt, consequent: cons }) }61function labStmt(lab, stmt) { return Pattern({ type: "LabeledStatement", label: lab, body: stmt }) }62function withStmt(obj, stmt) { return Pattern({ type: "WithStatement", object: obj, body: stmt }) }63function whileStmt(test, stmt) { return Pattern({ type: "WhileStatement", test: test, body: stmt }) }64function doStmt(stmt, test) { return Pattern({ type: "DoWhileStatement", test: test, body: stmt }) }65function switchStmt(disc, cases) { return Pattern({ type: "SwitchStatement", discriminant: disc, cases: cases }) }66function caseClause(test, stmts) { return Pattern({ type: "SwitchCase", test: test, consequent: stmts }) }67function defaultClause(stmts) { return Pattern({ type: "SwitchCase", test: null, consequent: stmts }) }68function catchClause(id, guard, body) { if (guard) { return Pattern({ type: "GuardedCatchClause", param: id, guard: guard, body: body }) } else { return Pattern({ type: "CatchClause", param: id, body: body }) } }69function tryStmt(body, guarded, catches, fin) { return Pattern({ type: "TryStatement", block: body, guardedHandlers: guarded, handlers: catches, finalizer: fin }) }70function letStmt(head, body) { return Pattern({ type: "LetStatement", head: head, body: body }) }71function funExpr(id, args, body, gen) { return Pattern({ type: "FunctionExpression",72id: id,73params: args,74defaults: [],75body: body,76rest: null,77generator: false,78expression: false79}) }80function genFunExpr(id, args, body) { return Pattern({ type: "FunctionExpression",81id: id,82params: args,83defaults: [],84body: body,85rest: null,86generator: false,87expression: false88}) }8990function unExpr(op, arg) { return Pattern({ type: "UnaryExpression", operator: op, argument: arg, prefix: true }) }91function binExpr(op, left, right) { return Pattern({ type: "BinaryExpression", operator: op, left: left, right: right }) }92function aExpr(op, left, right) { return Pattern({ type: "AssignmentExpression", operator: op, left: left, right: right }) }93function updExpr(op, arg, prefix) { return Pattern({ type: "UpdateExpression", operator: op, argument: arg, prefix: prefix }) }94function logExpr(op, left, right) { return Pattern({ type: "LogicalExpression", operator: op, left: left, right: right }) }9596function condExpr(test, cons, alt) { return Pattern({ type: "ConditionalExpression", test: test, consequent: cons, alternate: alt }) }97function seqExpr(exprs) { return Pattern({ type: "SequenceExpression", expressions: exprs }) }98function newExpr(callee, args) { return Pattern({ type: "NewExpression", callee: callee, arguments: args }) }99function callExpr(callee, args) { return Pattern({ type: "CallExpression", callee: callee, arguments: args }) }100function arrExpr(elts) { return Pattern({ type: "ArrayExpression", elements: elts }) }101function objExpr(elts) { return Pattern({ type: "ObjectExpression", properties: elts }) }102function objProp(key, value, kind) { return Pattern({ type: "Property", key: key, value: value, kind: kind }) }103104function arrPatt(elts) { return Pattern({ type: "ArrayPattern", elements: elts }) }105function objPatt(elts) { return Pattern({ type: "ObjectPattern", properties: elts }) }106107function localSrc(src) { return "(function(){ " + src + " })" }108function localPatt(patt) { return program([exprStmt(funExpr(null, [], blockStmt([patt])))]) }109function blockSrc(src) { return "(function(){ { " + src + " } })" }110function blockPatt(patt) { return program([exprStmt(funExpr(null, [], blockStmt([blockStmt([patt])])))]) }111112function assertBlockStmt(src, patt) {113blockPatt(patt).assert(Reflect.parse(blockSrc(src)));114}115116function assertBlockExpr(src, patt) {117assertBlockStmt(src, exprStmt(patt));118}119120function assertBlockDecl(src, patt, builder) {121blockPatt(patt).assert(Reflect.parse(blockSrc(src), {builder: builder}));122}123124function assertLocalStmt(src, patt) {125localPatt(patt).assert(Reflect.parse(localSrc(src)));126}127128function assertLocalExpr(src, patt) {129assertLocalStmt(src, exprStmt(patt));130}131132function assertLocalDecl(src, patt) {133localPatt(patt).assert(Reflect.parse(localSrc(src)));134}135136function assertGlobalStmt(src, patt, builder) {137program([patt]).assert(Reflect.parse(src, {builder: builder}));138}139140function assertGlobalExpr(src, patt, builder) {141program([exprStmt(patt)]).assert(Reflect.parse(src, {builder: builder}));142//assertStmt(src, exprStmt(patt));143}144145function assertGlobalDecl(src, patt) {146program([patt]).assert(Reflect.parse(src));147}148149function assertProg(src, patt) {150program(patt).assert(Reflect.parse(src));151}152153function assertStmt(src, patt) {154assertLocalStmt(src, patt);155assertGlobalStmt(src, patt);156assertBlockStmt(src, patt);157}158159function assertExpr(src, patt) {160assertLocalExpr(src, patt);161assertGlobalExpr(src, patt);162assertBlockExpr(src, patt);163}164165function assertDecl(src, patt) {166assertLocalDecl(src, patt);167assertGlobalDecl(src, patt);168assertBlockDecl(src, patt);169}170171function assertError(src, errorType) {172try {173Reflect.parse(src);174} catch (e) {175return;176}177throw new Error("expected " + errorType.name + " for " + uneval(src));178}179180181// general tests182183// NB: These are useful but for now jit-test doesn't do I/O reliably.184185//program(_).assert(Reflect.parse(snarf('data/flapjax.txt')));186//program(_).assert(Reflect.parse(snarf('data/jquery-1.4.2.txt')));187//program(_).assert(Reflect.parse(snarf('data/prototype.js')));188//program(_).assert(Reflect.parse(snarf('data/dojo.js.uncompressed.js')));189//program(_).assert(Reflect.parse(snarf('data/mootools-1.2.4-core-nc.js')));190191192// declarations193194assertDecl("var x = 1, y = 2, z = 3",195varDecl([declarator(ident("x"), lit(1)),196declarator(ident("y"), lit(2)),197declarator(ident("z"), lit(3))]));198assertDecl("var x, y, z",199varDecl([declarator(ident("x"), null),200declarator(ident("y"), null),201declarator(ident("z"), null)]));202assertDecl("function foo() { }",203funDecl(ident("foo"), [], blockStmt([])));204assertDecl("function foo() { return 42 }",205funDecl(ident("foo"), [], blockStmt([returnStmt(lit(42))])));206207208// Bug 591437: rebound args have their defs turned into uses209assertDecl("function f(a) { function a() { } }",210funDecl(ident("f"), [ident("a")], blockStmt([funDecl(ident("a"), [], blockStmt([]))])));211assertDecl("function f(a,b,c) { function b() { } }",212funDecl(ident("f"), [ident("a"),ident("b"),ident("c")], blockStmt([funDecl(ident("b"), [], blockStmt([]))])));213214// expressions215216assertExpr("true", lit(true));217assertExpr("false", lit(false));218assertExpr("42", lit(42));219assertExpr("(/asdf/)", lit(/asdf/));220assertExpr("this", thisExpr);221assertExpr("foo", ident("foo"));222assertExpr("foo.bar", dotExpr(ident("foo"), ident("bar")));223assertExpr("foo[bar]", memExpr(ident("foo"), ident("bar")));224assertExpr("(function(){})", funExpr(null, [], blockStmt([])));225assertExpr("(function f() {})", funExpr(ident("f"), [], blockStmt([])));226assertExpr("(function f(x,y,z) {})", funExpr(ident("f"), [ident("x"),ident("y"),ident("z")], blockStmt([])));227assertExpr("(++x)", updExpr("++", ident("x"), true));228assertExpr("(x++)", updExpr("++", ident("x"), false));229assertExpr("(+x)", unExpr("+", ident("x")));230assertExpr("(-x)", unExpr("-", ident("x")));231assertExpr("(!x)", unExpr("!", ident("x")));232assertExpr("(~x)", unExpr("~", ident("x")));233assertExpr("(delete x)", unExpr("delete", ident("x")));234assertExpr("(typeof x)", unExpr("typeof", ident("x")));235assertExpr("(void x)", unExpr("void", ident("x")));236assertExpr("(x == y)", binExpr("==", ident("x"), ident("y")));237assertExpr("(x != y)", binExpr("!=", ident("x"), ident("y")));238assertExpr("(x === y)", binExpr("===", ident("x"), ident("y")));239assertExpr("(x !== y)", binExpr("!==", ident("x"), ident("y")));240assertExpr("(x < y)", binExpr("<", ident("x"), ident("y")));241assertExpr("(x <= y)", binExpr("<=", ident("x"), ident("y")));242assertExpr("(x > y)", binExpr(">", ident("x"), ident("y")));243assertExpr("(x >= y)", binExpr(">=", ident("x"), ident("y")));244assertExpr("(x << y)", binExpr("<<", ident("x"), ident("y")));245assertExpr("(x >> y)", binExpr(">>", ident("x"), ident("y")));246assertExpr("(x >>> y)", binExpr(">>>", ident("x"), ident("y")));247assertExpr("(x + y)", binExpr("+", ident("x"), ident("y")));248assertExpr("(w + x + y + z)", binExpr("+", binExpr("+", binExpr("+", ident("w"), ident("x")), ident("y")), ident("z")));249assertExpr("(x - y)", binExpr("-", ident("x"), ident("y")));250assertExpr("(w - x - y - z)", binExpr("-", binExpr("-", binExpr("-", ident("w"), ident("x")), ident("y")), ident("z")));251assertExpr("(x * y)", binExpr("*", ident("x"), ident("y")));252assertExpr("(x / y)", binExpr("/", ident("x"), ident("y")));253assertExpr("(x % y)", binExpr("%", ident("x"), ident("y")));254assertExpr("(x | y)", binExpr("|", ident("x"), ident("y")));255assertExpr("(x ^ y)", binExpr("^", ident("x"), ident("y")));256assertExpr("(x & y)", binExpr("&", ident("x"), ident("y")));257assertExpr("(x in y)", binExpr("in", ident("x"), ident("y")));258assertExpr("(x instanceof y)", binExpr("instanceof", ident("x"), ident("y")));259assertExpr("(x = y)", aExpr("=", ident("x"), ident("y")));260assertExpr("(x += y)", aExpr("+=", ident("x"), ident("y")));261assertExpr("(x -= y)", aExpr("-=", ident("x"), ident("y")));262assertExpr("(x *= y)", aExpr("*=", ident("x"), ident("y")));263assertExpr("(x /= y)", aExpr("/=", ident("x"), ident("y")));264assertExpr("(x %= y)", aExpr("%=", ident("x"), ident("y")));265assertExpr("(x <<= y)", aExpr("<<=", ident("x"), ident("y")));266assertExpr("(x >>= y)", aExpr(">>=", ident("x"), ident("y")));267assertExpr("(x >>>= y)", aExpr(">>>=", ident("x"), ident("y")));268assertExpr("(x |= y)", aExpr("|=", ident("x"), ident("y")));269assertExpr("(x ^= y)", aExpr("^=", ident("x"), ident("y")));270assertExpr("(x &= y)", aExpr("&=", ident("x"), ident("y")));271assertExpr("(x || y)", logExpr("||", ident("x"), ident("y")));272assertExpr("(x && y)", logExpr("&&", ident("x"), ident("y")));273assertExpr("(w || x || y || z)", logExpr("||", logExpr("||", logExpr("||", ident("w"), ident("x")), ident("y")), ident("z")))274assertExpr("(x ? y : z)", condExpr(ident("x"), ident("y"), ident("z")));275assertExpr("(x,y)", seqExpr([ident("x"),ident("y")]))276assertExpr("(x,y,z)", seqExpr([ident("x"),ident("y"),ident("z")]))277assertExpr("(a,b,c,d,e,f,g)", seqExpr([ident("a"),ident("b"),ident("c"),ident("d"),ident("e"),ident("f"),ident("g")]));278assertExpr("(new Object)", newExpr(ident("Object"), []));279assertExpr("(new Object())", newExpr(ident("Object"), []));280assertExpr("(new Object(42))", newExpr(ident("Object"), [lit(42)]));281assertExpr("(new Object(1,2,3))", newExpr(ident("Object"), [lit(1),lit(2),lit(3)]));282assertExpr("(String())", callExpr(ident("String"), []));283assertExpr("(String(42))", callExpr(ident("String"), [lit(42)]));284assertExpr("(String(1,2,3))", callExpr(ident("String"), [lit(1),lit(2),lit(3)]));285assertExpr("[]", arrExpr([]));286assertExpr("[1]", arrExpr([lit(1)]));287assertExpr("[1,2]", arrExpr([lit(1),lit(2)]));288assertExpr("[1,2,3]", arrExpr([lit(1),lit(2),lit(3)]));289assertExpr("[1,,2,3]", arrExpr([lit(1),,lit(2),lit(3)]));290assertExpr("[1,,,2,3]", arrExpr([lit(1),,,lit(2),lit(3)]));291assertExpr("[1,,,2,,3]", arrExpr([lit(1),,,lit(2),,lit(3)]));292assertExpr("[1,,,2,,,3]", arrExpr([lit(1),,,lit(2),,,lit(3)]));293assertExpr("[,1,2,3]", arrExpr([,lit(1),lit(2),lit(3)]));294assertExpr("[,,1,2,3]", arrExpr([,,lit(1),lit(2),lit(3)]));295assertExpr("[,,,1,2,3]", arrExpr([,,,lit(1),lit(2),lit(3)]));296assertExpr("[,,,1,2,3,]", arrExpr([,,,lit(1),lit(2),lit(3)]));297assertExpr("[,,,1,2,3,,]", arrExpr([,,,lit(1),lit(2),lit(3),undefined]));298assertExpr("[,,,1,2,3,,,]", arrExpr([,,,lit(1),lit(2),lit(3),undefined,undefined]));299assertExpr("[,,,,,]", arrExpr([undefined,undefined,undefined,undefined,undefined]));300assertExpr("({})", objExpr([]));301assertExpr("({x:1})", objExpr([objProp(ident("x"), lit(1), "init")]));302assertExpr("({x:1, y:2})", objExpr([objProp(ident("x"), lit(1), "init"),303objProp(ident("y"), lit(2), "init")]));304assertExpr("({x:1, y:2, z:3})", objExpr([objProp(ident("x"), lit(1), "init"),305objProp(ident("y"), lit(2), "init"),306objProp(ident("z"), lit(3), "init") ]));307assertExpr("({x:1, 'y':2, z:3})", objExpr([objProp(ident("x"), lit(1), "init"),308objProp(lit("y"), lit(2), "init"),309objProp(ident("z"), lit(3), "init") ]));310assertExpr("({'x':1, 'y':2, z:3})", objExpr([objProp(lit("x"), lit(1), "init"),311objProp(lit("y"), lit(2), "init"),312objProp(ident("z"), lit(3), "init") ]));313assertExpr("({'x':1, 'y':2, 3:3})", objExpr([objProp(lit("x"), lit(1), "init"),314objProp(lit("y"), lit(2), "init"),315objProp(lit(3), lit(3), "init") ]));316317// Bug 571617: eliminate constant-folding318assertExpr("2 + 3", binExpr("+", lit(2), lit(3)));319320// Bug 632026: constant-folding321assertExpr("typeof(0?0:a)", unExpr("typeof", condExpr(lit(0), lit(0), ident("a"))));322323// Bug 632056: constant-folding324program([exprStmt(ident("f")),325ifStmt(lit(1),326funDecl(ident("f"), [], blockStmt([])),327null)]).assert(Reflect.parse("f; if (1) function f(){}"));328329// statements330331assertStmt("throw 42", throwStmt(lit(42)));332assertStmt("for (;;) break", forStmt(null, null, null, breakStmt(null)));333assertStmt("for (x; y; z) break", forStmt(ident("x"), ident("y"), ident("z"), breakStmt(null)));334assertStmt("for (var x; y; z) break", forStmt(varDecl([declarator(ident("x"), null)]), ident("y"), ident("z"), breakStmt(null)));335assertStmt("for (var x = 42; y; z) break", forStmt(varDecl([declarator(ident("x"), lit(42))]), ident("y"), ident("z"), breakStmt(null)));336assertStmt("for (x; ; z) break", forStmt(ident("x"), null, ident("z"), breakStmt(null)));337assertStmt("for (var x; ; z) break", forStmt(varDecl([declarator(ident("x"), null)]), null, ident("z"), breakStmt(null)));338assertStmt("for (var x = 42; ; z) break", forStmt(varDecl([declarator(ident("x"), lit(42))]), null, ident("z"), breakStmt(null)));339assertStmt("for (x; y; ) break", forStmt(ident("x"), ident("y"), null, breakStmt(null)));340assertStmt("for (var x; y; ) break", forStmt(varDecl([declarator(ident("x"), null)]), ident("y"), null, breakStmt(null)));341assertStmt("for (var x = 42; y; ) break", forStmt(varDecl([declarator(ident("x"),lit(42))]), ident("y"), null, breakStmt(null)));342assertStmt("for (var x in y) break", forInStmt(varDecl([declarator(ident("x"),null)]), ident("y"), breakStmt(null)));343assertStmt("for (x in y) break", forInStmt(ident("x"), ident("y"), breakStmt(null)));344assertStmt("{ }", blockStmt([]));345assertStmt("{ throw 1; throw 2; throw 3; }", blockStmt([ throwStmt(lit(1)), throwStmt(lit(2)), throwStmt(lit(3))]));346assertStmt(";", emptyStmt);347assertStmt("if (foo) throw 42;", ifStmt(ident("foo"), throwStmt(lit(42)), null));348assertStmt("if (foo) throw 42; else true;", ifStmt(ident("foo"), throwStmt(lit(42)), exprStmt(lit(true))));349assertStmt("if (foo) { throw 1; throw 2; throw 3; }",350ifStmt(ident("foo"),351blockStmt([throwStmt(lit(1)), throwStmt(lit(2)), throwStmt(lit(3))]),352null));353assertStmt("if (foo) { throw 1; throw 2; throw 3; } else true;",354ifStmt(ident("foo"),355blockStmt([throwStmt(lit(1)), throwStmt(lit(2)), throwStmt(lit(3))]),356exprStmt(lit(true))));357assertStmt("foo: for(;;) break foo;", labStmt(ident("foo"), forStmt(null, null, null, breakStmt(ident("foo")))));358assertStmt("foo: for(;;) continue foo;", labStmt(ident("foo"), forStmt(null, null, null, continueStmt(ident("foo")))));359assertStmt("with (obj) { }", withStmt(ident("obj"), blockStmt([])));360assertStmt("with (obj) { obj; }", withStmt(ident("obj"), blockStmt([exprStmt(ident("obj"))])));361assertStmt("while (foo) { }", whileStmt(ident("foo"), blockStmt([])));362assertStmt("while (foo) { foo; }", whileStmt(ident("foo"), blockStmt([exprStmt(ident("foo"))])));363assertStmt("do { } while (foo);", doStmt(blockStmt([]), ident("foo")));364assertStmt("do { foo; } while (foo)", doStmt(blockStmt([exprStmt(ident("foo"))]), ident("foo")));365assertStmt("switch (foo) { case 1: 1; break; case 2: 2; break; default: 3; }",366switchStmt(ident("foo"),367[ caseClause(lit(1), [ exprStmt(lit(1)), breakStmt(null) ]),368caseClause(lit(2), [ exprStmt(lit(2)), breakStmt(null) ]),369defaultClause([ exprStmt(lit(3)) ]) ]));370assertStmt("switch (foo) { case 1: 1; break; case 2: 2; break; default: 3; case 42: 42; }",371switchStmt(ident("foo"),372[ caseClause(lit(1), [ exprStmt(lit(1)), breakStmt(null) ]),373caseClause(lit(2), [ exprStmt(lit(2)), breakStmt(null) ]),374defaultClause([ exprStmt(lit(3)) ]),375caseClause(lit(42), [ exprStmt(lit(42)) ]) ]));376assertStmt("try { } catch (e) { }",377tryStmt(blockStmt([]),378[],379[ catchClause(ident("e"), null, blockStmt([])) ],380null));381assertStmt("try { } catch (e) { } finally { }",382tryStmt(blockStmt([]),383[],384[ catchClause(ident("e"), null, blockStmt([])) ],385blockStmt([])));386assertStmt("try { } finally { }",387tryStmt(blockStmt([]),388[],389[],390blockStmt([])));391392// redeclarations (TOK_NAME nodes with lexdef)393394assertStmt("function f() { function g() { } function g() { } }",395funDecl(ident("f"), [], blockStmt([funDecl(ident("g"), [], blockStmt([])),396funDecl(ident("g"), [], blockStmt([]))])));397398assertStmt("function f() { function g() { } function g() { return 42 } }",399funDecl(ident("f"), [], blockStmt([funDecl(ident("g"), [], blockStmt([])),400funDecl(ident("g"), [], blockStmt([returnStmt(lit(42))]))])));401402assertStmt("function f() { var x = 42; var x = 43; }",403funDecl(ident("f"), [], blockStmt([varDecl([declarator(ident("x"),lit(42))]),404varDecl([declarator(ident("x"),lit(43))])])));405406// getters and setters407408assertExpr("({ get x() { return 42 } })",409objExpr([ objProp(ident("x"),410funExpr(null, [], blockStmt([returnStmt(lit(42))])),411"get" ) ]));412assertExpr("({ set x(v) { return 42 } })",413objExpr([ objProp(ident("x"),414funExpr(null, [ident("v")], blockStmt([returnStmt(lit(42))])),415"set" ) ]));416417}418419exports.testReflect = testReflect;420421}(typeof exports === 'undefined' ? this : exports));422423424