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

Unified Diff: src/objects.h

Issue 12886008: Unify kMaxArguments with number of bits used to encode it. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comment Created 7 years, 9 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/objects-inl.h » ('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 89ebf210e552645ac1732540985439d28516f092..142334678e2c8c385c28b5174c565f631fecace2 100644
--- a/src/objects.h
+++ b/src/objects.h
@@ -4302,8 +4302,8 @@ class Code: public HeapObject {
// FLAGS_MIN_VALUE and FLAGS_MAX_VALUE are specified to ensure that
// enumeration type has correct value range (see Issue 830 for more details).
enum Flags {
- FLAGS_MIN_VALUE = kMinInt,
- FLAGS_MAX_VALUE = kMaxInt
+ FLAGS_MIN_VALUE = 0,
+ FLAGS_MAX_VALUE = kMaxUInt32
};
#define CODE_KIND_LIST(V) \
@@ -4784,6 +4784,9 @@ class Code: public HeapObject {
// Signed field cannot be encoded using the BitField class.
static const int kArgumentsCountShift = 17;
static const int kArgumentsCountMask = ~((1 << kArgumentsCountShift) - 1);
+ static const int kArgumentsBits =
+ PlatformSmiTagging::kSmiValueSize - Code::kArgumentsCountShift + 1;
+ static const int kMaxArguments = (1 << kArgumentsBits) - 1;
// This constant should be encodable in an ARM instruction.
static const int kFlagsNotUsedInLookup =
« no previous file with comments | « no previous file | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698