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_COMMON_OPERATOR_H_ | 5 #ifndef V8_COMPILER_COMMON_OPERATOR_H_ |
6 #define V8_COMPILER_COMMON_OPERATOR_H_ | 6 #define V8_COMPILER_COMMON_OPERATOR_H_ |
7 | 7 |
8 #include "src/v8.h" | 8 #include "src/v8.h" |
9 | 9 |
10 #include "src/assembler.h" | 10 #include "src/assembler.h" |
(...skipping 17 matching lines...) Expand all Loading... |
28 controls) {} | 28 controls) {} |
29 | 29 |
30 virtual OStream& PrintParameter(OStream& os) const OVERRIDE { // NOLINT | 30 virtual OStream& PrintParameter(OStream& os) const OVERRIDE { // NOLINT |
31 return os; | 31 return os; |
32 } | 32 } |
33 int ControlInputCount() const { return parameter(); } | 33 int ControlInputCount() const { return parameter(); } |
34 }; | 34 }; |
35 | 35 |
36 class CallOperator FINAL : public Operator1<CallDescriptor*> { | 36 class CallOperator FINAL : public Operator1<CallDescriptor*> { |
37 public: | 37 public: |
| 38 // TODO(titzer): Operator still uses int, whereas CallDescriptor uses size_t. |
38 CallOperator(CallDescriptor* descriptor, const char* mnemonic) | 39 CallOperator(CallDescriptor* descriptor, const char* mnemonic) |
39 : Operator1<CallDescriptor*>( | 40 : Operator1<CallDescriptor*>( |
40 IrOpcode::kCall, descriptor->properties(), | 41 IrOpcode::kCall, descriptor->properties(), |
41 descriptor->InputCount() + descriptor->FrameStateCount(), | 42 static_cast<int>(descriptor->InputCount() + |
42 descriptor->ReturnCount(), mnemonic, descriptor) {} | 43 descriptor->FrameStateCount()), |
| 44 static_cast<int>(descriptor->ReturnCount()), mnemonic, descriptor) { |
| 45 } |
43 | 46 |
44 virtual OStream& PrintParameter(OStream& os) const OVERRIDE { // NOLINT | 47 virtual OStream& PrintParameter(OStream& os) const OVERRIDE { // NOLINT |
45 return os << "[" << *parameter() << "]"; | 48 return os << "[" << *parameter() << "]"; |
46 } | 49 } |
47 }; | 50 }; |
48 | 51 |
49 // Flag that describes how to combine the current environment with | 52 // Flag that describes how to combine the current environment with |
50 // the output of a node to obtain a framestate for lazy bailout. | 53 // the output of a node to obtain a framestate for lazy bailout. |
51 enum OutputFrameStateCombine { | 54 enum OutputFrameStateCombine { |
52 kPushOutput, // Push the output on the expression stack. | 55 kPushOutput, // Push the output on the expression stack. |
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
309 | 312 |
310 template <typename T> | 313 template <typename T> |
311 inline T ValueOf(Operator* op) { | 314 inline T ValueOf(Operator* op) { |
312 return CommonOperatorTraits<T>::ValueOf(op); | 315 return CommonOperatorTraits<T>::ValueOf(op); |
313 } | 316 } |
314 } | 317 } |
315 } | 318 } |
316 } // namespace v8::internal::compiler | 319 } // namespace v8::internal::compiler |
317 | 320 |
318 #endif // V8_COMPILER_COMMON_OPERATOR_H_ | 321 #endif // V8_COMPILER_COMMON_OPERATOR_H_ |
OLD | NEW |