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

Unified Diff: src/objects-inl.h

Issue 163363003: Don't mix handler flags into regular flag compuation. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 10 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/objects.h ('k') | src/stub-cache.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects-inl.h
diff --git a/src/objects-inl.h b/src/objects-inl.h
index c916fc2be680ea91eddaf8ca80d21fc81747e3f7..387065ffe04a886062ae36b622e0f15554cabda9 100644
--- a/src/objects-inl.h
+++ b/src/objects-inl.h
@@ -4204,12 +4204,6 @@ Code::StubType Code::type() {
}
-int Code::arguments_count() {
- ASSERT(kind() == STUB || is_handler());
- return ExtractArgumentsCountFromFlags(flags());
-}
-
-
// For initialization.
void Code::set_raw_kind_specific_flags1(int value) {
WRITE_INT_FIELD(this, kKindSpecificFlags1Offset, value);
@@ -4484,7 +4478,6 @@ Code::Flags Code::ComputeFlags(Kind kind,
InlineCacheState ic_state,
ExtraICState extra_ic_state,
StubType type,
- Kind handler_kind,
InlineCacheHolderFlag holder) {
// Compute the bit mask.
unsigned int bits = KindField::encode(kind)
@@ -4492,9 +4485,6 @@ Code::Flags Code::ComputeFlags(Kind kind,
| TypeField::encode(type)
| ExtraICStateField::encode(extra_ic_state)
| CacheHolderField::encode(holder);
- if (handler_kind != STUB) {
- bits |= (handler_kind << kArgumentsCountShift);
- }
return static_cast<Flags>(bits);
}
@@ -4502,10 +4492,17 @@ Code::Flags Code::ComputeFlags(Kind kind,
Code::Flags Code::ComputeMonomorphicFlags(Kind kind,
ExtraICState extra_ic_state,
InlineCacheHolderFlag holder,
- StubType type,
- Kind handler_kind) {
- return ComputeFlags(kind, MONOMORPHIC, extra_ic_state, type,
- handler_kind, holder);
+ StubType type) {
+ return ComputeFlags(kind, MONOMORPHIC, extra_ic_state, type, holder);
+}
+
+
+Code::Flags Code::ComputeHandlerFlags(Kind handler_kind,
+ ExtraICState extra_ic_state,
+ StubType type,
+ InlineCacheHolderFlag holder) {
+ ExtraICState extra = HandlerKindField::encode(handler_kind) | extra_ic_state;
+ return ComputeFlags(Code::HANDLER, MONOMORPHIC, extra, type, holder);
}
@@ -4529,11 +4526,6 @@ Code::StubType Code::ExtractTypeFromFlags(Flags flags) {
}
-int Code::ExtractArgumentsCountFromFlags(Flags flags) {
- return (flags & kArgumentsCountMask) >> kArgumentsCountShift;
-}
-
-
InlineCacheHolderFlag Code::ExtractCacheHolderFromFlags(Flags flags) {
return CacheHolderField::decode(flags);
}
« no previous file with comments | « src/objects.h ('k') | src/stub-cache.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698