binary_operation_(NULL),
assignment_id_(GetNextId(isolate)),
is_monomorphic_(false),
+ is_uninitialized_(false),
store_mode_(STANDARD_STORE) { }
Property* prop = target()->AsProperty();
ASSERT(prop != NULL);
TypeFeedbackId id = AssignmentFeedbackId();
+ is_uninitialized_ = oracle->StoreIsUninitialized(id);
+ if (is_uninitialized_) return;
is_monomorphic_ = oracle->StoreIsMonomorphicNormal(id);
receiver_types_.Clear();
if (prop->key()->IsPropertyName()) {
TypeFeedbackId AssignmentFeedbackId() { return reuse(id()); }
void RecordTypeFeedback(TypeFeedbackOracle* oracle, Zone* zone);
virtual bool IsMonomorphic() { return is_monomorphic_; }
+ bool IsUninitialized() { return is_uninitialized_; }
virtual SmallMapList* GetReceiverTypes() { return &receiver_types_; }
virtual KeyedAccessStoreMode GetStoreMode() {
return store_mode_;
const BailoutId assignment_id_;
bool is_monomorphic_ : 1;
+ bool is_uninitialized_ : 1;
KeyedAccessStoreMode store_mode_ : 5; // Windows treats as signed,
// must have extra bit.
SmallMapList receiver_types_;
HValue* value = environment()->ExpressionStackAt(0);
HValue* object = environment()->ExpressionStackAt(1);
+ if (expr->IsUninitialized()) AddSoftDeoptimize();
return BuildStoreNamed(expr, expr->id(), expr->position(),
expr->AssignmentId(), prop, object, value);
} else {
Property* expr) {
if (expr->IsUninitialized()) {
AddSoftDeoptimize();
- } else {
- // OS::DebugBreak();
}
HValue* context = environment()->LookupContext();
return new(zone()) HLoadNamedGeneric(context, object, name);
}
+bool TypeFeedbackOracle::StoreIsUninitialized(TypeFeedbackId ast_id) {
+ Handle<Object> map_or_code = GetInfo(ast_id);
+ if (map_or_code->IsMap()) return false;
+ if (!map_or_code->IsCode()) return true;
+ Handle<Code> code = Handle<Code>::cast(map_or_code);
+ return code->ic_state() == UNINITIALIZED;
+}
+
+
bool TypeFeedbackOracle::StoreIsMonomorphicNormal(TypeFeedbackId ast_id) {
Handle<Object> map_or_code = GetInfo(ast_id);
if (map_or_code->IsMap()) return true;
bool LoadIsMonomorphicNormal(Property* expr);
bool LoadIsUninitialized(Property* expr);
bool LoadIsPolymorphic(Property* expr);
+ bool StoreIsUninitialized(TypeFeedbackId ast_id);
bool StoreIsMonomorphicNormal(TypeFeedbackId ast_id);
bool StoreIsPolymorphic(TypeFeedbackId ast_id);
bool CallIsMonomorphic(Call* expr);