Bug 1090491 part 3 - Remove unused unalisedVar() methods, fix a comment. r=shu
authorJan de Mooij <jdemooij@mozilla.com>
Fri, 31 Oct 2014 10:40:24 +0100
changeset 213380 b4da2811e10ead9aec33a93d9bcdff4354e77600
parent 213379 301694366e2055d1ed27bdcd34d7fae3c8a4b4c8
child 213381 0eeb6a55facb93c9a9437d431e4b1cd45ca95624
push id27748
push userryanvm@gmail.com
push dateFri, 31 Oct 2014 20:14:33 +0000
treeherdermozilla-central@12ac66e2c016 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersshu
bugs1090491
milestone36.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 1090491 part 3 - Remove unused unalisedVar() methods, fix a comment. r=shu
js/src/jit/BaselineFrame.h
js/src/jit/RematerializedFrame.h
js/src/vm/Stack-inl.h
js/src/vm/Stack.h
--- a/js/src/jit/BaselineFrame.h
+++ b/js/src/jit/BaselineFrame.h
@@ -163,22 +163,16 @@ class BaselineFrame
         MOZ_ASSERT((size % sizeof(Value)) == 0);
         return size / sizeof(Value);
     }
     Value *valueSlot(size_t slot) const {
         MOZ_ASSERT(slot < numValueSlots());
         return (Value *)this - (slot + 1);
     }
 
-    Value &unaliasedVar(uint32_t i, MaybeCheckAliasing checkAliasing = CHECK_ALIASING) const {
-        MOZ_ASSERT(i < script()->nfixedvars());
-        MOZ_ASSERT_IF(checkAliasing, !script()->varIsAliased(i));
-        return *valueSlot(i);
-    }
-
     Value &unaliasedFormal(unsigned i, MaybeCheckAliasing checkAliasing = CHECK_ALIASING) const {
         MOZ_ASSERT(i < numFormalArgs());
         MOZ_ASSERT_IF(checkAliasing, !script()->argsObjAliasesFormals() &&
                                      !script()->formalIsAliased(i));
         return argv()[i];
     }
 
     Value &unaliasedActual(unsigned i, MaybeCheckAliasing checkAliasing = CHECK_ALIASING) const {
--- a/js/src/jit/RematerializedFrame.h
+++ b/js/src/jit/RematerializedFrame.h
@@ -139,21 +139,16 @@ class RematerializedFrame
 
     Value *argv() {
         return slots_;
     }
     Value *locals() {
         return slots_ + numActualArgs_;
     }
 
-    Value &unaliasedVar(unsigned i, MaybeCheckAliasing checkAliasing = CHECK_ALIASING) {
-        MOZ_ASSERT_IF(checkAliasing, !script()->varIsAliased(i));
-        MOZ_ASSERT(i < script()->nfixed());
-        return locals()[i];
-    }
     Value &unaliasedLocal(unsigned i) {
         MOZ_ASSERT(i < script()->nfixed());
         return locals()[i];
     }
     Value &unaliasedFormal(unsigned i, MaybeCheckAliasing checkAliasing = CHECK_ALIASING) {
         MOZ_ASSERT(i < numFormalArgs());
         MOZ_ASSERT_IF(checkAliasing, !script()->argsObjAliasesFormals() &&
                                      !script()->formalIsAliased(i));
--- a/js/src/vm/Stack-inl.h
+++ b/js/src/vm/Stack-inl.h
@@ -105,24 +105,16 @@ InterpreterFrame::initLocals()
     // throw reference errors. See 13.1.11, 9.2.13, 13.6.3.4, 13.6.4.6,
     // 13.6.4.8, 13.14.5, 15.1.8, and 15.2.0.15.
     Value *lexicalEnd = slots() + script()->fixedLexicalEnd();
     for (Value *lexical = slots() + script()->fixedLexicalBegin(); lexical != lexicalEnd; ++lexical)
         lexical->setMagic(JS_UNINITIALIZED_LEXICAL);
 }
 
 inline Value &
-InterpreterFrame::unaliasedVar(uint32_t i, MaybeCheckAliasing checkAliasing)
-{
-    MOZ_ASSERT_IF(checkAliasing, !script()->varIsAliased(i));
-    MOZ_ASSERT(i < script()->nfixedvars());
-    return slots()[i];
-}
-
-inline Value &
 InterpreterFrame::unaliasedLocal(uint32_t i)
 {
     MOZ_ASSERT(i < script()->nfixed());
     return slots()[i];
 }
 
 inline Value &
 InterpreterFrame::unaliasedFormal(unsigned i, MaybeCheckAliasing checkAliasing)
@@ -484,26 +476,16 @@ AbstractFramePtr::numFormalArgs() const
     if (isInterpreterFrame())
         return asInterpreterFrame()->numFormalArgs();
     if (isBaselineFrame())
         return asBaselineFrame()->numFormalArgs();
     return asRematerializedFrame()->numFormalArgs();
 }
 
 inline Value &
-AbstractFramePtr::unaliasedVar(uint32_t i, MaybeCheckAliasing checkAliasing)
-{
-    if (isInterpreterFrame())
-        return asInterpreterFrame()->unaliasedVar(i, checkAliasing);
-    if (isBaselineFrame())
-        return asBaselineFrame()->unaliasedVar(i, checkAliasing);
-    return asRematerializedFrame()->unaliasedVar(i, checkAliasing);
-}
-
-inline Value &
 AbstractFramePtr::unaliasedLocal(uint32_t i)
 {
     if (isInterpreterFrame())
         return asInterpreterFrame()->unaliasedLocal(i);
     if (isBaselineFrame())
         return asBaselineFrame()->unaliasedLocal(i);
     return asRematerializedFrame()->unaliasedLocal(i);
 }
--- a/js/src/vm/Stack.h
+++ b/js/src/vm/Stack.h
@@ -206,17 +206,16 @@ class AbstractFramePtr
     inline bool hasArgs() const;
     inline bool hasArgsObj() const;
     inline ArgumentsObject &argsObj() const;
     inline void initArgsObj(ArgumentsObject &argsobj) const;
     inline bool useNewType() const;
 
     inline bool copyRawFrameSlots(AutoValueVector *vec) const;
 
-    inline Value &unaliasedVar(uint32_t i, MaybeCheckAliasing checkAliasing = CHECK_ALIASING);
     inline Value &unaliasedLocal(uint32_t i);
     inline Value &unaliasedFormal(unsigned i, MaybeCheckAliasing checkAliasing = CHECK_ALIASING);
     inline Value &unaliasedActual(unsigned i, MaybeCheckAliasing checkAliasing = CHECK_ALIASING);
     template <class Op> inline void unaliasedForEachActual(JSContext *cx, Op op);
 
     inline bool prevUpToDate() const;
     inline void setPrevUpToDate() const;
 
@@ -499,24 +498,23 @@ class InterpreterFrame
      * Only non-eval function frames have arguments. The arguments pushed by
      * the caller are the 'actual' arguments. The declared arguments of the
      * callee are the 'formal' arguments. When the caller passes less actual
      * arguments, missing formal arguments are padded with |undefined|.
      *
      * When a local/formal variable is "aliased" (accessed by nested closures,
      * dynamic scope operations, or 'arguments), the canonical location for
      * that value is the slot of an activation object (scope or arguments).
-     * Currently, all variables are given slots in *both* the stack frame and
-     * heap objects, even though, as just described, only one should ever be
-     * accessed. Thus, it is up to the code performing an access to access the
-     * correct value. These functions assert that accesses to stack values are
-     * unaliased. For more about canonical values locations.
+     * Currently, aliased locals don't have stack slots assigned to them, but
+     * all formals are given slots in *both* the stack frame and heap objects,
+     * even though, as just described, only one should ever be accessed. Thus,
+     * it is up to the code performing an access to access the correct value.
+     * These functions assert that accesses to stack values are unaliased.
      */
 
-    inline Value &unaliasedVar(uint32_t i, MaybeCheckAliasing = CHECK_ALIASING);
     inline Value &unaliasedLocal(uint32_t i);
 
     bool hasArgs() const { return isNonEvalFunctionFrame(); }
     inline Value &unaliasedFormal(unsigned i, MaybeCheckAliasing = CHECK_ALIASING);
     inline Value &unaliasedActual(unsigned i, MaybeCheckAliasing = CHECK_ALIASING);
     template <class Op> inline void unaliasedForEachActual(Op op);
 
     bool copyRawFrameSlots(AutoValueVector *v);