Index: src/objects.cc |
diff --git a/src/objects.cc b/src/objects.cc |
index 43a047e78c0cd80c179a3c476c919f6251475362..b7e446c929fc5be370b010adddf916a7c33b86c3 100644 |
--- a/src/objects.cc |
+++ b/src/objects.cc |
@@ -10650,8 +10650,7 @@ void Code::ClearInlineCaches(Code::Kind kind) { |
void Code::ClearInlineCaches(Code::Kind* kind) { |
int mask = RelocInfo::ModeMask(RelocInfo::CODE_TARGET) | |
RelocInfo::ModeMask(RelocInfo::CONSTRUCT_CALL) | |
- RelocInfo::ModeMask(RelocInfo::CODE_TARGET_WITH_ID) | |
- RelocInfo::ModeMask(RelocInfo::CODE_TARGET_CONTEXT); |
+ RelocInfo::ModeMask(RelocInfo::CODE_TARGET_WITH_ID); |
for (RelocIterator it(this, mask); !it.done(); it.next()) { |
RelocInfo* info = it.rinfo(); |
Code* target(Code::GetCodeFromTargetAddress(info->target_address())); |
@@ -10864,6 +10863,17 @@ bool Code::CanDeoptAt(Address pc) { |
} |
+bool Code::IsContextual() { |
+ ASSERT(is_inline_cache_stub()); |
+ Kind kind = this->kind(); |
+ if (kind == STORE_IC || kind == LOAD_IC || kind == CALL_IC) { |
+ ExtraICState extra_state = extra_ic_state(); |
+ return IC::GetContextualMode(extra_state) == CONTEXTUAL; |
+ } |
+ return false; |
+} |
+ |
+ |
// Identify kind of code. |
const char* Code::Kind2String(Kind kind) { |
switch (kind) { |