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

Unified Diff: src/objects.cc

Issue 96083005: Remove Reloc::Mode CODE_TARGET_CONTEXT (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: REBASE Created 7 years 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.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) {
« 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