OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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 #include "src/compiler/common-operator.h" | 5 #include "src/compiler/common-operator.h" |
6 | 6 |
7 #include "src/assembler.h" | 7 #include "src/assembler.h" |
8 #include "src/base/lazy-instance.h" | 8 #include "src/base/lazy-instance.h" |
9 #include "src/compiler/linkage.h" | 9 #include "src/compiler/linkage.h" |
10 #include "src/compiler/opcodes.h" | 10 #include "src/compiler/opcodes.h" |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 return OpParameter<size_t>(op); | 108 return OpParameter<size_t>(op); |
109 } | 109 } |
110 | 110 |
111 | 111 |
112 #define CACHED_OP_LIST(V) \ | 112 #define CACHED_OP_LIST(V) \ |
113 V(Always, Operator::kPure, 0, 0, 0, 1, 0, 0) \ | 113 V(Always, Operator::kPure, 0, 0, 0, 1, 0, 0) \ |
114 V(Dead, Operator::kFoldable, 0, 0, 0, 0, 0, 1) \ | 114 V(Dead, Operator::kFoldable, 0, 0, 0, 0, 0, 1) \ |
115 V(End, Operator::kKontrol, 0, 0, 1, 0, 0, 0) \ | 115 V(End, Operator::kKontrol, 0, 0, 1, 0, 0, 0) \ |
116 V(IfTrue, Operator::kKontrol, 0, 0, 1, 0, 0, 1) \ | 116 V(IfTrue, Operator::kKontrol, 0, 0, 1, 0, 0, 1) \ |
117 V(IfFalse, Operator::kKontrol, 0, 0, 1, 0, 0, 1) \ | 117 V(IfFalse, Operator::kKontrol, 0, 0, 1, 0, 0, 1) \ |
| 118 V(IfSuccess, Operator::kKontrol, 0, 0, 1, 0, 0, 1) \ |
| 119 V(IfException, Operator::kKontrol, 0, 0, 1, 0, 0, 1) \ |
118 V(IfDefault, Operator::kKontrol, 0, 0, 1, 0, 0, 1) \ | 120 V(IfDefault, Operator::kKontrol, 0, 0, 1, 0, 0, 1) \ |
119 V(Throw, Operator::kFoldable, 1, 1, 1, 0, 0, 1) \ | 121 V(Throw, Operator::kFoldable, 1, 1, 1, 0, 0, 1) \ |
120 V(Return, Operator::kNoThrow, 1, 1, 1, 0, 0, 1) \ | 122 V(Return, Operator::kNoThrow, 1, 1, 1, 0, 0, 1) \ |
121 V(OsrNormalEntry, Operator::kFoldable, 0, 1, 1, 0, 1, 1) \ | 123 V(OsrNormalEntry, Operator::kFoldable, 0, 1, 1, 0, 1, 1) \ |
122 V(OsrLoopEntry, Operator::kFoldable, 0, 1, 1, 0, 1, 1) | 124 V(OsrLoopEntry, Operator::kFoldable, 0, 1, 1, 0, 1, 1) |
123 | 125 |
124 | 126 |
125 #define CACHED_LOOP_LIST(V) \ | 127 #define CACHED_LOOP_LIST(V) \ |
126 V(1) \ | 128 V(1) \ |
127 V(2) | 129 V(2) |
(...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
488 const Operator* CommonOperatorBuilder::Call(const CallDescriptor* descriptor) { | 490 const Operator* CommonOperatorBuilder::Call(const CallDescriptor* descriptor) { |
489 class CallOperator FINAL : public Operator1<const CallDescriptor*> { | 491 class CallOperator FINAL : public Operator1<const CallDescriptor*> { |
490 public: | 492 public: |
491 CallOperator(const CallDescriptor* descriptor, const char* mnemonic) | 493 CallOperator(const CallDescriptor* descriptor, const char* mnemonic) |
492 : Operator1<const CallDescriptor*>( | 494 : Operator1<const CallDescriptor*>( |
493 IrOpcode::kCall, descriptor->properties(), mnemonic, | 495 IrOpcode::kCall, descriptor->properties(), mnemonic, |
494 descriptor->InputCount() + descriptor->FrameStateCount(), | 496 descriptor->InputCount() + descriptor->FrameStateCount(), |
495 Operator::ZeroIfPure(descriptor->properties()), | 497 Operator::ZeroIfPure(descriptor->properties()), |
496 Operator::ZeroIfPure(descriptor->properties()), | 498 Operator::ZeroIfPure(descriptor->properties()), |
497 descriptor->ReturnCount(), | 499 descriptor->ReturnCount(), |
498 Operator::ZeroIfPure(descriptor->properties()), 0, descriptor) {} | 500 Operator::ZeroIfPure(descriptor->properties()), |
| 501 Operator::ZeroIfNoThrow(descriptor->properties()), descriptor) {} |
499 | 502 |
500 void PrintParameter(std::ostream& os) const OVERRIDE { | 503 void PrintParameter(std::ostream& os) const OVERRIDE { |
501 os << "[" << *parameter() << "]"; | 504 os << "[" << *parameter() << "]"; |
502 } | 505 } |
503 }; | 506 }; |
504 return new (zone()) CallOperator(descriptor, "Call"); | 507 return new (zone()) CallOperator(descriptor, "Call"); |
505 } | 508 } |
506 | 509 |
507 | 510 |
508 const Operator* CommonOperatorBuilder::Projection(size_t index) { | 511 const Operator* CommonOperatorBuilder::Projection(size_t index) { |
(...skipping 19 matching lines...) Expand all Loading... |
528 } else { | 531 } else { |
529 UNREACHABLE(); | 532 UNREACHABLE(); |
530 return nullptr; | 533 return nullptr; |
531 } | 534 } |
532 } | 535 } |
533 | 536 |
534 | 537 |
535 } // namespace compiler | 538 } // namespace compiler |
536 } // namespace internal | 539 } // namespace internal |
537 } // namespace v8 | 540 } // namespace v8 |
OLD | NEW |