Commit 20a7055c authored by Georg Neis's avatar Georg Neis Committed by Commit Bot

Revert "[turbofan] Introduce SerializationPolicy enum"

This reverts commit 6d313607.

Reason for revert: dependency for reverting 9499ec0d

Original change's description:
> [turbofan] Introduce SerializationPolicy enum
> 
> This improves overall readability by replacing bool arguments.
> 
> Bug: v8:7790
> Change-Id: I02f8f43088497c9503f253788ee5e0015c7edc2d
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1730991
> Commit-Queue: Georg Neis <neis@chromium.org>
> Reviewed-by: Maya Lekova <mslekova@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#63032}

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

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: v8:7790
Change-Id: If6fc192bd8ad9c75fde2cc4aac69922217bfb8f5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1735313Reviewed-by: 's avatarGeorg Neis <neis@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#63064}
parent b6c555bd
...@@ -964,8 +964,7 @@ BytecodeGraphBuilder::BytecodeGraphBuilder( ...@@ -964,8 +964,7 @@ BytecodeGraphBuilder::BytecodeGraphBuilder(
bytecode_analysis_(broker_->GetBytecodeAnalysis( bytecode_analysis_(broker_->GetBytecodeAnalysis(
bytecode_array.object(), osr_offset, bytecode_array.object(), osr_offset,
flags & BytecodeGraphBuilderFlag::kAnalyzeEnvironmentLiveness, flags & BytecodeGraphBuilderFlag::kAnalyzeEnvironmentLiveness,
FLAG_concurrent_inlining ? SerializationPolicy::kAssumeSerialized !FLAG_concurrent_inlining)),
: SerializationPolicy::kSerializeIfNeeded)),
environment_(nullptr), environment_(nullptr),
osr_(!osr_offset.IsNone()), osr_(!osr_offset.IsNone()),
currently_peeled_loop_offset_(-1), currently_peeled_loop_offset_(-1),
......
...@@ -35,8 +35,6 @@ namespace compiler { ...@@ -35,8 +35,6 @@ namespace compiler {
// For a store during literal creation, do not walk up the prototype chain. // For a store during literal creation, do not walk up the prototype chain.
enum class AccessMode { kLoad, kStore, kStoreInLiteral, kHas }; enum class AccessMode { kLoad, kStore, kStoreInLiteral, kHas };
enum class SerializationPolicy { kAssumeSerialized, kSerializeIfNeeded };
enum class OddballType : uint8_t { enum class OddballType : uint8_t {
kNone, // Not an Oddball. kNone, // Not an Oddball.
kBoolean, // True or False. kBoolean, // True or False.
...@@ -136,9 +134,8 @@ class V8_EXPORT_PRIVATE ObjectRef { ...@@ -136,9 +134,8 @@ class V8_EXPORT_PRIVATE ObjectRef {
// Return the element at key {index} if {index} is known to be an own data // Return the element at key {index} if {index} is known to be an own data
// property of the object that is non-writable and non-configurable. // property of the object that is non-writable and non-configurable.
base::Optional<ObjectRef> GetOwnConstantElement( base::Optional<ObjectRef> GetOwnConstantElement(uint32_t index,
uint32_t index, SerializationPolicy policy = bool serialize = false) const;
SerializationPolicy::kAssumeSerialized) const;
Isolate* isolate() const; Isolate* isolate() const;
...@@ -247,8 +244,7 @@ class JSObjectRef : public JSReceiverRef { ...@@ -247,8 +244,7 @@ class JSObjectRef : public JSReceiverRef {
// if {index} is known to be an own data property of the object. // if {index} is known to be an own data property of the object.
base::Optional<ObjectRef> GetOwnDataProperty( base::Optional<ObjectRef> GetOwnDataProperty(
Representation field_representation, FieldIndex index, Representation field_representation, FieldIndex index,
SerializationPolicy policy = bool serialize = false) const;
SerializationPolicy::kAssumeSerialized) const;
FixedArrayBaseRef elements() const; FixedArrayBaseRef elements() const;
void SerializeElements(); void SerializeElements();
void EnsureElementsTenured(); void EnsureElementsTenured();
...@@ -343,14 +339,10 @@ class ContextRef : public HeapObjectRef { ...@@ -343,14 +339,10 @@ class ContextRef : public HeapObjectRef {
// followed. If {depth} != 0 on function return, then it only got // followed. If {depth} != 0 on function return, then it only got
// partway to the desired depth. If {serialize} is true, then // partway to the desired depth. If {serialize} is true, then
// {previous} will cache its findings. // {previous} will cache its findings.
ContextRef previous(size_t* depth, ContextRef previous(size_t* depth, bool serialize = false) const;
SerializationPolicy policy =
SerializationPolicy::kAssumeSerialized) const;
// Only returns a value if the index is valid for this ContextRef. // Only returns a value if the index is valid for this ContextRef.
base::Optional<ObjectRef> get( base::Optional<ObjectRef> get(int index, bool serialize = false) const;
int index, SerializationPolicy policy =
SerializationPolicy::kAssumeSerialized) const;
// We only serialize the ScopeInfo if certain Promise // We only serialize the ScopeInfo if certain Promise
// builtins are called. // builtins are called.
...@@ -610,9 +602,8 @@ class FunctionTemplateInfoRef : public HeapObjectRef { ...@@ -610,9 +602,8 @@ class FunctionTemplateInfoRef : public HeapObjectRef {
void SerializeCallCode(); void SerializeCallCode();
base::Optional<CallHandlerInfoRef> call_code() const; base::Optional<CallHandlerInfoRef> call_code() const;
HolderLookupResult LookupHolderOfExpectedType( HolderLookupResult LookupHolderOfExpectedType(MapRef receiver_map,
MapRef receiver_map, bool serialize);
SerializationPolicy policy = SerializationPolicy::kAssumeSerialized);
}; };
class FixedArrayBaseRef : public HeapObjectRef { class FixedArrayBaseRef : public HeapObjectRef {
...@@ -679,9 +670,8 @@ class JSArrayRef : public JSObjectRef { ...@@ -679,9 +670,8 @@ class JSArrayRef : public JSObjectRef {
// Return the element at key {index} if the array has a copy-on-write elements // Return the element at key {index} if the array has a copy-on-write elements
// storage and {index} is known to be an own data property. // storage and {index} is known to be an own data property.
base::Optional<ObjectRef> GetOwnCowElement( base::Optional<ObjectRef> GetOwnCowElement(uint32_t index,
uint32_t index, SerializationPolicy policy = bool serialize = false) const;
SerializationPolicy::kAssumeSerialized) const;
}; };
class ScopeInfoRef : public HeapObjectRef { class ScopeInfoRef : public HeapObjectRef {
...@@ -726,9 +716,8 @@ class V8_EXPORT_PRIVATE SharedFunctionInfoRef : public HeapObjectRef { ...@@ -726,9 +716,8 @@ class V8_EXPORT_PRIVATE SharedFunctionInfoRef : public HeapObjectRef {
// Template objects may not be created at compilation time. This method // Template objects may not be created at compilation time. This method
// wraps the retrieval of the template object and creates it if // wraps the retrieval of the template object and creates it if
// necessary. // necessary.
JSArrayRef GetTemplateObject( JSArrayRef GetTemplateObject(ObjectRef description, FeedbackVectorRef vector,
ObjectRef description, FeedbackVectorRef vector, FeedbackSlot slot, FeedbackSlot slot, bool serialize = false);
SerializationPolicy policy = SerializationPolicy::kAssumeSerialized);
void SerializeFunctionTemplateInfo(); void SerializeFunctionTemplateInfo();
base::Optional<FunctionTemplateInfoRef> function_template_info() const; base::Optional<FunctionTemplateInfoRef> function_template_info() const;
...@@ -797,9 +786,8 @@ class JSGlobalProxyRef : public JSObjectRef { ...@@ -797,9 +786,8 @@ class JSGlobalProxyRef : public JSObjectRef {
// If {serialize} is true: // If {serialize} is true:
// Like above but potentially access the heap and serialize the necessary // Like above but potentially access the heap and serialize the necessary
// information. // information.
base::Optional<PropertyCellRef> GetPropertyCell( base::Optional<PropertyCellRef> GetPropertyCell(NameRef const& name,
NameRef const& name, SerializationPolicy policy = bool serialize = false) const;
SerializationPolicy::kAssumeSerialized) const;
}; };
class CodeRef : public HeapObjectRef { class CodeRef : public HeapObjectRef {
......
...@@ -2941,7 +2941,8 @@ Reduction JSCallReducer::ReduceCallApiFunction( ...@@ -2941,7 +2941,8 @@ Reduction JSCallReducer::ReduceCallApiFunction(
// See if we can constant-fold the compatible receiver checks. // See if we can constant-fold the compatible receiver checks.
HolderLookupResult api_holder = HolderLookupResult api_holder =
function_template_info.LookupHolderOfExpectedType(first_receiver_map); function_template_info.LookupHolderOfExpectedType(first_receiver_map,
false);
if (api_holder.lookup == CallOptimization::kHolderNotFound) if (api_holder.lookup == CallOptimization::kHolderNotFound)
return inference.NoChange(); return inference.NoChange();
...@@ -2971,7 +2972,8 @@ Reduction JSCallReducer::ReduceCallApiFunction( ...@@ -2971,7 +2972,8 @@ Reduction JSCallReducer::ReduceCallApiFunction(
for (size_t i = 1; i < receiver_maps.size(); ++i) { for (size_t i = 1; i < receiver_maps.size(); ++i) {
MapRef receiver_map(broker(), receiver_maps[i]); MapRef receiver_map(broker(), receiver_maps[i]);
HolderLookupResult holder_i = HolderLookupResult holder_i =
function_template_info.LookupHolderOfExpectedType(receiver_map); function_template_info.LookupHolderOfExpectedType(receiver_map,
false);
if (api_holder.lookup != holder_i.lookup) return inference.NoChange(); if (api_holder.lookup != holder_i.lookup) return inference.NoChange();
if (!(api_holder.holder.has_value() && holder_i.holder.has_value())) if (!(api_holder.holder.has_value() && holder_i.holder.has_value()))
......
This diff is collapsed.
...@@ -129,8 +129,7 @@ class V8_EXPORT_PRIVATE JSHeapBroker { ...@@ -129,8 +129,7 @@ class V8_EXPORT_PRIVATE JSHeapBroker {
FeedbackSource const& source); FeedbackSource const& source);
BytecodeAnalysis const& GetBytecodeAnalysis( BytecodeAnalysis const& GetBytecodeAnalysis(
Handle<BytecodeArray> bytecode_array, BailoutId osr_offset, Handle<BytecodeArray> bytecode_array, BailoutId osr_offset,
bool analyze_liveness, bool analyze_liveness, bool serialize);
SerializationPolicy policy = SerializationPolicy::kAssumeSerialized);
// Binary, comparison and for-in hints can be fully expressed via // Binary, comparison and for-in hints can be fully expressed via
// an enum. Insufficient feedback is signaled by <Hint enum>::kNone. // an enum. Insufficient feedback is signaled by <Hint enum>::kNone.
......
...@@ -459,8 +459,7 @@ class SerializerForBackgroundCompilation { ...@@ -459,8 +459,7 @@ class SerializerForBackgroundCompilation {
void IncorporateJumpTargetEnvironment(int target_offset); void IncorporateJumpTargetEnvironment(int target_offset);
Handle<BytecodeArray> bytecode_array() const; Handle<BytecodeArray> bytecode_array() const;
BytecodeAnalysis const& GetBytecodeAnalysis( BytecodeAnalysis const& GetBytecodeAnalysis(bool serialize);
SerializationPolicy policy = SerializationPolicy::kAssumeSerialized);
JSHeapBroker* broker() const { return broker_; } JSHeapBroker* broker() const { return broker_; }
CompilationDependencies* dependencies() const { return dependencies_; } CompilationDependencies* dependencies() const { return dependencies_; }
...@@ -961,17 +960,16 @@ Handle<BytecodeArray> SerializerForBackgroundCompilation::bytecode_array() ...@@ -961,17 +960,16 @@ Handle<BytecodeArray> SerializerForBackgroundCompilation::bytecode_array()
} }
BytecodeAnalysis const& SerializerForBackgroundCompilation::GetBytecodeAnalysis( BytecodeAnalysis const& SerializerForBackgroundCompilation::GetBytecodeAnalysis(
SerializationPolicy policy) { bool serialize) {
return broker()->GetBytecodeAnalysis( return broker()->GetBytecodeAnalysis(
bytecode_array(), osr_offset(), bytecode_array(), osr_offset(),
flags() & flags() &
SerializerForBackgroundCompilationFlag::kAnalyzeEnvironmentLiveness, SerializerForBackgroundCompilationFlag::kAnalyzeEnvironmentLiveness,
policy); serialize);
} }
void SerializerForBackgroundCompilation::TraverseBytecode() { void SerializerForBackgroundCompilation::TraverseBytecode() {
BytecodeAnalysis const& bytecode_analysis = BytecodeAnalysis const& bytecode_analysis = GetBytecodeAnalysis(true);
GetBytecodeAnalysis(SerializationPolicy::kSerializeIfNeeded);
BytecodeArrayRef(broker(), bytecode_array()).SerializeForCompilation(); BytecodeArrayRef(broker(), bytecode_array()).SerializeForCompilation();
BytecodeArrayIterator iterator(bytecode_array()); BytecodeArrayIterator iterator(bytecode_array());
...@@ -1045,8 +1043,7 @@ void SerializerForBackgroundCompilation::VisitGetTemplateObject( ...@@ -1045,8 +1043,7 @@ void SerializerForBackgroundCompilation::VisitGetTemplateObject(
broker(), environment()->function().feedback_vector()); broker(), environment()->function().feedback_vector());
SharedFunctionInfoRef shared(broker(), environment()->function().shared()); SharedFunctionInfoRef shared(broker(), environment()->function().shared());
JSArrayRef template_object = JSArrayRef template_object =
shared.GetTemplateObject(description, feedback_vector, slot, shared.GetTemplateObject(description, feedback_vector, slot, true);
SerializationPolicy::kSerializeIfNeeded);
environment()->accumulator_hints().Clear(); environment()->accumulator_hints().Clear();
environment()->accumulator_hints().AddConstant(template_object.object()); environment()->accumulator_hints().AddConstant(template_object.object());
} }
...@@ -1153,8 +1150,7 @@ void SerializerForBackgroundCompilation::VisitPopContext( ...@@ -1153,8 +1150,7 @@ void SerializerForBackgroundCompilation::VisitPopContext(
void SerializerForBackgroundCompilation::ProcessImmutableLoad( void SerializerForBackgroundCompilation::ProcessImmutableLoad(
ContextRef const& context_ref, int slot, ContextProcessingMode mode) { ContextRef const& context_ref, int slot, ContextProcessingMode mode) {
DCHECK(mode == kSerializeSlot || mode == kSerializeSlotAndAddToAccumulator); DCHECK(mode == kSerializeSlot || mode == kSerializeSlotAndAddToAccumulator);
base::Optional<ObjectRef> slot_value = base::Optional<ObjectRef> slot_value = context_ref.get(slot, true);
context_ref.get(slot, SerializationPolicy::kSerializeIfNeeded);
// Also, put the object into the constant hints for the accumulator. // Also, put the object into the constant hints for the accumulator.
if (mode == kSerializeSlotAndAddToAccumulator && slot_value.has_value()) { if (mode == kSerializeSlotAndAddToAccumulator && slot_value.has_value()) {
...@@ -1175,8 +1171,7 @@ void SerializerForBackgroundCompilation::ProcessContextAccess( ...@@ -1175,8 +1171,7 @@ void SerializerForBackgroundCompilation::ProcessContextAccess(
// Walk this context to the given depth and serialize the slot found. // Walk this context to the given depth and serialize the slot found.
ContextRef context_ref(broker(), x); ContextRef context_ref(broker(), x);
size_t remaining_depth = depth; size_t remaining_depth = depth;
context_ref = context_ref.previous( context_ref = context_ref.previous(&remaining_depth, true);
&remaining_depth, SerializationPolicy::kSerializeIfNeeded);
if (remaining_depth == 0 && mode != kIgnoreSlot) { if (remaining_depth == 0 && mode != kIgnoreSlot) {
ProcessImmutableLoad(context_ref, slot, mode); ProcessImmutableLoad(context_ref, slot, mode);
} }
...@@ -1186,8 +1181,7 @@ void SerializerForBackgroundCompilation::ProcessContextAccess( ...@@ -1186,8 +1181,7 @@ void SerializerForBackgroundCompilation::ProcessContextAccess(
if (x.distance <= static_cast<unsigned int>(depth)) { if (x.distance <= static_cast<unsigned int>(depth)) {
ContextRef context_ref(broker(), x.context); ContextRef context_ref(broker(), x.context);
size_t remaining_depth = depth - x.distance; size_t remaining_depth = depth - x.distance;
context_ref = context_ref.previous( context_ref = context_ref.previous(&remaining_depth, true);
&remaining_depth, SerializationPolicy::kSerializeIfNeeded);
if (remaining_depth == 0 && mode != kIgnoreSlot) { if (remaining_depth == 0 && mode != kIgnoreSlot) {
ProcessImmutableLoad(context_ref, slot, mode); ProcessImmutableLoad(context_ref, slot, mode);
} }
...@@ -1483,8 +1477,7 @@ void SerializerForBackgroundCompilation::VisitCallJSRuntime( ...@@ -1483,8 +1477,7 @@ void SerializerForBackgroundCompilation::VisitCallJSRuntime(
// BytecodeGraphBuilder::VisitCallJSRuntime needs the {runtime_index} // BytecodeGraphBuilder::VisitCallJSRuntime needs the {runtime_index}
// slot in the native context to be serialized. // slot in the native context to be serialized.
const int runtime_index = iterator->GetNativeContextIndexOperand(0); const int runtime_index = iterator->GetNativeContextIndexOperand(0);
broker()->native_context().get(runtime_index, broker()->native_context().get(runtime_index, true);
SerializationPolicy::kSerializeIfNeeded);
} }
Hints SerializerForBackgroundCompilation::RunChildSerializer( Hints SerializerForBackgroundCompilation::RunChildSerializer(
...@@ -1708,12 +1701,14 @@ void SerializerForBackgroundCompilation::ProcessApiCall( ...@@ -1708,12 +1701,14 @@ void SerializerForBackgroundCompilation::ProcessApiCall(
void SerializerForBackgroundCompilation::ProcessReceiverMapForApiCall( void SerializerForBackgroundCompilation::ProcessReceiverMapForApiCall(
FunctionTemplateInfoRef target, Handle<Map> receiver) { FunctionTemplateInfoRef target, Handle<Map> receiver) {
if (!receiver->is_access_check_needed()) { if (receiver->is_access_check_needed()) {
MapRef receiver_map(broker(), receiver); return;
TRACE_BROKER(broker(), "Serializing holder for target:" << target);
target.LookupHolderOfExpectedType(receiver_map,
SerializationPolicy::kSerializeIfNeeded);
} }
MapRef receiver_map(broker(), receiver);
TRACE_BROKER(broker(), "Serializing holder for target:" << target);
target.LookupHolderOfExpectedType(receiver_map, true);
} }
void SerializerForBackgroundCompilation::ProcessBuiltinCall( void SerializerForBackgroundCompilation::ProcessBuiltinCall(
...@@ -1877,8 +1872,7 @@ PropertyAccessInfo SerializerForBackgroundCompilation::ProcessMapForRegExpTest( ...@@ -1877,8 +1872,7 @@ PropertyAccessInfo SerializerForBackgroundCompilation::ProcessMapForRegExpTest(
// The property is on the prototype chain. // The property is on the prototype chain.
JSObjectRef holder_ref(broker(), holder); JSObjectRef holder_ref(broker(), holder);
holder_ref.GetOwnDataProperty(ai_exec.field_representation(), holder_ref.GetOwnDataProperty(ai_exec.field_representation(),
ai_exec.field_index(), ai_exec.field_index(), true);
SerializationPolicy::kSerializeIfNeeded);
} }
return ai_exec; return ai_exec;
} }
...@@ -1896,8 +1890,7 @@ void SerializerForBackgroundCompilation::ProcessHintsForRegExpTest( ...@@ -1896,8 +1890,7 @@ void SerializerForBackgroundCompilation::ProcessHintsForRegExpTest(
// The property is on the object itself. // The property is on the object itself.
JSObjectRef holder_ref(broker(), regexp); JSObjectRef holder_ref(broker(), regexp);
holder_ref.GetOwnDataProperty(ai_exec.field_representation(), holder_ref.GetOwnDataProperty(ai_exec.field_representation(),
ai_exec.field_index(), ai_exec.field_index(), true);
SerializationPolicy::kSerializeIfNeeded);
} }
} }
...@@ -1990,7 +1983,7 @@ void SerializerForBackgroundCompilation::VisitSwitchOnSmiNoFeedback( ...@@ -1990,7 +1983,7 @@ void SerializerForBackgroundCompilation::VisitSwitchOnSmiNoFeedback(
void SerializerForBackgroundCompilation::VisitSwitchOnGeneratorState( void SerializerForBackgroundCompilation::VisitSwitchOnGeneratorState(
interpreter::BytecodeArrayIterator* iterator) { interpreter::BytecodeArrayIterator* iterator) {
for (const auto& target : GetBytecodeAnalysis().resume_jump_targets()) { for (const auto& target : GetBytecodeAnalysis(false).resume_jump_targets()) {
ContributeToJumpTargetEnvironment(target.target_offset()); ContributeToJumpTargetEnvironment(target.target_offset());
} }
} }
...@@ -2298,14 +2291,12 @@ void SerializerForBackgroundCompilation::ProcessKeyedPropertyAccess( ...@@ -2298,14 +2291,12 @@ void SerializerForBackgroundCompilation::ProcessKeyedPropertyAccess(
// TODO(neis): Do this for integer-HeapNumbers too? // TODO(neis): Do this for integer-HeapNumbers too?
if (key_ref.IsSmi() && key_ref.AsSmi() >= 0) { if (key_ref.IsSmi() && key_ref.AsSmi() >= 0) {
base::Optional<ObjectRef> element = base::Optional<ObjectRef> element =
receiver_ref.GetOwnConstantElement( receiver_ref.GetOwnConstantElement(key_ref.AsSmi(), true);
key_ref.AsSmi(), SerializationPolicy::kSerializeIfNeeded);
if (!element.has_value() && receiver_ref.IsJSArray()) { if (!element.has_value() && receiver_ref.IsJSArray()) {
// We didn't find a constant element, but if the receiver is a // We didn't find a constant element, but if the receiver is a
// cow-array we can exploit the fact that any future write to the // cow-array we can exploit the fact that any future write to the
// element will replace the whole elements storage. // element will replace the whole elements storage.
receiver_ref.AsJSArray().GetOwnCowElement( receiver_ref.AsJSArray().GetOwnCowElement(key_ref.AsSmi(), true);
key_ref.AsSmi(), SerializationPolicy::kSerializeIfNeeded);
} }
} }
} }
...@@ -2323,8 +2314,8 @@ SerializerForBackgroundCompilation::ProcessMapForNamedPropertyAccess( ...@@ -2323,8 +2314,8 @@ SerializerForBackgroundCompilation::ProcessMapForNamedPropertyAccess(
base::Optional<JSObjectRef> receiver) { base::Optional<JSObjectRef> receiver) {
// For JSNativeContextSpecialization::ReduceNamedAccess. // For JSNativeContextSpecialization::ReduceNamedAccess.
if (receiver_map.IsMapOfCurrentGlobalProxy()) { if (receiver_map.IsMapOfCurrentGlobalProxy()) {
broker()->native_context().global_proxy_object().GetPropertyCell( broker()->native_context().global_proxy_object().GetPropertyCell(name,
name, SerializationPolicy::kSerializeIfNeeded); true);
} }
AccessInfoFactory access_info_factory(broker(), dependencies(), AccessInfoFactory access_info_factory(broker(), dependencies(),
...@@ -2369,9 +2360,9 @@ SerializerForBackgroundCompilation::ProcessMapForNamedPropertyAccess( ...@@ -2369,9 +2360,9 @@ SerializerForBackgroundCompilation::ProcessMapForNamedPropertyAccess(
} }
if (holder.has_value()) { if (holder.has_value()) {
base::Optional<ObjectRef> constant(holder->GetOwnDataProperty( base::Optional<ObjectRef> constant(
access_info.field_representation(), access_info.field_index(), holder->GetOwnDataProperty(access_info.field_representation(),
SerializationPolicy::kSerializeIfNeeded)); access_info.field_index(), true));
if (constant.has_value()) { if (constant.has_value()) {
environment()->accumulator_hints().AddConstant(constant->object()); environment()->accumulator_hints().AddConstant(constant->object());
} }
...@@ -2407,8 +2398,7 @@ void SerializerForBackgroundCompilation::ProcessNamedPropertyAccess( ...@@ -2407,8 +2398,7 @@ void SerializerForBackgroundCompilation::ProcessNamedPropertyAccess(
} }
// For JSNativeContextSpecialization::ReduceNamedAccessFromNexus. // For JSNativeContextSpecialization::ReduceNamedAccessFromNexus.
if (object.equals(global_proxy)) { if (object.equals(global_proxy)) {
global_proxy.GetPropertyCell(name, global_proxy.GetPropertyCell(name, true);
SerializationPolicy::kSerializeIfNeeded);
} }
// For JSNativeContextSpecialization::ReduceJSLoadNamed. // For JSNativeContextSpecialization::ReduceJSLoadNamed.
if (mode == AccessMode::kLoad && object.IsJSFunction() && if (mode == AccessMode::kLoad && object.IsJSFunction() &&
...@@ -2499,8 +2489,7 @@ void SerializerForBackgroundCompilation::ProcessConstantForInstanceOf( ...@@ -2499,8 +2489,7 @@ void SerializerForBackgroundCompilation::ProcessConstantForInstanceOf(
JSObjectRef holder_ref = found_on_proto ? JSObjectRef(broker(), holder) JSObjectRef holder_ref = found_on_proto ? JSObjectRef(broker(), holder)
: constructor.AsJSObject(); : constructor.AsJSObject();
base::Optional<ObjectRef> constant = holder_ref.GetOwnDataProperty( base::Optional<ObjectRef> constant = holder_ref.GetOwnDataProperty(
access_info.field_representation(), access_info.field_index(), access_info.field_representation(), access_info.field_index(), true);
SerializationPolicy::kSerializeIfNeeded);
CHECK(constant.has_value()); CHECK(constant.has_value());
if (constant->IsJSFunction()) { if (constant->IsJSFunction()) {
JSFunctionRef function = constant->AsJSFunction(); JSFunctionRef function = constant->AsJSFunction();
......
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