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 | 4 |
5 #ifndef V8_CODE_STUB_ASSEMBLER_H_ | 5 #ifndef V8_CODE_STUB_ASSEMBLER_H_ |
6 #define V8_CODE_STUB_ASSEMBLER_H_ | 6 #define V8_CODE_STUB_ASSEMBLER_H_ |
7 | 7 |
8 #include <functional> | 8 #include <functional> |
9 | 9 |
10 #include "src/compiler/code-assembler.h" | 10 #include "src/compiler/code-assembler.h" |
(...skipping 867 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
878 Label* if_bailout); | 878 Label* if_bailout); |
879 | 879 |
880 // Calculates array index for given dictionary entry and entry field. | 880 // Calculates array index for given dictionary entry and entry field. |
881 // See Dictionary::EntryToIndex(). | 881 // See Dictionary::EntryToIndex(). |
882 template <typename Dictionary> | 882 template <typename Dictionary> |
883 Node* EntryToIndex(Node* entry, int field_index); | 883 Node* EntryToIndex(Node* entry, int field_index); |
884 template <typename Dictionary> | 884 template <typename Dictionary> |
885 Node* EntryToIndex(Node* entry) { | 885 Node* EntryToIndex(Node* entry) { |
886 return EntryToIndex<Dictionary>(entry, Dictionary::kEntryKeyIndex); | 886 return EntryToIndex<Dictionary>(entry, Dictionary::kEntryKeyIndex); |
887 } | 887 } |
| 888 // Loads the details for the entry with the given key_index. |
| 889 // Returns an untagged int32. |
| 890 template <class ContainerType> |
| 891 Node* LoadDetailsForKeyIndex(Node* container, Node* key_index); |
| 892 // Loads the value for the entry with the given key_index. |
| 893 // Returns a tagged value. |
| 894 template <class ContainerType> |
| 895 Node* LoadValueForKeyIndex(Node* container, Node* key_index); |
| 896 // Stores the details for the entry with the given key_index. |
| 897 // |details| must be a Smi. |
| 898 template <class ContainerType> |
| 899 void StoreDetailsForKeyIndex(Node* container, Node* key_index, Node* details); |
| 900 // Stores the value for the entry with the given key_index. |
| 901 template <class ContainerType> |
| 902 void StoreValueForKeyIndex(Node* container, Node* key_index, Node* value); |
| 903 |
888 // Calculate a valid size for the a hash table. | 904 // Calculate a valid size for the a hash table. |
889 Node* HashTableComputeCapacity(Node* at_least_space_for); | 905 Node* HashTableComputeCapacity(Node* at_least_space_for); |
890 | 906 |
891 template <class Dictionary> | 907 template <class Dictionary> |
892 Node* GetNumberOfElements(Node* dictionary); | 908 Node* GetNumberOfElements(Node* dictionary); |
893 | 909 |
894 template <class Dictionary> | 910 template <class Dictionary> |
895 void SetNumberOfElements(Node* dictionary, Node* num_elements_smi); | 911 void SetNumberOfElements(Node* dictionary, Node* num_elements_smi); |
896 | 912 |
897 template <class Dictionary> | 913 template <class Dictionary> |
(...skipping 427 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1325 } | 1341 } |
1326 #else | 1342 #else |
1327 #define CSA_SLOW_ASSERT(csa, x) ((void)0) | 1343 #define CSA_SLOW_ASSERT(csa, x) ((void)0) |
1328 #endif | 1344 #endif |
1329 | 1345 |
1330 DEFINE_OPERATORS_FOR_FLAGS(CodeStubAssembler::AllocationFlags); | 1346 DEFINE_OPERATORS_FOR_FLAGS(CodeStubAssembler::AllocationFlags); |
1331 | 1347 |
1332 } // namespace internal | 1348 } // namespace internal |
1333 } // namespace v8 | 1349 } // namespace v8 |
1334 #endif // V8_CODE_STUB_ASSEMBLER_H_ | 1350 #endif // V8_CODE_STUB_ASSEMBLER_H_ |
OLD | NEW |