Bug 876301 - Emit sourcenote to enable ion compilation of default parameters. r=h4writer
authorTom Schuster <evilpies@gmail.com>
Sat, 01 Jun 2013 16:39:02 +0200
changeset 140821 3ecac4bcc92e6df394f6da25dcfd56fbc41e130b
parent 140820 77a0a9374c664c094f925f2b94978432c5430145
child 140822 20dbb98fcac2eecbb5cfeea3de26966773aa3efa
push id3911
push userakeybl@mozilla.com
push dateMon, 24 Jun 2013 20:17:26 +0000
treeherdermozilla-aurora@7e26ca8db92b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersh4writer
bugs876301
milestone24.0a1
Bug 876301 - Emit sourcenote to enable ion compilation of default parameters. r=h4writer
js/src/frontend/BytecodeEmitter.cpp
--- a/js/src/frontend/BytecodeEmitter.cpp
+++ b/js/src/frontend/BytecodeEmitter.cpp
@@ -5590,16 +5590,19 @@ EmitDefaults(JSContext *cx, BytecodeEmit
         if (!BindNameToSlot(cx, bce, arg))
             return false;
         if (!EmitVarOp(cx, arg, JSOP_GETARG, bce))
             return false;
         if (Emit1(cx, bce, JSOP_UNDEFINED) < 0)
             return false;
         if (Emit1(cx, bce, JSOP_STRICTEQ) < 0)
             return false;
+        // Emit source note to enable ion compilation.
+        if (NewSrcNote(cx, bce, SRC_IF) < 0)
+            return false;
         ptrdiff_t jump = EmitJump(cx, bce, JSOP_IFEQ, 0);
         if (jump < 0)
             return false;
         if (!EmitTree(cx, bce, arg->expr()))
             return false;
         if (!EmitVarOp(cx, arg, JSOP_SETARG, bce))
             return false;
         if (Emit1(cx, bce, JSOP_POP) < 0)