Commit ef12527b authored by bmeurer@chromium.org's avatar bmeurer@chromium.org

Revert "Add a soft-deopt in keyed element access when current IC is...

Revert "Add a soft-deopt in keyed element access when current IC is pre-monomorphic and no type feedback was collected."

This reverts commit r17288 for breaking the mjsunit/unbox-double-arrays
test on almost every platform.

TBR=hpayer@chromium.org

Review URL: https://codereview.chromium.org/32373002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17289 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 9667e1b3
......@@ -139,7 +139,6 @@ Assignment::Assignment(Isolate* isolate,
assignment_id_(GetNextId(isolate)),
is_monomorphic_(false),
is_uninitialized_(false),
is_pre_monomorphic_(false),
store_mode_(STANDARD_STORE) { }
......@@ -427,10 +426,7 @@ void Property::RecordTypeFeedback(TypeFeedbackOracle* oracle,
is_uninitialized_ = oracle->LoadIsUninitialized(this);
if (is_uninitialized_) return;
is_pre_monomorphic_ = oracle->LoadIsPreMonomorphic(this);
is_monomorphic_ = oracle->LoadIsMonomorphicNormal(this);
ASSERT((is_pre_monomorphic_ && !is_monomorphic_) ||
(!is_pre_monomorphic_ && is_monomorphic_));
receiver_types_.Clear();
if (key()->IsPropertyName()) {
FunctionPrototypeStub proto_stub(Code::LOAD_IC);
......@@ -460,11 +456,7 @@ void Assignment::RecordTypeFeedback(TypeFeedbackOracle* oracle,
TypeFeedbackId id = AssignmentFeedbackId();
is_uninitialized_ = oracle->StoreIsUninitialized(id);
if (is_uninitialized_) return;
is_pre_monomorphic_ = oracle->StoreIsPreMonomorphic(id);
is_monomorphic_ = oracle->StoreIsMonomorphicNormal(id);
ASSERT((is_pre_monomorphic_ && !is_monomorphic_) ||
(!is_pre_monomorphic_ && is_monomorphic_));
receiver_types_.Clear();
if (prop->key()->IsPropertyName()) {
Literal* lit_key = prop->key()->AsLiteral();
......
......@@ -1669,10 +1669,6 @@ class Property V8_FINAL : public Expression {
return STANDARD_STORE;
}
bool IsUninitialized() { return is_uninitialized_; }
bool IsPreMonomorphic() { return is_pre_monomorphic_; }
bool HasNoTypeInformation() {
return is_uninitialized_ || is_pre_monomorphic_;
}
TypeFeedbackId PropertyFeedbackId() { return reuse(id()); }
protected:
......@@ -1685,7 +1681,6 @@ class Property V8_FINAL : public Expression {
key_(key),
load_id_(GetNextId(isolate)),
is_monomorphic_(false),
is_pre_monomorphic_(false),
is_uninitialized_(false),
is_string_access_(false),
is_function_prototype_(false) { }
......@@ -1697,7 +1692,6 @@ class Property V8_FINAL : public Expression {
SmallMapList receiver_types_;
bool is_monomorphic_ : 1;
bool is_pre_monomorphic_ : 1;
bool is_uninitialized_ : 1;
bool is_string_access_ : 1;
bool is_function_prototype_ : 1;
......@@ -2104,10 +2098,6 @@ class Assignment V8_FINAL : public Expression {
void RecordTypeFeedback(TypeFeedbackOracle* oracle, Zone* zone);
virtual bool IsMonomorphic() V8_OVERRIDE { return is_monomorphic_; }
bool IsUninitialized() { return is_uninitialized_; }
bool IsPreMonomorphic() { return is_pre_monomorphic_; }
bool HasNoTypeInformation() {
return is_uninitialized_ || is_pre_monomorphic_;
}
virtual SmallMapList* GetReceiverTypes() V8_OVERRIDE {
return &receiver_types_;
}
......@@ -2140,7 +2130,6 @@ class Assignment V8_FINAL : public Expression {
bool is_monomorphic_ : 1;
bool is_uninitialized_ : 1;
bool is_pre_monomorphic_ : 1;
KeyedAccessStoreMode store_mode_ : 5; // Windows treats as signed,
// must have extra bit.
SmallMapList receiver_types_;
......
......@@ -5792,14 +5792,13 @@ HValue* HOptimizedGraphBuilder::HandleKeyedElementAccess(
expr->GetStoreMode(), has_side_effects);
} else {
if (is_store) {
if (expr->IsAssignment() &&
expr->AsAssignment()->HasNoTypeInformation()) {
if (expr->IsAssignment() && expr->AsAssignment()->IsUninitialized()) {
Add<HDeoptimize>("Insufficient type feedback for keyed store",
Deoptimizer::SOFT);
}
instr = BuildStoreKeyedGeneric(obj, key, val);
} else {
if (expr->AsProperty()->HasNoTypeInformation()) {
if (expr->AsProperty()->IsUninitialized()) {
Add<HDeoptimize>("Insufficient type feedback for keyed load",
Deoptimizer::SOFT);
}
......
......@@ -128,16 +128,6 @@ bool TypeFeedbackOracle::LoadIsMonomorphicNormal(Property* expr) {
}
bool TypeFeedbackOracle::LoadIsPreMonomorphic(Property* expr) {
Handle<Object> map_or_code = GetInfo(expr->PropertyFeedbackId());
if (map_or_code->IsCode()) {
Handle<Code> code = Handle<Code>::cast(map_or_code);
return code->ic_state() == PREMONOMORPHIC;
}
return false;
}
bool TypeFeedbackOracle::LoadIsPolymorphic(Property* expr) {
Handle<Object> map_or_code = GetInfo(expr->PropertyFeedbackId());
if (map_or_code->IsCode()) {
......@@ -176,16 +166,6 @@ bool TypeFeedbackOracle::StoreIsMonomorphicNormal(TypeFeedbackId ast_id) {
}
bool TypeFeedbackOracle::StoreIsPreMonomorphic(TypeFeedbackId ast_id) {
Handle<Object> map_or_code = GetInfo(ast_id);
if (map_or_code->IsCode()) {
Handle<Code> code = Handle<Code>::cast(map_or_code);
return code->ic_state() == PREMONOMORPHIC;
}
return false;
}
bool TypeFeedbackOracle::StoreIsKeyedPolymorphic(TypeFeedbackId ast_id) {
Handle<Object> map_or_code = GetInfo(ast_id);
if (map_or_code->IsCode()) {
......@@ -642,6 +622,12 @@ void TypeFeedbackOracle::ProcessRelocInfos(ZoneList<RelocInfo>* infos) {
case Code::KEYED_LOAD_IC:
case Code::KEYED_STORE_IC:
if (target->ic_state() == MONOMORPHIC ||
target->ic_state() == POLYMORPHIC) {
SetInfo(ast_id, target);
}
break;
case Code::BINARY_OP_IC:
case Code::COMPARE_IC:
case Code::TO_BOOLEAN_IC:
......
......@@ -243,11 +243,9 @@ class TypeFeedbackOracle: public ZoneObject {
bool LoadIsMonomorphicNormal(Property* expr);
bool LoadIsUninitialized(Property* expr);
bool LoadIsPreMonomorphic(Property* expr);
bool LoadIsPolymorphic(Property* expr);
bool StoreIsUninitialized(TypeFeedbackId ast_id);
bool StoreIsMonomorphicNormal(TypeFeedbackId ast_id);
bool StoreIsPreMonomorphic(TypeFeedbackId ast_id);
bool StoreIsKeyedPolymorphic(TypeFeedbackId ast_id);
bool CallIsMonomorphic(Call* expr);
bool CallNewIsMonomorphic(CallNew* expr);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment