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

Unified Diff: src/objects.h

Issue 115744: This patch much improves our tracking of whether function is... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 7 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
Index: src/objects.h
===================================================================
--- src/objects.h (revision 2034)
+++ src/objects.h (working copy)
@@ -2252,9 +2252,10 @@
// [flags]: Access to specific code flags.
inline Kind kind();
- inline InlineCacheState ic_state(); // only valid for IC stubs
- inline PropertyType type(); // only valid for monomorphic IC stubs
- inline int arguments_count(); // only valid for call IC stubs
+ inline InlineCacheState ic_state(); // Only valid for IC stubs.
+ inline InlineCacheInLoop ic_in_loop(); // Only valid for IC stubs..
+ inline PropertyType type(); // Only valid for monomorphic IC stubs.
+ inline int arguments_count(); // Only valid for call IC stubs.
// Testers for IC stub kinds.
inline bool is_inline_cache_stub();
@@ -2276,16 +2277,20 @@
// Flags operations.
static inline Flags ComputeFlags(Kind kind,
+ InlineCacheInLoop in_loop = NOT_IN_LOOP,
InlineCacheState ic_state = UNINITIALIZED,
PropertyType type = NORMAL,
int argc = -1);
- static inline Flags ComputeMonomorphicFlags(Kind kind,
- PropertyType type,
- int argc = -1);
+ static inline Flags ComputeMonomorphicFlags(
+ Kind kind,
+ PropertyType type,
+ InlineCacheInLoop in_loop = NOT_IN_LOOP,
+ int argc = -1);
static inline Kind ExtractKindFromFlags(Flags flags);
static inline InlineCacheState ExtractICStateFromFlags(Flags flags);
+ static inline InlineCacheInLoop ExtractICInLoopFromFlags(Flags flags);
static inline PropertyType ExtractTypeFromFlags(Flags flags);
static inline int ExtractArgumentsCountFromFlags(Flags flags);
static inline Flags RemoveTypeFromFlags(Flags flags);
@@ -2377,14 +2382,16 @@
// Flags layout.
static const int kFlagsICStateShift = 0;
- static const int kFlagsKindShift = 3;
- static const int kFlagsTypeShift = 6;
- static const int kFlagsArgumentsCountShift = 9;
+ static const int kFlagsICInLoopShift = 3;
+ static const int kFlagsKindShift = 4;
+ static const int kFlagsTypeShift = 7;
+ static const int kFlagsArgumentsCountShift = 10;
- static const int kFlagsICStateMask = 0x00000007; // 000000111
- static const int kFlagsKindMask = 0x00000038; // 000111000
- static const int kFlagsTypeMask = 0x000001C0; // 111000000
- static const int kFlagsArgumentsCountMask = 0xFFFFFE00;
+ static const int kFlagsICStateMask = 0x00000007; // 0000000111
+ static const int kFlagsICInLoopMask = 0x00000008; // 0000001000
+ static const int kFlagsKindMask = 0x00000070; // 0001110000
+ static const int kFlagsTypeMask = 0x00000380; // 1110000000
+ static const int kFlagsArgumentsCountMask = 0xFFFFFC00;
private:
DISALLOW_IMPLICIT_CONSTRUCTORS(Code);

Powered by Google App Engine
This is Rietveld 408576698