Commit 52dbefd6 authored by Georg Neis's avatar Georg Neis Committed by Commit Bot

[turbofan] Remove some obsolete serialization calls

Bug: v8:7790
Change-Id: I774601b25f4dbe104875d18c03e17244efc1a0e2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1718157Reviewed-by: 's avatarMaya Lekova <mslekova@chromium.org>
Reviewed-by: 's avatarMichael Stanton <mvstanton@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62915}
parent b50ee58c
......@@ -527,27 +527,19 @@ Reduction JSCallReducer::ReduceFunctionPrototypeBind(Node* node) {
MapRef first_receiver_map(broker(), receiver_maps[0]);
bool const is_constructor = first_receiver_map.is_constructor();
if (FLAG_concurrent_inlining) {
if (!first_receiver_map.serialized_prototype()) {
TRACE_BROKER_MISSING(
broker(), "serialized prototype on map " << first_receiver_map);
return inference.NoChange();
}
} else {
first_receiver_map.SerializePrototype();
if (FLAG_concurrent_inlining && !first_receiver_map.serialized_prototype()) {
TRACE_BROKER_MISSING(broker(),
"serialized prototype on map " << first_receiver_map);
return inference.NoChange();
}
ObjectRef const prototype = first_receiver_map.prototype();
for (Handle<Map> const map : receiver_maps) {
MapRef receiver_map(broker(), map);
if (FLAG_concurrent_inlining) {
if (!receiver_map.serialized_prototype()) {
TRACE_BROKER_MISSING(broker(),
"serialized prototype on map " << receiver_map);
return inference.NoChange();
}
} else {
receiver_map.SerializePrototype();
if (FLAG_concurrent_inlining && !receiver_map.serialized_prototype()) {
TRACE_BROKER_MISSING(broker(),
"serialized prototype on map " << receiver_map);
return inference.NoChange();
}
// Check for consistency among the {receiver_maps}.
......@@ -5987,9 +5979,7 @@ bool JSCallReducer::DoPromiseChecks(MapInference* inference) {
for (Handle<Map> map : receiver_maps) {
MapRef receiver_map(broker(), map);
if (!receiver_map.IsJSPromiseMap()) return false;
if (!FLAG_concurrent_inlining) {
receiver_map.SerializePrototype();
} else if (!receiver_map.serialized_prototype()) {
if (FLAG_concurrent_inlining && !receiver_map.serialized_prototype()) {
TRACE_BROKER_MISSING(broker(), "prototype for map " << receiver_map);
return false;
}
......@@ -7205,12 +7195,7 @@ Reduction JSCallReducer::ReduceRegExpPrototypeTest(Node* node) {
ZoneVector<PropertyAccessInfo> access_infos(graph()->zone());
AccessInfoFactory access_info_factory(broker(), dependencies(),
graph()->zone());
if (!FLAG_concurrent_inlining) {
// Compute property access info for "exec" on {resolution}.
access_info_factory.ComputePropertyAccessInfos(
MapHandles(regexp_maps.begin(), regexp_maps.end()),
factory()->exec_string(), AccessMode::kLoad, &access_infos);
} else {
if (FLAG_concurrent_inlining) {
// Obtain precomputed access infos from the broker.
for (auto map : regexp_maps) {
MapRef map_ref(broker(), map);
......@@ -7218,6 +7203,11 @@ Reduction JSCallReducer::ReduceRegExpPrototypeTest(Node* node) {
broker()->GetAccessInfoForLoadingExec(map_ref);
access_infos.push_back(access_info);
}
} else {
// Compute property access info for "exec" on {resolution}.
access_info_factory.ComputePropertyAccessInfos(
MapHandles(regexp_maps.begin(), regexp_maps.end()),
factory()->exec_string(), AccessMode::kLoad, &access_infos);
}
PropertyAccessInfo ai_exec =
......
......@@ -427,12 +427,11 @@ Reduction JSInliner::ReduceJSCall(Node* node) {
Node* context;
FeedbackVectorRef feedback_vector = DetermineCallContext(node, context);
if (FLAG_concurrent_inlining) {
if (!shared_info.value().IsSerializedForCompilation(feedback_vector)) {
TRACE("Missed opportunity to inline a function ("
<< *shared_info << " with " << feedback_vector << ")");
return NoChange();
}
if (FLAG_concurrent_inlining &&
!shared_info.value().IsSerializedForCompilation(feedback_vector)) {
TRACE("Missed opportunity to inline a function ("
<< *shared_info << " with " << feedback_vector << ")");
return NoChange();
}
// ----------------------------------------------------------------
......
......@@ -360,9 +360,7 @@ Reduction JSNativeContextSpecialization::ReduceJSGetSuperConstructor(
if (!m.HasValue()) return NoChange();
JSFunctionRef function = m.Ref(broker()).AsJSFunction();
MapRef function_map = function.map();
if (!FLAG_concurrent_inlining) {
function_map.SerializePrototype();
} else if (!function_map.serialized_prototype()) {
if (FLAG_concurrent_inlining && !function_map.serialized_prototype()) {
TRACE_BROKER_MISSING(broker(), "data for map " << function_map);
return NoChange();
}
......@@ -1331,9 +1329,7 @@ Reduction JSNativeContextSpecialization::ReduceJSLoadNamed(Node* node) {
name.equals(ObjectRef(broker(), factory()->prototype_string()))) {
// Optimize "prototype" property of functions.
JSFunctionRef function = object.AsJSFunction();
if (!FLAG_concurrent_inlining) {
function.Serialize();
} else if (!function.serialized()) {
if (FLAG_concurrent_inlining && !function.serialized()) {
TRACE_BROKER_MISSING(broker(), "data for function " << function);
return NoChange();
}
......@@ -1513,9 +1509,7 @@ Reduction JSNativeContextSpecialization::ReduceElementAccess(
base::Optional<JSTypedArrayRef> typed_array =
GetTypedArrayConstant(broker(), receiver);
if (typed_array.has_value()) {
if (!FLAG_concurrent_inlining) {
typed_array->Serialize();
} else if (!typed_array->serialized()) {
if (FLAG_concurrent_inlining && !typed_array->serialized()) {
TRACE_BROKER_MISSING(broker(), "data for typed array " << *typed_array);
return NoChange();
}
......@@ -3195,7 +3189,6 @@ bool JSNativeContextSpecialization::CanTreatHoleAsUndefined(
// native contexts, as the global Array protector works isolate-wide).
for (Handle<Map> map : receiver_maps) {
MapRef receiver_map(broker(), map);
if (!FLAG_concurrent_inlining) receiver_map.SerializePrototype();
ObjectRef receiver_prototype = receiver_map.prototype();
if (!receiver_prototype.IsJSObject() ||
!broker()->IsArrayOrObjectPrototype(receiver_prototype.AsJSObject())) {
......
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