diff options
Diffstat (limited to 'deps/v8/src/builtins/builtins-object-gen.cc')
-rw-r--r-- | deps/v8/src/builtins/builtins-object-gen.cc | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/deps/v8/src/builtins/builtins-object-gen.cc b/deps/v8/src/builtins/builtins-object-gen.cc index fb89694c314..a8d83e641ff 100644 --- a/deps/v8/src/builtins/builtins-object-gen.cc +++ b/deps/v8/src/builtins/builtins-object-gen.cc @@ -8,6 +8,7 @@ #include "src/heap/factory-inl.h" #include "src/ic/accessor-assembler.h" #include "src/ic/keyed-store-generic.h" +#include "src/objects/js-generator.h" #include "src/objects/property-descriptor-object.h" #include "src/objects/shared-function-info.h" @@ -199,7 +200,7 @@ TNode<Uint32T> ObjectEntriesValuesBuiltinsAssembler::HasHiddenPrototype( void ObjectEntriesValuesBuiltinsAssembler::GetOwnValuesOrEntries( TNode<Context> context, TNode<Object> maybe_object, CollectType collect_type) { - TNode<JSReceiver> receiver = ToObject(context, maybe_object); + TNode<JSReceiver> receiver = ToObject_Inline(context, maybe_object); Label if_call_runtime_with_fast_path(this, Label::kDeferred), if_call_runtime(this, Label::kDeferred), @@ -292,8 +293,8 @@ TNode<JSArray> ObjectEntriesValuesBuiltinsAssembler::FastGetOwnValuesOrEntries( BIND(&if_has_enum_cache); { GotoIf(WordEqual(object_enum_length, IntPtrConstant(0)), if_no_properties); - TNode<FixedArray> values_or_entries = AllocateFixedArray( - PACKED_ELEMENTS, object_enum_length, kAllowLargeObjectAllocation); + TNode<FixedArray> values_or_entries = CAST(AllocateFixedArray( + PACKED_ELEMENTS, object_enum_length, kAllowLargeObjectAllocation)); // If in case we have enum_cache, // we can't detect accessor of object until loop through descriptors. @@ -360,8 +361,8 @@ TNode<JSArray> ObjectEntriesValuesBuiltinsAssembler::FastGetOwnValuesOrEntries( std::tie(array, elements) = AllocateUninitializedJSArrayWithElements( PACKED_ELEMENTS, array_map, SmiConstant(2), nullptr, IntPtrConstant(2)); - StoreFixedArrayElement(elements, 0, next_key, SKIP_WRITE_BARRIER); - StoreFixedArrayElement(elements, 1, value, SKIP_WRITE_BARRIER); + StoreFixedArrayElement(CAST(elements), 0, next_key, SKIP_WRITE_BARRIER); + StoreFixedArrayElement(CAST(elements), 1, value, SKIP_WRITE_BARRIER); value = TNode<JSArray>::UncheckedCast(array); } @@ -492,7 +493,7 @@ TF_BUILTIN(ObjectAssign, ObjectBuiltinsAssembler) { TNode<Object> target = args.GetOptionalArgumentValue(0); // 1. Let to be ? ToObject(target). - TNode<JSReceiver> to = ToObject(context, target); + TNode<JSReceiver> to = ToObject_Inline(context, target); Label done(this); // 2. If only one argument was passed, return to. @@ -1221,10 +1222,10 @@ TF_BUILTIN(ObjectPrototypeToString, ObjectBuiltinsAssembler) { // ES6 #sec-object.prototype.valueof TF_BUILTIN(ObjectPrototypeValueOf, CodeStubAssembler) { - Node* receiver = Parameter(Descriptor::kReceiver); - Node* context = Parameter(Descriptor::kContext); + TNode<Object> receiver = CAST(Parameter(Descriptor::kReceiver)); + TNode<Context> context = CAST(Parameter(Descriptor::kContext)); - Return(ToObject(context, receiver)); + Return(ToObject_Inline(context, receiver)); } // ES #sec-object.create @@ -1422,7 +1423,7 @@ TF_BUILTIN(HasProperty, ObjectBuiltinsAssembler) { Node* object = Parameter(Descriptor::kObject); Node* context = Parameter(Descriptor::kContext); - Return(HasProperty(object, key, context, kHasProperty)); + Return(HasProperty(context, object, key, kHasProperty)); } TF_BUILTIN(InstanceOf, ObjectBuiltinsAssembler) { @@ -1518,7 +1519,7 @@ TF_BUILTIN(ObjectGetOwnPropertyDescriptor, ObjectBuiltinsAssembler) { Node* key = args.GetOptionalArgumentValue(1); // 1. Let obj be ? ToObject(O). - object = ToObject(context, object); + object = ToObject_Inline(CAST(context), CAST(object)); // 2. Let key be ? ToPropertyKey(P). key = ToName(context, key); |