Commit b3e68b33 authored by Michael Achenbach's avatar Michael Achenbach Committed by Commit Bot

Revert "Add fast path to ObjectGetOwnPropertyDescriptor"

This reverts commit e0b76c9a.

Reason for revert: Changes layout tests:
https://build.chromium.org/p/client.v8.fyi/builders/V8-Blink%20Linux%2064/builds/18522

See also:
https://github.com/v8/v8/wiki/Blink-layout-tests

Original change's description:
> Add fast path to ObjectGetOwnPropertyDescriptor
> 
> Bug: v8:6557
> Change-Id: I384e9f36058c73d40be1faf5ae1bf8c01d068f0e
> Reviewed-on: https://chromium-review.googlesource.com/682059
> Commit-Queue: Maya Lekova <mslekova@google.com>
> Reviewed-by: Igor Sheludko <ishell@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#48166}

TBR=ishell@chromium.org,mslekova@google.com

Change-Id: I27aa52786f79dd617faea6336df684821c1720d2
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:6557
Reviewed-on: https://chromium-review.googlesource.com/685314Reviewed-by: 's avatarMichael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#48171}
parent 83162121
This diff is collapsed.
......@@ -16,6 +16,12 @@ class ProxiesCodeStubAssembler : public CodeStubAssembler {
explicit ProxiesCodeStubAssembler(compiler::CodeAssemblerState* state)
: CodeStubAssembler(state) {}
void BranchIfAccessorPair(Node* value, Label* if_accessor_pair,
Label* if_not_accessor_pair) {
GotoIf(TaggedIsSmi(value), if_not_accessor_pair);
Branch(IsAccessorPair(value), if_accessor_pair, if_not_accessor_pair);
}
// ES6 section 9.5.8 [[Get]] ( P, Receiver )
// name should not be an index.
Node* ProxyGetProperty(Node* context, Node* proxy, Node* name,
......
......@@ -6115,8 +6115,7 @@ void CodeStubAssembler::LoadPropertyFromGlobalDictionary(Node* dictionary,
// Returns either the original value, or the result of the getter call.
Node* CodeStubAssembler::CallGetterIfAccessor(Node* value, Node* details,
Node* context, Node* receiver,
Label* if_bailout,
GetOwnPropertyMode mode) {
Label* if_bailout) {
VARIABLE(var_value, MachineRepresentation::kTagged, value);
Label done(this), if_accessor_info(this, Label::kDeferred);
......@@ -6128,15 +6127,13 @@ Node* CodeStubAssembler::CallGetterIfAccessor(Node* value, Node* details,
// AccessorPair case.
{
if (mode == kCallJSGetter) {
Node* accessor_pair = value;
Node* getter =
LoadObjectField(accessor_pair, AccessorPair::kGetterOffset);
Node* getter = LoadObjectField(accessor_pair, AccessorPair::kGetterOffset);
Node* getter_map = LoadMap(getter);
Node* instance_type = LoadMapInstanceType(getter_map);
// FunctionTemplateInfo getters are not supported yet.
GotoIf(Word32Equal(instance_type,
Int32Constant(FUNCTION_TEMPLATE_INFO_TYPE)),
GotoIf(
Word32Equal(instance_type, Int32Constant(FUNCTION_TEMPLATE_INFO_TYPE)),
if_bailout);
// Return undefined if the {getter} is not callable.
......@@ -6147,7 +6144,6 @@ Node* CodeStubAssembler::CallGetterIfAccessor(Node* value, Node* details,
Callable callable = CodeFactory::Call(isolate());
Node* result = CallJS(callable, context, getter, receiver);
var_value.Bind(result);
}
Goto(&done);
}
......@@ -6224,7 +6220,7 @@ void CodeStubAssembler::TryGetOwnProperty(
Node* context, Node* receiver, Node* object, Node* map, Node* instance_type,
Node* unique_name, Label* if_found_value, Variable* var_value,
Variable* var_details, Variable* var_raw_value, Label* if_not_found,
Label* if_bailout, GetOwnPropertyMode mode) {
Label* if_bailout) {
DCHECK_EQ(MachineRepresentation::kTagged, var_value->rep());
Comment("TryGetOwnProperty");
......@@ -6271,12 +6267,11 @@ void CodeStubAssembler::TryGetOwnProperty(
// Here we have details and value which could be an accessor.
BIND(&if_found);
{
// TODO(ishell): Execute C++ accessor in case of accessor info
if (var_raw_value) {
var_raw_value->Bind(var_value->value());
}
Node* value = CallGetterIfAccessor(var_value->value(), var_details->value(),
context, receiver, if_bailout, mode);
context, receiver, if_bailout);
var_value->Bind(value);
Goto(if_found_value);
}
......
......@@ -1102,12 +1102,6 @@ class V8_EXPORT_PRIVATE CodeStubAssembler : public compiler::CodeAssembler {
Int32Constant(0));
}
// Returns true if none of the mask's bits in given |word32| are set.
TNode<BoolT> IsNotSetWord32(SloppyTNode<Word32T> word32, uint32_t mask) {
return Word32Equal(Word32And(word32, Int32Constant(mask)),
Int32Constant(0));
}
// Returns true if any of the |T|'s bits in given |word| are set.
template <typename T>
Node* IsSetWord(Node* word) {
......@@ -1320,9 +1314,6 @@ class V8_EXPORT_PRIVATE CodeStubAssembler : public compiler::CodeAssembler {
Node* unique_name, Label* if_found,
Label* if_not_found, Label* if_bailout);
// Operating mode for TryGetOwnProperty and CallGetterIfAccessor
// kReturnAccessorPair is used when we're only getting the property descriptor
enum GetOwnPropertyMode { kCallJSGetter, kReturnAccessorPair };
// Tries to get {object}'s own {unique_name} property value. If the property
// is an accessor then it also calls a getter. If the property is a double
// field it re-wraps value in an immutable heap number.
......@@ -1334,8 +1325,7 @@ class V8_EXPORT_PRIVATE CodeStubAssembler : public compiler::CodeAssembler {
Node* instance_type, Node* unique_name,
Label* if_found, Variable* var_value,
Variable* var_details, Variable* var_raw_value,
Label* if_not_found, Label* if_bailout,
GetOwnPropertyMode mode = kCallJSGetter);
Label* if_not_found, Label* if_bailout);
Node* GetProperty(Node* context, Node* receiver, Handle<Name> name) {
return GetProperty(context, receiver, HeapConstant(name));
......@@ -1578,12 +1568,6 @@ class V8_EXPORT_PRIVATE CodeStubAssembler : public compiler::CodeAssembler {
Node* lhs, Node* rhs, Label* if_true,
Label* if_false);
void BranchIfAccessorPair(Node* value, Label* if_accessor_pair,
Label* if_not_accessor_pair) {
GotoIf(TaggedIsSmi(value), if_not_accessor_pair);
Branch(IsAccessorPair(value), if_accessor_pair, if_not_accessor_pair);
}
void GotoIfNumberGreaterThanOrEqual(Node* lhs, Node* rhs, Label* if_false);
Node* Equal(Node* lhs, Node* rhs, Node* context,
......@@ -1680,8 +1664,7 @@ class V8_EXPORT_PRIVATE CodeStubAssembler : public compiler::CodeAssembler {
Node* DescriptorArrayGetKey(Node* descriptors, Node* descriptor_number);
Node* CallGetterIfAccessor(Node* value, Node* details, Node* context,
Node* receiver, Label* if_bailout,
GetOwnPropertyMode mode = kCallJSGetter);
Node* receiver, Label* if_bailout);
Node* TryToIntptr(Node* key, Label* miss);
......
......@@ -342,8 +342,6 @@ class PropertyDetails BASE_EMBEDDED {
(READ_ONLY << AttributesField::kShift);
static const int kAttributesDontDeleteMask =
(DONT_DELETE << AttributesField::kShift);
static const int kAttributesDontEnumMask =
(DONT_ENUM << AttributesField::kShift);
// Bit fields for normalized objects.
class PropertyCellTypeField
......
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