Commit 6ec77714 authored by Georg Neis's avatar Georg Neis Committed by Commit Bot

Revert "[turbofan] Force creation of initial maps upfront."

This reverts commit acf09252.

Reason for revert: Undesired side effects.

Original change's description:
> [turbofan] Force creation of initial maps upfront.
> 
> When encountering a JSFunction, generate its initial map (if
> appropriate).  This ensures that we can depend on the initial
> map during optimization.
> 
> We are not sure about the performance impact of this change, it
> might cause regressions.
> 
> R=​jarin@chromium.org, mslekova@chromium.org
> 
> Bug: v8:7790, chromium:875175
> Change-Id: I4bbf62e30730f55a53d9bb7eee62c87d820616fb
> Reviewed-on: https://chromium-review.googlesource.com/1180970
> Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
> Reviewed-by: Maya Lekova <mslekova@chromium.org>
> Commit-Queue: Georg Neis <neis@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#55253}

TBR=jarin@chromium.org,neis@chromium.org,mslekova@chromium.org

Change-Id: I322f504d068f752b218680f633b8719864ca4950
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:7790, chromium:875175
Reviewed-on: https://chromium-review.googlesource.com/1183341Reviewed-by: 's avatarGeorg Neis <neis@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55266}
parent 6ab19087
......@@ -597,8 +597,6 @@ ObjectData* JSHeapBroker::GetOrCreateData(Handle<Object> object) {
// TODO(neis): Remove these Allow* once we serialize everything upfront.
AllowHandleAllocation handle_allocation;
AllowHandleDereference handle_dereference;
AllowHeapAllocation heap_allocation;
Prepare(object);
data = ObjectData::Serialize(this, object);
}
CHECK_NOT_NULL(data);
......@@ -1058,17 +1056,6 @@ CellRef ModuleRef::GetCell(int cell_index) {
broker()->isolate()));
}
void JSHeapBroker::Prepare(Handle<Object> object) {
if (object->IsJSFunction()) {
Handle<JSFunction> function = Handle<JSFunction>::cast(object);
if (function->has_prototype_slot() &&
(function->IsConstructor() ||
IsResumableFunction(function->shared()->kind()))) {
JSFunction::EnsureHasInitialMap(function);
}
}
}
ObjectRef::ObjectRef(JSHeapBroker* broker, Handle<Object> object) {
switch (broker->mode()) {
case JSHeapBroker::kSerialized:
......
......@@ -458,8 +458,6 @@ class V8_EXPORT_PRIVATE JSHeapBroker : public NON_EXPORTED_BASE(ZoneObject) {
// TODO(neis): Remove eventually.
HeapObjectType HeapObjectTypeFromMap(Map* map) const;
void Prepare(Handle<Object> object);
void AddData(Handle<Object> object, ObjectData* data);
Isolate* const isolate_;
......
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