[CSA][cleanup] TNodify some methods related to prototype and property lookup
This is a CL in a string of CLs that aims to TNodify CSA. In particular, there were some loads that were done in AnyTagged instead of TaggedPointer. TNode-ifying them brings improvement in pointer compression since we are able to decompress using the Pointer decompression. TNodified: * LoadJSFunctionPrototype * TryPrototypeChainLookup * OrdinaryHasInstance Also TNodified loads regarding: * FeedbackCell::kValueOffset * HeapObject::kMapOffset * JSFunction::kSharedFunctionInfoOffset * JSFunction::kFeedbackCellOffset * Map::kInstanceTypeOffset * Map::kInstanceDescriptorsOffset * Map::kPrototypeOffset Drive-by cleanup: StoreJSArrayLength and StoreElements were unused. Bug: v8:6949, v8:9396 Change-Id: I89697b5c02490906be1eee63cf3d9e60a1094d48 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1755844 Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org> Reviewed-by: Ross McIlroy <rmcilroy@chromium.org> Cr-Commit-Position: refs/heads/master@{#63216}
This commit is contained in:
parent
299c8059a2
commit
82111e2286
@ -403,7 +403,7 @@ TF_BUILTIN(LoadIC_FunctionPrototype, CodeStubAssembler) {
|
|||||||
Node* context = Parameter(Descriptor::kContext);
|
Node* context = Parameter(Descriptor::kContext);
|
||||||
|
|
||||||
Label miss(this, Label::kDeferred);
|
Label miss(this, Label::kDeferred);
|
||||||
Return(LoadJSFunctionPrototype(receiver, &miss));
|
Return(LoadJSFunctionPrototype(CAST(receiver), &miss));
|
||||||
|
|
||||||
BIND(&miss);
|
BIND(&miss);
|
||||||
TailCallRuntime(Runtime::kLoadIC_Miss, context, receiver, name, slot, vector);
|
TailCallRuntime(Runtime::kLoadIC_Miss, context, receiver, name, slot, vector);
|
||||||
|
@ -1464,8 +1464,7 @@ TNode<Map> CodeStubAssembler::GetStructMap(InstanceType instance_type) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
TNode<Map> CodeStubAssembler::LoadMap(SloppyTNode<HeapObject> object) {
|
TNode<Map> CodeStubAssembler::LoadMap(SloppyTNode<HeapObject> object) {
|
||||||
return UncheckedCast<Map>(LoadObjectField(object, HeapObject::kMapOffset,
|
return LoadObjectField<Map>(object, HeapObject::kMapOffset);
|
||||||
MachineType::TaggedPointer()));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
TNode<Uint16T> CodeStubAssembler::LoadInstanceType(
|
TNode<Uint16T> CodeStubAssembler::LoadInstanceType(
|
||||||
@ -1620,8 +1619,7 @@ TNode<Uint32T> CodeStubAssembler::LoadMapBitField3(SloppyTNode<Map> map) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
TNode<Uint16T> CodeStubAssembler::LoadMapInstanceType(SloppyTNode<Map> map) {
|
TNode<Uint16T> CodeStubAssembler::LoadMapInstanceType(SloppyTNode<Map> map) {
|
||||||
return UncheckedCast<Uint16T>(
|
return LoadObjectField<Uint16T>(map, Map::kInstanceTypeOffset);
|
||||||
LoadObjectField(map, Map::kInstanceTypeOffset, MachineType::Uint16()));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
TNode<Int32T> CodeStubAssembler::LoadMapElementsKind(SloppyTNode<Map> map) {
|
TNode<Int32T> CodeStubAssembler::LoadMapElementsKind(SloppyTNode<Map> map) {
|
||||||
@ -1638,12 +1636,12 @@ TNode<Int32T> CodeStubAssembler::LoadElementsKind(
|
|||||||
TNode<DescriptorArray> CodeStubAssembler::LoadMapDescriptors(
|
TNode<DescriptorArray> CodeStubAssembler::LoadMapDescriptors(
|
||||||
SloppyTNode<Map> map) {
|
SloppyTNode<Map> map) {
|
||||||
CSA_SLOW_ASSERT(this, IsMap(map));
|
CSA_SLOW_ASSERT(this, IsMap(map));
|
||||||
return CAST(LoadObjectField(map, Map::kInstanceDescriptorsOffset));
|
return LoadObjectField<DescriptorArray>(map, Map::kInstanceDescriptorsOffset);
|
||||||
}
|
}
|
||||||
|
|
||||||
TNode<HeapObject> CodeStubAssembler::LoadMapPrototype(SloppyTNode<Map> map) {
|
TNode<HeapObject> CodeStubAssembler::LoadMapPrototype(SloppyTNode<Map> map) {
|
||||||
CSA_SLOW_ASSERT(this, IsMap(map));
|
CSA_SLOW_ASSERT(this, IsMap(map));
|
||||||
return CAST(LoadObjectField(map, Map::kPrototypeOffset));
|
return LoadObjectField<HeapObject>(map, Map::kPrototypeOffset);
|
||||||
}
|
}
|
||||||
|
|
||||||
TNode<PrototypeInfo> CodeStubAssembler::LoadMapPrototypeInfo(
|
TNode<PrototypeInfo> CodeStubAssembler::LoadMapPrototypeInfo(
|
||||||
@ -2655,7 +2653,8 @@ TNode<Map> CodeStubAssembler::LoadJSArrayElementsMap(
|
|||||||
TNode<BoolT> CodeStubAssembler::IsGeneratorFunction(
|
TNode<BoolT> CodeStubAssembler::IsGeneratorFunction(
|
||||||
TNode<JSFunction> function) {
|
TNode<JSFunction> function) {
|
||||||
TNode<SharedFunctionInfo> const shared_function_info =
|
TNode<SharedFunctionInfo> const shared_function_info =
|
||||||
CAST(LoadObjectField(function, JSFunction::kSharedFunctionInfoOffset));
|
LoadObjectField<SharedFunctionInfo>(
|
||||||
|
function, JSFunction::kSharedFunctionInfoOffset);
|
||||||
|
|
||||||
TNode<Uint32T> const function_kind =
|
TNode<Uint32T> const function_kind =
|
||||||
DecodeWord32<SharedFunctionInfo::FunctionKindBits>(LoadObjectField(
|
DecodeWord32<SharedFunctionInfo::FunctionKindBits>(LoadObjectField(
|
||||||
@ -2695,22 +2694,20 @@ void CodeStubAssembler::GotoIfPrototypeRequiresRuntimeLookup(
|
|||||||
runtime);
|
runtime);
|
||||||
}
|
}
|
||||||
|
|
||||||
Node* CodeStubAssembler::LoadJSFunctionPrototype(Node* function,
|
Node* CodeStubAssembler::LoadJSFunctionPrototype(TNode<JSFunction> function,
|
||||||
Label* if_bailout) {
|
Label* if_bailout) {
|
||||||
CSA_ASSERT(this, TaggedIsNotSmi(function));
|
|
||||||
CSA_ASSERT(this, IsJSFunction(function));
|
|
||||||
CSA_ASSERT(this, IsFunctionWithPrototypeSlotMap(LoadMap(function)));
|
CSA_ASSERT(this, IsFunctionWithPrototypeSlotMap(LoadMap(function)));
|
||||||
CSA_ASSERT(this, IsClearWord32<Map::HasNonInstancePrototypeBit>(
|
CSA_ASSERT(this, IsClearWord32<Map::HasNonInstancePrototypeBit>(
|
||||||
LoadMapBitField(LoadMap(function))));
|
LoadMapBitField(LoadMap(function))));
|
||||||
Node* proto_or_map =
|
TNode<HeapObject> proto_or_map = LoadObjectField<HeapObject>(
|
||||||
LoadObjectField(function, JSFunction::kPrototypeOrInitialMapOffset);
|
function, JSFunction::kPrototypeOrInitialMapOffset);
|
||||||
GotoIf(IsTheHole(proto_or_map), if_bailout);
|
GotoIf(IsTheHole(proto_or_map), if_bailout);
|
||||||
|
|
||||||
VARIABLE(var_result, MachineRepresentation::kTagged, proto_or_map);
|
TVARIABLE(HeapObject, var_result, proto_or_map);
|
||||||
Label done(this, &var_result);
|
Label done(this, &var_result);
|
||||||
GotoIfNot(IsMap(proto_or_map), &done);
|
GotoIfNot(IsMap(proto_or_map), &done);
|
||||||
|
|
||||||
var_result.Bind(LoadMapPrototype(proto_or_map));
|
var_result = LoadMapPrototype(CAST(proto_or_map));
|
||||||
Goto(&done);
|
Goto(&done);
|
||||||
|
|
||||||
BIND(&done);
|
BIND(&done);
|
||||||
@ -2825,16 +2822,6 @@ void CodeStubAssembler::StoreObjectFieldRoot(Node* object, int offset,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CodeStubAssembler::StoreJSArrayLength(TNode<JSArray> array,
|
|
||||||
TNode<Smi> length) {
|
|
||||||
StoreObjectFieldNoWriteBarrier(array, JSArray::kLengthOffset, length);
|
|
||||||
}
|
|
||||||
|
|
||||||
void CodeStubAssembler::StoreElements(TNode<Object> object,
|
|
||||||
TNode<FixedArrayBase> elements) {
|
|
||||||
StoreObjectField(object, JSObject::kElementsOffset, elements);
|
|
||||||
}
|
|
||||||
|
|
||||||
void CodeStubAssembler::StoreFixedArrayOrPropertyArrayElement(
|
void CodeStubAssembler::StoreFixedArrayOrPropertyArrayElement(
|
||||||
Node* object, Node* index_node, Node* value, WriteBarrierMode barrier_mode,
|
Node* object, Node* index_node, Node* value, WriteBarrierMode barrier_mode,
|
||||||
int additional_offset, ParameterMode parameter_mode) {
|
int additional_offset, ParameterMode parameter_mode) {
|
||||||
@ -9609,7 +9596,7 @@ TNode<Object> CodeStubAssembler::CallGetterIfAccessor(
|
|||||||
|
|
||||||
GotoIfPrototypeRequiresRuntimeLookup(CAST(receiver), CAST(receiver_map),
|
GotoIfPrototypeRequiresRuntimeLookup(CAST(receiver), CAST(receiver_map),
|
||||||
if_bailout);
|
if_bailout);
|
||||||
var_value.Bind(LoadJSFunctionPrototype(receiver, if_bailout));
|
var_value.Bind(LoadJSFunctionPrototype(CAST(receiver), if_bailout));
|
||||||
Goto(&done);
|
Goto(&done);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -9880,8 +9867,8 @@ void CodeStubAssembler::TryPrototypeChainLookup(
|
|||||||
GotoIf(TaggedIsSmi(receiver), if_bailout);
|
GotoIf(TaggedIsSmi(receiver), if_bailout);
|
||||||
CSA_ASSERT(this, TaggedIsNotSmi(object));
|
CSA_ASSERT(this, TaggedIsNotSmi(object));
|
||||||
|
|
||||||
Node* map = LoadMap(object);
|
TNode<Map> map = LoadMap(object);
|
||||||
Node* instance_type = LoadMapInstanceType(map);
|
TNode<Int32T> instance_type = LoadMapInstanceType(map);
|
||||||
{
|
{
|
||||||
Label if_objectisreceiver(this);
|
Label if_objectisreceiver(this);
|
||||||
STATIC_ASSERT(LAST_JS_RECEIVER_TYPE == LAST_TYPE);
|
STATIC_ASSERT(LAST_JS_RECEIVER_TYPE == LAST_TYPE);
|
||||||
@ -9902,19 +9889,18 @@ void CodeStubAssembler::TryPrototypeChainLookup(
|
|||||||
|
|
||||||
BIND(&if_iskeyunique);
|
BIND(&if_iskeyunique);
|
||||||
{
|
{
|
||||||
VARIABLE(var_holder, MachineRepresentation::kTagged, object);
|
TVARIABLE(HeapObject, var_holder, CAST(object));
|
||||||
VARIABLE(var_holder_map, MachineRepresentation::kTagged, map);
|
TVARIABLE(Map, var_holder_map, map);
|
||||||
VARIABLE(var_holder_instance_type, MachineRepresentation::kWord32,
|
TVARIABLE(Int32T, var_holder_instance_type, instance_type);
|
||||||
instance_type);
|
|
||||||
|
|
||||||
Variable* merged_variables[] = {&var_holder, &var_holder_map,
|
VariableList merged_variables(
|
||||||
&var_holder_instance_type};
|
{&var_holder, &var_holder_map, &var_holder_instance_type}, zone());
|
||||||
Label loop(this, arraysize(merged_variables), merged_variables);
|
Label loop(this, merged_variables);
|
||||||
Goto(&loop);
|
Goto(&loop);
|
||||||
BIND(&loop);
|
BIND(&loop);
|
||||||
{
|
{
|
||||||
Node* holder_map = var_holder_map.value();
|
Node* holder_map = var_holder_map.value();
|
||||||
Node* holder_instance_type = var_holder_instance_type.value();
|
TNode<Int32T> holder_instance_type = var_holder_instance_type.value();
|
||||||
|
|
||||||
Label next_proto(this), check_integer_indexed_exotic(this);
|
Label next_proto(this), check_integer_indexed_exotic(this);
|
||||||
lookup_property_in_holder(receiver, var_holder.value(), holder_map,
|
lookup_property_in_holder(receiver, var_holder.value(), holder_map,
|
||||||
@ -9933,29 +9919,28 @@ void CodeStubAssembler::TryPrototypeChainLookup(
|
|||||||
|
|
||||||
BIND(&next_proto);
|
BIND(&next_proto);
|
||||||
|
|
||||||
Node* proto = LoadMapPrototype(holder_map);
|
TNode<HeapObject> proto = LoadMapPrototype(holder_map);
|
||||||
|
|
||||||
GotoIf(IsNull(proto), if_end);
|
GotoIf(IsNull(proto), if_end);
|
||||||
|
|
||||||
Node* map = LoadMap(proto);
|
TNode<Map> map = LoadMap(proto);
|
||||||
Node* instance_type = LoadMapInstanceType(map);
|
TNode<Int32T> instance_type = LoadMapInstanceType(map);
|
||||||
|
|
||||||
var_holder.Bind(proto);
|
var_holder = proto;
|
||||||
var_holder_map.Bind(map);
|
var_holder_map = map;
|
||||||
var_holder_instance_type.Bind(instance_type);
|
var_holder_instance_type = instance_type;
|
||||||
Goto(&loop);
|
Goto(&loop);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
BIND(&if_keyisindex);
|
BIND(&if_keyisindex);
|
||||||
{
|
{
|
||||||
VARIABLE(var_holder, MachineRepresentation::kTagged, object);
|
TVARIABLE(HeapObject, var_holder, CAST(object));
|
||||||
VARIABLE(var_holder_map, MachineRepresentation::kTagged, map);
|
TVARIABLE(Map, var_holder_map, map);
|
||||||
VARIABLE(var_holder_instance_type, MachineRepresentation::kWord32,
|
TVARIABLE(Int32T, var_holder_instance_type, instance_type);
|
||||||
instance_type);
|
|
||||||
|
|
||||||
Variable* merged_variables[] = {&var_holder, &var_holder_map,
|
VariableList merged_variables(
|
||||||
&var_holder_instance_type};
|
{&var_holder, &var_holder_map, &var_holder_instance_type}, zone());
|
||||||
Label loop(this, arraysize(merged_variables), merged_variables);
|
Label loop(this, merged_variables);
|
||||||
Goto(&loop);
|
Goto(&loop);
|
||||||
BIND(&loop);
|
BIND(&loop);
|
||||||
{
|
{
|
||||||
@ -9966,16 +9951,16 @@ void CodeStubAssembler::TryPrototypeChainLookup(
|
|||||||
var_index.value(), &next_proto, if_bailout);
|
var_index.value(), &next_proto, if_bailout);
|
||||||
BIND(&next_proto);
|
BIND(&next_proto);
|
||||||
|
|
||||||
Node* proto = LoadMapPrototype(var_holder_map.value());
|
TNode<HeapObject> proto = LoadMapPrototype(var_holder_map.value());
|
||||||
|
|
||||||
GotoIf(IsNull(proto), if_end);
|
GotoIf(IsNull(proto), if_end);
|
||||||
|
|
||||||
Node* map = LoadMap(proto);
|
TNode<Map> map = LoadMap(proto);
|
||||||
Node* instance_type = LoadMapInstanceType(map);
|
TNode<Int32T> instance_type = LoadMapInstanceType(map);
|
||||||
|
|
||||||
var_holder.Bind(proto);
|
var_holder = proto;
|
||||||
var_holder_map.Bind(map);
|
var_holder_map = map;
|
||||||
var_holder_instance_type.Bind(instance_type);
|
var_holder_instance_type = instance_type;
|
||||||
Goto(&loop);
|
Goto(&loop);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -10059,28 +10044,27 @@ Node* CodeStubAssembler::OrdinaryHasInstance(Node* context, Node* callable,
|
|||||||
GotoIf(TaggedIsSmi(callable), &return_runtime);
|
GotoIf(TaggedIsSmi(callable), &return_runtime);
|
||||||
|
|
||||||
// Load map of {callable}.
|
// Load map of {callable}.
|
||||||
Node* callable_map = LoadMap(callable);
|
TNode<Map> callable_map = LoadMap(callable);
|
||||||
|
|
||||||
// Goto runtime if {callable} is not a JSFunction.
|
// Goto runtime if {callable} is not a JSFunction.
|
||||||
Node* callable_instance_type = LoadMapInstanceType(callable_map);
|
TNode<Uint16T> callable_instance_type = LoadMapInstanceType(callable_map);
|
||||||
GotoIfNot(InstanceTypeEqual(callable_instance_type, JS_FUNCTION_TYPE),
|
GotoIfNot(InstanceTypeEqual(callable_instance_type, JS_FUNCTION_TYPE),
|
||||||
&return_runtime);
|
&return_runtime);
|
||||||
|
|
||||||
GotoIfPrototypeRequiresRuntimeLookup(CAST(callable), CAST(callable_map),
|
GotoIfPrototypeRequiresRuntimeLookup(CAST(callable), callable_map,
|
||||||
&return_runtime);
|
&return_runtime);
|
||||||
|
|
||||||
// Get the "prototype" (or initial map) of the {callable}.
|
// Get the "prototype" (or initial map) of the {callable}.
|
||||||
Node* callable_prototype =
|
TNode<HeapObject> callable_prototype = LoadObjectField<HeapObject>(
|
||||||
LoadObjectField(callable, JSFunction::kPrototypeOrInitialMapOffset);
|
CAST(callable), JSFunction::kPrototypeOrInitialMapOffset);
|
||||||
{
|
{
|
||||||
Label no_initial_map(this), walk_prototype_chain(this);
|
Label no_initial_map(this), walk_prototype_chain(this);
|
||||||
VARIABLE(var_callable_prototype, MachineRepresentation::kTagged,
|
TVARIABLE(HeapObject, var_callable_prototype, callable_prototype);
|
||||||
callable_prototype);
|
|
||||||
|
|
||||||
// Resolve the "prototype" if the {callable} has an initial map.
|
// Resolve the "prototype" if the {callable} has an initial map.
|
||||||
GotoIfNot(IsMap(callable_prototype), &no_initial_map);
|
GotoIfNot(IsMap(callable_prototype), &no_initial_map);
|
||||||
var_callable_prototype.Bind(
|
var_callable_prototype =
|
||||||
LoadObjectField(callable_prototype, Map::kPrototypeOffset));
|
LoadObjectField<HeapObject>(callable_prototype, Map::kPrototypeOffset);
|
||||||
Goto(&walk_prototype_chain);
|
Goto(&walk_prototype_chain);
|
||||||
|
|
||||||
BIND(&no_initial_map);
|
BIND(&no_initial_map);
|
||||||
@ -10158,8 +10142,8 @@ TNode<BoolT> CodeStubAssembler::IsOffsetInBounds(SloppyTNode<IntPtrT> offset,
|
|||||||
TNode<HeapObject> CodeStubAssembler::LoadFeedbackCellValue(
|
TNode<HeapObject> CodeStubAssembler::LoadFeedbackCellValue(
|
||||||
SloppyTNode<JSFunction> closure) {
|
SloppyTNode<JSFunction> closure) {
|
||||||
TNode<FeedbackCell> feedback_cell =
|
TNode<FeedbackCell> feedback_cell =
|
||||||
CAST(LoadObjectField(closure, JSFunction::kFeedbackCellOffset));
|
LoadObjectField<FeedbackCell>(closure, JSFunction::kFeedbackCellOffset);
|
||||||
return CAST(LoadObjectField(feedback_cell, FeedbackCell::kValueOffset));
|
return LoadObjectField<HeapObject>(feedback_cell, FeedbackCell::kValueOffset);
|
||||||
}
|
}
|
||||||
|
|
||||||
TNode<HeapObject> CodeStubAssembler::LoadFeedbackVector(
|
TNode<HeapObject> CodeStubAssembler::LoadFeedbackVector(
|
||||||
|
@ -1289,7 +1289,7 @@ class V8_EXPORT_PRIVATE CodeStubAssembler
|
|||||||
void GotoIfPrototypeRequiresRuntimeLookup(TNode<JSFunction> function,
|
void GotoIfPrototypeRequiresRuntimeLookup(TNode<JSFunction> function,
|
||||||
TNode<Map> map, Label* runtime);
|
TNode<Map> map, Label* runtime);
|
||||||
// Load the "prototype" property of a JSFunction.
|
// Load the "prototype" property of a JSFunction.
|
||||||
Node* LoadJSFunctionPrototype(Node* function, Label* if_bailout);
|
Node* LoadJSFunctionPrototype(TNode<JSFunction> function, Label* if_bailout);
|
||||||
|
|
||||||
TNode<BytecodeArray> LoadSharedFunctionInfoBytecodeArray(
|
TNode<BytecodeArray> LoadSharedFunctionInfoBytecodeArray(
|
||||||
SloppyTNode<SharedFunctionInfo> shared);
|
SloppyTNode<SharedFunctionInfo> shared);
|
||||||
@ -1372,9 +1372,6 @@ class V8_EXPORT_PRIVATE CodeStubAssembler
|
|||||||
CheckBounds::kDebugOnly);
|
CheckBounds::kDebugOnly);
|
||||||
}
|
}
|
||||||
|
|
||||||
void StoreJSArrayLength(TNode<JSArray> array, TNode<Smi> length);
|
|
||||||
void StoreElements(TNode<Object> object, TNode<FixedArrayBase> elements);
|
|
||||||
|
|
||||||
void StoreFixedArrayOrPropertyArrayElement(
|
void StoreFixedArrayOrPropertyArrayElement(
|
||||||
Node* array, Node* index, Node* value,
|
Node* array, Node* index, Node* value,
|
||||||
WriteBarrierMode barrier_mode = UPDATE_WRITE_BARRIER,
|
WriteBarrierMode barrier_mode = UPDATE_WRITE_BARRIER,
|
||||||
|
@ -2298,10 +2298,10 @@ void AccessorAssembler::GenericPropertyLoad(Node* receiver, Node* receiver_map,
|
|||||||
GotoIf(InstanceTypeEqual(var_holder_instance_type.value(),
|
GotoIf(InstanceTypeEqual(var_holder_instance_type.value(),
|
||||||
JS_TYPED_ARRAY_TYPE),
|
JS_TYPED_ARRAY_TYPE),
|
||||||
slow);
|
slow);
|
||||||
Node* proto = LoadMapPrototype(var_holder_map.value());
|
TNode<HeapObject> proto = LoadMapPrototype(var_holder_map.value());
|
||||||
GotoIf(WordEqual(proto, NullConstant()), &return_undefined);
|
GotoIf(WordEqual(proto, NullConstant()), &return_undefined);
|
||||||
Node* proto_map = LoadMap(proto);
|
TNode<Map> proto_map = LoadMap(proto);
|
||||||
Node* proto_instance_type = LoadMapInstanceType(proto_map);
|
TNode<Uint16T> proto_instance_type = LoadMapInstanceType(proto_map);
|
||||||
var_holder_map.Bind(proto_map);
|
var_holder_map.Bind(proto_map);
|
||||||
var_holder_instance_type.Bind(proto_instance_type);
|
var_holder_instance_type.Bind(proto_instance_type);
|
||||||
Label next_proto(this), return_value(this, &var_value), goto_slow(this);
|
Label next_proto(this), return_value(this, &var_value), goto_slow(this);
|
||||||
@ -2623,7 +2623,7 @@ void AccessorAssembler::LoadIC_NoFeedback(const LoadICParameters* p) {
|
|||||||
|
|
||||||
GotoIfPrototypeRequiresRuntimeLookup(CAST(receiver), CAST(receiver_map),
|
GotoIfPrototypeRequiresRuntimeLookup(CAST(receiver), CAST(receiver_map),
|
||||||
¬_function_prototype);
|
¬_function_prototype);
|
||||||
Return(LoadJSFunctionPrototype(receiver, &miss));
|
Return(LoadJSFunctionPrototype(CAST(receiver), &miss));
|
||||||
BIND(¬_function_prototype);
|
BIND(¬_function_prototype);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1246,7 +1246,7 @@ void InterpreterAssembler::UpdateInterruptBudget(Node* weight, bool backward) {
|
|||||||
Label load_budget_from_bytecode(this), load_budget_done(this);
|
Label load_budget_from_bytecode(this), load_budget_done(this);
|
||||||
TNode<JSFunction> function = CAST(LoadRegister(Register::function_closure()));
|
TNode<JSFunction> function = CAST(LoadRegister(Register::function_closure()));
|
||||||
TNode<FeedbackCell> feedback_cell =
|
TNode<FeedbackCell> feedback_cell =
|
||||||
CAST(LoadObjectField(function, JSFunction::kFeedbackCellOffset));
|
LoadObjectField<FeedbackCell>(function, JSFunction::kFeedbackCellOffset);
|
||||||
TNode<Int32T> old_budget = LoadObjectField<Int32T>(
|
TNode<Int32T> old_budget = LoadObjectField<Int32T>(
|
||||||
feedback_cell, FeedbackCell::kInterruptBudgetOffset);
|
feedback_cell, FeedbackCell::kInterruptBudgetOffset);
|
||||||
|
|
||||||
|
@ -2204,6 +2204,7 @@ IS_UNOP_MATCHER(ChangeInt32ToInt64)
|
|||||||
IS_UNOP_MATCHER(ChangeUint32ToFloat64)
|
IS_UNOP_MATCHER(ChangeUint32ToFloat64)
|
||||||
IS_UNOP_MATCHER(ChangeUint32ToUint64)
|
IS_UNOP_MATCHER(ChangeUint32ToUint64)
|
||||||
IS_UNOP_MATCHER(ChangeCompressedToTagged)
|
IS_UNOP_MATCHER(ChangeCompressedToTagged)
|
||||||
|
IS_UNOP_MATCHER(ChangeCompressedPointerToTaggedPointer)
|
||||||
IS_UNOP_MATCHER(TruncateFloat64ToFloat32)
|
IS_UNOP_MATCHER(TruncateFloat64ToFloat32)
|
||||||
IS_UNOP_MATCHER(TruncateInt64ToInt32)
|
IS_UNOP_MATCHER(TruncateInt64ToInt32)
|
||||||
IS_UNOP_MATCHER(Float32Abs)
|
IS_UNOP_MATCHER(Float32Abs)
|
||||||
|
@ -427,6 +427,8 @@ Matcher<Node*> IsChangeInt32ToInt64(const Matcher<Node*>& input_matcher);
|
|||||||
Matcher<Node*> IsChangeUint32ToFloat64(const Matcher<Node*>& input_matcher);
|
Matcher<Node*> IsChangeUint32ToFloat64(const Matcher<Node*>& input_matcher);
|
||||||
Matcher<Node*> IsChangeUint32ToUint64(const Matcher<Node*>& input_matcher);
|
Matcher<Node*> IsChangeUint32ToUint64(const Matcher<Node*>& input_matcher);
|
||||||
Matcher<Node*> IsChangeCompressedToTagged(const Matcher<Node*>& input_matcher);
|
Matcher<Node*> IsChangeCompressedToTagged(const Matcher<Node*>& input_matcher);
|
||||||
|
Matcher<Node*> IsChangeCompressedPointerToTaggedPointer(
|
||||||
|
const Matcher<Node*>& input_matcher);
|
||||||
Matcher<Node*> IsTruncateFloat64ToFloat32(const Matcher<Node*>& input_matcher);
|
Matcher<Node*> IsTruncateFloat64ToFloat32(const Matcher<Node*>& input_matcher);
|
||||||
Matcher<Node*> IsTruncateInt64ToInt32(const Matcher<Node*>& input_matcher);
|
Matcher<Node*> IsTruncateInt64ToInt32(const Matcher<Node*>& input_matcher);
|
||||||
Matcher<Node*> IsFloat32Abs(const Matcher<Node*>& input_matcher);
|
Matcher<Node*> IsFloat32Abs(const Matcher<Node*>& input_matcher);
|
||||||
|
@ -601,21 +601,22 @@ TARGET_TEST_F(InterpreterAssemblerTest, LoadFeedbackVector) {
|
|||||||
c::IsIntPtrConstant(Register::function_closure().ToOperand() *
|
c::IsIntPtrConstant(Register::function_closure().ToOperand() *
|
||||||
kSystemPointerSize)));
|
kSystemPointerSize)));
|
||||||
#ifdef V8_COMPRESS_POINTERS
|
#ifdef V8_COMPRESS_POINTERS
|
||||||
Matcher<Node*> load_vector_cell_matcher = IsChangeCompressedToTagged(
|
Matcher<Node*> load_vector_cell_matcher =
|
||||||
m.IsLoadFromObject(MachineType::AnyCompressed(), load_function_matcher,
|
IsChangeCompressedPointerToTaggedPointer(m.IsLoadFromObject(
|
||||||
c::IsIntPtrConstant(JSFunction::kFeedbackCellOffset -
|
MachineType::CompressedPointer(), load_function_matcher,
|
||||||
kHeapObjectTag)));
|
c::IsIntPtrConstant(JSFunction::kFeedbackCellOffset -
|
||||||
|
kHeapObjectTag)));
|
||||||
EXPECT_THAT(load_feedback_vector,
|
EXPECT_THAT(load_feedback_vector,
|
||||||
IsChangeCompressedToTagged(m.IsLoadFromObject(
|
IsChangeCompressedPointerToTaggedPointer(m.IsLoadFromObject(
|
||||||
MachineType::AnyCompressed(), load_vector_cell_matcher,
|
MachineType::CompressedPointer(), load_vector_cell_matcher,
|
||||||
c::IsIntPtrConstant(Cell::kValueOffset - kHeapObjectTag))));
|
c::IsIntPtrConstant(Cell::kValueOffset - kHeapObjectTag))));
|
||||||
#else
|
#else
|
||||||
Matcher<Node*> load_vector_cell_matcher = m.IsLoadFromObject(
|
Matcher<Node*> load_vector_cell_matcher = m.IsLoadFromObject(
|
||||||
MachineType::AnyTagged(), load_function_matcher,
|
MachineType::TaggedPointer(), load_function_matcher,
|
||||||
c::IsIntPtrConstant(JSFunction::kFeedbackCellOffset - kHeapObjectTag));
|
c::IsIntPtrConstant(JSFunction::kFeedbackCellOffset - kHeapObjectTag));
|
||||||
EXPECT_THAT(load_feedback_vector,
|
EXPECT_THAT(load_feedback_vector,
|
||||||
m.IsLoadFromObject(
|
m.IsLoadFromObject(
|
||||||
MachineType::AnyTagged(), load_vector_cell_matcher,
|
MachineType::TaggedPointer(), load_vector_cell_matcher,
|
||||||
c::IsIntPtrConstant(Cell::kValueOffset - kHeapObjectTag)));
|
c::IsIntPtrConstant(Cell::kValueOffset - kHeapObjectTag)));
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user