| 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 800 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 811 void Increment(Variable& variable, int value = 1, | 811 void Increment(Variable& variable, int value = 1, |
| 812 ParameterMode mode = INTPTR_PARAMETERS); | 812 ParameterMode mode = INTPTR_PARAMETERS); |
| 813 | 813 |
| 814 // Generates "if (false) goto label" code. Useful for marking a label as | 814 // Generates "if (false) goto label" code. Useful for marking a label as |
| 815 // "live" to avoid assertion failures during graph building. In the resulting | 815 // "live" to avoid assertion failures during graph building. In the resulting |
| 816 // code this check will be eliminated. | 816 // code this check will be eliminated. |
| 817 void Use(Label* label); | 817 void Use(Label* label); |
| 818 | 818 |
| 819 // Various building blocks for stubs doing property lookups. | 819 // Various building blocks for stubs doing property lookups. |
| 820 void TryToName(Node* key, Label* if_keyisindex, Variable* var_index, | 820 void TryToName(Node* key, Label* if_keyisindex, Variable* var_index, |
| 821 Label* if_keyisunique, Variable* var_unique, | 821 Label* if_keyisunique, Label* if_bailout); |
| 822 Label* if_bailout); | |
| 823 | 822 |
| 824 // Calculates array index for given dictionary entry and entry field. | 823 // Calculates array index for given dictionary entry and entry field. |
| 825 // See Dictionary::EntryToIndex(). | 824 // See Dictionary::EntryToIndex(). |
| 826 template <typename Dictionary> | 825 template <typename Dictionary> |
| 827 Node* EntryToIndex(Node* entry, int field_index); | 826 Node* EntryToIndex(Node* entry, int field_index); |
| 828 template <typename Dictionary> | 827 template <typename Dictionary> |
| 829 Node* EntryToIndex(Node* entry) { | 828 Node* EntryToIndex(Node* entry) { |
| 830 return EntryToIndex<Dictionary>(entry, Dictionary::kEntryKeyIndex); | 829 return EntryToIndex<Dictionary>(entry, Dictionary::kEntryKeyIndex); |
| 831 } | 830 } |
| 832 // Calculate a valid size for the a hash table. | 831 // Calculate a valid size for the a hash table. |
| (...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1253 } | 1252 } |
| 1254 #else | 1253 #else |
| 1255 #define CSA_SLOW_ASSERT(csa, x) ((void)0) | 1254 #define CSA_SLOW_ASSERT(csa, x) ((void)0) |
| 1256 #endif | 1255 #endif |
| 1257 | 1256 |
| 1258 DEFINE_OPERATORS_FOR_FLAGS(CodeStubAssembler::AllocationFlags); | 1257 DEFINE_OPERATORS_FOR_FLAGS(CodeStubAssembler::AllocationFlags); |
| 1259 | 1258 |
| 1260 } // namespace internal | 1259 } // namespace internal |
| 1261 } // namespace v8 | 1260 } // namespace v8 |
| 1262 #endif // V8_CODE_STUB_ASSEMBLER_H_ | 1261 #endif // V8_CODE_STUB_ASSEMBLER_H_ |
| OLD | NEW |