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

Unified Diff: src/type-info.cc

Issue 1083933002: Pass load ic state through the Oracle. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Adjust defaults. Created 5 years, 8 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/type-info.h ('k') | src/typing.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/type-info.cc
diff --git a/src/type-info.cc b/src/type-info.cc
index 040e25ecf4e5178382a4578f8b061d2e84ec3024..4ad66f85573e78786bb0716be81550146bdd627a 100644
--- a/src/type-info.cc
+++ b/src/type-info.cc
@@ -90,31 +90,33 @@ Handle<Object> TypeFeedbackOracle::GetInfo(FeedbackVectorICSlot slot) {
}
-bool TypeFeedbackOracle::LoadIsUninitialized(TypeFeedbackId id) {
+InlineCacheState TypeFeedbackOracle::LoadInlineCacheState(TypeFeedbackId id) {
Handle<Object> maybe_code = GetInfo(id);
if (maybe_code->IsCode()) {
Handle<Code> code = Handle<Code>::cast(maybe_code);
- return code->is_inline_cache_stub() && code->ic_state() == UNINITIALIZED;
+ if (code->is_inline_cache_stub()) return code->ic_state();
}
- return false;
+
+ // If we can't find an IC, assume we've seen *something*, but we don't know
+ // what. PREMONOMORPHIC roughly encodes this meaning.
+ return PREMONOMORPHIC;
}
-bool TypeFeedbackOracle::LoadIsUninitialized(FeedbackVectorICSlot slot) {
+InlineCacheState TypeFeedbackOracle::LoadInlineCacheState(
+ FeedbackVectorICSlot slot) {
Code::Kind kind = feedback_vector_->GetKind(slot);
if (kind == Code::LOAD_IC) {
LoadICNexus nexus(feedback_vector_, slot);
- return nexus.StateFromFeedback() == UNINITIALIZED;
+ return nexus.StateFromFeedback();
} else if (kind == Code::KEYED_LOAD_IC) {
KeyedLoadICNexus nexus(feedback_vector_, slot);
- return nexus.StateFromFeedback() == UNINITIALIZED;
- } else if (kind == Code::NUMBER_OF_KINDS) {
- // Code::NUMBER_OF_KINDS indicates a slot that was never even compiled
- // in full code.
- return true;
+ return nexus.StateFromFeedback();
}
- return false;
+ // If we can't find an IC, assume we've seen *something*, but we don't know
+ // what. PREMONOMORPHIC roughly encodes this meaning.
+ return PREMONOMORPHIC;
}
« no previous file with comments | « src/type-info.h ('k') | src/typing.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698