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); |
} |