| Index: include/v8.h
|
| diff --git a/include/v8.h b/include/v8.h
|
| index 1db14733a6e2e8699879ec631e8b0ad6507c40b4..ab51b44b5397480ef319075293f7c076077fe03f 100644
|
| --- a/include/v8.h
|
| +++ b/include/v8.h
|
| @@ -5517,7 +5517,8 @@ class Internals {
|
| // These values match non-compiler-dependent values defined within
|
| // the implementation of v8.
|
| static const int kHeapObjectMapOffset = 0;
|
| - static const int kMapInstanceTypeOffset = 1 * kApiPointerSize + kApiIntSize;
|
| + static const int kMapInstanceTypeAndBitFieldOffset =
|
| + 1 * kApiPointerSize + kApiIntSize;
|
| static const int kStringResourceOffset = 3 * kApiPointerSize;
|
|
|
| static const int kOddballKindOffset = 3 * kApiPointerSize;
|
| @@ -5595,7 +5596,9 @@ class Internals {
|
| V8_INLINE static int GetInstanceType(internal::Object* obj) {
|
| typedef internal::Object O;
|
| O* map = ReadField<O*>(obj, kHeapObjectMapOffset);
|
| - return ReadField<uint8_t>(map, kMapInstanceTypeOffset);
|
| + // Map::InstanceType is defined so that it will always be loaded into
|
| + // the LS 8 bits of one 16-bit word, regardless of endianess.
|
| + return ReadField<uint16_t>(map, kMapInstanceTypeAndBitFieldOffset) & 0xff;
|
| }
|
|
|
| V8_INLINE static int GetOddballKind(internal::Object* obj) {
|
|
|