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

Unified Diff: src/objects.h

Issue 14307006: Make it possible to Crankshaft all kinds of stubs. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Review feedback Created 7 years, 8 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 | « src/mips/code-stubs-mips.h ('k') | src/objects.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.h
diff --git a/src/objects.h b/src/objects.h
index 898b176215f57f98e7404a2c7e651bb67137a303..3ca89f08eab202ebf9e14531795a7fed54cd3f60 100644
--- a/src/objects.h
+++ b/src/objects.h
@@ -4327,7 +4327,6 @@ class Code: public HeapObject {
V(FUNCTION) \
V(OPTIMIZED_FUNCTION) \
V(STUB) \
- V(COMPILED_STUB) \
V(BUILTIN) \
V(LOAD_IC) \
V(KEYED_LOAD_IC) \
@@ -4470,6 +4469,11 @@ class Code: public HeapObject {
inline int major_key();
inline void set_major_key(int value);
+ // For kind STUB or ICs, tells whether or not a code object was generated by
+ // the optimizing compiler (but it may not be an optimized function).
+ bool is_crankshafted();
+ inline void set_is_crankshafted(bool value);
+
// For stubs, tells whether they should always exist, so that they can be
// called from other stubs.
inline bool is_pregenerated();
@@ -4785,15 +4789,22 @@ class Code: public HeapObject {
kMarkedForDeoptimizationFirstBit,
kMarkedForDeoptimizationBitCount> {}; // NOLINT
+ // KindSpecificFlags2 layout (ALL)
+ static const int kIsCrankshaftedBit = 0;
+ class IsCrankshaftedField: public BitField<bool,
+ kIsCrankshaftedBit, 1> {}; // NOLINT
+
// KindSpecificFlags2 layout (STUB and OPTIMIZED_FUNCTION)
- static const int kStubMajorKeyFirstBit = 0;
+ static const int kStubMajorKeyFirstBit = kIsCrankshaftedBit + 1;
static const int kSafepointTableOffsetFirstBit =
kStubMajorKeyFirstBit + kStubMajorKeyBits;
- static const int kSafepointTableOffsetBitCount = 26;
+ static const int kSafepointTableOffsetBitCount = 25;
STATIC_ASSERT(kStubMajorKeyFirstBit + kStubMajorKeyBits <= 32);
STATIC_ASSERT(kSafepointTableOffsetFirstBit +
kSafepointTableOffsetBitCount <= 32);
+ STATIC_ASSERT(1 + kStubMajorKeyBits +
+ kSafepointTableOffsetBitCount <= 32);
class SafepointTableOffsetField: public BitField<int,
kSafepointTableOffsetFirstBit,
@@ -4802,8 +4813,10 @@ class Code: public HeapObject {
kStubMajorKeyFirstBit, kStubMajorKeyBits> {}; // NOLINT
// KindSpecificFlags2 layout (FUNCTION)
- class BackEdgeTableOffsetField: public BitField<int, 0, 31> {};
- class BackEdgesPatchedForOSRField: public BitField<bool, 31, 1> {};
+ class BackEdgeTableOffsetField: public BitField<int,
+ kIsCrankshaftedBit + 1, 29> {}; // NOLINT
+ class BackEdgesPatchedForOSRField: public BitField<bool,
+ kIsCrankshaftedBit + 1 + 29, 1> {}; // NOLINT
// Signed field cannot be encoded using the BitField class.
static const int kArgumentsCountShift = 17;
« no previous file with comments | « src/mips/code-stubs-mips.h ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698