| 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 689 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 700 compiler::Node* DecodeWord32(compiler::Node* word32, uint32_t shift, | 700 compiler::Node* DecodeWord32(compiler::Node* word32, uint32_t shift, |
| 701 uint32_t mask); | 701 uint32_t mask); |
| 702 | 702 |
| 703 // Decodes an unsigned (!) value from |word| to a word-size node. | 703 // Decodes an unsigned (!) value from |word| to a word-size node. |
| 704 compiler::Node* DecodeWord(compiler::Node* word, uint32_t shift, | 704 compiler::Node* DecodeWord(compiler::Node* word, uint32_t shift, |
| 705 uint32_t mask); | 705 uint32_t mask); |
| 706 | 706 |
| 707 // Returns true if any of the |T|'s bits in given |word32| are set. | 707 // Returns true if any of the |T|'s bits in given |word32| are set. |
| 708 template <typename T> | 708 template <typename T> |
| 709 compiler::Node* IsSetWord32(compiler::Node* word32) { | 709 compiler::Node* IsSetWord32(compiler::Node* word32) { |
| 710 return Word32NotEqual(Word32And(word32, Int32Constant(T::kMask)), | 710 return IsSetWord32(word32, T::kMask); |
| 711 } |
| 712 |
| 713 // Returns true if any of the mask's bits in given |word32| are set. |
| 714 compiler::Node* IsSetWord32(compiler::Node* word32, uint32_t mask) { |
| 715 return Word32NotEqual(Word32And(word32, Int32Constant(mask)), |
| 711 Int32Constant(0)); | 716 Int32Constant(0)); |
| 712 } | 717 } |
| 713 | 718 |
| 714 // Returns true if any of the |T|'s bits in given |word| are set. | 719 // Returns true if any of the |T|'s bits in given |word| are set. |
| 715 template <typename T> | 720 template <typename T> |
| 716 compiler::Node* IsSetWord(compiler::Node* word) { | 721 compiler::Node* IsSetWord(compiler::Node* word) { |
| 717 return WordNotEqual(WordAnd(word, IntPtrConstant(T::kMask)), | 722 return WordNotEqual(WordAnd(word, IntPtrConstant(T::kMask)), |
| 718 IntPtrConstant(0)); | 723 IntPtrConstant(0)); |
| 719 } | 724 } |
| 720 | 725 |
| (...skipping 438 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1159 static const int kElementLoopUnrollThreshold = 8; | 1164 static const int kElementLoopUnrollThreshold = 8; |
| 1160 }; | 1165 }; |
| 1161 | 1166 |
| 1162 #define CSA_ASSERT(x) Assert((x), #x, __FILE__, __LINE__) | 1167 #define CSA_ASSERT(x) Assert((x), #x, __FILE__, __LINE__) |
| 1163 | 1168 |
| 1164 DEFINE_OPERATORS_FOR_FLAGS(CodeStubAssembler::AllocationFlags); | 1169 DEFINE_OPERATORS_FOR_FLAGS(CodeStubAssembler::AllocationFlags); |
| 1165 | 1170 |
| 1166 } // namespace internal | 1171 } // namespace internal |
| 1167 } // namespace v8 | 1172 } // namespace v8 |
| 1168 #endif // V8_CODE_STUB_ASSEMBLER_H_ | 1173 #endif // V8_CODE_STUB_ASSEMBLER_H_ |
| OLD | NEW |