Reviewers: Hannes Payer,

Message:
PTAL

Description:
Increase number of available major keys.

This also adds a static assert checking that we do not
exceed the available number of major keys. The safepoint
table offset is now max 2^24 instead of 2^25.

Please review this at https://codereview.chromium.org/110183003/

SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge

Affected files (+3, -2 lines):
  M src/code-stubs.h
  M src/objects.h


Index: src/code-stubs.h
diff --git a/src/code-stubs.h b/src/code-stubs.h
index f2de6166d3aefb8aa47b768dde69e0df08442560..55ebe219fdf8c80ba91c52cced2e0aab4a1b09b4 100644
--- a/src/code-stubs.h
+++ b/src/code-stubs.h
@@ -245,6 +245,7 @@ class CodeStub BASE_EMBEDDED {
            MajorKeyBits::encode(MajorKey());
   }

+  STATIC_ASSERT(NUMBER_OF_IDS < (1 << kStubMajorKeyBits));
   class MajorKeyBits: public BitField<uint32_t, 0, kStubMajorKeyBits> {};
   class MinorKeyBits: public BitField<uint32_t,
       kStubMajorKeyBits, kStubMinorKeyBits> {};  // NOLINT
Index: src/objects.h
diff --git a/src/objects.h b/src/objects.h
index f09d58fc5dc53dc5a3b99abb8fd76e944373f8a9..cc77e1977d3f54f3be1f97f7e15900b6e5c074ac 100644
--- a/src/objects.h
+++ b/src/objects.h
@@ -311,7 +311,7 @@ static const ExtraICState kNoExtraICState = 0;
 // Instance size sentinel for objects of variable size.
 const int kVariableSizeSentinel = 0;

-const int kStubMajorKeyBits = 6;
+const int kStubMajorKeyBits = 7;
const int kStubMinorKeyBits = kBitsPerInt - kSmiTagSize - kStubMajorKeyBits;

 // All Maps have a field instance_type containing a InstanceType.
@@ -5484,7 +5484,7 @@ class Code: public HeapObject {
   static const int kStubMajorKeyFirstBit = kIsCrankshaftedBit + 1;
   static const int kSafepointTableOffsetFirstBit =
       kStubMajorKeyFirstBit + kStubMajorKeyBits;
-  static const int kSafepointTableOffsetBitCount = 25;
+  static const int kSafepointTableOffsetBitCount = 24;

   STATIC_ASSERT(kStubMajorKeyFirstBit + kStubMajorKeyBits <= 32);
   STATIC_ASSERT(kSafepointTableOffsetFirstBit +


--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to