Reviewers: titzer,
Description:
[turbofan] Fix properties of IrOpcode::kThrow operator.
This changes the IrOpcode::kThrow operator to have kNoThrow property,
which sounds unintuitive, but holds for our graphs. The operators is
used to indicate exceptional control flow out of the function, but in
itself does not throw, the throwing is done by a runtime call.
[email protected]
TEST=unittests/CommonOperatorTest/CommonSharedOperatorTest.Properties
Please review this at https://codereview.chromium.org/1046173002/
Base URL: https://chromium.googlesource.com/v8/v8.git@master
Affected files (+2, -2 lines):
M src/compiler/common-operator.cc
M test/unittests/compiler/common-operator-unittest.cc
Index: src/compiler/common-operator.cc
diff --git a/src/compiler/common-operator.cc
b/src/compiler/common-operator.cc
index
304f6fefa3a65072bd1002900adfd70e86eaf76c..1d3e2cfe77f8fc9215632688b8d1221627a45a9c
100644
--- a/src/compiler/common-operator.cc
+++ b/src/compiler/common-operator.cc
@@ -118,7 +118,7 @@ size_t ProjectionIndexOf(const Operator* const op) {
V(IfSuccess, Operator::kKontrol, 0, 0, 1, 0, 0, 1) \
V(IfException, Operator::kKontrol, 0, 0, 1, 1, 0, 1) \
V(IfDefault, Operator::kKontrol, 0, 0, 1, 0, 0, 1) \
- V(Throw, Operator::kFoldable, 1, 1, 1, 0, 0, 1) \
+ V(Throw, Operator::kKontrol, 1, 1, 1, 0, 0, 1) \
V(Deoptimize, Operator::kNoThrow, 1, 1, 1, 0, 0, 1) \
V(Return, Operator::kNoThrow, 1, 1, 1, 0, 0, 1) \
V(OsrNormalEntry, Operator::kFoldable, 0, 1, 1, 0, 1, 1) \
Index: test/unittests/compiler/common-operator-unittest.cc
diff --git a/test/unittests/compiler/common-operator-unittest.cc
b/test/unittests/compiler/common-operator-unittest.cc
index
162368de1d0ad2cfa3072d740eb3232157ceb785..51cd6b13bd26905d0b25748b2dbf3dc8aaef5ac3
100644
--- a/test/unittests/compiler/common-operator-unittest.cc
+++ b/test/unittests/compiler/common-operator-unittest.cc
@@ -55,7 +55,7 @@ const SharedOperator kSharedOperators[] = {
SHARED(IfFalse, Operator::kKontrol, 0, 0, 1, 0, 0, 1),
SHARED(IfSuccess, Operator::kKontrol, 0, 0, 1, 0, 0, 1),
SHARED(IfException, Operator::kKontrol, 0, 0, 1, 1, 0, 1),
- SHARED(Throw, Operator::kFoldable, 1, 1, 1, 0, 0, 1),
+ SHARED(Throw, Operator::kKontrol, 1, 1, 1, 0, 0, 1),
SHARED(Return, Operator::kNoThrow, 1, 1, 1, 0, 0, 1)
#undef SHARED
};
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.