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/runtime/runtime.h" | 8 #include "src/runtime/runtime.h" |
9 | 9 |
10 namespace v8 { | 10 namespace v8 { |
(...skipping 26 matching lines...) Expand all Loading... |
37 }; | 37 }; |
38 | 38 |
39 bool operator==(VectorSlotPair const&, VectorSlotPair const&); | 39 bool operator==(VectorSlotPair const&, VectorSlotPair const&); |
40 bool operator!=(VectorSlotPair const&, VectorSlotPair const&); | 40 bool operator!=(VectorSlotPair const&, VectorSlotPair const&); |
41 | 41 |
42 size_t hash_value(VectorSlotPair const&); | 42 size_t hash_value(VectorSlotPair const&); |
43 | 43 |
44 | 44 |
45 // Defines hints about receiver values based on structural knowledge. This is | 45 // Defines hints about receiver values based on structural knowledge. This is |
46 // used as a parameter by JSConvertReceiver operators. | 46 // used as a parameter by JSConvertReceiver operators. |
47 enum class ConvertReceiverMode { | 47 enum class ConvertReceiverMode : int { |
48 kNullOrUndefined, // Guaranteed to be null or undefined. | 48 kNullOrUndefined, // Guaranteed to be null or undefined. |
49 kNotNullOrUndefined, // Guaranteed to never be null or undefined. | 49 kNotNullOrUndefined, // Guaranteed to never be null or undefined. |
50 kAny // No specific knowledge about receiver. | 50 kAny // No specific knowledge about receiver. |
51 }; | 51 }; |
52 | 52 |
53 size_t hash_value(ConvertReceiverMode const&); | 53 size_t hash_value(ConvertReceiverMode); |
54 | 54 |
55 std::ostream& operator<<(std::ostream&, ConvertReceiverMode const&); | 55 std::ostream& operator<<(std::ostream&, ConvertReceiverMode); |
56 | 56 |
57 const ConvertReceiverMode& ConvertReceiverModeOf(const Operator* op); | 57 ConvertReceiverMode ConvertReceiverModeOf(const Operator* op); |
58 | 58 |
59 | 59 |
60 // Defines whether tail call optimization is allowed. | 60 // Defines whether tail call optimization is allowed. |
61 enum TailCallMode { NO_TAIL_CALLS, ALLOW_TAIL_CALLS }; | 61 enum TailCallMode { NO_TAIL_CALLS, ALLOW_TAIL_CALLS }; |
62 | 62 |
63 | 63 |
64 // Defines the arity and the call flags for a JavaScript function call. This is | 64 // Defines the arity and the call flags for a JavaScript function call. This is |
65 // used as a parameter by JSCallFunction operators. | 65 // used as a parameter by JSCallFunction operators. |
66 class CallFunctionParameters final { | 66 class CallFunctionParameters final { |
67 public: | 67 public: |
(...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
527 Zone* const zone_; | 527 Zone* const zone_; |
528 | 528 |
529 DISALLOW_COPY_AND_ASSIGN(JSOperatorBuilder); | 529 DISALLOW_COPY_AND_ASSIGN(JSOperatorBuilder); |
530 }; | 530 }; |
531 | 531 |
532 } // namespace compiler | 532 } // namespace compiler |
533 } // namespace internal | 533 } // namespace internal |
534 } // namespace v8 | 534 } // namespace v8 |
535 | 535 |
536 #endif // V8_COMPILER_JS_OPERATOR_H_ | 536 #endif // V8_COMPILER_JS_OPERATOR_H_ |
OLD | NEW |