| OLD | NEW |
| 1 // Copyright 2016 the V8 project authors. All rights reserved. | 1 // Copyright 2016 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 #include "src/code-stub-assembler.h" | 4 #include "src/code-stub-assembler.h" |
| 5 #include "src/code-factory.h" | 5 #include "src/code-factory.h" |
| 6 #include "src/frames-inl.h" | 6 #include "src/frames-inl.h" |
| 7 #include "src/frames.h" | 7 #include "src/frames.h" |
| 8 | 8 |
| 9 namespace v8 { | 9 namespace v8 { |
| 10 namespace internal { | 10 namespace internal { |
| (...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 157 | 157 |
| 158 Node* CodeStubAssembler::IntPtrOrSmiConstant(int value, ParameterMode mode) { | 158 Node* CodeStubAssembler::IntPtrOrSmiConstant(int value, ParameterMode mode) { |
| 159 if (mode == SMI_PARAMETERS) { | 159 if (mode == SMI_PARAMETERS) { |
| 160 return SmiConstant(Smi::FromInt(value)); | 160 return SmiConstant(Smi::FromInt(value)); |
| 161 } else { | 161 } else { |
| 162 DCHECK_EQ(INTPTR_PARAMETERS, mode); | 162 DCHECK_EQ(INTPTR_PARAMETERS, mode); |
| 163 return IntPtrConstant(value); | 163 return IntPtrConstant(value); |
| 164 } | 164 } |
| 165 } | 165 } |
| 166 | 166 |
| 167 Node* CodeStubAssembler::IntPtrAddFoldConstants(Node* left, Node* right) { | |
| 168 int32_t left_constant; | |
| 169 bool is_left_constant = ToInt32Constant(left, left_constant); | |
| 170 int32_t right_constant; | |
| 171 bool is_right_constant = ToInt32Constant(right, right_constant); | |
| 172 if (is_left_constant) { | |
| 173 if (is_right_constant) { | |
| 174 return IntPtrConstant(left_constant + right_constant); | |
| 175 } | |
| 176 if (left_constant == 0) { | |
| 177 return right; | |
| 178 } | |
| 179 } else if (is_right_constant) { | |
| 180 if (right_constant == 0) { | |
| 181 return left; | |
| 182 } | |
| 183 } | |
| 184 return IntPtrAdd(left, right); | |
| 185 } | |
| 186 | |
| 187 Node* CodeStubAssembler::IntPtrSubFoldConstants(Node* left, Node* right) { | |
| 188 int32_t left_constant; | |
| 189 bool is_left_constant = ToInt32Constant(left, left_constant); | |
| 190 int32_t right_constant; | |
| 191 bool is_right_constant = ToInt32Constant(right, right_constant); | |
| 192 if (is_left_constant) { | |
| 193 if (is_right_constant) { | |
| 194 return IntPtrConstant(left_constant - right_constant); | |
| 195 } | |
| 196 } else if (is_right_constant) { | |
| 197 if (right_constant == 0) { | |
| 198 return left; | |
| 199 } | |
| 200 } | |
| 201 return IntPtrSub(left, right); | |
| 202 } | |
| 203 | |
| 204 Node* CodeStubAssembler::IntPtrRoundUpToPowerOfTwo32(Node* value) { | 167 Node* CodeStubAssembler::IntPtrRoundUpToPowerOfTwo32(Node* value) { |
| 205 Comment("IntPtrRoundUpToPowerOfTwo32"); | 168 Comment("IntPtrRoundUpToPowerOfTwo32"); |
| 206 CSA_ASSERT(this, UintPtrLessThanOrEqual(value, IntPtrConstant(0x80000000u))); | 169 CSA_ASSERT(this, UintPtrLessThanOrEqual(value, IntPtrConstant(0x80000000u))); |
| 207 value = IntPtrSub(value, IntPtrConstant(1)); | 170 value = IntPtrSub(value, IntPtrConstant(1)); |
| 208 for (int i = 1; i <= 16; i *= 2) { | 171 for (int i = 1; i <= 16; i *= 2) { |
| 209 value = WordOr(value, WordShr(value, IntPtrConstant(i))); | 172 value = WordOr(value, WordShr(value, IntPtrConstant(i))); |
| 210 } | 173 } |
| 211 return IntPtrAdd(value, IntPtrConstant(1)); | 174 return IntPtrAdd(value, IntPtrConstant(1)); |
| 212 } | 175 } |
| 213 | 176 |
| (...skipping 1292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1506 ParameterMode mode = OptimalParameterMode(); | 1469 ParameterMode mode = OptimalParameterMode(); |
| 1507 Variable var_length(this, OptimalParameterRepresentation()); | 1470 Variable var_length(this, OptimalParameterRepresentation()); |
| 1508 var_length.Bind(TaggedToParameter(LoadJSArrayLength(array), mode)); | 1471 var_length.Bind(TaggedToParameter(LoadJSArrayLength(array), mode)); |
| 1509 var_elements.Bind(LoadElements(array)); | 1472 var_elements.Bind(LoadElements(array)); |
| 1510 Node* capacity = | 1473 Node* capacity = |
| 1511 TaggedToParameter(LoadFixedArrayBaseLength(var_elements.value()), mode); | 1474 TaggedToParameter(LoadFixedArrayBaseLength(var_elements.value()), mode); |
| 1512 | 1475 |
| 1513 // Resize the capacity of the fixed array if it doesn't fit. | 1476 // Resize the capacity of the fixed array if it doesn't fit. |
| 1514 Label fits(this, &var_elements); | 1477 Label fits(this, &var_elements); |
| 1515 Node* first = arg_index.value(); | 1478 Node* first = arg_index.value(); |
| 1516 Node* growth = IntPtrSubFoldConstants(args.GetLength(), first); | 1479 Node* growth = IntPtrSub(args.GetLength(), first); |
| 1517 Node* new_length = | 1480 Node* new_length = |
| 1518 IntPtrOrSmiAdd(WordToParameter(growth, mode), var_length.value(), mode); | 1481 IntPtrOrSmiAdd(WordToParameter(growth, mode), var_length.value(), mode); |
| 1519 GotoUnless(IntPtrOrSmiGreaterThanOrEqual(new_length, capacity, mode), &fits); | 1482 GotoUnless(IntPtrOrSmiGreaterThanOrEqual(new_length, capacity, mode), &fits); |
| 1520 Node* new_capacity = CalculateNewElementsCapacity( | 1483 Node* new_capacity = CalculateNewElementsCapacity( |
| 1521 IntPtrOrSmiAdd(new_length, IntPtrOrSmiConstant(1, mode), mode), mode); | 1484 IntPtrOrSmiAdd(new_length, IntPtrOrSmiConstant(1, mode), mode), mode); |
| 1522 var_elements.Bind(GrowElementsCapacity(array, var_elements.value(), kind, | 1485 var_elements.Bind(GrowElementsCapacity(array, var_elements.value(), kind, |
| 1523 kind, capacity, new_capacity, mode, | 1486 kind, capacity, new_capacity, mode, |
| 1524 &pre_bailout)); | 1487 &pre_bailout)); |
| 1525 Goto(&fits); | 1488 Goto(&fits); |
| 1526 Bind(&fits); | 1489 Bind(&fits); |
| (...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1888 Node* CodeStubAssembler::AllocateNameDictionary(Node* at_least_space_for) { | 1851 Node* CodeStubAssembler::AllocateNameDictionary(Node* at_least_space_for) { |
| 1889 CSA_ASSERT(this, UintPtrLessThanOrEqual( | 1852 CSA_ASSERT(this, UintPtrLessThanOrEqual( |
| 1890 at_least_space_for, | 1853 at_least_space_for, |
| 1891 IntPtrConstant(NameDictionary::kMaxCapacity))); | 1854 IntPtrConstant(NameDictionary::kMaxCapacity))); |
| 1892 | 1855 |
| 1893 Node* capacity = HashTableComputeCapacity(at_least_space_for); | 1856 Node* capacity = HashTableComputeCapacity(at_least_space_for); |
| 1894 CSA_ASSERT(this, WordIsPowerOfTwo(capacity)); | 1857 CSA_ASSERT(this, WordIsPowerOfTwo(capacity)); |
| 1895 | 1858 |
| 1896 Node* length = EntryToIndex<NameDictionary>(capacity); | 1859 Node* length = EntryToIndex<NameDictionary>(capacity); |
| 1897 Node* store_size = | 1860 Node* store_size = |
| 1898 IntPtrAddFoldConstants(WordShl(length, IntPtrConstant(kPointerSizeLog2)), | 1861 IntPtrAdd(WordShl(length, IntPtrConstant(kPointerSizeLog2)), |
| 1899 IntPtrConstant(NameDictionary::kHeaderSize)); | 1862 IntPtrConstant(NameDictionary::kHeaderSize)); |
| 1900 | 1863 |
| 1901 Node* result = Allocate(store_size); | 1864 Node* result = Allocate(store_size); |
| 1902 Comment("Initialize NameDictionary"); | 1865 Comment("Initialize NameDictionary"); |
| 1903 // Initialize FixedArray fields. | 1866 // Initialize FixedArray fields. |
| 1904 DCHECK(Heap::RootIsImmortalImmovable(Heap::kHashTableMapRootIndex)); | 1867 DCHECK(Heap::RootIsImmortalImmovable(Heap::kHashTableMapRootIndex)); |
| 1905 StoreMapNoWriteBarrier(result, Heap::kHashTableMapRootIndex); | 1868 StoreMapNoWriteBarrier(result, Heap::kHashTableMapRootIndex); |
| 1906 StoreObjectFieldNoWriteBarrier(result, FixedArray::kLengthOffset, | 1869 StoreObjectFieldNoWriteBarrier(result, FixedArray::kLengthOffset, |
| 1907 SmiFromWord(length)); | 1870 SmiFromWord(length)); |
| 1908 // Initialized HashTable fields. | 1871 // Initialized HashTable fields. |
| 1909 Node* zero = SmiConstant(0); | 1872 Node* zero = SmiConstant(0); |
| (...skipping 11 matching lines...) Expand all Loading... |
| 1921 SmiConstant(PropertyDetails::kInitialIndex), | 1884 SmiConstant(PropertyDetails::kInitialIndex), |
| 1922 SKIP_WRITE_BARRIER); | 1885 SKIP_WRITE_BARRIER); |
| 1923 | 1886 |
| 1924 // Initialize NameDictionary elements. | 1887 // Initialize NameDictionary elements. |
| 1925 Node* result_word = BitcastTaggedToWord(result); | 1888 Node* result_word = BitcastTaggedToWord(result); |
| 1926 Node* start_address = IntPtrAdd( | 1889 Node* start_address = IntPtrAdd( |
| 1927 result_word, IntPtrConstant(NameDictionary::OffsetOfElementAt( | 1890 result_word, IntPtrConstant(NameDictionary::OffsetOfElementAt( |
| 1928 NameDictionary::kElementsStartIndex) - | 1891 NameDictionary::kElementsStartIndex) - |
| 1929 kHeapObjectTag)); | 1892 kHeapObjectTag)); |
| 1930 Node* end_address = IntPtrAdd( | 1893 Node* end_address = IntPtrAdd( |
| 1931 result_word, | 1894 result_word, IntPtrSub(store_size, IntPtrConstant(kHeapObjectTag))); |
| 1932 IntPtrSubFoldConstants(store_size, IntPtrConstant(kHeapObjectTag))); | |
| 1933 StoreFieldsNoWriteBarrier(start_address, end_address, filler); | 1895 StoreFieldsNoWriteBarrier(start_address, end_address, filler); |
| 1934 return result; | 1896 return result; |
| 1935 } | 1897 } |
| 1936 | 1898 |
| 1937 Node* CodeStubAssembler::AllocateJSObjectFromMap(Node* map, Node* properties, | 1899 Node* CodeStubAssembler::AllocateJSObjectFromMap(Node* map, Node* properties, |
| 1938 Node* elements, | 1900 Node* elements, |
| 1939 AllocationFlags flags) { | 1901 AllocationFlags flags) { |
| 1940 CSA_ASSERT(this, IsMap(map)); | 1902 CSA_ASSERT(this, IsMap(map)); |
| 1941 Node* size = | 1903 Node* size = |
| 1942 IntPtrMul(LoadMapInstanceSize(map), IntPtrConstant(kPointerSize)); | 1904 IntPtrMul(LoadMapInstanceSize(map), IntPtrConstant(kPointerSize)); |
| (...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2295 | 2257 |
| 2296 ElementsKind from_kind = from_one_byte ? UINT8_ELEMENTS : UINT16_ELEMENTS; | 2258 ElementsKind from_kind = from_one_byte ? UINT8_ELEMENTS : UINT16_ELEMENTS; |
| 2297 ElementsKind to_kind = to_one_byte ? UINT8_ELEMENTS : UINT16_ELEMENTS; | 2259 ElementsKind to_kind = to_one_byte ? UINT8_ELEMENTS : UINT16_ELEMENTS; |
| 2298 STATIC_ASSERT(SeqOneByteString::kHeaderSize == SeqTwoByteString::kHeaderSize); | 2260 STATIC_ASSERT(SeqOneByteString::kHeaderSize == SeqTwoByteString::kHeaderSize); |
| 2299 int header_size = SeqOneByteString::kHeaderSize - kHeapObjectTag; | 2261 int header_size = SeqOneByteString::kHeaderSize - kHeapObjectTag; |
| 2300 Node* from_offset = | 2262 Node* from_offset = |
| 2301 ElementOffsetFromIndex(from_index, from_kind, mode, header_size); | 2263 ElementOffsetFromIndex(from_index, from_kind, mode, header_size); |
| 2302 Node* to_offset = | 2264 Node* to_offset = |
| 2303 ElementOffsetFromIndex(to_index, to_kind, mode, header_size); | 2265 ElementOffsetFromIndex(to_index, to_kind, mode, header_size); |
| 2304 Node* byte_count = ElementOffsetFromIndex(character_count, from_kind, mode); | 2266 Node* byte_count = ElementOffsetFromIndex(character_count, from_kind, mode); |
| 2305 Node* limit_offset = IntPtrAddFoldConstants(from_offset, byte_count); | 2267 Node* limit_offset = IntPtrAdd(from_offset, byte_count); |
| 2306 | 2268 |
| 2307 // Prepare the fast loop | 2269 // Prepare the fast loop |
| 2308 MachineType type = | 2270 MachineType type = |
| 2309 from_one_byte ? MachineType::Uint8() : MachineType::Uint16(); | 2271 from_one_byte ? MachineType::Uint8() : MachineType::Uint16(); |
| 2310 MachineRepresentation rep = to_one_byte ? MachineRepresentation::kWord8 | 2272 MachineRepresentation rep = to_one_byte ? MachineRepresentation::kWord8 |
| 2311 : MachineRepresentation::kWord16; | 2273 : MachineRepresentation::kWord16; |
| 2312 int from_increment = 1 << ElementsKindToShiftSize(from_kind); | 2274 int from_increment = 1 << ElementsKindToShiftSize(from_kind); |
| 2313 int to_increment = 1 << ElementsKindToShiftSize(to_kind); | 2275 int to_increment = 1 << ElementsKindToShiftSize(to_kind); |
| 2314 | 2276 |
| 2315 Variable current_to_offset(this, MachineType::PointerRepresentation()); | 2277 Variable current_to_offset(this, MachineType::PointerRepresentation()); |
| (...skipping 3150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5466 if (constant_index) { | 5428 if (constant_index) { |
| 5467 return IntPtrConstant(base_size + element_size * index); | 5429 return IntPtrConstant(base_size + element_size * index); |
| 5468 } | 5430 } |
| 5469 | 5431 |
| 5470 Node* shifted_index = | 5432 Node* shifted_index = |
| 5471 (element_size_shift == 0) | 5433 (element_size_shift == 0) |
| 5472 ? index_node | 5434 ? index_node |
| 5473 : ((element_size_shift > 0) | 5435 : ((element_size_shift > 0) |
| 5474 ? WordShl(index_node, IntPtrConstant(element_size_shift)) | 5436 ? WordShl(index_node, IntPtrConstant(element_size_shift)) |
| 5475 : WordShr(index_node, IntPtrConstant(-element_size_shift))); | 5437 : WordShr(index_node, IntPtrConstant(-element_size_shift))); |
| 5476 return IntPtrAddFoldConstants(IntPtrConstant(base_size), shifted_index); | 5438 return IntPtrAdd(IntPtrConstant(base_size), shifted_index); |
| 5477 } | 5439 } |
| 5478 | 5440 |
| 5479 Node* CodeStubAssembler::LoadTypeFeedbackVectorForStub() { | 5441 Node* CodeStubAssembler::LoadTypeFeedbackVectorForStub() { |
| 5480 Node* function = | 5442 Node* function = |
| 5481 LoadFromParentFrame(JavaScriptFrameConstants::kFunctionOffset); | 5443 LoadFromParentFrame(JavaScriptFrameConstants::kFunctionOffset); |
| 5482 Node* literals = LoadObjectField(function, JSFunction::kLiteralsOffset); | 5444 Node* literals = LoadObjectField(function, JSFunction::kLiteralsOffset); |
| 5483 return LoadObjectField(literals, LiteralsArray::kFeedbackVectorOffset); | 5445 return LoadObjectField(literals, LiteralsArray::kFeedbackVectorOffset); |
| 5484 } | 5446 } |
| 5485 | 5447 |
| 5486 void CodeStubAssembler::UpdateFeedback(Node* feedback, | 5448 void CodeStubAssembler::UpdateFeedback(Node* feedback, |
| (...skipping 2718 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8205 | 8167 |
| 8206 CodeStubArguments::CodeStubArguments(CodeStubAssembler* assembler, Node* argc) | 8168 CodeStubArguments::CodeStubArguments(CodeStubAssembler* assembler, Node* argc) |
| 8207 : assembler_(assembler), | 8169 : assembler_(assembler), |
| 8208 argc_(argc), | 8170 argc_(argc), |
| 8209 arguments_(nullptr), | 8171 arguments_(nullptr), |
| 8210 fp_(assembler->LoadFramePointer()) { | 8172 fp_(assembler->LoadFramePointer()) { |
| 8211 argc_ = assembler->ChangeUint32ToWord(argc_); | 8173 argc_ = assembler->ChangeUint32ToWord(argc_); |
| 8212 Node* offset = assembler->ElementOffsetFromIndex( | 8174 Node* offset = assembler->ElementOffsetFromIndex( |
| 8213 argc_, FAST_ELEMENTS, CodeStubAssembler::INTPTR_PARAMETERS, | 8175 argc_, FAST_ELEMENTS, CodeStubAssembler::INTPTR_PARAMETERS, |
| 8214 (StandardFrameConstants::kFixedSlotCountAboveFp - 1) * kPointerSize); | 8176 (StandardFrameConstants::kFixedSlotCountAboveFp - 1) * kPointerSize); |
| 8215 arguments_ = assembler_->IntPtrAddFoldConstants(fp_, offset); | 8177 arguments_ = assembler_->IntPtrAdd(fp_, offset); |
| 8216 } | 8178 } |
| 8217 | 8179 |
| 8218 Node* CodeStubArguments::GetReceiver() const { | 8180 Node* CodeStubArguments::GetReceiver() const { |
| 8219 return assembler_->Load(MachineType::AnyTagged(), arguments_, | 8181 return assembler_->Load(MachineType::AnyTagged(), arguments_, |
| 8220 assembler_->IntPtrConstant(kPointerSize)); | 8182 assembler_->IntPtrConstant(kPointerSize)); |
| 8221 } | 8183 } |
| 8222 | 8184 |
| 8223 Node* CodeStubArguments::AtIndex(Node* index, | 8185 Node* CodeStubArguments::AtIndex(Node* index, |
| 8224 CodeStubAssembler::ParameterMode mode) const { | 8186 CodeStubAssembler::ParameterMode mode) const { |
| 8225 typedef compiler::Node Node; | 8187 typedef compiler::Node Node; |
| 8226 Node* negated_index = assembler_->IntPtrSubFoldConstants( | 8188 Node* negated_index = |
| 8227 assembler_->IntPtrOrSmiConstant(0, mode), index); | 8189 assembler_->IntPtrSub(assembler_->IntPtrOrSmiConstant(0, mode), index); |
| 8228 Node* offset = | 8190 Node* offset = |
| 8229 assembler_->ElementOffsetFromIndex(negated_index, FAST_ELEMENTS, mode, 0); | 8191 assembler_->ElementOffsetFromIndex(negated_index, FAST_ELEMENTS, mode, 0); |
| 8230 return assembler_->Load(MachineType::AnyTagged(), arguments_, offset); | 8192 return assembler_->Load(MachineType::AnyTagged(), arguments_, offset); |
| 8231 } | 8193 } |
| 8232 | 8194 |
| 8233 Node* CodeStubArguments::AtIndex(int index) const { | 8195 Node* CodeStubArguments::AtIndex(int index) const { |
| 8234 return AtIndex(assembler_->IntPtrConstant(index)); | 8196 return AtIndex(assembler_->IntPtrConstant(index)); |
| 8235 } | 8197 } |
| 8236 | 8198 |
| 8237 void CodeStubArguments::ForEach( | 8199 void CodeStubArguments::ForEach( |
| 8238 const CodeStubAssembler::VariableList& vars, | 8200 const CodeStubAssembler::VariableList& vars, |
| 8239 const CodeStubArguments::ForEachBodyFunction& body, Node* first, Node* last, | 8201 const CodeStubArguments::ForEachBodyFunction& body, Node* first, Node* last, |
| 8240 CodeStubAssembler::ParameterMode mode) { | 8202 CodeStubAssembler::ParameterMode mode) { |
| 8241 assembler_->Comment("CodeStubArguments::ForEach"); | 8203 assembler_->Comment("CodeStubArguments::ForEach"); |
| 8242 DCHECK_IMPLIES(first == nullptr || last == nullptr, | 8204 DCHECK_IMPLIES(first == nullptr || last == nullptr, |
| 8243 mode == CodeStubAssembler::INTPTR_PARAMETERS); | 8205 mode == CodeStubAssembler::INTPTR_PARAMETERS); |
| 8244 if (first == nullptr) { | 8206 if (first == nullptr) { |
| 8245 first = assembler_->IntPtrOrSmiConstant(0, mode); | 8207 first = assembler_->IntPtrOrSmiConstant(0, mode); |
| 8246 } | 8208 } |
| 8247 if (last == nullptr) { | 8209 if (last == nullptr) { |
| 8248 last = argc_; | 8210 last = argc_; |
| 8249 } | 8211 } |
| 8250 Node* start = assembler_->IntPtrSubFoldConstants( | 8212 Node* start = assembler_->IntPtrSub( |
| 8251 arguments_, | 8213 arguments_, |
| 8252 assembler_->ElementOffsetFromIndex(first, FAST_ELEMENTS, mode)); | 8214 assembler_->ElementOffsetFromIndex(first, FAST_ELEMENTS, mode)); |
| 8253 Node* end = assembler_->IntPtrSubFoldConstants( | 8215 Node* end = assembler_->IntPtrSub( |
| 8254 arguments_, | 8216 arguments_, |
| 8255 assembler_->ElementOffsetFromIndex(last, FAST_ELEMENTS, mode)); | 8217 assembler_->ElementOffsetFromIndex(last, FAST_ELEMENTS, mode)); |
| 8256 assembler_->BuildFastLoop( | 8218 assembler_->BuildFastLoop( |
| 8257 vars, MachineType::PointerRepresentation(), start, end, | 8219 vars, MachineType::PointerRepresentation(), start, end, |
| 8258 [this, &body](Node* current) { | 8220 [this, &body](Node* current) { |
| 8259 Node* arg = assembler_->Load(MachineType::AnyTagged(), current); | 8221 Node* arg = assembler_->Load(MachineType::AnyTagged(), current); |
| 8260 body(arg); | 8222 body(arg); |
| 8261 }, | 8223 }, |
| 8262 -kPointerSize, CodeStubAssembler::IndexAdvanceMode::kPost); | 8224 -kPointerSize, CodeStubAssembler::IndexAdvanceMode::kPost); |
| 8263 } | 8225 } |
| 8264 | 8226 |
| 8265 void CodeStubArguments::PopAndReturn(Node* value) { | 8227 void CodeStubArguments::PopAndReturn(Node* value) { |
| 8266 assembler_->PopAndReturn( | 8228 assembler_->PopAndReturn( |
| 8267 assembler_->IntPtrAddFoldConstants(argc_, assembler_->IntPtrConstant(1)), | 8229 assembler_->IntPtrAdd(argc_, assembler_->IntPtrConstant(1)), value); |
| 8268 value); | |
| 8269 } | 8230 } |
| 8270 | 8231 |
| 8271 Node* CodeStubAssembler::IsFastElementsKind(Node* elements_kind) { | 8232 Node* CodeStubAssembler::IsFastElementsKind(Node* elements_kind) { |
| 8272 return Uint32LessThanOrEqual(elements_kind, | 8233 return Uint32LessThanOrEqual(elements_kind, |
| 8273 Int32Constant(LAST_FAST_ELEMENTS_KIND)); | 8234 Int32Constant(LAST_FAST_ELEMENTS_KIND)); |
| 8274 } | 8235 } |
| 8275 | 8236 |
| 8276 Node* CodeStubAssembler::IsHoleyFastElementsKind(Node* elements_kind) { | 8237 Node* CodeStubAssembler::IsHoleyFastElementsKind(Node* elements_kind) { |
| 8277 CSA_ASSERT(this, IsFastElementsKind(elements_kind)); | 8238 CSA_ASSERT(this, IsFastElementsKind(elements_kind)); |
| 8278 | 8239 |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8368 Heap::kUndefinedValueRootIndex); | 8329 Heap::kUndefinedValueRootIndex); |
| 8369 StoreObjectFieldRoot(result, PromiseReactionJobInfo::kDebugNameOffset, | 8330 StoreObjectFieldRoot(result, PromiseReactionJobInfo::kDebugNameOffset, |
| 8370 Heap::kUndefinedValueRootIndex); | 8331 Heap::kUndefinedValueRootIndex); |
| 8371 StoreObjectFieldNoWriteBarrier(result, PromiseReactionJobInfo::kContextOffset, | 8332 StoreObjectFieldNoWriteBarrier(result, PromiseReactionJobInfo::kContextOffset, |
| 8372 context); | 8333 context); |
| 8373 return result; | 8334 return result; |
| 8374 } | 8335 } |
| 8375 | 8336 |
| 8376 } // namespace internal | 8337 } // namespace internal |
| 8377 } // namespace v8 | 8338 } // namespace v8 |
| OLD | NEW |