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) { ...@@ -1129,9 +1129,7 @@ TF_BUILTIN(ObjectGetOwnPropertyDescriptor, ObjectBuiltinsAssembler) {
return_undefined(this, Label::kDeferred), if_notunique_name(this); return_undefined(this, Label::kDeferred), if_notunique_name(this);
Node* map = LoadMap(object); Node* map = LoadMap(object);
Node* instance_type = LoadMapInstanceType(map); Node* instance_type = LoadMapInstanceType(map);
GotoIf(Int32LessThanOrEqual(instance_type, GotoIf(IsSpecialReceiverInstanceType(instance_type), &call_runtime);
Int32Constant(LAST_SPECIAL_RECEIVER_TYPE)),
&call_runtime);
{ {
VARIABLE(var_index, MachineType::PointerRepresentation(), VARIABLE(var_index, MachineType::PointerRepresentation(),
IntPtrConstant(0)); IntPtrConstant(0));
......
...@@ -6897,10 +6897,7 @@ void CodeStubAssembler::TryLookupProperty( ...@@ -6897,10 +6897,7 @@ void CodeStubAssembler::TryLookupProperty(
DCHECK_EQ(MachineType::PointerRepresentation(), var_name_index->rep()); DCHECK_EQ(MachineType::PointerRepresentation(), var_name_index->rep());
Label if_objectisspecial(this); Label if_objectisspecial(this);
STATIC_ASSERT(JS_GLOBAL_OBJECT_TYPE <= LAST_SPECIAL_RECEIVER_TYPE); GotoIf(IsSpecialReceiverInstanceType(instance_type), &if_objectisspecial);
GotoIf(Int32LessThanOrEqual(instance_type,
Int32Constant(LAST_SPECIAL_RECEIVER_TYPE)),
&if_objectisspecial);
uint32_t mask = uint32_t mask =
Map::HasNamedInterceptorBit::kMask | Map::IsAccessCheckNeededBit::kMask; Map::HasNamedInterceptorBit::kMask | Map::IsAccessCheckNeededBit::kMask;
...@@ -7316,9 +7313,7 @@ void CodeStubAssembler::TryLookupElement(Node* object, Node* map, ...@@ -7316,9 +7313,7 @@ void CodeStubAssembler::TryLookupElement(Node* object, Node* map,
Label* if_absent, Label* if_not_found, Label* if_absent, Label* if_not_found,
Label* if_bailout) { Label* if_bailout) {
// Handle special objects in runtime. // Handle special objects in runtime.
GotoIf(Int32LessThanOrEqual(instance_type, GotoIf(IsSpecialReceiverInstanceType(instance_type), if_bailout);
Int32Constant(LAST_SPECIAL_RECEIVER_TYPE)),
if_bailout);
Node* elements_kind = LoadMapElementsKind(map); Node* elements_kind = LoadMapElementsKind(map);
......
...@@ -2045,9 +2045,7 @@ void AccessorAssembler::GenericPropertyLoad(Node* receiver, Node* receiver_map, ...@@ -2045,9 +2045,7 @@ void AccessorAssembler::GenericPropertyLoad(Node* receiver, Node* receiver_map,
// Receivers requiring non-standard accesses (interceptors, access // Receivers requiring non-standard accesses (interceptors, access
// checks, strings and string wrappers) are handled in the runtime. // checks, strings and string wrappers) are handled in the runtime.
GotoIf(Int32LessThanOrEqual(instance_type, GotoIf(IsSpecialReceiverInstanceType(instance_type), &special_receiver);
Int32Constant(LAST_SPECIAL_RECEIVER_TYPE)),
&special_receiver);
// Check if the receiver has fast or slow properties. // Check if the receiver has fast or slow properties.
Node* bitfield3 = LoadMapBitField3(receiver_map); Node* bitfield3 = LoadMapBitField3(receiver_map);
......
...@@ -884,9 +884,7 @@ void KeyedStoreGenericAssembler::StoreIC_Uninitialized() { ...@@ -884,9 +884,7 @@ void KeyedStoreGenericAssembler::StoreIC_Uninitialized() {
Node* instance_type = LoadMapInstanceType(receiver_map); Node* instance_type = LoadMapInstanceType(receiver_map);
// Receivers requiring non-standard element accesses (interceptors, access // Receivers requiring non-standard element accesses (interceptors, access
// checks, strings and string wrappers, proxies) are handled in the runtime. // checks, strings and string wrappers, proxies) are handled in the runtime.
GotoIf(Int32LessThanOrEqual(instance_type, GotoIf(IsSpecialReceiverInstanceType(instance_type), &miss);
Int32Constant(LAST_SPECIAL_RECEIVER_TYPE)),
&miss);
// Optimistically write the state transition to the vector. // Optimistically write the state transition to the vector.
StoreFeedbackVectorSlot(vector, slot, 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