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 709 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
720 // Check if |var_string| has an indirect (thin or flat cons) string type, | 720 // Check if |var_string| has an indirect (thin or flat cons) string type, |
721 // and unpack it if so. | 721 // and unpack it if so. |
722 void MaybeDerefIndirectString(Variable* var_string, Node* instance_type, | 722 void MaybeDerefIndirectString(Variable* var_string, Node* instance_type, |
723 Variable* var_did_something); | 723 Variable* var_did_something); |
724 // Check if |var_left| or |var_right| has an indirect (thin or flat cons) | 724 // Check if |var_left| or |var_right| has an indirect (thin or flat cons) |
725 // string type, and unpack it/them if so. Fall through if nothing was done. | 725 // string type, and unpack it/them if so. Fall through if nothing was done. |
726 void MaybeDerefIndirectStrings(Variable* var_left, Node* left_instance_type, | 726 void MaybeDerefIndirectStrings(Variable* var_left, Node* left_instance_type, |
727 Variable* var_right, Node* right_instance_type, | 727 Variable* var_right, Node* right_instance_type, |
728 Label* did_something); | 728 Label* did_something); |
729 | 729 |
730 // Return the first index >= {from} at which {needle_char} was found in | |
731 // {string}, or -1 if such an index does not exist. The returned value is | |
732 // a Smi, {string} is expected to be a String, {needle_char} is an intptr, | |
733 // and {from} is expected to be tagged. | |
734 Node* StringIndexOfChar(Node* context, Node* string, Node* needle_char, | |
735 Node* from); | |
736 | |
737 Node* StringFromCodePoint(Node* codepoint, UnicodeEncoding encoding); | 730 Node* StringFromCodePoint(Node* codepoint, UnicodeEncoding encoding); |
738 | 731 |
739 // Type conversion helpers. | 732 // Type conversion helpers. |
740 // Convert a String to a Number. | 733 // Convert a String to a Number. |
741 Node* StringToNumber(Node* context, Node* input); | 734 Node* StringToNumber(Node* context, Node* input); |
742 Node* NumberToString(Node* context, Node* input); | 735 Node* NumberToString(Node* context, Node* input); |
743 // Convert an object to a name. | 736 // Convert an object to a name. |
744 Node* ToName(Node* context, Node* input); | 737 Node* ToName(Node* context, Node* input); |
745 // Convert a Non-Number object to a Number. | 738 // Convert a Non-Number object to a Number. |
746 Node* NonNumberToNumber(Node* context, Node* input); | 739 Node* NonNumberToNumber(Node* context, Node* input); |
(...skipping 571 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1318 } | 1311 } |
1319 #else | 1312 #else |
1320 #define CSA_SLOW_ASSERT(csa, x) ((void)0) | 1313 #define CSA_SLOW_ASSERT(csa, x) ((void)0) |
1321 #endif | 1314 #endif |
1322 | 1315 |
1323 DEFINE_OPERATORS_FOR_FLAGS(CodeStubAssembler::AllocationFlags); | 1316 DEFINE_OPERATORS_FOR_FLAGS(CodeStubAssembler::AllocationFlags); |
1324 | 1317 |
1325 } // namespace internal | 1318 } // namespace internal |
1326 } // namespace v8 | 1319 } // namespace v8 |
1327 #endif // V8_CODE_STUB_ASSEMBLER_H_ | 1320 #endif // V8_CODE_STUB_ASSEMBLER_H_ |
OLD | NEW |