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

Unified Diff: src/type-info.cc

Issue 1369973002: Use FeedbackVectorSlotKind instead of Code::Kind for type feedback vector. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 3 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-feedback-vector.cc ('k') | test/cctest/interpreter/test-bytecode-generator.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 03e0f34b11bae4c04ffbb29ba5579f6a0cfccc6d..ef5432176ba777afc8abb88bc319b7425f562605 100644
--- a/src/type-info.cc
+++ b/src/type-info.cc
@@ -107,11 +107,11 @@ InlineCacheState TypeFeedbackOracle::LoadInlineCacheState(TypeFeedbackId id) {
InlineCacheState TypeFeedbackOracle::LoadInlineCacheState(
FeedbackVectorICSlot slot) {
if (!slot.IsInvalid()) {
- Code::Kind kind = feedback_vector_->GetKind(slot);
- if (kind == Code::LOAD_IC) {
+ FeedbackVectorSlotKind kind = feedback_vector_->GetKind(slot);
+ if (kind == FeedbackVectorSlotKind::LOAD_IC) {
LoadICNexus nexus(feedback_vector_, slot);
return nexus.StateFromFeedback();
- } else if (kind == Code::KEYED_LOAD_IC) {
+ } else if (kind == FeedbackVectorSlotKind::KEYED_LOAD_IC) {
KeyedLoadICNexus nexus(feedback_vector_, slot);
return nexus.StateFromFeedback();
}
@@ -133,11 +133,11 @@ bool TypeFeedbackOracle::StoreIsUninitialized(TypeFeedbackId ast_id) {
bool TypeFeedbackOracle::StoreIsUninitialized(FeedbackVectorICSlot slot) {
if (!slot.IsInvalid()) {
- Code::Kind kind = feedback_vector_->GetKind(slot);
- if (kind == Code::STORE_IC) {
+ FeedbackVectorSlotKind kind = feedback_vector_->GetKind(slot);
+ if (kind == FeedbackVectorSlotKind::STORE_IC) {
StoreICNexus nexus(feedback_vector_, slot);
return nexus.StateFromFeedback() == UNINITIALIZED;
- } else if (kind == Code::KEYED_STORE_IC) {
+ } else if (kind == FeedbackVectorSlotKind::KEYED_STORE_IC) {
KeyedStoreICNexus nexus(feedback_vector_, slot);
return nexus.StateFromFeedback() == UNINITIALIZED;
}
@@ -197,7 +197,8 @@ void TypeFeedbackOracle::GetStoreModeAndKeyType(
FeedbackVectorICSlot slot, KeyedAccessStoreMode* store_mode,
IcCheckType* key_type) {
if (!slot.IsInvalid() &&
- feedback_vector_->GetKind(slot) == Code::KEYED_STORE_IC) {
+ feedback_vector_->GetKind(slot) ==
+ FeedbackVectorSlotKind::KEYED_STORE_IC) {
KeyedStoreICNexus nexus(feedback_vector_, slot);
*store_mode = nexus.GetKeyedAccessStoreMode();
*key_type = nexus.GetKeyType();
@@ -468,12 +469,12 @@ void TypeFeedbackOracle::CollectReceiverTypes(TypeFeedbackId ast_id,
void TypeFeedbackOracle::CollectReceiverTypes(FeedbackVectorICSlot slot,
SmallMapList* types) {
- Code::Kind kind = feedback_vector_->GetKind(slot);
- if (kind == Code::STORE_IC) {
+ FeedbackVectorSlotKind kind = feedback_vector_->GetKind(slot);
+ if (kind == FeedbackVectorSlotKind::STORE_IC) {
StoreICNexus nexus(feedback_vector_, slot);
CollectReceiverTypes<FeedbackNexus>(&nexus, types);
} else {
- DCHECK(kind == Code::KEYED_STORE_IC);
+ DCHECK_EQ(FeedbackVectorSlotKind::KEYED_STORE_IC, kind);
KeyedStoreICNexus nexus(feedback_vector_, slot);
CollectReceiverTypes<FeedbackNexus>(&nexus, types);
}
« no previous file with comments | « src/type-feedback-vector.cc ('k') | test/cctest/interpreter/test-bytecode-generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698