react / wstein / node_modules / react / node_modules / envify / node_modules / jstransform / node_modules / esprima-fb / test / reflect.js
80556 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// * Removed the test for bug 632030 and bug 632024.910/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */11/*12* Any copyright is dedicated to the Public Domain.13* http://creativecommons.org/licenses/publicdomain/14*/1516(function (exports) {1718function testReflect(Reflect, Pattern) {1920function program(elts) { return Pattern({ type: "Program", body: elts }) }21function exprStmt(expr) { return Pattern({ type: "ExpressionStatement", expression: expr }) }22function throwStmt(expr) { return Pattern({ type: "ThrowStatement", argument: expr }) }23function returnStmt(expr) { return Pattern({ type: "ReturnStatement", argument: expr }) }24function yieldExpr(expr) { return Pattern({ type: "YieldExpression", argument: expr }) }25function lit(val) { return Pattern({ type: "Literal", value: val }) }26var thisExpr = Pattern({ type: "ThisExpression" });27function funDecl(id, params, body) { return Pattern({ type: "FunctionDeclaration",28id: id,29params: params,30defaults: [],31body: body,32rest: null,33generator: false,34expression: false35}) }36function genFunDecl(id, params, body) { return Pattern({ type: "FunctionDeclaration",37id: id,38params: params,39defaults: [],40body: body,41rest: null,42generator: true,43expression: false44}) }45function declarator(id, init) { return Pattern({ type: "VariableDeclarator", id: id, init: init }) }46function varDecl(decls) { return Pattern({ type: "VariableDeclaration", declarations: decls, kind: "var" }) }47function letDecl(decls) { return Pattern({ type: "VariableDeclaration", declarations: decls, kind: "let" }) }48function constDecl(decls) { return Pattern({ type: "VariableDeclaration", declarations: decls, kind: "const" }) }49function ident(name) { return Pattern({ type: "Identifier", name: name }) }50function dotExpr(obj, id) { return Pattern({ type: "MemberExpression", computed: false, object: obj, property: id }) }51function memExpr(obj, id) { return Pattern({ type: "MemberExpression", computed: true, object: obj, property: id }) }52function forStmt(init, test, update, body) { return Pattern({ type: "ForStatement", init: init, test: test, update: update, body: body }) }53function forInStmt(lhs, rhs, body) { return Pattern({ type: "ForInStatement", left: lhs, right: rhs, body: body, each: false }) }54function forEachInStmt(lhs, rhs, body) { return Pattern({ type: "ForInStatement", left: lhs, right: rhs, body: body, each: true }) }55function breakStmt(lab) { return Pattern({ type: "BreakStatement", label: lab }) }56function continueStmt(lab) { return Pattern({ type: "ContinueStatement", label: lab }) }57function blockStmt(body) { return Pattern({ type: "BlockStatement", body: body }) }58var emptyStmt = Pattern({ type: "EmptyStatement" });59function ifStmt(test, cons, alt) { return Pattern({ type: "IfStatement", test: test, alternate: alt, consequent: cons }) }60function labStmt(lab, stmt) { return Pattern({ type: "LabeledStatement", label: lab, body: stmt }) }61function withStmt(obj, stmt) { return Pattern({ type: "WithStatement", object: obj, body: stmt }) }62function whileStmt(test, stmt) { return Pattern({ type: "WhileStatement", test: test, body: stmt }) }63function doStmt(stmt, test) { return Pattern({ type: "DoWhileStatement", test: test, body: stmt }) }64function switchStmt(disc, cases) { return Pattern({ type: "SwitchStatement", discriminant: disc, cases: cases }) }65function caseClause(test, stmts) { return Pattern({ type: "SwitchCase", test: test, consequent: stmts }) }66function defaultClause(stmts) { return Pattern({ type: "SwitchCase", test: null, consequent: stmts }) }67function 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 }) } }68function tryStmt(body, guarded, catches, fin) { return Pattern({ type: "TryStatement", block: body, guardedHandlers: guarded, handlers: catches, finalizer: fin }) }69function letStmt(head, body) { return Pattern({ type: "LetStatement", head: head, body: body }) }70function funExpr(id, args, body, gen) { return Pattern({ type: "FunctionExpression",71id: id,72params: args,73defaults: [],74body: body,75rest: null,76generator: false,77expression: false78}) }79function genFunExpr(id, args, body) { return Pattern({ type: "FunctionExpression",80id: id,81params: args,82defaults: [],83body: body,84rest: null,85generator: true,86expression: false87}) }8889function unExpr(op, arg) { return Pattern({ type: "UnaryExpression", operator: op, argument: arg, prefix: true }) }90function binExpr(op, left, right) { return Pattern({ type: "BinaryExpression", operator: op, left: left, right: right }) }91function aExpr(op, left, right) { return Pattern({ type: "AssignmentExpression", operator: op, left: left, right: right }) }92function updExpr(op, arg, prefix) { return Pattern({ type: "UpdateExpression", operator: op, argument: arg, prefix: prefix }) }93function logExpr(op, left, right) { return Pattern({ type: "LogicalExpression", operator: op, left: left, right: right }) }9495function condExpr(test, cons, alt) { return Pattern({ type: "ConditionalExpression", test: test, consequent: cons, alternate: alt }) }96function seqExpr(exprs) { return Pattern({ type: "SequenceExpression", expressions: exprs }) }97function newExpr(callee, args) { return Pattern({ type: "NewExpression", callee: callee, arguments: args }) }98function callExpr(callee, args) { return Pattern({ type: "CallExpression", callee: callee, arguments: args }) }99function arrExpr(elts) { return Pattern({ type: "ArrayExpression", elements: elts }) }100function objExpr(elts) { return Pattern({ type: "ObjectExpression", properties: elts }) }101function objProp(key, value, kind) { return Pattern({ type: "Property", key: key, value: value, kind: kind, method: false, shorthand: false, computed: false }) }102103function arrPatt(elts) { return Pattern({ type: "ArrayPattern", elements: elts }) }104function objPatt(elts) { return Pattern({ type: "ObjectPattern", properties: elts }) }105106function localSrc(src) { return "(function(){ " + src + " })" }107function localPatt(patt) { return program([exprStmt(funExpr(null, [], blockStmt([patt])))]) }108function blockSrc(src) { return "(function(){ { " + src + " } })" }109function blockPatt(patt) { return program([exprStmt(funExpr(null, [], blockStmt([blockStmt([patt])])))]) }110111function assertBlockStmt(src, patt) {112blockPatt(patt).assert(Reflect.parse(blockSrc(src)));113}114115function assertBlockExpr(src, patt) {116assertBlockStmt(src, exprStmt(patt));117}118119function assertBlockDecl(src, patt, builder) {120blockPatt(patt).assert(Reflect.parse(blockSrc(src), {builder: builder}));121}122123function assertLocalStmt(src, patt) {124localPatt(patt).assert(Reflect.parse(localSrc(src)));125}126127function assertLocalExpr(src, patt) {128assertLocalStmt(src, exprStmt(patt));129}130131function assertLocalDecl(src, patt) {132localPatt(patt).assert(Reflect.parse(localSrc(src)));133}134135function assertGlobalStmt(src, patt, builder) {136program([patt]).assert(Reflect.parse(src, {builder: builder}));137}138139function assertGlobalExpr(src, patt, builder) {140program([exprStmt(patt)]).assert(Reflect.parse(src, {builder: builder}));141//assertStmt(src, exprStmt(patt));142}143144function assertGlobalDecl(src, patt) {145program([patt]).assert(Reflect.parse(src));146}147148function assertProg(src, patt) {149program(patt).assert(Reflect.parse(src));150}151152function assertStmt(src, patt) {153assertLocalStmt(src, patt);154assertGlobalStmt(src, patt);155assertBlockStmt(src, patt);156}157158function assertExpr(src, patt) {159assertLocalExpr(src, patt);160assertGlobalExpr(src, patt);161assertBlockExpr(src, patt);162}163164function assertDecl(src, patt) {165assertLocalDecl(src, patt);166assertGlobalDecl(src, patt);167assertBlockDecl(src, patt);168}169170function assertError(src, errorType) {171try {172Reflect.parse(src);173} catch (e) {174return;175}176throw new Error("expected " + errorType.name + " for " + uneval(src));177}178179180// general tests181182// NB: These are useful but for now jit-test doesn't do I/O reliably.183184//program(_).assert(Reflect.parse(snarf('data/flapjax.txt')));185//program(_).assert(Reflect.parse(snarf('data/jquery-1.4.2.txt')));186//program(_).assert(Reflect.parse(snarf('data/prototype.js')));187//program(_).assert(Reflect.parse(snarf('data/dojo.js.uncompressed.js')));188//program(_).assert(Reflect.parse(snarf('data/mootools-1.2.4-core-nc.js')));189190191// declarations192193assertDecl("var x = 1, y = 2, z = 3",194varDecl([declarator(ident("x"), lit(1)),195declarator(ident("y"), lit(2)),196declarator(ident("z"), lit(3))]));197assertDecl("var x, y, z",198varDecl([declarator(ident("x"), null),199declarator(ident("y"), null),200declarator(ident("z"), null)]));201assertDecl("function foo() { }",202funDecl(ident("foo"), [], blockStmt([])));203assertDecl("function foo() { return 42 }",204funDecl(ident("foo"), [], blockStmt([returnStmt(lit(42))])));205206207// Bug 591437: rebound args have their defs turned into uses208assertDecl("function f(a) { function a() { } }",209funDecl(ident("f"), [ident("a")], blockStmt([funDecl(ident("a"), [], blockStmt([]))])));210assertDecl("function f(a,b,c) { function b() { } }",211funDecl(ident("f"), [ident("a"),ident("b"),ident("c")], blockStmt([funDecl(ident("b"), [], blockStmt([]))])));212213// expressions214215assertExpr("true", lit(true));216assertExpr("false", lit(false));217assertExpr("42", lit(42));218assertExpr("(/asdf/)", lit(/asdf/));219assertExpr("this", thisExpr);220assertExpr("foo", ident("foo"));221assertExpr("foo.bar", dotExpr(ident("foo"), ident("bar")));222assertExpr("foo[bar]", memExpr(ident("foo"), ident("bar")));223assertExpr("(function(){})", funExpr(null, [], blockStmt([])));224assertExpr("(function f() {})", funExpr(ident("f"), [], blockStmt([])));225assertExpr("(function f(x,y,z) {})", funExpr(ident("f"), [ident("x"),ident("y"),ident("z")], blockStmt([])));226assertExpr("(++x)", updExpr("++", ident("x"), true));227assertExpr("(x++)", updExpr("++", ident("x"), false));228assertExpr("(+x)", unExpr("+", ident("x")));229assertExpr("(-x)", unExpr("-", ident("x")));230assertExpr("(!x)", unExpr("!", ident("x")));231assertExpr("(~x)", unExpr("~", ident("x")));232assertExpr("(delete x)", unExpr("delete", ident("x")));233assertExpr("(typeof x)", unExpr("typeof", ident("x")));234assertExpr("(void x)", unExpr("void", ident("x")));235assertExpr("(x == y)", binExpr("==", ident("x"), ident("y")));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("(w + x + y + z)", binExpr("+", binExpr("+", binExpr("+", ident("w"), ident("x")), ident("y")), ident("z")));248assertExpr("(x - y)", binExpr("-", ident("x"), ident("y")));249assertExpr("(w - x - y - z)", binExpr("-", binExpr("-", binExpr("-", ident("w"), ident("x")), ident("y")), ident("z")));250assertExpr("(x * y)", binExpr("*", ident("x"), ident("y")));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 in y)", binExpr("in", ident("x"), ident("y")));257assertExpr("(x instanceof y)", binExpr("instanceof", ident("x"), ident("y")));258assertExpr("(x = y)", aExpr("=", 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)", logExpr("||", ident("x"), ident("y")));271assertExpr("(x && y)", logExpr("&&", ident("x"), ident("y")));272assertExpr("(w || x || y || z)", logExpr("||", logExpr("||", logExpr("||", ident("w"), ident("x")), ident("y")), ident("z")))273assertExpr("(x ? y : z)", condExpr(ident("x"), ident("y"), ident("z")));274assertExpr("(x,y)", seqExpr([ident("x"),ident("y")]))275assertExpr("(x,y,z)", seqExpr([ident("x"),ident("y"),ident("z")]))276assertExpr("(a,b,c,d,e,f,g)", seqExpr([ident("a"),ident("b"),ident("c"),ident("d"),ident("e"),ident("f"),ident("g")]));277assertExpr("(new Object)", newExpr(ident("Object"), []));278assertExpr("(new Object())", newExpr(ident("Object"), []));279assertExpr("(new Object(42))", newExpr(ident("Object"), [lit(42)]));280assertExpr("(new Object(1,2,3))", newExpr(ident("Object"), [lit(1),lit(2),lit(3)]));281assertExpr("(String())", callExpr(ident("String"), []));282assertExpr("(String(42))", callExpr(ident("String"), [lit(42)]));283assertExpr("(String(1,2,3))", callExpr(ident("String"), [lit(1),lit(2),lit(3)]));284assertExpr("[]", arrExpr([]));285assertExpr("[1]", arrExpr([lit(1)]));286assertExpr("[1,2]", arrExpr([lit(1),lit(2)]));287assertExpr("[1,2,3]", arrExpr([lit(1),lit(2),lit(3)]));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),undefined]));297assertExpr("[,,,1,2,3,,,]", arrExpr([,,,lit(1),lit(2),lit(3),undefined,undefined]));298assertExpr("[,,,,,]", arrExpr([undefined,undefined,undefined,undefined,undefined]));299assertExpr("({})", objExpr([]));300assertExpr("({x:1})", objExpr([objProp(ident("x"), lit(1), "init")]));301assertExpr("({x:1, y:2})", objExpr([objProp(ident("x"), lit(1), "init"),302objProp(ident("y"), lit(2), "init")]));303assertExpr("({x:1, y:2, z:3})", objExpr([objProp(ident("x"), lit(1), "init"),304objProp(ident("y"), lit(2), "init"),305objProp(ident("z"), lit(3), "init") ]));306assertExpr("({x:1, 'y':2, z:3})", objExpr([objProp(ident("x"), lit(1), "init"),307objProp(lit("y"), lit(2), "init"),308objProp(ident("z"), lit(3), "init") ]));309assertExpr("({'x':1, 'y':2, z:3})", objExpr([objProp(lit("x"), lit(1), "init"),310objProp(lit("y"), lit(2), "init"),311objProp(ident("z"), lit(3), "init") ]));312assertExpr("({'x':1, 'y':2, 3:3})", objExpr([objProp(lit("x"), lit(1), "init"),313objProp(lit("y"), lit(2), "init"),314objProp(lit(3), lit(3), "init") ]));315316// Bug 571617: eliminate constant-folding317assertExpr("2 + 3", binExpr("+", lit(2), lit(3)));318319// Bug 632026: constant-folding320assertExpr("typeof(0?0:a)", unExpr("typeof", condExpr(lit(0), lit(0), ident("a"))));321322// Bug 632056: constant-folding323program([exprStmt(ident("f")),324ifStmt(lit(1),325funDecl(ident("f"), [], blockStmt([])),326null)]).assert(Reflect.parse("f; if (1) function f(){}"));327328// statements329330assertStmt("throw 42", throwStmt(lit(42)));331assertStmt("for (;;) break", forStmt(null, null, null, breakStmt(null)));332assertStmt("for (x; y; z) break", forStmt(ident("x"), ident("y"), ident("z"), breakStmt(null)));333assertStmt("for (var x; y; z) break", forStmt(varDecl([declarator(ident("x"), null)]), ident("y"), ident("z"), breakStmt(null)));334assertStmt("for (var x = 42; y; z) break", forStmt(varDecl([declarator(ident("x"), lit(42))]), ident("y"), ident("z"), breakStmt(null)));335assertStmt("for (x; ; z) break", forStmt(ident("x"), null, ident("z"), breakStmt(null)));336assertStmt("for (var x; ; z) break", forStmt(varDecl([declarator(ident("x"), null)]), null, ident("z"), breakStmt(null)));337assertStmt("for (var x = 42; ; z) break", forStmt(varDecl([declarator(ident("x"), lit(42))]), null, ident("z"), breakStmt(null)));338assertStmt("for (x; y; ) break", forStmt(ident("x"), ident("y"), null, breakStmt(null)));339assertStmt("for (var x; y; ) break", forStmt(varDecl([declarator(ident("x"), null)]), ident("y"), null, breakStmt(null)));340assertStmt("for (var x = 42; y; ) break", forStmt(varDecl([declarator(ident("x"),lit(42))]), ident("y"), null, breakStmt(null)));341assertStmt("for (var x in y) break", forInStmt(varDecl([declarator(ident("x"),null)]), ident("y"), breakStmt(null)));342assertStmt("for (x in y) break", forInStmt(ident("x"), ident("y"), breakStmt(null)));343assertStmt("{ }", blockStmt([]));344assertStmt("{ throw 1; throw 2; throw 3; }", blockStmt([ throwStmt(lit(1)), throwStmt(lit(2)), throwStmt(lit(3))]));345assertStmt(";", emptyStmt);346assertStmt("if (foo) throw 42;", ifStmt(ident("foo"), throwStmt(lit(42)), null));347assertStmt("if (foo) throw 42; else true;", ifStmt(ident("foo"), throwStmt(lit(42)), exprStmt(lit(true))));348assertStmt("if (foo) { throw 1; throw 2; throw 3; }",349ifStmt(ident("foo"),350blockStmt([throwStmt(lit(1)), throwStmt(lit(2)), throwStmt(lit(3))]),351null));352assertStmt("if (foo) { throw 1; throw 2; throw 3; } else true;",353ifStmt(ident("foo"),354blockStmt([throwStmt(lit(1)), throwStmt(lit(2)), throwStmt(lit(3))]),355exprStmt(lit(true))));356assertStmt("foo: for(;;) break foo;", labStmt(ident("foo"), forStmt(null, null, null, breakStmt(ident("foo")))));357assertStmt("foo: for(;;) continue foo;", labStmt(ident("foo"), forStmt(null, null, null, continueStmt(ident("foo")))));358assertStmt("with (obj) { }", withStmt(ident("obj"), blockStmt([])));359assertStmt("with (obj) { obj; }", withStmt(ident("obj"), blockStmt([exprStmt(ident("obj"))])));360assertStmt("while (foo) { }", whileStmt(ident("foo"), blockStmt([])));361assertStmt("while (foo) { foo; }", whileStmt(ident("foo"), blockStmt([exprStmt(ident("foo"))])));362assertStmt("do { } while (foo);", doStmt(blockStmt([]), ident("foo")));363assertStmt("do { foo; } while (foo)", doStmt(blockStmt([exprStmt(ident("foo"))]), ident("foo")));364assertStmt("switch (foo) { case 1: 1; break; case 2: 2; break; default: 3; }",365switchStmt(ident("foo"),366[ caseClause(lit(1), [ exprStmt(lit(1)), breakStmt(null) ]),367caseClause(lit(2), [ exprStmt(lit(2)), breakStmt(null) ]),368defaultClause([ exprStmt(lit(3)) ]) ]));369assertStmt("switch (foo) { case 1: 1; break; case 2: 2; break; default: 3; case 42: 42; }",370switchStmt(ident("foo"),371[ caseClause(lit(1), [ exprStmt(lit(1)), breakStmt(null) ]),372caseClause(lit(2), [ exprStmt(lit(2)), breakStmt(null) ]),373defaultClause([ exprStmt(lit(3)) ]),374caseClause(lit(42), [ exprStmt(lit(42)) ]) ]));375assertStmt("try { } catch (e) { }",376tryStmt(blockStmt([]),377[],378[ catchClause(ident("e"), null, blockStmt([])) ],379null));380assertStmt("try { } catch (e) { } finally { }",381tryStmt(blockStmt([]),382[],383[ catchClause(ident("e"), null, blockStmt([])) ],384blockStmt([])));385assertStmt("try { } finally { }",386tryStmt(blockStmt([]),387[],388[],389blockStmt([])));390391// redeclarations (TOK_NAME nodes with lexdef)392393assertStmt("function f() { function g() { } function g() { } }",394funDecl(ident("f"), [], blockStmt([funDecl(ident("g"), [], blockStmt([])),395funDecl(ident("g"), [], blockStmt([]))])));396397assertStmt("function f() { function g() { } function g() { return 42 } }",398funDecl(ident("f"), [], blockStmt([funDecl(ident("g"), [], blockStmt([])),399funDecl(ident("g"), [], blockStmt([returnStmt(lit(42))]))])));400401assertStmt("function f() { var x = 42; var x = 43; }",402funDecl(ident("f"), [], blockStmt([varDecl([declarator(ident("x"),lit(42))]),403varDecl([declarator(ident("x"),lit(43))])])));404405// getters and setters406407assertExpr("({ get x() { return 42 } })",408objExpr([ objProp(ident("x"),409funExpr(null, [], blockStmt([returnStmt(lit(42))])),410"get" ) ]));411assertExpr("({ set x(v) { return 42 } })",412objExpr([ objProp(ident("x"),413funExpr(null, [ident("v")], blockStmt([returnStmt(lit(42))])),414"set" ) ]));415416}417418exports.testReflect = testReflect;419420}(typeof exports === 'undefined' ? this : exports));421422423