Bug 568375: Delete the JSOP_XMLOBJECT bytecode. r=waldo
authorJim Blandy <jimb@mozilla.org>
Fri, 11 Jun 2010 10:48:08 -0700
changeset 47435 9006396fcf1fff1b7ef9b1a07a32defac5d17913
parent 47434 e0ac87029c2156e17a706be6813df9d433ec8cb9
child 47436 60af001940cf3a083d3ac2d58858faece3c19f18
push id1
push userroot
push dateTue, 26 Apr 2011 22:38:44 +0000
treeherdermozilla-beta@bfdb6e623a36 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerswaldo
bugs568375
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
nightly win64
Bug 568375: Delete the JSOP_XMLOBJECT bytecode. r=waldo
js/src/jsemit.cpp
js/src/jsopcode.cpp
js/src/jsopcode.tbl
js/src/jsops.cpp
js/src/jstracer.cpp
js/src/jsxdrapi.h
js/src/jsxml.cpp
js/src/jsxml.h
--- a/js/src/jsemit.cpp
+++ b/js/src/jsemit.cpp
@@ -6764,21 +6764,16 @@ js_EmitTree(JSContext *cx, JSCodeGenerat
         if (js_Emit1(cx, cg, JSOP_DEBUGGER) < 0)
             return JS_FALSE;
         break;
 #endif /* JS_HAS_DEBUGGER_KEYWORD */
 
 #if JS_HAS_XML_SUPPORT
       case TOK_XMLELEM:
       case TOK_XMLLIST:
-        if (pn->pn_op == JSOP_XMLOBJECT) {
-            ok = EmitObjectOp(cx, pn->pn_objbox, PN_OP(pn), cg);
-            break;
-        }
-
         JS_ASSERT(PN_TYPE(pn) == TOK_XMLLIST || pn->pn_count != 0);
         switch (pn->pn_head ? PN_TYPE(pn->pn_head) : TOK_XMLLIST) {
           case TOK_XMLETAGO:
             JS_ASSERT(0);
             /* FALL THROUGH */
           case TOK_XMLPTAGC:
           case TOK_XMLSTAGO:
             break;
@@ -6812,22 +6807,16 @@ js_EmitTree(JSContext *cx, JSCodeGenerat
         }
 #ifdef DEBUG
         else
             JS_ASSERT(pn->pn_count != 0);
 #endif
         break;
 
       case TOK_XMLPTAGC:
-        if (pn->pn_op == JSOP_XMLOBJECT) {
-            ok = EmitObjectOp(cx, pn->pn_objbox, PN_OP(pn), cg);
-            break;
-        }
-        /* FALL THROUGH */
-
       case TOK_XMLSTAGO:
       case TOK_XMLETAGO:
       {
         uint32 i;
 
         if (js_Emit1(cx, cg, JSOP_STARTXML) < 0)
             return JS_FALSE;
 
--- a/js/src/jsopcode.cpp
+++ b/js/src/jsopcode.cpp
@@ -4743,21 +4743,16 @@ Decompile(SprintStack *ss, jsbytecode *p
 
               case JSOP_DESCENDANTS:
                 rval = POP_STR();
                 PROPAGATE_CALLNESS();
                 lval = POP_STR();
                 todo = Sprint(&ss->sprinter, "%s..%s", lval, rval);
                 break;
 
-              case JSOP_XMLOBJECT:
-                LOAD_OBJECT(0);
-                todo = Sprint(&ss->sprinter, "<xml address='%p'>", obj);
-                break;
-
               case JSOP_XMLCDATA:
                 LOAD_ATOM(0);
                 todo = SprintPut(&ss->sprinter, "<![CDATA[", 9);
                 if (!QuoteString(&ss->sprinter, ATOM_TO_STRING(atom),
                                  DONT_ESCAPE))
                     return NULL;
                 SprintPut(&ss->sprinter, "]]>", 3);
                 break;
--- a/js/src/jsopcode.tbl
+++ b/js/src/jsopcode.tbl
@@ -422,17 +422,17 @@ OPDEF(JSOP_SETXMLNAME,    171,"setxmlnam
 OPDEF(JSOP_XMLNAME,       172,"xmlname",    NULL,     1,  1,  1, 19,  JOF_BYTE)
 OPDEF(JSOP_DESCENDANTS,   173,"descendants",NULL,     1,  2,  1, 18,  JOF_BYTE)
 OPDEF(JSOP_FILTER,        174,"filter",     NULL,     3,  1,  1,  0,  JOF_JUMP)
 OPDEF(JSOP_ENDFILTER,     175,"endfilter",  NULL,     3,  2,  1, 18,  JOF_JUMP)
 OPDEF(JSOP_TOXML,         176,"toxml",      NULL,     1,  1,  1, 19,  JOF_BYTE)
 OPDEF(JSOP_TOXMLLIST,     177,"toxmllist",  NULL,     1,  1,  1, 19,  JOF_BYTE)
 OPDEF(JSOP_XMLTAGEXPR,    178,"xmltagexpr", NULL,     1,  1,  1,  0,  JOF_BYTE)
 OPDEF(JSOP_XMLELTEXPR,    179,"xmleltexpr", NULL,     1,  1,  1,  0,  JOF_BYTE)
-OPDEF(JSOP_XMLOBJECT,     180,"xmlobject",  NULL,     3,  0,  1, 19,  JOF_OBJECT)
+OPDEF(JSOP_UNUSED180,     180,"unused180",  NULL,     1,  0,  0,  0,  JOF_BYTE)
 OPDEF(JSOP_XMLCDATA,      181,"xmlcdata",   NULL,     3,  0,  1, 19,  JOF_ATOM)
 OPDEF(JSOP_XMLCOMMENT,    182,"xmlcomment", NULL,     3,  0,  1, 19,  JOF_ATOM)
 OPDEF(JSOP_XMLPI,         183,"xmlpi",      NULL,     3,  1,  1, 19,  JOF_ATOM)
 OPDEF(JSOP_CALLPROP,      184,"callprop",   NULL,     3,  1,  2, 18,  JOF_ATOM|JOF_PROP|JOF_CALLOP)
 
 /*
  * Get a display (free) variable from the closure's reserved slots.
  */
--- a/js/src/jsops.cpp
+++ b/js/src/jsops.cpp
@@ -3783,24 +3783,16 @@ BEGIN_CASE(JSOP_XMLELTEXPR)
         if (str)
             str = js_EscapeElementValue(cx, str);
     }
     if (!str)
         goto error;
     STORE_OPND(-1, STRING_TO_JSVAL(str));
 END_CASE(JSOP_XMLELTEXPR)
 
-BEGIN_CASE(JSOP_XMLOBJECT)
-    LOAD_OBJECT(0);
-    obj = js_CloneXMLObject(cx, obj);
-    if (!obj)
-        goto error;
-    PUSH_OPND(OBJECT_TO_JSVAL(obj));
-END_CASE(JSOP_XMLOBJECT)
-
 BEGIN_CASE(JSOP_XMLCDATA)
     LOAD_ATOM(0);
     str = ATOM_TO_STRING(atom);
     obj = js_NewXMLSpecialObject(cx, JSXML_CLASS_TEXT, NULL, str);
     if (!obj)
         goto error;
     PUSH_OPND(OBJECT_TO_JSVAL(obj));
 END_CASE(JSOP_XMLCDATA)
@@ -3942,16 +3934,18 @@ BEGIN_CASE(JSOP_ARRAYPUSH)
     obj  = JSVAL_TO_OBJECT(lval);
     rval = FETCH_OPND(-1);
     if (!js_ArrayCompPush(cx, obj, rval))
         goto error;
     regs.sp--;
 END_CASE(JSOP_ARRAYPUSH)
 #endif /* JS_HAS_GENERATORS */
 
+  L_JSOP_UNUSED180:
+
 #if JS_THREADED_INTERP
   L_JSOP_BACKPATCH:
   L_JSOP_BACKPATCH_POP:
 
 # if !JS_HAS_GENERATORS
   L_JSOP_GENERATOR:
   L_JSOP_YIELD:
   L_JSOP_ARRAYPUSH:
@@ -3971,17 +3965,16 @@ END_CASE(JSOP_ARRAYPUSH)
   L_JSOP_CALLXMLNAME:
   L_JSOP_STARTXMLEXPR:
   L_JSOP_STARTXML:
   L_JSOP_DELDESC:
   L_JSOP_GETFUNNS:
   L_JSOP_XMLPI:
   L_JSOP_XMLCOMMENT:
   L_JSOP_XMLCDATA:
-  L_JSOP_XMLOBJECT:
   L_JSOP_XMLELTEXPR:
   L_JSOP_XMLTAGEXPR:
   L_JSOP_TOXMLLIST:
   L_JSOP_TOXML:
   L_JSOP_ENDFILTER:
   L_JSOP_FILTER:
   L_JSOP_DESCENDANTS:
   L_JSOP_XMLNAME:
--- a/js/src/jstracer.cpp
+++ b/js/src/jstracer.cpp
@@ -14745,16 +14745,23 @@ TraceRecorder::record_JSOP_REGEXP()
     };
     LIns* regex_ins = lir->insCall(&js_CloneRegExpObject_ci, args);
     guard(false, lir->insEqP_0(regex_ins), OOM_EXIT);
 
     stack(0, regex_ins);
     return ARECORD_CONTINUE;
 }
 
+JS_REQUIRES_STACK AbortableRecordingStatus
+TraceRecorder::record_JSOP_UNUSED180()
+{
+    JS_NOT_REACHED("recording JSOP_UNUSED180?!?");
+    return ARECORD_ERROR;
+}
+
 // begin JS_HAS_XML_SUPPORT
 
 JS_REQUIRES_STACK AbortableRecordingStatus
 TraceRecorder::record_JSOP_DEFXMLNS()
 {
     return ARECORD_STOP;
 }
 
@@ -14862,22 +14869,16 @@ TraceRecorder::record_JSOP_XMLTAGEXPR()
 
 JS_REQUIRES_STACK AbortableRecordingStatus
 TraceRecorder::record_JSOP_XMLELTEXPR()
 {
     return ARECORD_STOP;
 }
 
 JS_REQUIRES_STACK AbortableRecordingStatus
-TraceRecorder::record_JSOP_XMLOBJECT()
-{
-    return ARECORD_STOP;
-}
-
-JS_REQUIRES_STACK AbortableRecordingStatus
 TraceRecorder::record_JSOP_XMLCDATA()
 {
     return ARECORD_STOP;
 }
 
 JS_REQUIRES_STACK AbortableRecordingStatus
 TraceRecorder::record_JSOP_XMLCOMMENT()
 {
--- a/js/src/jsxdrapi.h
+++ b/js/src/jsxdrapi.h
@@ -200,17 +200,17 @@ JS_XDRFindClassById(JSXDRState *xdr, uin
  * Bytecode version number. Increment the subtrahend whenever JS bytecode
  * changes incompatibly.
  *
  * This version number should be XDR'ed once near the front of any file or
  * larger storage unit containing XDR'ed bytecode and other data, and checked
  * before deserialization of bytecode.  If the saved version does not match
  * the current version, abort deserialization and invalidate the file.
  */
-#define JSXDR_BYTECODE_VERSION      (0xb973c0de - 63)
+#define JSXDR_BYTECODE_VERSION      (0xb973c0de - 64)
 
 /*
  * Library-private functions.
  */
 extern JSBool
 js_XDRAtom(JSXDRState *xdr, JSAtom **atomp);
 
 extern JSBool
--- a/js/src/jsxml.cpp
+++ b/js/src/jsxml.cpp
@@ -7676,36 +7676,16 @@ js_ValueToXMLObject(JSContext *cx, jsval
 
 JSObject *
 js_ValueToXMLListObject(JSContext *cx, jsval v)
 {
     return ToXMLList(cx, v);
 }
 
 JSObject *
-js_CloneXMLObject(JSContext *cx, JSObject *obj)
-{
-    uintN flags;
-    JSXML *xml;
-
-    if (!GetXMLSettingFlags(cx, &flags))
-        return NULL;
-    xml = (JSXML *) obj->getPrivate();
-    if (flags & (XSF_IGNORE_COMMENTS |
-                 XSF_IGNORE_PROCESSING_INSTRUCTIONS |
-                 XSF_IGNORE_WHITESPACE)) {
-        xml = DeepCopy(cx, xml, NULL, flags);
-        if (!xml)
-            return NULL;
-        return xml->object;
-    }
-    return NewXMLObject(cx, xml);
-}
-
-JSObject *
 js_NewXMLSpecialObject(JSContext *cx, JSXMLClass xml_class, JSString *name,
                        JSString *value)
 {
     uintN flags;
     JSObject *obj;
     JSXML *xml;
     JSObject *qn;
 
--- a/js/src/jsxml.h
+++ b/js/src/jsxml.h
@@ -328,19 +328,16 @@ js_StepXMLListFilter(JSContext *cx, JSBo
 
 extern JSObject *
 js_ValueToXMLObject(JSContext *cx, jsval v);
 
 extern JSObject *
 js_ValueToXMLListObject(JSContext *cx, jsval v);
 
 extern JSObject *
-js_CloneXMLObject(JSContext *cx, JSObject *obj);
-
-extern JSObject *
 js_NewXMLSpecialObject(JSContext *cx, JSXMLClass xml_class, JSString *name,
                        JSString *value);
 
 extern JSString *
 js_MakeXMLCDATAString(JSContext *cx, JSString *str);
 
 extern JSString *
 js_MakeXMLCommentString(JSContext *cx, JSString *str);