Bug 1289987 - Part 2: Remove more VS2013 workarounds in js/. r=fitzgen
☠☠ backed out by 29315d9869a2 ☠ ☠
authorChris Peterson <cpeterson@mozilla.com>
Thu, 28 Jul 2016 22:33:39 -0700
changeset 307343 2b9b892d36ff4e85c7dac2f0b65608ceebe531d7
parent 307342 d539c846b609c990aab2a9f489330b2da81df53a
child 307344 e2582f36b0e3be2c6bf1184adf506e36770249ed
push id80086
push usercpeterson@mozilla.com
push dateSat, 30 Jul 2016 02:57:26 +0000
treeherdermozilla-inbound@e2582f36b0e3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfitzgen
bugs1289987
milestone50.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 1289987 - Part 2: Remove more VS2013 workarounds in js/. r=fitzgen
js/src/asmjs/WasmTypes.cpp
js/src/frontend/TokenStream.h
js/src/jsapi-tests/testGCHeapPostBarriers.cpp
--- a/js/src/asmjs/WasmTypes.cpp
+++ b/js/src/asmjs/WasmTypes.cpp
@@ -311,22 +311,17 @@ wasm::AddressOf(SymbolicAddress imm, Exc
       case SymbolicAddress::AtomicFetchOr:
         return FuncCast<int32_t (int32_t, int32_t, int32_t)>(js::atomics_or_asm_callout, Args_General3);
       case SymbolicAddress::AtomicFetchXor:
         return FuncCast<int32_t (int32_t, int32_t, int32_t)>(js::atomics_xor_asm_callout, Args_General3);
 #endif
       case SymbolicAddress::ModD:
         return FuncCast(NumberMod, Args_Double_DoubleDouble);
       case SymbolicAddress::SinD:
-#ifdef _WIN64
-        // Workaround a VS 2013 sin issue, see math_sin_uncached.
-        return FuncCast<double (double)>(js::math_sin_uncached, Args_Double_Double);
-#else
         return FuncCast<double (double)>(sin, Args_Double_Double);
-#endif
       case SymbolicAddress::CosD:
         return FuncCast<double (double)>(cos, Args_Double_Double);
       case SymbolicAddress::TanD:
         return FuncCast<double (double)>(tan, Args_Double_Double);
       case SymbolicAddress::ASinD:
         return FuncCast<double (double)>(fdlibm::asin, Args_Double_Double);
       case SymbolicAddress::ACosD:
         return FuncCast<double (double)>(fdlibm::acos, Args_Double_Double);
--- a/js/src/frontend/TokenStream.h
+++ b/js/src/frontend/TokenStream.h
@@ -170,34 +170,16 @@ struct Token
         RegExpFlag      reflags;        // regexp flags; use tokenbuf to access
                                         //   regexp chars
     } u;
 #ifdef DEBUG
     Modifier modifier;                  // Modifier used to get this token
     ModifierException modifierException; // Exception for this modifier
 #endif
 
-    // This constructor is necessary only for MSVC 2013 and how it compiles the
-    // initialization of TokenStream::tokens.  That field is initialized as
-    // tokens() in the constructor init-list.  This *should* zero the entire
-    // array, then (because Token has a non-trivial constructor, because
-    // TokenPos has a user-provided constructor) call the implicit Token
-    // constructor on each element, which would call the TokenPos constructor
-    // for Token::pos and do nothing.  (All of which is equivalent to just
-    // zeroing TokenStream::tokens.)  But MSVC 2013 (2010/2012 don't have this
-    // bug) doesn't zero out each element, so we need this extra constructor to
-    // make it do the right thing.  (Token is used primarily by reference or
-    // pointer, and it's only initialized a very few places, so having a
-    // user-defined constructor won't hurt perf.)  See also bug 920318.
-    Token()
-      : pos(0, 0)
-    {
-        MOZ_MAKE_MEM_UNDEFINED(&type, sizeof(type));
-    }
-
     // Mutators
 
     void setName(PropertyName* name) {
         MOZ_ASSERT(type == TOK_NAME);
         u.name = name;
     }
 
     void setAtom(JSAtom* atom) {
--- a/js/src/jsapi-tests/testGCHeapPostBarriers.cpp
+++ b/js/src/jsapi-tests/testGCHeapPostBarriers.cpp
@@ -54,23 +54,16 @@ BEGIN_TEST(testGCHeapPostBarriers)
 
     /* Currently JSObject and JSFunction objects are nursery allocated. */
     CHECK(TestHeapPostBarriersForType<JSObject>());
     CHECK(TestHeapPostBarriersForType<JSFunction>());
 
     return true;
 }
 
-MOZ_NEVER_INLINE bool
-Passthrough(bool value)
-{
-    /* Work around a Win64 optimization bug in VS2010. (Bug 1033146) */
-    return value;
-}
-
 bool
 CanAccessObject(JSObject* obj)
 {
     JS::RootedObject rootedObj(cx, obj);
     JS::RootedValue value(cx);
     CHECK(JS_GetProperty(cx, rootedObj, "x", &value));
     CHECK(value.isInt32());
     CHECK(value.toInt32() == 42);