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 411 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
422 // Load a character from a String (might flatten a ConsString). | 422 // Load a character from a String (might flatten a ConsString). |
423 compiler::Node* StringCharCodeAt(compiler::Node* string, | 423 compiler::Node* StringCharCodeAt(compiler::Node* string, |
424 compiler::Node* smi_index); | 424 compiler::Node* smi_index); |
425 // Return the single character string with only {code}. | 425 // Return the single character string with only {code}. |
426 compiler::Node* StringFromCharCode(compiler::Node* code); | 426 compiler::Node* StringFromCharCode(compiler::Node* code); |
427 | 427 |
428 // Type conversion helpers. | 428 // Type conversion helpers. |
429 // Convert a String to a Number. | 429 // Convert a String to a Number. |
430 compiler::Node* StringToNumber(compiler::Node* context, | 430 compiler::Node* StringToNumber(compiler::Node* context, |
431 compiler::Node* input); | 431 compiler::Node* input); |
| 432 // Convert an object to a name. |
| 433 compiler::Node* ToName(compiler::Node* context, compiler::Node* input); |
432 | 434 |
433 // Returns a node that contains a decoded (unsigned!) value of a bit | 435 // Returns a node that contains a decoded (unsigned!) value of a bit |
434 // field |T| in |word32|. Returns result as an uint32 node. | 436 // field |T| in |word32|. Returns result as an uint32 node. |
435 template <typename T> | 437 template <typename T> |
436 compiler::Node* BitFieldDecode(compiler::Node* word32) { | 438 compiler::Node* BitFieldDecode(compiler::Node* word32) { |
437 return BitFieldDecode(word32, T::kShift, T::kMask); | 439 return BitFieldDecode(word32, T::kShift, T::kMask); |
438 } | 440 } |
439 | 441 |
440 // Returns a node that contains a decoded (unsigned!) value of a bit | 442 // Returns a node that contains a decoded (unsigned!) value of a bit |
441 // field |T| in |word32|. Returns result as a word-size node. | 443 // field |T| in |word32|. Returns result as a word-size node. |
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
693 compiler::Node* SmiShiftBitsConstant(); | 695 compiler::Node* SmiShiftBitsConstant(); |
694 | 696 |
695 static const int kElementLoopUnrollThreshold = 8; | 697 static const int kElementLoopUnrollThreshold = 8; |
696 }; | 698 }; |
697 | 699 |
698 DEFINE_OPERATORS_FOR_FLAGS(CodeStubAssembler::AllocationFlags); | 700 DEFINE_OPERATORS_FOR_FLAGS(CodeStubAssembler::AllocationFlags); |
699 | 701 |
700 } // namespace internal | 702 } // namespace internal |
701 } // namespace v8 | 703 } // namespace v8 |
702 #endif // V8_CODE_STUB_ASSEMBLER_H_ | 704 #endif // V8_CODE_STUB_ASSEMBLER_H_ |
OLD | NEW |