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

Unified Diff: src/type-info.cc

Issue 23537067: Add support for keyed-call on arrays of fast elements (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Compare with actual map loaded from the context Created 7 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
Index: src/type-info.cc
diff --git a/src/type-info.cc b/src/type-info.cc
index 190eb3e6fff90dbaad5d5d479d1da0b148b9c8a7..24eb85f12cfe662c408f0dd6fbbe7aa007a06c86 100644
--- a/src/type-info.cc
+++ b/src/type-info.cc
@@ -180,7 +180,15 @@ bool TypeFeedbackOracle::StoreIsKeyedPolymorphic(TypeFeedbackId ast_id) {
bool TypeFeedbackOracle::CallIsMonomorphic(Call* expr) {
Handle<Object> value = GetInfo(expr->CallFeedbackId());
return value->IsMap() || value->IsAllocationSite() || value->IsJSFunction() ||
- value->IsSmi();
+ value->IsSmi() ||
+ (value->IsCode() && Handle<Code>::cast(value)->ic_state() == MONOMORPHIC);
+}
+
+
+bool TypeFeedbackOracle::KeyedArrayCallIsHoley(Call* expr) {
+ Handle<Object> value = GetInfo(expr->CallFeedbackId());
+ Handle<Code> code = Handle<Code>::cast(value);
+ return KeyedArrayCallStub::IsHoley(code);
}
@@ -612,7 +620,6 @@ void TypeFeedbackOracle::ProcessRelocInfos(ZoneList<RelocInfo>* infos) {
case Code::LOAD_IC:
case Code::STORE_IC:
case Code::CALL_IC:
- case Code::KEYED_CALL_IC:
if (target->ic_state() == MONOMORPHIC) {
if (target->kind() == Code::CALL_IC &&
target->check_type() != RECEIVER_MAP_CHECK) {
@@ -632,6 +639,7 @@ void TypeFeedbackOracle::ProcessRelocInfos(ZoneList<RelocInfo>* infos) {
}
break;
+ case Code::KEYED_CALL_IC:
case Code::KEYED_LOAD_IC:
case Code::KEYED_STORE_IC:
if (target->ic_state() == MONOMORPHIC ||

Powered by Google App Engine
This is Rietveld 408576698