Bug 447713, remove the import/export functionality from spidermonkey, r=brendan
authorGraydon Hoare <graydon@mozilla.com>
Wed, 06 Aug 2008 17:34:58 -0700
changeset 16489 216fff17c130012702374a916cdffb8505fa1f18
parent 16488 d6a0a4fca0813eb10ec6722a9c544a9aa355c6a8
child 16490 e9f69e5e5a41f48042f1482d91c0f17b587f8774
push idunknown
push userunknown
push dateunknown
reviewersbrendan
bugs447713
milestone1.9.1a2pre
Bug 447713, remove the import/export functionality from spidermonkey, r=brendan
js/src/js.cpp
js/src/js.msg
js/src/jsapi.h
js/src/jsconfig.h
js/src/jsemit.cpp
js/src/jsinterp.cpp
js/src/jsinterp.h
js/src/jskeyword.tbl
js/src/jsopcode.cpp
js/src/jsopcode.h
js/src/jsopcode.tbl
js/src/jsparse.cpp
js/src/jsparse.h
js/src/jspubtd.h
js/src/jsscan.h
js/src/liveconnect/jsj_JavaArray.c
js/src/liveconnect/jsj_JavaClass.c
js/src/liveconnect/jsj_JavaObject.c
--- a/js/src/js.cpp
+++ b/js/src/js.cpp
@@ -1560,17 +1560,16 @@ DumpScope(JSContext *cx, JSObject *obj, 
                 fputs("<error>", fp);
             else
                 js_FileEscapedString(fp, str, '"');
         }
 #define DUMP_ATTR(name) if (sprop->attrs & JSPROP_##name) fputs(" " #name, fp)
         DUMP_ATTR(ENUMERATE);
         DUMP_ATTR(READONLY);
         DUMP_ATTR(PERMANENT);
-        DUMP_ATTR(EXPORTED);
         DUMP_ATTR(GETTER);
         DUMP_ATTR(SETTER);
 #undef  DUMP_ATTR
 
         fprintf(fp, " slot %lu flags %x shortid %d\n",
                 (unsigned long)sprop->slot, sprop->flags, sprop->shortid);
     }
 }
@@ -1717,52 +1716,16 @@ DumpHeap(JSContext *cx, uintN argc, jsva
   not_traceable_arg:
     JS_ReportError(cx, "argument '%s' is not null or a heap-allocated thing",
                    badTraceArg);
     return JS_FALSE;
 }
 
 #endif /* DEBUG */
 
-#ifdef TEST_EXPORT
-static JSBool
-DoExport(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
-{
-    jsid id;
-    JSObject *obj2;
-    JSProperty *prop;
-    JSBool ok;
-    uintN attrs;
-
-    if (argc != 2) {
-        JS_ReportErrorNumber(cx, my_GetErrorMessage, NULL, JSSMSG_DOEXP_USAGE);
-        return JS_FALSE;
-    }
-    if (!JS_ValueToObject(cx, argv[0], &obj))
-        return JS_FALSE;
-    argv[0] = OBJECT_TO_JSVAL(obj);
-    if (!js_ValueToStringId(cx, argv[1], &id))
-        return JS_FALSE;
-    if (!OBJ_LOOKUP_PROPERTY(cx, obj, id, &obj2, &prop))
-        return JS_FALSE;
-    if (!prop) {
-        ok = OBJ_DEFINE_PROPERTY(cx, obj, id, JSVAL_VOID, NULL, NULL,
-                                 JSPROP_EXPORTED, NULL);
-    } else {
-        ok = OBJ_GET_ATTRIBUTES(cx, obj, id, prop, &attrs);
-        if (ok) {
-            attrs |= JSPROP_EXPORTED;
-            ok = OBJ_SET_ATTRIBUTES(cx, obj, id, prop, &attrs);
-        }
-        OBJ_DROP_PROPERTY(cx, obj2, prop);
-    }
-    return ok;
-}
-#endif
-
 #ifdef TEST_CVTARGS
 #include <ctype.h>
 
 static const char *
 EscapeWideString(jschar *w)
 {
     static char enuf[80];
     static char hex[] = "0123456789abcdef";
@@ -2808,19 +2771,16 @@ static JSFunctionSpec shell_functions[] 
 #ifdef DEBUG
     JS_FS("dis",            Disassemble,    1,0,0),
     JS_FS("dissrc",         DisassWithSrc,  1,0,0),
     JS_FN("dumpHeap",       DumpHeap,       0,0,0),
     JS_FS("notes",          Notes,          1,0,0),
     JS_FS("tracing",        Tracing,        0,0,0),
     JS_FS("stats",          DumpStats,      1,0,0),
 #endif
-#ifdef TEST_EXPORT
-    JS_FS("xport",          DoExport,       2,0,0),
-#endif
 #ifdef TEST_CVTARGS
     JS_FS("cvtargs",        ConvertArgs,    0,0,12),
 #endif
     JS_FN("build",          BuildDate,      0,0,0),
     JS_FS("clear",          Clear,          0,0,0),
     JS_FN("intern",         Intern,         1,1,0),
     JS_FS("clone",          Clone,          1,0,0),
     JS_FS("seal",           Seal,           1,0,1),
@@ -2891,19 +2851,16 @@ static const char *const shell_help_mess
 "dis([fun])               Disassemble functions into bytecodes",
 "dissrc([fun])            Disassemble functions with source lines",
 "dumpHeap([fileName[, start[, toFind[, maxDepth[, toIgnore]]]]])\n"
 "  Interface to JS_DumpHeap with output sent to file",
 "notes([fun])             Show source notes for functions",
 "tracing([toggle])        Turn tracing on or off",
 "stats([string ...])      Dump 'arena', 'atom', 'global' stats",
 #endif
-#ifdef TEST_EXPORT
-"xport(obj, property)     Export the given property of obj",
-#endif
 #ifdef TEST_CVTARGS
 "cvtargs(arg1..., arg12)  Test argument formater",
 #endif
 "build()                  Show build date and time",
 "clear([obj])             Clear properties of object",
 "intern(str)              Internalize str in the atom table",
 "clone(fun[, scope])      Clone function object",
 "seal(obj[, deep])        Seal object, or object graph if deep",
--- a/js/src/js.msg
+++ b/js/src/js.msg
@@ -99,17 +99,17 @@ MSG_DEF(JSMSG_STACK_UNDERFLOW,         1
 MSG_DEF(JSMSG_NEED_DIET,               17, 1, JSEXN_INTERNALERR, "{0} too large")
 MSG_DEF(JSMSG_TOO_MANY_LOCAL_ROOTS,    18, 0, JSEXN_ERR, "out of local root space")
 MSG_DEF(JSMSG_READ_ONLY,               19, 1, JSEXN_ERR, "{0} is read-only")
 MSG_DEF(JSMSG_BAD_FORMAL,              20, 0, JSEXN_SYNTAXERR, "malformed formal parameter")
 MSG_DEF(JSMSG_BAD_ITERATOR,            21, 3, JSEXN_TYPEERR, "{0} has invalid {1} value {2}")
 MSG_DEF(JSMSG_NOT_FUNCTION,            22, 1, JSEXN_TYPEERR, "{0} is not a function")
 MSG_DEF(JSMSG_NOT_CONSTRUCTOR,         23, 1, JSEXN_TYPEERR, "{0} is not a constructor")
 MSG_DEF(JSMSG_SCRIPT_STACK_QUOTA,      24, 0, JSEXN_INTERNALERR, "script stack space quota is exhausted")
-MSG_DEF(JSMSG_NOT_EXPORTED,            25, 1, JSEXN_TYPEERR, "{0} is not exported")
+MSG_DEF(JSMSG_UNUSED25,                25, 0, JSEXN_NONE, "unused25")
 MSG_DEF(JSMSG_OVER_RECURSED,           26, 0, JSEXN_INTERNALERR, "too much recursion")
 MSG_DEF(JSMSG_IN_NOT_OBJECT,           27, 1, JSEXN_TYPEERR, "invalid 'in' operand {0}")
 MSG_DEF(JSMSG_BAD_NEW_RESULT,          28, 1, JSEXN_TYPEERR, "invalid new expression result {0}")
 MSG_DEF(JSMSG_BAD_SHARP_DEF,           29, 1, JSEXN_ERR, "invalid sharp variable definition #{0}=")
 MSG_DEF(JSMSG_BAD_SHARP_USE,           30, 1, JSEXN_ERR, "invalid sharp variable use #{0}#")
 MSG_DEF(JSMSG_BAD_INSTANCEOF_RHS,      31, 1, JSEXN_TYPEERR, "invalid 'instanceof' operand {0}")
 MSG_DEF(JSMSG_BAD_BYTECODE,            32, 1, JSEXN_INTERNALERR, "unimplemented JavaScript bytecode {0}")
 MSG_DEF(JSMSG_BAD_RADIX,               33, 1, JSEXN_ERR, "illegal radix {0}")
@@ -150,20 +150,20 @@ MSG_DEF(JSMSG_WHITHER_WHENCE,          6
 MSG_DEF(JSMSG_BAD_SCRIPT_MAGIC,        68, 0, JSEXN_INTERNALERR, "bad script XDR magic number")
 MSG_DEF(JSMSG_PAREN_BEFORE_FORMAL,     69, 0, JSEXN_SYNTAXERR, "missing ( before formal parameters")
 MSG_DEF(JSMSG_MISSING_FORMAL,          70, 0, JSEXN_SYNTAXERR, "missing formal parameter")
 MSG_DEF(JSMSG_PAREN_AFTER_FORMAL,      71, 0, JSEXN_SYNTAXERR, "missing ) after formal parameters")
 MSG_DEF(JSMSG_CURLY_BEFORE_BODY,       72, 0, JSEXN_SYNTAXERR, "missing { before function body")
 MSG_DEF(JSMSG_CURLY_AFTER_BODY,        73, 0, JSEXN_SYNTAXERR, "missing } after function body")
 MSG_DEF(JSMSG_PAREN_BEFORE_COND,       74, 0, JSEXN_SYNTAXERR, "missing ( before condition")
 MSG_DEF(JSMSG_PAREN_AFTER_COND,        75, 0, JSEXN_SYNTAXERR, "missing ) after condition")
-MSG_DEF(JSMSG_NO_IMPORT_NAME,          76, 0, JSEXN_SYNTAXERR, "missing name in import statement")
+MSG_DEF(JSMSG_UNUSED76,                76, 0, JSEXN_NONE, "unused76")
 MSG_DEF(JSMSG_NAME_AFTER_DOT,          77, 0, JSEXN_SYNTAXERR, "missing name after . operator")
 MSG_DEF(JSMSG_BRACKET_IN_INDEX,        78, 0, JSEXN_SYNTAXERR, "missing ] in index expression")
-MSG_DEF(JSMSG_NO_EXPORT_NAME,          79, 0, JSEXN_SYNTAXERR, "missing name in export statement")
+MSG_DEF(JSMSG_UNUSED79,                79, 0, JSEXN_NONE, "unused79")
 MSG_DEF(JSMSG_PAREN_BEFORE_SWITCH,     80, 0, JSEXN_SYNTAXERR, "missing ( before switch expression")
 MSG_DEF(JSMSG_PAREN_AFTER_SWITCH,      81, 0, JSEXN_SYNTAXERR, "missing ) after switch expression")
 MSG_DEF(JSMSG_CURLY_BEFORE_SWITCH,     82, 0, JSEXN_SYNTAXERR, "missing { before switch body")
 MSG_DEF(JSMSG_COLON_AFTER_CASE,        83, 0, JSEXN_SYNTAXERR, "missing : after case label")
 MSG_DEF(JSMSG_WHILE_AFTER_DO,          84, 0, JSEXN_SYNTAXERR, "missing while after do-loop body")
 MSG_DEF(JSMSG_PAREN_AFTER_FOR,         85, 0, JSEXN_SYNTAXERR, "missing ( after for")
 MSG_DEF(JSMSG_SEMI_AFTER_FOR_INIT,     86, 0, JSEXN_SYNTAXERR, "missing ; after for-loop initializer")
 MSG_DEF(JSMSG_SEMI_AFTER_FOR_COND,     87, 0, JSEXN_SYNTAXERR, "missing ; after for-loop condition")
@@ -187,17 +187,17 @@ MSG_DEF(JSMSG_PAREN_AFTER_ARGS,       10
 MSG_DEF(JSMSG_BRACKET_AFTER_LIST,     105, 0, JSEXN_SYNTAXERR, "missing ] after element list")
 MSG_DEF(JSMSG_COLON_AFTER_ID,         106, 0, JSEXN_SYNTAXERR, "missing : after property id")
 MSG_DEF(JSMSG_CURLY_AFTER_LIST,       107, 0, JSEXN_SYNTAXERR, "missing } after property list")
 MSG_DEF(JSMSG_PAREN_IN_PAREN,         108, 0, JSEXN_SYNTAXERR, "missing ) in parenthetical")
 MSG_DEF(JSMSG_SEMI_BEFORE_STMNT,      109, 0, JSEXN_SYNTAXERR, "missing ; before statement")
 MSG_DEF(JSMSG_NO_RETURN_VALUE,        110, 1, JSEXN_TYPEERR, "function {0} does not always return a value")
 MSG_DEF(JSMSG_DUPLICATE_FORMAL,       111, 1, JSEXN_TYPEERR, "duplicate formal argument {0}")
 MSG_DEF(JSMSG_EQUAL_AS_ASSIGN,        112, 1, JSEXN_SYNTAXERR, "test for equality (==) mistyped as assignment (=)?{0}")
-MSG_DEF(JSMSG_BAD_IMPORT,             113, 0, JSEXN_SYNTAXERR, "invalid import expression")
+MSG_DEF(JSMSG_UNUSED113,              113, 0, JSEXN_NONE, "unused113")
 MSG_DEF(JSMSG_TOO_MANY_DEFAULTS,      114, 0, JSEXN_SYNTAXERR, "more than one switch default")
 MSG_DEF(JSMSG_TOO_MANY_CASES,         115, 0, JSEXN_INTERNALERR, "too many switch cases")
 MSG_DEF(JSMSG_BAD_SWITCH,             116, 0, JSEXN_SYNTAXERR, "invalid switch statement")
 MSG_DEF(JSMSG_BAD_FOR_LEFTSIDE,       117, 0, JSEXN_SYNTAXERR, "invalid for/in left-hand side")
 MSG_DEF(JSMSG_CATCH_AFTER_GENERAL,    118, 0, JSEXN_SYNTAXERR, "catch after unconditional catch")
 MSG_DEF(JSMSG_CATCH_WITHOUT_TRY,      119, 0, JSEXN_SYNTAXERR, "catch without try")
 MSG_DEF(JSMSG_FINALLY_WITHOUT_TRY,    120, 0, JSEXN_SYNTAXERR, "finally without try")
 MSG_DEF(JSMSG_LABEL_NOT_FOUND,        121, 0, JSEXN_SYNTAXERR, "label not found")
--- a/js/src/jsapi.h
+++ b/js/src/jsapi.h
@@ -116,17 +116,16 @@ JS_BEGIN_EXTERN_C
 /* A private data pointer (2-byte-aligned) can be stored as an int jsval. */
 #define JSVAL_TO_PRIVATE(v)     ((void *)((v) & ~JSVAL_INT))
 #define PRIVATE_TO_JSVAL(p)     ((jsval)(p) | JSVAL_INT)
 
 /* Property attributes, set in JSPropertySpec and passed to API functions. */
 #define JSPROP_ENUMERATE        0x01    /* property is visible to for/in loop */
 #define JSPROP_READONLY         0x02    /* not settable: assignment is no-op */
 #define JSPROP_PERMANENT        0x04    /* property cannot be deleted */
-#define JSPROP_EXPORTED         0x08    /* property is exported from object */
 #define JSPROP_GETTER           0x10    /* property holds getter function */
 #define JSPROP_SETTER           0x20    /* property holds setter function */
 #define JSPROP_SHARED           0x40    /* don't allocate a value slot for this
                                            property; don't copy the property on
                                            set of the same-named property in an
                                            object that delegates to a prototype
                                            containing this property */
 #define JSPROP_INDEX            0x80    /* name is actually (jsint) index */
--- a/js/src/jsconfig.h
+++ b/js/src/jsconfig.h
@@ -81,17 +81,16 @@
 #define JS_HAS_STR_HTML_HELPERS 0       /* has str.anchor, str.bold, etc. */
 #define JS_HAS_PERL_SUBSTR      0       /* has str.substr */
 #if JS_VERSION == JS_VERSION_ECMA_3_TEST
 #define JS_HAS_OBJ_PROTO_PROP   1       /* has o.__proto__ etc. */
 #else
 #define JS_HAS_OBJ_PROTO_PROP   0       /* has o.__proto__ etc. */
 #endif
 #define JS_HAS_OBJ_WATCHPOINT   0       /* has o.watch and o.unwatch */
-#define JS_HAS_EXPORT_IMPORT    0       /* has export fun; import obj.fun */
 #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_SCRIPT_OBJECT    0       /* has (new Script("x++")).exec() */
 #define JS_HAS_XDR              0       /* has XDR API and internal support */
 #define JS_HAS_XDR_FREEZE_THAW  0       /* has XDR freeze/thaw script methods */
 #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 */
@@ -115,17 +114,16 @@
 #error "unsupported JS_VERSION"
 
 #elif JS_VERSION == 150
 
 #define JS_HAS_STR_HTML_HELPERS 1       /* has str.anchor, str.bold, etc. */
 #define JS_HAS_PERL_SUBSTR      1       /* has str.substr */
 #define JS_HAS_OBJ_PROTO_PROP   1       /* has o.__proto__ etc. */
 #define JS_HAS_OBJ_WATCHPOINT   1       /* has o.watch and o.unwatch */
-#define JS_HAS_EXPORT_IMPORT    1       /* has export fun; import obj.fun */
 #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_SCRIPT_OBJECT    1       /* has (new Script("x++")).exec() */
 #define JS_HAS_XDR              1       /* has XDR API and internal support */
 #define JS_HAS_XDR_FREEZE_THAW  0       /* has XDR freeze/thaw script methods */
 #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 */
@@ -145,17 +143,16 @@
 #define JS_HAS_EXPR_CLOSURES    0       /* has function (formals) listexpr */
 
 #elif JS_VERSION == 160
 
 #define JS_HAS_STR_HTML_HELPERS 1       /* has str.anchor, str.bold, etc. */
 #define JS_HAS_PERL_SUBSTR      1       /* has str.substr */
 #define JS_HAS_OBJ_PROTO_PROP   1       /* has o.__proto__ etc. */
 #define JS_HAS_OBJ_WATCHPOINT   1       /* has o.watch and o.unwatch */
-#define JS_HAS_EXPORT_IMPORT    1       /* has export fun; import obj.fun */
 #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_SCRIPT_OBJECT    1       /* has (new Script("x++")).exec() */
 #define JS_HAS_XDR              1       /* has XDR API and internal support */
 #define JS_HAS_XDR_FREEZE_THAW  0       /* has XDR freeze/thaw script methods */
 #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 */
@@ -175,17 +172,16 @@
 #define JS_HAS_EXPR_CLOSURES    0       /* has function (formals) listexpr */
 
 #elif JS_VERSION == 170
 
 #define JS_HAS_STR_HTML_HELPERS 1       /* has str.anchor, str.bold, etc. */
 #define JS_HAS_PERL_SUBSTR      1       /* has str.substr */
 #define JS_HAS_OBJ_PROTO_PROP   1       /* has o.__proto__ etc. */
 #define JS_HAS_OBJ_WATCHPOINT   1       /* has o.watch and o.unwatch */
-#define JS_HAS_EXPORT_IMPORT    1       /* has export fun; import obj.fun */
 #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_SCRIPT_OBJECT    0       /* has (new Script("x++")).exec() */
 #define JS_HAS_XDR              1       /* has XDR API and internal support */
 #define JS_HAS_XDR_FREEZE_THAW  0       /* has XDR freeze/thaw script methods */
 #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 */
@@ -205,17 +201,16 @@
 #define JS_HAS_EXPR_CLOSURES    0       /* has function (formals) listexpr */
 
 #elif JS_VERSION == 180
 
 #define JS_HAS_STR_HTML_HELPERS 1       /* has str.anchor, str.bold, etc. */
 #define JS_HAS_PERL_SUBSTR      1       /* has str.substr */
 #define JS_HAS_OBJ_PROTO_PROP   1       /* has o.__proto__ etc. */
 #define JS_HAS_OBJ_WATCHPOINT   1       /* has o.watch and o.unwatch */
-#define JS_HAS_EXPORT_IMPORT    1       /* has export fun; import obj.fun */
 #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_SCRIPT_OBJECT    0       /* has (new Script("x++")).exec() */
 #define JS_HAS_XDR              1       /* has XDR API and internal support */
 #define JS_HAS_XDR_FREEZE_THAW  0       /* has XDR freeze/thaw script methods */
 #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 */
--- a/js/src/jsemit.cpp
+++ b/js/src/jsemit.cpp
@@ -2365,38 +2365,31 @@ EmitPropOp(JSContext *cx, JSParseNode *p
         if (!js_EmitTree(cx, cg, pn2))
             return JS_FALSE;
     }
 
     if (js_NewSrcNote2(cx, cg, SRC_PCBASE,
                        CG_OFFSET(cg) - pn2->pn_offset) < 0) {
         return JS_FALSE;
     }
-    if (!pn->pn_atom) {
-        JS_ASSERT(op == JSOP_IMPORTALL);
-        if (js_Emit1(cx, cg, op) < 0)
-            return JS_FALSE;
-    } else {
-        if (!EmitAtomOp(cx, pn, op, cg))
-            return JS_FALSE;
-    }
-    return JS_TRUE;
+
+    return EmitAtomOp(cx, pn, op, cg);
 }
 
 static JSBool
 EmitElemOp(JSContext *cx, JSParseNode *pn, JSOp op, JSCodeGenerator *cg)
 {
     ptrdiff_t top;
     JSParseNode *left, *right, *next, ltmp, rtmp;
     jsint slot;
 
     top = CG_OFFSET(cg);
     if (pn->pn_arity == PN_LIST) {
         /* Left-associative operator chain to avoid too much recursion. */
-        JS_ASSERT(pn->pn_op == JSOP_GETELEM || pn->pn_op == JSOP_IMPORTELEM);
+        JS_ASSERT(pn->pn_op == JSOP_GETELEM);
         JS_ASSERT(pn->pn_count >= 3);
         left = pn->pn_head;
         right = PN_LAST(pn);
         next = left->pn_next;
         JS_ASSERT(next != right);
 
         /*
          * Try to optimize arguments[0][j]... into JSOP_ARGSUB<0> followed by
@@ -4014,52 +4007,16 @@ js_EmitTree(JSContext *cx, JSCodeGenerat
             JS_ASSERT(pn->pn_index == (uint32) -1);
             pn->pn_index = index;
             if (!EmitSlotIndexOp(cx, JSOP_DEFLOCALFUN, slot, index, cg))
                 return JS_FALSE;
         }
         break;
       }
 
-#if JS_HAS_EXPORT_IMPORT
-      case TOK_EXPORT:
-        pn2 = pn->pn_head;
-        if (pn2->pn_type == TOK_STAR) {
-            /*
-             * 'export *' must have no other elements in the list (what would
-             * be the point?).
-             */
-            if (js_Emit1(cx, cg, JSOP_EXPORTALL) < 0)
-                return JS_FALSE;
-        } else {
-            /*
-             * If not 'export *', the list consists of NAME nodes identifying
-             * properties of the variables object to flag as exported.
-             */
-            do {
-                ale = js_IndexAtom(cx, pn2->pn_atom, &cg->atomList);
-                if (!ale)
-                    return JS_FALSE;
-                EMIT_INDEX_OP(JSOP_EXPORTNAME, ALE_INDEX(ale));
-            } while ((pn2 = pn2->pn_next) != NULL);
-        }
-        break;
-
-      case TOK_IMPORT:
-        for (pn2 = pn->pn_head; pn2; pn2 = pn2->pn_next) {
-            /*
-             * Each subtree on an import list is rooted by a DOT or LB node.
-             * A DOT may have a null pn_atom member, in which case pn_op must
-             * be JSOP_IMPORTALL -- see EmitPropOp above.
-             */
-            if (!js_EmitTree(cx, cg, pn2))
-                return JS_FALSE;
-        }
-        break;
-#endif /* JS_HAS_EXPORT_IMPORT */
 
       case TOK_IF:
         /* Initialize so we can detect else-if chains and avoid recursion. */
         stmtInfo.type = STMT_IF;
         beq = jmp = -1;
         noteIndex = -1;
 
       if_again:
--- a/js/src/jsinterp.cpp
+++ b/js/src/jsinterp.cpp
@@ -1573,123 +1573,16 @@ out2:
 out:
 #ifdef INCLUDE_MOZILLA_DTRACE
     if (JAVASCRIPT_EXECUTE_DONE_ENABLED())
         jsdtrace_execute_done(script);
 #endif
     return ok;
 }
 
-#if JS_HAS_EXPORT_IMPORT
-/*
- * If id is JSVAL_VOID, import all exported properties from obj.
- */
-JS_STATIC_INTERPRET JSBool
-js_ImportProperty(JSContext *cx, JSObject *obj, jsid id)
-{
-    JSBool ok;
-    JSIdArray *ida;
-    JSProperty *prop;
-    JSObject *obj2, *target, *funobj, *closure;
-    uintN attrs;
-    jsint i;
-    jsval value;
-
-    if (JSVAL_IS_VOID(id)) {
-        ida = JS_Enumerate(cx, obj);
-        if (!ida)
-            return JS_FALSE;
-        ok = JS_TRUE;
-        if (ida->length == 0)
-            goto out;
-    } else {
-        ida = NULL;
-        if (!OBJ_LOOKUP_PROPERTY(cx, obj, id, &obj2, &prop))
-            return JS_FALSE;
-        if (!prop) {
-            js_ReportValueError(cx, JSMSG_NOT_DEFINED,
-                                JSDVG_IGNORE_STACK, ID_TO_VALUE(id), NULL);
-            return JS_FALSE;
-        }
-        ok = OBJ_GET_ATTRIBUTES(cx, obj, id, prop, &attrs);
-        OBJ_DROP_PROPERTY(cx, obj2, prop);
-        if (!ok)
-            return JS_FALSE;
-        if (!(attrs & JSPROP_EXPORTED)) {
-            js_ReportValueError(cx, JSMSG_NOT_EXPORTED,
-                                JSDVG_IGNORE_STACK, ID_TO_VALUE(id), NULL);
-            return JS_FALSE;
-        }
-    }
-
-    target = cx->fp->varobj;
-    i = 0;
-    do {
-        if (ida) {
-            id = ida->vector[i];
-            ok = OBJ_GET_ATTRIBUTES(cx, obj, id, NULL, &attrs);
-            if (!ok)
-                goto out;
-            if (!(attrs & JSPROP_EXPORTED))
-                continue;
-        }
-        ok = OBJ_CHECK_ACCESS(cx, obj, id, JSACC_IMPORT, &value, &attrs);
-        if (!ok)
-            goto out;
-        if (VALUE_IS_FUNCTION(cx, value)) {
-            funobj = JSVAL_TO_OBJECT(value);
-            closure = js_CloneFunctionObject(cx,
-                                             GET_FUNCTION_PRIVATE(cx, funobj),
-                                             obj);
-            if (!closure) {
-                ok = JS_FALSE;
-                goto out;
-            }
-            value = OBJECT_TO_JSVAL(closure);
-        }
-
-        /*
-         * Handle the case of importing a property that refers to a local
-         * variable or formal parameter of a function activation.  These
-         * properties are accessed by opcodes using stack slot numbers
-         * generated by the compiler rather than runtime name-lookup.  These
-         * local references, therefore, bypass the normal scope chain lookup.
-         * So, instead of defining a new property in the activation object,
-         * modify the existing value in the stack slot.
-         */
-        if (OBJ_GET_CLASS(cx, target) == &js_CallClass) {
-            ok = OBJ_LOOKUP_PROPERTY(cx, target, id, &obj2, &prop);
-            if (!ok)
-                goto out;
-        } else {
-            prop = NULL;
-        }
-        if (prop && target == obj2) {
-            ok = OBJ_SET_PROPERTY(cx, target, id, &value);
-        } else {
-            ok = OBJ_DEFINE_PROPERTY(cx, target, id, value,
-                                     JS_PropertyStub, JS_PropertyStub,
-                                     attrs & ~(JSPROP_EXPORTED |
-                                               JSPROP_GETTER |
-                                               JSPROP_SETTER),
-                                     NULL);
-        }
-        if (prop)
-            OBJ_DROP_PROPERTY(cx, obj2, prop);
-        if (!ok)
-            goto out;
-    } while (ida && ++i < ida->length);
-
-out:
-    if (ida)
-        JS_DestroyIdArray(cx, ida);
-    return ok;
-}
-#endif /* JS_HAS_EXPORT_IMPORT */
-
 JSBool
 js_CheckRedeclaration(JSContext *cx, JSObject *obj, jsid id, uintN attrs,
                       JSObject **objp, JSProperty **propp)
 {
     JSObject *obj2;
     JSProperty *prop;
     uintN oldAttrs, report;
     JSBool isFunction;
@@ -2573,19 +2466,16 @@ js_Interpret(JSContext *cx)
     JSFunction *fun;
     JSType type;
 #if JS_THREADED_INTERP
     register void * const *jumpTable;
 #else
     register uint32 switchMask;
     uintN switchOp;
 #endif
-#if JS_HAS_EXPORT_IMPORT
-    JSIdArray *ida;
-#endif
     jsint low, high, off, npairs;
     JSBool match;
 #if JS_HAS_GETTER_SETTER
     JSPropertyOp getter, setter;
 #endif
 
 #ifdef __GNUC__
 # define JS_EXTENSION __extension__
@@ -5387,89 +5277,16 @@ js_Interpret(JSContext *cx)
 #undef SEARCH_PAIRS
 
           end_lookup_switch:
             len = (op == JSOP_LOOKUPSWITCH)
                   ? GET_JUMP_OFFSET(pc2)
                   : GET_JUMPX_OFFSET(pc2);
           END_VARLEN_CASE
 
-#if JS_HAS_EXPORT_IMPORT
-          BEGIN_CASE(JSOP_EXPORTALL)
-            obj = fp->varobj;
-            ida = JS_Enumerate(cx, obj);
-            if (!ida)
-                goto error;
-            ok = JS_TRUE;
-            for (i = 0; i != ida->length; i++) {
-                id = ida->vector[i];
-                ok = OBJ_LOOKUP_PROPERTY(cx, obj, id, &obj2, &prop);
-                if (!ok)
-                    break;
-                if (!prop)
-                    continue;
-                ok = OBJ_GET_ATTRIBUTES(cx, obj, id, prop, &attrs);
-                if (ok) {
-                    attrs |= JSPROP_EXPORTED;
-                    ok = OBJ_SET_ATTRIBUTES(cx, obj, id, prop, &attrs);
-                }
-                OBJ_DROP_PROPERTY(cx, obj2, prop);
-                if (!ok)
-                    break;
-            }
-            JS_ASSERT(ok == (i == ida->length));
-            JS_DestroyIdArray(cx, ida);
-            if (!ok)
-                goto error;
-          END_CASE(JSOP_EXPORTALL)
-
-          BEGIN_CASE(JSOP_EXPORTNAME)
-            LOAD_ATOM(0);
-            id = ATOM_TO_JSID(atom);
-            obj = fp->varobj;
-            if (!OBJ_LOOKUP_PROPERTY(cx, obj, id, &obj2, &prop))
-                goto error;
-            if (!prop) {
-                if (!OBJ_DEFINE_PROPERTY(cx, obj, id, JSVAL_VOID,
-                                         JS_PropertyStub, JS_PropertyStub,
-                                         JSPROP_EXPORTED, NULL)) {
-                    goto error;
-                }
-            } else {
-                ok = OBJ_GET_ATTRIBUTES(cx, obj, id, prop, &attrs);
-                if (ok) {
-                    attrs |= JSPROP_EXPORTED;
-                    ok = OBJ_SET_ATTRIBUTES(cx, obj, id, prop, &attrs);
-                }
-                OBJ_DROP_PROPERTY(cx, obj2, prop);
-                if (!ok)
-                    goto error;
-            }
-          END_CASE(JSOP_EXPORTNAME)
-
-          BEGIN_CASE(JSOP_IMPORTALL)
-            id = (jsid) JSVAL_VOID;
-            PROPERTY_OP(-1, js_ImportProperty(cx, obj, id));
-            regs.sp--;
-          END_CASE(JSOP_IMPORTALL)
-
-          BEGIN_CASE(JSOP_IMPORTPROP)
-            /* Get an immediate atom naming the property. */
-            LOAD_ATOM(0);
-            id = ATOM_TO_JSID(atom);
-            PROPERTY_OP(-1, js_ImportProperty(cx, obj, id));
-            regs.sp--;
-          END_CASE(JSOP_IMPORTPROP)
-
-          BEGIN_CASE(JSOP_IMPORTELEM)
-            ELEMENT_OP(-1, js_ImportProperty(cx, obj, id));
-            regs.sp -= 2;
-          END_CASE(JSOP_IMPORTELEM)
-#endif /* JS_HAS_EXPORT_IMPORT */
-
           BEGIN_CASE(JSOP_TRAP)
           {
             JSTrapStatus status;
 
             status = JS_HandleTrap(cx, script, regs.pc, &rval);
             switch (status) {
               case JSTRAP_ERROR:
                 goto error;
@@ -6801,16 +6618,21 @@ js_Interpret(JSContext *cx)
           L_JSOP_TOATTRNAME:
           L_JSOP_QNAME:
           L_JSOP_QNAMECONST:
           L_JSOP_QNAMEPART:
           L_JSOP_ANYNAME:
           L_JSOP_DEFXMLNS:
 # endif
 
+          L_JSOP_UNUSED75:
+          L_JSOP_UNUSED76:
+          L_JSOP_UNUSED77:
+          L_JSOP_UNUSED78:
+          L_JSOP_UNUSED79:
           L_JSOP_UNUSED186:
           L_JSOP_UNUSED201:
           L_JSOP_UNUSED202:
           L_JSOP_UNUSED203:
           L_JSOP_UNUSED204:
           L_JSOP_UNUSED205:
           L_JSOP_UNUSED206:
           L_JSOP_UNUSED207:
--- a/js/src/jsinterp.h
+++ b/js/src/jsinterp.h
@@ -530,19 +530,16 @@ js_CountWithBlocks(JSContext *cx, JSStac
 extern JSBool
 js_UnwindScope(JSContext *cx, JSStackFrame *fp, jsint stackDepth,
                JSBool normalUnwind);
 
 extern JSBool
 js_InternNonIntElementId(JSContext *cx, JSObject *obj, jsval idval, jsid *idp);
 
 extern JSBool
-js_ImportProperty(JSContext *cx, JSObject *obj, jsid id);
-
-extern JSBool
 js_OnUnknownMethod(JSContext *cx, jsval *vp);
 
 /*
  * Find the results of incrementing or decrementing *vp. For pre-increments,
  * both *vp and *vp2 will contain the result on return. For post-increments,
  * vp will contain the original value converted to a number and vp2 will get
  * the result. Both vp and vp2 must be roots.
  */
--- a/js/src/jskeyword.tbl
+++ b/js/src/jskeyword.tbl
@@ -40,17 +40,17 @@
 
 JS_KEYWORD(break,       TOK_BREAK,      JSOP_NOP,       JSVERSION_DEFAULT)
 JS_KEYWORD(case,        TOK_CASE,       JSOP_NOP,       JSVERSION_DEFAULT)
 JS_KEYWORD(continue,    TOK_CONTINUE,   JSOP_NOP,       JSVERSION_DEFAULT)
 JS_KEYWORD(default,     TOK_DEFAULT,    JSOP_NOP,       JSVERSION_DEFAULT)
 JS_KEYWORD(delete,      TOK_DELETE,     JSOP_NOP,       JSVERSION_DEFAULT)
 JS_KEYWORD(do,          TOK_DO,         JSOP_NOP,       JSVERSION_DEFAULT)
 JS_KEYWORD(else,        TOK_ELSE,       JSOP_NOP,       JSVERSION_DEFAULT)
-JS_KEYWORD(export,      TOK_EXPORT,     JSOP_NOP,       JSVERSION_DEFAULT)
+JS_KEYWORD(export,      TOK_RESERVED,   JSOP_NOP,       JSVERSION_DEFAULT)
 JS_KEYWORD(false,       TOK_PRIMARY,    JSOP_FALSE,     JSVERSION_DEFAULT)
 JS_KEYWORD(for,         TOK_FOR,        JSOP_NOP,       JSVERSION_DEFAULT)
 JS_KEYWORD(function,    TOK_FUNCTION,   JSOP_NOP,       JSVERSION_DEFAULT)
 JS_KEYWORD(if,          TOK_IF,         JSOP_NOP,       JSVERSION_DEFAULT)
 JS_KEYWORD(in,          TOK_IN,         JSOP_IN,        JSVERSION_DEFAULT)
 JS_KEYWORD(new,         TOK_NEW,        JSOP_NEW,       JSVERSION_DEFAULT)
 JS_KEYWORD(null,        TOK_PRIMARY,    JSOP_NULL,      JSVERSION_DEFAULT)
 JS_KEYWORD(return,      TOK_RETURN,     JSOP_NOP,       JSVERSION_DEFAULT)
@@ -82,17 +82,17 @@ JS_KEYWORD(byte,        TOK_RESERVED,   
 JS_KEYWORD(char,        TOK_RESERVED,   JSOP_NOP,       JSVERSION_DEFAULT)
 JS_KEYWORD(class,       TOK_RESERVED,   JSOP_NOP,       JSVERSION_DEFAULT)
 JS_KEYWORD(double,      TOK_RESERVED,   JSOP_NOP,       JSVERSION_DEFAULT)
 JS_KEYWORD(extends,     TOK_RESERVED,   JSOP_NOP,       JSVERSION_DEFAULT)
 JS_KEYWORD(final,       TOK_RESERVED,   JSOP_NOP,       JSVERSION_DEFAULT)
 JS_KEYWORD(float,       TOK_RESERVED,   JSOP_NOP,       JSVERSION_DEFAULT)
 JS_KEYWORD(goto,        TOK_RESERVED,   JSOP_NOP,       JSVERSION_DEFAULT)
 JS_KEYWORD(implements,  TOK_RESERVED,   JSOP_NOP,       JSVERSION_DEFAULT)
-JS_KEYWORD(import,      TOK_IMPORT,     JSOP_NOP,       JSVERSION_DEFAULT)
+JS_KEYWORD(import,      TOK_RESERVED,   JSOP_NOP,       JSVERSION_DEFAULT)
 JS_KEYWORD(int,         TOK_RESERVED,   JSOP_NOP,       JSVERSION_DEFAULT)
 JS_KEYWORD(interface,   TOK_RESERVED,   JSOP_NOP,       JSVERSION_DEFAULT)
 JS_KEYWORD(long,        TOK_RESERVED,   JSOP_NOP,       JSVERSION_DEFAULT)
 JS_KEYWORD(native,      TOK_RESERVED,   JSOP_NOP,       JSVERSION_DEFAULT)
 JS_KEYWORD(package,     TOK_RESERVED,   JSOP_NOP,       JSVERSION_DEFAULT)
 JS_KEYWORD(private,     TOK_RESERVED,   JSOP_NOP,       JSVERSION_DEFAULT)
 JS_KEYWORD(protected,   TOK_RESERVED,   JSOP_NOP,       JSVERSION_DEFAULT)
 JS_KEYWORD(public,      TOK_RESERVED,   JSOP_NOP,       JSVERSION_DEFAULT)
--- a/js/src/jsopcode.cpp
+++ b/js/src/jsopcode.cpp
@@ -1846,18 +1846,17 @@ Decompile(SprintStack *ss, jsbytecode *p
              * the bytecode at pc, so we don't decompile more than the error
              * expression.
              */
             for (fp = cx->fp; fp && !fp->script; fp = fp->down)
                 continue;
             format = cs->format;
             if (((fp && fp->regs && pc == fp->regs->pc) ||
                  (pc == startpc && cs->nuses != 0)) &&
-                format & (JOF_SET|JOF_DEL|JOF_INCDEC|JOF_IMPORT|JOF_FOR|
-                          JOF_VARPROP)) {
+                format & (JOF_SET|JOF_DEL|JOF_INCDEC|JOF_FOR|JOF_VARPROP)) {
                 mode = JOF_MODE(format);
                 if (mode == JOF_NAME) {
                     /*
                      * JOF_NAME does not imply JOF_ATOM, so we must check for
                      * the QARG and QVAR format types, and translate those to
                      * JSOP_GETARG or JSOP_GETLOCAL appropriately, instead of
                      * to JSOP_NAME.
                      */
@@ -4187,59 +4186,16 @@ Decompile(SprintStack *ss, jsbytecode *p
                 break;
 
               case JSOP_CLOSURE:
                 LOAD_FUNCTION(0);
                 todo = -2;
                 goto do_function;
                 break;
 
-#if JS_HAS_EXPORT_IMPORT
-              case JSOP_EXPORTALL:
-                js_printf(jp, "\texport *;\n");
-                todo = -2;
-                break;
-
-              case JSOP_EXPORTNAME:
-                LOAD_ATOM(0);
-                rval = QuoteString(&ss->sprinter, ATOM_TO_STRING(atom), 0);
-                if (!rval)
-                    return NULL;
-                RETRACT(&ss->sprinter, rval);
-                js_printf(jp, "\texport %s;\n", rval);
-                todo = -2;
-                break;
-
-              case JSOP_IMPORTALL:
-                lval = POP_STR();
-                js_printf(jp, "\timport %s.*;\n", lval);
-                todo = -2;
-                break;
-
-              case JSOP_IMPORTPROP:
-              do_importprop:
-                GET_ATOM_QUOTE_AND_FMT("\timport %s[%s];\n",
-                                       "\timport %s.%s;\n",
-                                       rval);
-                lval = POP_STR();
-                js_printf(jp, fmt, lval, rval);
-                todo = -2;
-                break;
-
-              case JSOP_IMPORTELEM:
-                xval = POP_STR();
-                op = JSOP_GETELEM;
-                if (JOF_OPMODE(lastop) == JOF_XMLNAME)
-                    goto do_importprop;
-                lval = POP_STR();
-                js_printf(jp, "\timport %s[%s];\n", lval, xval);
-                todo = -2;
-                break;
-#endif /* JS_HAS_EXPORT_IMPORT */
-
               case JSOP_TRAP:
                 saveop = op = JS_GetTrapOpcode(cx, jp->script, pc);
                 *pc = op;
                 cs = &js_CodeSpec[op];
                 len = cs->length;
                 DECOMPILE_CODE(pc, len);
                 *pc = JSOP_TRAP;
                 todo = -2;
--- a/js/src/jsopcode.h
+++ b/js/src/jsopcode.h
@@ -92,36 +92,35 @@ typedef enum JSOp {
 #define JOF_VARPROP       (5U<<5) /* x.prop for this, arg, var, or local x */
 #define JOF_MODEMASK      (7U<<5) /* mask for above addressing modes */
 #define JOF_SET           (1U<<8) /* set (i.e., assignment) operation */
 #define JOF_DEL           (1U<<9) /* delete operation */
 #define JOF_DEC          (1U<<10) /* decrement (--, not ++) opcode */
 #define JOF_INC          (2U<<10) /* increment (++, not --) opcode */
 #define JOF_INCDEC       (3U<<10) /* increment or decrement opcode */
 #define JOF_POST         (1U<<12) /* postorder increment or decrement */
-#define JOF_IMPORT       (1U<<13) /* import property op */
-#define JOF_FOR          (1U<<14) /* for-in property op */
+#define JOF_FOR          (1U<<13) /* for-in property op */
 #define JOF_ASSIGNING     JOF_SET /* hint for JSClass.resolve, used for ops
                                      that do simplex assignment */
-#define JOF_DETECTING    (1U<<15) /* object detection for JSNewResolveOp */
-#define JOF_BACKPATCH    (1U<<16) /* backpatch placeholder during codegen */
-#define JOF_LEFTASSOC    (1U<<17) /* left-associative operator */
-#define JOF_DECLARING    (1U<<18) /* var, const, or function declaration op */
-#define JOF_INDEXBASE    (1U<<19) /* atom segment base setting prefix op */
-#define JOF_CALLOP       (1U<<20) /* call operation that pushes function and
+#define JOF_DETECTING    (1U<<14) /* object detection for JSNewResolveOp */
+#define JOF_BACKPATCH    (1U<<15) /* backpatch placeholder during codegen */
+#define JOF_LEFTASSOC    (1U<<16) /* left-associative operator */
+#define JOF_DECLARING    (1U<<17) /* var, const, or function declaration op */
+#define JOF_INDEXBASE    (1U<<18) /* atom segment base setting prefix op */
+#define JOF_CALLOP       (1U<<19) /* call operation that pushes function and
                                      this */
-#define JOF_PARENHEAD    (1U<<21) /* opcode consumes value of expression in
+#define JOF_PARENHEAD    (1U<<20) /* opcode consumes value of expression in
                                      parenthesized statement head */
-#define JOF_INVOKE       (1U<<22) /* JSOP_CALL, JSOP_NEW, JSOP_EVAL */
-#define JOF_TMPSLOT      (1U<<23) /* interpreter uses extra temporary slot
+#define JOF_INVOKE       (1U<<21) /* JSOP_CALL, JSOP_NEW, JSOP_EVAL */
+#define JOF_TMPSLOT      (1U<<22) /* interpreter uses extra temporary slot
                                      to root intermediate objects besides
                                      the slots opcode uses */
-#define JOF_TMPSLOT2     (2U<<23) /* interpreter uses extra 2 temporary slot
+#define JOF_TMPSLOT2     (2U<<22) /* interpreter uses extra 2 temporary slot
                                      besides the slots opcode uses */
-#define JOF_TMPSLOT_SHIFT 23
+#define JOF_TMPSLOT_SHIFT 22
 #define JOF_TMPSLOT_MASK  (JS_BITMASK(2) << JOF_TMPSLOT_SHIFT)
 
 /* Shorthands for type from format and type from opcode. */
 #define JOF_TYPE(fmt)   ((fmt) & JOF_TYPEMASK)
 #define JOF_OPTYPE(op)  JOF_TYPE(js_CodeSpec[op].format)
 
 /* Shorthands for mode from format and mode from opcode. */
 #define JOF_MODE(fmt)   ((fmt) & JOF_MODEMASK)
--- a/js/src/jsopcode.tbl
+++ b/js/src/jsopcode.tbl
@@ -182,22 +182,21 @@ OPDEF(JSOP_LOOKUPSWITCH, 71, "lookupswit
 
 /* New, infallible/transitive identity ops. */
 OPDEF(JSOP_STRICTEQ,  72, "stricteq",   NULL,         1,  2,  1,  10,  JOF_BYTE|JOF_DETECTING)
 OPDEF(JSOP_STRICTNE,  73, "strictne",   NULL,         1,  2,  1,  10,  JOF_BYTE|JOF_DETECTING)
 
 /* Lexical closure constructor. */
 OPDEF(JSOP_CLOSURE,   74, "closure",    NULL,         3,  0,  0,  0,  JOF_OBJECT)
 
-/* Export and import ops. */
-OPDEF(JSOP_EXPORTALL, 75, "exportall",  NULL,         1,  0,  0,  0,  JOF_BYTE)
-OPDEF(JSOP_EXPORTNAME,76, "exportname", NULL,         3,  0,  0,  0,  JOF_ATOM|JOF_NAME)
-OPDEF(JSOP_IMPORTALL, 77, "importall",  NULL,         1,  1,  0,  0,  JOF_BYTE)
-OPDEF(JSOP_IMPORTPROP,78, "importprop", NULL,         3,  1,  0,  0,  JOF_ATOM|JOF_PROP|JOF_IMPORT)
-OPDEF(JSOP_IMPORTELEM,79, "importelem", NULL,         1,  2,  0,  0,  JOF_BYTE |JOF_ELEM|JOF_IMPORT)
+OPDEF(JSOP_UNUSED75,  75, "unused75",   NULL,         1,  0,  0,  0,  JOF_BYTE)
+OPDEF(JSOP_UNUSED76,  76, "unused76",   NULL,         1,  0,  0,  0,  JOF_BYTE)
+OPDEF(JSOP_UNUSED77,  77, "unused77",   NULL,         1,  0,  0,  0,  JOF_BYTE)
+OPDEF(JSOP_UNUSED78,  78, "unused78",   NULL,         1,  0,  0,  0,  JOF_BYTE)
+OPDEF(JSOP_UNUSED79,  79, "unused79",   NULL,         1,  0,  0,  0,  JOF_BYTE)
 
 /* Push object literal. */
 OPDEF(JSOP_OBJECT,    80, "object",     NULL,         3,  0,  1, 19,  JOF_OBJECT)
 
 /* Pop value and discard it. */
 OPDEF(JSOP_POP,       81, "pop",        NULL,         1,  1,  0,  2,  JOF_BYTE)
 
 /* Convert value to number, for unary +. */
--- a/js/src/jsparse.cpp
+++ b/js/src/jsparse.cpp
@@ -1382,19 +1382,19 @@ FunctionDef(JSContext *cx, JSTokenStream
             body->pn_tail = &item->pn_next;
         ++body->pn_count;
     }
 #endif
 
     /*
      * If we collected flags that indicate nested heavyweight functions, or
      * this function contains heavyweight-making statements (references to
-     * __parent__ or __proto__; use of with, eval, import, or export; and
-     * assignment to arguments), flag the function as heavyweight (requiring
-     * a call object per invocation).
+     * __parent__ or __proto__; use of with, or eval; and assignment to 
+     * arguments), flag the function as heavyweight (requiring a call object 
+     * per invocation).
      */
     if (funtc.flags & TCF_FUN_HEAVYWEIGHT) {
         fun->flags |= JSFUN_HEAVYWEIGHT;
         tc->flags |= TCF_FUN_HEAVYWEIGHT;
     } else {
         /*
          * If this function is a named statement function not at top-level
          * (i.e. a JSOP_CLOSURE, not a function definiton or expression), then
@@ -1573,92 +1573,16 @@ MatchLabel(JSContext *cx, JSTokenStream 
         label = CURRENT_TOKEN(ts).t_atom;
     } else {
         label = NULL;
     }
     pn->pn_atom = label;
     return JS_TRUE;
 }
 
-#if JS_HAS_EXPORT_IMPORT
-static JSParseNode *
-ImportExpr(JSContext *cx, JSTokenStream *ts, JSTreeContext *tc)
-{
-    JSParseNode *pn, *pn2;
-    JSTokenType tt;
-
-    MUST_MATCH_TOKEN(TOK_NAME, JSMSG_NO_IMPORT_NAME);
-    pn = NewParseNode(cx, ts, PN_NAME, tc);
-    if (!pn)
-        return NULL;
-    pn->pn_op = JSOP_NAME;
-    pn->pn_atom = CURRENT_TOKEN(ts).t_atom;
-    pn->pn_slot = -1;
-
-    ts->flags |= TSF_OPERAND;
-    while ((tt = js_GetToken(cx, ts)) == TOK_DOT || tt == TOK_LB) {
-        ts->flags &= ~TSF_OPERAND;
-        if (pn->pn_op == JSOP_IMPORTALL)
-            goto bad_import;
-
-        if (tt == TOK_DOT) {
-            pn2 = NewParseNode(cx, ts, PN_NAME, tc);
-            if (!pn2)
-                return NULL;
-            ts->flags |= TSF_KEYWORD_IS_NAME;
-            if (js_MatchToken(cx, ts, TOK_STAR)) {
-                pn2->pn_op = JSOP_IMPORTALL;
-                pn2->pn_slot = -1;
-            } else {
-                MUST_MATCH_TOKEN(TOK_NAME, JSMSG_NAME_AFTER_DOT);
-                pn2->pn_op = JSOP_GETPROP;
-                pn2->pn_atom = CURRENT_TOKEN(ts).t_atom;
-                pn2->pn_slot = -1;
-            }
-            ts->flags &= ~TSF_KEYWORD_IS_NAME;
-            pn2->pn_expr = pn;
-            pn2->pn_pos.begin = pn->pn_pos.begin;
-            pn2->pn_pos.end = CURRENT_TOKEN(ts).pos.end;
-        } else {
-            /* Make a TOK_LB binary node. */
-            pn2 = NewBinary(cx, tt, JSOP_GETELEM, pn, Expr(cx, ts, tc), tc);
-            if (!pn2)
-                return NULL;
-
-            MUST_MATCH_TOKEN(TOK_RB, JSMSG_BRACKET_IN_INDEX);
-        }
-
-        pn = pn2;
-        ts->flags |= TSF_OPERAND;
-    }
-    ts->flags &= ~TSF_OPERAND;
-    if (tt == TOK_ERROR)
-        return NULL;
-    js_UngetToken(ts);
-
-    switch (pn->pn_op) {
-      case JSOP_GETPROP:
-        pn->pn_op = JSOP_IMPORTPROP;
-        break;
-      case JSOP_GETELEM:
-        pn->pn_op = JSOP_IMPORTELEM;
-        break;
-      case JSOP_IMPORTALL:
-        break;
-      default:
-        goto bad_import;
-    }
-    return pn;
-
-  bad_import:
-    js_ReportCompileErrorNumber(cx, ts, NULL, JSREPORT_ERROR, JSMSG_BAD_IMPORT);
-    return NULL;
-}
-#endif /* JS_HAS_EXPORT_IMPORT */
-
 static JSBool
 BindLet(JSContext *cx, BindData *data, JSAtom *atom, JSTreeContext *tc)
 {
     JSObject *blockObj;
     JSScopeProperty *sprop;
     JSAtomListElement *ale;
     uintN n;
 
@@ -2457,59 +2381,16 @@ Statement(JSContext *cx, JSTokenStream *
     if (tt == TOK_NAME) {
         tt = CheckGetterOrSetter(cx, ts, TOK_FUNCTION);
         if (tt == TOK_ERROR)
             return NULL;
     }
 #endif
 
     switch (tt) {
-#if JS_HAS_EXPORT_IMPORT
-      case TOK_EXPORT:
-        pn = NewParseNode(cx, ts, PN_LIST, tc);
-        if (!pn)
-            return NULL;
-        PN_INIT_LIST(pn);
-        if (js_MatchToken(cx, ts, TOK_STAR)) {
-            pn2 = NewParseNode(cx, ts, PN_NULLARY, tc);
-            if (!pn2)
-                return NULL;
-            PN_APPEND(pn, pn2);
-        } else {
-            do {
-                MUST_MATCH_TOKEN(TOK_NAME, JSMSG_NO_EXPORT_NAME);
-                pn2 = NewParseNode(cx, ts, PN_NAME, tc);
-                if (!pn2)
-                    return NULL;
-                pn2->pn_op = JSOP_NAME;
-                pn2->pn_atom = CURRENT_TOKEN(ts).t_atom;
-                pn2->pn_slot = -1;
-                PN_APPEND(pn, pn2);
-            } while (js_MatchToken(cx, ts, TOK_COMMA));
-        }
-        pn->pn_pos.end = PN_LAST(pn)->pn_pos.end;
-        tc->flags |= TCF_FUN_HEAVYWEIGHT;
-        break;
-
-      case TOK_IMPORT:
-        pn = NewParseNode(cx, ts, PN_LIST, tc);
-        if (!pn)
-            return NULL;
-        PN_INIT_LIST(pn);
-        do {
-            pn2 = ImportExpr(cx, ts, tc);
-            if (!pn2)
-                return NULL;
-            PN_APPEND(pn, pn2);
-        } while (js_MatchToken(cx, ts, TOK_COMMA));
-        pn->pn_pos.end = PN_LAST(pn)->pn_pos.end;
-        tc->flags |= TCF_FUN_HEAVYWEIGHT;
-        break;
-#endif /* JS_HAS_EXPORT_IMPORT */
-
       case TOK_FUNCTION:
 #if JS_HAS_XML_SUPPORT
         ts->flags |= TSF_KEYWORD_IS_NAME;
         tt = js_PeekToken(cx, ts);
         ts->flags &= ~TSF_KEYWORD_IS_NAME;
         if (tt == TOK_DBLCOLON)
             goto expression;
 #endif
@@ -5872,20 +5753,16 @@ PrimaryExpr(JSContext *cx, JSTokenStream
         if (!pn)
             return NULL;
         pn->pn_op = CURRENT_TOKEN(ts).t_op;
 #if JS_HAS_SHARP_VARS
         notsharp = JS_TRUE;
 #endif
         break;
 
-#if !JS_HAS_EXPORT_IMPORT
-      case TOK_EXPORT:
-      case TOK_IMPORT:
-#endif
       case TOK_ERROR:
         /* The scanner or one of its subroutines reported the error. */
         return NULL;
 
       default:
         js_ReportCompileErrorNumber(cx, ts, NULL, JSREPORT_ERROR,
                                     JSMSG_SYNTAX_ERROR);
         return NULL;
@@ -6583,21 +6460,16 @@ js_FoldConstants(JSContext *cx, JSParseN
             RecycleTree(pn2, tc);
             break;
         }
 
         /* Can't concatenate string literals, let's try numbers. */
         goto do_binary_op;
 
       case TOK_STAR:
-        /* The * in 'import *;' parses as a nullary star node. */
-        if (pn->pn_arity == PN_NULLARY)
-            break;
-        /* FALL THROUGH */
-
       case TOK_SHOP:
       case TOK_MINUS:
       case TOK_DIVOP:
       do_binary_op:
         if (pn->pn_arity == PN_LIST) {
             JS_ASSERT(pn->pn_count > 2);
             for (pn2 = pn1; pn2; pn2 = pn2->pn_next) {
                 if (!FoldType(cx, pn2, TOK_NUMBER))
--- a/js/src/jsparse.h
+++ b/js/src/jsparse.h
@@ -66,23 +66,16 @@ JS_BEGIN_EXTERN_C
  *                            create the function object at parse (not emit)
  *                            time to specialize arg and var bytecodes early.
  *                          pn_body: TOK_LC node for function body statements
  *                          pn_flags: TCF_FUN_* flags (see jsemit.h) collected
  *                            while parsing the function's body
  *
  * <Statements>
  * TOK_LC       list        pn_head: list of pn_count statements
- * TOK_EXPORT   list        pn_head: list of pn_count TOK_NAMEs or one TOK_STAR
- *                            (which is not a multiply node)
- * TOK_IMPORT   list        pn_head: list of pn_count sub-trees of the form
- *                            a.b.*, a[b].*, a.*, a.b, or a[b] -- but never a.
- *                            Each member is expressed with TOK_DOT or TOK_LB.
- *                            Each sub-tree's root node has a pn_op in the set
- *                            JSOP_IMPORT{ALL,PROP,ELEM}
  * TOK_IF       ternary     pn_kid1: cond, pn_kid2: then, pn_kid3: else or null
  * TOK_SWITCH   binary      pn_left: discriminant
  *                          pn_right: list of TOK_CASE nodes, with at most one
  *                            TOK_DEFAULT node, or if there are let bindings
  *                            in the top level of the switch body's cases, a
  *                            TOK_LEXICALSCOPE node that contains the list of
  *                            TOK_CASE nodes.
  * TOK_CASE,    binary      pn_left: case expr or null if TOK_DEFAULT
--- a/js/src/jspubtd.h
+++ b/js/src/jspubtd.h
@@ -100,17 +100,22 @@ typedef enum JSProtoKey {
 #undef JS_PROTO
     JSProto_LIMIT
 } JSProtoKey;
 
 /* JSObjectOps.checkAccess mode enumeration. */
 typedef enum JSAccessMode {
     JSACC_PROTO  = 0,           /* XXXbe redundant w.r.t. id */
     JSACC_PARENT = 1,           /* XXXbe redundant w.r.t. id */
-    JSACC_IMPORT = 2,           /* import foo.bar */
+
+                                /* 
+                                 * enum value #2 formerly called JSACC_IMPORT, 
+                                 * gap preserved for liveconnect ABI compatibility.
+                                 */
+
     JSACC_WATCH  = 3,           /* a watchpoint on object foo for id 'bar' */
     JSACC_READ   = 4,           /* a "get" of foo.bar */
     JSACC_WRITE  = 8,           /* a "set" of foo.bar = baz */
     JSACC_LIMIT
 } JSAccessMode;
 
 #define JSACC_TYPEMASK          (JSACC_WRITE - 1)
 
--- a/js/src/jsscan.h
+++ b/js/src/jsscan.h
@@ -82,66 +82,64 @@ typedef enum JSTokenType {
     TOK_LC = 25, TOK_RC = 26,           /* left and right curlies (braces) */
     TOK_LP = 27, TOK_RP = 28,           /* left and right parentheses */
     TOK_NAME = 29,                      /* identifier */
     TOK_NUMBER = 30,                    /* numeric constant */
     TOK_STRING = 31,                    /* string constant */
     TOK_REGEXP = 32,                    /* RegExp constant */
     TOK_PRIMARY = 33,                   /* true, false, null, this, super */
     TOK_FUNCTION = 34,                  /* function keyword */
-    TOK_EXPORT = 35,                    /* export keyword */
-    TOK_IMPORT = 36,                    /* import keyword */
-    TOK_IF = 37,                        /* if keyword */
-    TOK_ELSE = 38,                      /* else keyword */
-    TOK_SWITCH = 39,                    /* switch keyword */
-    TOK_CASE = 40,                      /* case keyword */
-    TOK_DEFAULT = 41,                   /* default keyword */
-    TOK_WHILE = 42,                     /* while keyword */
-    TOK_DO = 43,                        /* do keyword */
-    TOK_FOR = 44,                       /* for keyword */
-    TOK_BREAK = 45,                     /* break keyword */
-    TOK_CONTINUE = 46,                  /* continue keyword */
-    TOK_IN = 47,                        /* in keyword */
-    TOK_VAR = 48,                       /* var keyword */
-    TOK_WITH = 49,                      /* with keyword */
-    TOK_RETURN = 50,                    /* return keyword */
-    TOK_NEW = 51,                       /* new keyword */
-    TOK_DELETE = 52,                    /* delete keyword */
-    TOK_DEFSHARP = 53,                  /* #n= for object/array initializers */
-    TOK_USESHARP = 54,                  /* #n# for object/array initializers */
-    TOK_TRY = 55,                       /* try keyword */
-    TOK_CATCH = 56,                     /* catch keyword */
-    TOK_FINALLY = 57,                   /* finally keyword */
-    TOK_THROW = 58,                     /* throw keyword */
-    TOK_INSTANCEOF = 59,                /* instanceof keyword */
-    TOK_DEBUGGER = 60,                  /* debugger keyword */
-    TOK_XMLSTAGO = 61,                  /* XML start tag open (<) */
-    TOK_XMLETAGO = 62,                  /* XML end tag open (</) */
-    TOK_XMLPTAGC = 63,                  /* XML point tag close (/>) */
-    TOK_XMLTAGC = 64,                   /* XML start or end tag close (>) */
-    TOK_XMLNAME = 65,                   /* XML start-tag non-final fragment */
-    TOK_XMLATTR = 66,                   /* XML quoted attribute value */
-    TOK_XMLSPACE = 67,                  /* XML whitespace */
-    TOK_XMLTEXT = 68,                   /* XML text */
-    TOK_XMLCOMMENT = 69,                /* XML comment */
-    TOK_XMLCDATA = 70,                  /* XML CDATA section */
-    TOK_XMLPI = 71,                     /* XML processing instruction */
-    TOK_AT = 72,                        /* XML attribute op (@) */
-    TOK_DBLCOLON = 73,                  /* namespace qualified name op (::) */
-    TOK_ANYNAME = 74,                   /* XML AnyName singleton (*) */
-    TOK_DBLDOT = 75,                    /* XML descendant op (..) */
-    TOK_FILTER = 76,                    /* XML filtering predicate op (.()) */
-    TOK_XMLELEM = 77,                   /* XML element node type (no token) */
-    TOK_XMLLIST = 78,                   /* XML list node type (no token) */
-    TOK_YIELD = 79,                     /* yield from generator function */
-    TOK_ARRAYCOMP = 80,                 /* array comprehension initialiser */
-    TOK_ARRAYPUSH = 81,                 /* array push within comprehension */
-    TOK_LEXICALSCOPE = 82,              /* block scope AST node label */
-    TOK_LET = 83,                       /* let keyword */
-    TOK_BODY = 84,                      /* synthetic body of function with
+    TOK_IF = 35,                        /* if keyword */
+    TOK_ELSE = 36,                      /* else keyword */
+    TOK_SWITCH = 37,                    /* switch keyword */
+    TOK_CASE = 38,                      /* case keyword */
+    TOK_DEFAULT = 39,                   /* default keyword */
+    TOK_WHILE = 40,                     /* while keyword */
+    TOK_DO = 41,                        /* do keyword */
+    TOK_FOR = 42,                       /* for keyword */
+    TOK_BREAK = 43,                     /* break keyword */
+    TOK_CONTINUE = 44,                  /* continue keyword */
+    TOK_IN = 45,                        /* in keyword */
+    TOK_VAR = 46,                       /* var keyword */
+    TOK_WITH = 47,                      /* with keyword */
+    TOK_RETURN = 48,                    /* return keyword */
+    TOK_NEW = 49,                       /* new keyword */
+    TOK_DELETE = 50,                    /* delete keyword */
+    TOK_DEFSHARP = 51,                  /* #n= for object/array initializers */
+    TOK_USESHARP = 52,                  /* #n# for object/array initializers */
+    TOK_TRY = 53,                       /* try keyword */
+    TOK_CATCH = 54,                     /* catch keyword */
+    TOK_FINALLY = 55,                   /* finally keyword */
+    TOK_THROW = 56,                     /* throw keyword */
+    TOK_INSTANCEOF = 57,                /* instanceof keyword */
+    TOK_DEBUGGER = 58,                  /* debugger keyword */
+    TOK_XMLSTAGO = 59,                  /* XML start tag open (<) */
+    TOK_XMLETAGO = 60,                  /* XML end tag open (</) */
+    TOK_XMLPTAGC = 61,                  /* XML point tag close (/>) */
+    TOK_XMLTAGC = 62,                   /* XML start or end tag close (>) */
+    TOK_XMLNAME = 63,                   /* XML start-tag non-final fragment */
+    TOK_XMLATTR = 64,                   /* XML quoted attribute value */
+    TOK_XMLSPACE = 65,                  /* XML whitespace */
+    TOK_XMLTEXT = 66,                   /* XML text */
+    TOK_XMLCOMMENT = 67,                /* XML comment */
+    TOK_XMLCDATA = 68,                  /* XML CDATA section */
+    TOK_XMLPI = 69,                     /* XML processing instruction */
+    TOK_AT = 70,                        /* XML attribute op (@) */
+    TOK_DBLCOLON = 71,                  /* namespace qualified name op (::) */
+    TOK_ANYNAME = 72,                   /* XML AnyName singleton (*) */
+    TOK_DBLDOT = 73,                    /* XML descendant op (..) */
+    TOK_FILTER = 74,                    /* XML filtering predicate op (.()) */
+    TOK_XMLELEM = 75,                   /* XML element node type (no token) */
+    TOK_XMLLIST = 76,                   /* XML list node type (no token) */
+    TOK_YIELD = 77,                     /* yield from generator function */
+    TOK_ARRAYCOMP = 78,                 /* array comprehension initialiser */
+    TOK_ARRAYPUSH = 79,                 /* array push within comprehension */
+    TOK_LEXICALSCOPE = 80,              /* block scope AST node label */
+    TOK_LET = 81,                       /* let keyword */
+    TOK_BODY = 82,                      /* synthetic body of function with
                                            destructuring formal parameters */
     TOK_RESERVED,                       /* reserved keywords */
     TOK_LIMIT                           /* domain size */
 } JSTokenType;
 
 #define IS_PRIMARY_TOKEN(tt) \
     ((uintN)((tt) - TOK_NAME) <= (uintN)(TOK_PRIMARY - TOK_NAME))
 
--- a/js/src/liveconnect/jsj_JavaArray.c
+++ b/js/src/liveconnect/jsj_JavaArray.c
@@ -393,21 +393,16 @@ JavaArray_checkAccess(JSContext *cx, JSO
                       JSAccessMode mode, jsval *vp, uintN *attrsp)
 {
     switch (mode) {
     case JSACC_WATCH:
         JS_ReportErrorNumber(cx, jsj_GetErrorMessage, NULL, 
                                             JSJMSG_JARRAY_PROP_WATCH);
         return JS_FALSE;
 
-    case JSACC_IMPORT:
-        JS_ReportErrorNumber(cx, jsj_GetErrorMessage, NULL, 
-                                            JSJMSG_JARRAY_PROP_EXPORT);
-        return JS_FALSE;
-
     default:
         return JS_TRUE;
     }
 }
 
 JSObjectOps JavaArray_ops = {
     /* Mandatory non-null function pointer members. */
     jsj_wrapper_newObjectMap,       /* newObjectMap */
--- a/js/src/liveconnect/jsj_JavaClass.c
+++ b/js/src/liveconnect/jsj_JavaClass.c
@@ -464,21 +464,16 @@ JavaClass_checkAccess(JSContext *cx, JSO
                       JSAccessMode mode, jsval *vp, uintN *attrsp)
 {
     switch (mode) {
     case JSACC_WATCH:
         JS_ReportErrorNumber(cx, jsj_GetErrorMessage, NULL, 
                                             JSJMSG_JCLASS_PROP_WATCH);
         return JS_FALSE;
 
-    case JSACC_IMPORT:
-        JS_ReportErrorNumber(cx, jsj_GetErrorMessage, NULL, 
-                                            JSJMSG_JCLASS_PROP_EXPORT);
-        return JS_FALSE;
-
     default:
         return JS_TRUE;
     }
 }
 
 /*
  * Implement the JavaScript instanceof operator for JavaClass objects by using
  * the equivalent Java instanceof operation.
--- a/js/src/liveconnect/jsj_JavaObject.c
+++ b/js/src/liveconnect/jsj_JavaObject.c
@@ -981,21 +981,16 @@ JavaObject_checkAccess(JSContext *cx, JS
                       JSAccessMode mode, jsval *vp, uintN *attrsp)
 {
     switch (mode) {
     case JSACC_WATCH:
         JS_ReportErrorNumber(cx, jsj_GetErrorMessage, NULL,
                              JSJMSG_JOBJECT_PROP_WATCH);
         return JS_FALSE;
 
-    case JSACC_IMPORT:
-        JS_ReportErrorNumber(cx, jsj_GetErrorMessage, NULL,
-                             JSJMSG_JOBJECT_PROP_EXPORT);
-        return JS_FALSE;
-
     default:
         return JS_TRUE;
     }
 }
 
 #define JSJ_SLOT_COUNT (JSSLOT_PRIVATE+1)
 
 JSObjectMap * JS_DLL_CALLBACK