Bug 841530 - Tweaks to fit JIT inspector after the decompilerectomy, r=pierron.
authorBrian Hackett <bhackett1024@gmail.com>
Mon, 25 Feb 2013 15:31:49 -0700
changeset 122966 74ad7a9937dce57e196406d6e94336c427c98586
parent 122965 62243742ec7637beba092ad93c2af0b741169777
child 122967 0a5e95d8db0226559a7b9e8f50c4efa6f886e648
push id1387
push userphilringnalda@gmail.com
push dateTue, 26 Feb 2013 22:32:56 +0000
treeherderfx-team@ad4cc4e97774 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerspierron
bugs841530
milestone22.0a1
Bug 841530 - Tweaks to fit JIT inspector after the decompilerectomy, r=pierron.
js/src/jsopcode.cpp
js/src/methodjit/StubCalls.cpp
--- a/js/src/jsopcode.cpp
+++ b/js/src/jsopcode.cpp
@@ -1221,19 +1221,16 @@ ExpressionDecompiler::decompilePC(jsbyte
     JS_ASSERT(script->code <= pc && pc < script->code + script->length);
 
     PCStack pcstack;
     if (!pcstack.init(cx, script, pc))
         return false;
 
     JSOp op = (JSOp)*pc;
 
-    // None of these stack-writing ops generates novel values.
-    JS_ASSERT(op != JSOP_CASE && op != JSOP_DUP && op != JSOP_DUP2);
-
     if (const char *token = CodeToken[op]) {
         // Handle simple cases of binary and unary operators.
         switch (js_CodeSpec[op].nuses) {
           case 2: {
             jssrcnote *sn = js_GetSrcNote(cx, script, pc);
             if (!sn || SN_TYPE(sn) != SRC_ASSIGNOP)
                 return write("(") &&
                        decompilePC(pcstack[-2]) &&
@@ -2252,16 +2249,19 @@ GetPCCountJSON(JSContext *cx, const Scri
     AppendJSONProperty(buf, "text", NO_COMMA);
 
     JSString *str = JS_DecompileScript(cx, script, NULL, 0);
     if (!str || !(str = ValueToSource(cx, StringValue(str))))
         return false;
 
     buf.append(str);
 
+    AppendJSONProperty(buf, "line");
+    NumberValueToStringBuffer(cx, Int32Value(script->lineno), buf);
+
     AppendJSONProperty(buf, "opcodes");
     buf.append('[');
     bool comma = false;
 
     SrcNoteLineScanner scanner(script->notes(), script->lineno);
 
     for (jsbytecode *pc = script->code;
          pc < script->code + script->length;
--- a/js/src/methodjit/StubCalls.cpp
+++ b/js/src/methodjit/StubCalls.cpp
@@ -773,17 +773,17 @@ stubs::Interrupt(VMFrame &f, jsbytecode 
 
 #ifdef JS_ION
 void JS_FASTCALL
 stubs::TriggerIonCompile(VMFrame &f)
 {
     AssertCanGC();
     RootedScript script(f.cx, f.script());
 
-    if (ion::js_IonOptions.parallelCompilation) {
+    if (ion::js_IonOptions.parallelCompilation && !f.cx->runtime->profilingScripts) {
         if (script->hasIonScript()) {
             /*
              * Normally TriggerIonCompile is not called if !script->ion, but the
              * latter jump can be bypassed if DisableScriptCodeForIon wants this
              * code to be destroyed so that the Ion code can start running.
              */
             ExpandInlineFrames(f.cx->compartment);
             Recompiler::clearStackReferences(f.cx->runtime->defaultFreeOp(), script);