Bug 928889: Baseline: Return the correct *pc when in prologue, r=jandem
authorHannes Verschore <hv1989@gmail.com>
Tue, 22 Oct 2013 12:19:03 +0200
changeset 151617 f92a77d8ee8f1fac74673c4a7e210b5a3787e22a
parent 151616 5a7016b24bf89eddf511b4893a8be3f6192814e1
child 151618 c5c2519643e910e31e11299a9596bf55717810df
push id35247
push userhv1989@gmail.com
push dateTue, 22 Oct 2013 10:19:36 +0000
treeherdermozilla-inbound@f92a77d8ee8f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjandem
bugs928889
milestone27.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 928889: Baseline: Return the correct *pc when in prologue, r=jandem
js/src/jit/IonFrames.cpp
--- a/js/src/jit/IonFrames.cpp
+++ b/js/src/jit/IonFrames.cpp
@@ -179,19 +179,20 @@ void
 IonFrameIterator::baselineScriptAndPc(JSScript **scriptRes, jsbytecode **pcRes) const
 {
     JS_ASSERT(isBaselineJS());
     JSScript *script = this->script();
     if (scriptRes)
         *scriptRes = script;
     uint8_t *retAddr = returnAddressToFp();
     if (pcRes) {
-        // If the return address is into the prologue entry addr, then assume PC 0.
+        // If the return address is into the prologue entry address, then assume start
+        // of script.
         if (retAddr == script->baselineScript()->prologueEntryAddr()) {
-            *pcRes = 0;
+            *pcRes = script->code;
             return;
         }
 
         // The return address _may_ be a return from a callVM or IC chain call done for
         // some op.
         ICEntry *icEntry = script->baselineScript()->maybeICEntryFromReturnAddress(retAddr);
         if (icEntry) {
             *pcRes = icEntry->pc(script);