Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(18)

Unified Diff: include/v8.h

Issue 334403003: MIPS: Fix big-endian after r21774/r21803. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix per review comments. Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/hydrogen-instructions.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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) {
« no previous file with comments | « no previous file | src/hydrogen-instructions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698