db-move: moved webkitgtk-6.0 from [testing] to [extra] (x86_64)
[arch-packages.git] / js38 / trunk / mozjs38-1269317.patch
bloba3a57d54479b02141007c6d11b7a3ca440fac614
1 --- a/js/src/jit/RegisterSets.h 2017-02-10 17:33:06.210702431 -0800
2 +++ b/js/src/jit/RegisterSets.h 2017-02-10 17:43:52.877514146 -0800
3 @@ -7,7 +7,6 @@
4 #ifndef jit_RegisterSets_h
5 #define jit_RegisterSets_h
7 -#include "mozilla/Alignment.h"
8 #include "mozilla/MathAlgorithms.h"
10 #include "jit/JitAllocPolicy.h"
11 @@ -26,8 +25,8 @@
12 Code code_;
14 public:
15 - AnyRegister()
16 - { }
17 + AnyRegister() = default;
19 explicit AnyRegister(Register gpr) {
20 code_ = gpr.code();
22 @@ -156,7 +155,7 @@
24 #endif
26 - ValueOperand() {}
27 + ValueOperand() = default;
30 // Registers to hold either either a typed or untyped value.
31 @@ -165,46 +164,25 @@
32 // Type of value being stored.
33 MIRType type_;
35 - // Space to hold either an AnyRegister or a ValueOperand.
36 union U {
37 - mozilla::AlignedStorage2<AnyRegister> typed;
38 - mozilla::AlignedStorage2<ValueOperand> value;
39 + AnyRegister typed;
40 + ValueOperand value;
41 } data;
43 - AnyRegister& dataTyped() {
44 - MOZ_ASSERT(hasTyped());
45 - return *data.typed.addr();
46 - }
47 - ValueOperand& dataValue() {
48 - MOZ_ASSERT(hasValue());
49 - return *data.value.addr();
50 - }
52 - AnyRegister dataTyped() const {
53 - MOZ_ASSERT(hasTyped());
54 - return *data.typed.addr();
55 - }
56 - const ValueOperand& dataValue() const {
57 - MOZ_ASSERT(hasValue());
58 - return *data.value.addr();
59 - }
61 public:
63 - TypedOrValueRegister()
64 - : type_(MIRType_None)
65 - {}
66 + TypedOrValueRegister() = default;
68 TypedOrValueRegister(MIRType type, AnyRegister reg)
69 : type_(type)
71 - dataTyped() = reg;
72 + data.typed = reg;
75 MOZ_IMPLICIT TypedOrValueRegister(ValueOperand value)
76 : type_(MIRType_Value)
78 - dataValue() = value;
79 + data.value = value;
82 MIRType type() const {
83 @@ -220,11 +198,13 @@
86 AnyRegister typedReg() const {
87 - return dataTyped();
88 + MOZ_ASSERT(hasTyped());
89 + return data.typed;
92 ValueOperand valueReg() const {
93 - return dataValue();
94 + MOZ_ASSERT(hasValue());
95 + return data.value;
98 AnyRegister scratchReg() {
99 @@ -240,19 +220,18 @@
100 // Whether a constant value is being stored.
101 bool constant_;
103 - // Space to hold either a Value or a TypedOrValueRegister.
104 union U {
105 - mozilla::AlignedStorage2<Value> constant;
106 - mozilla::AlignedStorage2<TypedOrValueRegister> reg;
107 + Value constant;
108 + TypedOrValueRegister reg;
109 } data;
111 Value& dataValue() {
112 MOZ_ASSERT(constant());
113 - return *data.constant.addr();
114 + return data.constant;
116 TypedOrValueRegister& dataReg() {
117 MOZ_ASSERT(!constant());
118 - return *data.reg.addr();
119 + return data.reg;
122 public: