зеркало из https://github.com/mozilla/gecko-dev.git
Bug 674522 - Fix jsval_layout on 64-bit big-endian platforms (r=waldo)
--HG-- extra : rebase_source : e604fcda8977f50f528f327db8f7bdef22522bb2
This commit is contained in:
Родитель
cc94f933c3
Коммит
b144912be6
|
@ -313,7 +313,6 @@ typedef union jsval_layout
|
|||
int32 i32;
|
||||
uint32 u32;
|
||||
JSWhyMagic why;
|
||||
jsuword word;
|
||||
} payload;
|
||||
} s;
|
||||
double asDouble;
|
||||
|
@ -350,11 +349,11 @@ typedef union jsval_layout
|
|||
uint64 payload47 : 47;
|
||||
} debugView;
|
||||
struct {
|
||||
uint32 padding;
|
||||
union {
|
||||
int32 i32;
|
||||
uint32 u32;
|
||||
JSWhyMagic why;
|
||||
jsuword word;
|
||||
} payload;
|
||||
} s;
|
||||
double asDouble;
|
||||
|
@ -363,6 +362,8 @@ typedef union jsval_layout
|
|||
# endif /* JS_BITS_PER_WORD */
|
||||
#endif /* defined(IS_LITTLE_ENDIAN) */
|
||||
|
||||
JS_STATIC_ASSERT(sizeof(jsval_layout) == 8);
|
||||
|
||||
#if JS_BITS_PER_WORD == 32
|
||||
|
||||
/*
|
||||
|
|
|
@ -743,7 +743,11 @@ class Value
|
|||
}
|
||||
|
||||
const jsuword *payloadWord() const {
|
||||
#if JS_BITS_PER_WORD == 32
|
||||
return &data.s.payload.word;
|
||||
#elif JS_BITS_PER_WORD == 64
|
||||
return &data.asBits;
|
||||
#endif
|
||||
}
|
||||
|
||||
private:
|
||||
|
|
Загрузка…
Ссылка в новой задаче