Bug 773731 - Fix UseNewType pattern matching. (r=bhackett)
authorKannan Vijayan <kvijayan@mozilla.com>
Mon, 16 Jul 2012 15:36:12 -0400
changeset 104937 3b2bad6c343b29f8c3a824c91686e0afdb1480a0
parent 104936 f955e442c2af16e9f4bc2915384a3718b3a79839
child 104938 706751356875fc127864023d32d3ce3cf3ea4691
push id1490
push userakeybl@mozilla.com
push dateMon, 08 Oct 2012 18:29:50 +0000
treeherdermozilla-beta@f335e7dacdc1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbhackett
bugs773731
milestone17.0a1
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 773731 - Fix UseNewType pattern matching. (r=bhackett)
js/src/jsinterp.cpp
--- a/js/src/jsinterp.cpp
+++ b/js/src/jsinterp.cpp
@@ -2450,31 +2450,31 @@ BEGIN_CASE(JSOP_FUNCALL)
         DO_NEXT_OP(len);
     }
 
     if (!TypeMonitorCall(cx, args, construct))
         goto error;
 
     InitialFrameFlags initial = construct ? INITIAL_CONSTRUCT : INITIAL_NONE;
 
+    bool newType = cx->typeInferenceEnabled() && UseNewType(cx, script, regs.pc);
+
     JSScript *newScript = fun->script();
 
     if (newScript->compileAndGo && newScript->hasClearedGlobal()) {
         JS_ReportErrorNumber(cx, js_GetErrorMessage, NULL, JSMSG_CLEARED_SCOPE);
         goto error;
     }
 
     if (!cx->stack.pushInlineFrame(cx, regs, args, *fun, newScript, initial))
         goto error;
 
     SET_SCRIPT(regs.fp()->script());
     RESET_USE_METHODJIT();
 
-    bool newType = cx->typeInferenceEnabled() && UseNewType(cx, script, regs.pc);
-
 #ifdef JS_METHODJIT
     if (!newType) {
         /* Try to ensure methods are method JIT'd.  */
         mjit::CompileStatus status = mjit::CanMethodJIT(cx, script, script->code,
                                                         construct,
                                                         mjit::CompileRequest_Interpreter,
                                                         regs.fp());
         if (status == mjit::Compile_Error)