зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1547824 - Change JS::Value from union to class. r=jwalden
Now that all the bad type-punning is gone, JS::Value has a single asBits_ field and we should use a class aggregate type instead. Differential Revision: https://phabricator.services.mozilla.com/D46325 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
80b4dc297a
Коммит
248faef2dc
|
@ -15,15 +15,12 @@
|
|||
#include "jstypes.h" // JS_PUBLIC_API
|
||||
|
||||
#include "js/RootingAPI.h" // JS::Handle, JS::MutableHandle
|
||||
#include "js/Value.h" // JS::Value
|
||||
|
||||
struct JSContext;
|
||||
class JSObject;
|
||||
class JSString;
|
||||
|
||||
namespace JS {
|
||||
union Value;
|
||||
}
|
||||
|
||||
using JSONWriteCallback = bool (*)(const char16_t* buf, uint32_t len,
|
||||
void* data);
|
||||
|
||||
|
|
|
@ -15,15 +15,12 @@
|
|||
|
||||
#include "js/RootingAPI.h" // JS::Handle, JS::MutableHandle
|
||||
#include "js/Utility.h" // JS::UniqueChars
|
||||
#include "js/Value.h" // JS::Value
|
||||
|
||||
struct JSContext;
|
||||
struct JSRuntime;
|
||||
class JSString;
|
||||
|
||||
namespace JS {
|
||||
union Value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the default locale for the ECMAScript Internationalization API
|
||||
* (Intl.Collator, Intl.NumberFormat, Intl.DateTimeFormat, and others that will
|
||||
|
|
|
@ -46,7 +46,7 @@ typedef unsigned char Latin1Char;
|
|||
|
||||
class Symbol;
|
||||
class BigInt;
|
||||
union Value;
|
||||
class Value;
|
||||
|
||||
class Compartment;
|
||||
class Realm;
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
#include "js/Utility.h"
|
||||
|
||||
namespace JS {
|
||||
union Value;
|
||||
class Value;
|
||||
}
|
||||
|
||||
/* JS::Value can store a full int32_t. */
|
||||
|
@ -340,7 +340,7 @@ static inline double CanonicalizeNaN(double d) {
|
|||
* conditional move (not speculated) to zero the payload register if the type
|
||||
* doesn't match.
|
||||
*/
|
||||
union alignas(8) Value {
|
||||
class alignas(8) Value {
|
||||
private:
|
||||
uint64_t asBits_;
|
||||
|
||||
|
|
|
@ -9,12 +9,9 @@
|
|||
|
||||
#include "jsapi.h"
|
||||
|
||||
#include "js/Value.h"
|
||||
#include "vm/NativeObject.h"
|
||||
|
||||
namespace JS {
|
||||
union Value;
|
||||
} // namespace JS
|
||||
|
||||
namespace js {
|
||||
|
||||
// Object constructor native. Exposed only so the JIT can know its address.
|
||||
|
|
|
@ -10,14 +10,10 @@
|
|||
#define builtin_stream_QueueingStrategies_h
|
||||
|
||||
#include "js/Class.h" // JSClass, js::ClassSpec
|
||||
#include "js/Value.h" // JS::Value
|
||||
#include "vm/JSContext.h" // JSContext
|
||||
#include "vm/NativeObject.h" // js::NativeObject
|
||||
|
||||
struct JSContext;
|
||||
|
||||
namespace JS {
|
||||
union Value;
|
||||
}
|
||||
|
||||
namespace js {
|
||||
|
||||
class ByteLengthQueuingStrategy : public NativeObject {
|
||||
|
|
|
@ -31,7 +31,7 @@ class JSFunction;
|
|||
|
||||
namespace JS {
|
||||
|
||||
union Value;
|
||||
class Value;
|
||||
|
||||
template <typename T>
|
||||
class Handle;
|
||||
|
|
Загрузка…
Ссылка в новой задаче