Bug 806298: Disable recompile check for constructing JM calls, r=dvander
authorHannes Verschore <hv1989@gmail.com>
Tue, 13 Nov 2012 09:45:35 +0100
changeset 113071 470acc9eaa36c312a0ac712243801d74ef7411e8
parent 113070 92cb4a2c1ed4d51eb37d9ccf467fa7abacdd5772
child 113072 51533e35127de613651c32689220f0b354a2c347
push id17926
push userhv1989@gmail.com
push dateTue, 13 Nov 2012 08:45:44 +0000
treeherdermozilla-inbound@470acc9eaa36 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdvander
bugs806298
milestone19.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 806298: Disable recompile check for constructing JM calls, r=dvander
js/src/methodjit/Compiler.cpp
--- a/js/src/methodjit/Compiler.cpp
+++ b/js/src/methodjit/Compiler.cpp
@@ -3975,16 +3975,22 @@ mjit::Compiler::ionCompileHelper()
     if (!MaybeIonCompileable(cx, outerScript, &recompileCheckForIon))
         return;
 
     uint32_t minUses = ion::UsesBeforeIonRecompile(outerScript, PC);
 
     uint32_t *useCountAddress = script_->addressOfUseCount();
     masm.add32(Imm32(1), AbsoluteAddress(useCountAddress));
 
+    // We cannot inline a JM -> Ion constructing call.
+    // Compiling this function is pointless and would disable the JM -> JM fastpath.
+    // This function will start running in Ion, when caller runs in Ion/Interpreter.
+    if (isConstructing)
+        return;
+
     // If we don't want to do a recompileCheck for Ion, then this just needs to
     // increment the useCount so that we know when to recompile this function
     // from an Ion call.  No need to call out to recompiler stub.
     if (!recompileCheckForIon)
         return;
 
     void *ionScriptAddress = &script_->ion;