Bug 1229604 - Use const for some struct arrays instead of constexpr to work around bug of VS2015u1. r=jandem
authorXidorn Quan <quanxunzhen@gmail.com>
Fri, 04 Dec 2015 11:58:18 +1100
changeset 309718 7ac917869c2103fcfc2dfaecbb558320e4aac929
parent 309717 88b7e78a9de93bea7816a7f0dbade34bea27ad7c
child 309719 e543f76de8176d338bf96937edc88779ba061f78
push id5513
push userraliiev@mozilla.com
push dateMon, 25 Jan 2016 13:55:34 +0000
treeherdermozilla-beta@5ee97dd05b5c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjandem
bugs1229604
milestone45.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 1229604 - Use const for some struct arrays instead of constexpr to work around bug of VS2015u1. r=jandem
js/src/jit/x64/Assembler-x64.h
js/src/jit/x86/Assembler-x86.h
--- a/js/src/jit/x64/Assembler-x64.h
+++ b/js/src/jit/x64/Assembler-x64.h
@@ -101,19 +101,21 @@ static MOZ_CONSTEXPR_VAR Register CallTe
 
 // Different argument registers for WIN64
 #if defined(_WIN64)
 static MOZ_CONSTEXPR_VAR Register IntArgReg0 = rcx;
 static MOZ_CONSTEXPR_VAR Register IntArgReg1 = rdx;
 static MOZ_CONSTEXPR_VAR Register IntArgReg2 = r8;
 static MOZ_CONSTEXPR_VAR Register IntArgReg3 = r9;
 static MOZ_CONSTEXPR_VAR uint32_t NumIntArgRegs = 4;
-static MOZ_CONSTEXPR_VAR Register IntArgRegs[NumIntArgRegs] = { rcx, rdx, r8, r9 };
+// Use "const" instead of MOZ_CONSTEXPR_VAR here to work around a bug
+// of VS2015 Update 1. See bug 1229604.
+static const Register IntArgRegs[NumIntArgRegs] = { rcx, rdx, r8, r9 };
 
-static MOZ_CONSTEXPR_VAR Register CallTempNonArgRegs[] = { rax, rdi, rbx, rsi };
+static const Register CallTempNonArgRegs[] = { rax, rdi, rbx, rsi };
 static const uint32_t NumCallTempNonArgRegs =
     mozilla::ArrayLength(CallTempNonArgRegs);
 
 static MOZ_CONSTEXPR_VAR FloatRegister FloatArgReg0 = xmm0;
 static MOZ_CONSTEXPR_VAR FloatRegister FloatArgReg1 = xmm1;
 static MOZ_CONSTEXPR_VAR FloatRegister FloatArgReg2 = xmm2;
 static MOZ_CONSTEXPR_VAR FloatRegister FloatArgReg3 = xmm3;
 static const uint32_t NumFloatArgRegs = 4;
@@ -121,19 +123,21 @@ static MOZ_CONSTEXPR_VAR FloatRegister F
 #else
 static MOZ_CONSTEXPR_VAR Register IntArgReg0 = rdi;
 static MOZ_CONSTEXPR_VAR Register IntArgReg1 = rsi;
 static MOZ_CONSTEXPR_VAR Register IntArgReg2 = rdx;
 static MOZ_CONSTEXPR_VAR Register IntArgReg3 = rcx;
 static MOZ_CONSTEXPR_VAR Register IntArgReg4 = r8;
 static MOZ_CONSTEXPR_VAR Register IntArgReg5 = r9;
 static MOZ_CONSTEXPR_VAR uint32_t NumIntArgRegs = 6;
-static MOZ_CONSTEXPR_VAR Register IntArgRegs[NumIntArgRegs] = { rdi, rsi, rdx, rcx, r8, r9 };
+static const Register IntArgRegs[NumIntArgRegs] = { rdi, rsi, rdx, rcx, r8, r9 };
 
-static MOZ_CONSTEXPR_VAR Register CallTempNonArgRegs[] = { rax, rbx };
+// Use "const" instead of MOZ_CONSTEXPR_VAR here to work around a bug
+// of VS2015 Update 1. See bug 1229604.
+static const Register CallTempNonArgRegs[] = { rax, rbx };
 static const uint32_t NumCallTempNonArgRegs =
     mozilla::ArrayLength(CallTempNonArgRegs);
 
 static MOZ_CONSTEXPR_VAR FloatRegister FloatArgReg0 = xmm0;
 static MOZ_CONSTEXPR_VAR FloatRegister FloatArgReg1 = xmm1;
 static MOZ_CONSTEXPR_VAR FloatRegister FloatArgReg2 = xmm2;
 static MOZ_CONSTEXPR_VAR FloatRegister FloatArgReg3 = xmm3;
 static MOZ_CONSTEXPR_VAR FloatRegister FloatArgReg4 = xmm4;
--- a/js/src/jit/x86/Assembler-x86.h
+++ b/js/src/jit/x86/Assembler-x86.h
@@ -56,17 +56,19 @@ static MOZ_CONSTEXPR_VAR Register Argume
 static MOZ_CONSTEXPR_VAR Register CallTempReg0 = edi;
 static MOZ_CONSTEXPR_VAR Register CallTempReg1 = eax;
 static MOZ_CONSTEXPR_VAR Register CallTempReg2 = ebx;
 static MOZ_CONSTEXPR_VAR Register CallTempReg3 = ecx;
 static MOZ_CONSTEXPR_VAR Register CallTempReg4 = esi;
 static MOZ_CONSTEXPR_VAR Register CallTempReg5 = edx;
 
 // We have no arg regs, so our NonArgRegs are just our CallTempReg*
-static MOZ_CONSTEXPR_VAR Register CallTempNonArgRegs[] = { edi, eax, ebx, ecx, esi, edx };
+// Use "const" instead of MOZ_CONSTEXPR_VAR here to work around a bug
+// of VS2015 Update 1. See bug 1229604.
+static const Register CallTempNonArgRegs[] = { edi, eax, ebx, ecx, esi, edx };
 static const uint32_t NumCallTempNonArgRegs =
     mozilla::ArrayLength(CallTempNonArgRegs);
 
 class ABIArgGenerator
 {
     uint32_t stackOffset_;
     ABIArg current_;