Index: src/code-stub-assembler.cc |
diff --git a/src/code-stub-assembler.cc b/src/code-stub-assembler.cc |
index d0b63225a00904cdd6c8ac5e402121ad13b95a66..d7c47a90ac8a4adeae158ddd39916a38472c1926 100644 |
--- a/src/code-stub-assembler.cc |
+++ b/src/code-stub-assembler.cc |
@@ -1065,6 +1065,11 @@ Node* CodeStubAssembler::HasInstanceType(Node* object, |
return Word32Equal(LoadInstanceType(object), Int32Constant(instance_type)); |
} |
+Node* CodeStubAssembler::DoesntHaveInstanceType(Node* object, |
+ InstanceType instance_type) { |
+ return Word32NotEqual(LoadInstanceType(object), Int32Constant(instance_type)); |
+} |
+ |
Node* CodeStubAssembler::LoadProperties(Node* object) { |
return LoadObjectField(object, JSObject::kPropertiesOffset); |
} |
@@ -6353,6 +6358,20 @@ void CodeStubAssembler::BuildFastFixedArrayForEach( |
: IndexAdvanceMode::kPost); |
} |
+void CodeStubAssembler::InitializeFieldsWithRoot( |
+ Node* object, Node* start_offset, Node* end_offset, |
+ Heap::RootListIndex root_index) { |
+ start_offset = IntPtrAdd(start_offset, IntPtrConstant(-kHeapObjectTag)); |
+ end_offset = IntPtrAdd(end_offset, IntPtrConstant(-kHeapObjectTag)); |
+ Node* root_value = LoadRoot(root_index); |
+ BuildFastLoop(MachineType::PointerRepresentation(), end_offset, start_offset, |
+ [this, object, root_value](Node* current) { |
+ StoreNoWriteBarrier(MachineRepresentation::kTagged, object, |
+ current, root_value); |
+ }, |
+ -kPointerSize, CodeStubAssembler::IndexAdvanceMode::kPre); |
+} |
+ |
void CodeStubAssembler::BranchIfNumericRelationalComparison( |
RelationalComparisonMode mode, Node* lhs, Node* rhs, Label* if_true, |
Label* if_false) { |