Commit cfffff48 authored by Igor Sheludko's avatar Igor Sheludko Committed by Commit Bot

[csa] Use CSA::IsSpecialReceiverInstanceType() where applicable.

Bug: v8:7310
Change-Id: Ic4a3c3326a1643d9a662a11ccdb75c8121587c71
Reviewed-on: https://chromium-review.googlesource.com/980943Reviewed-by: 's avatarCamillo Bruni <cbruni@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52240}
parent 0c93f034
......@@ -1129,9 +1129,7 @@ TF_BUILTIN(ObjectGetOwnPropertyDescriptor, ObjectBuiltinsAssembler) {
return_undefined(this, Label::kDeferred), if_notunique_name(this);
Node* map = LoadMap(object);
Node* instance_type = LoadMapInstanceType(map);
GotoIf(Int32LessThanOrEqual(instance_type,
Int32Constant(LAST_SPECIAL_RECEIVER_TYPE)),
&call_runtime);
GotoIf(IsSpecialReceiverInstanceType(instance_type), &call_runtime);
{
VARIABLE(var_index, MachineType::PointerRepresentation(),
IntPtrConstant(0));
......
......@@ -6897,10 +6897,7 @@ void CodeStubAssembler::TryLookupProperty(
DCHECK_EQ(MachineType::PointerRepresentation(), var_name_index->rep());
Label if_objectisspecial(this);
STATIC_ASSERT(JS_GLOBAL_OBJECT_TYPE <= LAST_SPECIAL_RECEIVER_TYPE);
GotoIf(Int32LessThanOrEqual(instance_type,
Int32Constant(LAST_SPECIAL_RECEIVER_TYPE)),
&if_objectisspecial);
GotoIf(IsSpecialReceiverInstanceType(instance_type), &if_objectisspecial);
uint32_t mask =
Map::HasNamedInterceptorBit::kMask | Map::IsAccessCheckNeededBit::kMask;
......@@ -7316,9 +7313,7 @@ void CodeStubAssembler::TryLookupElement(Node* object, Node* map,
Label* if_absent, Label* if_not_found,
Label* if_bailout) {
// Handle special objects in runtime.
GotoIf(Int32LessThanOrEqual(instance_type,
Int32Constant(LAST_SPECIAL_RECEIVER_TYPE)),
if_bailout);
GotoIf(IsSpecialReceiverInstanceType(instance_type), if_bailout);
Node* elements_kind = LoadMapElementsKind(map);
......
......@@ -2045,9 +2045,7 @@ void AccessorAssembler::GenericPropertyLoad(Node* receiver, Node* receiver_map,
// Receivers requiring non-standard accesses (interceptors, access
// checks, strings and string wrappers) are handled in the runtime.
GotoIf(Int32LessThanOrEqual(instance_type,
Int32Constant(LAST_SPECIAL_RECEIVER_TYPE)),
&special_receiver);
GotoIf(IsSpecialReceiverInstanceType(instance_type), &special_receiver);
// Check if the receiver has fast or slow properties.
Node* bitfield3 = LoadMapBitField3(receiver_map);
......
......@@ -884,9 +884,7 @@ void KeyedStoreGenericAssembler::StoreIC_Uninitialized() {
Node* instance_type = LoadMapInstanceType(receiver_map);
// Receivers requiring non-standard element accesses (interceptors, access
// checks, strings and string wrappers, proxies) are handled in the runtime.
GotoIf(Int32LessThanOrEqual(instance_type,
Int32Constant(LAST_SPECIAL_RECEIVER_TYPE)),
&miss);
GotoIf(IsSpecialReceiverInstanceType(instance_type), &miss);
// Optimistically write the state transition to the vector.
StoreFeedbackVectorSlot(vector, slot,
......
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