Commit dc8f4c8c authored by verwaest's avatar verwaest Committed by Commit bot

Reduce number of deopts caused by ForceDelete.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#26044}
parent 79a8caec
......@@ -3065,14 +3065,6 @@ bool v8::Object::ForceDelete(v8::Handle<Value> key) {
i::Handle<i::JSObject> self = Utils::OpenHandle(this);
i::Handle<i::Object> key_obj = Utils::OpenHandle(*key);
// When deleting a property on the global object using ForceDelete
// deoptimize all functions as optimized code does not check for the hole
// value with DontDelete properties. We have to deoptimize all contexts
// because of possible cross-context inlined functions.
if (self->IsJSGlobalProxy() || self->IsGlobalObject()) {
i::Deoptimizer::DeoptimizeAll(isolate);
}
EXCEPTION_PREAMBLE(isolate);
i::Handle<i::Object> obj;
has_pending_exception =
......
......@@ -557,6 +557,9 @@ Handle<Object> JSObject::DeleteNormalizedProperty(Handle<JSObject> object,
}
#endif
JSObject::MigrateToMap(object, new_map);
// Optimized code does not check for the hole value for non-configurable
// properties.
Deoptimizer::DeoptimizeGlobalObject(*object);
}
Handle<PropertyCell> cell(PropertyCell::cast(dictionary->ValueAt(entry)));
Handle<Object> value = isolate->factory()->the_hole_value();
......
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