Bug 517580 - Unconditionally build with support for getters and setters, remove support for the deprecated { x getter: function() {}} and x getter= function() {} getter syntaxes (mutatis mutandis for setter) now that ES5 provides Object.getOwnPropertyDescriptor and Object.defineProperty and { get x() { } } syntax, and provide __{define,lookup}{G,S}etter__ only if a preprocessor variable is defined (unconditionally provided for the moment). r=luke
authorJeff Walden <jwalden@mit.edu>
Tue, 06 Oct 2009 12:35:33 -0700
changeset 40855 e47d2506e0ad
parent 40854 f02074309dcd
child 40856 7bdf4c495189
push id12825
push userrsayre@mozilla.com
push date2010-04-15 16:08 +0000
treeherdermozilla-central@1138f6156b1b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersluke
bugs517580
milestone1.9.3a5pre
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
Bug 517580 - Unconditionally build with support for getters and setters, remove support for the deprecated { x getter: function() {}} and x getter= function() {} getter syntaxes (mutatis mutandis for setter) now that ES5 provides Object.getOwnPropertyDescriptor and Object.defineProperty and { get x() { } } syntax, and provide __{define,lookup}{G,S}etter__ only if a preprocessor variable is defined (unconditionally provided for the moment). r=luke
js/src/jsapi.cpp
js/src/jsatom.cpp
js/src/jsatom.h
js/src/jsemit.cpp
js/src/jsinterp.cpp
js/src/jsobj.cpp
js/src/jsobj.h
js/src/jsopcode.cpp
js/src/jsops.cpp
js/src/jsparse.cpp
js/src/jsparse.h
js/src/jsscope.cpp
js/src/jsversion.h
js/src/tests/e4x/extensions/regress-352846-01.js
js/src/tests/e4x/extensions/regress-352846-02.js
js/src/tests/e4x/extensions/regress-352846-03.js
js/src/tests/e4x/extensions/regress-353165.js
js/src/tests/ecma_5/strict/11.1.5.js
js/src/tests/js1_5/GC/regress-316885-01.js
js/src/tests/js1_5/GetSet/getset-002.js
js/src/tests/js1_5/Regress/regress-355341.js
js/src/tests/js1_5/Regress/regress-361617.js
js/src/tests/js1_5/decompilation/jstests.list
js/src/tests/js1_5/decompilation/regress-355992.js
js/src/tests/js1_5/decompilation/regress-356083.js
js/src/tests/js1_5/decompilation/regress-356248.js
js/src/tests/js1_5/extensions/getset-001.js
js/src/tests/js1_5/extensions/getset-003.js
js/src/tests/js1_5/extensions/jstests.list
js/src/tests/js1_5/extensions/regress-349616.js
js/src/tests/js1_5/extensions/regress-352060.js
js/src/tests/js1_5/extensions/regress-352094.js
js/src/tests/js1_5/extensions/regress-352455.js
js/src/tests/js1_5/extensions/regress-356085.js
js/src/tests/js1_5/extensions/regress-356106.js
js/src/tests/js1_5/extensions/regress-356378.js
js/src/tests/js1_5/extensions/regress-358594-01.js
js/src/tests/js1_5/extensions/regress-358594-02.js
js/src/tests/js1_5/extensions/regress-358594-03.js
js/src/tests/js1_5/extensions/regress-358594-04.js
js/src/tests/js1_5/extensions/regress-358594-05.js
js/src/tests/js1_5/extensions/regress-358594-06.js
js/src/tests/js1_5/extensions/regress-361346.js
js/src/tests/js1_5/extensions/regress-380581.js
js/src/tests/js1_5/extensions/regress-380831.js
js/src/tests/js1_5/extensions/regress-381205.js
js/src/tests/js1_5/extensions/regress-381304.js
js/src/tests/js1_5/extensions/regress-383965.js
js/src/tests/js1_5/extensions/regress-424257.js
js/src/tests/js1_5/extensions/regress-452178.js
js/src/tests/js1_6/extensions/regress-352392.js
js/src/tests/js1_7/decompilation/jstests.list
js/src/tests/js1_7/decompilation/regress-381101.js
js/src/tests/js1_7/decompilation/regress-381108.js
js/src/tests/js1_7/decompilation/regress-410571.js
js/src/tests/js1_7/extensions/jstests.list
js/src/tests/js1_7/extensions/regress-367629.js
js/src/tests/js1_7/extensions/regress-379482.js
js/src/tests/js1_7/extensions/regress-379566.js
js/src/tests/js1_7/extensions/regress-380933.js
js/src/tests/js1_7/extensions/regress-381301.js
js/src/tests/js1_7/extensions/regress-476257.js
js/src/tests/js1_7/regress/regress-385133-01.js
js/src/tests/js1_7/regress/regress-385133-02.js
js/src/tests/js1_8/extensions/regress-473040.js
js/src/tests/js1_8/extensions/regress-482263.js
js/src/tests/js1_8/genexps/regress-380237-03.js
js/src/tests/js1_8/regress/regress-477234.js
js/src/tests/js1_8_1/decompilation/regress-380237-03.js
js/src/tests/js1_8_1/decompilation/regress-380237-04.js
--- a/js/src/jsapi.cpp
+++ b/js/src/jsapi.cpp
@@ -1360,17 +1360,17 @@ static JSStdName object_prototype_names[
     {js_InitObjectClass,        EAGER_ATOM(valueOf), NULL},
 #if JS_HAS_OBJ_WATCHPOINT
     {js_InitObjectClass,        LAZY_ATOM(watch), NULL},
     {js_InitObjectClass,        LAZY_ATOM(unwatch), NULL},
 #endif
     {js_InitObjectClass,        LAZY_ATOM(hasOwnProperty), NULL},
     {js_InitObjectClass,        LAZY_ATOM(isPrototypeOf), NULL},
     {js_InitObjectClass,        LAZY_ATOM(propertyIsEnumerable), NULL},
-#if JS_HAS_GETTER_SETTER
+#if OLD_GETTER_SETTER_METHODS
     {js_InitObjectClass,        LAZY_ATOM(defineGetter), NULL},
     {js_InitObjectClass,        LAZY_ATOM(defineSetter), NULL},
     {js_InitObjectClass,        LAZY_ATOM(lookupGetter), NULL},
     {js_InitObjectClass,        LAZY_ATOM(lookupSetter), NULL},
 #endif
 
     {NULL,                      0, NULL, NULL}
 };
--- a/js/src/jsatom.cpp
+++ b/js/src/jsatom.cpp
@@ -131,30 +131,28 @@ const char *const js_common_atom_names[]
     js_callee_str,              /* calleeAtom                   */
     js_caller_str,              /* callerAtom                   */
     js_class_prototype_str,     /* classPrototypeAtom           */
     js_constructor_str,         /* constructorAtom              */
     js_each_str,                /* eachAtom                     */
     js_eval_str,                /* evalAtom                     */
     js_fileName_str,            /* fileNameAtom                 */
     js_get_str,                 /* getAtom                      */
-    js_getter_str,              /* getterAtom                   */
     js_index_str,               /* indexAtom                    */
     js_input_str,               /* inputAtom                    */
     js_iterator_str,            /* iteratorAtom                 */
     js_length_str,              /* lengthAtom                   */
     js_lineNumber_str,          /* lineNumberAtom               */
     js_message_str,             /* messageAtom                  */
     js_name_str,                /* nameAtom                     */
     js_next_str,                /* nextAtom                     */
     js_noSuchMethod_str,        /* noSuchMethodAtom             */
     js_parent_str,              /* parentAtom                   */
     js_proto_str,               /* protoAtom                    */
     js_set_str,                 /* setAtom                      */
-    js_setter_str,              /* setterAtom                   */
     js_stack_str,               /* stackAtom                    */
     js_toLocaleString_str,      /* toLocaleStringAtom           */
     js_toSource_str,            /* toSourceAtom                 */
     js_toString_str,            /* toStringAtom                 */
     js_valueOf_str,             /* valueOfAtom                  */
     js_toJSON_str,              /* toJSONAtom                   */
     "(void 0)",                 /* void0Atom                    */
     js_enumerable_str,          /* enumerableAtom               */
--- a/js/src/jsatom.h
+++ b/js/src/jsatom.h
@@ -245,30 +245,28 @@ struct JSAtomState {
     JSAtom              *calleeAtom;
     JSAtom              *callerAtom;
     JSAtom              *classPrototypeAtom;
     JSAtom              *constructorAtom;
     JSAtom              *eachAtom;
     JSAtom              *evalAtom;
     JSAtom              *fileNameAtom;
     JSAtom              *getAtom;
-    JSAtom              *getterAtom;
     JSAtom              *indexAtom;
     JSAtom              *inputAtom;
     JSAtom              *iteratorAtom;
     JSAtom              *lengthAtom;
     JSAtom              *lineNumberAtom;
     JSAtom              *messageAtom;
     JSAtom              *nameAtom;
     JSAtom              *nextAtom;
     JSAtom              *noSuchMethodAtom;
     JSAtom              *parentAtom;
     JSAtom              *protoAtom;
     JSAtom              *setAtom;
-    JSAtom              *setterAtom;
     JSAtom              *stackAtom;
     JSAtom              *toLocaleStringAtom;
     JSAtom              *toSourceAtom;
     JSAtom              *toStringAtom;
     JSAtom              *valueOfAtom;
     JSAtom              *toJSONAtom;
     JSAtom              *void0Atom;
     JSAtom              *enumerableAtom;
--- a/js/src/jsemit.cpp
+++ b/js/src/jsemit.cpp
@@ -5782,33 +5782,16 @@ js_EmitTree(JSContext *cx, JSCodeGenerat
                 return JS_FALSE;
             break;
 #endif
           default:
             JS_ASSERT(0);
         }
 
         op = PN_OP(pn);
-#if JS_HAS_GETTER_SETTER
-        if (op == JSOP_GETTER || op == JSOP_SETTER) {
-            if (pn2->pn_type == TOK_NAME && PN_OP(pn2) != JSOP_SETNAME) {
-                /*
-                 * x getter = y where x is a local or let variable is not
-                 * supported.
-                 */
-                ReportCompileErrorNumber(cx, TS(cg->compiler), pn2, JSREPORT_ERROR,
-                                         JSMSG_BAD_GETTER_OR_SETTER,
-                                         (op == JSOP_GETTER) ? js_getter_str : js_setter_str);
-                return JS_FALSE;
-            }
-
-            /* We'll emit these prefix bytecodes after emitting the r.h.s. */
-        } else
-#endif
-        /* If += or similar, dup the left operand and get its value. */
         if (op != JSOP_NOP) {
             switch (pn2->pn_type) {
               case TOK_NAME:
                 if (pn2->isConst()) {
                     if (PN_OP(pn2) == JSOP_CALLEE) {
                         if (js_Emit1(cx, cg, JSOP_CALLEE) < 0)
                             return JS_FALSE;
                     } else {
@@ -6650,23 +6633,22 @@ js_EmitTree(JSContext *cx, JSCodeGenerat
                 if (!EmitNumberOp(cx, pn3->pn_dval, cg))
                     return JS_FALSE;
             }
 
             /* Emit code for the property initializer. */
             if (!js_EmitTree(cx, cg, pn2->pn_right))
                 return JS_FALSE;
 
-#if JS_HAS_GETTER_SETTER
             op = PN_OP(pn2);
             if (op == JSOP_GETTER || op == JSOP_SETTER) {
                 if (js_Emit1(cx, cg, op) < 0)
                     return JS_FALSE;
             }
-#endif
+
             /* Annotate JSOP_INITELEM so we decompile 2:c and not just c. */
             if (pn3->pn_type == TOK_NUMBER) {
                 if (js_NewSrcNote(cx, cg, SRC_INITPROP) < 0)
                     return JS_FALSE;
                 if (js_Emit1(cx, cg, JSOP_INITELEM) < 0)
                     return JS_FALSE;
             } else {
                 JS_ASSERT(pn3->pn_type == TOK_NAME ||
@@ -6675,24 +6657,17 @@ js_EmitTree(JSContext *cx, JSCodeGenerat
                 if (!ale)
                     return JS_FALSE;
 
                 /* Check whether we can optimize to JSOP_INITMETHOD. */
                 JSParseNode *init = pn2->pn_right;
                 bool lambda = PN_OP(init) == JSOP_LAMBDA;
                 if (lambda)
                     ++methodInits;
-                if (
-#if JS_HAS_GETTER_SETTER
-                    op == JSOP_INITPROP &&
-#else
-                    JS_ASSERT(op == JSOP_INITPROP),
-#endif
-                    lambda &&
-                    init->pn_funbox->joinable())
+                if (op == JSOP_INITPROP && lambda && init->pn_funbox->joinable())
                 {
                     op = JSOP_INITMETHOD;
                     pn2->pn_op = uint8(op);
                 } else {
                     op = JSOP_INITPROP;
                     if (lambda)
                         ++slowMethodInits;
                 }
--- a/js/src/jsinterp.cpp
+++ b/js/src/jsinterp.cpp
@@ -2275,19 +2275,17 @@ js_Interpret(JSContext *cx)
     JSString *str, *str2;
     int32_t i, j;
     jsdouble d, d2;
     JSClass *clasp;
     JSFunction *fun;
     JSType type;
     jsint low, high, off, npairs;
     JSBool match;
-#if JS_HAS_GETTER_SETTER
     JSPropertyOp getter, setter;
-#endif
     JSAutoResolveFlags rf(cx, JSRESOLVE_INFER);
 
 # ifdef DEBUG
     /*
      * We call this macro from BEGIN_CASE in threaded interpreters,
      * and before entering the switch in non-threaded interpreters.
      * However, reaching such points doesn't mean we've actually
      * fetched an OP from the instruction stream: some opcodes use
--- a/js/src/jsobj.cpp
+++ b/js/src/jsobj.cpp
@@ -330,21 +330,19 @@ MarkSharpObjects(JSContext *cx, JSObject
     JSHashTable *table;
     JSHashNumber hash;
     JSHashEntry **hep, *he;
     jsatomid sharpid;
     JSIdArray *ida;
     JSBool ok;
     jsint i, length;
     jsid id;
-#if JS_HAS_GETTER_SETTER
     JSObject *obj2;
     JSProperty *prop;
     uintN attrs;
-#endif
     jsval val;
 
     JS_CHECK_RECURSION(cx, return NULL);
 
     map = &cx->sharpObjectMap;
     JS_ASSERT(map->depth >= 1);
     table = map->table;
     hash = js_hash_object(obj);
@@ -360,17 +358,16 @@ MarkSharpObjects(JSContext *cx, JSObject
 
         ida = JS_Enumerate(cx, obj);
         if (!ida)
             return NULL;
 
         ok = JS_TRUE;
         for (i = 0, length = ida->length; i < length; i++) {
             id = ida->vector[i];
-#if JS_HAS_GETTER_SETTER
             ok = obj->lookupProperty(cx, id, &obj2, &prop);
             if (!ok)
                 break;
             if (!prop)
                 continue;
             ok = obj2->getAttributes(cx, id, prop, &attrs);
             if (ok) {
                 if (obj2->isNative() &&
@@ -388,19 +385,16 @@ MarkSharpObjects(JSContext *cx, JSObject
                         }
                         val = sprop->setterValue();
                     }
                 } else {
                     ok = obj->getProperty(cx, id, &val);
                 }
             }
             obj2->dropProperty(cx, prop);
-#else
-            ok = obj->getProperty(cx, id, &val);
-#endif
             if (!ok)
                 break;
             if (!JSVAL_IS_PRIMITIVE(val) &&
                 !MarkSharpObjects(cx, JSVAL_TO_OBJECT(val), NULL)) {
                 ok = JS_FALSE;
                 break;
             }
         }
@@ -612,31 +606,26 @@ obj_toSource(JSContext *cx, uintN argc, 
     JSBool ok, outermost;
     JSObject *obj;
     JSHashEntry *he;
     JSIdArray *ida;
     jschar *chars, *ochars, *vsharp;
     const jschar *idstrchars, *vchars;
     size_t nchars, idstrlength, gsoplength, vlength, vsharplength, curlen;
     const char *comma;
-    jsint i, j, length, valcnt;
-    jsid id;
-#if JS_HAS_GETTER_SETTER
     JSObject *obj2;
     JSProperty *prop;
     uintN attrs;
-#endif
     jsval *val;
-    jsval localroot[4] = {JSVAL_NULL, JSVAL_NULL, JSVAL_NULL, JSVAL_NULL};
-    JSString *gsopold[2];
     JSString *gsop[2];
     JSString *idstr, *valstr, *str;
 
     JS_CHECK_RECURSION(cx, return JS_FALSE);
 
+    jsval localroot[4] = {JSVAL_NULL, JSVAL_NULL, JSVAL_NULL, JSVAL_NULL};
     AutoArrayRooter tvr(cx, JS_ARRAY_LENGTH(localroot), localroot);
 
     /* If outermost, we need parentheses to be an expression, not a block. */
     outermost = (cx->sharpObjectMap.depth == 0);
     obj = JS_THIS_OBJECT(cx, vp);
     if (!obj || !(he = js_EnterSharpObject(cx, obj, &ida, &chars))) {
         ok = JS_FALSE;
         goto out;
@@ -695,207 +684,174 @@ obj_toSource(JSContext *cx, uintN argc, 
 
     /*
      * We have four local roots for cooked and raw value GC safety.  Hoist the
      * "localroot + 2" out of the loop using the val local, which refers to
      * the raw (unconverted, "uncooked") values.
      */
     val = localroot + 2;
 
-    for (i = 0, length = ida->length; i < length; i++) {
-        JSBool idIsLexicalIdentifier, needOldStyleGetterSetter;
-
+    for (jsint i = 0, length = ida->length; i < length; i++) {
         /* Get strings for id and value and GC-root them via vp. */
-        id = ida->vector[i];
-
-#if JS_HAS_GETTER_SETTER
+        jsid id = ida->vector[i];
+
         ok = obj->lookupProperty(cx, id, &obj2, &prop);
         if (!ok)
             goto error;
-#endif
 
         /*
          * Convert id to a jsval and then to a string.  Decide early whether we
          * prefer get/set or old getter/setter syntax.
          */
         idstr = js_ValueToString(cx, ID_TO_VALUE(id));
         if (!idstr) {
             ok = JS_FALSE;
             obj2->dropProperty(cx, prop);
             goto error;
         }
         *vp = STRING_TO_JSVAL(idstr);                   /* local root */
-        idIsLexicalIdentifier = js_IsIdentifier(idstr);
-        needOldStyleGetterSetter =
-            !idIsLexicalIdentifier ||
-            js_CheckKeyword(idstr->chars(), idstr->length()) != TOK_EOF;
-
-#if JS_HAS_GETTER_SETTER
-
-        valcnt = 0;
+
+        jsint valcnt = 0;
         if (prop) {
             ok = obj2->getAttributes(cx, id, prop, &attrs);
             if (!ok) {
                 obj2->dropProperty(cx, prop);
                 goto error;
             }
-            if (obj2->isNative() &&
-                (attrs & (JSPROP_GETTER | JSPROP_SETTER))) {
+            if (obj2->isNative() && (attrs & (JSPROP_GETTER | JSPROP_SETTER))) {
                 JSScopeProperty *sprop = (JSScopeProperty *) prop;
                 if (attrs & JSPROP_GETTER) {
                     val[valcnt] = sprop->getterValue();
-                    gsopold[valcnt] =
-                        ATOM_TO_STRING(cx->runtime->atomState.getterAtom);
-                    gsop[valcnt] =
-                        ATOM_TO_STRING(cx->runtime->atomState.getAtom);
-
+                    gsop[valcnt] = ATOM_TO_STRING(cx->runtime->atomState.getAtom);
                     valcnt++;
                 }
                 if (attrs & JSPROP_SETTER) {
                     val[valcnt] = sprop->setterValue();
-                    gsopold[valcnt] =
-                        ATOM_TO_STRING(cx->runtime->atomState.setterAtom);
-                    gsop[valcnt] =
-                        ATOM_TO_STRING(cx->runtime->atomState.setAtom);
-
+                    gsop[valcnt] = ATOM_TO_STRING(cx->runtime->atomState.setAtom);
                     valcnt++;
                 }
             } else {
                 valcnt = 1;
                 gsop[0] = NULL;
-                gsopold[0] = NULL;
                 ok = obj->getProperty(cx, id, &val[0]);
             }
             obj2->dropProperty(cx, prop);
         }
 
-#else  /* !JS_HAS_GETTER_SETTER */
-
-        /*
-         * We simplify the source code at the price of minor dead code bloat in
-         * the ECMA version (for testing only, see jsversion.h).  The null
-         * default values in gsop[j] suffice to disable non-ECMA getter and
-         * setter code.
-         */
-        valcnt = 1;
-        gsop[0] = NULL;
-        gsopold[0] = NULL;
-        ok = obj->getProperty(cx, id, &val[0]);
-
-#endif /* !JS_HAS_GETTER_SETTER */
-
         if (!ok)
             goto error;
 
         /*
-         * If id is a string that's not an identifier, then it needs to be
-         * quoted.  Also, negative integer ids must be quoted.
+         * If id is a string that's not an identifier, or if it's a negative
+         * integer, then it must be quoted.
          */
+        bool idIsLexicalIdentifier = !!js_IsIdentifier(idstr);
         if (JSID_IS_ATOM(id)
             ? !idIsLexicalIdentifier
             : (!JSID_IS_INT(id) || JSID_TO_INT(id) < 0)) {
-            idstr = js_QuoteString(cx, idstr, (jschar)'\'');
+            idstr = js_QuoteString(cx, idstr, jschar('\''));
             if (!idstr) {
                 ok = JS_FALSE;
                 goto error;
             }
             *vp = STRING_TO_JSVAL(idstr);               /* local root */
         }
         idstr->getCharsAndLength(idstrchars, idstrlength);
 
-        for (j = 0; j < valcnt; j++) {
+        for (jsint j = 0; j < valcnt; j++) {
+            /*
+             * Censor an accessor descriptor getter or setter part if it's
+             * undefined.
+             */
+            if (gsop[j] && JSVAL_IS_VOID(val[j]))
+                continue;
+
             /* Convert val[j] to its canonical source form. */
             valstr = js_ValueToSource(cx, val[j]);
             if (!valstr) {
                 ok = JS_FALSE;
                 goto error;
             }
             localroot[j] = STRING_TO_JSVAL(valstr);     /* local root */
             valstr->getCharsAndLength(vchars, vlength);
 
-            if (vchars[0] == '#')
-                needOldStyleGetterSetter = JS_TRUE;
-
-            if (needOldStyleGetterSetter)
-                gsop[j] = gsopold[j];
-
-            /* If val[j] is a non-sharp object, consider sharpening it. */
+            /*
+             * If val[j] is a non-sharp object, and we're not serializing an
+             * accessor (ECMA syntax can't accommodate sharpened accessors),
+             * consider sharpening it.
+             */
             vsharp = NULL;
             vsharplength = 0;
 #if JS_HAS_SHARP_VARS
-            if (!JSVAL_IS_PRIMITIVE(val[j]) && vchars[0] != '#') {
-                he = js_EnterSharpObject(cx, JSVAL_TO_OBJECT(val[j]), NULL,
-                                         &vsharp);
+            if (!gsop[j] && !JSVAL_IS_PRIMITIVE(val[j]) && vchars[0] != '#') {
+                he = js_EnterSharpObject(cx, JSVAL_TO_OBJECT(val[j]), NULL, &vsharp);
                 if (!he) {
                     ok = JS_FALSE;
                     goto error;
                 }
                 if (IS_SHARP(he)) {
                     vchars = vsharp;
                     vlength = js_strlen(vchars);
-                    needOldStyleGetterSetter = JS_TRUE;
-                    gsop[j] = gsopold[j];
                 } else {
                     if (vsharp) {
                         vsharplength = js_strlen(vsharp);
                         MAKE_SHARP(he);
-                        needOldStyleGetterSetter = JS_TRUE;
-                        gsop[j] = gsopold[j];
                     }
                     js_LeaveSharpObject(cx, NULL);
                 }
             }
 #endif
 
-#ifndef OLD_GETTER_SETTER
             /*
              * Remove '(function ' from the beginning of valstr and ')' from the
              * end so that we can put "get" in front of the function definition.
              */
-            if (gsop[j] && VALUE_IS_FUNCTION(cx, val[j]) &&
-                !needOldStyleGetterSetter) {
+            if (gsop[j] && VALUE_IS_FUNCTION(cx, val[j])) {
                 JSFunction *fun = JS_ValueToFunction(cx, val[j]);
                 const jschar *start = vchars;
                 const jschar *end = vchars + vlength;
 
                 uint8 parenChomp = 0;
                 if (vchars[0] == '(') {
                     vchars++;
                     parenChomp = 1;
                 }
 
                 /*
                  * Try to jump "getter" or "setter" keywords, if we suspect
                  * they might appear here.  This code can be confused by people
                  * defining Function.prototype.toString, so let's be cautious.
                  */
-                if (JSFUN_GETTER_TEST(fun->flags) ||
-                    JSFUN_SETTER_TEST(fun->flags)) { /* skip "getter/setter" */
+                if (JSFUN_GETTER_TEST(fun->flags) || JSFUN_SETTER_TEST(fun->flags)) {
+                    /* skip "getter/setter" */
                     const jschar *tmp = js_strchr_limit(vchars, ' ', end);
                     if (tmp)
                         vchars = tmp + 1;
                 }
 
                 /* Try to jump "function" keyword. */
                 if (vchars)
                     vchars = js_strchr_limit(vchars, ' ', end);
 
+                /*
+                 * Jump over the function's name: it can't be encoded as part
+                 * of an ECMA getter or setter.
+                 */
+                if (vchars)
+                    vchars = js_strchr_limit(vchars, '(', end);
+
                 if (vchars) {
                     if (*vchars == ' ')
                         vchars++;
                     vlength = end - vchars - parenChomp;
                 } else {
                     gsop[j] = NULL;
                     vchars = start;
                 }
             }
-#else
-            needOldStyleGetterSetter = JS_TRUE;
-            gsop[j] = gsopold[j];
-#endif
 
 #define SAFE_ADD(n)                                                          \
     JS_BEGIN_MACRO                                                           \
         size_t n_ = (n);                                                     \
         curlen += n_;                                                        \
         if (curlen < n_)                                                     \
             goto overflow;                                                   \
     JS_END_MACRO
@@ -907,59 +863,45 @@ obj_toSource(JSContext *cx, uintN argc, 
             if (gsop[j])
                 SAFE_ADD(gsop[j]->length() + 1);
             SAFE_ADD(vsharplength);
             SAFE_ADD(vlength);
             /* Account for the trailing null. */
             SAFE_ADD((outermost ? 2 : 1) + 1);
 #undef SAFE_ADD
 
-            if (curlen > (size_t)-1 / sizeof(jschar))
+            if (curlen > size_t(-1) / sizeof(jschar))
                 goto overflow;
 
             /* Allocate 1 + 1 at end for closing brace and terminating 0. */
-            chars = (jschar *)
-                js_realloc((ochars = chars), curlen * sizeof(jschar));
+            chars = (jschar *) js_realloc((ochars = chars), curlen * sizeof(jschar));
             if (!chars) {
                 /* Save code space on error: let JS_free ignore null vsharp. */
                 cx->free(vsharp);
                 js_free(ochars);
                 goto error;
             }
 
             if (comma) {
                 chars[nchars++] = comma[0];
                 chars[nchars++] = comma[1];
             }
             comma = ", ";
 
-            if (needOldStyleGetterSetter) {
-                js_strncpy(&chars[nchars], idstrchars, idstrlength);
-                nchars += idstrlength;
-                if (gsop[j]) {
-                    chars[nchars++] = ' ';
-                    gsoplength = gsop[j]->length();
-                    js_strncpy(&chars[nchars], gsop[j]->chars(),
-                               gsoplength);
-                    nchars += gsoplength;
-                }
-                chars[nchars++] = ':';
-            } else {  /* New style "decompilation" */
-                if (gsop[j]) {
-                    gsoplength = gsop[j]->length();
-                    js_strncpy(&chars[nchars], gsop[j]->chars(),
-                               gsoplength);
-                    nchars += gsoplength;
-                    chars[nchars++] = ' ';
-                }
-                js_strncpy(&chars[nchars], idstrchars, idstrlength);
-                nchars += idstrlength;
-                /* Extraneous space after id here will be extracted later */
-                chars[nchars++] = gsop[j] ? ' ' : ':';
+            if (gsop[j]) {
+                gsoplength = gsop[j]->length();
+                js_strncpy(&chars[nchars], gsop[j]->chars(),
+                            gsoplength);
+                nchars += gsoplength;
+                chars[nchars++] = ' ';
             }
+            js_strncpy(&chars[nchars], idstrchars, idstrlength);
+            nchars += idstrlength;
+            /* Extraneous space after id here will be extracted later */
+            chars[nchars++] = gsop[j] ? ' ' : ':';
 
             if (vsharplength) {
                 js_strncpy(&chars[nchars], vsharp, vsharplength);
                 nchars += vsharplength;
             }
             js_strncpy(&chars[nchars], vchars, vlength);
             nchars += vlength;
 
@@ -1791,17 +1733,23 @@ js_PropertyIsEnumerable(JSContext *cx, J
 
     ok = pobj->getAttributes(cx, id, prop, &attrs);
     pobj->dropProperty(cx, prop);
     if (ok)
         *vp = BOOLEAN_TO_JSVAL((attrs & JSPROP_ENUMERATE) != 0);
     return ok;
 }
 
-#if JS_HAS_GETTER_SETTER
+#if OLD_GETTER_SETTER_METHODS
+
+const char js_defineGetter_str[] = "__defineGetter__";
+const char js_defineSetter_str[] = "__defineSetter__";
+const char js_lookupGetter_str[] = "__lookupGetter__";
+const char js_lookupSetter_str[] = "__lookupSetter__";
+
 JS_FRIEND_API(JSBool)
 js_obj_defineGetter(JSContext *cx, uintN argc, jsval *vp)
 {
     jsval fval, junk;
     jsid id;
     JSObject *obj;
     uintN attrs;
 
@@ -1907,17 +1855,17 @@ obj_lookupSetter(JSContext *cx, uintN ar
             sprop = (JSScopeProperty *) prop;
             if (sprop->hasSetterValue())
                 *vp = sprop->setterValue();
         }
         pobj->dropProperty(cx, prop);
     }
     return JS_TRUE;
 }
-#endif /* JS_HAS_GETTER_SETTER */
+#endif /* OLD_GETTER_SETTER_METHODS */
 
 JSBool
 obj_getPrototypeOf(JSContext *cx, uintN argc, jsval *vp)
 {
     JSObject *obj;
     uintN attrs;
 
     if (argc == 0) {
@@ -2715,22 +2663,16 @@ obj_create(JSContext *cx, uintN argc, js
 
 #if JS_HAS_OBJ_WATCHPOINT
 const char js_watch_str[] = "watch";
 const char js_unwatch_str[] = "unwatch";
 #endif
 const char js_hasOwnProperty_str[] = "hasOwnProperty";
 const char js_isPrototypeOf_str[] = "isPrototypeOf";
 const char js_propertyIsEnumerable_str[] = "propertyIsEnumerable";
-#if JS_HAS_GETTER_SETTER
-const char js_defineGetter_str[] = "__defineGetter__";
-const char js_defineSetter_str[] = "__defineSetter__";
-const char js_lookupGetter_str[] = "__lookupGetter__";
-const char js_lookupSetter_str[] = "__lookupSetter__";
-#endif
 
 JS_DEFINE_TRCINFO_1(obj_valueOf,
     (3, (static, JSVAL,     Object_p_valueOf,               CONTEXT, THIS, STRING,  0,
          nanojit::ACC_STORE_ANY)))
 JS_DEFINE_TRCINFO_1(obj_hasOwnProperty,
     (3, (static, BOOL_FAIL, Object_p_hasOwnProperty,        CONTEXT, THIS, STRING,  0,
          nanojit::ACC_STORE_ANY)))
 JS_DEFINE_TRCINFO_1(obj_propertyIsEnumerable,
@@ -2746,17 +2688,17 @@ static JSFunctionSpec object_methods[] =
     JS_TN(js_valueOf_str,              obj_valueOf,                 0,0, &obj_valueOf_trcinfo),
 #if JS_HAS_OBJ_WATCHPOINT
     JS_FN(js_watch_str,                obj_watch,                   2,0),
     JS_FN(js_unwatch_str,              obj_unwatch,                 1,0),
 #endif
     JS_TN(js_hasOwnProperty_str,       obj_hasOwnProperty,          1,0, &obj_hasOwnProperty_trcinfo),
     JS_FN(js_isPrototypeOf_str,        obj_isPrototypeOf,           1,0),
     JS_TN(js_propertyIsEnumerable_str, obj_propertyIsEnumerable,    1,0, &obj_propertyIsEnumerable_trcinfo),
-#if JS_HAS_GETTER_SETTER
+#if OLD_GETTER_SETTER_METHODS
     JS_FN(js_defineGetter_str,         js_obj_defineGetter,         2,0),
     JS_FN(js_defineSetter_str,         js_obj_defineSetter,         2,0),
     JS_FN(js_lookupGetter_str,         obj_lookupGetter,            1,0),
     JS_FN(js_lookupSetter_str,         obj_lookupSetter,            1,0),
 #endif
     JS_FS_END
 };
 
@@ -4391,17 +4333,16 @@ js_DefineNativeProperty(JSContext *cx, J
     JSBool added;
 
     JS_ASSERT((defineHow & ~(JSDNP_CACHE_RESULT | JSDNP_DONT_PURGE | JSDNP_SET_METHOD)) == 0);
     LeaveTraceIfGlobalObject(cx, obj);
 
     /* Convert string indices to integers if appropriate. */
     id = js_CheckForStringIndex(id);
 
-#if JS_HAS_GETTER_SETTER
     /*
      * If defining a getter or setter, we must check for its counterpart and
      * update the attributes and property ops.  A getter or setter is really
      * only half of a property.
      */
     sprop = NULL;
     if (attrs & (JSPROP_GETTER | JSPROP_SETTER)) {
         JSObject *pobj;
@@ -4433,17 +4374,16 @@ js_DefineNativeProperty(JSContext *cx, J
                 goto error;
         } else if (prop) {
             /* NB: call JSObject::dropProperty, as pobj might not be native. */
             pobj->dropProperty(cx, prop);
             prop = NULL;
             sprop = NULL;
         }
     }
-#endif /* JS_HAS_GETTER_SETTER */
 
     /*
      * Purge the property cache of any properties named by id that are about
      * to be shadowed in obj's scope chain unless it is known a priori that it
      * is not possible. We do this before locking obj to avoid nesting locks.
      */
     if (!(defineHow & JSDNP_DONT_PURGE))
         js_PurgeScopeChain(cx, obj, id);
@@ -6847,18 +6787,17 @@ js_DumpAtom(JSAtom *atom)
 
 void
 dumpValue(jsval val)
 {
     if (JSVAL_IS_NULL(val)) {
         fprintf(stderr, "null");
     } else if (JSVAL_IS_VOID(val)) {
         fprintf(stderr, "undefined");
-    } else if (JSVAL_IS_OBJECT(val) &&
-               JSVAL_TO_OBJECT(val)->isFunction()) {
+    } else if (JSVAL_IS_OBJECT(val) && JSVAL_TO_OBJECT(val)->isFunction()) {
         JSObject *funobj = JSVAL_TO_OBJECT(val);
         JSFunction *fun = GET_FUNCTION_PRIVATE(cx, funobj);
         fprintf(stderr, "<%s %s at %p (JSFunction at %p)>",
                 fun->atom ? "function" : "unnamed",
                 fun->atom ? JS_GetStringBytes(ATOM_TO_STRING(fun->atom)) : "function",
                 (void *) funobj,
                 (void *) fun);
     } else if (JSVAL_IS_OBJECT(val)) {
--- a/js/src/jsobj.h
+++ b/js/src/jsobj.h
@@ -708,20 +708,23 @@ js_InitClass(JSContext *cx, JSObject *ob
 /*
  * Select Object.prototype method names shared between jsapi.cpp and jsobj.cpp.
  */
 extern const char js_watch_str[];
 extern const char js_unwatch_str[];
 extern const char js_hasOwnProperty_str[];
 extern const char js_isPrototypeOf_str[];
 extern const char js_propertyIsEnumerable_str[];
+
+#ifdef OLD_GETTER_SETTER_METHODS
 extern const char js_defineGetter_str[];
 extern const char js_defineSetter_str[];
 extern const char js_lookupGetter_str[];
 extern const char js_lookupSetter_str[];
+#endif
 
 extern JSObject *
 js_NewObject(JSContext *cx, JSClass *clasp, JSObject *proto,
              JSObject *parent, size_t objectSize = 0);
 
 /*
  * See jsapi.h, JS_NewObjectWithGivenProto.
  */
--- a/js/src/jsopcode.cpp
+++ b/js/src/jsopcode.cpp
@@ -3442,22 +3442,20 @@ Decompile(SprintStack *ss, jsbytecode *p
                     todo = Sprint(&ss->sprinter,
                                   (JOF_OPMODE(lastop) == JOF_XMLNAME)
                                   ? dot_format
                                   : index_format,
                                   lval, xval);
                 }
                 break;
 
-#if JS_HAS_GETTER_SETTER
               case JSOP_GETTER:
               case JSOP_SETTER:
                 todo = -2;
                 break;
-#endif
 
               case JSOP_DUP2:
                 rval = GetStr(ss, ss->top-2);
                 todo = SprintCString(&ss->sprinter, rval);
                 if (todo < 0 || !PushOff(ss, todo,
                                          (JSOp) ss->opcodes[ss->top-2])) {
                     return NULL;
                 }
@@ -4558,64 +4556,37 @@ Decompile(SprintStack *ss, jsbytecode *p
                     return NULL;
                 isFirst = (ss->opcodes[ss->top - 2] == JSOP_NEWINIT);
                 rval = POP_STR();
                 lval = POP_STR();
                 /* fall through */
 
               do_initprop:
                 maybeComma = isFirst ? "" : ", ";
-#ifdef OLD_GETTER_SETTER
-                todo = Sprint(&ss->sprinter, "%s%s%s%s%s%s%s:%s",
-                              lval,
-                              maybeComma,
-                              xval,
-                              (lastop == JSOP_GETTER || lastop == JSOP_SETTER)
-                              ? " " : "",
-                              (lastop == JSOP_GETTER) ? js_getter_str :
-                              (lastop == JSOP_SETTER) ? js_setter_str :
-                              "",
-                              rval);
-#else
                 if (lastop == JSOP_GETTER || lastop == JSOP_SETTER) {
-                    if (!atom ||
-                        !ATOM_IS_STRING(atom) ||
-                        (ss->opcodes[ss->top+1] != JSOP_LAMBDA &&
-                         ss->opcodes[ss->top+1] != JSOP_LAMBDA_FC)) {
-                        todo = Sprint(&ss->sprinter, "%s%s%s %s: %s",
-                                      lval,
-                                      maybeComma,
-                                      xval,
-                                      (lastop == JSOP_GETTER) ? js_getter_str :
-                                      (lastop == JSOP_SETTER) ? js_setter_str :
-                                      "",
-                                      rval);
-                    } else {
-                        const char *end = rval + strlen(rval);
-
-                        if (*rval == '(')
-                            ++rval, --end;
-                        LOCAL_ASSERT(strncmp(rval, js_function_str, 8) == 0);
-                        LOCAL_ASSERT(rval[8] == ' ');
-                        rval += 8 + 1;
-                        LOCAL_ASSERT(*end ? *end == ')' : end[-1] == '}');
-                        todo = Sprint(&ss->sprinter, "%s%s%s %s%s%.*s",
-                                      lval,
-                                      maybeComma,
-                                      (lastop == JSOP_GETTER)
-                                      ? js_get_str : js_set_str,
-                                      xval,
-                                      (rval[0] != '(') ? " " : "",
-                                      end - rval, rval);
-                    }
+                    const char *end = rval + strlen(rval);
+
+                    if (*rval == '(')
+                        ++rval, --end;
+                    LOCAL_ASSERT(strncmp(rval, js_function_str, 8) == 0);
+                    LOCAL_ASSERT(rval[8] == ' ');
+                    rval += 8 + 1;
+                    LOCAL_ASSERT(*end ? *end == ')' : end[-1] == '}');
+                    todo = Sprint(&ss->sprinter, "%s%s%s %s%s%.*s",
+                                    lval,
+                                    maybeComma,
+                                    (lastop == JSOP_GETTER)
+                                    ? js_get_str : js_set_str,
+                                    xval,
+                                    (rval[0] != '(') ? " " : "",
+                                    end - rval, rval);
                 } else {
                     todo = Sprint(&ss->sprinter, "%s%s%s: %s",
                                   lval, maybeComma, xval, rval);
                 }
-#endif
                 break;
               }
 
 #if JS_HAS_SHARP_VARS
               case JSOP_DEFSHARP:
                 i = (jsint) GET_UINT16(pc + UINT16_LEN);
                 rval = POP_STR();
                 todo = Sprint(&ss->sprinter, "#%u=%s", (unsigned) i, rval);
--- a/js/src/jsops.cpp
+++ b/js/src/jsops.cpp
@@ -1674,17 +1674,17 @@ BEGIN_CASE(JSOP_SETMETHOD)
              * that obj's shape matches.
              *
              * The entry predicts either a new property to be added
              * directly to obj by this set, or on an existing "own"
              * property, or on a prototype property that has a setter.
              */
             JS_ASSERT(entry->vword.isSprop());
             sprop = entry->vword.toSprop();
-            JS_ASSERT(sprop->writable());
+            JS_ASSERT_IF(sprop->isDataDescriptor(), sprop->writable());
             JS_ASSERT_IF(sprop->hasSlot(), entry->vcapTag() == 0);
 
             JSScope *scope = obj->scope();
             JS_ASSERT(!scope->sealed());
 
             /*
              * Fastest path: check whether the cached sprop is already
              * in scope and call NATIVE_SET and break to get out of the
@@ -3174,17 +3174,16 @@ BEGIN_CASE(JSOP_LAMBDA_DBGFC)
 
     PUSH_OPND(OBJECT_TO_JSVAL(obj));
 END_CASE(JSOP_LAMBDA_DBGFC)
 
 BEGIN_CASE(JSOP_CALLEE)
     PUSH_OPND(fp->argv[-2]);
 END_CASE(JSOP_CALLEE)
 
-#if JS_HAS_GETTER_SETTER
 BEGIN_CASE(JSOP_GETTER)
 BEGIN_CASE(JSOP_SETTER)
   do_getter_setter:
     op2 = (JSOp) *++regs.pc;
     switch (op2) {
       case JSOP_INDEXBASE:
         atoms += GET_INDEXBASE(regs.pc);
         regs.pc += JSOP_INDEXBASE_LENGTH - 1;
@@ -3273,17 +3272,16 @@ BEGIN_CASE(JSOP_SETTER)
 
     regs.sp += i;
     if (js_CodeSpec[op2].ndefs > js_CodeSpec[op2].nuses) {
         JS_ASSERT(js_CodeSpec[op2].ndefs == js_CodeSpec[op2].nuses + 1);
         STORE_OPND(-1, rval);
     }
     len = js_CodeSpec[op2].length;
     DO_NEXT_OP(len);
-#endif /* JS_HAS_GETTER_SETTER */
 
 BEGIN_CASE(JSOP_HOLE)
     PUSH_OPND(JSVAL_HOLE);
 END_CASE(JSOP_HOLE)
 
 BEGIN_CASE(JSOP_NEWARRAY)
     len = GET_UINT16(regs.pc);
     cx->fp->assertValidStackDepth(len);
--- a/js/src/jsparse.cpp
+++ b/js/src/jsparse.cpp
@@ -626,55 +626,16 @@ NameNode::create(JSAtom *atom, JSTreeCon
         pn->pn_atom = atom;
         ((NameNode *)pn)->initCommon(tc);
     }
     return (NameNode *)pn;
 }
 
 } /* namespace js */
 
-#if JS_HAS_GETTER_SETTER
-static TokenKind
-CheckGetterOrSetter(JSContext *cx, TokenStream *ts, TokenKind tt)
-{
-    JSAtom *atom;
-    JSRuntime *rt;
-    JSOp op;
-    const char *name;
-
-    JS_ASSERT(ts->currentToken().type == TOK_NAME);
-    atom = ts->currentToken().t_atom;
-    rt = cx->runtime;
-    if (atom == rt->atomState.getterAtom)
-        op = JSOP_GETTER;
-    else if (atom == rt->atomState.setterAtom)
-        op = JSOP_SETTER;
-    else
-        return TOK_NAME;
-    if (ts->peekTokenSameLine() != tt)
-        return TOK_NAME;
-    (void) ts->getToken();
-    if (ts->currentToken().t_op != JSOP_NOP) {
-        ReportCompileErrorNumber(cx, ts, NULL, JSREPORT_ERROR, JSMSG_BAD_GETTER_OR_SETTER,
-                                 (op == JSOP_GETTER) ? js_getter_str : js_setter_str);
-        return TOK_ERROR;
-    }
-    ts->mungeCurrentToken(op);
-    if (JS_HAS_STRICT_OPTION(cx)) {
-        name = js_AtomToPrintableString(cx, atom);
-        if (!name ||
-            !ReportCompileErrorNumber(cx, ts, NULL, JSREPORT_WARNING | JSREPORT_STRICT,
-                                      JSMSG_DEPRECATED_USAGE, name)) {
-            return TOK_ERROR;
-        }
-    }
-    return tt;
-}
-#endif
-
 static bool
 GenerateBlockId(JSTreeContext *tc, uint32& blockid)
 {
     if (tc->blockidGen == JS_BIT(20)) {
         JS_ReportErrorNumber(tc->compiler->context, js_GetErrorMessage, NULL,
                              JSMSG_NEED_DIET, "program");
         return false;
     }
@@ -2550,33 +2511,34 @@ LeaveFunction(JSParseNode *fn, JSTreeCon
 
         funtc->lexdeps.clear();
     }
 
     return true;
 }
 
 JSParseNode *
-JSCompiler::functionDef(uintN lambda)
-{
-    JSOp op;
+JSCompiler::functionDef(uintN lambda, bool namePermitted)
+{
     JSParseNode *pn, *body, *result;
     TokenKind tt;
-    JSAtom *funAtom;
     JSAtomListElement *ale;
 #if JS_HAS_DESTRUCTURING
     JSParseNode *item, *list = NULL;
     bool destructuringArg = false;
     JSAtom *duplicatedArg = NULL;
 #endif
 
+    /*
+     * Save the current op for later so we can tag the created function as a
+     * getter/setter if necessary.
+     */
+    JSOp op = tokenStream.currentToken().t_op;
+
     /* Make a TOK_FUNCTION node. */
-#if JS_HAS_GETTER_SETTER
-    op = tokenStream.currentToken().t_op;
-#endif
     pn = FunctionNode::create(tc);
     if (!pn)
         return NULL;
     pn->pn_body = NULL;
     pn->pn_cookie = FREE_UPVAR_COOKIE;
 
     /*
      * If a lambda, give up on JSOP_{GET,CALL}UPVAR usage unless this function
@@ -2585,27 +2547,29 @@ JSCompiler::functionDef(uintN lambda)
      * Also treat function sub-statements (non-lambda, non-top-level functions)
      * as escaping funargs, since we can't statically analyze their definitions
      * and uses.
      */
     bool topLevel = tc->atTopLevel();
     pn->pn_dflags = (lambda || !topLevel) ? PND_FUNARG : 0;
 
     /* Scan the optional function name into funAtom. */
-    tt = tokenStream.getToken(TSF_KEYWORD_IS_NAME);
-    if (tt == TOK_NAME) {
-        funAtom = tokenStream.currentToken().t_atom;
-    } else {
-        if (lambda == 0 && (context->options & JSOPTION_ANONFUNFIX)) {
-            ReportCompileErrorNumber(context, &tokenStream, NULL, JSREPORT_ERROR,
-                                     JSMSG_SYNTAX_ERROR);
-            return NULL;
-        }
-        funAtom = NULL;
-        tokenStream.ungetToken();
+    JSAtom *funAtom = NULL;
+    if (namePermitted) {
+        tt = tokenStream.getToken(TSF_KEYWORD_IS_NAME);
+        if (tt == TOK_NAME) {
+            funAtom = tokenStream.currentToken().t_atom;
+        } else {
+            if (lambda == 0 && (context->options & JSOPTION_ANONFUNFIX)) {
+                ReportCompileErrorNumber(context, &tokenStream, NULL, JSREPORT_ERROR,
+                                         JSMSG_SYNTAX_ERROR);
+                return NULL;
+            }
+            tokenStream.ungetToken();
+        }
     }
 
     /*
      * Record names for function statements in tc->decls so we know when to
      * avoid optimizing variable references that might name a function.
      */
     if (lambda == 0 && funAtom) {
         ale = tc->decls.lookup(funAtom);
@@ -2714,20 +2678,18 @@ JSCompiler::functionDef(uintN lambda)
     JSTreeContext funtc(tc->compiler);
 
     JSFunctionBox *funbox = EnterFunction(pn, &funtc, funAtom, lambda);
     if (!funbox)
         return NULL;
 
     JSFunction *fun = (JSFunction *) funbox->object;
 
-#if JS_HAS_GETTER_SETTER
     if (op != JSOP_NOP)
         fun->flags |= (op == JSOP_GETTER) ? JSPROP_GETTER : JSPROP_SETTER;
-#endif
 
     /* Now parse formal argument list and compute fun->nargs. */
     MUST_MATCH_TOKEN(TOK_LP, JSMSG_PAREN_BEFORE_FORMAL);
     if (!tokenStream.matchToken(TOK_RP)) {
         do {
             tt = tokenStream.getToken();
             switch (tt) {
 #if JS_HAS_DESTRUCTURING
@@ -2980,23 +2942,23 @@ JSCompiler::functionDef(uintN lambda)
         tokenStream.setStrictMode(false);
 
     return result;
 }
 
 JSParseNode *
 JSCompiler::functionStmt()
 {
-    return functionDef(0);
+    return functionDef(0, true);
 }
 
 JSParseNode *
 JSCompiler::functionExpr()
 {
-    return functionDef(JSFUN_LAMBDA);
+    return functionDef(JSFUN_LAMBDA, true);
 }
 
 /*
  * Recognize Directive Prologue members and directives.  Assuming pn
  * is a candidate for membership in a directive prologue, return
  * true if it is in fact a member.  Recognize directives and set
  * tc's flags accordingly.
  *
@@ -4504,24 +4466,16 @@ JSCompiler::statement()
     JSParseNode *pn, *pn1, *pn2, *pn3, *pn4;
     JSStmtInfo stmtInfo, *stmt, *stmt2;
     JSAtom *label;
 
     JS_CHECK_RECURSION(context, return NULL);
 
     tt = tokenStream.getToken(TSF_OPERAND);
 
-#if JS_HAS_GETTER_SETTER
-    if (tt == TOK_NAME) {
-        tt = CheckGetterOrSetter(context, &tokenStream, TOK_FUNCTION);
-        if (tt == TOK_ERROR)
-            return NULL;
-    }
-#endif
-
     switch (tt) {
       case TOK_FUNCTION:
 #if JS_HAS_XML_SUPPORT
         tt = tokenStream.peekToken(TSF_KEYWORD_IS_NAME);
         if (tt == TOK_DBLCOLON)
             goto expression;
 #endif
         return functionStmt();
@@ -5910,23 +5864,16 @@ JSCompiler::assignExpr()
         return returnOrYield(true);
 #endif
 
     pn = condExpr();
     if (!pn)
         return NULL;
 
     tt = tokenStream.getToken();
-#if JS_HAS_GETTER_SETTER
-    if (tt == TOK_NAME) {
-        tt = CheckGetterOrSetter(context, &tokenStream, TOK_ASSIGN);
-        if (tt == TOK_ERROR)
-            return NULL;
-    }
-#endif
     if (tt != TOK_ASSIGN) {
         tokenStream.ungetToken();
         return pn;
     }
 
     op = tokenStream.currentToken().t_op;
     switch (pn->pn_type) {
       case TOK_NAME:
@@ -7817,24 +7764,16 @@ BlockIdInScope(uintN blockid, JSTreeCont
 JSParseNode *
 JSCompiler::primaryExpr(TokenKind tt, JSBool afterDot)
 {
     JSParseNode *pn, *pn2, *pn3;
     JSOp op;
 
     JS_CHECK_RECURSION(context, return NULL);
 
-#if JS_HAS_GETTER_SETTER
-    if (tt == TOK_NAME) {
-        tt = CheckGetterOrSetter(context, &tokenStream, TOK_FUNCTION);
-        if (tt == TOK_ERROR)
-            return NULL;
-    }
-#endif
-
     switch (tt) {
       case TOK_FUNCTION:
 #if JS_HAS_XML_SUPPORT
         if (tokenStream.matchToken(TOK_DBLCOLON, TSF_KEYWORD_IS_NAME)) {
             pn2 = NullaryNode::create(tc);
             if (!pn2)
                 return NULL;
             pn2->pn_type = TOK_FUNCTION;
@@ -8009,17 +7948,16 @@ JSCompiler::primaryExpr(TokenKind tt, JS
                     atom = js_AtomizeDouble(context, pn3->pn_dval);
                     if (!atom)
                         return NULL;
                 } else {
                     atom = NULL; /* for the compiler */
                 }
                 break;
               case TOK_NAME:
-#if JS_HAS_GETTER_SETTER
                 {
                     atom = tokenStream.currentToken().t_atom;
                     if (atom == context->runtime->atomState.getAtom)
                         op = JSOP_GETTER;
                     else if (atom == context->runtime->atomState.setAtom)
                         op = JSOP_SETTER;
                     else
                         goto property_name;
@@ -8049,43 +7987,33 @@ JSCompiler::primaryExpr(TokenKind tt, JS
 
                     /* We have to fake a 'function' token here. */
                     tokenStream.mungeCurrentToken(TOK_FUNCTION, JSOP_NOP);
                     pn2 = functionExpr();
                     pn2 = JSParseNode::newBinaryOrAppend(TOK_COLON, op, pn3, pn2, tc);
                     goto skip;
                 }
               property_name:
-#endif
               case TOK_STRING:
                 atom = tokenStream.currentToken().t_atom;
                 pn3 = NullaryNode::create(tc);
                 if (!pn3)
                     return NULL;
                 pn3->pn_atom = atom;
                 break;
               case TOK_RC:
                 goto end_obj_init;
               default:
                 ReportCompileErrorNumber(context, &tokenStream, NULL, JSREPORT_ERROR,
                                          JSMSG_BAD_PROP_ID);
                 return NULL;
             }
 
+            op = JSOP_INITPROP;
             tt = tokenStream.getToken();
-            op = JSOP_INITPROP;
-#if JS_HAS_GETTER_SETTER
-            if (tt == TOK_NAME) {
-                tt = CheckGetterOrSetter(context, &tokenStream, TOK_COLON);
-                if (tt == TOK_ERROR)
-                    return NULL;
-                op = tokenStream.currentToken().t_op;
-            }
-#endif
-
             if (tt == TOK_COLON) {
                 pnval = assignExpr();
             } else {
 #if JS_HAS_DESTRUCTURING_SHORTHAND
                 if (tt != TOK_COMMA && tt != TOK_RC) {
 #endif
                     ReportCompileErrorNumber(context, &tokenStream, NULL, JSREPORT_ERROR,
                                              JSMSG_COLON_AFTER_ID);
@@ -8103,19 +8031,17 @@ JSCompiler::primaryExpr(TokenKind tt, JS
                 if (pnval->pn_type == TOK_NAME) {
                     pnval->pn_arity = PN_NAME;
                     ((NameNode *)pnval)->initCommon(tc);
                 }
 #endif
             }
 
             pn2 = JSParseNode::newBinaryOrAppend(TOK_COLON, op, pn3, pnval, tc);
-#if JS_HAS_GETTER_SETTER
           skip:
-#endif
             if (!pn2)
                 return NULL;
             pn->append(pn2);
 
             /*
              * In strict mode code, check for duplicate property names.  Treat
              * getters and setters as distinct attributes of each property.  A
              * plain old value conflicts with a getter or a setter.
--- a/js/src/jsparse.h
+++ b/js/src/jsparse.h
@@ -1020,17 +1020,17 @@ private:
     JSParseNode *primaryExpr(js::TokenKind tt, JSBool afterDot);
     JSParseNode *parenExpr(JSParseNode *pn1, JSBool *genexp);
 
     /*
      * Additional JS parsers.
      */
     bool recognizeDirectivePrologue(JSParseNode *pn);
     JSParseNode *functionBody();
-    JSParseNode *functionDef(uintN lambda);
+    JSParseNode *functionDef(uintN lambda, bool namePermitted);
     JSParseNode *condition();
     JSParseNode *comprehensionTail(JSParseNode *kid, uintN blockid,
                                    js::TokenKind type = js::TOK_SEMI, JSOp op = JSOP_NOP);
     JSParseNode *generatorExpr(JSParseNode *pn, JSParseNode *kid);
     JSBool argumentList(JSParseNode *listNode);
     JSParseNode *bracketedExpr();
     JSParseNode *letBlock(JSBool statement);
     JSParseNode *returnOrYield(bool useAssignExpr);
--- a/js/src/jsscope.cpp
+++ b/js/src/jsscope.cpp
@@ -733,18 +733,16 @@ JSScope::addProperty(JSContext *cx, jsid
                      JSPropertyOp getter, JSPropertyOp setter,
                      uint32 slot, uintN attrs,
                      uintN flags, intN shortid)
 {
     JS_ASSERT(JS_IS_SCOPE_LOCKED(cx, this));
     CHECK_ANCESTOR_LINE(this, true);
 
     JS_ASSERT(!JSVAL_IS_NULL(id));
-    JS_ASSERT_IF(attrs & JSPROP_GETTER, getter);
-    JS_ASSERT_IF(attrs & JSPROP_SETTER, setter);
     JS_ASSERT_IF(!cx->runtime->gcRegenShapes,
                  hasRegenFlag(cx->runtime->gcRegenShapesScopeFlag));
 
     /*
      * You can't add properties to a sealed scope. But note well that you can
      * change property attributes in a sealed scope, even though that replaces
      * a JSScopeProperty * in the scope's hash table -- but no id is added, so
      * the scope remains sealed.
@@ -1277,26 +1275,24 @@ PrintPropertyMethod(JSTracer *trc, char 
 
 void
 JSScopeProperty::trace(JSTracer *trc)
 {
     if (IS_GC_MARKING_TRACER(trc))
         mark();
     js_TraceId(trc, id);
 
-#if JS_HAS_GETTER_SETTER
     if (attrs & (JSPROP_GETTER | JSPROP_SETTER)) {
         if ((attrs & JSPROP_GETTER) && rawGetter) {
             JS_SET_TRACING_DETAILS(trc, PrintPropertyGetterOrSetter, this, 0);
             js_CallGCMarker(trc, getterObject(), JSTRACE_OBJECT);
         }
         if ((attrs & JSPROP_SETTER) && rawSetter) {
             JS_SET_TRACING_DETAILS(trc, PrintPropertyGetterOrSetter, this, 1);
             js_CallGCMarker(trc, setterObject(), JSTRACE_OBJECT);
         }
     }
-#endif /* JS_HAS_GETTER_SETTER */
 
     if (isMethod()) {
         JS_SET_TRACING_DETAILS(trc, PrintPropertyMethod, this, 0);
         js_CallGCMarker(trc, methodObject(), JSTRACE_OBJECT);
     }
 }
--- a/js/src/jsversion.h
+++ b/js/src/jsversion.h
@@ -88,17 +88,16 @@
 #define JS_HAS_OBJ_WATCHPOINT   0       /* has o.watch and o.unwatch */
 #define JS_HAS_EVAL_THIS_SCOPE  0       /* Math.eval is same as with (Math) */
 #define JS_HAS_SHARP_VARS       0       /* has #n=, #n# for object literals */
 #define JS_HAS_XDR              0       /* has XDR API and internal support */
 #define JS_HAS_TOSOURCE         0       /* has Object/Array toSource method */
 #define JS_HAS_DEBUGGER_KEYWORD 0       /* has hook for debugger keyword */
 #define JS_HAS_CATCH_GUARD      0       /* has exception handling catch guard */
 #define JS_HAS_SPARSE_ARRAYS    0       /* array methods preserve empty elems */
-#define JS_HAS_GETTER_SETTER    0       /* has JS2 getter/setter functions */
 #define JS_HAS_UNEVAL           0       /* has uneval() top-level function */
 #define JS_HAS_CONST            0       /* has JS2 const as alternative var */
 #define JS_HAS_FUN_EXPR_STMT    0       /* has function expression statement */
 #define JS_HAS_NO_SUCH_METHOD   0       /* has o.__noSuchMethod__ handler */
 #define JS_HAS_XML_SUPPORT      0       /* has ECMAScript for XML support */
 #define JS_HAS_ARRAY_EXTRAS     0       /* has indexOf and Lispy extras */
 #define JS_HAS_GENERATORS       0       /* has yield in generator function */
 #define JS_HAS_BLOCK_SCOPE      0       /* has block scope via let/arraycomp */
@@ -118,17 +117,16 @@
 #define JS_HAS_OBJ_WATCHPOINT   1       /* has o.watch and o.unwatch */
 #define JS_HAS_EVAL_THIS_SCOPE  1       /* Math.eval is same as with (Math) */
 #define JS_HAS_SHARP_VARS       1       /* has #n=, #n# for object literals */
 #define JS_HAS_XDR              1       /* has XDR API and internal support */
 #define JS_HAS_TOSOURCE         1       /* has Object/Array toSource method */
 #define JS_HAS_DEBUGGER_KEYWORD 1       /* has hook for debugger keyword */
 #define JS_HAS_CATCH_GUARD      1       /* has exception handling catch guard */
 #define JS_HAS_SPARSE_ARRAYS    0       /* array methods preserve empty elems */
-#define JS_HAS_GETTER_SETTER    1       /* has JS2 getter/setter functions */
 #define JS_HAS_UNEVAL           1       /* has uneval() top-level function */
 #define JS_HAS_CONST            1       /* has JS2 const as alternative var */
 #define JS_HAS_FUN_EXPR_STMT    1       /* has function expression statement */
 #define JS_HAS_NO_SUCH_METHOD   1       /* has o.__noSuchMethod__ handler */
 #define JS_HAS_XML_SUPPORT      0       /* has ECMAScript for XML support */
 #define JS_HAS_ARRAY_EXTRAS     0       /* has indexOf and Lispy extras */
 #define JS_HAS_GENERATORS       0       /* has yield in generator function */
 #define JS_HAS_BLOCK_SCOPE      0       /* has block scope via let/arraycomp */
@@ -144,17 +142,16 @@
 #define JS_HAS_OBJ_WATCHPOINT   1       /* has o.watch and o.unwatch */
 #define JS_HAS_EVAL_THIS_SCOPE  1       /* Math.eval is same as with (Math) */
 #define JS_HAS_SHARP_VARS       1       /* has #n=, #n# for object literals */
 #define JS_HAS_XDR              1       /* has XDR API and internal support */
 #define JS_HAS_TOSOURCE         1       /* has Object/Array toSource method */
 #define JS_HAS_DEBUGGER_KEYWORD 1       /* has hook for debugger keyword */
 #define JS_HAS_CATCH_GUARD      1       /* has exception handling catch guard */
 #define JS_HAS_SPARSE_ARRAYS    0       /* array methods preserve empty elems */
-#define JS_HAS_GETTER_SETTER    1       /* has JS2 getter/setter functions */
 #define JS_HAS_UNEVAL           1       /* has uneval() top-level function */
 #define JS_HAS_CONST            1       /* has JS2 const as alternative var */
 #define JS_HAS_FUN_EXPR_STMT    1       /* has function expression statement */
 #define JS_HAS_NO_SUCH_METHOD   1       /* has o.__noSuchMethod__ handler */
 #define JS_HAS_XML_SUPPORT      1       /* has ECMAScript for XML support */
 #define JS_HAS_ARRAY_EXTRAS     1       /* has indexOf and Lispy extras */
 #define JS_HAS_GENERATORS       0       /* has yield in generator function */
 #define JS_HAS_BLOCK_SCOPE      0       /* has block scope via let/arraycomp */
@@ -170,17 +167,16 @@
 #define JS_HAS_OBJ_WATCHPOINT   1       /* has o.watch and o.unwatch */
 #define JS_HAS_EVAL_THIS_SCOPE  1       /* Math.eval is same as with (Math) */
 #define JS_HAS_SHARP_VARS       1       /* has #n=, #n# for object literals */
 #define JS_HAS_XDR              1       /* has XDR API and internal support */
 #define JS_HAS_TOSOURCE         1       /* has Object/Array toSource method */
 #define JS_HAS_DEBUGGER_KEYWORD 1       /* has hook for debugger keyword */
 #define JS_HAS_CATCH_GUARD      1       /* has exception handling catch guard */
 #define JS_HAS_SPARSE_ARRAYS    0       /* array methods preserve empty elems */
-#define JS_HAS_GETTER_SETTER    1       /* has JS2 getter/setter functions */
 #define JS_HAS_UNEVAL           1       /* has uneval() top-level function */
 #define JS_HAS_CONST            1       /* has JS2 const as alternative var */
 #define JS_HAS_FUN_EXPR_STMT    1       /* has function expression statement */
 #define JS_HAS_NO_SUCH_METHOD   1       /* has o.__noSuchMethod__ handler */
 #define JS_HAS_XML_SUPPORT      1       /* has ECMAScript for XML support */
 #define JS_HAS_ARRAY_EXTRAS     1       /* has indexOf and Lispy extras */
 #define JS_HAS_GENERATORS       1       /* has yield in generator function */
 #define JS_HAS_BLOCK_SCOPE      1       /* has block scope via let/arraycomp */
@@ -196,17 +192,16 @@
 #define JS_HAS_OBJ_WATCHPOINT   1       /* has o.watch and o.unwatch */
 #define JS_HAS_EVAL_THIS_SCOPE  1       /* Math.eval is same as with (Math) */
 #define JS_HAS_SHARP_VARS       1       /* has #n=, #n# for object literals */
 #define JS_HAS_XDR              1       /* has XDR API and internal support */
 #define JS_HAS_TOSOURCE         1       /* has Object/Array toSource method */
 #define JS_HAS_DEBUGGER_KEYWORD 1       /* has hook for debugger keyword */
 #define JS_HAS_CATCH_GUARD      1       /* has exception handling catch guard */
 #define JS_HAS_SPARSE_ARRAYS    0       /* array methods preserve empty elems */
-#define JS_HAS_GETTER_SETTER    1       /* has JS2 getter/setter functions */
 #define JS_HAS_UNEVAL           1       /* has uneval() top-level function */
 #define JS_HAS_CONST            1       /* has JS2 const as alternative var */
 #define JS_HAS_FUN_EXPR_STMT    1       /* has function expression statement */
 #define JS_HAS_NO_SUCH_METHOD   1       /* has o.__noSuchMethod__ handler */
 #define JS_HAS_XML_SUPPORT      1       /* has ECMAScript for XML support */
 #define JS_HAS_ARRAY_EXTRAS     1       /* has indexOf and Lispy extras */
 #define JS_HAS_GENERATORS       1       /* has yield in generator function */
 #define JS_HAS_BLOCK_SCOPE      1       /* has block scope via let/arraycomp */
@@ -221,8 +216,14 @@
 #endif
 
 /* Features that are present in all versions. */
 #define JS_HAS_RESERVED_JAVA_KEYWORDS   1
 #define JS_HAS_RESERVED_ECMA_KEYWORDS   1
 
 /* Feature-test macro for evolving destructuring support. */
 #define JS_HAS_DESTRUCTURING_SHORTHAND  (JS_HAS_DESTRUCTURING == 2)
+
+/*
+ * Feature for Object.prototype.__{define,lookup}{G,S}etter__ legacy support;
+ * support likely to be made opt-in at some future time.
+ */
+#define OLD_GETTER_SETTER_METHODS       1
--- a/js/src/tests/e4x/extensions/regress-352846-01.js
+++ b/js/src/tests/e4x/extensions/regress-352846-01.js
@@ -44,17 +44,19 @@ var actual = 'No Crash';
 var expect = 'No Crash';
 
 printBugNumber(BUGNUMBER);
 START(summary);
 
 function prepare_xml()
 {
   delete XML.prototype.function::toString;
-  Object.prototype.toString getter = toSource_getter;
+  Object.defineProperty(Object.prototype, "toString",
+                        { get: toSource_getter, enumerable: true,
+                          configurable: true });
   return new XML("<a>xml_text</a>");
 }
 
 var counter = 0;
 
 function toSource_getter()
 {
   // Make sure that lastInternalResult does not contain prepare_xml
--- a/js/src/tests/e4x/extensions/regress-352846-02.js
+++ b/js/src/tests/e4x/extensions/regress-352846-02.js
@@ -46,17 +46,19 @@ var expect = 'No Crash';
 printBugNumber(BUGNUMBER);
 START(summary);
 
 var counter = 0;
 
 function prepare_xml()
 {
   delete XML.prototype.function::toString;
-  Object.prototype.toString getter = toSource_getter;
+  Object.defineProperty(Object.prototype, "toString",
+                        { get: toSource_getter, enumerable: true,
+                          configurable: true });
   return new XML("<a>xml_text</a>");
 }
 
 function toSource_getter()
 {
   // Make sure that lastInternalResult does not contain prepare_xml
   var tmp = { toSource: function() { return [1,2,3]; } };
   uneval(tmp);
--- a/js/src/tests/e4x/extensions/regress-352846-03.js
+++ b/js/src/tests/e4x/extensions/regress-352846-03.js
@@ -46,17 +46,19 @@ var expect = 'No Crash';
 printBugNumber(BUGNUMBER);
 START(summary);
 
 var counter = 0;
 
 function prepare_xml()
 {
   delete XML.prototype.function::toString;
-  Object.prototype.toString getter = toSource_getter;
+  Object.defineProperty(Object.prototype, "toString",
+                        { get: toSource_getter, enumerable: true,
+                          configurable: true });
   return new XML("<a>xml_text</a>");
 }
 
 function toSource_getter()
 {
   // Make sure that lastInternalResult does not contain prepare_xml
   var tmp = { toSource: function() { return [1,2,3]; } };
   uneval(tmp);
@@ -73,14 +75,19 @@ function toSource_getter()
   // check if prepare_xml() was rooted.
   return function() {
     print("xxx");
     return this.toXMLString();
   };
 }
 
 var obj = { };
-obj.length getter = prepare_xml;
+Object.defineProperty(obj, "length",
+{
+  get: prepare_xml,
+  enumerable: true,
+  configurable: true
+});
 Array.reverse(obj);
 
 TEST(1, expect, actual);
 
 END();
--- a/js/src/tests/e4x/extensions/regress-353165.js
+++ b/js/src/tests/e4x/extensions/regress-353165.js
@@ -51,29 +51,31 @@ crash2();
 
 END();
 
 function crash1()
 {
     try {
         var set = new XML('<a><b>text</b></a>').children('b');
         var counter = 0;
-        Object.prototype.unrooter getter = function() {
+        Object.defineProperty(Object.prototype, "unrooter",
+        { enumerable: true, configurable: true,
+          get: function() {
             ++counter;
             if (counter == 5) {
                 set[0] = new XML('<c/>');
                 if (typeof gc == "function") {
                     gc();
                     var tmp = Math.sqrt(2), tmp2;
                     for (i = 0; i != 50000; ++i)
                         tmp2 = tmp / 2;
                 }
             }
             return undefined;
-        }
+          } });
 
         set.unrooter();
     }
     catch(ex) {
         print('1: ' + ex);
     }
     TEST(1, expect, actual);
 
@@ -85,31 +87,33 @@ function crash2() {
 
         var set = <a><b>{expected}</b></a>.children('b');
         var counter = 0;
 
         function unrooter_impl() {
                 return String(this);
         }
 
-        Object.prototype.unrooter getter = function() {
+        Object.defineProperty(Object.prototype, "unrooter",
+        { enumerable: true, configurable: true,
+          get: function() {
             ++counter;
             if (counter == 7)
             return unrooter_impl;
             if (counter == 5) {
                 set[0] = new XML('<c/>');
                 if (typeof gc == "function") {
                     gc();
                     var tmp = 1e500, tmp2;
                     for (i = 0; i != 50000; ++i)
                         tmp2 = tmp / 1.1;
                 }
             }
             return undefined;
-        }
+          } });
 
         set.unrooter();
     }
     catch(ex) {
         print('2: ' + ex);
     }
     TEST(2, expect, actual);
 }
--- a/js/src/tests/ecma_5/strict/11.1.5.js
+++ b/js/src/tests/ecma_5/strict/11.1.5.js
@@ -118,25 +118,9 @@ assertEq(testLenientAndStrict('({get x()
                               parseRaisesException(SyntaxError)),
          true);
 
 assertEq(testLenientAndStrict('({get x() {}, set x() {}, y:1})',
                               parsesSuccessfully,
                               parsesSuccessfully),
          true);
 
-/* Use the old getter/setter syntax as well. */
-assertEq(testLenientAndStrict('({get x() {}, x getter: function() {}})',
-                              parsesSuccessfully,
-                              parseRaisesException(SyntaxError)),
-         true);
-
-assertEq(testLenientAndStrict('({x getter: function() {}, get x() {}})',
-                              parsesSuccessfully,
-                              parseRaisesException(SyntaxError)),
-         true);
-
-assertEq(testLenientAndStrict('({x getter: function() {}, x getter: function() {}})',
-                              parsesSuccessfully,
-                              parseRaisesException(SyntaxError)),
-         true);
-
 reportCompare(true, true);
--- a/js/src/tests/js1_5/GC/regress-316885-01.js
+++ b/js/src/tests/js1_5/GC/regress-316885-01.js
@@ -43,20 +43,20 @@ var actual = '';
 var expect = '';
 
 printBugNumber(BUGNUMBER);
 printStatus (summary);
 
 var str_with_num = "0.1";
 
 var obj = {
-  elem getter: function() {
+  get elem() {
     return str_with_num;
   },
-  elem setter: function(value) {
+  set elem(value) {
     gc();
   }
 
 };
 
 expect = Number(str_with_num);
 actual = obj.elem++;
 
--- a/js/src/tests/js1_5/GetSet/getset-002.js
+++ b/js/src/tests/js1_5/GetSet/getset-002.js
@@ -38,28 +38,28 @@
  *
  * ***** END LICENSE BLOCK ***** */
 
 var gTestfile = 'getset-002.js';
 
 var t = {   
   _y: "<initial y>",
 
-  y getter: function get_y ()
+  get y()
   {
     var rv;
     if (typeof this._y == "string")
       rv = "got " + this._y;
     else
       rv = this._y;
 
     return rv;
   },
 
-  y setter: function set_y (newVal)
+  set y(newVal)
   {
     this._y = newVal;
   }
 }
 
 
   test(t);
 
--- a/js/src/tests/js1_5/Regress/regress-355341.js
+++ b/js/src/tests/js1_5/Regress/regress-355341.js
@@ -48,14 +48,15 @@ test();
 //-----------------------------------------------------------------------------
 
 function test()
 {
   enterFunc ('test');
   printBugNumber(BUGNUMBER);
   printStatus (summary);
  
-  this.x setter= Function; this.watch('x', function () { }); x = 3;
+  Object.defineProperty(this, "x", { set: Function, enumerable: true, configurable: true });
+  this.watch('x', function () { }); x = 3;
 
   reportCompare(expect, actual, summary);
 
   exitFunc ('test');
 }
--- a/js/src/tests/js1_5/Regress/regress-361617.js
+++ b/js/src/tests/js1_5/Regress/regress-361617.js
@@ -48,19 +48,21 @@ test();
 //-----------------------------------------------------------------------------
 
 function test()
 {
   enterFunc ('test');
   printBugNumber(BUGNUMBER);
   printStatus (summary);
  
-  (function() { this.x getter= function(){} })();
+  (function() {
+    Object.defineProperty(this, "x", { get: function(){}, enumerable: true, configurable: true });
+  })();
   this.watch('x', print);
-  this.x getter= function(){};
+  Object.defineProperty(this, "x", { get: function(){}, enumerable: true, configurable: true });
   gc();
   this.unwatch('x');
   x;
 
   reportCompare(expect, actual, summary);
 
   exitFunc ('test');
 }
--- a/js/src/tests/js1_5/decompilation/jstests.list
+++ b/js/src/tests/js1_5/decompilation/jstests.list
@@ -35,19 +35,17 @@ script regress-352453.js
 script regress-352649.js
 script regress-352873-01.js
 script regress-352873-02.js
 script regress-353000.js
 script regress-353120.js
 script regress-353146.js
 skip script regress-354878.js # obsolete test
 script regress-354910.js
-script regress-355992.js
 script regress-356083.js
-script regress-356248.js
 script regress-371692.js
 skip script regress-373678.js # obsolete test
 script regress-375639.js
 script regress-375882.js
 script regress-376564.js
 script regress-383721.js
 script regress-406555.js
 skip script regress-437288-02.js # obsolete test
deleted file mode 100644
--- a/js/src/tests/js1_5/decompilation/regress-355992.js
+++ /dev/null
@@ -1,62 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is JavaScript Engine testing utilities.
- *
- * The Initial Developer of the Original Code is
- * Mozilla Foundation.
- * Portions created by the Initial Developer are Copyright (C) 2006
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s): Jesse Ruderman
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-var gTestfile = 'regress-355992.js';
-//-----------------------------------------------------------------------------
-var BUGNUMBER = 355992;
-var summary = 'Non-function setter';
-var actual = '';
-var expect = '';
-
-
-//-----------------------------------------------------------------------------
-test();
-//-----------------------------------------------------------------------------
-
-function test()
-{
-  enterFunc ('test');
-  printBugNumber(BUGNUMBER);
-  printStatus (summary);
- 
-  var f = function() { return { x setter: 3 }; }
-  expect = 'function() { return { x setter: 3 }; }';
-  actual = f + '';
-  compareSource(expect, actual, summary);
-
-  exitFunc ('test');
-}
--- a/js/src/tests/js1_5/decompilation/regress-356083.js
+++ b/js/src/tests/js1_5/decompilation/regress-356083.js
@@ -33,34 +33,34 @@
  * the provisions above, a recipient may use your version of this file under
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
 var gTestfile = 'regress-356083.js';
 //-----------------------------------------------------------------------------
 var BUGNUMBER = 356083;
-var summary = 'decompilation for ({this setter: function () { } }) ';
+var summary = 'decompilation for (function () {return {set this(v) {}};}) ';
 var actual = '';
 var expect = '';
 
 
 //-----------------------------------------------------------------------------
 test();
 //-----------------------------------------------------------------------------
 
 function test()
 {
   enterFunc ('test');
   printBugNumber(BUGNUMBER);
   printStatus (summary);
  
-  var f = function() { return {this setter: function () { } }; } ;
+  var f = function() { return { set this() { } }; } ;
   expect = 'function() { return { set this() { } }; }';
   actual = f + '';
 
   compareSource(expect, actual, summary);
 
-  expect = "({'' setter:(function () {})})";
+  expect = "({ set ''() {} })";
   actual = uneval({ set ''() {} });
-  reportCompare(expect, actual, expect);
+  compareSource(expect, actual, expect);
   exitFunc ('test');
 }
deleted file mode 100644
--- a/js/src/tests/js1_5/decompilation/regress-356248.js
+++ /dev/null
@@ -1,63 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is JavaScript Engine testing utilities.
- *
- * The Initial Developer of the Original Code is
- * Mozilla Foundation.
- * Portions created by the Initial Developer are Copyright (C) 2007
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s): Jesse Ruderman
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-var gTestfile = 'regress-356248.js';
-//-----------------------------------------------------------------------------
-var BUGNUMBER = 356248;
-var summary = 'Decompilation of object literal with named getter';
-var actual = '';
-var expect = '';
-
-
-//-----------------------------------------------------------------------------
-test();
-//-----------------------------------------------------------------------------
-
-function test()
-{
-  enterFunc ('test');
-  printBugNumber(BUGNUMBER);
-  printStatus (summary);
- 
-  var f = function() { return {p setter: function y() { } } };
-  expect = 'function ( ) { return { set p y ( ) { } } ; } ';
-  actual = f + '';
-
-  compareSource(expect, actual, summary);
-
-  exitFunc ('test');
-}
--- a/js/src/tests/js1_5/extensions/getset-001.js
+++ b/js/src/tests/js1_5/extensions/getset-001.js
@@ -42,36 +42,33 @@ var gTestfile = 'getset-001.js';
    
 function TestObject ()
 {
   /* A warm, dry place for properties and methods to live */
 }
 
 TestObject.prototype._y = "<initial y>";
    
-TestObject.prototype.y getter =
-  function get_y ()
+Object.defineProperty(TestObject.prototype, "y",
 {
-  var rv;
-   
-  if (typeof this._y == "string")
-    rv = "got " + this._y;
-  else
-    rv = this._y;
-   
-  return rv;
-}
+  enumerable: true, configurable: true,
+  get: function get_y ()
+  {
+    var rv;
+    if (typeof this._y == "string")
+      rv = "got " + this._y;
+    else
+      rv = this._y;
+    return rv;
+  },
+  set: function set_y (newVal) { this._y = newVal; }
+});
 
-  TestObject.prototype.y setter =
-  function set_y (newVal)
-{
-  this._y = newVal;
-}
 
-    test(new TestObject());
+test(new TestObject());
 
 function test(t)
 {
   enterFunc ("test");
    
   printStatus ("Basic Getter/ Setter test");
   reportCompare ("<initial y>", t._y, "y prototype check");
 
--- a/js/src/tests/js1_5/extensions/getset-003.js
+++ b/js/src/tests/js1_5/extensions/getset-003.js
@@ -60,18 +60,22 @@ var obj = {};
 var obj2 = {};
 var s = '';
 
 
 // SECTION1: define getter/setter directly on an object (not its prototype)
 obj = new Object();
 obj.nameSETS = 0;
 obj.nameGETS = 0;
-obj.name setter = function(newValue) {this._name=newValue; this.nameSETS++;}
-  obj.name getter = function() {this.nameGETS++; return this._name;}
+Object.defineProperty(obj, "name",
+{
+  enumerable: true, configurable: true,
+  set: function(newValue) {this._name=newValue; this.nameSETS++;},
+  get: function() {this.nameGETS++; return this._name;}
+});
 
     status = 'In SECTION1 of test after 0 sets, 0 gets';
 actual = [obj.nameSETS,obj.nameGETS];
 expect = [0,0];
 addThis();
 
 s = obj.name;
 status = 'In SECTION1 of test after 0 sets, 1 get';
@@ -90,18 +94,22 @@ status = 'In SECTION1 of test after 2 se
 actual = [obj.nameSETS,obj.nameGETS];
 expect = [2,2];
 addThis();
 
 
 // SECTION2: define getter/setter in Object.prototype
 Object.prototype.nameSETS = 0;
 Object.prototype.nameGETS = 0;
-Object.prototype.name setter = function(newValue) {this._name=newValue; this.nameSETS++;}
-  Object.prototype.name getter = function() {this.nameGETS++; return this._name;}
+Object.defineProperty(Object.prototype, "name",
+{
+  enumerable: true, configurable: true,
+  set: function(newValue) {this._name=newValue; this.nameSETS++;},
+  get: function() {this.nameGETS++; return this._name;}
+});
 
     obj = new Object();
 status = 'In SECTION2 of test after 0 sets, 0 gets';
 actual = [obj.nameSETS,obj.nameGETS];
 expect = [0,0];
 addThis();
 
 s = obj.name;
@@ -124,18 +132,22 @@ addThis();
 
 
 // SECTION 3: define getter/setter in prototype of user-defined constructor
 function TestObject()
 {
 }
 TestObject.prototype.nameSETS = 0;
 TestObject.prototype.nameGETS = 0;
-TestObject.prototype.name setter = function(newValue) {this._name=newValue; this.nameSETS++;}
-  TestObject.prototype.name getter = function() {this.nameGETS++; return this._name;}
+Object.defineProperty(TestObject.prototype, "name",
+{
+  enumerable: true, configurable: true,
+  set: function(newValue) {this._name=newValue; this.nameSETS++;},
+  get: function() {this.nameGETS++; return this._name;}
+});
     TestObject.prototype.name = cnDEFAULT;
 
 obj = new TestObject();
 status = 'In SECTION3 of test after 1 set, 0 gets'; // (we set a default value in the prototype)
 actual = [obj.nameSETS,obj.nameGETS];
 expect = [1,0];
 addThis();
 
--- a/js/src/tests/js1_5/extensions/jstests.list
+++ b/js/src/tests/js1_5/extensions/jstests.list
@@ -62,51 +62,44 @@ script regress-341956-01.js
 script regress-341956-02.js
 script regress-341956-03.js
 skip-if(!xulRuntime.shell&&(xulRuntime.OS=="WINNT"||xulRuntime.OS=="Linux")) script regress-342960.js # bug 528464
 skip script regress-345967.js # slow
 script regress-346494-01.js
 script regress-346494.js
 random script regress-347306-02.js # BigO
 script regress-348986.js
-script regress-349616.js
 script regress-350312-01.js
 script regress-350312-02.js
 script regress-350312-03.js
 skip script regress-350531.js # slow
 script regress-351102-01.js
 script regress-351102-02.js
 script regress-351102-06.js
 script regress-351448.js
 script regress-351463-01.js
 script regress-351973.js
-script regress-352060.js
-script regress-352094.js
 script regress-352261.js
 skip script regress-352281.js # obsolete test
 script regress-352291.js
 script regress-352372.js
-script regress-352455.js
 script regress-352604.js
 script regress-353214.js
 script regress-354297.js
 script regress-354541-01.js
 script regress-354541-02.js
 script regress-354541-03.js
 script regress-354541-04.js
 script regress-355339.js
 script regress-355497.js
 skip script regress-355622.js # obsolete test
 script regress-355655.js
 script regress-355736.js
 script regress-355820.js
 script regress-355982.js
-script regress-356085.js
-script regress-356106.js
-script regress-356378.js
 script regress-356402.js
 script regress-358594-01.js
 script regress-358594-02.js
 script regress-358594-03.js
 script regress-358594-04.js
 script regress-358594-05.js
 script regress-358594-06.js
 script regress-359024.js
@@ -148,23 +141,20 @@ random-if(xulRuntime.OS=="WINNT") script
 script regress-372309.js
 script regress-374589.js
 script regress-375183.js
 script regress-375344.js
 script regress-375801.js
 script regress-376052.js
 script regress-379523.js
 script regress-380581.js
-script regress-380831.js
 script regress-380889.js
-script regress-381205.js
 script regress-381211.js
 script regress-381304.js
 script regress-382509.js
-script regress-383965.js
 script regress-384680.js
 script regress-385134.js
 script regress-385393-02.js
 script regress-385393-09.js
 script regress-390597.js
 script regress-390598.js
 script regress-394967.js
 script regress-396326.js
@@ -178,17 +168,16 @@ script regress-416354.js
 script regress-416460.js
 script regress-416834.js
 skip script regress-418730.js # obsolete test
 script regress-420612.js
 script regress-420869-01.js
 skip script regress-421621.js # obsolete test
 script regress-422137.js
 script regress-422592.js
-script regress-424257.js
 script regress-424683-01.js
 script regress-426711.js
 script regress-427196-01.js
 script regress-427196-02.js
 script regress-427196-03.js
 script regress-429264.js
 skip script regress-429739.js # Bug 520778 - wontfix
 script regress-431428.js
deleted file mode 100644
--- a/js/src/tests/js1_5/extensions/regress-349616.js
+++ /dev/null
@@ -1,69 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is JavaScript Engine testing utilities.
- *
- * The Initial Developer of the Original Code is
- * Mozilla Foundation.
- * Portions created by the Initial Developer are Copyright (C) 2006
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s): Jesse Ruderman
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-var gTestfile = 'regress-349616.js';
-//-----------------------------------------------------------------------------
-var BUGNUMBER = 349616;
-var summary = 'decompilation of getter keyword';
-var actual = '';
-var expect = '';
-
-
-//-----------------------------------------------------------------------------
-test();
-//-----------------------------------------------------------------------------
-
-function test()
-{
-  enterFunc ('test');
-  printBugNumber(BUGNUMBER);
-  printStatus (summary);
-
-  var f;
-  f = function() {
-    window.foo getter = function() { return 5; };
-    print(window.foo);
-  }
-
-  actual = f + '';
-  expect = 'function () {\n    window.foo getter= ' +
-    'function () {return 5;};\n    print(window.foo);\n}';
-
-  compareSource(expect, actual, summary);
-
-  exitFunc ('test');
-}
deleted file mode 100644
--- a/js/src/tests/js1_5/extensions/regress-352060.js
+++ /dev/null
@@ -1,80 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is JavaScript Engine testing utilities.
- *
- * The Initial Developer of the Original Code is
- * Mozilla Foundation.
- * Portions created by the Initial Developer are Copyright (C) 2006
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s): Jesse Ruderman
- *                 Robert Sayre
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-var gTestfile = 'regress-352060.js';
-//-----------------------------------------------------------------------------
-var BUGNUMBER = 352060;
-var summary = 'decompilation of getter, setter revisited';
-var actual = '';
-var expect = '';
-
-
-//-----------------------------------------------------------------------------
-test();
-//-----------------------------------------------------------------------------
-
-function test()
-{
-  enterFunc ('test');
-  printBugNumber(BUGNUMBER);
-  printStatus (summary);
- 
-  var f;
-
-  f = function() { foo setter = function(){} }
-  expect = 'function() { foo setter = function(){}; }';
-  actual = f + '';
-  compareSource(expect, actual, summary);
-
-  f = function() { foo.bar setter = function(){} }
-  expect = 'function() { foo.bar setter = function(){}; }';
-  actual = f + '';
-  compareSource(expect, actual, summary);
-
-  f = function(){ var y = new Array(); y[0] getter = function(){}; }
-  expect = 'function(){ var y = new Array(); y[0] getter = function(){}; } ';
-  actual = f + '';
-  compareSource(expect, actual, summary);
-
-  f = function(){ var foo = <foo bar="baz"/>; foo.@bar getter = function(){}; }
-  expect = 'function(){ var foo = <foo bar="baz"/>; foo.@bar getter = function(){}; }';
-  actual = f + '';
-  compareSource(expect, actual, summary);
-
-  exitFunc ('test');
-}
deleted file mode 100644
--- a/js/src/tests/js1_5/extensions/regress-352094.js
+++ /dev/null
@@ -1,79 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is JavaScript Engine testing utilities.
- *
- * The Initial Developer of the Original Code is
- * Mozilla Foundation.
- * Portions created by the Initial Developer are Copyright (C) 2006
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s): Jesse Ruderman
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-var gTestfile = 'regress-352094.js';
-//-----------------------------------------------------------------------------
-var BUGNUMBER = 352094;
-var summary = 'Do not crash with invalid setter usage';
-var actual = 'No Crash';
-var expect = 'SyntaxError: invalid setter usage';
-
-
-//-----------------------------------------------------------------------------
-test();
-//-----------------------------------------------------------------------------
-
-function test()
-{
-  enterFunc ('test');
-  printBugNumber(BUGNUMBER);
-  printStatus (summary);
- 
-  try
-  {
-    eval('(function(){ this.p setter = 0 })()');
-  }
-  catch(ex)
-  {
-    actual = ex + '';
-  }
-
-  reportCompare(expect, actual, summary);
-
-  try
-  {
-    eval('(function(){ this.p setter = 0 })()');
-  }
-  catch(ex)
-  {
-    actual = ex + '';
-  }
-
-  reportCompare(expect, actual, summary);
-
-  exitFunc ('test');
-}
deleted file mode 100644
--- a/js/src/tests/js1_5/extensions/regress-352455.js
+++ /dev/null
@@ -1,67 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is JavaScript Engine testing utilities.
- *
- * The Initial Developer of the Original Code is
- * Mozilla Foundation.
- * Portions created by the Initial Developer are Copyright (C) 2006
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s): Jesse Ruderman
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-var gTestfile = 'regress-352455.js';
-//-----------------------------------------------------------------------------
-var BUGNUMBER = 352455;
-var summary = 'Eval object with non-function getters/setters';
-var actual = '';
-var expect = '';
-
-
-//-----------------------------------------------------------------------------
-test();
-//-----------------------------------------------------------------------------
-
-function test()
-{
-  enterFunc ('test');
-  printBugNumber(BUGNUMBER);
-  printStatus (summary);
-
-  print('If the test harness fails on this bug, the test fails.');
- 
-  expect = 'SyntaxError: invalid getter usage';
-  z = ({});
-  try { eval('z.x getter= 5;'); } catch(ex) { actual = ex + '';}
-  print("This line should not be the last output you see.");
-  try { print(uneval(z)); } catch(e) { print("Threw!"); print(e); }
-
-  reportCompare(expect, actual, summary);
-
-  exitFunc ('test');
-}
deleted file mode 100644
--- a/js/src/tests/js1_5/extensions/regress-356085.js
+++ /dev/null
@@ -1,62 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is JavaScript Engine testing utilities.
- *
- * The Initial Developer of the Original Code is
- * Mozilla Foundation.
- * Portions created by the Initial Developer are Copyright (C) 2006
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s): Jesse Ruderman
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-var gTestfile = 'regress-356085.js';
-//-----------------------------------------------------------------------------
-var BUGNUMBER = 356085;
-var summary = 'js_obj_toString for getter/setter';
-var actual = '';
-var expect = '';
-
-
-//-----------------------------------------------------------------------------
-test();
-//-----------------------------------------------------------------------------
-
-function test()
-{
-  enterFunc ('test');
-  printBugNumber(BUGNUMBER);
-  printStatus (summary);
- 
-  expect = '({ set p y() { } })';
-  actual = uneval({p setter: function y() { } });
-
-  compareSource(expect, actual, summary);
-
-  exitFunc ('test');
-}
deleted file mode 100644
--- a/js/src/tests/js1_5/extensions/regress-356106.js
+++ /dev/null
@@ -1,61 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is JavaScript Engine testing utilities.
- *
- * The Initial Developer of the Original Code is
- * Mozilla Foundation.
- * Portions created by the Initial Developer are Copyright (C) 2007
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s): Jesse Ruderman
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-var gTestfile = 'regress-356106.js';
-//-----------------------------------------------------------------------------
-var BUGNUMBER = 356106;
-var summary = "Do not assert: rval[strlen(rval)-1] == '}'";
-var actual = 'No Crash';
-var expect = 'No Crash';
-
-
-//-----------------------------------------------------------------------------
-test();
-//-----------------------------------------------------------------------------
-
-function test()
-{
-  enterFunc ('test');
-  printBugNumber(BUGNUMBER);
-  printStatus (summary);
- 
-  (function() { return ({x setter: function(){} | 5 }) });
-
-  reportCompare(expect, actual, summary);
-
-  exitFunc ('test');
-}
deleted file mode 100644
--- a/js/src/tests/js1_5/extensions/regress-356378.js
+++ /dev/null
@@ -1,69 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is JavaScript Engine testing utilities.
- *
- * The Initial Developer of the Original Code is
- * Mozilla Foundation.
- * Portions created by the Initial Developer are Copyright (C) 2007
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s): Jesse Ruderman
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-var gTestfile = 'regress-356378.js';
-//-----------------------------------------------------------------------------
-var BUGNUMBER = 356378;
-var summary = 'var x; x getter= function () { };';
-var actual = '';
-var expect = '';
-
-
-//-----------------------------------------------------------------------------
-test();
-//-----------------------------------------------------------------------------
-
-function test()
-{
-  enterFunc ('test');
-  printBugNumber(BUGNUMBER);
-  printStatus (summary);
-
-  expect = 'SyntaxError: invalid getter usage';
-  try
-  {
-    eval('(function() { var x; x getter= function () { }; })();');
-  }
-  catch(ex)
-  {
-    actual = ex + '';
-  }
-
-  reportCompare(expect, actual, summary);
-
-  exitFunc ('test');
-}
--- a/js/src/tests/js1_5/extensions/regress-358594-01.js
+++ b/js/src/tests/js1_5/extensions/regress-358594-01.js
@@ -52,14 +52,14 @@ function test()
 {
   enterFunc ('test');
   printBugNumber(BUGNUMBER);
   printStatus (summary);
 
   // don't crash|assert
   function f() { } 
   f.__proto__ = this; 
-  this.m setter = f; 
+  Object.defineProperty(this, "m", { set: f, enumerable: true, configurable: true });
   uneval(this);
   reportCompare(expect, actual, summary);
 
   exitFunc ('test');
 }
--- a/js/src/tests/js1_5/extensions/regress-358594-02.js
+++ b/js/src/tests/js1_5/extensions/regress-358594-02.js
@@ -44,11 +44,11 @@ var actual = '';
 var expect = '';
 
 printBugNumber(BUGNUMBER);
 printStatus (summary);
 
 // don't crash|assert
 function f() { } 
 f.__proto__ = this; 
-this.m setter = f; 
+Object.defineProperty(this, "m", { set: f, enumerable: true, configurable: true });
 uneval(this);
 reportCompare(expect, actual, summary);
--- a/js/src/tests/js1_5/extensions/regress-358594-03.js
+++ b/js/src/tests/js1_5/extensions/regress-358594-03.js
@@ -51,14 +51,14 @@ function test()
 {
   enterFunc ('test');
   printBugNumber(BUGNUMBER);
   printStatus (summary);
 
   // don't crash|assert
   f = function () { };
   f.__proto__ = this; 
-  this.m setter = f; 
+  Object.defineProperty(this, "m", { set: f, enumerable: true, configurable: true });
   uneval(this);
   reportCompare(expect, actual, summary);
 
   exitFunc ('test');
 }
--- a/js/src/tests/js1_5/extensions/regress-358594-04.js
+++ b/js/src/tests/js1_5/extensions/regress-358594-04.js
@@ -44,11 +44,11 @@ var actual = '';
 var expect = '';
 
 printBugNumber(BUGNUMBER);
 printStatus (summary);
 
 // don't crash|assert
 f = function () { };
 f.__proto__ = this; 
-this.m setter = f; 
+Object.defineProperty(this, "m", { set: f, enumerable: true, configurable: true });
 uneval(this);
 reportCompare(expect, actual, summary);
--- a/js/src/tests/js1_5/extensions/regress-358594-05.js
+++ b/js/src/tests/js1_5/extensions/regress-358594-05.js
@@ -52,14 +52,14 @@ function test()
 {
   enterFunc ('test');
   printBugNumber(BUGNUMBER);
   printStatus (summary);
 
   // don't crash|assert
   f = function () { };
   f.hhhhhhhhh = this; 
-  this.m setter = f; 
+  Object.defineProperty(this, "m", { set: f, enumerable: true, configurable: true });
   uneval(this);
   reportCompare(expect, actual, summary);
 
   exitFunc ('test');
 }
--- a/js/src/tests/js1_5/extensions/regress-358594-06.js
+++ b/js/src/tests/js1_5/extensions/regress-358594-06.js
@@ -44,11 +44,11 @@ var actual = '';
 var expect = '';
 
 printBugNumber(BUGNUMBER);
 printStatus (summary);
 
 // don't crash|assert
 f = function () { };
 f.hhhhhhhhh = this; 
-this.m setter = f; 
+Object.defineProperty(this, "m", { set: f, enumerable: true, configurable: true });
 uneval(this);
 reportCompare(expect, actual, summary);
--- a/js/src/tests/js1_5/extensions/regress-361346.js
+++ b/js/src/tests/js1_5/extensions/regress-361346.js
@@ -42,14 +42,14 @@ var summary = 'Crash with setter, watch,
 var actual = '';
 var expect = '';
 
 printBugNumber(BUGNUMBER);
 printStatus (summary);
  
 expect = actual = 'No Crash';
 
-this.x setter= new Function;
+Object.defineProperty(this, "x", { set: new Function, enumerable: true, configurable: true });
 this.watch('x', function(){});
 gc();
 x = {};
 
 reportCompare(expect, actual, summary);
--- a/js/src/tests/js1_5/extensions/regress-380581.js
+++ b/js/src/tests/js1_5/extensions/regress-380581.js
@@ -49,22 +49,14 @@ test();
 //-----------------------------------------------------------------------------
 
 function test()
 {
   enterFunc ('test');
   printBugNumber(BUGNUMBER);
   printStatus (summary);
  
-  expect = '({ set x () {}})';
-  actual = uneval({x setter: eval("(function () { })") });
-  compareSource(expect, actual, summary);
-  
-  expect = '(function() { })';
-  actual = uneval(eval("(function() { })"));
-  compareSource(expect, actual, summary);
-    
   expect = '(function() { })';
   actual = uneval(eval("(function() { })"));
   compareSource(expect, actual, summary);
 
   exitFunc ('test');
 }
deleted file mode 100644
--- a/js/src/tests/js1_5/extensions/regress-380831.js
+++ /dev/null
@@ -1,81 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is JavaScript Engine testing utilities.
- *
- * The Initial Developer of the Original Code is
- * Mozilla Foundation.
- * Portions created by the Initial Developer are Copyright (C) 2007
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s): Jesse Ruderman
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-var gTestfile = 'regress-380831.js';
-//-----------------------------------------------------------------------------
-var BUGNUMBER = 380831;
-var summary = 'uneval trying to output a getter function that is a sharp definition';
-var actual = '';
-var expect = '';
-
-//-----------------------------------------------------------------------------
-test();
-//-----------------------------------------------------------------------------
-
-function test()
-{
-  enterFunc ('test');
-  printBugNumber(BUGNUMBER);
-  printStatus (summary);
- 
-  var f;
-
-  expect = '( { b getter : # 1 = ( function ( ) { } ) , c getter : # 1 # } )';
-  a = {}; 
-  f = function() { }; 
-  a.b getter = f; 
-  a.c getter = f;
-  actual = uneval(a);
-  compareSource(expect, actual, summary);
-
-  expect = 'function ( ) { return { get x ( ) { } } ; }';
-  f = function() { return { x getter: function(){} } };
-  actual = f + '';
-  compareSource(expect, actual, summary);
-
-  expect = 'function ( ) { return { x getter : # 1 = function ( ) { } } ; }';
-  f = function() { return { x getter: #1=function(){} } }; 
-  actual = f + '';
-  compareSource(expect, actual, summary);
-
-  expect = 'function ( ) { return { x getter : # 1 # } ; }';
-  f = function() { return { x getter: #1# } };
-  actual = f + '';
-  compareSource(expect, actual, summary);
-
-  exitFunc ('test');
-}
deleted file mode 100644
--- a/js/src/tests/js1_5/extensions/regress-381205.js
+++ /dev/null
@@ -1,52 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is JavaScript Engine testing utilities.
- *
- * The Initial Developer of the Original Code is
- * Mozilla Foundation.
- * Portions created by the Initial Developer are Copyright (C) 2007
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s): Jesse Ruderman
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-var gTestfile = 'regress-381205.js';
-
-//-----------------------------------------------------------------------------
-var BUGNUMBER = 381205;
-var summary = 'uneval with special getter functions';
-var actual = '';
-var expect = '';
-
-printBugNumber(BUGNUMBER);
-printStatus (summary);
- 
-expect = '({get x p() {print(4);}})';
-getter function p() { print(4) }
-actual =  uneval({x getter: this.__lookupGetter__("p")});
-reportCompare(expect, actual, summary + ': global');
--- a/js/src/tests/js1_5/extensions/regress-381304.js
+++ b/js/src/tests/js1_5/extensions/regress-381304.js
@@ -57,57 +57,46 @@ function test()
 
   print('1');
 
   obj = {
     set inn(value) {this.for = value;}, 
     get inn() {return this.for;}
   };
 
-  expect = '({get inn() {return this.for;}, set inn(value) {this.for = value;}})';
+  expect = '({get inn() { return this.for; }, set inn(value) { this.for = value; } })';
   actual = obj.toSource();
   compareSource(expect, actual, summary + ': 1');
 
   print('2');
 
   obj = {
     set in(value) {this.for = value;}, 
     get in() {return this.for;}
   };
 
-  expect = '( { in getter : ( function ( ) { return this . for ; } ) , in setter : ( function ( value ) { this . for = value ; } ) } )';
+  expect = '({ get in() { return this.for; }, set in(value) { this.for = value; } })';
   actual = obj.toSource();
   compareSource(expect, actual, summary + ': 2');
 
   print('3');
 
   obj = {
-    get in(value) {this.for = value;}, 
-    set in() {return this.for;}
-  };
-
-  expect = '( { in getter : ( function ( value ) { this . for = value ; } ) , in setter : ( function ( ) { return this . for ; } ) } ) ';
-  actual = obj.toSource();
-  compareSource(expect, actual, summary + ': 3');
-
-  print('4');
-
-  obj = {
     set inn(value) {this.for = value;}, 
     get in() {return this.for;}
   };
 
-  expect = '( { set inn ( value ) { this . for = value ; } , in getter : ( function ( ) { return this . for ; } ) } )';
+  expect = '({ set inn(value) { this.for = value; }, get in() { return this.for; } })';
   actual = obj.toSource();
   compareSource(expect, actual, summary + ': 4');
 
-  print('5');
+  print('4');
 
   obj = {
     set in(value) {this.for = value;}, 
     get inn() {return this.for;}
   };
 
-  expect = ' ( { in setter : ( function ( value ) { this . for = value ; } ) , get inn ( ) { return this . for ; } } ) ';
+  expect = ' ({ set in(value) { this.for = value; }, get inn() { return this.for; } })';
   actual = obj.toSource();
   compareSource(expect, actual, summary + ': 5');
   exitFunc ('test');
 }
deleted file mode 100644
--- a/js/src/tests/js1_5/extensions/regress-383965.js
+++ /dev/null
@@ -1,57 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is JavaScript Engine testing utilities.
- *
- * The Initial Developer of the Original Code is
- * Mozilla Foundation.
- * Portions created by the Initial Developer are Copyright (C) 2007
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s): Jesse Ruderman
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-var gTestfile = 'regress-383965.js';
-//-----------------------------------------------------------------------------
-var BUGNUMBER = 383965;
-var summary = 'getter function with toSource';
-var actual = '';
-var expect = '';
-
-printBugNumber(BUGNUMBER);
-printStatus (summary);
- 
-expect = /({get aaa :{}})|({aaa:{}})/;
-
-getter function aaa(){};
-var obj = {};
-var gett = this.__lookupGetter__("aaa");
-gett.__proto__ = obj;
-obj.__defineGetter__("aaa", gett);
-actual = obj.toSource();
-
-reportMatch(expect, actual, summary);
deleted file mode 100644
--- a/js/src/tests/js1_5/extensions/regress-424257.js
+++ /dev/null
@@ -1,69 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is JavaScript Engine testing utilities.
- *
- * The Initial Developer of the Original Code is
- * Mozilla Foundation.
- * Portions created by the Initial Developer are Copyright (C) 2007
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s): Gary Kwong
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-var gTestfile = 'regress-424257.js';
-//-----------------------------------------------------------------------------
-var BUGNUMBER = 424257;
-var summary = 'Do not assert: op2 == JSOP_INITELEM';
-var actual = 'No Crash';
-var expect = 'No Crash';
-
-
-//-----------------------------------------------------------------------------
-test();
-//-----------------------------------------------------------------------------
-
-function test()
-{
-  enterFunc ('test');
-  printBugNumber(BUGNUMBER);
-  printStatus (summary);
- 
-  try
-  {
-    eval("var x; while(x getter={});");
-  }
-  catch(ex)
-  {
-    expect = 'SyntaxError: invalid getter usage';
-    actual = ex + '';
-  }
-
-  reportCompare(expect, actual, summary);
-
-  exitFunc ('test');
-}
--- a/js/src/tests/js1_5/extensions/regress-452178.js
+++ b/js/src/tests/js1_5/extensions/regress-452178.js
@@ -49,16 +49,17 @@ test();
 function test()
 {
   enterFunc ('test');
   printBugNumber(BUGNUMBER);
   printStatus (summary);
 
   jit(true);
 
-  q getter= function(){}; for (var j = 0; j < 4; ++j) q = 1;
+  Object.defineProperty(this, "q", { get: function(){}, enumerable: true, configurable: true });
+  for (var j = 0; j < 4; ++j) q = 1;
 
   jit(false);
 
   reportCompare(expect, actual, summary);
 
   exitFunc ('test');
 }
--- a/js/src/tests/js1_6/extensions/regress-352392.js
+++ b/js/src/tests/js1_6/extensions/regress-352392.js
@@ -52,17 +52,17 @@ function test()
   enterFunc ('test');
   printBugNumber(BUGNUMBER);
   printStatus (summary);
 
   expect = 'SyntaxError: invalid for each loop';
   try
   {
     var obj = { };
-    obj.y getter = Array.prototype.map;
+    Object.defineProperty(obj, "y", { get: Array.prototype.map, enumerable: true, configurable: true });
     eval('(function() { for each(let z in obj) { } })()');
   }
   catch(ex)
   {
     actual = ex + '';
   }
 
   reportCompare(expect, actual, summary);
--- a/js/src/tests/js1_7/decompilation/jstests.list
+++ b/js/src/tests/js1_7/decompilation/jstests.list
@@ -40,13 +40,11 @@ script regress-355105.js
 script regress-355635.js
 script regress-355786.js
 script regress-356247.js
 skip script regress-371802.js # obsolete test
 script regress-374713.js
 script regress-375794.js
 script regress-379925.js
 script regress-380506.js
-script regress-381101.js
-script regress-381108.js
 script regress-410571.js
 script regress-410649.js
 script regress-429252.js
deleted file mode 100644
--- a/js/src/tests/js1_7/decompilation/regress-381101.js
+++ /dev/null
@@ -1,63 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is JavaScript Engine testing utilities.
- *
- * The Initial Developer of the Original Code is
- * Mozilla Foundation.
- * Portions created by the Initial Developer are Copyright (C) 2007
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s): Jesse Ruderman
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-var gTestfile = 'regress-381101.js';
-
-//-----------------------------------------------------------------------------
-var BUGNUMBER = 381101;
-var summary = 'Decompilation of setter';
-var actual = '';
-var expect = '';
-
-
-//-----------------------------------------------------------------------------
-test();
-//-----------------------------------------------------------------------------
-
-function test()
-{
-  enterFunc ('test');
-  printBugNumber(BUGNUMBER);
-  printStatus (summary);
- 
-  var f = (function(){ ({ x setter: function(){} + {} }) });
-  expect = 'function(){ ({ x setter: function(){} + {} }); }';
-  actual = f + '';
-  compareSource(expect, actual, summary);
-
-  exitFunc ('test');
-}
deleted file mode 100644
--- a/js/src/tests/js1_7/decompilation/regress-381108.js
+++ /dev/null
@@ -1,64 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is JavaScript Engine testing utilities.
- *
- * The Initial Developer of the Original Code is
- * Mozilla Foundation.
- * Portions created by the Initial Developer are Copyright (C) 2007
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s): Jesse Ruderman
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-var gTestfile = 'regress-381108.js';
-
-//-----------------------------------------------------------------------------
-var BUGNUMBER = 381108;
-var summary = 'decompilation of object literal should have space following :';
-var actual = '';
-var expect = '';
-
-
-//-----------------------------------------------------------------------------
-test();
-//-----------------------------------------------------------------------------
-
-function test()
-{
-  enterFunc ('test');
-  printBugNumber(BUGNUMBER);
-  printStatus (summary);
- 
-  var f = (function() { return {a:3, b getter: f} });
-  expect = true;
-  actual = /a: 3, b getter: f/.test(f + '');
-
-  reportCompare(expect, actual, summary);
-
-  exitFunc ('test');
-}
--- a/js/src/tests/js1_7/decompilation/regress-410571.js
+++ b/js/src/tests/js1_7/decompilation/regress-410571.js
@@ -106,33 +106,16 @@ var tests =
        {
          return typeof rv === "object" &&
                 rv.x === 3 &&
                 rv.y === 17 &&
                 getProps(rv) === "x,y";
        }
       ]
    },
-   {
-    fun: function()
-    {
-      function q() { return 32; }
-      var x = { x getter: q };
-      yield x;
-    },
-    generates:
-      [
-       function(rv)
-       {
-         return typeof rv === "object" &&
-                getProps(rv) === "x" &&
-                rv.x === 32;
-       }
-      ]
-   },
   ];
 
 function checkItems(name, gen)
 {
   var i = 0;
   for (var item in gen)
   {
     if (!test.generates[i](item))
--- a/js/src/tests/js1_7/extensions/jstests.list
+++ b/js/src/tests/js1_7/extensions/jstests.list
@@ -37,17 +37,16 @@ script regress-355583.js
 script regress-363040-01.js
 script regress-363040-02.js
 script regress-366668-01.js
 script regress-366668-02.js
 script regress-367629.js
 script regress-368213.js
 script regress-368224.js
 script regress-372364.js
-script regress-379482.js
 script regress-379566.js
 script regress-380933.js
 script regress-381301.js
 script regress-381303.js
 script regress-387955-01.js
 script regress-387955-02.js
 script regress-392308.js
 script regress-396326.js
--- a/js/src/tests/js1_7/extensions/regress-367629.js
+++ b/js/src/tests/js1_7/extensions/regress-367629.js
@@ -49,18 +49,23 @@ test();
 //-----------------------------------------------------------------------------
 
 function test()
 {
   enterFunc ('test');
   printBugNumber(BUGNUMBER);
   printStatus (summary);
  
-  var a = {}; 
-  a.h getter = encodeURI; 
+  var a =
+    Object.defineProperty({}, "h",
+    {
+      get: encodeURI,
+      enumerable: true,
+      configurable: true
+    });
 
-  expect = '({get h encodeURI() {[native code]}})';
+  expect = '({get h() {[native code]}})';
   actual = uneval(a);      
 
-  reportCompare(expect, actual, summary);
+  compareSource(expect, actual, summary);
 
   exitFunc ('test');
 }
deleted file mode 100644
--- a/js/src/tests/js1_7/extensions/regress-379482.js
+++ /dev/null
@@ -1,64 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is JavaScript Engine testing utilities.
- *
- * The Initial Developer of the Original Code is
- * Mozilla Foundation.
- * Portions created by the Initial Developer are Copyright (C) 2007
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s): Jesse Ruderman
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-var gTestfile = 'regress-379482.js';
-
-//-----------------------------------------------------------------------------
-var BUGNUMBER = 379482;
-var summary = 'Decompilation of float setter';
-var actual = '';
-var expect = '';
-
-
-//-----------------------------------------------------------------------------
-test();
-//-----------------------------------------------------------------------------
-
-function test()
-{
-  enterFunc ('test');
-  printBugNumber(BUGNUMBER);
-  printStatus (summary);
- 
-  var f = function() { ({ 1.1 setter: 2 }) };
-
-  expect = 'function() { ({ 1.1 setter: 2 }); }';
-  actual = f + '';
-  compareSource(expect, actual, summary);
-
-  exitFunc ('test');
-}
--- a/js/src/tests/js1_7/extensions/regress-379566.js
+++ b/js/src/tests/js1_7/extensions/regress-379566.js
@@ -50,18 +50,18 @@ test();
 
 function test()
 {
   enterFunc ('test');
   printBugNumber(BUGNUMBER);
   printStatus (summary);
  
   expect = '({ ' +
-    'in getter : (function () { return this.for; }), ' + 
-    'in setter : (function (value) { this.for = value; }) ' + 
+    'get in () { return this.for; }, ' + 
+    'set in (value) { this.for = value; } ' + 
     '})';
   try
   {
     var obj = eval('({ ' +
                    'get in() { return this.for; }, ' + 
                    'set in(value) { this.for = value; } ' + 
                    '})');
     actual = obj.toSource();
--- a/js/src/tests/js1_7/extensions/regress-380933.js
+++ b/js/src/tests/js1_7/extensions/regress-380933.js
@@ -50,17 +50,23 @@ test();
 
 function test()
 {
   enterFunc ('test');
   printBugNumber(BUGNUMBER);
   printStatus (summary);
  
   var f = (function(){}); 
-  var y = ({p getter: f}); 
+  var y =
+    Object.defineProperty({}, "p",
+    {
+      get: f,
+      enumerable: true,
+      configurable: true
+    });
   f.__proto__ = []; 
 
   expect = /TypeError: Array.prototype.toSource called on incompatible Function/;
   try
   {
     uneval(y);
     actual = 'No Error';
   }
--- a/js/src/tests/js1_7/extensions/regress-381301.js
+++ b/js/src/tests/js1_7/extensions/regress-381301.js
@@ -49,15 +49,17 @@ test();
 //-----------------------------------------------------------------------------
 
 function test()
 {
   enterFunc ('test');
   printBugNumber(BUGNUMBER);
   printStatus (summary);
 
-  expect = '( { get x decodeURI ( ) { [ native code ] } } )';
-  actual =  uneval({x getter: decodeURI});
+  var o =
+    Object.defineProperty({}, "x", { get: decodeURI, enumerable: true, configurable: true });
+  expect = '( { get x ( ) { [ native code ] } } )';
+  actual =  uneval(o);
 
   compareSource(expect, actual, summary);
 
   exitFunc ('test');
 }
--- a/js/src/tests/js1_7/extensions/regress-476257.js
+++ b/js/src/tests/js1_7/extensions/regress-476257.js
@@ -45,35 +45,43 @@ var expect = '';
 printBugNumber(BUGNUMBER);
 printStatus (summary);
  
 jit(true);
 
 function f1() {
   try
   {
-    __proto__.functional getter = function ()
+    Object.defineProperty(__proto__, "functional",
+    {
+      enumerable: true, configurable: true,
+      get: function ()
       {
         if (typeof gczeal == 'function') { gczeal(0); }
       }
+    });
     for each (let [[]] in [true, new Boolean(true), new Boolean(true)]) {}
   }
   catch(ex)
   {
     print(ex + '');
   }
 }
 
 function f2() {
   try
   {
-    __proto__.functional getter = function () 
+    Object.defineProperty(__proto__, "functional",
+    {
+      enumerable: true, configurable: true,
+      get: function () 
       { 
         if (typeof dis == 'function') { dis(); } 
       }
+    });
     for each (let [[]] in [true, new Boolean(true), new Boolean(true)]) {}
   }
   catch(ex)
   {
     print(ex + '');
   }
 }
 
--- a/js/src/tests/js1_7/regress/regress-385133-01.js
+++ b/js/src/tests/js1_7/regress/regress-385133-01.js
@@ -50,17 +50,17 @@ test();
 function test()
 {
   enterFunc ('test');
   printBugNumber(BUGNUMBER);
   printStatus (summary);
 
   try
   { 
-    this.x setter= ({}.watch);
+    Object.defineProperty(this, "x", { set: {}.watch, enumerable: true, configurable: true });
     this.watch('x', 'foo'.split);
     delete x;
     function g(){ x = 1; yield; }
     for (i in g()) { }
   }
   catch(ex)
   {
     print(ex + '');
--- a/js/src/tests/js1_7/regress/regress-385133-02.js
+++ b/js/src/tests/js1_7/regress/regress-385133-02.js
@@ -50,17 +50,17 @@ test();
 function test()
 {
   enterFunc ('test');
   printBugNumber(BUGNUMBER);
   printStatus (summary);
 
   try
   { 
-    this.x setter = ({}.watch);
+    Object.defineProperty(this, "x", { set: {}.watch, enumerable: true, configurable: true });
     function g() { x = 1; yield; }
     g().next();
   }
   catch(ex)
   {
     print(ex + '');
   }
   reportCompare(expect, actual, summary);
--- a/js/src/tests/js1_8/extensions/regress-473040.js
+++ b/js/src/tests/js1_8/extensions/regress-473040.js
@@ -42,15 +42,19 @@ var summary = 'Do not assert: tm->reserv
 var actual = '';
 var expect = '';
 
 printBugNumber(BUGNUMBER);
 printStatus (summary);
  
 jit(true);
 
-__proto__.functional getter= (new Function("gc()"));
+Object.defineProperty(__proto__, "functional",
+{
+  enumerable: true, configurable: true,
+  get: new Function("gc()")
+});
 for each (let x in [new Boolean(true), new Boolean(true), -0, new
                     Boolean(true), -0]) { undefined; }
 
 jit(false);
 
 reportCompare(expect, actual, summary);
--- a/js/src/tests/js1_8/extensions/regress-482263.js
+++ b/js/src/tests/js1_8/extensions/regress-482263.js
@@ -42,16 +42,20 @@ var summary = 'TM: Do not assert: x->opr
 var actual = '';
 var expect = '';
 
 printBugNumber(BUGNUMBER);
 printStatus (summary);
 
 jit(true);
 
-__proto__.x getter= function () { return <y/>.([]) };
+Object.defineProperty(__proto__, "x",
+{
+  enumerable: true, configurable: true,
+  get: function () { return <y/>.([]) }
+});
 for each (let x in []) { for each (let x in ['', '']) { } }
 
 jit(true);
 
 reportCompare(expect, actual, summary);
 
 delete __proto__.x;
--- a/js/src/tests/js1_8/genexps/regress-380237-03.js
+++ b/js/src/tests/js1_8/genexps/regress-380237-03.js
@@ -181,15 +181,10 @@ function test()
   actual = f + '';
   compareSource(expect, actual, summary);
 
   f = function() { ((a, b) for (x in [])) };
   expect = 'function() { ((a, b) for (x in [])); }';
   actual = f + '';
   compareSource(expect, actual, summary);
 
-  f = (function() { ({x setter: (function () {}).x }) });
-  expect = 'function() { ({x setter: function () {}.x }); }';
-  actual = f + '';
-  compareSource(expect, actual, summary);
-
   exitFunc ('test');
 }
--- a/js/src/tests/js1_8/regress/regress-477234.js
+++ b/js/src/tests/js1_8/regress/regress-477234.js
@@ -52,17 +52,21 @@ function test()
   enterFunc ('test');
   printBugNumber(BUGNUMBER);
   printStatus (summary);
 
   jit(true);
  
   for (iters = 0; iters < 11500; ++iters) {
     for each (let x in ['', '', '']){}
-    eval("__proto__.x getter = function(){}");
+    eval("Object.defineProperty(__proto__, 'x', " +
+         "{" +
+         "  enumerable: true, configurable: true," +
+         "  get: function(){}" +
+         "});");
     var a = uneval;
     delete uneval;
     uneval = a;
     var b = toSource;
     delete toSource;
     toSource = b;
     var c = toString;
     delete toString;
--- a/js/src/tests/js1_8_1/decompilation/regress-380237-03.js
+++ b/js/src/tests/js1_8_1/decompilation/regress-380237-03.js
@@ -181,15 +181,10 @@ function test()
   actual = f + '';
   compareSource(expect, actual, summary);
 
   f = function() { ((a, b) for (x in [])) };
   expect = 'function() { ((a, b) for (x in [])); }';
   actual = f + '';
   compareSource(expect, actual, summary);
 
-  f = (function() { ({x setter: (function () {}).x }) });
-  expect = 'function() { ({x setter: function () {}.x }); }';
-  actual = f + '';
-  compareSource(expect, actual, summary);
-
   exitFunc ('test');
 }
--- a/js/src/tests/js1_8_1/decompilation/regress-380237-04.js
+++ b/js/src/tests/js1_8_1/decompilation/regress-380237-04.js
@@ -122,17 +122,16 @@ needParens(46, "[#1=xx,3]");
 needParens(47, "[#1=xx,#1#]");
 needParens(48, "xx.p");
 needParens(49, "xx.@p");
 needParens(50, "typeof xx;");
 needParens(51, "void xx;");
 needParens(52, "({ a: xx })");
 needParens(53, "({ a: 1, b: xx })");
 needParens(54, "({ a: xx, b: 1 })");
-needParens(55, "({ a getter: xx })");
 needParens(56, "<x a={xx}/>");
 doesNotNeedParens(57, "new (xx);");
 doesNotNeedParens(58, "new a(xx);");
 
 
 // Generator expressions cannot be used as LHS, even though they're syntactic 
 // sugar for something that looks a lot like an "lvalue return": (f() = 3).