author | Jan de Mooij <jdemooij@mozilla.com> |
Tue, 04 Nov 2014 14:44:38 +0100 | |
changeset 213921 | e3a2c467103bc84efca6a5331d910416705f2461 |
parent 213920 | 1dd40ce6fc5a3774ecf69536b9b240135ffd6f2f |
child 213922 | 0c13267c53abb10c9a5d863f88ea8fea321c2229 |
push id | 27768 |
push user | kwierso@gmail.com |
push date | Wed, 05 Nov 2014 02:19:03 +0000 |
treeherder | mozilla-central@a1823d3c7365 [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | wingo |
bugs | 1090491 |
milestone | 36.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
|
js/src/jit/BaselineFrame.cpp | file | annotate | diff | comparison | revisions | |
js/src/vm/Stack.cpp | file | annotate | diff | comparison | revisions |
--- a/js/src/jit/BaselineFrame.cpp +++ b/js/src/jit/BaselineFrame.cpp @@ -56,20 +56,19 @@ BaselineFrame::trace(JSTracer *trc, JitF // Mark locals and stack values. JSScript *script = this->script(); size_t nfixed = script->nfixed(); size_t nlivefixed = script->nbodyfixed(); if (nfixed != nlivefixed) { jsbytecode *pc; - NestedScopeObject *staticScope; + frameIterator.baselineScriptAndPc(nullptr, &pc); - frameIterator.baselineScriptAndPc(nullptr, &pc); - staticScope = script->getStaticScope(pc); + NestedScopeObject *staticScope = script->getStaticScope(pc); while (staticScope && !staticScope->is<StaticBlockObject>()) staticScope = staticScope->enclosingNestedScope(); if (staticScope) { StaticBlockObject &blockObj = staticScope->as<StaticBlockObject>(); nlivefixed = blockObj.localOffset() + blockObj.numVariables(); } }
--- a/js/src/vm/Stack.cpp +++ b/js/src/vm/Stack.cpp @@ -338,31 +338,33 @@ InterpreterFrame::markValues(JSTracer *t gc::MarkValueRootRange(trc, end - start, slots() + start, "vm_stack"); } void InterpreterFrame::markValues(JSTracer *trc, Value *sp, jsbytecode *pc) { MOZ_ASSERT(sp >= slots()); - NestedScopeObject *staticScope; + JSScript *script = this->script(); + size_t nfixed = script->nfixed(); + size_t nlivefixed = script->nbodyfixed(); - staticScope = script()->getStaticScope(pc); - while (staticScope && !staticScope->is<StaticBlockObject>()) - staticScope = staticScope->enclosingNestedScope(); + if (nfixed != nlivefixed) { + NestedScopeObject *staticScope = script->getStaticScope(pc); + while (staticScope && !staticScope->is<StaticBlockObject>()) + staticScope = staticScope->enclosingNestedScope(); - size_t nfixed = script()->nfixed(); - size_t nlivefixed; + if (staticScope) { + StaticBlockObject &blockObj = staticScope->as<StaticBlockObject>(); + nlivefixed = blockObj.localOffset() + blockObj.numVariables(); + } + } - if (staticScope) { - StaticBlockObject &blockObj = staticScope->as<StaticBlockObject>(); - nlivefixed = blockObj.localOffset() + blockObj.numVariables(); - } else { - nlivefixed = script()->nbodyfixed(); - } + MOZ_ASSERT(nlivefixed <= nfixed); + MOZ_ASSERT(nlivefixed >= script->nbodyfixed()); if (nfixed == nlivefixed) { // All locals are live. markValues(trc, 0, sp - slots()); } else { // Mark operand stack. markValues(trc, nfixed, sp - slots());