Index: src/code-stub-assembler.cc |
diff --git a/src/code-stub-assembler.cc b/src/code-stub-assembler.cc |
index bd0088a840b83d2eed5a786bb35a09ed00f38e59..6375a085d65a46d8c821fcc17d4d364c67a70401 100644 |
--- a/src/code-stub-assembler.cc |
+++ b/src/code-stub-assembler.cc |
@@ -1201,6 +1201,25 @@ Node* CodeStubAssembler::LoadMapConstructor(Node* map) { |
return result.value(); |
} |
+Node* CodeStubAssembler::LoadSharedFunctionInfoSpecialField( |
+ Node* shared, int offset, ParameterMode mode) { |
+ if (Is64()) { |
+ Node* result = LoadObjectField(shared, offset, MachineType::Int32()); |
+ if (mode == SMI_PARAMETERS) { |
+ result = SmiTag(result); |
+ } else { |
+ result = ChangeUint32ToWord(result); |
+ } |
+ return result; |
+ } else { |
+ Node* result = LoadObjectField(shared, offset); |
+ if (mode != SMI_PARAMETERS) { |
+ result = SmiUntag(result); |
+ } |
+ return result; |
+ } |
+} |
+ |
Node* CodeStubAssembler::LoadNameHashField(Node* name) { |
CSA_ASSERT(this, IsName(name)); |
return LoadObjectField(name, Name::kHashFieldOffset, MachineType::Uint32()); |
@@ -6289,6 +6308,16 @@ void CodeStubAssembler::BuildFastFixedArrayForEach( |
: IndexAdvanceMode::kPost); |
} |
+void CodeStubAssembler::GotoIfFixedArraySizeDoesntFitInNewSpace( |
+ Node* element_count, Label* doesnt_fit, int base_size, ParameterMode mode) { |
+ int max_newspace_parameters = |
+ (kMaxRegularHeapObjectSize - base_size) / kPointerSize; |
+ GotoIf(IntPtrOrSmiGreaterThan( |
+ element_count, IntPtrOrSmiConstant(max_newspace_parameters, mode), |
+ mode), |
+ doesnt_fit); |
+} |
+ |
void CodeStubAssembler::InitializeFieldsWithRoot( |
Node* object, Node* start_offset, Node* end_offset, |
Heap::RootListIndex root_index) { |