OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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_COMPILER_JS_OPERATOR_H_ | 5 #ifndef V8_COMPILER_JS_OPERATOR_H_ |
6 #define V8_COMPILER_JS_OPERATOR_H_ | 6 #define V8_COMPILER_JS_OPERATOR_H_ |
7 | 7 |
8 #include "src/compiler/type-hints.h" | 8 #include "src/compiler/type-hints.h" |
9 #include "src/runtime/runtime.h" | 9 #include "src/runtime/runtime.h" |
10 | 10 |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 | 44 |
45 | 45 |
46 // The ConvertReceiverMode is used as parameter by JSConvertReceiver operators. | 46 // The ConvertReceiverMode is used as parameter by JSConvertReceiver operators. |
47 ConvertReceiverMode ConvertReceiverModeOf(Operator const* op); | 47 ConvertReceiverMode ConvertReceiverModeOf(Operator const* op); |
48 | 48 |
49 | 49 |
50 // The ToBooleanHints are used as parameter by JSToBoolean operators. | 50 // The ToBooleanHints are used as parameter by JSToBoolean operators. |
51 ToBooleanHints ToBooleanHintsOf(Operator const* op); | 51 ToBooleanHints ToBooleanHintsOf(Operator const* op); |
52 | 52 |
53 | 53 |
54 // Defines whether tail call optimization is allowed. | |
55 enum class TailCallMode : unsigned { kAllow, kDisallow }; | |
56 | |
57 size_t hash_value(TailCallMode); | |
58 | |
59 std::ostream& operator<<(std::ostream&, TailCallMode); | |
60 | |
61 | |
62 // Defines the language mode and hints for a JavaScript binary operations. | 54 // Defines the language mode and hints for a JavaScript binary operations. |
63 // This is used as parameter by JSAdd, JSSubtract, etc. operators. | 55 // This is used as parameter by JSAdd, JSSubtract, etc. operators. |
64 class BinaryOperationParameters final { | 56 class BinaryOperationParameters final { |
65 public: | 57 public: |
66 BinaryOperationParameters(LanguageMode language_mode, | 58 BinaryOperationParameters(LanguageMode language_mode, |
67 BinaryOperationHints hints) | 59 BinaryOperationHints hints) |
68 : language_mode_(language_mode), hints_(hints) {} | 60 : language_mode_(language_mode), hints_(hints) {} |
69 | 61 |
70 LanguageMode language_mode() const { return language_mode_; } | 62 LanguageMode language_mode() const { return language_mode_; } |
71 BinaryOperationHints hints() const { return hints_; } | 63 BinaryOperationHints hints() const { return hints_; } |
(...skipping 516 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
588 Zone* const zone_; | 580 Zone* const zone_; |
589 | 581 |
590 DISALLOW_COPY_AND_ASSIGN(JSOperatorBuilder); | 582 DISALLOW_COPY_AND_ASSIGN(JSOperatorBuilder); |
591 }; | 583 }; |
592 | 584 |
593 } // namespace compiler | 585 } // namespace compiler |
594 } // namespace internal | 586 } // namespace internal |
595 } // namespace v8 | 587 } // namespace v8 |
596 | 588 |
597 #endif // V8_COMPILER_JS_OPERATOR_H_ | 589 #endif // V8_COMPILER_JS_OPERATOR_H_ |
OLD | NEW |