OLD | NEW |
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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_INTERPRETER_BYTECODES_H_ | 5 #ifndef V8_INTERPRETER_BYTECODES_H_ |
6 #define V8_INTERPRETER_BYTECODES_H_ | 6 #define V8_INTERPRETER_BYTECODES_H_ |
7 | 7 |
8 #include <cstdint> | 8 #include <cstdint> |
9 #include <iosfwd> | 9 #include <iosfwd> |
10 #include <string> | 10 #include <string> |
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
307 }; | 307 }; |
308 | 308 |
309 // TODO(rmcilroy): Remove once we switch to MSVC 2015 which supports constexpr. | 309 // TODO(rmcilroy): Remove once we switch to MSVC 2015 which supports constexpr. |
310 // See crbug.com/603131. | 310 // See crbug.com/603131. |
311 #if V8_CC_MSVC | 311 #if V8_CC_MSVC |
312 #define CONSTEXPR const | 312 #define CONSTEXPR const |
313 #else | 313 #else |
314 #define CONSTEXPR constexpr | 314 #define CONSTEXPR constexpr |
315 #endif | 315 #endif |
316 | 316 |
317 class Bytecodes final { | 317 class V8_EXPORT_PRIVATE Bytecodes final { |
318 public: | 318 public: |
319 // The maximum number of operands a bytecode may have. | 319 // The maximum number of operands a bytecode may have. |
320 static const int kMaxOperands = 4; | 320 static const int kMaxOperands = 4; |
321 | 321 |
322 // Returns string representation of |bytecode|. | 322 // Returns string representation of |bytecode|. |
323 static const char* ToString(Bytecode bytecode); | 323 static const char* ToString(Bytecode bytecode); |
324 | 324 |
325 // Returns string representation of |bytecode|. | 325 // Returns string representation of |bytecode|. |
326 static std::string ToString(Bytecode bytecode, OperandScale operand_scale); | 326 static std::string ToString(Bytecode bytecode, OperandScale operand_scale); |
327 | 327 |
(...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
726 static const AccumulatorUse kAccumulatorUse[]; | 726 static const AccumulatorUse kAccumulatorUse[]; |
727 static const bool kIsScalable[]; | 727 static const bool kIsScalable[]; |
728 static const int kBytecodeSizes[][3]; | 728 static const int kBytecodeSizes[][3]; |
729 static const OperandSize* const kOperandSizes[][3]; | 729 static const OperandSize* const kOperandSizes[][3]; |
730 }; | 730 }; |
731 | 731 |
732 // TODO(rmcilroy): Remove once we switch to MSVC 2015 which supports constexpr. | 732 // TODO(rmcilroy): Remove once we switch to MSVC 2015 which supports constexpr. |
733 // See crbug.com/603131. | 733 // See crbug.com/603131. |
734 #undef CONSTEXPR | 734 #undef CONSTEXPR |
735 | 735 |
736 std::ostream& operator<<(std::ostream& os, const Bytecode& bytecode); | 736 V8_EXPORT_PRIVATE std::ostream& operator<<(std::ostream& os, |
| 737 const Bytecode& bytecode); |
737 | 738 |
738 } // namespace interpreter | 739 } // namespace interpreter |
739 } // namespace internal | 740 } // namespace internal |
740 } // namespace v8 | 741 } // namespace v8 |
741 | 742 |
742 #endif // V8_INTERPRETER_BYTECODES_H_ | 743 #endif // V8_INTERPRETER_BYTECODES_H_ |
OLD | NEW |